Returns a single Knowledge Base Answer by ID
Bad Request
Unauthorized
Forbidden
Resource not found
import fetch from 'node-fetch'; async function run() { const id = 'YOUR_id_PARAMETER'; const resp = await fetch( `https://api.secureframe.com/knowledge_base_answers/${id}`, { method: 'GET', headers: { Authorization: 'YOUR_API_KEY_HERE' } } ); const data = await resp.text(); console.log(data); } run();
{- "data": {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "type": "string",
- "attributes": {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "content": "string",
- "created_at": "2019-08-24T14:15:22Z",
- "primary_answer": true,
- "type": "KnowledgeBaseAnswerFreeForm",
- "updated_at": "2019-08-24T14:15:22Z"
}, - "relationships": { },
- "links": { }
}, - "includes": { }
}
Update a Knowledge Base Answer by ID
Bad Request
Unauthorized
Forbidden
import fetch from 'node-fetch'; async function run() { const id = 'YOUR_id_PARAMETER'; const resp = await fetch( `https://api.secureframe.com/knowledge_base_answers/${id}`, { method: 'PUT', headers: { Authorization: 'YOUR_API_KEY_HERE' } } ); const data = await resp.text(); console.log(data); } run();
{- "data": {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "type": "string",
- "attributes": {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "content": "string",
- "created_at": "2019-08-24T14:15:22Z",
- "primary_answer": true,
- "type": "KnowledgeBaseAnswerFreeForm",
- "updated_at": "2019-08-24T14:15:22Z"
}, - "relationships": { },
- "links": { }
}, - "includes": { }
}
Delete a Knowledge Base Answer by ID
OK
Bad Request
Unauthorized
Forbidden
Resource not found
import fetch from 'node-fetch'; async function run() { const id = 'YOUR_id_PARAMETER'; const resp = await fetch( `https://api.secureframe.com/knowledge_base_answers/${id}`, { method: 'DELETE', headers: { Authorization: 'YOUR_API_KEY_HERE' } } ); const data = await resp.text(); console.log(data); } run();
Create a new Knowledge Base Answer
Bad Request
Unauthorized
Forbidden
import fetch from 'node-fetch'; async function run() { const query = new URLSearchParams({ content: 'string', knowledge_base_question_id: '497f6eca-6276-4993-bfeb-53cbbbba6f08', type: 'KnowledgeBaseAnswerFreeForm' }).toString(); const resp = await fetch( `https://api.secureframe.com/knowledge_base_answers?${query}`, { method: 'POST', headers: { Authorization: 'YOUR_API_KEY_HERE' } } ); const data = await resp.text(); console.log(data); } run();
{- "data": {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "type": "string",
- "attributes": {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "content": "string",
- "created_at": "2019-08-24T14:15:22Z",
- "primary_answer": true,
- "type": "KnowledgeBaseAnswerFreeForm",
- "updated_at": "2019-08-24T14:15:22Z"
}, - "relationships": { },
- "links": { }
}, - "includes": { }
}