Skip to content

Nõuete API

Nõuded on spetsiifilised vastavuskohustused raamistikus (regulatsioonis). Iga nõue kuulub ühte raamistikku ja seda saab siduda meetmetega, mis seda täidavad.

Uue nõu loomine.

VäliTüüpKohustuslikKirjeldus
titlestringJahNõude pealkiri.
regulation_idUUIDJahRaamistiku ID, kuhu nõue kuulub.
descriptionstringEiHTML-vormingus kirjeldus.
chapter_namestringEiPeatüki/sektsiooni nimi.
chapter_numberstringEiPeatüki/sektsiooni number.
paragraph_numberstringEiLõigu number peatükis.
meaningstringEiSelgitus nõude tähenduse kohta.
label_idsmassiivEiMassiiv siltide UUID-dest.
is_applicablebooleanEiKas nõue on kohalduv. Vaikimisi true.
Terminal window
curl --location 'https://SINU_KORDONI_DOMEEN/api/v1/requirements/' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer SINU_VÕTI' \
--data '{
"requirement": {
"title": "Information Security Policy",
"regulation_id": "b698a0ed-ad82-4468-900e-3b6eb3f5eb9b",
"description": "<p>The organization shall define and communicate an information security policy.</p>",
"chapter_name": "Organizational Controls",
"chapter_number": "5",
"paragraph_number": "5.1",
"meaning": "A documented policy must exist and be communicated to all employees.",
"is_applicable": true
}
}'

Vastuse näide:

Staatus 200

{
"data": {
"id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"title": "Information Security Policy",
"description": "<p>The organization shall define and communicate an information security policy.</p>",
"chapter_name": "Organizational Controls",
"chapter_number": "5",
"paragraph_number": "5.1",
"meaning": "A documented policy must exist and be communicated to all employees.",
"is_applicable": true,
"labels": [],
"regulations": [
{
"id": "b698a0ed-ad82-4468-900e-3b6eb3f5eb9b",
"title": "ISO 27001:2022"
}
],
"controls": [],
"created_at": "2024-08-28T14:27:26+00:00",
"updated_at": "2024-08-28T14:27:26+00:00"
}
}

Nõude pärimine ID järgi.

Terminal window
curl --location --request GET 'https://SINU_KORDONI_DOMEEN/api/v1/requirements/a1b2c3d4-e5f6-7890-abcd-ef1234567890' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer SINU_VÕTI'

Vastuse näide:

Staatus 200

{
"data": {
"id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"title": "Information Security Policy",
"description": "<p>The organization shall define and communicate an information security policy.</p>",
"chapter_name": "Organizational Controls",
"chapter_number": "5",
"paragraph_number": "5.1",
"meaning": "A documented policy must exist and be communicated to all employees.",
"is_applicable": true,
"labels": [],
"regulations": [
{