View
All the endpoints that can be called on the View controller.
Endpoints that require the VIEW_READ
permission:
GET
index
Endpoints that require the VIEW_CUD
permission:
POST
indexPOST
itemDELETE
item
Endpoints that require the GROUP_CUD
permission:
GET
item
Endpoints that require the SETTINGS_CRUD
permission:
GET
viewCategories
Returns all the existing views.
Authorizations
Query parameters
querystring · min: 1OptionalPattern:
^[0-9a-zA-Z \-\_]+
itemStartnumberOptionalDefault:
0
itemLimitnumber · max: 9999OptionalDefault:
15
Responses
200Success
get
GET /api/v2/view HTTP/1.1
Host: {{base_url}}
apiKey: YOUR_API_KEY
Accept: */*
200Success
No content
Creates a new view.
View the example on how to create conditions and columns.
Authorizations
Body
titlestring · min: 4RequiredExample:
example title
Pattern: ^[0-9a-zA-Z \-\_]+$
primary_sortingstringOptionalDefault:
none
Example: none
Pattern: ^[a-z_]+$
primary_sorting_orderstring · enumOptionalDefault:
asc
Possible values: secondary_sortingstringOptionalDefault:
none
Example: none
Pattern: ^[a-z_]+$
secondary_sorting_orderstring · enumOptionalDefault:
asc
Possible values: view_category_idnumberOptional
view_order_idnumberOptionalExample:
1
Responses
200
index example
application/json
post
POST /api/v2/view HTTP/1.1
Host: {{base_url}}
apiKey: YOUR_API_KEY
Content-Type: multipart/form-data
Accept: */*
Content-Length: 366
{
"title": "example title",
"primary_sorting": "none",
"primary_sorting_order": "",
"secondary_sorting": "none",
"secondary_sorting_order": "",
"view_category_id": "",
"view_order_id": 1,
"conditions": {
"all": [
{
"fact": "brand_id",
"operation": "equals",
"value": "1"
}
],
"any": [
{
"fact": "text",
"operation": "text",
"value": "text"
}
]
},
"columns": [
{
"type": "channel_icon",
"title": "Channel Icon"
}
]
}
200
index example
{
"message": "View created.",
"type": "result"
}
Updates this specific view.
View the example of POST
index on how to update the conditions and columns.
Authorizations
Path parameters
idnumberRequired
Body
titlestring · min: 4RequiredPattern:
^[0-9a-zA-Z \-\_]+$
primary_sortingstringOptionalDefault:
none
Pattern: ^[a-z_]+$
primary_sorting_orderstring · enumOptionalDefault:
asc
Possible values: secondary_sortingstringOptionalDefault:
none
Pattern: ^[a-z_]+$
secondary_sorting_orderstring · enumOptionalDefault:
asc
Possible values: view_category_idnumberOptional
view_order_idnumberOptional
historyReasonstringOptional
Responses
200Success
put
PUT /api/v2/view/{id} HTTP/1.1
Host: {{base_url}}
apiKey: YOUR_API_KEY
Content-Type: application/x-www-form-urlencoded
Accept: */*
Content-Length: 382
"title='text'&primary_sorting='none'&primary_sorting_order='asc'&secondary_sorting='none'&secondary_sorting_order='asc'&view_category_id=1&view_order_id=1&historyReason='text'&conditions={'all':[{'fact':'text','operation':'text','value':'text'}],'any':[{'fact':'text','operation':'text','value':'text'}]}&columns=[{'type':'channel_icon','title':'Channel Icon'}]"
200Success
No content