Attributes API

Attributes API


Get information about the configured Worklog Attributes and their current status.

All requests need to be made to this base URL:

https://jttp-cloud.everit.biz/timetracker/api/latest/public

Get Worklog Attributes GET /attribute

Header parameters

Header Parameter

Optional

Description

Header Parameter

Optional

Description

x-everit-api-key

Generated Everit authentication token, see: https://everit.atlassian.net/wiki/spaces/TCDS/pages/3531442081

Query Parameters

The available query parameters for the request:

Query Parameter

Value type

Optional

Description

Query Parameter

Value type

Optional

Description

archived

boolean

Filter the attributes based on the archived status. If this parameter is not provided all attributes will be returned.

Example: /public/attribute?archived=false

Response Schema

WorklogAttributes

Field

Type

Description

Field

Type

Description

worklogAttributes

array of WorklogAttribute

The list of individual worklog attributes.

WorklogAttribute Object

Field

Type

Optional

Description

Field

Type

Optional

Description

id

number (Long)

Unique identifier of the attribute.

name

string

The display name of the attribute.

description

string

The description of the attribute.

type

string

Attribute type. Possible values: select, number, boolean, string.

required

boolean

Indicates whether the attribute is required.

archived

boolean

Indicates whether the attribute is archived.

rankOrder

number (Double)

The order rank of the attribute in the UI.

defaultValue

string / number / boolean

Default value of the attribute. For select type attributes, contains the option name.

options

array of WorklogAttributeOption

The list of available options for select type attributes, otherwise an empty array.

Examples 

GET URL: TIME_TRACKER_BASE_URL/timetracker/api/latest/public/attribute

Example response:

200 Successful operation:

{ "worklogAttributes": [ { "archived": false, "defaultValue": 0, "description": "The amount of time that should be billable", "id": 51, "name": "Billable Hours", "options": [], "rankOrder": 0.0, "required": false, "type": "NUMBER" }, { "archived": false, "defaultValue": "Testing", "description": "The type of task performed in the worklog", "id": 52, "name": "Task type", "options": [ { "name": "Development", "optionId": 54 }, { "name": "Testing", "optionId": 55 }, { "name": "Support", "optionId": 57 }, { "name": "Research", "optionId": 58 } ], "rankOrder": 2.0, "required": false, "type": "SELECT" }, { "archived": false, "defaultValue": null, "description": "", "id": 53, "name": "Comment", "options": [], "rankOrder": 3.0, "required": false, "type": "STRING" }, { "archived": false, "defaultValue": false, "description": "Indicates whether the logged work was performed as overtime", "id": 54, "name": "Overtime", "options": [], "rankOrder": 4.0, "required": false, "type": "BOOLEAN" } ] }

401 Unauthorized

479 The user does not have one of the necessary Timetracker permissions that can be set in the Global Settings.

 

Create Worklog Attribute POST /attribute

Header parameters

Header Parameter

Optional

Description

Header Parameter

Optional

Description

x-everit-api-key

Generated Everit authentication token, see: https://everit.atlassian.net/wiki/spaces/TCDS/pages/3531442081

x-requested-by

CSRF protection parameter.

Request Body - CreateWorklogAttributeRequest

Parameter

Value Type

Optional

Description

Parameter

Value Type

Optional

Description

defaultValue

string / number / boolean

Default value of the attribute. For SELECT type, this must contain the option name.

description

string

Attribute description.

name

string

Name of the attribute.

options

array of string

List of option names (for SELECT type), otherwise an empty array.

rankOrder

number

UI display order. Lower values appear first.

required

boolean

Indicates whether this attribute must be filled when logging work.

type

string

Attribute type: SELECT, NUMBER, BOOLEAN, STRING.

Examples by attribute type 

POST URL: TIME_TRACKER_BASE_URL/timetracker/api/latest/public/attribute

NUMBER Attribute

Example post body:

{ "defaultValue": 0, "description": "The amount of time that should be billable", "name": "Billable Hours", "options": [], "required": true, "type": "NUMBER" }

Example response:

200 Successful operation:

{ "archived": false, "defaultValue": 0, "description": "The amount of time that should be billable", "id": 51, "name": "Billable Hours", "options": [], "rankOrder": 0.0, "required": true, "type": "NUMBER" }

STRING Attribute

Example post body:

{ "description":"", "name":"Comment", "options":[], "rankOrder":3, "required":false, "type":"STRING" }

Example response:

200 Successful operation:

{ "archived": false, "defaultValue": null, "description": "", "id": 53, "name": "Comment", "options": [], "rankOrder": 3.0, "required": false, "type": "STRING" }

BOOLEAN Attribute

Example post body:

{ "defaultValue": false, "description": "Indicates whether the logged work was performed as overtime", "name": "Overtime", "options": [], "rankOrder": 4, "required": false, "type": "BOOLEAN" }

Example response:

200 Successful operation:

{ "archived": false, "defaultValue": false, "description": "Indicates whether the logged work was performed as overtime", "id": 54, "name": "Overtime", "options": [], "rankOrder": 4.0, "required": false, "type": "BOOLEAN" }

SELECT Attribute

Example post body:

{ "defaultValue":"Development", "description":"The type of task performed in the worklog", "name":"Task type", "options":[ "Development", "Documentation", "Meeting", "Support" ], "rankOrder":2, "required":false, "type":"SELECT" }

Example response:

200 Successful operation:

{ "archived": false, "defaultValue": "Development", "description": "The type of task performed in the worklog", "id": 52, "name": "Task type", "options": [ { "name": "Development", "optionId": 54 }, { "name": "Documentation", "optionId": 55 }, { "name": "Meeting", "optionId": 56 }, { "name": "Support", "optionId": 57 } ], "rankOrder": 2.0, "required": false, "type": "SELECT" }

401 Unauthorized

400 Invalid parameters: An object that holds all field and non-field related errors

479 The user does not have one of the necessary Timetracker permissions that can be set in the Global Settings.

Update Worklog Attribute PUT /attribute/{worklogAttributeId}

Header parameters

Header Parameter

Optional

Description

Header Parameter

Optional

Description

x-everit-api-key

Generated Everit authentication token, see: https://everit.atlassian.net/wiki/spaces/TCDS/pages/3531442081

x-requested-by

CSRF protection parameter.

Path variables

The available path variables for the request:

Path variable

Value type

Optional

Description

Path variable

Value type

Optional

Description

worklogAttributeId

number

Unique ID of the worklog attribute to update.

Example: /public/attribute/52

Request body – UpdateWorklogAttributeRequest

Object used to update an existing worklog attribute.

Parameter

Value Type

Optional

Description

Parameter

Value Type

Optional

Description

archived

boolean

Indicates whether the attribute is archived.

defaultValue

string / number / boolean

The default value of the attribute. For SELECT type attributes, this must contain the option name.

description

string

Description of the attribute.

name

string

Display name of the attribute.

options

array of WorklogAttributeOption

List of options (only relevant for SELECT type attributes), otherwise an empty array. All options must be listed. Existing ones not listed will be deleted.

rankOrder

number

Defines the order of appearance in the UI. Lower values appear first.

required

boolean

Indicates whether this attribute must be filled when logging work.

Referenced schema - WorklogAttributeOption

Parameter

Value Type

Optional

Description

Parameter

Value Type

Optional

Description

name

string

The option name.

optionId

number

The option ID. For new options, the value must be null.

Examples by attribute type

NUMBER Attribute

PUT URL: TIME_TRACKER_BASE_URL/timetracker/api/latest/public/attribute/51

Example request body:

{ "archived": false, "defaultValue": 0, "description": "The amount of time that should be charged to the client", "name": "Billable Hours", "options": [], "rankOrder": 1, "required": true }

Example response:

200 Successful operation:

{ "archived": false, "defaultValue": 0, "description": "The amount of time that should be charged to the client", "id": 51, "name": "Billable Hours", "options": [], "rankOrder": 1.0, "required": true, "type": "NUMBER" }

STRING Attribute

PUT URL: TIME_TRACKER_BASE_URL/timetracker/api/latest/public/attribute/53

Example request body:

{ "archived": true, "defaultValue": "No comment", "description": "Additional comment", "name": "Comment", "options": [], "rankOrder": 3, "required": false }

Example response:

200 Successful operation:

{ "archived": true, "defaultValue": "No comment", "description": "Additional comment", "id": 53, "name": "Comment", "options": [], "rankOrder": 3.0, "required": false, "type": "STRING" }

BOOLEAN Attribute

PUT URL: TIME_TRACKER_BASE_URL/timetracker/api/latest/public/attribute/54

Example request body:

{ "archived": false, "defaultValue": true, "description": "Indicates whether the logged work was performed as overtime", "name": "Overtime", "options": [], "rankOrder": 4, "required": false }

Example response:

200 Successful operation:

{ "archived": false, "defaultValue": true, "description": "Indicates whether the logged work was performed as overtime", "id": 54, "name": "Overtime", "options": [], "rankOrder": 4.0, "required": false, "type": "BOOLEAN" }

SELECT Attribute

PUT URL: TIME_TRACKER_BASE_URL/timetracker/api/latest/public/attribute/52

Example request body:

{ "archived": false, "defaultValue": "Documentation", "description": "The type of task performed in the worklog", "name": "Task type", "options": [ { "name": "Development", "optionId": 54 }, { "name": "Support", "optionId": 57 }, { "name": "Documentation", "optionId": 58 }, { "name": "Meeting", "optionId": null } ], "rankOrder": 2, "required": false }

Example response:

200 Successful operation:

{ "archived": false, "defaultValue": "Documentation", "description": "The type of task performed in the worklog", "id": 52, "name": "Task type", "options": [ { "name": "Development", "optionId": 54 }, { "name": "Support", "optionId": 57 }, { "name": "Documentation", "optionId": 58 }, { "name": "Meeting", "optionId": 59 } ], "rankOrder": 2.0, "required": false, "type": "SELECT" }

Example error response:

401 Unauthorized

404 Not found attribute.

400 Invalid parameters: An object that holds all field and non-field related errors

479 The user does not have one of the necessary Timetracker permissions that can be set in the Global Settings.

Delete Worklog Attribute DELETE /attribute/{worklogAttributeId}

Header parameters

Header Parameter

Optional

Description

Header Parameter

Optional

Description

x-everit-api-key

Generated Everit authentication token, see: https://everit.atlassian.net/wiki/spaces/TCDS/pages/3531442081

x-requested-by

CSRF protection parameter.

Path variables

The available path variables for the request:

Path Variable

Value type

Optional

Description

Path Variable

Value type

Optional

Description

worklogAttributeId

number

The unique ID of the worklog attribute.

Example: /public/attribute/53

Examples 

DELETE URL: TIME_TRACKER_BASE_URL/timetracker/api/latest/public/attribute/53

204 Successful operation.

401 Unauthorized

400 Invalid parameters: An object that holds all field and non-field related errors

479 The user does not have one of the necessary Timetracker permissions that can be set in the Global Settings.