| POST | /principal/check |
|---|
import java.math.*
import java.util.*
import net.servicestack.client.*
open class CheckPrincipals : ApiServiceRequest()
{
var principals:ArrayList<PrincipalAppSync> = ArrayList<PrincipalAppSync>()
}
open class ApiServiceRequest : IServiceRequest, IHasApiKey, IHasDeviceInfo
{
/**
* The API Key required for authentication
*/
@ApiMember(DataType="string", Description="The API Key required for authentication", IsRequired=true)
var apiKey:String? = null
/**
* Latitude of the user making this request
*/
@ApiMember(DataType="double", Description="Latitude of the user making this request")
var latitude:Double? = null
/**
* Longitude of the user making this request
*/
@ApiMember(DataType="double", Description="Longitude of the user making this request")
var longitude:Double? = null
}
open class PrincipalAppSync
{
var principalId:Int? = null
var lastUpdated:String? = null
}
open class CheckPrincipalsResponse : ApiServiceResponse()
{
var principalsToUpdate:ArrayList<Int> = ArrayList<Int>()
var principalAppSyncData:ArrayList<PrincipalAppSync> = ArrayList<PrincipalAppSync>()
var authRules:ArrayList<PrincipalAuthRuleData> = ArrayList<PrincipalAuthRuleData>()
}
open class ApiServiceResponse : IServiceResponse
{
/**
* Information about the response.
*/
@ApiMember(Description="Information about the response.", IsRequired=true)
var description:String? = null
/**
* Heading or summary of the response.
*/
@ApiMember(Description="Heading or summary of the response.", IsRequired=true)
var heading:String? = null
/**
* Did the intended operation for this response complete successfully?
*/
@ApiMember(DataType="boolean", Description="Did the intended operation for this response complete successfully?", IsRequired=true)
var wasSuccessful:Boolean? = null
var responseStatus:ResponseStatus? = null
}
open class PrincipalAuthRuleData
{
var principalId:Int? = null
var valueAuthRules:ArrayList<AuthRuleData> = ArrayList<AuthRuleData>()
var unitAuthRules:ArrayList<AuthRuleData> = ArrayList<AuthRuleData>()
}
open class AuthRuleData
{
var fromValue:Double? = null
var toValue:Double? = null
var allow:Boolean? = null
var delayedAuth:Boolean? = null
var authRequired:Boolean? = null
var channel:String? = null
var region:String? = null
}
To override the Content-type in your clients, use the HTTP Accept Header, append the .jsv suffix or ?format=jsv
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /principal/check HTTP/1.1
Host: antel.api.dev.86degrees.com
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length
{
principals:
[
{
principalId: 0,
lastUpdated: String
}
],
apiKey: String,
latitude: 0,
longitude: 0
}
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length
{
principalsToUpdate:
[
0
],
principalAppSyncData:
[
{
principalId: 0,
lastUpdated: String
}
],
authRules:
[
{
principalId: 0,
valueAuthRules:
[
{
}
],
unitAuthRules:
[
{
}
]
}
],
description: String,
heading: String,
wasSuccessful: False,
responseStatus:
{
errorCode: String,
message: String,
stackTrace: String,
errors:
[
{
errorCode: String,
fieldName: String,
message: String,
meta:
{
String: String
}
}
],
meta:
{
String: String
}
}
}