Library Countermeasure How-to

Get All Library Countermeasure How-tos

This endpoint retrieves a list of Library Countermeasure How-to resources for a specific Library Countermeasure.

GET /api/v2/library/tasks/{task_id}/implementations/

URL Parameters

Parameter Description
task_id The id of the Library Countermeasure the Library Countermeasure How-tos to list belong to.

Query Parameters

Parameter Description
active The active status of the Library Countermeasure How-to. Can be either true or false.
show_original Whether to return the original content for Built-in Modified Library Countermeasure How-tos (default is false).
GET /api/v2/library/tasks/T1/implementations/ HTTP/1.1
Accept: application/json
Authorization: Token "YOUR SDE ACCESS TOKEN"
HTTP/1.1 200 OK
Content-Type: application/json
{
    "results": [
        {
          "db_id": 1413,
          "id": "I1413",
          "type": "Built-in",
          "last_updated_date": "2021-03-10T04:03:10.363000-05:00",
          "last_updated_by": {
              "id": 4,
              "email": "no-reply+content_admin@localhost",
              "first_name": "SD",
              "last_name": "Elements"
          },
          "created_date_time": "2020-04-30T08:43:02.699000-04:00",
          "created_by": {
              "id": 4,
              "email": "no-reply+content_admin@localhost",
              "first_name": "SD",
              "last_name": "Elements"
          },
          "title": "Biometric authentication (Flutter)",
          "text": "# Description\nThe following Flutter plugin provides biometric authentication...",
          "active": true
        }
    ]
}

Include Parameters

See the Include Parameters section for more details.

Parameter Description
match_conditions Includes a list of match conditions attached to each Library Countermeasure How-to.
GET /api/v2/library/tasks/T1/implementations/?include=match_conditions HTTP/1.1
Accept: application/json
Authorization: Token "YOUR SDE ACCESS TOKEN"
HTTP/1.1 200 OK
Content-Type: application/json

{
  "results": [
    {
      "db_id": 1413,
      "id": "I1413",
      "type": "Built-in",
      "last_updated_date": "2021-03-10T04:03:10.363000-05:00",
      "last_updated_by": {
        "id": 4,
        "email": "no-reply+content_admin@localhost",
        "first_name": "SD",
        "last_name": "Elements"
      },
      "created_date_time": "2020-04-30T08:43:02.699000-04:00",
      "created_by": {
        "id": 4,
        "email": "no-reply+content_admin@localhost",
        "first_name": "SD",
        "last_name": "Elements"
      },
      "title": "Biometric authentication (Flutter)",
      "text": "# Description\nThe following Flutter plugin provides biometric authentication...",
      "active": true,
      "match_conditions": [
        {
          "db_id": 8812,
          "id": "MC8811",
          "required": [
              "A1281"
          ],
          "excluded": []
        }
      ]
    }
  ]
}

Get a Library Countermeasure How-to

This endpoint retrieves a single Library Countermeasure How-to resource.

GET /api/v2/library/tasks/{task_id}/implementations/{implementation_id}/

URL Parameters

Parameter Description
task_id The id of the library countermeasure the new Library Countermeasure How-to belongs to.
implementation_id The id of the Library Countermeasure How-to to retrieve.

Query Parameters

Parameter Description
show_original Whether to return the original content for a Built-in Modified Library Countermeasure How-to (default is false).

All of the include parameters for the 'Get All Library Countermeasure How-tos' endpoint apply here as well.

GET /api/v2/library/tasks/T1/implementations/I1413/ HTTP/1.1
Accept: application/json
Authorization: Token "YOUR SDE ACCESS TOKEN"
HTTP/1.1 200 OK
Content-Type: application/json

{
    "db_id": 1413,
    "id": "I1413",
    "type": "Built-in",
    "last_updated_date": "2021-03-10T04:03:10.363000-05:00",
    "last_updated_by": {
        "id": 4,
        "email": "no-reply+content_admin@localhost",
        "first_name": "SD",
        "last_name": "Elements"
    },
    "created_date_time": "2020-04-30T08:43:02.699000-04:00",
    "created_by": {
        "id": 4,
        "email": "no-reply+content_admin@localhost",
        "first_name": "SD",
        "last_name": "Elements"
    },
    "title": "Biometric authentication (Flutter)",
    "text": "# Description\nThe following Flutter plugin provides biometric authentication...",
    "active": true
}

Create a Library Countermeasure How-to

This endpoint creates a new Library Countermeasure How-to resource.

POST /api/v2/library/tasks/{task_id}/implementations/

URL Parameters

Parameter Description
task_id The id of the Library Countermeasure the new Library Countermeasure How-to will belong to.

Payload

Fields Required Description
title Yes The title of the Library Countermeasure How-to.
text Yes The description text of the Library Countermeasure How-to.
match_conditions No A list of dictionaries representing the set of match conditions belonging to this Library Countermeasure How-to. Each dictionary has required and excluded fields which are arrays of answer IDs. When an answer is in the required array, this Library Countermeasure How-to will be included in project countermeasures that include the answer. When an answer is in the excluded array, this Library Countermeasure How-to will not be included in project countermeasures that include this answer.
active No The active status of the Library Countermeasure How-to (defaults to true).
POST /api/v2/library/tasks/T1/implementations/ HTTP/1.1
Accept: application/json
Authorization: Token "YOUR SDE ACCESS TOKEN"
{
    "title": "A New Countermeasure How-to",
    "text": "Countermeasure How-to Description",
    "match_conditions": [
        {
            "required": ["A6"],
            "excluded": []
        }
    ],
    "active": true
}
HTTP/1.1 200 OK
Content-Type: application/json
{
    "db_id": -1,
    "id": "CI1",
    "type": "Custom",
    "last_updated_date": "2025-06-02T15:40:38.329151-04:00",
    "last_updated_by": {
        "id": 1,
        "email": "admin@example.com",
        "first_name": "Admin",
        "last_name": "Testerton"
    },
    "created_date_time": "2025-06-02T15:40:38.329120-04:00",
    "created_by": {
        "id": 1,
        "email": "admin@example.com",
        "first_name": "Admin",
        "last_name": "Testerton"
    },
    "title": "A New Countermeasure How-to",
    "text": "Countermeasure How-to Description",
    "active": true,
    "match_conditions": [
        {
            "db_id": -8,
            "id": "CMC8",
            "required": [
                "A6"
            ],
            "excluded": []
        }
    ]
}

Update a Library Countermeasure How-to

This endpoint updates a specific Library Countermeasure How-to resource, as specified by the id parameter.

PATCH /api/v2/library/tasks/{task_id}/implementations/{implementation_id}/

URL Parameters

Parameter Description
task_id The id of the Library Countermeasure the Library Countermeasure How-to belongs to.
implementation_id The id of the Library Countermeasure How-to to update.

Payload

Fields Required Description
title No The title of the Library Countermeasure How-to.
text No The description text of the Library Countermeasure How-to.
match_conditions No A list of dictionaries representing the set of match conditions belonging to this Library Countermeasure How-to. Each dictionary has required and excluded fields which are arrays of answer IDs. When an answer is in the required array, this Countermeasure How-to will be included in project countermeasures that include the answer. When an answer is in the excluded array, this Countermeasure How-to will not be included in project countermeasures that include this answer.
active No Library Countermeasure How-tos can be activated or deactivated.
PATCH /api/v2/library/tasks/T1/implementations/I1413/ HTTP/1.1
Accept: application/json
Authorization: Token "YOUR SDE ACCESS TOKEN"

{
    "title": "Updated Countermeasure How-to",
    "text": "Updated Countermeasure How-to Description",
    "match_conditions": [
        {
            "required": ["A2"],
            "excluded": []
        }
    ],
    "active": false
}
HTTP/1.1 200 OK
Content-Type: application/json

{
    "db_id": 1413,
    "id": "I1413",
    "type": "Built-in Modified",
    "last_updated_date": "2025-06-02T15:44:27.877026-04:00",
    "last_updated_by": {
        "id": 1,
        "email": "admin@example.com",
        "first_name": "Admin",
        "last_name": "Testerton"
    },
    "created_date_time": "2020-04-30T08:43:02.699000-04:00",
    "created_by": {
        "id": 4,
        "email": "no-reply+content_admin@localhost",
        "first_name": "SD",
        "last_name": "Elements"
    },
    "title": "Updated Countermeasure How-to",
    "text": "Updated Countermeasure How-to Description",
    "active": false,
    "match_conditions": [
        {
            "db_id": -9,
            "id": "CMC9",
            "required": [
                "A2"
            ],
            "excluded": []
        }
    ]
}

Delete a Library Countermeasure How-to

This endpoint deletes a specific Library Countermeasure How-to resource, as specified by the id parameter.

DELETE /api/v2/library/tasks/{task_id}/implementations/{implementation_id}/

URL Parameters

Parameter Description
task_id The id of the Library Countermeasure the Library Countermeasure How-to belongs to.
implementation_id The id of the Library Countermeasure How-to to delete.
DELETE /api/v2/library/tasks/T1/implementations/CI1/ HTTP/1.1
Accept: application/json
Authorization: Token "YOUR SDE ACCESS TOKEN"
HTTP/1.1 204 NO CONTENT
Content-Type: application/json
{}

results matching ""

    No results matching ""