Activity Reports API
General notes
Content
Tasks collection:
Single role:
Tasks collection
Activity reports index
This method needs permission
accessonactivity_reports.
Request
| Index behaviour | Definition |
|---|---|
| Paginated by default | No |
| Sorting | id, model_type, model_id, activity_type, reported_at, reported_by, created_at, updated_at |
| Filters | id:enum, model_type:enum, model_id:int, activity_type:enum, reported_at:dateTime |
| Embedded | - |
GET /api/v0/activity-reports HTTP/1.1
Content-Type: application/json
Response
200 OK
GET /api/v0/tasks HTTP/1.1
Content-Type: application/json
{
"items": [
{
"id": 552,
"model_type": 1,
"model_id": 1,
"activity_type": 3,
"reported_at": "2023-11-02T11:32:25.000000Z",
"reported_by": null,
"created_at": "2023-11-02T12:32:25+0100",
"updated_at": "2023-11-02T12:32:25+0100",
"_links": [
{
"href": "/api/v0/activity-reports/552",
"rel": "self",
"type": "GET"
}
]
},
{
"id": 553,
"model_type": 2,
"model_id": 30,
"activity_type": 1,
"reported_at": "2022-06-21T04:49:19.000000Z",
"reported_by": 18,
"created_at": "2023-11-02T13:12:21+0100",
"updated_at": "2023-11-02T13:12:21+0100",
"_links": [
{
"href": "/api/v0/activity-reports/553",
"rel": "self",
"type": "GET"
}
]
},
]
}
Single Activity Report
Activity Report Detail
GET /api/v0/activity-reports/{activity_report_id}
This method needs permission
readonactivity-reports.
Get Activity Report detail.
Request
| Index behaviour | Definition |
|---|---|
| Embedded | - |
Request
GET /api/v0/activity-report/553 HTTP/1.1
Content-Type: application/json
Response
200 OK
GET /api/v0/activity-reports/553 HTTP/1.1
Content-Type: application/json
{
"id": 553,
"model_type": 2,
"model_id": 30,
"activity_type": 1,
"reported_at": "2022-06-21T04:49:19.000000Z",
"reported_by": 18,
"created_at": "2023-11-02T13:12:21+0100",
"updated_at": "2023-11-02T13:12:21+0100",
"_links": [
{
"href": "/api/v0/activity-reports/553",
"rel": "self",
"type": "GET"
}
]
},
404 NOT FOUND
GET /api/v0/tasks/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"
}
Delete Activity Report
DELETE /api/v0/activity-reports/{activity-report-id}
This method needs permission
deleteonactivity-reports.
Method for updating Activity Report data.
Request
DELETE /api/v0/activity-reports/3 HTTP/1.1
Content-Type: application/json
Response
204 No Content
Activity Report successfully deleted.
DELETE /api/activity-reprorts/3 HTTP/1.1
Content-Type: application/json
404 NOT FOUND
Activity Report was not found.
PATCH /api/activity-reports/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/tasks 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."
}
]
}