View
All the endpoints that can be called on the View controller.
Endpoints that require the VIEW_READ permission:
GETindex
Endpoints that require the VIEW_CUD permission:
POSTindexPOSTitemDELETEitem
Endpoints that require the GROUP_CUD permission:
GETitem
Endpoints that require the SETTINGS_CRUD permission:
GETviewCategories
Returns all the existing views.
Authorizations
Query parameters
querystring · min: 1OptionalPattern:
^[0-9a-zA-Z \-\_]+itemStartnumberOptionalDefault:
0itemLimitnumber · max: 9999OptionalDefault:
15Responses
200Success
No content
get
/api/v2/viewGET /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 titlePattern: ^[0-9a-zA-Z \-\_]+$primary_sortingstringOptionalDefault:
noneExample: nonePattern: ^[a-z_]+$primary_sorting_orderstring · enumOptionalDefault:
ascPossible values: secondary_sortingstringOptionalDefault:
noneExample: nonePattern: ^[a-z_]+$secondary_sorting_orderstring · enumOptionalDefault:
ascPossible values: view_category_idnumberOptional
view_order_idnumberOptionalExample:
1Responses
200
index example
application/json
post
/api/v2/viewPOST /api/v2/view HTTP/1.1
Host: {{base_url}}
apiKey: YOUR_API_KEY
Content-Type: multipart/form-data
Accept: */*
Content-Length: 343
{
"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"
}
]
}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:
nonePattern: ^[a-z_]+$primary_sorting_orderstring · enumOptionalDefault:
ascPossible values: secondary_sortingstringOptionalDefault:
nonePattern: ^[a-z_]+$secondary_sorting_orderstring · enumOptionalDefault:
ascPossible values: view_category_idnumberOptional
view_order_idnumberOptional
historyReasonstringOptional
Responses
200Success
No content
put
/api/v2/view/{id}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: 359
"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'}]"200Success
No content