What the workspace asks your automation for
What the workspace asks your automation for (posts:read)
Every request sends Authorization: Bearer ...: the access token in local mode, an API key stk_... in cloud mode. Use Send to try it against your cloud instance with your API key.
GET
Targets on your own automation (provider custom) that are publishing and wait for a result
(kind: target, with the post and the channel), and schedules of source: agent whose last run
found nothing to publish (kind: posts, with the schedule). Each entry says when it was requested.
header
AuthorizationBearer <token>API key (stk_...), or in the Community Edition the access token (stk_local_...)
OK
application/json- response
data*array<>curl -X GET 'https://staqly.example.com/v1/work'{ "data": [ { "kind": "target", "post": { "id": "string", "collection_id": "string", "collection_name": "string", "content": "string", "media": [ "string" ], "media_items": [ { "id": "string", "mime_type": "string", "size_bytes": 0, "original_name": "string", "url": "string", "sha256": "string", "created_at": "2019-08-24T14:15:22Z", "alt_text": "string", "width": 0, "height": 0, "duration_ms": 0, "folder_id": "string", "tags": [ "string" ], "deleted_at": "2019-08-24T14:15:22Z", "purge_at": "2019-08-24T14:15:22Z", "duplicate_of": "string" } ], "status": "draft", "publish_at": "2019-08-24T14:15:22Z", "published_at": "2019-08-24T14:15:22Z", "tags": [ "string" ], "metadata": {}, "source": "string", "external_ref": "string", "repeat_every": "", "thread": [ { "content": "string", "media": [ "string" ], "delay_seconds": 0, "media_items": [ { "id": "string", "mime_type": "string", "size_bytes": 0, "original_name": "string", "url": "string", "sha256": "string", "created_at": "2019-08-24T14:15:22Z", "alt_text": "string", "width": 0, "height": 0, "duration_ms": 0, "folder_id": "string", "tags": [ "string" ], "deleted_at": "2019-08-24T14:15:22Z", "purge_at": "2019-08-24T14:15:22Z", "duplicate_of": "string" } ] } ], "version": 0, "targets": [ { "channel_id": "string", "channel_name": "string", "provider": "string", "avatar_url": "string", "content": "string", "settings": { "property1": "string", "property2": "string" }, "status": "pending", "external_id": "string", "external_url": "string", "error": "string", "attempts": 0, "published_at": "2019-08-24T14:15:22Z", "replies": [ { "index": 0, "status": "pending", "external_id": "string", "external_url": "string", "error": "string", "published_at": "2019-08-24T14:15:22Z" } ] } ], "created_at": "2019-08-24T14:15:22Z", "updated_at": "2019-08-24T14:15:22Z", "created_by": "string", "open_comments": 0 }, "channel": { "id": "string", "provider": "string", "name": "string", "handle": "string", "avatar_url": "string", "profile_url": "string", "status": "connected", "settings": {}, "links": "keep", "group_id": "string", "last_error": "string", "created_at": "2019-08-24T14:15:22Z", "updated_at": "2019-08-24T14:15:22Z", "activity": { "last_published_at": "2019-08-24T14:15:22Z", "last_post_id": "string", "next_publish_at": "2019-08-24T14:15:22Z", "published_30d": 0 } }, "schedule": { "id": "string", "collection_id": "string", "collection_name": "string", "name": "string", "channels": [ "string" ], "channel_names": [ "string" ], "kind": "once", "run_at": "2019-08-24T14:15:22Z", "rule": { "times": [ "09:00", "17:30" ], "weekdays": [ 0 ], "tz": "Europe/Warsaw", "every_minutes": 5 }, "pick": "next", "post_ids": [ "string" ], "source": "none", "endpoint_url": "string", "endpoint_secret": "string", "enabled": true, "next_run_at": "2019-08-24T14:15:22Z", "last_run_at": "2019-08-24T14:15:22Z", "last_result": "string", "created_at": "2019-08-24T14:15:22Z", "updated_at": "2019-08-24T14:15:22Z" }, "collection": { "id": "string", "name": "string", "description": "string", "icon": "string", "color": "string", "processing_timeout_seconds": 0, "is_default": true, "archived": true, "archived_at": "string", "created_at": "string", "updated_at": "string", "post_count": 0, "status_counts": { "property1": 0, "property2": 0 } }, "requested_at": "2019-08-24T14:15:22Z" } ]}