- Authentication
- User Settings
- Workflows
- Activities
- Selecting
- Filtering
- Ordering
- Limit
- Range Limiting
- Retrieve as CSV
Authenticate with email and password:
curl -X POST 'https://api.taskvalve.com/auth/v1/token?grant_type=password' \
-H "apikey: PUBLIC_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"email": "[email protected]",
"password": "your_password"
}'
Auth Response
{
"access_token": "YOUR_ACCESS_TOKEN",
"token_type": "bearer",
"expires_in": 3600,
...
}
Retrieve user settings:
curl 'https://api.taskvalve.com/rest/v1/user_settings?select=*' \
-H "apikey: PUBLIC_API_KEY" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN"
Settings Response
[
{
"user_id": "YOUR_USER_ID",
"notify_failed_workflows": false
"notify_failed_activities": false,
}
]
Update user settings:
curl -X PATCH 'https://api.taskvalve.com/rest/v1/user_settings?user_id=eq.YOUR_USER_ID' \
-H "apikey: PUBLIC_API_KEY" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"notify_failed_workflows": "true",
}'
Get workflows using the /workflows
endpoint:
curl 'https://api.taskvalve.com/rest/v1/workflows?select=*' \
-H "apikey: PUBLIC_API_KEY" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN"
Fetch a list of activities:
curl 'https://api.taskvalve.com/rest/v1/activities?select=*' \
-H "apikey: PUBLIC_API_KEY" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN"
Retrieve only the id and creation time of workflows:
curl 'https://api.taskvalve.com/rest/v1/workflows?select=workflow_id,created_at' \
-H "apikey: PUBLIC_API_KEY" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN"
Retrieve activities without the output:
curl 'https://api.taskvalve.com/rest/v1/activities?select=-output' \
-H "apikey: PUBLIC_API_KEY" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN"
Retrieve activities with a specific status:
curl 'https://api.taskvalve.com/rest/v1/activities?status=eq.failed&select=*' \
-H "apikey: PUBLIC_API_KEY" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN"
Retrieve workflows excluding a specific status:
curl 'https://api.taskvalve.com/rest/v1/workflows?status=neq.completed&select=*' \
-H "apikey: PUBLIC_API_KEY" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN"
Retrieve activities that started after a certain time:
curl 'https://api.taskvalve.com/rest/v1/activities?start_time=gt.2023-09-01T00:00:00Z&select=*' \
-H "apikey: PUBLIC_API_KEY" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN"
Retrieve workflows created on or after a certain date:
curl 'https://api.taskvalve.com/rest/v1/workflows?created_at=gte.2023-09-01T00:00:00Z&select=*' \
-H "apikey: PUBLIC_API_KEY" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN"
Retrieve activities that ended before a certain time:
curl 'https://api.taskvalve.com/rest/v1/activities?end_time=lt.2023-09-01T00:00:00Z&select=*' \
-H "apikey: PUBLIC_API_KEY" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN"
Retrieve workflows created on or before a certain date:
curl 'https://api.taskvalve.com/rest/v1/workflows?created_at=lte.2023-08-31T00:00:00Z&select=*' \
-H "apikey: PUBLIC_API_KEY" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN"
Search for an activity by name (case-sensitive):
curl 'https://api.taskvalve.com/rest/v1/activities?name=like.*coding*&select=*' \
-H "apikey: PUBLIC_API_KEY" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN"
Search for an activity by name (case-insensitive):
curl 'https://api.taskvalve.com/rest/v1/activities?name=ilike.*coding*&select=*' \
-H "apikey: PUBLIC_API_KEY" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN"
Order activities by start time in ascending order:
curl 'https://api.taskvalve.com/rest/v1/activities?order_by=start_time.asc&select=*' \
-H "
apikey: PUBLIC_API_KEY" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN"
Limit the number of retrieved activities to 5:
curl 'https://api.taskvalve.com/rest/v1/activities?limit=5&select=*' \
-H "apikey: PUBLIC_API_KEY" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN"
Retrieve activities within a specific range:
curl 'https://api.taskvalve.com/rest/v1/activities?select=*' \
-H "apikey: PUBLIC_API_KEY" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
-H "Range: 0-9"
Retrieve activities in CSV format:
curl 'https://api.taskvalve.com/rest/v1/activities?select=*' \
-H "apikey: PUBLIC_API_KEY" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN"
-H "Accept: text/csv"