Control Room APIs and webhooks
Control Room aims to enable API-based use cases. We can't wait to see what our users come up with using the power of our APIs! So, expect more and more APIs to be made available in the near future.
Workspace-scoped APIs
The preferred way to control your processes and robots via API calls is now via the Workspace-scoped API. Authorized users can create API keys that are restricted to one workspace, and can have a number of permissions associated with them.
API key creation and access control
To create a new Workspace-scoped API key:
- Navigate to the workspace you want to create the API key for and click on the
API
tab in the toolbar: - Click on the
Add
button. Provide a name for your key and select the operations that you want to associate with the key. In our example, we are allowing our key to be used to access information about robots, robot runs and run outputs, but not being able to trigger processes or write robots: - Your new key will appear in the listing. You can see which access permissions have been assigned to it and information about its usage. Click on the
View
button to see the value of the key. You can edit the key or delete it by clicking on the...
button.
Remember to store the API key in a secure way!
Usage example
Here is an example that uses curl
to get the information about the runs for a process in a workspace.
- The request method must be
POST
. - The API key must be passed in a header using the format
"Authorization: RC-WSKEY YOUR_APIKEY_HERE"
. - The
Content-Type
header must be set toapplication/json
. - You can pass additional data to the process by passing a JSON object as the body of the request.
For this call to be successful, the API key that we are using would need to:
- be associated with the correct workspace (
YOUR_WORKSPACE_ID
) - have the
read_runs
permission.
API documentation and testing
You can get all the details about the supported endpoints and parameters on each API's detail page:
Video Example
See an example of the Process API at work in this video:
User Access Credentials
User access credentials are associated with a specific user, and are used when setting up Robocorp Code for VS Code, Robocorp Workforce Agent, Robocorp Assistant, and RCC. You can see and maintain your access credentials by accessing your user profile in Control Room, and clicking on the Access Credentials
menu item.