GET /klips/{id}/schema

Description

Get the schema for the specified klip.

Permissions

klip.edit

Resource URL

https://app.klipfolio.com/api/1.0/klips/{id}/schema

Parameters

None.

Example Request

GET https://app.klipfolio.com/api/1/klips/ec6947ab9d07fdd6b9bb41551c79fd31/schema

Example Response

{
   "data": {
       "schema": {
           "components": [
               {
               :
               }
           ],
           "id": "",
           "layoutConfig": ".region-2",
           "title": "LinkedIn Pie Chart",
           "version": "1",
           "workspace": {
               "datasources": [
                   "891e03e1e3f913a390e2e9c872c99cd5",
                   "27a0aeeae2964f0e81e804cb55f43c86"
               ],
               "dimensions": {
                   "w": 400
               }
           }
       }
   },
   "meta": {
       "status": 200,
       "success": true
   }
}
``` 



[block:api-header]
{
  "type": "basic",
  "title": "PUT /klips/{id}/schema"
}
[/block]




[block:parameters]
{
  "data": {
    "0-0": "Description",
    "0-1": "Update the schema for the specified Klip.",
    "1-0": "Permissions",
    "2-0": "Resource URL",
    "3-0": "Parameters",
    "1-1": "klip.edit",
    "2-1": "https://app.klipfolio.com/api/1.0/klips/{id}/schema",
    "3-1": "None."
  },
  "cols": 2,
  "rows": 4
}
[/block]

##Example Request 

Note: The default schema is used when the Klip is created using POST/klips.
PUT https://app.klipfolio.com/api/1/klips/ec6947ab9d07fdd6b9bb41551c79fd31/schema -d
{
"title": "Default",
"id": "0123456789abcdef0123456789abcdef",
"workspace": {
"datasources": []
},
"components": [
{
"type": "simple_value",
"displayName": "Value",
"id": "8c79ad9b-4",
"components": [
{
"type": "label",
"displayName": "Primary Value",
"size": 2,
"fmt": "txt",
"role": "primary",
"id": "e0c29d78-5",
"formulas": [],
"data": [
[]
]
},
{
"type": "label",
"displayName": "Secondary Value",
"size": 1,
"role": "secondary",
"id": "4d34c828-6",
"formulas": [],
"data": []
}
]
}
]
}

##Example Response

{
"data": {},
"meta": {
"status": 200,
"success": true
}
}