Library Component Questions
Get all Component Questions
This endpoint retrieves a list of Component Questions.
GET /api/v2/library/componentquestions/
Query Parameters
The following parameters may be used to filter the Component Questions in the response.
Parameter | Description |
---|---|
component | Filter Component Questions by its Component ID. |
search | Filter Component Questions by performing a textual search on its ID, text or description. |
filtered_component_only | When set to true, the response will only include details of the filtered component in the components array. |
GET /api/v2/library/componentquestions/ HTTP/1.1
Accept: application/json
Authorization: Token "YOUR SDE ACCESS TOKEN"
HTTP/1.1 200 OK
Content-Type: application/json
{
"results": [
{
"id": "AQ1",
"text": "Select the Artificial Intelligence (AI) topics applicable to this component:",
"description": "",
"answers": [
{
"id": "AA1",
"text": "AI Governance",
"description": "",
"attribute": "AT420"
},
{
"id": "AA2",
"text": "LLMs",
"description": "",
"attribute": "AT151"
}
],
"created": "2024-09-18T17:20:29.207000-04:00",
"updated": "2024-11-13T09:33:32.907000-05:00",
"question_type": "MC",
"db_id": 20388
},
{
"id": "AQ10",
"text": "Select the application layer communication protocols/methods this component uses:",
"description": "",
"answers": [
{
"id": "AA26",
"text": "AMQP",
"description": "",
"attribute": "AT1432"
},
{
"id": "AA27",
"text": "FTP",
"description": "",
"attribute": "AT1421"
}
],
"created": "2024-09-18T17:21:02.821000-04:00",
"updated": "2024-09-24T12:06:03.752000-04:00",
"question_type": "MC",
"db_id": 20397
}
]
}
Include Parameters
See the Include Parameters section for more details.
Parameter | Description |
---|---|
components | Includes a list of components associated with each question. |
GET /api/v2/library/componentquestions/?component=SC24&include=components
Accept: application/json
Authorization: Token: "YOUR SDE ACCESS TOKEN"
HTTP/1.1 200 OK
Content-Type: application/json
{
"results": [
{
"id": "AQ1",
"text": "Does the application support offline functionalities?",
"description": "",
"answers": [
{
"id": 1,
"text": "Yes",
"description": "",
"attribute": "AT1"
}
],
"components": [
{
"id": "SC101",
"title": "Project Characteristics",
"parent_answer_id": null,
"parent_answer_question_id": null
},
{
"id": "SC24",
"title": "Component 1",
"parent_answer_id": "AA22",
"parent_answer_question_id": "AQ9"
}
],
"created": "2024-01-26T12:05:01.200989-05:00",
"updated": "2024-01-26T12:05:01.200797-05:00",
"question_type": "MC",
"db_id": 1
},
{
"id": "AQ2",
"text": "What encryption method is used to protect locally stored data?",
"description": "",
"answers": [
{
"id": 2,
"text": "AES",
"description": "",
"attribute": "AT2"
},
{
"id": 3,
"text": "MD5",
"description": "",
"attribute": "AT3"
},
{
"id": 4,
"text": "DES",
"description": "",
"attribute": "AT4"
},
{
"id": 5,
"text": "None",
"description": "",
"attribute": "AT5"
}
],
"components": [
{
"id": "SC101",
"title": "Project Characteristics",
"parent_answer_id": null,
"parent_answer_question_id": null
},
{
"id": "SC24",
"title": "Component 1",
"parent_answer_id": "AA22",
"parent_answer_question_id": "AQ9"
}
],
"created": "2024-01-26T12:07:53.253987-05:00",
"updated": "2024-01-26T12:07:53.253863-05:00",
"question_type": "MC",
"db_id": 2
}
]
}
GET /api/v2/library/componentquestions/?component=SC24&include=components&filtered_component_only=true
Accept: application/json
Authorization: Token: "YOUR SDE ACCESS TOKEN"
HTTP/1.1 200 OK
Content-Type: application/json
{
"results": [
{
"id": "AQ1",
"text": "Does the application support offline functionalities?",
"description": "",
"answers": [
{
"id": 1,
"text": "Yes",
"description": "",
"attribute": "AT1"
}
],
"components": [
{
"id": "SC24",
"title": "Component 1",
"parent_answer_id": null,
"parent_answer_question_id": null
}
],
"created": "2024-01-26T12:05:01.200989-05:00",
"updated": "2024-01-26T12:05:01.200797-05:00",
"question_type": "MC",
"db_id": 1
},
{
"id": "AQ2",
"text": "What encryption method is used to protect locally stored data?",
"description": "",
"answers": [
{
"id": 2,
"text": "AES",
"description": "",
"attribute": "AT2"
},
{
"id": 3,
"text": "MD5",
"description": "",
"attribute": "AT3"
},
{
"id": 4,
"text": "DES",
"description": "",
"attribute": "AT4"
},
{
"id": 5,
"text": "None",
"description": "",
"attribute": "AT5"
}
],
"components": [
{
"id": "SC24",
"title": "Component 1",
"parent_answer_id": "AA22",
"parent_answer_question_id": "AQ9"
}
],
"created": "2024-01-26T12:07:53.253987-05:00",
"updated": "2024-01-26T12:07:53.253863-05:00",
"question_type": "MC",
"db_id": 2
}
]
}
Get a specific Component Question
This endpoint retrieves a specific Component Question.
GET /api/v2/library/componentquestions/{component_question_id}/
URL Parameters
Parameter | Description |
---|---|
component_question_id | The id of the Component Question to retrieve. |
GET /api/v2/library/componentquestions/AQ1/ HTTP/1.1
Accept: application/json
Authorization: Token "YOUR SDE ACCESS TOKEN"
HTTP/1.1 200 OK
Content-Type: application/json
{
"id": "AQ1",
"text": "Select the Artificial Intelligence (AI) topics applicable to this component:",
"description": "",
"answers": [
{
"id": "AA1",
"text": "AI Governance",
"description": "",
"attribute": "AT420"
},
{
"id": "AA2",
"text": "LLMs",
"description": "",
"attribute": "AT151"
}
],
"components": [
{
"id": "SC101",
"title": "Project Characteristics",
"parent_answer_id": null,
"parent_answer_question_id": null
},
{
"id": "SC42",
"title": "Generic Component",
"parent_answer_id": null,
"parent_answer_question_id": null
}
],
"created": "2024-09-18T17:20:29.207000-04:00",
"updated": "2024-11-13T09:33:32.907000-05:00",
"question_type": "MC",
"db_id": 20388
}