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.

Request endpoint

GET SERVER:PORT/api/alphabets/LOWER_LATIN/3

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

Request body

# intentionally blank

Response body

{
    "links": {
        "self": "/api/alphabets/LOWER_LATIN/3"
    },
    "data": {
        "attributes": {
            "ascii": true,
            "length": 26,
            "bytes": 26,
            "parity": 0,
            "digits": "3",
            "reachable": "17576",
            "available": "17576",
            "chars": "abcdefghijklmnopqrstuvwxyz"
        },
        "id": "LOWER_LATIN",
        "type": "alphabet"
    }
}

HTTPie example

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