- Paligo API
- document
- Create document
document
Create document
const inputBody = '{"parent": 34,"name": "My topic","custom_attributes": [{"name": "My custom attribute name","value": "My attribute value"}],"content": "<?xml>...","subtype": "component"}';const headers = {'Content-Type':'application/json','Accept':'application/json'};fetch('https://{instance}.paligoapp.com/api/v2/documents/',{method: 'POST',body: inputBody,headers: headers}).then(function(res) {return res.json();}).then(function(body) {console.log(body);});
Body parameter
{"parent": 34,"name": "My topic","custom_attributes": [{"name": "My custom attribute name","value": "My attribute value"}],"content": "<?xml>...","subtype": "component"}
Responses
{"id": 123,"name": "My topic","uuid": "UUID-1234-5678","type": "document","creator": "2","owner": "2","author": "2","created_at": 1603622378,"modified_at": 1603622378,"checkout": "false","checkout_user": "2","parent_resource": 456,"taxonomies": [{"id": 603,"title": "My taxonomy","color": 3}],"content": "<?xml>...","languages": ["en","jp","sv"],"custom_attributes": [{"name": "My custom attribute name","value": "My attribute value"}]}