M2M-Clients
Endpoints for M2M-Clients
Endpoints for M2M-Clients
GET/api/v1/setting/m2m-clients
Authentication: Bearer token (JWT)
scopesarray of M2MScopesRequired when parent is present4 fields[].scopessectionIdstringRequired when parent is presentField path: [].scopes[].sectionId"member", "subscription", "consent", "push-subscription", "push-content", "content", "communication", "segment", "custom-order", "widget", "plans_and_products"sectionNamestringField path: [].scopes[].sectionNamereadPermissionbooleanRequired when parent is present[
{
"scopes": [],
"name": "string",
"description": "string",
"isActive": true,
"id": 0,
"clientIdentifier": "string",
"createdAt": "2019-08-24T14:15:22Z",
"tokenSuffix": "string"
}
]unauthorized
This response has no body.
forbiddenResource
messageCodestringRequiredmessagestringerrorsarray of FieldErrorRequired7 fieldserrorscurlcurl https://api.subrite.no/api/v1/setting/m2m-clients \
--header 'Authorization: Bearer <token>'POST/api/v1/setting/m2m-clients
Authentication: Bearer token (JWT)
application/jsonnamestringRequiredscopesarray of M2MScopesRequired3 required when the containing object is present4 fieldsscopesminItems: 1GET/api/v1/setting/m2m-clients/scopes
Authentication: Bearer token (JWT)
sectionIdstringRequired when parent is presentGET/api/v1/setting/m2m-clients/{id}
Authentication: Bearer token (JWT)
idnumberRequiredDELETE/api/v1/setting/m2m-clients/{id}
Authentication: Bearer token (JWT)
idnumberRequiredThis response has no body.
PATCH/api/v1/setting/m2m-clients/{id}
Authentication: Bearer token (JWT)
idnumberRequiredapplication/jsonnamestringOptionalupdatePermissionbooleanRequired when parent is presentField path: [].scopes[].updatePermissionnamestringRequired when parent is presentdescriptionstringRequired when parent is presentisActivebooleanRequired when parent is presentidnumberRequired when parent is presentclientIdentifierstringRequired when parent is presentcreatedAtstring (date-time)Required when parent is presenttokenSuffixstringRequired when parent is presentfieldstringRequired when parent is presentField path: errors[].fieldfieldValuestringRequired when parent is presentField path: errors[].fieldValueidentifierstringRequired when parent is presentField path: errors[].identifieridentifierValuestringRequired when parent is presentField path: errors[].identifierValuemessageCodestringRequired when parent is presentField path: errors[].messageCodemessagestringField path: errors[].messageerrorTypestringRequired when parent is presentField path: errors[].errorType{
"messageCode": "string",
"message": "string",
"errors": [
{}
]
}sectionIdstringRequired when parent is presentField path: scopes[].sectionId"member", "subscription", "consent", "push-subscription", "push-content", "content", "communication", "segment", "custom-order", "widget", "plans_and_products"sectionNamestringOptionalField path: scopes[].sectionNamereadPermissionbooleanRequired when parent is presentField path: scopes[].readPermissionupdatePermissionbooleanRequired when parent is presentField path: scopes[].updatePermissiondescriptionstringOptionalisActivebooleanOptionaltruescopesarray of M2MScopesRequired4 fieldsscopessectionIdstringRequired when parent is presentField path: scopes[].sectionId"member", "subscription", "consent", "push-subscription", "push-content", "content", "communication", "segment", "custom-order", "widget", "plans_and_products"sectionNamestringField path: scopes[].sectionNamereadPermissionbooleanRequired when parent is presentField path: scopes[].readPermissionupdatePermissionbooleanRequired when parent is presentField path: scopes[].updatePermissionnamestringRequireddescriptionstringRequiredisActivebooleanRequiredidnumberRequiredclientIdentifierstringRequiredcreatedAtstring (date-time)RequiredtokenSuffixstringRequiredtokenstringRequired{
"scopes": [
{}
],
"name": "string",
"description": "string",
"isActive": true,
"id": 0,
"clientIdentifier": "string",
"createdAt": "2019-08-24T14:15:22Z",
"tokenSuffix": "string",
"token": "<token>"
}Body validation failed, or the tenant already has a client with this name
messageCodestringRequired"badRequest", "alreadyExists"messagestringunauthorized
This response has no body.
forbiddenResource
Same fields as Get all M2m clients of a tenant (403).
{
"messageCode": "string",
"message": "string",
"errors": [
{}
]
}curlcurl https://api.subrite.no/api/v1/setting/m2m-clients \
--request POST \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"name": "string",
"scopes": [
{}
],
"description": "string",
"isActive": true
}'"member", "subscription", "consent", "push-subscription", "push-content", "content", "communication", "segment", "custom-order", "widget", "plans_and_products"sectionNamestringreadPermissionbooleanRequired when parent is presentupdatePermissionbooleanRequired when parent is present[
{
"sectionId": "member",
"sectionName": "string",
"readPermission": true,
"updatePermission": true
}
]unauthorized
This response has no body.
forbiddenResource
Same fields as Get all M2m clients of a tenant (403).
{
"messageCode": "string",
"message": "string",
"errors": [
{}
]
}curlcurl https://api.subrite.no/api/v1/setting/m2m-clients/scopes \
--header 'Authorization: Bearer <token>'scopesarray of M2MScopesRequired4 fieldsscopessectionIdstringRequired when parent is presentField path: scopes[].sectionId"member", "subscription", "consent", "push-subscription", "push-content", "content", "communication", "segment", "custom-order", "widget", "plans_and_products"sectionNamestringField path: scopes[].sectionNamereadPermissionbooleanRequired when parent is presentField path: scopes[].readPermissionupdatePermissionbooleanRequired when parent is presentField path: scopes[].updatePermissionnamestringRequireddescriptionstringRequiredisActivebooleanRequiredidnumberRequiredclientIdentifierstringRequiredcreatedAtstring (date-time)RequiredtokenSuffixstringRequired{
"scopes": [
{}
],
"name": "string",
"description": "string",
"isActive": true,
"id": 0,
"clientIdentifier": "string",
"createdAt": "2019-08-24T14:15:22Z",
"tokenSuffix": "string"
}The id is not an integer
messageCodestringRequired"badRequest"messagestringerrorsarray of FieldErrorRequired7 fieldserrorsfieldstringRequired when parent is presentField path: errors[].fieldfieldValuestringRequired when parent is presentField path: errors[].fieldValueidentifierstringRequired when parent is presentField path: errors[].identifieridentifierValuestringRequired when parent is presentField path: errors[].identifierValuemessageCodestringRequired when parent is presentField path: errors[].messageCodemessagestringField path: errors[].messageerrorTypestringRequired when parent is present{
"messageCode": "badRequest",
"message": "string",
"errors": [
{}
]
}unauthorized
This response has no body.
forbiddenResource
Same fields as Get all M2m clients of a tenant (403).
{
"messageCode": "string",
"message": "string",
"errors": [
{}
]
}m2mClientNotFound
messageCodestringRequired"m2mClientNotFound"messagestringerrorsarray of FieldErrorRequired7 fieldserrorsfieldstringRequired when parent is presentField path: errors[].fieldfieldValuestringRequired when parent is presentField path: errors[].fieldValueidentifierstringRequired when parent is presentField path: errors[].identifieridentifierValuestringRequired when parent is presentField path: errors[].identifierValuemessageCodestringRequired when parent is presentField path: errors[].messageCodemessagestringField path: errors[].messageerrorTypestringRequired when parent is present{
"messageCode": "m2mClientNotFound",
"message": "string",
"errors": [
{}
]
}curlcurl 'https://api.subrite.no/api/v1/setting/m2m-clients/{id}' \
--header 'Authorization: Bearer <token>'The id is not an integer
Same fields as Get a M2M client of a tenant by id (400).
{
"messageCode": "badRequest",
"message": "string",
"errors": [
{}
]
}unauthorized
This response has no body.
forbiddenResource
Same fields as Get all M2m clients of a tenant (403).
{
"messageCode": "string",
"message": "string",
"errors": [
{}
]
}m2mClientNotFound
Same fields as Get a M2M client of a tenant by id (404).
{
"messageCode": "m2mClientNotFound",
"message": "string",
"errors": [
{}
]
}curlcurl 'https://api.subrite.no/api/v1/setting/m2m-clients/{id}' \
--request DELETE \
--header 'Authorization: Bearer <token>'scopesarray of M2MScopesOptional3 required when the containing object is presentscopesminItems: 1sectionIdstringRequired when parent is presentField path: scopes[].sectionId"member", "subscription", "consent", "push-subscription", "push-content", "content", "communication", "segment", "custom-order", "widget", "plans_and_products"sectionNamestringOptionalField path: scopes[].sectionNamereadPermissionbooleanRequired when parent is presentField path: scopes[].readPermissionupdatePermissionbooleanRequired when parent is presentField path: scopes[].updatePermissiondescriptionstringOptionalisActivebooleanOptionaltrue{
"name": "string",
"description": "string",
"isActive": true
}Same fields as Get a M2M client of a tenant by id (200).
{
"scopes": [
{}
],
"name": "string",
"description": "string",
"isActive": true,
"id": 0,
"clientIdentifier": "string",
"createdAt": "2019-08-24T14:15:22Z",
"tokenSuffix": "string"
}Body validation failed, the id is not an integer, or the new name is already taken
Same fields as Create a new M2M client for a tenant (400).
unauthorized
This response has no body.
forbiddenResource
Same fields as Get all M2m clients of a tenant (403).
{
"messageCode": "string",
"message": "string",
"errors": [
{}
]
}m2mClientNotFound
Same fields as Get a M2M client of a tenant by id (404).
curlcurl 'https://api.subrite.no/api/v1/setting/m2m-clients/{id}' \
--request PATCH \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"name": "string",
"scopes": [
{}
],
"description": "string",
"isActive": true
}'errorsarray of FieldErrorerrorsfieldstringRequired when parent is presentField path: errors[].fieldfieldValuestringRequired when parent is presentField path: errors[].fieldValueidentifierstringRequired when parent is presentField path: errors[].identifieridentifierValuestringRequired when parent is presentField path: errors[].identifierValuemessageCodestringRequired when parent is presentField path: errors[].messageCodemessagestringField path: errors[].messageerrorTypestringRequired when parent is presentField path: errors[].errorType{
"messageCode": "badRequest",
"message": "string",
"errors": [
{}
]
}{
"messageCode": "badRequest",
"message": "string",
"errors": [
{}
]
}{
"messageCode": "m2mClientNotFound",
"message": "string",
"errors": [
{}
]
}