Delete complete tokens

After receiving and saving all streamed data of the complete number of tokens that was formerly generated with a preset alphabet for a number of digits, the production line has been completely emptied, has served its purpose 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:52:42 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": 7600,
            "reachable": "0",
            "alphabet": "DICE",
            "available": "0",
            "partial": false,
            "checksum": "0000000000000000000000000000000000000000000000000000000000000000000000",
            "status": "deleted",
            "filesizes": {
                "data": 124415
            },
            "digits": "5",
            "size": "7776",
            "timestamps": {
                "ended": "2024-03-19T12:52:41.559Z",
                "deleted": "2024-03-19T12:52:42.443Z",
                "started": "2024-03-19T12:52:36.005Z",
                "requested": "2024-03-19T12:52:29.436Z",
                "finished": "2024-03-19T12:52:41.621Z"
            }
        },
        "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