Pulls
Pull Model
Fields
Field | Type | Description |
|---|---|---|
object | "pull" | Always "pull". |
id | string | Unique identifier, prefixed with pul_. |
project_id | string | The project this pull belongs to. |
team_id | string | The team that owns the pull. |
name | string | Display name for the pull. |
source_id | string | The source fetched records are written to. |
source_name | string | null | Display name of that source. |
collection_slug | string | null | The collection within the source that records land in. Defaults to a slug of the pull name. |
endpoint_url | string | The HTTPS URL that is fetched on each run. |
method | | The HTTP method used to fetch the endpoint. |
headers_configured | string[] | Names of the headers sent with every fetch. The values are stored encrypted and are never returned, so this shows what was configured without revealing the secrets. |
request_body | string | null | The request body sent when the method is post. Null for get. |
json_records_path | string | null | Dot path to the array of records inside a JSON response, such as data or data.result. Null
when the response is stored exactly as it arrives. |
schedule_cron | string | Cron expression setting when the endpoint is fetched, evaluated in UTC. |
status | | The current state of the pull. |
next_fetch_at | | null | When the next fetch is due. Null when the pull is paused or disabled, because nothing is scheduled: a time here would promise a fetch that will not happen. |
missed_slot_count | number | How many scheduled slots have elapsed without a fetch, since the pull was created or last
resumed. Almost always because the project had no healthy server at the time.
Missed slots are counted rather than fetched late. A pull records whatever its endpoint serves
at the moment of the request, so a delayed fetch would return current data stamped with a time
it does not describe. A rising count next to a healthy last_success_at means the schedule is
finer than the project's capacity has been able to keep up with. |
last_attempt_at | | null | When the endpoint was last fetched, whether or not it succeeded. |
last_success_at | | null | When records were last fetched and accepted. |
last_failure_at | | null | When a fetch last failed. |
consecutive_failure_count | number | How many fetches have failed in a row. Resets to zero on the next success. |
last_error | string | null | The error from the most recent failed fetch. |
last_error_stage | | null | Which step of the most recent failed fetch went wrong. |
last_http_status | number | null | The HTTP status the endpoint returned on the most recent fetch. |
last_response_time_ms | number | null | How long the most recent fetch took, in milliseconds. |
last_record_count | number | How many records the most recent successful fetch produced. |
records_pulled_hourly | PullHourlyRecords[] | The last 24 hours of fetch volume, oldest first. Always 24 entries, so an hour with no fetches reads as a zero rather than being absent, and a pull that has never run still returns a full window of zeros. Sum the counts for "records pulled in the last 24 hours". |
created_at | | When the pull was created. |
updated_at | | When the pull was last changed. |
Pull Test Result
Fields
Field | Type | Description |
|---|---|---|
ok | boolean | Whether the endpoint responded successfully and the response could be read as records. |
status | number | The HTTP status the endpoint returned. Zero when no response was received at all. |
status_text | string | The HTTP status text the endpoint returned. |
response_time_ms | number | How long the fetch took, in milliseconds. |
byte_length | number | How many bytes the endpoint returned. |
record_count | number | How many records the response would produce. Zero when the test failed. |
body_preview | string | The first 2 KB of the response body. |
error_stage | | null | Which step went wrong. Null when the test succeeded. |
error | string | null | What went wrong. Null when the test succeeded. |
List Pulls
Endpoint
Retrieve a list of pulls.
GET
/v1/projects/:project_id/pulls Copy
Path Parameters
Field | Type | Description |
|---|---|---|
project_id | string | Unique identifier of the project. |
Query Parameters
Field | Type | Description |
|---|---|---|
order_by | string | Field the results are ordered by. Defaults to "created_at". Accepted values: "name","created_at","last_success_at". |
status | string | Return only pulls in this state. Accepted values: "active","paused","disabled". |
source_id | string | Return only pulls that write to this source. |
limit | number | Maximum number of items to return. Defaults to 25. Minimum: 1. Maximum: 200. |
after | string | Cursor from pagination.next_cursor of a previous response. Returns the resources after that page. |
before | string | Cursor from pagination.prev_cursor of a previous response. Returns the resources before that page. |
sort | string | Sort direction for the result set. Defaults to "desc". Accepted values: "asc","desc". |
Response
200
Copy
{
message: string;
data: Pull[];
status: 200;
error: null;
pagination: Pagination;
endpoint: string;
} Retrieve Pull
Endpoint
Retrieve a single pull.
GET
/v1/projects/:project_id/pulls/:pull_id Copy
Path Parameters
Field | Type | Description |
|---|---|---|
project_id | string | Unique identifier of the project. |
pull_id | string | Unique identifier of the pull. |
Response
200
Copy
{
message: string;
data: Pull;
status: 200;
error: null;
pagination: null;
endpoint: string;
} Create Pull
Endpoint
Create a scheduled pull in a project.
POST
/v1/projects/:project_id/pulls Copy
Path Parameters
Field | Type | Description |
|---|---|---|
project_id | string | Unique identifier of the project. |
Request Body
Field | Type | Requirement | Description |
|---|---|---|---|
name | string | Required | Name shown for this pull. Minimum length: 2. Maximum length: 128. |
source_id | string | Required | Source that fetched records are written to. Minimum length: 1. |
collection_slug | string | null | Optional | Collection within the source that records land in. Leave unset and it is derived from the pull name, so each pull gets its own stream. |
endpoint_url | string | Required | HTTPS URL fetched on every run. Must resolve to a public address. Minimum length: 1. Maximum length: 2048. |
method | string | Optional | HTTP method used to fetch the endpoint. Defaults to "get". Accepted values: "get","post". |
headers | object | null | Optional | Headers sent with every fetch, for authenticating to the endpoint. Stored encrypted and never returned; responses list only the header names, as headers_configured. |
request_body | string | null | Optional | Body sent with every fetch. Only valid when method is post, for endpoints that answer queries over POST. |
json_records_path | string | null | Optional | Dot path to the array of records inside a JSON response, for example data or data.result. Leave unset to store the response exactly as it arrives. |
schedule_cron | string | Optional | Cron expression setting when the endpoint is fetched, evaluated in UTC. Defaults to every minute, which is also the shortest supported gap. Defaults to "* * * * *". Minimum length: 1. Maximum length: 128. |
Response
201
Copy
{
message: string;
data: Pull;
status: 201;
error: null;
pagination: null;
endpoint: string;
} Update Pull
Endpoint
Update a pull.
POST
/v1/projects/:project_id/pulls/:pull_id Copy
Path Parameters
Field | Type | Description |
|---|---|---|
project_id | string | Unique identifier of the project. |
pull_id | string | Unique identifier of the pull. |
Request Body
Field | Type | Requirement | Description |
|---|---|---|---|
name | string | Optional | Name shown for this pull. Minimum length: 2. Maximum length: 128. |
collection_slug | string | null | Optional | Collection within the source that records land in. Leave unset and it is derived from the pull name, so each pull gets its own stream. |
endpoint_url | string | Optional | HTTPS URL fetched on every run. Must resolve to a public address. Minimum length: 1. Maximum length: 2048. |
method | string | Optional | HTTP method used to fetch the endpoint. Accepted values: "get","post". |
headers | object | null | Optional | Headers sent with every fetch, for authenticating to the endpoint. Stored encrypted and never returned; responses list only the header names, as headers_configured. |
request_body | string | null | Optional | Body sent with every fetch. Only valid when method is post, for endpoints that answer queries over POST. |
json_records_path | string | null | Optional | Dot path to the array of records inside a JSON response, for example data or data.result. Leave unset to store the response exactly as it arrives. |
schedule_cron | string | Optional | Cron expression setting when the endpoint is fetched, evaluated in UTC. Defaults to every minute, which is also the shortest supported gap. Minimum length: 1. Maximum length: 128. |
Response
200
Copy
{
message: string;
data: Pull;
status: 200;
error: null;
pagination: null;
endpoint: string;
} Delete Pull
Endpoint
Delete a pull.
DELETE
/v1/projects/:project_id/pulls/:pull_id Copy
Path Parameters
Field | Type | Description |
|---|---|---|
project_id | string | Unique identifier of the project. |
pull_id | string | Unique identifier of the pull. |
Response
200
Copy
{
message: string;
data: null;
status: 200;
error: null;
pagination: null;
endpoint: string;
} Pause Pull
Endpoint
Pause a pull so it stops fetching.
POST
/v1/projects/:project_id/pulls/:pull_id/pause Copy
Path Parameters
Field | Type | Description |
|---|---|---|
project_id | string | Unique identifier of the project. |
pull_id | string | Unique identifier of the pull. |
Response
200
Copy
{
message: string;
data: Pull;
status: 200;
error: null;
pagination: null;
endpoint: string;
} Resume Pull
Endpoint
Resume a paused pull.
POST
/v1/projects/:project_id/pulls/:pull_id/resume Copy
Path Parameters
Field | Type | Description |
|---|---|---|
project_id | string | Unique identifier of the project. |
pull_id | string | Unique identifier of the pull. |
Response
200
Copy
{
message: string;
data: Pull;
status: 200;
error: null;
pagination: null;
endpoint: string;
} Test Pull
Endpoint
Fetch the endpoint once without storing anything.
POST
/v1/projects/:project_id/pulls/:pull_id/test Copy
Path Parameters
Field | Type | Description |
|---|---|---|
project_id | string | Unique identifier of the project. |
pull_id | string | Unique identifier of the pull. |
Response
200
Copy
{
message: string;
data: PullTestResult;
status: 200;
error: null;
pagination: null;
endpoint: string;
} Referenced Types
ISODateString
An ISO 8601 date-time string returned at the JSON API boundary.
PullMethod
get
post
PullStatus
active
paused
disabled
PullErrorStage
request
response
parse
ingest