RESTful Web Services API
Overview
Universal Controller supports a RESTful-based web services API that allows you to perform multiple operations, which are listed alphabetically on the following pages.
Formatting specifications for each web service, including details about field requirements, are provided.
Methods of API Operations
Every API operation is performed using one of the following methods.
Method | Description |
|---|---|
GET | Retrieves records from the Controller database. |
POST | Creates, or performs an action on, a record in the Controller database. |
PUT | Modifies a record in the Controller database. Note PUT, by itself, actually replaces an existing record with whatever information you include in the PUT operation. If you include only partial record information in a PUT, the record in the database will then contain only that information. In order to modify information in a record and retain all of its unmodified information, you must first GET the record from the database, modify (add/delete/change) information in the record, and then PUT the record back in the database. |
DELETE | Deletes a record in the Controller database. |
Authentication
Universal Controller requires Web Service requests to be authenticated using one of Basic Authentication or Personal Access Token Authentication.
For Basic Authentication, use the following Authorization header, where the username:password is base64 encoded.
Authorization: Basic username:password
For Personal Access Token Authentication, use the following Authorization header.
Authorization: Bearer access-token
While it is recommended you use the Authorization header, if required, you can alternatively pass the Personal Access Token using the access_token query parameter.
http://hostname:port/uc/resources/task?access_token=access-token&taskname=MyTask
If you cannot use any of the above, you can configure an alternative authorization header. To configure an alternative authorization header, refer to the Web Service Personal Access Token Auth Headers system property.
X-Gitlab-Token: access-token
See User Impersonation for information on how to impersonate a user when invoking Universal Controller Web Service APIs.
Request Limits
You can implement application- and user-level concurrent request limits to control how many web service API requests can be in progress at the same time via the following Universal Controller system properties:
Controls the number of concurrent requests for the application (that is, the Universal Controller server). This application-level concurrent request limit cannot be less than 1 or less than the user-level concurrent request limit (if specified). | |
Controls the number of concurrent requests per unique user ID. This user-level concurrent request limit cannot be less than 1 or more than the application-level concurrent request limit (if specified). If the application-level concurrent request limit is exceeded, an HTTP Status of 429 /Too Many Requests will be returned. |