Quick Start

Set up your environment and then use the STAP REST API to make your first API call by performing these tasks:

Prerequisites

Prerequisite More Information
Install STAP "Installing STAP" in Deployment Guide
Install cURL Use cURL
Set up authentication Authenticate

Task 1: Obtain Account Information

From your account administrator, obtain the appropriate account credentials to enable calls to the STAP REST API. If using OAuth authentication, you will need an OAuth 2.0 access token.

Task 2: Send a Request

After you set up your REST client, you can send a request to ensure that your connection works. For example, to retrieve execution by IDs, you can use the following request:

curl -i -H 'Authorization: Bearer accessToken' -X GET
hostname/httpsPort

Note:

You can send this request if you want your application to have OAuth support.

STAP REST API supports OAuth and Basic Authentication. For more information, see STAP Deployment Guide.

If you do not want your application to have OAuth support, use the following request without the token:

curl -i -X GET hostname/httpsPort/execution/5

If the request is successful, you should receive response code 200 along with a response body similar to the following:

{
  "_id": 5,
  "name": "update----environment-100",
  "count": 1,
  "connections": [
    {
      "_id": 29,
      "name": "test-update1",
      "properties": [
        {
          "_id": 274923071405041,
          "name": "name--2",
          "value": "value--2"
        },
        {
          "_id": 274923071784208,
          "name": "name--2",
          "value": "value--2"
        },
        {
          "_id": 274923071789083,
          "name": "name--3",
          "value": "value--3"
        },
        {
          "_id": 274923071792791,
          "name": "name--1",
          "value": "value--1"
        },
        {
          "_id": 274923071796166,
          "name": "name--1",
          "value": "value--1"
        },
        {
          "_id": 274923071799541,
          "name": "name--1",
          "value": "value--1"
        },
        {
          "_id": 274923071802875,
          "name": "name--1",
          "value": "value--1"
        },
        {
          "_id": 274923071806083,
          "name": "name--1",
          "value": "value--1"
        },
        {
          "_id": 274923071809333,
          "name": "name--1",
          "value": "value--1"
        },
        {
          "_id": 274923071812541,
          "name": "name--1",
          "value": "value--1"
        },
        {
          "_id": 274923071815625,
          "name": "name--1",
          "value": "value--1"
        },
        {
          "_id": 357844231324209,
          "name": "new-name--1",
          "value": "newvalue"
        },
        {
          "_id": 357844231328042,
          "name": "new-name--1",
          "value": "newvalue"
        }
      ],
      "description": "connection--1-100 description"
    }
  ],
  "description": "environment nfVSoxIWbQUgJLH"
}