Accelerate the Value of Data

Next Reserved Value

Returns the value that is generated by the generator when the next ID value is requested by the Create/Update entity process.

Overview

This operation returns the ID that would be returned when a new ID is requested from the generator. The purpose of this API is to let you query the next ID generated. The response contains the value of {generator_name} of what is going to be generated next (in a common case).

Attention: The request supports only the SEQUENTIAL type of generator. An exception is thrown if the request body has the generator type that is anything other than SEQUENTIAL

Request

GET https://{serverURL}/generators/{generator_name}/nextReservedValue
Table 1. Parameters
ParametersNameRequiredDescription
Headers

Authorization

Yes

Information about authentication access token in format Bearer accessToken (see details in Authentication API ).

Content-Type

Yes

Should be Content-Type:application/json.

Response

DECIMAL: 10
                                    HEX: A
                                    UUID: 33fefdbf-4b79-44b2-a39a-59600755eefa

Examples

  1. Create a generator such as the following:
    [
                                          {
                                            "name": "DemoNextReservedValue",
                                            "type": "SEQUENTIAL",
                                            "valueType": "DECIMAL",
                                            "rangeStart": "3",
                                            "step": "10"
                                          }
                                        ]
    Important: The sequence generator generates unique IDs across our distributed architecture based on the specified alphanumeric characters. Individual IDs may not necessarily be generated in a series.
  2. Execute the Rest API:
    GET https://{serverURL}/generators/DemoNextReservedValue/nextReservedValue
    • The response is 3.
    • No values have been generated, and the next generated value will be equal to the value of "rangeStart”.
  3. Execute the Rest API (or create an entity with the generated ID value):
    GET https://{serverURL}/generators/DemoNextReservedValue/generate
    Note: The response is 3 because a new value is generated.
  4. Execute the Rest API:
    GET https://{serverURL}/generators/DemoNextReservedValue/nextReservedValue

    The response is 13 (13 = previous "3" + "step": "10").