Generate a Snowflake ID
Generates a snowflake ID in advance, which is used when the client creates a new feature entity and needs to allocate the ID before saving.
Request URL
POST {base_url}/uc-cconfig/api/v1/resource/snowflake-id
Request parameters
- Headers
-
Parameter Required Type Description Authorization Yes String The access token used for authentication. Format: Bearer
{access_token}.x-tenant-code Yes String The tenant name. Note: You can obtain tenant name using the Query Tenants interface.
- Body parameters
-
Parameter Required Type Description (none) - - This interface does not require any body parameter. Send an empty JSON object {}.
Response parameters
| Parameter | Type | Description |
|---|---|---|
| requestId | String | The unique ID of the request, which can be used to quickly locate the request. |
| code | String | The HTTP status code of the request.
|
| message | String | The status message of the request. |
| detailMessage | String | The detailed error information. When the request is successful, this parameter returns empty. |
| result | Object<Snowflake_ID> | The generated snowflake ID. |
- Snowflake_ID
-
Parameter Type Description id String The generated snowflake ID.
Example
Request example
POST /uc-cconfig/api/v1/resource/snowflake-id HTTP/1.1
Host: api.cn.novoone.com
Authorization: Bearer eyJraWQiOiJjbi0wLWtleS0xIiwiYWxnIjoiUlMyNTYifQ.eyJzdWIiOiIxMDAwQGNvbG9ydGVzdDIiLCJncmFudF90eXBlIjoicGFzc3dvcmQiLCJ1c2VyX25hbWUiOiIxMDAwQGNvbG9ydGVzdDIiLCJzY29wZSI6WyJyZWFkIiwid3JpdGUiXSwiY2xpZW50X2V4dCI6eyJkZXNjcmlwdGlvbiI6IueuoeeQhuWQjuWPsFdlYuW6lOeUqCIsInBsYXRmb3JtIjoid2ViIn0sImV4cCI6MTc5MzYyNTUzNiwiaWF0IjoxNzkzNjAzOTM2LCJqdGkiOiI4MTY2NzFkMS0zMzRkLTQ2YzItYmZjYy1iZDcxMDViYTY5MjYiLCJjbGllbnRfaWQiOiJub3ZvLWFkbWluLXdlYiIsInNpZCI6IjUyYWUxNmFiLWY5YmUtNDM4YS04YzNmLWI3NWVkMTJmYWNjOCIsInVzZXJfZXh0Ijp7InJvbGVJZHMiOlsxMDJdLCJwdWlkIjozMDc2OTEzNjQ0OTE1OTk4NzIwLCJ0ZW5hbnRJZCI6MjA3OTUwNDIwNTMwOTE5NDI0MSwicGFyZW50VWNJZCI6MzA3NjkxMzY0NDg5MDgzMjg5NiwidGVuYW50Q29kZSI6ImNvbG9ydGVzdDIiLCJ0eXBlIjoiVF9VU0VSIiwidXNlcklkIjoyMDc5NzQ2OTE1Mzg4MDc2MDMzLCJlbWFpbCI6Imxlb0BzYW1wbGUuY29tIiwidXNlcm5hbWUiOiIxMDAwQGNvbG9ydGVzdDIiLCJ1Y0lkIjozMDc2OTEzNjQ0ODkwODMyODk2fX0.wDV834nODPS9xL4e_eEQbQqH4LeTp6MwwTBoZDmLP0MQmP8mpmM7QaDTp4lqSdBYKGeF-KLusOcO_eCr242flfK74YZTIJEa4AV52bvZWnZJFEzPmobMdrMXjKtiOlbquidxy0pYOLa-LaNsHFi0SqO3Dao4LYvL7YJaLEqn2GdwypIokFMsktVN-adxy8buP2D-fHvMM49wbgvyZ8glHdvGl-4ngJm5oA71_o4VC5XzTZ4ihDFS5nYm-YM2bV015c4qe2j95K19ZJTcF79_DZX7xiiM1foPV4nbP7U-5CVd5E3f5zUekE2PYxz0x6q-Ef8X4WXouUR_GzrCHN_VBA
x-tenant-code: jint
Content-Type: application/json
Response example
HTTP/1.1 200 OK { "requestId": "37eca60c33f9806d7ae48e5609426a9a", "code": "200", "message": "SUCCESS", "detailMessage": "", "result": { "id": "375544488864866304" } }