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 index

  • POST item

  • DELETE item

Endpoints that require the GROUP_CUD permission:

  • GET item

Endpoints that require the SETTINGS_CRUD permission:

  • GET viewCategories

index

get

Returns all the existing views.

Authorizations
HTTPRequired
Responses
200

Successful response

application/json
get
/api/v2/view
200

Successful response

index

post

Creates a new view.

View the example on how to create conditions and columns.

Authorizations
HTTPRequired
Body
titlestringOptional

type: ^[0-9a-zA-Z \-\_]+$

primary_sortingstringOptional

type: ^[a-z_]+$ = 'none'

primary_sorting_orderstringOptional

type: asc|desc = 'asc'

secondary_sortingstringOptional

type: ^[a-z_]+$ = 'none'

secondary_sorting_orderstringOptional

type: asc|desc = 'asc'

view_category_idstringOptional

type: number = null

view_order_idstringOptional

type: number

conditions[]stringOptional

type: condition

View example

columns[]stringOptional

type: columns

View example

Responses
200

OK

application/json
Responseobject
post
/api/v2/view
200

OK

item

get

Returns the view by its ID.

Authorizations
HTTPRequired
Path parameters
idstringRequired
Responses
200

Successful response

application/json
get
/api/v2/view/{id}
200

Successful response

item

put

Updates this specific view.

View the example of POST index on how to update the conditions and columns.

Authorizations
HTTPRequired
Path parameters
idstringRequired
Body
titlestringOptional

type: ^[0-9a-zA-Z \-\_]+$

primary_sortingstringOptional

type: ^[a-z_]+$ = 'none'

primary_sorting_orderstringOptional

type: asc|desc = 'asc'

secondary_sortingstringOptional

type: ^[a-z_]+$ = 'none'

secondary_sorting_orderstringOptional

type: asc|desc = 'asc'

view_category_idstringOptional

type: number = null

view_order_idstringOptional

type: number

historyReasonstringOptional

type: string = null

History reason to add to audit logs.

conditions[]stringOptional
columns[]stringOptional
Responses
200

Successful response

application/json
put
/api/v2/view/{id}
200

Successful response

item

delete

Permanently deletes this view by its ID.

Authorizations
HTTPRequired
Path parameters
idstringRequired
Responses
200

Successful response

application/json
delete
/api/v2/view/{id}
200

Successful response

Last updated