Skip to main content

Report settings API

General notes

Embeddable fields

NameTypeDescription
clientClientClient of Project's report setting Client.
projectsProject[]Projects of report setting Project.

Content

Report settings collection:

Single report setting:

Report settings collection

Report settings index

This method needs permission access on report-settings

Request

Index behaviourDefinition
Paginated by defaultYes
Sortingid, name, client_id, project_id, type, is_live, one_time_from, one_time_to, regular_start, regular_interval, created_at, is_bug_field_hidden_for_client, is_automatically_created_by_project
Filtersid:enum, name:string, client_id:int, project_id:int, type:int, is_live:bool, one_time_from:date, one_time_to:date, regular_start:date, regular_interval:int, created_at:date, updated_at:date, is_bug_field_hidden_for_client:bool, is_automatically_created_by_project:bool
Embeddedprojects
GET /api/v0/report-settings HTTP/1.1
Content-Type: application/json

Responses

200 OK

GET /api/v0/report-settings HTTP/1.1
Content-Type: application/json

{
"items": [
{
"id": 11,
"name": "Test live",
"client_id": 1,
"responsible_user_id": 2,
"type": "1",
"is_live": true,
"task_filter": "1",
"is_bug_field_hidden_for_client": false,
"one_time_from": "2022-12-31T23:00:00.000000Z",
"one_time_to": "2023-01-30T23:00:00.000000Z",
"regular_start": null,
"regular_interval": null,
"created_at": "2023-01-11T15:46:49+0100",
"updated_at": "2023-01-11T15:46:49+0100",
"_links": [
{
"href": "/api/v0/report-settings/11",
"rel": "self",
"type": "GET"
}
]
}
]
}

Single report setting

Report setting detail

GET /api/v0/report-settings/{report_setting_id}

This method needs permission read on report-settings.

Get ReportSetting detail.

Request

Index behaviourDefinition
Embeddedprojects

Request

GET /api/v0/report-settings/11 HTTP/1.1
Content-Type: application/json

Response

200 OK

GET /api/v0/report-settings/11 HTTP/1.1
Content-Type: application/json

{
"id": 11,
"name": "Test live",
"client_id": 1,
"responsible_user_id": 2,
"type": "1",
"is_live": true,
"task_filter": "1",
"is_bug_field_hidden_for_client": false,
"one_time_from": "2022-12-31T23:00:00.000000Z",
"one_time_to": "2023-01-30T23:00:00.000000Z",
"regular_start": null,
"regular_interval": null,
"created_at": "2023-01-11T15:46:49+0100",
"updated_at": "2023-01-11T15:46:49+0100",
"_links": [
{
"href": "/api/v0/report-settings/11",
"rel": "self",
"type": "GET"
}
]
}

404 NOT FOUND

ReportSetting was not found.

GET /api/v0/report-settings/50 HTTP/1.1
Content-Type: application/json
Status-Code: 404

{
"type": "NotFound",
"message": "Required model was not found.",
"id": "0cd85449-05fe-4866-9802-8192e6785fc7"
}

Create report setting

POST /api/v0/report-settings

This method needs permission create on report-settings.

Method for creating new ReportSetting.

Request

ParamTypeDescriptionRequirements
namestringReport setting nameRequired. Has to be string.
client_idintClient idRequired. Id of client Client
project_idintProject idRequired. Id of project Project
responsible_user_idintResponsible User idRequired. Id of user User
typeintType of Report settingRequired. Must be enumerator of report_setting_type
task_filterintTask filter of report settingRequired. Must be enumerator of report_setting_task_filter
one_time_fromdateDate, when report will be generated fromRequired if type is one time.
one_time_todateDate, when report will be generated toRequired if type is one time.
regular_startdateDate, when regular report will be generatedRequired if type is regular.
regular_intervalintReport generating intervalRequired if type is regular.
POST /api/v0/report-settings HTTP/1.1
Content-Type: application/json

{
"name": "test",
"client_id": 1,
"project_id": 2,
"project_ids": [2, 4],
"responsible_user_id": 1,
"type": 1,
"is_live": true,
"task_filter": 1,
"one_time_from": "2023-01-01T23:00:00.000000Z"
"one_time_to": "2023-01-30T23:00:00.000000Z",
}

Response

201 CREATED

POST /api/v0/report-settings HTTP/1.1
Content-Type: application/json

{
"id": 1,
"name": "test",
"client_id": 1,
"responsible_user_id": 1,
"type": "1",
"is_live": false,
"task_filter": "1",
"is_bug_field_hidden_for_client": false,
"one_time_from": "2023-01-01T23:00:00.000000Z",
"one_time_to": "2023-01-30T23:00:00.000000Z",
"regular_start": null,
"regular_interval": null,
"created_at": "2023-01-11T15:47:05+0100",
"updated_at": "2023-01-11T15:47:05+0100",
"_links": [
{
"href": "/api/v0/report-settings/1",
"rel": "self",
"type": "GET"
}
]
}

422 UNPROCESSABLE ENTITY

Validation error occurred.

POST /api/v0/report-settings HTTP/1.1
Content-Type: application/json

{
"type" : "ValidationError",
"message" : "The given data was invalid.",
"id" : "fe1b04de-b347-43b5-8118-864c1eefaccf",
"errors": [
{
"field": "name",
"message": "The name field is required."
}
]
}

Update report settings

PUT/PATCH /api/v0/report-settings/{report_setting_id}

This method needs permission update on report-settings.

Method for updating ReportSetting data.

Request

Same inputs and requirements as for POST method.

For PATCH method any field can be omitted.

PUT /api/v0/report-settings/1 HTTP/1.1
Content-Type: application/json

{
"name": "test 2"
}

Response

200 OK

ReportSetting successfully updated.

PUT /api/report-settings/1 HTTP/1.1
Content-Type: application/json

{
"id": 1,
"name": "test",
"client_id": 1,
"responsible_user_id": 1,
"type": "1",
"is_live": false,
"task_filter": "1",
"is_bug_field_hidden_for_client": false,
"one_time_from": "2023-01-01T23:00:00.000000Z",
"one_time_to": "2023-01-30T23:00:00.000000Z",
"regular_start": null,
"regular_interval": null,
"created_at": "2023-01-11T15:47:05+0100",
"updated_at": "2023-01-11T15:47:05+0100",
"_links": [
{
"href": "/api/v0/report-settings/1",
"rel": "self",
"type": "GET"
}
]
}

404 NOT FOUND

ReportSetting was not found.

PUT /api/v0/report-settings/2 HTTP/1.1
Content-Type: application/json
Status-Code: 404

{
"type": "NotFound",
"message": "Required model was not found.",
"id": "0cd85449-05fe-4866-9802-8192e6785fc7"
}

422 UNPROCESSABLE ENTITY

Validation error occurred.

PUT /api/v0/report-settings HTTP/1.1
Content-Type: application/json

{
"type" : "ValidationError",
"message" : "The given data was invalid.",
"id" : "fe1b04de-b347-43b5-8118-864c1eefaccf",
"errors": [
{
"field": "name",
"message": "The name field is required."
}
]
}

Delete report setting

DELETE /api/v0/report-settings/{report_setting_id}

This method needs permission delete on report-settings.

Method for deleting ReportSetting.

Request

DELETE /api/v0/report-settings/1 HTTP/1.1
Content-Type: application/json

Response

204 NO CONTENT

ReportSetting successfully deleted.

404 NOT FOUND

ReportSetting was not found.

DELETE /api/v0/report-settings/1 HTTP/1.1
Content-Type: application/json
Status-Code: 404

{
"type": "NotFound",
"message": "Required model was not found.",
"id": "0cd85449-05fe-4866-9802-8192e6785fc7"
}