omnidesk
  • Ticket
    • Message
    • Using forms
    • Contact forms
  • Customers
    • General
    • API sync on contact
    • CSV import
    • API sync before contact
    • Customer lookup
  • Telephone
    • Callflow
    • Numbers
  • E-mail
  • Users
  • Live chat
    • Livechat chatbot and app integration (backend)
  • Facebook
  • Twitter
  • Survey
    • Push data
  • Statistics
    • Statistics API
  • Raw data - BI
  • Security policy
  • Hosting
  • API docs
    • General
    • Authentication
    • REST
  • API specification
    • Documentation for the Omnidesk API endpoints
    • Chat
    • Customer
    • Email
    • Form
    • Formfield
    • Message
    • Notification
    • Raw
    • Ticket
    • User
    • View
    • Statisticsv2
Powered by GitBook
On this page
  1. API specification

View

PreviousUserNextStatisticsv2

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
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

item

get

Returns the view by its ID.

Authorizations
Path parameters
idnumberRequired
Responses
200Success
get
GET /api/v2/view/{id} HTTP/1.1
Host: {{base_url}}
apiKey: YOUR_API_KEY
Accept: */*
200Success

No content

item

delete

Permanently deletes this view by its ID.

Authorizations
Path parameters
idnumberRequired
Responses
200Success
delete
DELETE /api/v2/view/{id} HTTP/1.1
Host: {{base_url}}
apiKey: YOUR_API_KEY
Accept: */*
200Success

No content

  • GETindex
  • POSTindex
  • GETitem
  • PUTitem
  • DELETEitem

index

post

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: 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"
}

item

put

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
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