Get available capacity

In order to get the character set of a preset alphabet known by name, and also receive the number of tokens that can be generated with it, the name of the alphabet MUST be sent as the first HTTP request path parameter together with the number of digits of the tokens as the second HTTP request path parameter.

The character set of the preset alphabet and the number of available tokens are returned from the remote service in the JSON response body as data attributes chars resp. data attributes available together with other attribute–value pairs.

Maximum integer value

If an integer value (e.g. the data attributes available) exceeds the maximum of UInt64 = 2⁶⁴ - 1 = 18,446,744,073,709,551,615 then the value is shown as string in the JSON response body.

Request endpoint

GET SERVER:PORT/api/alphabets/UPPER_EPCG30/20

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:16 GMT
Content-Type:application/vnd.api+json
Server:nginx/1.25.4

Request body

# intentionally blank

Response body

{
    "links": {
        "self": "/api/alphabets/UPPER_EPCG30/20"
    },
    "data": {
        "attributes": {
            "ascii": true,
            "length": 30,
            "bytes": 30,
            "parity": 0,
            "digits": "20",
            "reachable": "52428",
            "available": "348678440100000000000000000000",
            "chars": "0123456789ABCDEFGHKMNPRSTVWXYZ"
        },
        "id": "UPPER_EPCG30",
        "type": "alphabet"
    }
}

HTTPie example

$ http get SERVER:PORT/api/alphabets/UPPER_EPCG30/20 Accept:application/vnd.api+json Content-Type:application/vnd.api+json Session-Key:SSSSSSSS-SSSS-SSSS-SSSS-SSSSSSSSSSSS