Exporting data out of a product endpoint

This endpoint is expected to be invoked by an application on a product during invocation.

Service URL

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

Request Method

GET

Request Header

Authorization: Bearer <JWT>

Content-Type=application/json

invocation-id

dataset-id

Optional query parameters

  • offset - Specifies an offset that allows you to retrieve the next batch of records. Any positive integer.

    For example, if your limit is 1000, specifying an offset of 1000 will return records 1000 through 2000. If not specified, the default is 0. Example: ?offset=1000.

  • limit - A URL parameter that specifies the maximum number of records to return. This can be any positive integer between 1 and 1000 inclusive.

    If not specified, the default is 1000. Example: ?limit=5.

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 Response in case of success

{
  "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": "COUNTRY_",
      "dataType": "Text",
      "width": 50,
      "unique": null,
      "required": null,
      "readOnly": true,
      "minimumValue": null,
      "maximumValue": null,
      "possibleValues": null,
      "format": null,
      "resources": null
    },
    {
      "name": "CITY_",
      "dataType": "Text",
      "width": 50,
      "unique": null,
      "required": null,
      "readOnly": true,
      "minimumValue": null,
      "maximumValue": null,
      "possibleValues": null,
      "format": null,
      "resources": null
    }
  ],
  "dataSet": {
    "id": "aa-bb-cc-dd-20171011-1234",
    "rows": [
      [
        "ad916c9e-e2e0-4f18-bb43-36c1031ae8a8",
        "Canada",
        "Toronto"
      ],
      [
        "57dff4b6-f1dc-420d-b9ae-3053ed18c962",
        "USA",
        "Chicago"
      ],
      [
        "b590e805-5957-4121-98d4-c015a5bc5d77",
        "Canada",
        "Vancouver"
      ],
      [
        "408df1d7-9e56-49ef-924c-58eff94ae607",
        "USA",
        "Detroit"
      ]
    ],
    "size": 4
  }
}

Learn more

Endpoint reference