Public API
A Public API, or Application Programming Interface, serves as a bridge between different software applications, allowing them to communicate and share data seamlessly. We use GraphQL, a powerful query language for APIs, to interact with our Public API as it enhances our ability to request and manage data, providing a clear and efficient means of interaction with our APIs.
Queries in GraphQL define the available operations that you can perform on your GraphQL API. They specify the structure of the data you can request and retrieve from the API. With queries, you can define the specific information you want to retrieve from the API, allowing you to ask for exactly what you need and receive a tailored response.
-
Read Query: A read query in GraphQL is used to retrieve data from a GraphQL API. It allows you to fetch and read data without making any changes. You specify the fields and relationships of the data you want to retrieve and receive a response with the requested data.
Examples
-
getQueue (queue: GetQueueInput!): Queue
-
getQueues (queues: GetQueuesInput!): [Queue]
-
getTaskById (taskId: ID!, tenantId: ID): TaskState
-
getTrigger (trigger: GetTriggerInput!): Trigger
-
getWizards (wizards: GetWizardsInput!): [Wizard]
-
-
Mutation/Edit Query: In GraphQL, a mutation or edit query is used to modify or update data on a GraphQL API. It allows you to perform actions such as creating, updating, or deleting data by specifying the changes you want to make. With a mutation query, you can specify the fields and values to be modified and receive a response indicating the success or failure of the changes.
Mutations in GraphQL are comparable to HTTP POST, PATCH, PUT, or DELETE requests in traditional APIs. They provide a synchronized approach to making data modifications, ensuring that the changes are made in a consistent and predictable manner. After executing a mutation query, you will receive a response that reflects the outcome of the requested changes.
Examples
-
addQueue (queue: AddQueueInput): Queue
-
updateQueue (queue: UpdateQueueInput): Queue
-
addTask (task: AddTaskInput!): Task
-
reassignTaskToQueue (task: ReassignTaskToQueueInput!): Task
-
In GraphQL, an endpoint is the URL where you send your GraphQL requests to interact with the API. It's like the gateway to the GraphQL service, allowing you to perform queries, mutations, and subscriptions.
We have a list of available API calls with different endpoints. Some calls use "Nintex" as the endpoint, while others use "Kryon". It is important to ensure that you use the correct endpoint for each API call to avoid errors. Some calls may be interchangeable between the two endpoints, but it is crucial to match the call with the appropriate endpoint for seamless execution.
-
Nintex Public API: <PROTOCOL>://<FQDN>/nintex-public-api/
-
Kryon Public API: <PROTOCOL>://<FQDN>/public-api/
Refer to the list below of our current APIs and their corresponding endpoints:
Categories | Endpoint: Kryon-public-api | Endpoint: Nintex-public-api |
---|---|---|
Queues | getQueue | getQueue |
GetQueues | GetQueues | |
addQueue | addQueue | |
updateQueue | updateQueue | |
deleteQueue | ||
Tasks | addTask | addTask |
reassignTaskToQueue | ||
getTaskById | ||
Triggers | getTriggerStatus | |
getTrigger | ||
triggers | ||
toggleActiveTriggers | ||
reassignTriggersToQueue | ||
setTriggersPriority | ||
addTrigger | ||
Wizard | getWizards | |
Calendars | getCalendars | |
createCalendar | ||
updateCalendar | ||
deleteCalendars | ||
createEvent | ||
updateEvent | ||
deleteEvents | ||
Robots | getApprovedRobots | |
startRobot | ||
stopRobot | ||
assignRobotToQueue | ||
getPendingRobots | ||
approveRobot | ||
Studio | getWizardsCatalog | |
getWizardVariables | ||
System | getRpaServerVersion |
Example: AddQueue
How to create an AddQueue request:
-
Send a POST request.
-
In the Token field, under Authorization, paste the Access Token that you copied from the previous request.
-
Fill in the relevant Request Header fields.
KEY
VALUE
Kryon-client-id
Kryon-public-api
Kryon-auth-provider
Aerobase
-
In the Body, fill in the GraphQL Query and if there is, the GraphQL Variable.
Request
Response
Authorization: Bearer $ACCESS_TOKEN$
Content-Type: Application/JSON
CopyAddQueue: Mutation
mutation {
addQueue(queue: {tenantId: "1", name: "queue"}) {
id
name
tenantId
createdAt
isDeleted
deletedAt
createdBy
}
}CopyAddQueue Mutation: Response
{
"data": {
"addQueue": {
"id": "1f5cf0ce-50d3-4012-b8d8-df02d75ae2f9",
"name": "EliTest3",
"tenantId": "1",
"createdAt": "2021-12-22T08:37:23.916Z",
"isDeleted": false,
"deletedAt": null,
"createdBy": "testuser"
}
}
}
To obtain an access token, follow these steps:
Endpoint - $SERVER_FQDN$/auth/realms/$REALM$/protocol/openid-connect/token
-
Send a POST token request.
POST
<PROTOCOL>://<FQDN>/auth/realms/Kryon/protocol/openid-connect/token
-
Enter the Body text: x-www-from-urlencoded.
-
Fill out the relevant fields:
KEY
VALUE
client_id
Nintex-public-api
grant_type
password
username
$USERNAME$
password
$PASSWORD$
-
Run the POST request.
-
Copy the Access Token from the API response.
Example