Publish API
What you will learn here
On this page you will find our publishing API. The API allows administrators to programmatically interact with our app. This documentation covers the necessary steps for authentication, making requests and receiving responses.
Endpoints
Below is a list of available endpoints, their methods, and brief descriptions.
1. Filter users
Return a list of users
URL:
/user/filter
Method:
GET
Headers:
JSON{ "Content-Type": "application/json", "Authorization": "Bearer YOUR_ACCESS_TOKEN" }
Query Parameters:
Parameter | Type | Required | Description | Default Value |
---|---|---|---|---|
| string | No | Name of user(s) you want to search. | ““ |
| string | No | Email address | ““ |
| string | No | Specify that the search should be limited to users within a particular group. | ““ |
| boolean | No | Indicate whether inactive users should be included in the search results. | true |
| boolean | No | Indicate whether active users should be included in the search results. | true |
| int | No | Maximum size of the search results | 10000 |
| boolean | No | Indicate whether cleaned users should be excluded from the search results. | |
| long | No |
|
Request Body
Response
Success (200):
JSON[ { "key": "JIRAUSERxxxxx", "username": "xxxyyyzzz", "displayName": "XXXX ZZZZZZ", "emailAddress": "test@gmail.com", "avatar": "https://www.xxx.com/avatar/xxxxxxxxx-yyy-zz", "active": false }, { "key": "JIRAUSERyyyyy", "username": "yyyyyzzzuu", "displayName": "YYYY UUUUUUUU", "emailAddress": "test-2@gmail.com", "avatar": "https://www.xxx.com/avatar/yyyyyyyy-xx-uu", "active": true } ]
2. Bulk users clean up
Trigger user cleanup using a designated rule, executed at a specific phase, with a specified substitute.
URL:
/cleanup/bulk
Method:
POST
Headers:
JSON{ "Content-Type": "application/json", "Authorization": "Bearer YOUR_ACCESS_TOKEN" }
Query Parameters:
Request Body:
Key | Type | Required | Description | Value Range |
---|---|---|---|---|
| string[] | Yes | The usernames of users you want to clean | Any valid string array |
| int | Yes | Id of an active rule, which is used to clean up | Any valid rule id |
| enum:
| Yes | Specific time to execute cleaning up | Any valid enum |
| string | Yes | The username of substitute | Any valid existing username |
{
"usernames": ["aaa", "bbb", "ccc""], // The usernames of the users you want to clean up.
"ruleId": 1, // A active rule, which is used to clean up
"phase": "PHASE_ONE", // Specific phase
"substitute": "yyyyyzzzuu" // Username of substitute
}
Response
{
"taskId": xxxxx,
"finished": false,
"progress": 0,
"progressMax": 1,
"successCounter": 0,
"failedCounter": 0,
"context": "PHASE_ONE"
}