Skip to content

Walk a record's relations

GET
/relations/related
Code sample: Shell / cURL
curl --request GET \
--url 'https://example.com/api/v1/relations/related?kind=task&id=example&page=1&perPage=20' \
--header 'Authorization: Bearer <token>'

Walks the fixed relations out of a task, project, company, order or member: subtask, dependency, project, company, order, assignee and follower, up to three hops. Returns one page of the records reached, nearest first, each with the hops it took and the edge of the last hop. Only records the caller may open are returned or walked through. Members are team members only, never client contacts. A member is walked out of only as the origin. Team members only; a client account is refused.

kind
required

Kind of the record to start from.

string
Allowed values: task project company order member

Kind of the record to start from.

id
required

Id of the record to start from.

string
>= 1 characters

Id of the record to start from.

depth

Hops to walk, 1 to 3; 2 when omitted.

integer
>= 1 <= 3

Hops to walk, 1 to 3; 2 when omitted.

edges

Comma-separated edges to follow: subtask, dependency, project, company, order, assignee, follower. All when omitted.

string

Comma-separated edges to follow: subtask, dependency, project, company, order, assignee, follower. All when omitted.

page
integer
default: 1 >= 1 <= 9007199254740991
perPage
integer
default: 20 >= 1 <= 100

The records reached.

Media typeapplication/json
object
data
required
object
origin
required
object
id
required
string
kind
required
string
Allowed values: task project company order member
label
required
string
path
required

Location of the record, relative to the workspace’s /app/ base.

string
page
required
integer
>= -9007199254740991 <= 9007199254740991
perPage
required
integer
>= -9007199254740991 <= 9007199254740991
records
required
Array<object>
object
depth
required

Hops from the origin, from 1.

integer
>= -9007199254740991 <= 9007199254740991
edge
required

The edge of the last hop.

string
Allowed values: subtask dependency project company order assignee follower
id
required
string
kind
required
string
Allowed values: task project company order member
label
required
string
path
required

Location of the record, relative to the workspace’s /app/ base.

string
total
required
integer
>= -9007199254740991 <= 9007199254740991
truncated
required

The walk hit its cap; lower depth or narrow edges to see every record.

boolean

Example

{
"data": {
"origin": {
"kind": "task"
},
"records": [
{
"edge": "subtask",
"kind": "task"
}
]
}
}

Validation error. Parse failures include field paths and expectations.

Media typeapplication/json

Validation error with safe field paths and expected values; submitted values are never returned.

object
error
required
object
code
required

Stable machine-readable error code.

string
issues
Array<object>
object
expected
required
string
message
required
string
path
required
Array<string | number>
message
required

Human-readable error message.

string
status
required

HTTP status code, mirrored in the body.

integer
>= -9007199254740991 <= 9007199254740991

Example

{
"error": {
"code": "UNAUTHORIZED"
}
}

Unauthorized.

Media typeapplication/json

Standard error envelope.

object
error
required
object
code
required

Stable machine-readable error code.

string
message
required

Human-readable error message.

string
status
required

HTTP status code, mirrored in the body.

integer
>= -9007199254740991 <= 9007199254740991

Example

{
"error": {
"code": "UNAUTHORIZED"
}
}

Forbidden.

Media typeapplication/json

Standard error envelope.

object
error
required
object
code
required

Stable machine-readable error code.

string
message
required

Human-readable error message.

string
status
required

HTTP status code, mirrored in the body.

integer
>= -9007199254740991 <= 9007199254740991

Example

{
"error": {
"code": "UNAUTHORIZED"
}
}

Not found.

Media typeapplication/json

Standard error envelope.

object
error
required
object
code
required

Stable machine-readable error code.

string
message
required

Human-readable error message.

string
status
required

HTTP status code, mirrored in the body.

integer
>= -9007199254740991 <= 9007199254740991

Example

{
"error": {
"code": "UNAUTHORIZED"
}
}

Rate limit exceeded. Wait for Retry-After before retrying.

Media typeapplication/json

Standard error envelope.

object
error
required
object
code
required

Stable machine-readable error code.

string
message
required

Human-readable error message.

string
status
required

HTTP status code, mirrored in the body.

integer
>= -9007199254740991 <= 9007199254740991

Example

{
"error": {
"code": "UNAUTHORIZED"
}
}
RateLimit-Limit
string
/^\d+$/

Maximum requests in the current quota window.

RateLimit-Policy
string

Quota policy in requests and window seconds, for example 60;w=60.

RateLimit-Remaining
string
/^\d+$/

Requests left in this quota window (zero when blocked).

RateLimit-Reset
string
/^\d+$/

Seconds until the current quota window resets, when available from the rate-limit store.

Retry-After
string
/^\d+$/

Seconds until another request may be attempted.