API#

Configure permissions on the Roles screen, in the "Role" dialog on the "Access" tab. Select the corresponding checkbox in the required object row to allow an action.

When updating integrations to version 5.9.4, review the API v1 changes: some older routes were removed, request schemas became stricter, and tasks are now read through a queue. Check the method, path, and fields of each request against the Swagger documentation for the installed Sherpa Orchestrator version.

The API section contains three pages:

  1. Swagger — interactive documentation for requests, parameters, and responses. It is also available at /api/docs/swagger on your installation server.
  2. ReDoc — another view of the same API, useful for reading schemas and required fields.
  3. Key — a table of API tokens. Each token has a name, assigned roles, and an expiration date. Multiple tokens can be used at the same time.

Updating a job through the legacy API#

The PUT /api/job/update method updates a job in the account used to authenticate the request. A user or API token requires permission to update jobs. Knowing the GUID of a job in another account does not grant access to it.

Before sending the request, verify that the job belongs to the current account and supply its GUID in the Guid field. Check status values and other field formats against the Swagger documentation of the installed version. A successful update returns HTTP 200 and an empty JSON array [].

An inaccessible, deleted, or nonexistent job returns 403 and remains unchanged. This method cannot transfer a job to another account or assign a robot, process version, task, or trigger from another account. For 403, check authentication, permissions, and ownership of related records. To work in another account, use credentials issued in that account.

Creating an API token#

A token lets an integration call the API with the permissions of its selected Roles. Configure permissions first, then create the token on Key in the API section.

Configuring permissions on the Roles screen for tokens#

To allow token operations, open the required Role on the Roles screen and select the "Access" tab. Creating a token requires Create in the API row. Viewing the list requires Read, changing settings requires Update, and deleting requires Delete in that row. The token receives the permissions of its selected Roles.

API token permissions. Russian interface.

API token permissions. Russian interface.

Creating a token on the Key page in API#

To prepare an integration token, open Key in API and click "New".

API section, Key page: Create button. Russian interface.

API section, Key page: Create button. Russian interface.

Required fields:

  • "Name" — describes the token purpose;
  • "Roles" — determines permitted actions. Select at least one existing Role.

Expiration:

  • "Unlimited" — removes the expiration limit;
  • "Expiration date" — sets the expiration date and time when Unlimited is cleared.

Example: enter Работа с Действиями in "Name" for a test Actions integration and select Role my actions (read, write). Clear "Unlimited" and enter 21.10.2026 09:00 in "Expiration date". Click "Create" to issue the token with those permissions and expiration.

Create token dialog. Russian interface.

Create token dialog. Russian interface.

After creation, copy the token value or the ready-made Authorization header from the dialog. The value is shown only once: store it in a secure secrets manager before closing the dialog. Use the header displayed by the Orchestrator when calling the API, and check each route's requirements in Swagger. Do not put the token in URLs, logs, or unprotected files.

The table lets you inspect expiration dates and roles, edit token settings, or delete an unneeded token if you have the required permissions. The secret value of an existing token cannot be retrieved from the table. Robot GUID authentication on the routes that support it is a separate mechanism. A GUID is not an API token.

Basic authentication for the API /api/*#

Some protected /api/* routes support login and password authentication. They accept Account credentials or User credentials with local or LDAP authentication. LDAP requires a configured, reachable directory service. The identity must be active. Password authentication does not replace OAuth for an identity of that type.

User permissions come from assigned Roles. Signing in as an Account uses Account permissions. Authentication does not create a new GUI session. Check the route and required permissions in the installed version's Swagger. Do not assume this method applies to /api/v1/*.

Example of reading the Robot list over HTTPS:

curl --user 'integration_user' 'https://orchestrator.example.com/api/robot/read'

Replace the address and login with your values. curl prompts for the password interactively. Do not add the password to the command line or disable TLS verification.

Successful API key or Robot GUID authentication takes precedence over Basic. Avoid mixing authentication methods in one request.

If access is denied, check the login, password, identity type and active status, and route permissions. An unavailable LDAP service returns 503 with Directory service unavailable. Check the directory and connection instead of changing the password.

Value validation when writing Tasks through the API /api/*#

Creating and updating Tasks requires permission for the corresponding Task operation. Request formats must be checked against Swagger for the installed build.

The following constraints apply to POST /api/task/create, POST /api/task/createFromList, and PUT /api/task/update:

  • parent_task — UUID of the parent Task. An empty value is stored as NULL.
  • priority — integer from 0 to 3.
  • status — integer from 0 to 6.
  • retries — nonnegative integer.

Methods under /api/* also use names such as ParentTask. An invalid value in an individual create or update request returns 400 with an errors field. In createFromList, an error is returned for the affected list item, so each item's result must be checked.

The incorrect value must be corrected in the Robot or integration before retrying. For example, ParentTask: "string" must be replaced with an existing parent Task UUID or an empty value.

During a database update, invalid parent_task values, including empty strings, are replaced with NULL. The migration does not restore previous values on rollback. Invalid priority, status, and retries values are not corrected automatically. An administrator determines the correct values.

Reading the Robot list#

An integration uses this list to select a Robot. Allow reading on the Roles screen first, then send the API request.

Configuring permissions on the Roles screen for the Robot list#

To allow reading the list, open the required Role on the Roles screen, select "Access", and select the "Read" checkbox in the "Robots" row.

Role dialog, Access tab: Read in the Robots row. Russian interface.

Role dialog, Access tab: Read in the Robots row. Russian interface.

Requesting the Robot list through the API#

Use the authorization header specified in Swagger for the installed version.

The GET /api/v1/robots and GET /api/robot/read requests return a Robot list without the machine_password field. Its absence from the list does not mean that the Robot password has been deleted. If an integration needs connection settings for a specific Robot, use its guid to read that Robot: GET /api/v1/robots/{guid} or GET /api/robot/read/{guid}. Existing permission checks for these requests remain in effect.

Before upgrading, verify that the integration does not retrieve passwords from the list. Robot editing and the built-in VNC viewer read individual Robot records. Saved passwords do not need to be entered again after the upgrade. Do not log responses containing credentials.

Reassigning an Autopilot License#

Reassignment preserves the existing User and uses the previous CInfo to activate the replacement key. It requires permission to update Licenses and access to the User in the same Account. The source Autopilot License must be active. The replacement key must have the same type, be imported into that Account, be available, and not yet activated.

The operation is available through API v1. Check the method, fields, and authentication schemes in the installed version's Swagger.

  1. Identify the Account, User, and current License GUIDs.
  2. Send POST /api/v1/accounts/{account_guid}/users/{user_guid}/autopilot_licenses/{license_guid}/reassignments with replacement_license_key and mode set to automatic or manual. The key contains 38 letters and digits and must differ from the current key.
  3. In automatic mode, the server attempts to activate the replacement. In manual mode, use the regular XLSX activation request and response exchange. Creating the operation does not prove successful activation: check status and, on failure, error_code and error_message.
  4. After successful activation, manually reset the previous key on the licensing server, delete it from Orchestrator, and import it again before reuse.

Until the previous key has been released and cleaned up, the linked replacement License cannot be deleted, reset, or reassigned again. A warning to release the old key does not mean the replacement activation failed.

Cancellation is available when can_cancel=true: before dispatching the activation request or after a definitive activation failure. Use DELETE on the same path followed by /{reassignment_guid}. Cancellation is unavailable while awaiting a response (awaiting_response) and after completion. On 409, check the operation state. On 422, check the key and request body.

License filtering through the API#

For API access, use filters[license_key][equal] for an exact match and filters[license_key][not_contains] to exclude keys containing a value. After trimming leading and trailing spaces, the filter value must not exceed 128 characters. Unknown fields and unsupported operators return HTTP 422.

Reading accounts through the legacy API#

Reading provides information about the current account and its direct child accounts. A user or API token needs account read permission in its assigned roles.

To check an integration, send the following requests with its Authorization header:

  1. GET /api/account/read — retrieve the list of accessible accounts.
  2. GET /api/account/read/{guid} — retrieve one account. Replace {guid} with a GUID from the list.

For example, account A has child A1, and A1 has child A2. When calling as A, the list contains A and A1. It excludes A2 and an unrelated account B. A request for the GUID of an inaccessible, deleted, or nonexistent account returns HTTP 200 with the JSON value false. Insufficient permissions return 403.

The password field is absent from all responses. The api_key field is returned only for the current account. Dates retain the legacy API format and the calling account's time zone.

Before upgrading, check that the integration does not obtain child accounts' keys from these responses. To act on behalf of another account, first create a separate API token in that account with the required roles and supply it to the integration through a secure secret store. A missing key in a response does not mean the key was deleted. For a false response, check the GUID and account relationship. For 403, check permissions and the authorization header.

Creating a log entry with a screenshot#

POST /api/v1/logs accepts JSON with a base64 screenshot field or multipart/form-data with a file in the file field. Before use, check that both formats are available in the installed version's Swagger. The token requires permission to create logs and access to a Robot in its own Account.

The required robot_guid field contains the Robot GUID. Optional job_guid and process_version_guid fields provide Job and Process version context. When a Job is supplied, its version is inferred. An explicitly supplied version must match the Job's version.

Additional fields:

  • level — Critical, Error, Warning, Notice, Info, or Debug;
  • message — the log message;
  • fields — a JSON object. In multipart, pass a JSON string, such as {"source":"designer","attempt":1}. Root arrays and objects with sequential numeric keys, such as {"0":"value"}, are not supported;
  • file — an optional PNG of at most 12 MiB (12,582,912 bytes) for multipart. The name screenshot is not used in multipart. JSON retains the screenshot field with a base64 PNG.

Example: an integration saves a screenshot of a completed step. Prepare screenshot.png, an accessible Robot GUID in ROBOT_GUID, and the authorization header in AUTHORIZATION. Replace the address with your installation's address.

curl --fail-with-body 'https://orchestrator.example.com/api/v1/logs' \
  --header "Authorization: ${AUTHORIZATION}" \
  --form-string "robot_guid=${ROBOT_GUID}" \
  --form-string 'level=Info' \
  --form-string 'message=Step completed' \
  --form-string 'fields={"source":"designer","attempt":1}' \
  --form 'file=@screenshot.png;type=image/png'

The 201 response contains the entry's data.guid and has_file: true. The screenshot is not included in the log list or detail response. To retrieve base64, use GET /api/v1/logs/{log_guid}/file with permission to read logs.

For 422, correct the field format, file size, or file contents. Spoofing the MIME type does not allow other image formats. For 403, check permissions. For 404, check the GUID and access to related objects. Create test entries in a separate test Account. Do not use bulk log purging to delete a single test entry.