Service Save Configuration URL endpoint

This endpoint is expected to be invoked by AMS on application service instance configuration change. The purpose of this endpoint is to take the configuration the user has set and save it within the app. This topic explains the details of the request. See Service Lifecycle for more information about the entire process.

Service URL

<service-base-url><service-save-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": "280e7a65-ab6f-47ce-9dfd-0949fcca304c",
  "sub": "AMS-INSTANCE-CONFIGURATION",
  "aud": "280e7a65-ab6f-47ce-9dfd-0949fcca304c",
  "exp": 1549574061,
  "iat": 1549574001,
  "jti": "da30d0e6-c588-4168-9057-5a9cfc502c7b",
  "o.a.p.ctenantId": "607",
  "o.a.p.capplicationUUID": "64658070-8290-4e2b-90d3-ec28fe01321e",
  "o.a.p.cinstallUUID": "709557d8-3af1-498a-ac8c-2c336cb9e415",
  "o.a.p.cproductUUID": "ba2e2ebc-2160-4ecc-b0d8-39f2ed20271f",
  "o.a.p.csourceRequest": "AMS-INSTANCE-CONFIGURATION",
  "o.a.p.cdestinationId": "f7910af6-6e02-4dc4-9f42-aff3b5a46d37",
  "o.a.p.cdestinationUrl": "http://localhost:8090/api/serviceInstances/saveConfigure"
}

Sample Request Body

REQUEST NOTES

  • The request requires an instanceUuid which is the id of the service instance.
  • The payload is optional. A payload can be sent in any form chosen by the developer.
{
    "instanceUuid": "6ea036bb-8cfb-46c5-a826-d001d3a0349b",
    "payload": {
        // Defined by developer. Whatever is sent in postMessage from Configure Page.
    }
}

Sample Response Body

RESPONSE NOTES

  • The content of the response should include a record definition.
  • The response should include configurationStatus which could be either ERROR or CONFIGURED.
  • 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": [...]
  }
}

Learn more

Endpoint reference