Menu
Get Relation By Collection
List relations in collection
POST
/relations/{collection}Use it in a workflow
- Add a step and choose the Directus connector.
- Pick the Get Relation By Collection action (under Relations).
- Fill in the fields below, then reference the result from later steps as
{{getRelationByCollection.response.data}}.
Request
Path parameters
Response
Returns 200 with an object. Read it in later steps with {{getRelationByCollection.response.data.<field>}}.
{
"data": [
{
"id": 1,
"many_collection": "directus_activity",
"many_field": "user",
"one_collection": "directus_users",
"one_field": null,
"one_collection_field": "string",
"one_allowed_collections": [
"string"
],
"junction_field": null,
"sort_field": "string",
"one_deselect_action": "string"
}
]
}
Need more? See the Directus guide for connection setup and behaviour shared by every action.
Was this page helpful?