Welcome to the Unomaly REST API Reference!
This is the reference manual for interacting with the Unomaly REST API. For more information, see the Unomaly product Documentation. You may want to start with the core concepts of Unomaly.
To generate credentials to access the API, you need to configure at least one Basic authentication in Settings > Authentication. See documentation.
Use the username and password of the authentication to create an authentication header base64(username + ":" + password)
Send API requests to your running instance of Unomaly at https://{your-unomaly-instance}/api/v2/
.
Sending a request to get a list of groups using username api
and password password
.
GET https://{your-unomaly-instance}/api/v2/groups HTTP/1.1
Authorization: Basic YXBpOnBhc3N3b3Jk
Expected response with two groups:
{
items: [{
id: "3",
name: "group-a",
created: "2019-10-01T08:32:36.649Z",
updated: "2019-10-01T08:32:36.649Z",
},
{
id: "4",
name: "group-b",
created: "2019-10-05T11:13:56.262Z",
updated: "2019-10-07T09:53:23.853Z",
}],
total: 2
}
Most responses for lists of entities are paginated by default. You can usually supply a limit
query parameter to control how many results are being returned. In the result, there may be a next
and/or prev
cursor being returned. You can use these to get the next or previous set of items in the list. The cursors are only valid as long as the sorting field and order are unchanged. You can change the limit
to vary the number of elements returned. A response returning next
or prev
cursors doesn't not guarantee there are more results to be returned.
Getting the first group:
GET https://{your-unomaly-instance}/api/v2/groups?limit=1 HTTP/1.1
Authorization: Basic YXBpOnBhc3N3b3Jk
Expected response:
{
items: [{
id: "3",
name: "group-a",
created: "2019-10-01T08:32:36.649Z",
updated: "2019-10-01T08:32:36.649Z",
}],
total: 2,
next: "WzE2NSwiYm9vMiJd",
prev: "WzE2NiwiYm9vMngiXQ",
}
You can now use the next
cursor to get the next set of results.
GET https://{your-unomaly-instance}/api/v2/groups?limit=1&next=WzE2NSwiYm9vMiJd HTTP/1.1
Authorization: Basic YXBpOnBhc3N3b3Jk
Expected response:
{
items: [{
id: "4",
name: "group-b",
created: "2019-10-05T11:13:56.262Z",
updated: "2019-10-07T09:53:23.853Z",
}],
total: 2,
next: "WzE2NiwiYm9vMngiXQ",
prev: "WzE2NiwiYm9vMngiXQ",
}
Groups, see Unomaly documentation on systems and groups
List groups.
limit | number >= 1 Default: 20 limit the number of results returned |
order | string Default: "ASC" Enum: "ASC" "DESC" |
next | string Opaque cursor for next set of results |
prev | string Opaque cursor for previous set of results |
sortBy | string Default: "name" Column to sort by |
A list of groups
An unexpected error occured.
Create a new group
Group name has to be unique
name required | string |
parentId | string ID of group |
Group has been creted successfully
Bad request.
Access forbidden
Name conflict
An unexpected error occured.
Get group by ID
groupID required | string Example: 1 ID of group |
Group by ID
Access forbidden
Resource has not been found.
groupID required | string Example: 1 ID of group |
partial group object to update
name required | string^[a-zA-Z0-9\-_]+$ |
parentId | string Nullable |
Updated group
Access forbidden
Resource has not been found.
Name conflict
An unexpected error occured.
Delete a group
groupID required | string Example: 1 ID of group |
Response after deleting an entity.
Access forbidden
Resource has not been found.
An unexpected error occured.
groupID required | string Example: 1 ID of group |
limit | number >= 1 Default: 20 limit the number of results returned |
order | string Default: "ASC" Enum: "ASC" "DESC" |
next | string Opaque cursor for next set of results |
prev | string Opaque cursor for previous set of results |
sortBy | string Default: "name" Column to sort by |
A list of all systems belong to a group
An unexpected error occured.
Add system(s) to a group
groupID required | string Example: 1 ID of group |
List of system ids
Updated group
Resource has not been found.
An unexpected error occured.
Remove system(s) from a group
groupID required | string Example: 1 ID of group |
List of system ids
Updated group
Resource has not been found.
An unexpected error occured.
Systems, see Unomaly documentation on systems and groups
groupID required | string Example: 1 ID of group |
limit | number >= 1 Default: 20 limit the number of results returned |
order | string Default: "ASC" Enum: "ASC" "DESC" |
next | string Opaque cursor for next set of results |
prev | string Opaque cursor for previous set of results |
sortBy | string Default: "name" Column to sort by |
A list of all systems belong to a group
An unexpected error occured.
Add system(s) to a group
groupID required | string Example: 1 ID of group |
List of system ids
Updated group
Resource has not been found.
An unexpected error occured.
Remove system(s) from a group
groupID required | string Example: 1 ID of group |
List of system ids
Updated group
Resource has not been found.
An unexpected error occured.
limit | number >= 1 Default: 20 limit the number of results returned |
order | string Default: "ASC" Enum: "ASC" "DESC" |
next | string Opaque cursor for next set of results |
prev | string Opaque cursor for previous set of results |
sortBy | string Default: "name" Column to sort by |
A list of all systems
An unexpected error occured.
Removes a list of systems specified in the request.
List of system ids
Response after deleting an entity.
Access forbidden
Resource has not been found.
An unexpected error occured.