Sequence
Sequences are used for generating ID, Name, Barcode and DisplayID. See how on the query page.
Get sequences
Section titled “Get sequences”GET /api/sequence
Response
A list of sequences:
[...{ "id": string, "prefix": string, "minDigits": number, "nextValue": number, "type": string, "pattern": string}...]Where:
idThis is what is referenced using the !-notation. Must be unique.prefixShort prefix.minDigitsMinimum number of digits.nextValueThe next used number.typeOptional type.patternReadable example pattern.
Add or update sequence
Section titled “Add or update sequence”POST /api/sequence
Scope: ADMIN
Add or update sequence.
Request
Body
A JSON object with the structure as described above (except pattern).
Examples
A unique sequence for a project.
{ "id": "PRJ0001-DS-Seq", "prefix": "UN-SEQ-", "minDigits": 4, "type": "ProjectSequence",}This will generate sequences starting with: UN-SEQ-0001;
Another unique sequence for a project starting from 1000.
{ "id": "PRJ0001-DS-Seq2", "prefix": "UN-SEQ2-", "minDigits": 4, "nextValue": 1000, "type": "ProjectSequence",}This will generate sequences starting with: UN-SEQ2-1000;