/api/v1/object/data/select-options/{objectSlug}List the records you can link through every relation of an object.
List the records you can link through every relation of an object.
Deprecated: use
GET /object/data/select-options/{objectSlug}/{fieldSlug} instead.
Returns one group per relation, keyed by the relation field slug. Each
group lists every record on the other side of the relation that the
credential may link, sorted by record slug, with no pagination. A relation
with no such records has an empty options list. This does not scale to
large objects; the per-field route pages and searches.
Scope: read.<object slug>, for example read.deals.
Errors:
400— no active object has that slug.403— the credential lacksread.<object slug>.
Response 200:
{
"status": 200,
"message": "Select options retrieved successfully",
"data": {
"contact-mpoc4k2z": {
"field_slug": "contact-mpoc4k2z",
"label": "Contact",
"relation_type": "belongsTo",
"direction": "forward",
"object_slug": "contacts",
"object_name": "Contacts",
"object_icon": "users",
"options": [
{
"type": "relation",
"slug": "9f2c4b7a1e03",
"random_id": "a3f9c21b",
"name": "Sara Ali",
"label": "Sara Ali",
"icon": "users"
}
]
}
}
}
Send request
Use the documented inputs to call this endpoint directly.
Parameters
Values are applied to the request and the example on the right.
Responses
Successful response
{
"message": "string",
"data": "string"
}Bad request
{
"status": 1,
"message": "string",
"code": "string",
"data": {}
}The HTTP status code of the response.
What went wrong. Several validation messages are joined with ", ".
A stable, machine-readable reason. Only some errors set it.
Extra detail about the error. Only some errors set it.
Unauthorized
{
"status": 1,
"message": "string",
"code": "string",
"data": {}
}The HTTP status code of the response.
What went wrong. Several validation messages are joined with ", ".
A stable, machine-readable reason. Only some errors set it.
Extra detail about the error. Only some errors set it.
Internal server error
{
"status": 1,
"message": "string",
"code": "string",
"data": {}
}The HTTP status code of the response.
What went wrong. Several validation messages are joined with ", ".
A stable, machine-readable reason. Only some errors set it.
Extra detail about the error. Only some errors set it.
Powered by heyo-docs