API Documentation
Sections ¶
Sections ¶
GET /api/v2/sections
Requests
GET /api/v2/sections
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": "45",
"type": "sections",
"attributes": {
"name": "section name",
"preferences": {
"width": "90%"
},
"position": 1,
"editor_config": {}
},
"relationships": {
"organization": {
"data": {
"type": "organizations",
"id": "1835"
}
},
"deal": {
"meta": {
"included": false
}
}
}
}
],
"links": {
"first": "http://api-test.productive.io/api/v2/sections?page%5Bnumber%5D=1&page%5Bsize%5D=30",
"last": "http://api-test.productive.io/api/v2/sections?page%5Bnumber%5D=1&page%5Bsize%5D=30"
},
"meta": {
"current_page": 1,
"total_pages": 1,
"total_count": 1,
"page_size": 30,
"max_page_size": 200
}
}
Get sectionsGET/api/v2/sections
GET /api/v2/sections/1
Requests
GET /api/v2/sections/46
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": "46",
"type": "sections",
"attributes": {
"name": "section name",
"preferences": {
"width": "90%"
},
"position": 1,
"editor_config": {}
},
"relationships": {
"organization": {
"data": {
"type": "organizations",
"id": "1836"
}
},
"deal": {
"meta": {
"included": false
}
}
}
},
"meta": {}
}
POST /api/v2/sections
Requests
POST /api/v2/sections
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": "sections",
"attributes": {
"name": "test name"
},
"relationships": {
"deal": {
"data": {
"type": "deals",
"id": "1631"
}
}
}
}
}
Responses
Headers
Content-Type: application/vnd.api+json; charset=utf-8
Body
{
"data": {
"id": "48",
"type": "sections",
"attributes": {
"name": "test name",
"preferences": null,
"position": 1,
"editor_config": null
},
"relationships": {
"organization": {
"data": {
"type": "organizations",
"id": "1837"
}
},
"deal": {
"meta": {
"included": false
}
}
}
},
"meta": {}
}
POST /api/v2/sections
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": "sections",
"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/deal"
}
}
]
}
PATCH /api/v2/sections/1
Requests
PATCH /api/v2/sections/50
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": "sections",
"attributes": {
"name": "new name"
}
}
}
Responses
Headers
Content-Type: application/vnd.api+json; charset=utf-8
Body
{
"data": {
"id": "50",
"type": "sections",
"attributes": {
"name": "new name",
"preferences": {
"width": "90%"
},
"position": 1,
"editor_config": {}
},
"relationships": {
"organization": {
"data": {
"type": "organizations",
"id": "1839"
}
},
"deal": {
"meta": {
"included": false
}
}
}
},
"meta": {}
}
PATCH /api/v2/sections/51
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": "sections",
"attributes": {
"deal_id": ""
}
}
}
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/deal"
}
}
]
}
DELETE /api/v2/sections/1
Requests
DELETE /api/v2/sections/52
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.
Generated by aglio on 18 Apr 2024