Delete 2nd tokens part

After receiving and saving all streamed data of the 2nd tokens part that was formerly generated with a preset alphabet for a number of digits, the production line has been completely emptied, has served its purpose for the 2nd tokens part too and MUST be dismantled. To do this, the identifier of the tokens object MUST be sent as HTTP request path parameter.

The identifier of the deleted tokens object is returned from the remote service as data id together with the data type: tokens together with other attribute–value pairs in the JSON response body.

Request endpoint

DELETE SERVER:PORT/api/tokens/XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX

Response status

200

Request headers

Accept:application/vnd.api+json
Content-Type:application/vnd.api+json
Session-Key:SSSSSSSS-SSSS-SSSS-SSSS-SSSSSSSSSSSS

Response headers

Transfer-Encoding:chunked
Connection:keep-alive
Accept:application/vnd.api+json
Cache-Control:no-cache
Date:Tue, 19 Mar 2024 12:53:15 GMT
Content-Type:application/vnd.api+json
Server:nginx/1.25.4

Request body

# intentionally blank

Response body

{
    "links": {
        "self": "/api/tokens/XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX"
    },
    "data": {
        "attributes": {
            "analysis": "none",
            "rate": 3651,
            "reachable": "0",
            "alphabet": "LOWER_LATIN",
            "available": "0",
            "partial": false,
            "checksum": "000000000000000000000",
            "status": "deleted",
            "filesizes": {
                "data": 35151
            },
            "digits": "3",
            "filehashes": {
                "data": "f6b7af3fc7ce1a1dd7d0a327e1c87d7a51533cd1da2ec973a6283deadd695697"
            },
            "size": "8788",
            "timestamps": {
                "ended": "2024-03-19T12:53:15.357Z",
                "deleted": "2024-03-19T12:53:15.703Z",
                "started": "2024-03-19T12:53:08.131Z",
                "requested": "2024-03-19T12:53:07.954Z",
                "finished": "2024-03-19T12:53:15.358Z"
            }
        },
        "id": "XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX",
        "type": "tokens",
        "relationships": {
            "payment": {
                "data": {
                    "id": "XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX",
                    "ident": "pi_XXXXXXXXXXXXXXXXXXXXXXXX",
                    "type": "transaction"
                }
            }
        }
    }
}

HTTPie example

$ http delete SERVER:PORT/api/tokens/XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX Accept:application/vnd.api+json Content-Type:application/vnd.api+json Session-Key:SSSSSSSS-SSSS-SSSS-SSSS-SSSSSSSSSSSS