Accelerate the Value of Data

Record ID Generators API

Work with auto-generated IDs.

Use the ID Generators API to work with auto-generated IDs:

All requests to this API require the URL of the server as shown in the following example:

POST{serverURL}/generators
Important: You must have ROLE_ADMIN to complete the POST{serverURL}/generators request. Open a support ticket if you do not have this credential.

Generator Parameters

Example

{
    "name": "Generator_NAME",
    "type": "SEQUENTIAL",
    "valueType" : "HEX",
    "rangeStart" : "0"
    "step": "1"
}
Table 1. Headers
NameRequiredDescription
AuthorizationYesBearer <access_token>
Content-TypeYesapplication/json
Table 2. Auto-generated ID Parameters
ParameterRequiredDefault ValueDescription
nameyesName of the generator. It should be unique across the environment.
typeyes
  • UUID: generator returns UUID-generated values.
  • SEQUENTIAL: generator returns sequential values; increases by "step" parameter.
    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.
SEQUENTIAL generators have boundaries:
  • Upper boundary: 4.500.000.000.000.000.000
  • Lower boundary: -4.500.000.000.000.000.000
valueTypenoDECIMAL
  • DECIMAL: generate values in decimal format; for example, 10.
  • HEX: generate value in hexadecimal upper-case format; for example, "AACC1".
rangestartno"0"The starting value in the sequence. Can be applied only to SEQUENTIAL generators.

If valueType is HEX, then this value must be in HEX format; for example, "A", which is 10 in decimal format.

stepnoThe increment. If omitted, the default is 1. Can be applied only to SEQUENTIAL generators.
rangeEndno9,223372037E18The ending value in the sequence. Can be applied only to SEQUENTIAL generators.

If valueType is HEX, then this value must be in HEX format; for example, "A", which is 10 in decimal format

  • If the generated value exceeds rangeEnd and overflowConfig is not present, then a range bound violation error message is triggered.
  • If the generated value exceeds rangeEnd and overflowConfig is present, then it is handled according to the overflowConfig strategy.
fixedLengthno

Sets the fixed length for values by adding zeros before number. Can be applied only to SEQUENTIAL generators; for example:

  • if fixedLength = 4; valueType = DECIMAL; rangeStart = "1", then values are: 0001, 0002, 0003 ... 0010, etc.
  • if fixedLength = 4; valueType = HEX; rangeStart = "1", then values are: 0001, 0002, 0003 ... 000A, etc.

If a generated value length exceeds the fixedLength, then it throws a GENERATOR_FIXED_LENGTH_EXCEEDED exception.

uuidversionyes, if type is UUIDThe version of UUIDs. Should be four (random UUIDs). Can be applied only to UUID generators.
overflowRangeStartnoThe starting value for overflow range sequence. Used only if rangeEnd is present. Can be applied only to SEQUENTIAL generators.

Example:

...
        "rangeStart" : "10000",
        "step" : "2",
        "rangeEnd": "10010",
        "overflowConfig": {
            "overflowRangeStart": 10000000
        }
...
The auto-generated sequence is:
  • 10000
  • 10002
  • 10004
  • 10006
  • 10008
  • 10000000
  • 10000002
  • 10000004
  • 10000006
  • 10000008