API Document
Gets True Random Number in Base64.
Optional query param of size determines size of the random Number is not a length of the returned string.
Usage Sample
curl -X GET https://trnd.nict.go.jp/v1/base64?size=
Consumes
This API call consumes the following media types via the
Content-Type request header:
Query parameters
size (optional)
Query Parameter — Size of random number format: int32
Return type
Example data
Content-Type: application/json
{
"size" : "16",
"format" : "base64",
"body" : "/2BuBuLf3+WfSKyQbRcc/A=="
}
Produces
This API call produces the following media types according to the request header;
the media type will be conveyed by the
Content-Type response header.
Responses
200
Successful response
Random
XXX
unexpected error
Error
Gets True Random Number in Bytes.
Optional query param of size determines a length of the returned string.
Usage Sample
curl -X GET https://trnd.nict.go.jp/v1/bytes?size=
Consumes
This API call consumes the following media types via the
Content-Type request header:
Query parameters
size (optional)
Query Parameter — Size of random number format: int32
Return type
Example data
Content-Type: application/json
{
"size" : "16",
"format" : "bytes",
"body" : "\xD8\\\xE0\xF4\r\xB2\xFC*WM\xFF\x83\x18\xF45\xB6"
}
Produces
This API call produces the following media types according to the request header;
the media type will be conveyed by the
Content-Type response header.
Responses
200
Successful response
Random
XXX
unexpected error
Error
Gets True Random Number in Hex.
Optional query param of size determines size of the random Number is not a length of the returned string.
Usage Sample
curl -X GET https://trnd.nict.go.jp/v1/hex?size=
Consumes
This API call consumes the following media types via the
Content-Type request header:
Query parameters
size (optional)
Query Parameter — Size of random number format: int32
Return type
Example data
Content-Type: application/json
{
"size" : "16",
"format" : "hex",
"body" : "eb693ec8252cd630102fd0d0fb7c3485"
}
Produces
This API call produces the following media types according to the request header;
the media type will be conveyed by the
Content-Type response header.
Responses
200
Successful response
Random
XXX
unexpected error
Error
Gets True Random Number in Number.
If optional query param of size is given, it returns an integer: 0 <= Random Number <= size.
If size is not given or 0 is given, it returns a float: 0.0 <= Random Number < 1.0.
Usage Sample
curl -X GET https://trnd.nict.go.jp/v1/number?size=
Consumes
This API call consumes the following media types via the
Content-Type request header:
Query parameters
size (optional)
Query Parameter — Size of random number format: int32
Return type
Example data
Content-Type: application/json
{
"size" : "0",
"format" : "number",
"body" : "0.596506046187744"
}
Produces
This API call produces the following media types according to the request header;
the media type will be conveyed by the
Content-Type response header.
Responses
200
Successful response
Random
XXX
unexpected error
Error
Models
[ Jump to
Methods ]
body (optional)
String Returned True Random Number
format (optional)
String Format of the returned True Random Number
size (optional)
String Size of the returned True Random Number