{"_id":"564ba051288b1a2b00b3ae83","version":{"_id":"563a252d50bf950d00e0979b","__v":7,"project":"563a252d50bf950d00e09798","createdAt":"2015-11-04T15:33:01.701Z","releaseDate":"2015-11-04T15:33:01.701Z","categories":["563a252e50bf950d00e0979c","563a2a691846790d008952fe","563a3394daf1c00d00136d9b","563a3467d25e8919005f3f0c","563a347850bf950d00e097b4","570e5cec10aa423200391fb5","5890d358d6cb8e2500a3f311"],"is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":true,"codename":"","version_clean":"1.0.0","version":"1.0"},"parentDoc":null,"__v":12,"category":{"_id":"563a252e50bf950d00e0979c","project":"563a252d50bf950d00e09798","pages":["563a252f50bf950d00e0979e","563a35ac1846790d0089532c","563d1407d8f2d20d00448d3c","563d1d3f9799fb0d0004776a","564509aa2c74cf1900da48c7","56453b7e9f3f550d00fa3c7b","564b498aeed7de0d003672c3","564b523ce5d9d61700d580e0","564b58ea1a8e610d006bfd49","564b59baee12850d00958656","564b6773d969330d00aba984","564b69b2d7b95d0d00ed050f","564b7fa8cc472d0d00da9447","564b905fa8a0ba21002ad6b1","564ba051288b1a2b00b3ae83","564ba6275cc43717009bcff1","564bb2138841060d00abb2e0","564bb74e05c99e1700161dd1","564c8ad60ddedc210051e582","564cca42d0c5b42b002305e8","564cca8ecfa4452b0019926d","564ce34f404ce53500fdb255","564cea76404ce53500fdb272","564cedb77d4d31170028dd2e","564cefc1bc81632100b10468","564cf17d1f42792b00820515","564cf5462248461700bd4017","564ddd49a8671617004e7b90","564ddf9ead1d5217003e2e18","564de1dea8671617004e7b99","564de3c11133043500f4bf96","564de669e39c4435005a1f65","564df3f16eaa3a2100868961","5655d3519347d30d00d7e8e2"],"version":"563a252d50bf950d00e0979b","__v":34,"sync":{"url":"","isSync":false},"reference":false,"createdAt":"2015-11-04T15:33:02.244Z","from_sync":false,"order":9999,"slug":"documentation","title":"Documentation"},"project":"563a252d50bf950d00e09798","user":"54c7fdeae317000d007c2765","updates":[],"next":{"pages":[],"description":""},"createdAt":"2015-11-17T21:46:57.964Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[]},"settings":"","auth":"required","params":[],"url":"/klips/:id"},"isReference":false,"order":21,"body":"[block:api-header]\n{\n  \"type\": \"get\",\n  \"title\": \"GET /klips\"\n}\n[/block]\n\n[block:parameters]\n{\n  \"data\": {\n    \"0-0\": \"Description\",\n    \"0-1\": \"Get a list of all the Klips the user can access.\",\n    \"1-0\": \"Permissions\",\n    \"2-0\": \"Resource URL\",\n    \"3-0\": \"Parameters\",\n    \"1-1\": \"dashboard.library\",\n    \"2-1\": \"https://app.klipfolio.com/api/1.0/klips\",\n    \"3-1\": \"client_id (string) — show only klips that belong to a specific client\\ndatasource_id (string) — show only\"\n  },\n  \"cols\": 2,\n  \"rows\": 4\n}\n[/block]\n##Example Request\n`GET https://app.klipfolio.com/api/1/klips?client_id=0123456789abcdef0123456789abcdef`\n##Example Response\n```\n{\n   \"data\": {\n       \"klips\": [\n           {\n               \"description\": \"This is a sample klip\",\n               \"id\": \"fedcba9876543210fedcba9876543210\",\n               \"name\": \"sample klip\"\n           }\n       ]\n   },\n   \"meta\": {\n       \"status\": 200,\n       \"success\": true\n   }\n}\n```\n\n\n[block:api-header]\n{\n  \"type\": \"get\",\n  \"title\": \"GET /klips/{id}\"\n}\n[/block]\n\n[block:parameters]\n{\n  \"data\": {\n    \"0-0\": \"Description\",\n    \"0-1\": \"Get the details for the specified Klip.\",\n    \"1-0\": \"Resource URL\",\n    \"2-0\": \"Permissions\",\n    \"3-0\": \"Parameters\",\n    \"1-1\": \"https://app.klipfolio.com/api/1.0/klips/{id}\",\n    \"2-1\": \"dashboard.library\",\n    \"3-1\": \"full (true/false) — include associations (share_rights)\"\n  },\n  \"cols\": 2,\n  \"rows\": 4\n}\n[/block]\n##Example Request\n`GET https://app.klipfolio.com/api/1/klips/0123456789abcdef0123456789abcdef?full=true`\n\n##Example Response\n```\n{\n   \"data\": {\n       \"company\": \"Klipfolio\",\n       \"created_by\": \"12312312312312312312312312312312\",\n       \"date_created\": \"2014-07-07T14:08:51Z\",\n       \"description\": \"Table klip\",\n       \"id\": \"0123456789abcdef0123456789abcdef\",\n       \"last_updated\": \"2014-09-17T17:59:26Z\",\n       \"name\": \"Inventory\",\n       \"share_rights\": [\n         {\n           \"group_id\": \"5292aac2978f697f02f7ac4459e979fb\",\n           \"group_name\": \"Managers\",\n           \"can_edit\": false\n          },\n        ]\n   },\n   \"meta\": {\n       \"status\": 200,\n       \"success\": true\n   }\n}\n```\n[block:api-header]\n{\n  \"type\": \"get\",\n  \"title\": \"GET /klips/{id}/client-instances\"\n}\n[/block]\n\n[block:parameters]\n{\n  \"data\": {\n    \"0-0\": \"Description\",\n    \"1-0\": \"Resource URL\",\n    \"2-0\": \"Permissions\",\n    \"3-0\": \"Parameters\",\n    \"0-1\": \"Returns a list of Klip instances for a  specified Klip.\",\n    \"1-1\": \"https://app.klipfolio.com/api/1.0/klips/{id}/client-instances\",\n    \"2-1\": \"client.access\\ndashboard.library\",\n    \"3-1\": \"{id} is the public id of the klip\\n full=[true/false] (full=true returns klip public id, name and client name)\"\n  },\n  \"cols\": 2,\n  \"rows\": 4\n}\n[/block]\n##Example Request\n`GET https://app.klipfolio.com/api/1/klips/0123456789abcdef0123456789abcdef/client-instances`\n\n##Example Response\n```\nIf full is false or omitted\n{\n  \"meta\": {\n    \"success\": true,\n    \"status\": 200\n  },\n  \"data\": {\n    \"klips\": [\n      \"673e4f4a3cb3bc73fd5ca12d2bf4cd94\",\n      \"fd17f1255a1544ab97fd2d9841d03e15\"\n    ]\n  }\n}\n\nIf full=true\n{\n  \"meta\": {\n    \"success\": true,\n    \"status\": 200\n  },\n  \"data\": {\n    \"klips\": [\n      {\n        \"id\": \"673e4f4a3cb3bc73fd5ca12d2bf4cd94\",\n        \"name\": \"Sample Klip\",\n        \"client_name\": \"Sample Company\"\n      },\n      {\n        \"id\": \"fd17f1255a1544ab97fd2d9841d03e15\",\n        \"name\": \"Sample Klip\",\n        \"client_name\": \"Sample Company\"\n      }\n    ]\n  }\n}\n```\n[block:api-header]\n{\n  \"type\": \"post\",\n  \"title\": \"POST /klips\"\n}\n[/block]\n\n[block:parameters]\n{\n  \"data\": {\n    \"0-0\": \"Description\",\n    \"0-1\": \"Create a Klip; optionally include ‘client_id’ in the post data to create a Klip for a client. A schema may be specified by including ‘schema’ in the post data.  If no schema is specified, the new Klip will have a simple default schema, which may be updated using the /klips/{id}/schema resource.\",\n    \"1-1\": \"klip.build\",\n    \"2-1\": \"https://app.klipfolio.com/api/1.0/klips\",\n    \"3-1\": \"klip.build\",\n    \"1-0\": \"Permissions\",\n    \"2-0\": \"Resource URL\",\n    \"3-0\": \"Fields\"\n  },\n  \"cols\": 2,\n  \"rows\": 4\n}\n[/block]\n##Example Request\n```\nPOST https://app.klipfolio.com/api/1/klips -d \n“{\n 'name': 'Example', \n 'description': 'This is a new klip',\n ‘client_id’: ‘0123456789abcdef0123456789abcdef’\n}”\n```\n\n##Example Response\n```\n{\n   \"data\": {},\n   \"meta\": {\n       \"location\": \"/klips/ec6947ab9d07fdd6b9bb41551c79fd31\",\n       \"status\": 201,\n       \"success\": true\n   }\n}\n```\n[block:api-header]\n{\n  \"type\": \"put\",\n  \"title\": \"PUT /klips/{id}\"\n}\n[/block]\n\n[block:parameters]\n{\n  \"data\": {\n    \"0-0\": \"Description\",\n    \"0-1\": \"Update the specified klip details. To update the klip schema, use the /klips/{id}/schema resource.\",\n    \"1-0\": \"Permissions\",\n    \"2-0\": \"Resource URL\",\n    \"3-0\": \"Fields\",\n    \"1-1\": \"klip.edit\",\n    \"2-1\": \"https://app.klipfolio.com/api/1.0/klips/{id}\",\n    \"3-1\": \"name, description\"\n  },\n  \"cols\": 2,\n  \"rows\": 4\n}\n[/block]\n##Example Request \n```\nPUT https://app.klipfolio.com/api/1/klips/ec6947ab9d07fdd6b9bb41551c79fd31 -d \n“{\n 'name': 'Update', \n 'description': 'This is an updated klip',\n}”\n```\n##Example Response\n```\n{\n   \"data\": {},\n   \"meta\": {\n       \"status\": 200,\n       \"success\": true\n   }\n}\n```\n[block:api-header]\n{\n  \"type\": \"delete\",\n  \"title\": \"DELETE /klips/{id}\"\n}\n[/block]\n\n[block:parameters]\n{\n  \"data\": {\n    \"0-0\": \"Description\",\n    \"0-1\": \"Delete a specified Klip.\",\n    \"1-0\": \"Permissions\",\n    \"2-0\": \"Resource URL\",\n    \"3-0\": \"Fields\",\n    \"1-1\": \"klip.delete\",\n    \"2-1\": \"https://app.klipfolio.com/api/1.0/klips/{id}\",\n    \"3-1\": \"name, description\"\n  },\n  \"cols\": 2,\n  \"rows\": 4\n}\n[/block]\n##Example \n`DELETE https://app.klipfolio.com/api/1/klips/01dd23b45fc67fd0123d81d16a0123e8 -d `\n\n##Example Response\n```\n{\n   \"data\": {},\n   \"meta\": {\n       \"status\": 200,\n       \"success\": true\n   }\n}\n```","excerpt":"","slug":"klips","type":"basic","title":"Klips"}
[block:api-header] { "type": "get", "title": "GET /klips" } [/block] [block:parameters] { "data": { "0-0": "Description", "0-1": "Get a list of all the Klips the user can access.", "1-0": "Permissions", "2-0": "Resource URL", "3-0": "Parameters", "1-1": "dashboard.library", "2-1": "https://app.klipfolio.com/api/1.0/klips", "3-1": "client_id (string) — show only klips that belong to a specific client\ndatasource_id (string) — show only" }, "cols": 2, "rows": 4 } [/block] ##Example Request `GET https://app.klipfolio.com/api/1/klips?client_id=0123456789abcdef0123456789abcdef` ##Example Response ``` { "data": { "klips": [ { "description": "This is a sample klip", "id": "fedcba9876543210fedcba9876543210", "name": "sample klip" } ] }, "meta": { "status": 200, "success": true } } ``` [block:api-header] { "type": "get", "title": "GET /klips/{id}" } [/block] [block:parameters] { "data": { "0-0": "Description", "0-1": "Get the details for the specified Klip.", "1-0": "Resource URL", "2-0": "Permissions", "3-0": "Parameters", "1-1": "https://app.klipfolio.com/api/1.0/klips/{id}", "2-1": "dashboard.library", "3-1": "full (true/false) — include associations (share_rights)" }, "cols": 2, "rows": 4 } [/block] ##Example Request `GET https://app.klipfolio.com/api/1/klips/0123456789abcdef0123456789abcdef?full=true` ##Example Response ``` { "data": { "company": "Klipfolio", "created_by": "12312312312312312312312312312312", "date_created": "2014-07-07T14:08:51Z", "description": "Table klip", "id": "0123456789abcdef0123456789abcdef", "last_updated": "2014-09-17T17:59:26Z", "name": "Inventory", "share_rights": [ { "group_id": "5292aac2978f697f02f7ac4459e979fb", "group_name": "Managers", "can_edit": false }, ] }, "meta": { "status": 200, "success": true } } ``` [block:api-header] { "type": "get", "title": "GET /klips/{id}/client-instances" } [/block] [block:parameters] { "data": { "0-0": "Description", "1-0": "Resource URL", "2-0": "Permissions", "3-0": "Parameters", "0-1": "Returns a list of Klip instances for a specified Klip.", "1-1": "https://app.klipfolio.com/api/1.0/klips/{id}/client-instances", "2-1": "client.access\ndashboard.library", "3-1": "{id} is the public id of the klip\n full=[true/false] (full=true returns klip public id, name and client name)" }, "cols": 2, "rows": 4 } [/block] ##Example Request `GET https://app.klipfolio.com/api/1/klips/0123456789abcdef0123456789abcdef/client-instances` ##Example Response ``` If full is false or omitted { "meta": { "success": true, "status": 200 }, "data": { "klips": [ "673e4f4a3cb3bc73fd5ca12d2bf4cd94", "fd17f1255a1544ab97fd2d9841d03e15" ] } } If full=true { "meta": { "success": true, "status": 200 }, "data": { "klips": [ { "id": "673e4f4a3cb3bc73fd5ca12d2bf4cd94", "name": "Sample Klip", "client_name": "Sample Company" }, { "id": "fd17f1255a1544ab97fd2d9841d03e15", "name": "Sample Klip", "client_name": "Sample Company" } ] } } ``` [block:api-header] { "type": "post", "title": "POST /klips" } [/block] [block:parameters] { "data": { "0-0": "Description", "0-1": "Create a Klip; optionally include ‘client_id’ in the post data to create a Klip for a client. A schema may be specified by including ‘schema’ in the post data. If no schema is specified, the new Klip will have a simple default schema, which may be updated using the /klips/{id}/schema resource.", "1-1": "klip.build", "2-1": "https://app.klipfolio.com/api/1.0/klips", "3-1": "klip.build", "1-0": "Permissions", "2-0": "Resource URL", "3-0": "Fields" }, "cols": 2, "rows": 4 } [/block] ##Example Request ``` POST https://app.klipfolio.com/api/1/klips -d “{ 'name': 'Example', 'description': 'This is a new klip', ‘client_id’: ‘0123456789abcdef0123456789abcdef’ }” ``` ##Example Response ``` { "data": {}, "meta": { "location": "/klips/ec6947ab9d07fdd6b9bb41551c79fd31", "status": 201, "success": true } } ``` [block:api-header] { "type": "put", "title": "PUT /klips/{id}" } [/block] [block:parameters] { "data": { "0-0": "Description", "0-1": "Update the specified klip details. To update the klip schema, use the /klips/{id}/schema resource.", "1-0": "Permissions", "2-0": "Resource URL", "3-0": "Fields", "1-1": "klip.edit", "2-1": "https://app.klipfolio.com/api/1.0/klips/{id}", "3-1": "name, description" }, "cols": 2, "rows": 4 } [/block] ##Example Request ``` PUT https://app.klipfolio.com/api/1/klips/ec6947ab9d07fdd6b9bb41551c79fd31 -d “{ 'name': 'Update', 'description': 'This is an updated klip', }” ``` ##Example Response ``` { "data": {}, "meta": { "status": 200, "success": true } } ``` [block:api-header] { "type": "delete", "title": "DELETE /klips/{id}" } [/block] [block:parameters] { "data": { "0-0": "Description", "0-1": "Delete a specified Klip.", "1-0": "Permissions", "2-0": "Resource URL", "3-0": "Fields", "1-1": "klip.delete", "2-1": "https://app.klipfolio.com/api/1.0/klips/{id}", "3-1": "name, description" }, "cols": 2, "rows": 4 } [/block] ##Example `DELETE https://app.klipfolio.com/api/1/klips/01dd23b45fc67fd0123d81d16a0123e8 -d ` ##Example Response ``` { "data": {}, "meta": { "status": 200, "success": true } } ```