| GET,PUT,POST,OPTIONS | /v1/AwsAuth |
|---|
import java.math.*
import java.util.*
import java.io.InputStream
import net.servicestack.client.*
open class AwsAuthRequest
{
open var Username:String? = null
open var Password:String? = null
}
open class AwsAuthResponse
{
open var ResponseStatus:ResponseStatus? = null
open var InitiateAuthResponse:InitiateAuthResponse? = null
open var Success:Boolean? = null
}
open class InitiateAuthResponse : AmazonWebServiceResponse()
{
open var AuthenticationResult:AuthenticationResultType? = null
open var ChallengeName:ChallengeNameType? = null
open var ChallengeParameters:HashMap<String,String> = HashMap<String,String>()
open var Session:String? = null
}
open class AmazonWebServiceResponse
{
open var ResponseMetadata:ResponseMetadata? = null
open var ContentLength:Long? = null
open var HttpStatusCode:HttpStatusCode? = null
}
open class ResponseMetadata
{
open var RequestId:String? = null
open var Metadata:HashMap<String,String>? = null
open var ChecksumAlgorithm:CoreChecksumAlgorithm? = null
open var ChecksumValidationStatus:ChecksumValidationStatus? = null
}
enum class CoreChecksumAlgorithm
{
None,
CrC32C,
CrC32,
ShA256,
ShA1,
}
enum class ChecksumValidationStatus
{
NotValidated,
PendingResponseRead,
Successful,
Invalid,
}
open class AuthenticationResultType
{
open var AccessToken:String? = null
open var ExpiresIn:Int? = null
open var IdToken:String? = null
open var NewDeviceMetadata:NewDeviceMetadataType? = null
open var RefreshToken:String? = null
open var TokenType:String? = null
}
open class NewDeviceMetadataType
{
open var DeviceGroupKey:String? = null
open var DeviceKey:String? = null
}
open class ChallengeNameType : ConstantClass()
{
}
open class ConstantClass
{
open var Value: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 /v1/AwsAuth HTTP/1.1
Host: api.dev.dynamics.trendsic.com
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length
{
Username: String,
Password: String
}
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length
{
ResponseStatus:
{
ErrorCode: String,
Message: String,
StackTrace: String,
Errors:
[
{
ErrorCode: String,
FieldName: String,
Message: String,
Meta:
{
String: String
}
}
],
Meta:
{
String: String
}
},
InitiateAuthResponse:
{
AuthenticationResult:
{
AccessToken: String,
ExpiresIn: 0,
IdToken: String,
NewDeviceMetadata:
{
DeviceGroupKey: String,
DeviceKey: String
},
RefreshToken: String,
TokenType: String
},
ChallengeParameters:
{
String: String
},
Session: String,
ResponseMetadata:
{
RequestId: String,
Metadata: {},
ChecksumAlgorithm: NONE,
ChecksumValidationStatus: NOT_VALIDATED
},
ContentLength: 0,
HttpStatusCode: Continue
},
Success: False
}