Importing data into a product endpoint

This endpoint is invoked by an application on a product during invocation. This topic explains the details of the request. See Service Invocation for more information about the entire process.

Service URL

<URL-provided-by-product-within-invoke>

Request Method

POST or PUT

Request Header

Authorization: Bearer <JWT>

Content-Type=application/json

Request Body Parameters

Parameter Data Type Required? Description
fieldDefinitions object yes

A list of fields to send to the product during invocation.

All fields configured in the app's service instance configuration must be included in this payload. Remember to include all fields within the record definition outputParameters.

release boolean no

Whether or not the product can release the app data. Applicable only for Invocations with data. By default, set to false.

  • true: When enabled, the product will release the app data after this call. This means the app does not need to also send an onCompletion call. Apps should only enable release when apps are intending to send exactly one inbound call.

  • false: Apps are intending to send subsequent "Import data into product" calls, and intend to send a separate onCompletion call.

Bearer Token

JWT Claims

In this scenario, an app is making a request to a product. The key and value pairs bear the following meanings:

Key Value Definition Context
iss The issuer of the token. The app UUID.
sub The subject of the token. The app install UUID.
aud The audience of the token. The instance UUID.
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.
o.a.p.ctenantId The id of the tenant. The id of the tenant.

Signature

Signed with the app install secret.

Sample JWT Payload

{
  "iss": "03a22eb2-537b-471c-bf2b-2055e2f71618",
  "sub": "f866f138-0e2d-fd88-aa61-e8d21c7dbfee",
  "aud": "6ea036bb-8cfb-46c5-a826-d001d3a0349b",
  "exp": 1507072485,
  "iat": 1506964485,
  "o.a.p.ctenantId": "6607"
}

Sample Request Body

{
  "fieldDefinitions": [
    {
      "name": "appcloud_row_correlation_id",
      "dataType": "Text",
      "width": 40,
      "unique": true,
      "required": true,
      "readOnly": null,
      "minimumValue": null,
      "maximumValue": null,
      "possibleValues": null,
      "format": null,
      "resources": null
    },
    {
      "name": "appcloud_row_status",
      "dataType": "Text",
      "width": 10,
      "unique": null,
      "required": true,
      "readOnly": null,
      "minimumValue": null,
      "maximumValue": null,
      "possibleValues": [
        "success",
        "warning",
        "failure"
      ],
      "format": null,
      "resources": null
    },
    {
      "name": "appcloud_row_errormessage",
      "dataType": "Text",
      "width": 5120,
      "unique": null,
      "required": null,
      "readOnly": null,
      "minimumValue": null,
      "maximumValue": null,
      "possibleValues": null,
      "format": null,
      "resources": null
    },
    {
      "name": "Temperature",
      "dataType": "Text",
      "width": 500,
      "unique": null,
      "required": null,
      "readOnly": false,
      "minimumValue": null,
      "maximumValue": null,
      "possibleValues": null,
      "format": null,
      "resources": null
    },
    {
      "name": "Humidity",
      "dataType": "Text",
      "width": 500,
      "unique": null,
      "required": null,
      "readOnly": false,
      "minimumValue": null,
      "maximumValue": null,
      "possibleValues": null,
      "format": null,
      "resources": null
    }
  ],
  "dataSet": {
    "id": "aa-bb-cc-dd-20171011-1234",
    "rows": [
      [
        "ad916c9e-e2e0-4f18-bb43-36c1031ae8a8",
        "success",
        null,
        74.1,
        74.1
      ],
      [
        "57dff4b6-f1dc-420d-b9ae-3053ed18c962",
        "success",
        null,
        66.3,
        66.3
      ],
      [
        "b590e805-5957-4121-98d4-c015a5bc5d77",
        "success",
        null,
        74.1,
        74.1
      ],
      [
        "408df1d7-9e56-49ef-924c-58eff94ae607",
        "success",
        null,
        66.3,
        66.3
      ]
    ],
    "size": null
  },
  "release": false
}

Sample Response in case of success

200 OK

Learn more

Endpoint reference