API Documentation
Report Categories ¶
Report Category ¶
GET /api/v2/report_categories
Requests
GET /api/v2/report_categories
Headers
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Content-Type: application/vnd.api+json
Responses
Headers
Content-Type: application/vnd.api+json; charset=utf-8
Body
{
"data": [
{
"id": "2",
"type": "report_categories",
"attributes": {
"name": "category",
"position": 1,
"color_id": null,
"deleted_at": null
},
"relationships": {
"organization": {
"data": {
"type": "organizations",
"id": "1028"
}
}
}
},
{
"id": "3",
"type": "report_categories",
"attributes": {
"name": "category",
"position": 1,
"color_id": null,
"deleted_at": null
},
"relationships": {
"organization": {
"data": {
"type": "organizations",
"id": "1028"
}
}
}
},
{
"id": "4",
"type": "report_categories",
"attributes": {
"name": "category",
"position": 1,
"color_id": null,
"deleted_at": null
},
"relationships": {
"organization": {
"data": {
"type": "organizations",
"id": "1028"
}
}
}
}
],
"links": {
"first": "http://api-test.productive.io/api/v2/report_categories?page%5Bnumber%5D=1&page%5Bsize%5D=30",
"last": "http://api-test.productive.io/api/v2/report_categories?page%5Bnumber%5D=1&page%5Bsize%5D=30"
},
"meta": {
"current_page": 1,
"total_pages": 1,
"total_count": 3,
"page_size": 30,
"max_page_size": 200
}
}
Get report categoriesGET/api/v2/report_categories
GET /api/v2/report_categories/1
Requests
GET /api/v2/report_categories/5
Headers
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Content-Type: application/vnd.api+json
Responses
Headers
Content-Type: application/vnd.api+json; charset=utf-8
Body
{
"data": {
"id": "5",
"type": "report_categories",
"attributes": {
"name": "category",
"position": 1,
"color_id": null,
"deleted_at": null
},
"relationships": {
"organization": {
"data": {
"type": "organizations",
"id": "1029"
}
}
}
},
"meta": {}
}
Gets a report categoryGET/api/v2/report_categories/{id}
URI Parameters
- id
number
(required) Example: 1report_category id
POST /api/v2/report_categories
Requests
POST /api/v2/report_categories
Headers
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Content-Type: application/vnd.api+json
Body
{
"data": {
"type": "report_categories",
"attributes": {
"name": "category#2",
"position": 1
}
}
}
Responses
Headers
Content-Type: application/vnd.api+json; charset=utf-8
Body
{
"data": {
"id": "7",
"type": "report_categories",
"attributes": {
"name": "category#2",
"position": 1,
"color_id": null,
"deleted_at": null
},
"relationships": {
"organization": {
"data": {
"type": "organizations",
"id": "1030"
}
}
}
},
"meta": {}
}
POST /api/v2/report_categories
Headers
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Content-Type: application/vnd.api+json
Body
{
"data": {
"type": "report_categories",
"attributes": {
"name": ""
}
}
}
Responses
Headers
Content-Type: application/vnd.api+json; charset=utf-8
Body
{
"errors": [
{
"status": "422",
"code": "invalid_attribute",
"title": "Invalid Attribute",
"detail": "can't be blank",
"source": {
"pointer": "data/attributes/name"
}
}
]
}
Create a report categoryPOST/api/v2/report_categories
URI Parameters
- name
string
(required) Example: Namename
PATCH /api/v2/report_categories/1
Requests
PATCH /api/v2/report_categories/9
Headers
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Content-Type: application/vnd.api+json
Body
{
"data": {
"type": "report_categories",
"attributes": {
"name": "category#2"
}
}
}
Responses
Headers
Content-Type: application/vnd.api+json; charset=utf-8
Body
{
"data": {
"id": "9",
"type": "report_categories",
"attributes": {
"name": "category#2",
"position": 1,
"color_id": null,
"deleted_at": null
},
"relationships": {
"organization": {
"data": {
"type": "organizations",
"id": "1032"
}
}
}
},
"meta": {}
}
PATCH /api/v2/report_categories/10
Headers
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Content-Type: application/vnd.api+json
Body
{
"data": {
"type": "report_categories",
"attributes": {
"name": ""
}
}
}
Responses
Headers
Content-Type: application/vnd.api+json; charset=utf-8
Body
{
"errors": [
{
"status": "422",
"code": "invalid_attribute",
"title": "Invalid Attribute",
"detail": "can't be blank",
"source": {
"pointer": "data/attributes/name"
}
}
]
}
Update a report categoryPATCH/api/v2/report_categories/{id}
URI Parameters
- id
number
(required) Example: 1report_category id
DELETE /api/v2/report_categories/1
Requests
DELETE /api/v2/report_categories/11
Headers
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Content-Type: application/vnd.api+json
Responses
This response has no content.
DELETE /api/v2/report_categories/12
Headers
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Content-Type: application/vnd.api+json
Responses
This response has no content.
Deletes a report categoryDELETE/api/v2/report_categories/{id}
URI Parameters
- id
number
(required) Example: 1report_category id
Generated by aglio on 19 Apr 2024