Service Configuration URL endpoint
This endpoint is expected to be invoked by AMS on application service instance configuration. The purpose of this endpoint is to view the configuration page for a service. This topic explains the request that AMS sends when services are configured. For more information about the service configuration process, refer to the service specific topic for Actions and Templates.
Service URL
<service-base-url><service-configuration-url>
These URLs are registered with AMS when creating a service.
Request Method
POST
Request Header
Authorization: Bearer <JWT>
Content-Type=application/json
Bearer Token
JWT claims
When AMS is making the request to the app, the key and value pairs bear the following meanings:
Key | Value Definition | Context |
---|---|---|
iss
|
The issuer of the token. | Set to "AMS". |
sub
|
The subject of the token. | Set to the app's associated product uuid. |
aud
|
The audience of the token. | The App's Token Key. |
exp
|
The date and time the token will expire, expressed as a Unix timestamp. Must be after the current date/time. | Set to 60 seconds after the JWT was created. |
iat
|
The date and time the JWT was issued, expressed as a Unix timestamp. | Set to the current time. |
jti
|
The unique identifier for the JWT token. | Set to a random UUID. |
o.a.p.ctenantId
|
The tenant Id. | Set to the id of the tenant as identified by the product. |
o.a.p.cproductUUID
|
The product UUID. | Set to the UUID of the product associated with the current installation. |
o.a.p.cproductName
|
The product name. | Set to the name of the product, associated with the current installation. |
o.a.p.csourceRequest
|
The Source Id. | Set to the UUID of the product associated with the current installation. |
o.a.p.cdestinationId
|
The destination Id. | Set to the app's UUID. Found in app details. |
o.a.p.cdestinationUrl
|
The destination URL. | Set to the service's Configuration URL. |
Signature
Signed with an app's install secret.
Sample JWT Payload
{
"iss": "AMS",
"sub": "ams-configuration",
"aud": "280e7a65-ab6f-47ce-9dfd-0949fcca304c",
"exp": 1549574041,
"iat": 1549573981,
"jti": "1767e3ec-1666-42a2-9536-0c23854f413b",
"o.a.p.ctenantId": "607",
"o.a.p.cproductUUID": "ba2e2ebc-2160-4ecc-b0d8-39f2ed20271f",
"o.a.p.cproductName": "Product One",
"o.a.p.csourceRequest": "ams-configuration",
"o.a.p.cdestinationId": "64658070-8290-4e2b-90d3-ec28fe01321e",
"o.a.p.cdestinationUrl": "http://localhost:8090/api/serviceInstances/configure"
}
Sample Request Body
{
"uuid": "6ea036bb-8cfb-46c5-a826-d001d3a0349b",
"status": "CREATED",
"locale": "en-US",
"assetId": "23",
"assetType": "some asset"
}
The payload will contain assetType, assetId, locale, and service instance uuid. Probably, the most important is the service instance UUID, to identify which instance to configure.
Sample Response Body
RESPONSE NOTES
- The content of the response should include a record definition.
- The response should include
configurationStatus
which could be eitherERROR
orCONFIGURED
. - Optionally, a payload can be sent back to the application service instance configuration UI.
{
"requestId": "be446dc2-8f30-4fd7-95bb-c72bacff5ebf",
"configurationStatus": "CONFIGURED",
"payload": {},
"httpStatusCode": "200",
"recordDefinition": {
"inputParameters": [...],
"outputParameters": [...]
}
}