UUID and Pagination

This page describes UUID and Pagination in AnySee.

UUID is the unique ID of face entities managed by AnySee. It is automatically generated when adding a face entity. It is globally unique throughout all service instances. UUID is essential in managing and specifying the resources. Store it in your database if you want to keep mapping relations.

UUID generation rules

In AnySee, UUID follows the version 4 format and is incremental, which means a later-created face entity will always have a larger UUID than an earlier one. We used some mechanisms to create the UUID and avoid collisions. UUID is also an indexed field so that the performance is guaranteed.


Pagination is adopted to limit the number of returns in the List API to avoid a timeout error. Based on the UUID generation rules, all items returned in the List API are in the ascending order of the creation time. We do not offer other sorting methods so far.

There are four items In a successful list request.

  "total": 102,
  "count": 2,
  "limit": 2,
  "nextAfter": "12345678-16fe-4773-8916-e70000ac255f",
  "entities": []

The total field represents the total number of entities that fulfills the listing condition, including collection and key.

The count field value equals the number of entities returned in this response.

The maximum number of items that can be returned in a single API call is defined by limit. The limit can be at most 1000 and, by default, is equal to 20.

Instead of "offset, " we use the after and nextAfter structures to optimize the performance. The list will start with the first added entity when' after' is not mentioned. And the list will start with the next existing entity after the specified after entity. Use the UUID returned in the nextAfter field as the next after value to ensure you do not miss any items in your subsequent request. If nextAfter returns blank (""), you have reached the end of the list.