Service Create URL endpoint

This endpoint is invoked by AMS on application service instance creation. This topic explains details only about the request. For more information about the service creation process, refer to the service specific topic for Actions and Templates.

Service URL

<service-base-url><service-create-url>

These URLs are registered with AMS when creating a service.

Request Method

POST

Request Header

Authorization: Bearer <JWT>

Content-Type=application/json

JWT claims

In the case where it is AMS 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. The app's token key.
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.csourceRequest The source of the request. Set to the app's associated product uuid.
o.a.p.cdestinationUrl The destination URL. Set to the service URL.
o.a.p.cdestinationId The destination Id. Set to a random UUID.

Sample JWT Payload

Below is an example JWT payload that AMS will use to call the application service creation endpoint:

{
 "iss": "03a22eb2-537b-471c-bf2b-2055e2f71618",
 "sub": "f866f138-0e2d-fd88-aa61-e8d21c7dbfee",
 "aud": "03a22eb2-537b-471c-bf2b-2055e2f71618",
 "exp": 1507128384000,
 "iat": 1507128324000,
 "jti": "b9b9650e-ae8c-4c93-ab96-e94f6a36f671",
 "o.a.p.csourceRequest": "f866f138-0e2d-fd88-aa61-e8d21c7dbfee",
 "o.a.p.cdestinationUrl": "https://awesomeapp.com/OMC-app/rest/1.0/services/1/instance/create",
 "o.a.p.cdestinationId": "b95d7bea-0154-47b8-81ca-ea4e35e784a9"
}

Sample Request body

{
    "status": "CREATED",
    "assetId": null,
    "assetType": null,
    "uuid": "4420fa19-e8f6-4cdf-9754-d876dea3002f",
    "secret": "c4321e9f-19a7-48b2-9796-c21142c709c9-fb24667dde63-4b6a-99af-10b23122a6d0",
    "recordDefinition": null,
    "applicationServiceInstall": {
        "uuid": "40fe3760-a487-4e89-8cf5-2d3e06977623",
        "name": "Demo transform service for developer's test",
        "description": "Demo transform service for developer's
        test",
        "invokeUrl": "https://b3a3ba42.ngrok.io/OMC-app-demo-1.0/rest/1.0/services/1/invoke",
        "smallLogo": "https://www.iconexperience.com/_img/o_collection_png/green_dark_grey/48x48/plain/delivery_truck.png",
        "mediumLogo": "https://www.iconexperience.com/_img/o_collection_png/green_dark_grey/128x128/plain/delivery_truck.png",
        "largeLogo": "https://www.iconexperience.com/_img/o_collection_png/green_dark_grey/256x256/plain/delivery_truck.png",
        "maxBatchSize": 200,
        "application": {
            "uuid": "b95d7bea-0154-47b8-81ca-ea4e35e784a9",
            "name": "Demo App",
            "description": "It is a demo app",
            "baseUrl": "https://oap.p01.elqqa01.com/awesome-app",
            "statusUrl": "/status",
            "installUrl": "/install",
            "configureUrl": "/configure",
            "uninstallUrl": "/uninstall",
            "saveConfigurationUrl": "/save",
            "smallLogo":"https://images.martechadvisor.com/images/uploads/product_logos/Oracle%20Responsys.jpeg",
            "mediumLogo":"https://images.martechadvisor.com/images/uploads/product_logos/Oracle%20Responsys.jpeg",
            "largeLogo":"https://images.martechadvisor.com/images/uploads/product_logos/Oracle%20Responsys.jpeg",
            "status": "UP",
            "providerUuid": "9dbda2d4-e9ac-4aab-8886-be0402a662cb"
        },
    "serviceType": {
        "name": "ACTIVITY",
        "externalName": "Activity",
        "description": "This service will ingest data and send it to an external service or process it to return back a status or modified data"
    },
    "installUuid": "05860261-2f24-4639-ae38-3616306e3f2d",
    "productName": "Responsys",
    "providerName": "ResponsysApps",
    "status": "UP"
    }
}

Sample response in case of success

RESPONSE NOTES

  • If the app is up, the app creates an instance and responds with success or failure
  • If the app is not up, the app does not respond
{
    "id": "4420fa19-e8f6-4cdf-9754-d876dea3002f",
    "serviceId": "40fe3760-a487-4e89-8cf5-2d3e06977623",
    "status": "CREATED",
    "name": "Demo transform service for developer's test",
    "iconUrl": "https://www.iconexperience.com/_img/o_collection_png/green_dark_grey/48x48/plain/delivery_truck.png"
}

Responsys expects to receive a data transfer object (DTO) describing the record definition. If the app responds back to AMS with a 2xx response status code, the action service is created.

Note: If the app is intending to set a status and provide an error message per record, the app is expected to include at a minimum these parameters as they are required for setting a record's status and providing error detail when needed:

  • inputParameters

    • appcloud_row_correlation_id
  • outputParameters

    • appcloud_row_correlation_id
    • appcloud_row_status
    • appcloud_row_errormessage

Learn more

Endpoint reference