Getting Started

Using the API

API access is over HTTPS and accessed from the app.sysdigcloud.com URL or, if running the on-premises installation, through your Sysdig Cloud application server address. Data is sent and received using JSON format.

The token is required to your access to Sysdig Cloud via the api. Pass the token to the HTTPS server via the Authorization header with the format:

Authorization: Bearer [token]

Here are several examples using the alerts API that will retrieve all of the configuration parameters for alert 62 using our token:

cURL

curl --header "Authorization: Bearer 4e94n0ja-b9d7-400e-b6l1-49c047229" https://app.sysdigcloud.com/api/alerts/62

Wget

wget --header "Authorization: Bearer 4e94n0ja-b9d7-400e-b6l1-49c047229" https://app.sysdigcloud.com/api/alerts/62

JavaScript

var xhr = new XMLHttpRequest();

xhr.open("GET", "https://app.sysdigcloud.com/api/alerts/62");
xhr.setRequestHeader("Authorization", "Bearer 4e94n0ja-b9d7-400e-b6l1-49c047229");

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    // Done!
    console.log(this.responseText);
  }
});

xhr.send(data);

Security Token

Issuing any API commands against the Sysdig Cloud servers requires the use of a unique security token. The Sysdig Cloud API token can be found on-line from the application web interface. After logging in, navigate to the Settings > User Profile page and look under the Sysdig Cloud API window. The token consists of 5 hexadecimal numbers separated with hyphens, do not confuse the API token with the agent access key. The read-only token is generated by default by the server and is unique to each user listed in the customer account.

Resetting the token

You can create a new API token by clicking the Reset Token button. When reset, the previous token issued will immediately become invalid and you will need to make appropriate changes to your programs or scripts.

results matching ""

    No results matching ""