Library Countermeasure Amendments Order

Update Library Countermeasure Amendments Order

This endpoint updates the order of Library Countermeasure Amendment resources for a Library Countermeasure. The Library Countermeasure is identified by the task_id parameter.

Parameter Description
task_id The id of the Library Countermeasure the Library Countermeasure Amendments to order belong to.

PATCH /api/v2/library/tasks/{task_id}/amendments/order/

Fields Required Description
order Yes The list of ordered Library Countermeasure Amendment ids. All Library Countermeasure Amendments that exist on the Library Countermeasure must be included in the list. The solution placeholder value "SP" must also be included where the solution placeholder should be in the new order.
PATCH /api/v2/library/tasks/T1/amendments/order/ HTTP/1.1
Accept: application/json
Authorization: Token "YOUR SDE ACCESS TOKEN"

{
    "order": ["TA1", "TA2", "SP", "TA3"]
}
HTTP/1.1 200 OK
Content-Type: application/json

{
    "results": [
        {
            "db_id": 1,
            "id": "TA1",
            "title": "Amendment 1",
            "text": "Amendment 1 Description",
            "type": "Built-in",
            "ordinal": -2,
            "last_updated_date": "2024-07-15T15:03:57.390732-04:00",
            "last_updated_by": {
                "id": 1,
                "email": "admin@example.com",
                "first_name": "Admin",
                "last_name": "Testerton"
            },
            "created_date_time": "2024-07-15T15:01:20.187242-04:00",
            "created_by": {
                "id": 1,
                "email": "admin@example.com",
                "first_name": "Admin",
                "last_name": "Testerton"
            },
            "active": true,
            "match_conditions": [
                {
                    "db_id": 1,
                    "id": "MC1",
                    "required": [
                        "A6"
                    ],
                    "excluded": []
                }
            ]
        },
        {
            "db_id": 2,
            "id": "TA2",
            "title": "Amendment 2",
            "text": "Amendment 2 Description",
            "type": "Built-in",
            "ordinal": -1,
            "last_updated_date": "2024-07-15T15:03:57.390732-04:00",
            "last_updated_by": {
                "id": 1,
                "email": "admin@example.com",
                "first_name": "Admin",
                "last_name": "Testerton"
            },
            "created_date_time": "2024-07-15T15:02:02.293204-04:00",
            "created_by": {
                "id": 1,
                "email": "admin@example.com",
                "first_name": "Admin",
                "last_name": "Testerton"
            },
            "active": true,
            "match_conditions": [
                {
                    "db_id": 2,
                    "id": "MC2",
                    "required": [
                        "A2"
                    ],
                    "excluded": []
                }
            ]
        },
        {
            "db_id": 3,
            "id": "TA3",
            "title": "Amendment 3",
            "text": "Amendment 3 Description",
            "type": "Built-in",
            "ordinal": 1,
            "last_updated_date": "2024-07-15T15:03:57.390732-04:00",
            "last_updated_by": {
                "id": 1,
                "email": "admin@example.com",
                "first_name": "Admin",
                "last_name": "Testerton"
            },
            "created_date_time": "2024-07-15T15:02:28.899188-04:00",
            "created_by": {
                "id": 1,
                "email": "admin@example.com",
                "first_name": "Admin",
                "last_name": "Testerton"
            },
            "active": true,
            "match_conditions": [
                {
                    "db_id": 3,
                    "id": "MC3",
                    "required": [
                        "A8"
                    ],
                    "excluded": []
                }
            ]
        }
    ]
}

results matching ""

    No results matching ""