Preview
  • 16 Jun 2022
  • 1 Minute to read
  • Dark
    Light

Preview

  • Dark
    Light

Article summary

Preview

Preview JSON Format

Preview is represented as simple flat JSON objects with the following keys:

NameTypeDescription
entityNamestring
datastring
idguid

Get the list of Previews

GET kb/previews

  • Parameters:

No Parameters

  • Response:

An array of Preview

  • Example

Sample Request:

curl https://api11.comm100.io/v4/kb/previews \ 
    -X 'GET' \ 
    -H 'Authorization: Bearer {access_token}' \ 

Response:

HTTP/1.1 200 OK

[
  {
      "entityName": "",
      "data": "",
      "id": "04669ee3-1dd5-4558-bc42-412a9426b4fa"
  }
] 

Get a single Preview

GET kb/previews/{id}

  • Parameters:

No Parameters

  • Response:

Preview

  • Example

Sample Request:

curl https://api11.comm100.io/v4/kb/previews/04669ee3-1dd5-4558-bc42-412a9426b4fa \ 
    -X 'GET' \ 
    -H 'Authorization: Bearer {access_token}' \ 

Response:

HTTP/1.1 200 OK

{
  "entityName": "",
  "data": "",
  "id": "04669ee3-1dd5-4558-bc42-412a9426b4fa"
} 

Create a new Preview

POST kb/previews

  • Parameters:

NameTypeinRequiredDescription
entityNamestringbodyyes
datastringbodyyes
  • Response:

Preview

  • Example

Sample Request:

curl https://api11.comm100.io/v4/kb/previews \ 
    -X 'POST' \ 
    -H 'Authorization: Bearer {access_token}' \ 
    -H 'Content-Type: application/json' \ 
    -D '{"entityName":"","data":""}' 

Response:

HTTP/1.1 201 Created

{
  "entityName": "",
  "data": "",
  "id": "04669ee3-1dd5-4558-bc42-412a9426b4fa"
} 

Update the Preview

PUT kb/previews/{id}

  • Parameters:

NameTypeinRequiredDescription
entityNamestringbodyyes
datastringbodyyes
  • Response:

Preview

  • Example

Sample Request:

curl https://api11.comm100.io/v4/kb/previews/04669ee3-1dd5-4558-bc42-412a9426b4fa \ 
    -X 'PUT' \ 
    -H 'Authorization: Bearer {access_token}' \ 
    -H 'Content-Type: application/json' \ 
    -D '{"entityName":"","data":""}' 

Response:

HTTP/1.1 200 OK

{
  "entityName": "",
  "data": "",
  "id": "04669ee3-1dd5-4558-bc42-412a9426b4fa"
} 

Remove the Preview

DELETE kb/previews/{id}

  • Parameters:

No Parameters

  • Response:

No Content

  • Example

Sample Request:

curl https://api11.comm100.io/v4/kb/previews/04669ee3-1dd5-4558-bc42-412a9426b4fa \ 
    -X 'DELETE' \ 
    -H 'Authorization: Bearer {access_token}' \ 

Response:

HTTP/1.1 204 No Content


Was this article helpful?

What's Next