Knowledge Base Answer

This document describes the API for reading Knowledge Base Answers.

Get a Knowledge Base Answer

Returns a single Knowledge Base Answer by ID

Securityheader_authorization
Request
path Parameters
id
required
string

Scope response to id

Responses
400

Bad Request

401

Unauthorized

403

Forbidden

404

Resource not found

default
get/knowledge_base_answers/{id}
Request samples
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();
Response samples
application/json
{
  • "data": {
    },
  • "includes": { }
}

Update a Knowledge Base Answer

Update a Knowledge Base Answer by ID

Securityheader_authorization
Request
path Parameters
id
required
string

Scope response to id

query Parameters
content
string

The content of the Knowledge Base Answer.

primary_answer
boolean

Flag to indicate if this is the primary answer.

type
string

The type of the Knowledge Base Answer.

Enum: "KnowledgeBaseAnswerFreeForm" "KnowledgeBaseAnswerYesOrNo" "KnowledgeBaseAnswerTrueOrFalse"
Responses
400

Bad Request

401

Unauthorized

403

Forbidden

default
put/knowledge_base_answers/{id}
Request samples
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();
Response samples
application/json
{
  • "data": {
    },
  • "includes": { }
}

Delete a Knowledge Base Answer

Delete a Knowledge Base Answer by ID

Securityheader_authorization
Request
path Parameters
id
required
string

Scope response to id

Responses
200

OK

400

Bad Request

401

Unauthorized

403

Forbidden

404

Resource not found

delete/knowledge_base_answers/{id}
Request samples
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 Knowledge Base Answer

Create a new Knowledge Base Answer

Securityheader_authorization
Request
query Parameters
content
required
string

The content of the Knowledge Base Answer.

knowledge_base_question_id
required
string <uuid>

The ID of the associated Knowledge Base Question.

primary_answer
boolean

Flag to indicate if this is the primary answer.

type
required
string

The type of the Knowledge Base Answer.

Enum: "KnowledgeBaseAnswerFreeForm" "KnowledgeBaseAnswerYesOrNo" "KnowledgeBaseAnswerTrueOrFalse"
Responses
400

Bad Request

401

Unauthorized

403

Forbidden

default
post/knowledge_base_answers
Request samples
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();
Response samples
application/json
{
  • "data": {
    },
  • "includes": { }
}