Skip to main content
Get a list of Actions from an application
curl --request GET \
  --url https://sapi.withsutro.com/applications/{applicationId}/actions \
  --header 'Authorization: Bearer <token>' \
  --header 'x-sutro-api-client: <api-key>'
import requests

url = "https://sapi.withsutro.com/applications/{applicationId}/actions"

headers = {
    "Authorization": "Bearer <token>",
    "x-sutro-api-client": "<api-key>"
}

response = requests.get(url, headers=headers)

print(response.text)
const options = {
  method: 'GET',
  headers: {Authorization: 'Bearer <token>', 'x-sutro-api-client': '<api-key>'}
};

fetch('https://sapi.withsutro.com/applications/{applicationId}/actions', options)
  .then(res => res.json())
  .then(res => console.log(res))
  .catch(err => console.error(err));
<?php

$curl = curl_init();

curl_setopt_array($curl, [
  CURLOPT_URL => "https://sapi.withsutro.com/applications/{applicationId}/actions",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
  CURLOPT_HTTPHEADER => [
    "Authorization: Bearer <token>",
    "x-sutro-api-client: <api-key>"
  ],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://sapi.withsutro.com/applications/{applicationId}/actions"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("Authorization", "Bearer <token>")
	req.Header.Add("x-sutro-api-client", "<api-key>")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.get("https://sapi.withsutro.com/applications/{applicationId}/actions")
  .header("Authorization", "Bearer <token>")
  .header("x-sutro-api-client", "<api-key>")
  .asString();
require 'uri'
require 'net/http'

url = URI("https://sapi.withsutro.com/applications/{applicationId}/actions")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
request["x-sutro-api-client"] = '<api-key>'

response = http.request(request)
puts response.read_body
[
  {
    "id": "<string>",
    "effects": [
      {
        "actionEffectId": "<string>",
        "effect": "<string>",
        "params": {},
        "bindParams": {},
        "next": "<string>",
        "onError": {
          "nextId": "<string>",
          "continueOriginalFlow": true
        }
      }
    ],
    "startEffectId": "<string>",
    "bindReturnValue": "<string>",
    "onError": {
      "nextId": "<string>",
      "continueOriginalFlow": true
    }
  }
]

Authorizations

Authorization
string
header
required

Builder authentication and authorization

x-sutro-api-client
string
header
required

A unique identifier for the API Client making a request

Path Parameters

applicationId
string<uuid>
required

Response

200 - application/json

List of actions for the application

id
string
required

A unique identifier for the action. Must start with "urn:sutro:action:".

Pattern: ^urn:sutro:action:
effects
object[]
required
startEffectId
string
required

The ID of the first effect to execute

bindReturnValue
string
onError
object