ActivityTimeline REST API
All API requests can be made by ActivityTimeline user with Administrator permission only.
ActivityTimeline REST API is turned off by default. You must turn it on before the first use.
ActivityTimeline REST API can be turned on by changing ActivityTimeline REST API setting at Dashboard → Configuration → Advanced Settings page or AT REST API page:
How to Use REST API
Create a unique AT REST API authorization token in ActivityTimeline configuration
Call API methods with specifying that auth-token as a request Header or URL parameter (or auth_token before AT v8.3.0).
Sample Java/C# code of AT REST API usage
Sample Java project that demonstrates how to call AT REST API can be downloaded here (all API methods):
Sample .NET (C#) project that demonstrates how to call AT REST API can be downloaded here (some API methods):
Important Note when calling AT REST API from JavaScript/Node.js code.
ActivityTimeline uses number identifiers that could be larger than JavaScript number type supports.
As a result, some JavaScript JSON parsers replace the last few digits of an 'id' with zeros making that 'id' invalid.
Example: Actual 'id' of 1235598463805867311 becomes 1235598463805867300
Authorization
You can authorize into the REST API by specifying a unique Authorization Token in one of 4 supported ways:
Authorization Token can be generated at ActivityTimeline Configuration → AT REST API page. Handle it with the same security as you would a password. |
---|
You can authorize into the REST API by specifying a unique Authorization Token in one of 4 supported ways:
Authorization Token can be generated at ActivityTimeline Configuration → AT REST API page. Handle it with the same security as you would a password. |
---|
Methods:
Timeline Schedule & Workload v4.2.0+
Returns information about user and events (Jira issues and custom events) for specified user for specified period of time.
Request
GET /rest/api/1/timeline?auth_token=YOUR_AUTH_TOKEN
QUERY PARAMETERS
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
start * | string | Start of the period formatted in "yyyy-MM-dd" format |
end * | string | End of the period formatted in "yyyy-MM-dd" format |
teamId * | long | Id of a specific team |
eventType | string | Optional If specified then the system will filter returned items to the specified type.
|
* indicates required parameters
Example
https://<ACTIVITYTIMELINE_INSTANCE>/rest/api/1/timeline?teamId=1234567890&start=2016-07-11&end=2016-07-18&auth_token=YOUR_AUTH_TOKEN
https://<ACTIVITYTIMELINE_INSTANCE>/rest/api/1/timeline?teamId=1234567890&start=2018-11-30&end=2019-01-01&eventType=HOLIDAY&auth_token=YOUR_AUTH_TOKEN
https://<ACTIVITYTIMELINE_INSTANCE>/rest/api/1/timeline?teamId=1234567890&start=2018-11-30&end=2019-01-01&eventType=BOOKING&auth_token=YOUR_AUTH_TOKEN
https://<ACTIVITYTIMELINE_INSTANCE>/rest/api/1/timeline?teamId=1234567890&start=2018-11-30&end=2019-01-01&eventType=ISSUE&auth_token=YOUR_AUTH_TOKEN
https://<ACTIVITYTIMELINE_INSTANCE>/rest/api/1/timeline?teamId=1234567890&start=2018-11-30&end=2019-01-01&eventType=WORKLOG&auth_token=YOUR_AUTH_TOKEN
Responses
|
---|
|
---|
Returns information about user and events (Jira issues and custom events) for specified user for specified period of time.
Request
GET /rest/api/1/timeline/$username?auth_token=YOUR_AUTH_TOKEN
QUERY PARAMETERS
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
start * | string | Start of the period formatted in "yyyy-MM-dd" format |
end * | string | End of the period formatted in "yyyy-MM-dd" format |
username * | string | Username or accountId of specific user |
eventType | string | Optional
|
* indicates required parameters
Example
https://<ACTIVITYTIMELINE_INSTANCE>/rest/api/1/timeline/admin?start=2016-07-11&end=2016-07-18&auth_token=YOUR_AUTH_TOKEN
https://<ACTIVITYTIMELINE_INSTANCE>/rest/api/1/timeline/admin?start=2018-11-30&end=2019-01-01&eventType=HOLIDAY&auth_token=YOUR_AUTH_TOKEN
https://<ACTIVITYTIMELINE_INSTANCE>/rest/api/1/timeline/admin?start=2018-11-30&end=2019-01-01&eventType=BOOKING&auth_token=YOUR_AUTH_TOKEN
https://<ACTIVITYTIMELINE_INSTANCE>/rest/api/1/timeline/admin?start=2018-11-30&end=2019-01-01&eventType=ISSUE&auth_token=YOUR_AUTH_TOKEN
https://<ACTIVITYTIMELINE_INSTANCE>/rest/api/1/timeline/admin?start=2018-11-30&end=2019-01-01&eventType=WORKLOG&auth_token=YOUR_AUTH_TOKEN
Responses
|
---|
|
---|
Returns information about users and workloads for specified team for specified period of time.
Request
GET /rest/api/1/workload?auth_token=YOUR_AUTH_TOKEN
QUERY PARAMETERS
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
start * | string | Start of the period formatted in "yyyy-MM-dd" format |
end * | string | End of the period formatted in "yyyy-MM-dd" format |
teamId * | long | id of specified team |
projectKey | string | Optional ActivityTimeline v8.1.2 and above |
startOffset | int | Offset for first users, default is 0 |
maxUsers | int | Maximum users count to return, max 50 |
includeProjectDetails | boolean | Optional Activity Timeline v8.2.0 and above Example:"username": "amy.kartel",
"workload": [
{
"day": "2021-07-12",
"day0fWeek" : "mon",
"hours": {
"ABC": 4,
"CDF": 2,
"AMS": 0.5
}
},
{
"day": "2021-07-13",
"day0fWeek": "tue",
"hours": 0
},
..........
{
"day": "2021-07-16",
"dayOfWeek": "fri",
"hours": {
"CDF": 7,
"AMS": 1
}
}
] |
* indicates required parameters
Example
http://<ACTIVITYTIMELINE_INSTANCE>/rest/api/1/workload?start=2016-07-11&end=2016-07-18&teamId=1107507732947945188&startOffset=0&maxUsers=50&auth_token=YOUR_AUTH_TOKEN
Responses
|
---|
|
---|
Returns information about user and workloads for specified user for specified period of time.
Request
GET /rest/api/1/workload/$username?auth_token=YOUR_AUTH_TOKEN
QUERY PARAMETERS
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
start * | string | Start of the period formatted in "yyyy-MM-dd" format |
end * | string | End of the period formatted in "yyyy-MM-dd" format |
username * | string | Username or accountId of specific user |
* indicates required parameters
Example
https://<ACTIVITYTIMELINE_INSTANCE>/rest/api/1/workload/admin?start=2020-07-01&end=2020-07-30&auth_token=YOUR_AUTH_TOKEN
Responses
|
---|
|
---|
Returns information about availability of users of a specific team for a specified period of time.
User’s availability means how many hours of work user still has capacity to do taking into account currently scheduled tasks on that user.
Request
GET /rest/api/1/availability?auth_token=YOUR_AUTH_TOKEN
QUERY PARAMETERS
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
start * | string | Start of the period formatted in "yyyy-MM-dd" format |
end * | string | End of the period formatted in "yyyy-MM-dd" format |
teamId * | long | id of specified team |
startOffset | int | Offset for first users, default is 0 |
maxUsers | int | Maximum users count to return, max 50 |
* indicates required parameters
Example
http://<ACTIVITYTIMELINE_INSTANCE>/rest/api/1/availability?start=2023-02-11&end=2023-02-18&teamId=5648895637201243664&startOffset=0&maxUsers=50&auth_token=YOUR_AUTH_TOKEN
Responses
|
---|
|
---|
Returns information about availability of a specific user for a specified period of time.
User’s availability means how many hours of work user still has capacity to do taking into account currently scheduled tasks on that user.
Request
GET rest/api/1/availability/$username?auth_token==YOUR_AUTH_TOKEN
QUERY PARAMETERS
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
start * | string | Start of the period formatted in "yyyy-MM-dd" format |
end * | string | End of the period formatted in "yyyy-MM-dd" format |
* indicates required parameters
Example
http://<ACTIVITYTIMELINE_INSTANCE>/rest/api/1/availability/63c83eb49d59ec705dddddd?start=2023-02-11&end=2023-02-18&auth_token=YOUR_AUTH_TOKEN
Responses
|
---|
|
---|
Returns information about total capacity of users of a specific team for a specified period of time.
User’s capacity means how many hours of work user can do each day ignoring currently scheduled tasks on that user.
Request
GET /rest/api/1/capacity?auth_token=YOUR_AUTH_TOKEN
QUERY PARAMETERS
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
start * | string | Start of the period formatted in "yyyy-MM-dd" format |
end * | string | End of the period formatted in "yyyy-MM-dd" format |
teamId * | long | id of specified team |
startOffset | int | Offset for first users, default is 0 |
maxUsers | int | Maximum users count to return, max 50 |
* indicates required parameters
Example
http://<ACTIVITYTIMELINE_INSTANCE>/rest/api/1/capacity?start=2023-02-11&end=2023-02-18&teamId=5648895637201243664&startOffset=0&maxUsers=50&auth_token=YOUR_AUTH_TOKEN
Responses
|
---|
|
---|
Returns information about total capacity of a specific user for a specified period of time.
User’s capacity means how many hours of work user can do each day ignoring currently scheduled tasks on that user.
Request
GET rest/api/1/capacity/$username?auth_token==YOUR_AUTH_TOKEN
QUERY PARAMETERS
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
start * | string | Start of the period formatted in "yyyy-MM-dd" format |
end * | string | End of the period formatted in "yyyy-MM-dd" format |
* indicates required parameters
Example
http://<ACTIVITYTIMELINE_INSTANCE>/rest/api/1/capacity/63c83eb49d59ec705dddddd?start=2023-02-11&end=2023-02-18&auth_token=YOUR_AUTH_TOKEN
Responses
|
---|
|
---|
Custom events v4.5.5+
Creates a new custom event.
Request
POST /rest/api/1/event?auth_token=YOUR_AUTH_TOKEN
QUERY PARAMETERS
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
start * | string | Start of the period formatted in "yyyy-MM-dd" format |
end * | string | End of the period formatted in "yyyy-MM-dd" format |
username * | string | Assignee username (Jira Server) or accountld (Jira Cloud) |
eventTypeld * | long | id of eventType |
eventTitle * | string | Title of event |
projectKey (optional) | string | Key of target project (Booking, Placeholder and Note types) |
hours (optional) | number | Booking event estimate in hours / hours for partial Day Off event |
estimate (optional) | number | Estimate in hours for Placeholder event type |
color (optional) | string | Set custom Color for the newly created event. Available starting from AT v9.5.5 |
isApproved (optional) | string | If set to "true" then custom event will be created pre-approved. |
teamId (optional) | number | Id of a team. A new event will be created on a Team Panel of that team. |
* indicates required parameters
Example
http://<ACTIVITYTIMELINE_INSTANCE>/rest/api/1/event?username=admin&eventTypeId=240025532758377186&eventTitle=someTitle&projectKey=TPA&hours=7&start=2016-11-14&end=2016-11-14&auth_token=YOUR_AUTH_TOKEN
Responses
|
---|
|
---|
Get a single custom event data by id.
Request
GET /rest/api/1/event/$id?auth_token=YOUR_AUTH_TOKEN
QUERY PARAMETERS
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
id * | number | ID of custom event |
* indicates required parameters
Example
http://<ACTIVITYTIMELINE_INSTANCE>/rest/api/1/event/29686068180042429?auth_token=YOUR_AUTH_TOKEN
Responses
|
---|
|
---|
Updates a custom event.
Request
PUT /rest/api/1/event?auth_token=YOUR_AUTH_TOKEN
QUERY PARAMETERS
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
id * | long number | Id of a custom event to update |
start * | string | New Start date of the scheduled period formatted in "yyyy-MM-dd" format |
end * | string | New End date of the scheduled period formatted in "yyyy-MM-dd" format |
username (optional) | string | New Assignee username (Jira Server) or accountld (Jira Cloud) |
teamId (optional) | number | Id of Team to re-assign an item to / put an item on a Team Panel. |
title (optional) | string | New title for the item |
projectKey (optional) | string | Key of target project (Booking, Placeholder, Overtime and Note types) |
hours (optional) | number | Set estimate in hours per day for Issue / Issue part / Booking / Partial Day Off events |
estimate (optional) | number | Set total remaining estimate in hours for Issue / Issue part / Placeholder events |
originalEstimate (optional) | number | Set total original estimate in hours for Issue events |
color (optional) | string | New color for the event. |
isApproved (optional) | string | Defines whether event is approved or not (true - approved, false - not approved). |
* indicates required parameters
Example
https://<ACTIVITYTIMELINE_INSTANCE>/rest/api/1/event?id=24002553275837718634&title=New%20Title&start=2023-11-14&end=2023-11-14&auth_token=YOUR_AUTH_TOKEN
Responses
|
---|
|
---|
Deletes a custom event.
Request
DELETE /rest/api/1/event/$id?auth_token=YOUR_AUTH_TOKEN
QUERY PARAMETERS
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
id * | long | id of custom event |
* indicates required parameters
Example
http://<ACTIVITYTIMELINE_INSTANCE>/rest/api/1/event/312463?auth_token=YOUR_AUTH_TOKEN
Responses
|
---|
|
---|
Updates color of an issue/event on the timeline.
Request
POST /rest/api/1/event/$id/color?auth_token=YOUR_AUTH_TOKEN
QUERY PARAMETERS
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
id * | long | id of custom event |
color * | string | color of the event to be set. |
* indicates required parameters
Example
http://<ACTIVITYTIMELINE_INSTANCE>/rest/api/1/event/312463534535435/color?auth_token=YOUR_AUTH_TOKEN
Responses
|
---|
|
---|
Returns a list of custom event types.
Request
GET /rest/api/1/eventType/list?auth_token=YOUR_AUTH_TOKEN
Example
http://<ACTIVITYTIMELINE_INSTANCE>/rest/api/1/eventType/list?auth_token=YOUR_AUTH_TOKEN
Responses
|
---|
|
---|
Teams v8.3.0+
Returns list of Activity Timeline teams.
Request
GET /rest/api/1/team/list?auth_token=YOUR_AUTH_TOKEN
Responses
status 200 application/json Returns json representation of the result if request performed successfully. Example[{
"id": "1107507732947945188",
"name": "External Team"
}, {
"id": "387281612195971911",
"name": "Developers Team"
}, {
"id": "7756417552636331634",
"name": "QA Team"
}] status 401 Returns if user was not logged in status 403 Returns if user didn't have permissions status 500 Returns if errors occurred during request |
---|
status 200 application/json Returns json representation of the result if request performed successfully. Example[{
"id": "1107507732947945188",
"name": "External Team"
}, {
"id": "387281612195971911",
"name": "Developers Team"
}, {
"id": "7756417552636331634",
"name": "QA Team"
}] status 401 Returns if user was not logged in status 403 Returns if user didn't have permissions status 500 Returns if errors occurred during request |
---|
Returns information about team and users in a specified team.
Request
GET /rest/api/1/team/$teamId?auth_token=YOUR_AUTH_TOKEN
QUERY PARAMETERS
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
teamId * | long | id of specific team |
* indicates required parameters
Example
http://<ACTIVITYTIMELINE_INSTANCE>/rest/api/1/team/1107507732947945188?auth_token=YOUR_AUTH_TOKEN
Responses
|
---|