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.
POST /requirements/
Section titled “POST /requirements/”Uue nõu loomine.
| Väli | Tüüp | Kohustuslik | Kirjeldus |
|---|---|---|---|
title | string | Jah | Nõude pealkiri. |
regulation_id | UUID | Jah | Raamistiku ID, kuhu nõue kuulub. |
description | string | Ei | HTML-vormingus kirjeldus. |
chapter_name | string | Ei | Peatüki/sektsiooni nimi. |
chapter_number | string | Ei | Peatüki/sektsiooni number. |
paragraph_number | string | Ei | Lõigu number peatükis. |
meaning | string | Ei | Selgitus nõude tähenduse kohta. |
label_ids | massiiv | Ei | Massiiv siltide UUID-dest. |
is_applicable | boolean | Ei | Kas nõue on kohalduv. Vaikimisi true. |
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" }}GET /requirements/:id
Section titled “GET /requirements/:id”Nõude pärimine ID järgi.
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": [ {