Post custom alphabet
In order to add a custom alphabet that can later be found by an identifier and contains a given character set, all of these values MUST be sent as data attributes together with the data type: alphabet in the JSON request body.
The added alphabet is returned from the remote service in the JSON response body together with other attribute–value pairs and can now be found by data id, as described in the next step.
Request endpoint
POST SERVER:PORT/api/alphabets
Response status
201
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:57:19 GMT
Content-Type:application/vnd.api+json
Server:nginx/1.25.4
Request body
{
"data": {
"attributes": {
"chars": "AEIOU"
},
"id": "UPPER_VOWELS",
"type": "alphabet"
}
}
Response body
{
"links": {
"self": "/api/alphabets"
},
"data": {
"attributes": {
"ascii": true,
"length": 5,
"bytes": 5,
"parity": 87,
"chars": "AEIOU"
},
"id": "UPPER_VOWELS",
"type": "alphabet"
}
}
HTTPie example
$ http post SERVER:PORT/api/alphabets Accept:application/vnd.api+json Content-Type:application/vnd.api+json Session-Key:SSSSSSSS-SSSS-SSSS-SSSS-SSSSSSSSSSSS << JSON
{
"data": {
"attributes": {
"chars": "AEIOU"
},
"id": "UPPER_VOWELS",
"type": "alphabet"
}
}
JSON