Creating a Random Number

Function

This API generates a 512-bit random number.

URI

Requests

Table 2 Request header parameters

Parameter

Mandatory

Type

Description

X-Auth-Token

Yes

String

User token.

It can be obtained by calling the IAM API (value of X-Subject-Token in the response header).

Content-Type

Yes

String

application/json

Table 3 Request parameters

Parameter

Mandatory

Type

Description

random_data_length

Yes

String

Number of bits of a random number. The value is 512.

sequence

No

String

36-byte serial number of a request message

Example: 919c82d4-8046-4722-9094-35c3c6524cff

Responses

Table 4 Response parameters

Parameter

Mandatory

Type

Description

random_data

Yes

String

Random numbers are expressed in hexadecimal format. Two characters indicate one byte. Length of a random number must be consistent with the random_data_length value entered by a user.

Examples

The following example describes how to create a random number with the length of 512 bits.

Status Codes

Table 5 lists the normal status code returned by the response.
Table 5 Status codes

Status Code

Status

Description

200

OK

Request processed successfully.

Exception status code. For details, see Status Codes.