CREATE Registration Token
POST/workspaces/:workspaceId/devices/registration-tokens/create
Manually create registration token
Request
Path Parameters
workspaceId uuidrequired
- application/json-patch+json
- application/json
- text/json
- application/*+json
Body
deviceId stringrequired
expirationTime date-timenullable
allowOnBehalfOfRegistration booleanrequired
Body
deviceId stringrequired
expirationTime date-timenullable
allowOnBehalfOfRegistration booleanrequired
Body
deviceId stringrequired
expirationTime date-timenullable
allowOnBehalfOfRegistration booleanrequired
Body
deviceId stringrequired
expirationTime date-timenullable
allowOnBehalfOfRegistration booleanrequired
Responses
- 200
- 400
- 404
- 409
- 423
Registration token created.
- application/json
- Schema
- Example (from schema)
- example-1
Schema
registrationTokenId uuidrequired
registrationToken stringrequired
expirationTime date-timenullable
issuedTime date-timerequired
deviceId stringrequired
allowOnBehalfOfRegistration booleanrequired
{
"registrationTokenId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"registrationToken": "string",
"expirationTime": "2024-11-28T14:03:07.318Z",
"issuedTime": "2024-11-28T14:03:07.318Z",
"deviceId": "string",
"allowOnBehalfOfRegistration": true
}
{
"registrationTokenId": "9bbfcc09-c6d1-4a5b-825f-f709270c208a",
"expirationTime": "2021-11-12T14:00:00+00:00",
"registrationToken": "rrGhpc19pc19hbl9leGFtcGxlX3Rva2VuX3RoaXNfaXNfYW5fZXhhbXBsZV90b2tlbl90aGlzX2lzX2FuX2V4YW1wbGVfdG9rZW5fdGhpc19pc19hbl9leGFtcGxlX3Rva2VuX3RoaXNfaXNfYW5fZXhhbXBsZV90b2tlbl90aGlzX2lzX2FuX2V4YW1wbGVfdG9rZW4=",
"issuedTime": "2021-11-11T14:00:00+00:00",
"deviceId": "test-device-01",
"allowOnBehalfOfRegistration": true
}
Invalid request.
- application/problem+json
- Schema
- Example (from schema)
Schema
type stringnullable
title stringnullable
status int32nullable
detail stringnullable
instance stringnullable
{
"type": "string",
"title": "string",
"status": 0,
"detail": "string",
"instance": "string"
}
Workspace not found.
- application/problem+json
- Schema
- Example (from schema)
Schema
type stringnullable
title stringnullable
status int32nullable
detail stringnullable
instance stringnullable
{
"type": "string",
"title": "string",
"status": 0,
"detail": "string",
"instance": "string"
}
There is already an active token for the device.
- application/problem+json
- Schema
- Example (from schema)
- example-1
Schema
type stringnullable
title stringnullable
status int32nullable
detail stringnullable
instance stringnullable
{
"type": "string",
"title": "string",
"status": 0,
"detail": "string",
"instance": "string"
}
{
"type": "https://datatracker.ietf.org/doc/html/rfc7231#section-6.5.8",
"title": "Registration token for the device already exists.",
"status": 409,
"activeRegistrationTokenId": "9bbfcc09-c6d1-4a5b-825f-f709270c208a"
}
Workspace is disabled.
- application/problem+json
- Schema
- Example (from schema)
Schema
type stringnullable
title stringnullable
status int32nullable
detail stringnullable
instance stringnullable
{
"type": "string",
"title": "string",
"status": 0,
"detail": "string",
"instance": "string"
}
Loading...