Get the data that an application needs to start. projects are your open projects, or all the open projects for an administrator. persons depends on your role. A client gets only the members of the teams of their open projects, with a reduced set of fields. A manager or an administrator gets all the persons with all their fields. Another role gets all the persons with a minimal set of fields. An administrator also gets user_limit. Each project gives asset_type_workflows, the task type ids of the workflows it sets, by asset type id.
GET
/data/user/context
curl
curl -X GET "http://api.example.com/data/user/context" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Accept: application/json"
import requests
url = "http://api.example.com/data/user/context"
headers = {
"Authorization": "Bearer YOUR_API_TOKEN",
"Accept": "application/json"
}
params = {}
payload = None
response = requests.get(
url,
headers=headers,
params=params,
json=payload
)
response.raise_for_status()
if response.content:
print(response.json())
Response examples (200)
{
"projects": [
{
"id": "uuid",
"name": "Project 1"
}
],
"departments": [
{
"id": "uuid",
"name": "Animation"
}
],
"asset_types": [
{
"id": "uuid",
"name": "Character"
}
],
"task_types": [
{
"id": "uuid",
"name": "Modeling"
}
],
"task_status": [
{
"id": "uuid",
"name": "In Progress"
}
],
"custom_actions": [
{
"id": "uuid",
"name": "Custom Action"
}
],
"status_automations": [
{
"id": "uuid",
"name": "Auto Status"
}
],
"studios": [
{
"id": "uuid",
"name": "Studio Name"
}
],
"notification_count": 5,
"persons": [
{
"id": "uuid",
"name": "John Doe"
}
],
"project_status": [
{
"id": "uuid",
"name": "Active"
}
],
"search_filters": {
"todo": {
"all": [
{
"id": "uuid",
"name": "My Filter"
}
]
}
},
"search_filter_groups": {
"todo": {
"all": [
{
"id": "uuid",
"name": "Filter Group"
}
]
}
},
"preview_background_files": [
{
"id": "uuid",
"name": "background.jpg"
}
],
"project_roles": {
"a24a6ea4-ce75-4665-a070-57453082c250": "supervisor"
},
"plugins": [
{}
],
"user_limit": 50
}