Query Objects
POST/dynamic-svc/objects
Retrieves objects from a specified table based on search criteria. Requires authorization and user authentication.
Use helper functions in your respective client library such as condition constructors (equal
, contains
, startsWith
) and field selectors (field
, fields
, id
) for easier access.
Request
- application/json
Body
Query Request
Array [
]
Array [
]
query
object
Count true means return the count of the dataset filtered by Filters without after or limit.
filters
object[]
Filters are filtering options of a query. It is advised to use
It's advised to use helper functions in your respective client library such as filter constructors (all
, equal
, contains
, startsWith
) and field selectors (field
, fields
, id
) for easier access.
JSONValues is a JSON marshalled array of values. It's JSON marhalled due to the limitations of the Swaggo -> OpenAPI 2.0 -> OpenAPI Go generator toolchain.
Possible values: [equals
, containsSubstring
, startsWith
, intersects
, isInList
]
JSONAfter is used for cursor-based pagination, which is more effective in scalable and distributed environments compared to offset-based pagination.
JSONAfter is a JSON encoded string due to limitations of Swaggo (ie. []interface{} generates []map[stirng]interface{}).
Limit the number of records in the result set.
orderBys
object[]
OrderBys order the result set.
Desc indicates whether the sorting should be in descending order.
The field by which to order the results
Randomize indicates that the results should be randomized instead of ordered by the field
and desc
criteria
Responses
- 200
- 400
- 401
- 500
Successful retrieval of objects
- application/json
- Schema
- Example (from schema)
Schema
Array [
]
objects
object[]
Authors is a list of user ID and organization ID who created the object. If an organization ID is not provided, the currently active organization will be queried from the User Svc.
data
object
required
Deleters is a list of user IDs and role IDs that can delete the object.
_self
can be used to refer to the caller user's userId and
_org
can be used to refer to the user's currently active organization (if exists).
Readers is a list of user IDs and role IDs that can read the object.
_self
can be used to refer to the caller user's userId and
_org
can be used to refer to the user's currently active organization (if exists).
Writers is a list of user IDs and role IDs that can write the object.
_self
can be used to refer to the caller user's userId and
_org
can be used to refer to the user's currently active organization (if exists).
{
"objects": [
{
"authors": [
"[\"usr_12345\"",
" \"org_67890\"]"
],
"createdAt": "string",
"data": {},
"deleters": [
"string"
],
"id": "string",
"readers": [
"string"
],
"table": "string",
"updatedAt": "string",
"writers": [
"string"
]
}
]
}
Invalid JSON
- application/json
- Schema
- Example (from schema)
Schema
{
"error": "string"
}
Unauthorized
- application/json
- Schema
- Example (from schema)
Schema
{
"error": "string"
}
Internal Server Error
- application/json
- Schema
- Example (from schema)
Schema
{
"error": "string"
}