Sources

Model

Fields

Field

Type

Description

object
"source"
id
string Unique identifier, prefixed with src_.
project_id
string
project_name
string
name
string Unique within its project.
storage_gb
number Data this source has ingested, in gigabytes of uncompressed data: collection files plus uploaded artifacts. Recalculated hourly.
schema_count
number How many schema versions this source has produced.
collections_count
number How many collections this source feeds.
deleted_at
| null When the source is scheduled to be deleted; null when it is not.
created_at
updated_at

List Sources

Endpoint

Retrieve a list of sources for a project.

GET
/v1/projects/:project_id/sources

Path Parameters

Field

Type

Description

project_id
string Unique identifier of the project.

Query Parameters

Field

Type

Description

order_by
string Field used to order the sources. Defaults to "name". Accepted values: "created_at","name","updated_at".
project_id
string Filter to sources belonging to a single project.
deleted_at
NullableDateFilter Filter by scheduled deletion date. Use null for sources that are not scheduled for deletion, not:null for sources that are.
limit
number 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 Defaults to "asc". Accepted values: "asc","desc".

Comments

  • after and before are mutually exclusive.

Response

200
{
  message: string;
  data: Source[];
  status: 200;
  error: null;
  pagination: Pagination;
  endpoint: string;
}

Retrieve Source

Endpoint

Retrieve a single source.

GET
/v1/projects/:project_id/sources/:source_id

Path Parameters

Field

Type

Description

project_id
string Unique identifier of the project.
source_id
string Unique identifier of the source.

Response

200
{
  message: string;
  data: Source;
  status: 200;
  error: null;
  pagination: null;
  endpoint: string;
}

Create Source

Endpoint

Create a source in a project.

POST
/v1/projects/:project_id/sources

Path Parameters

Field

Type

Description

project_id
string Unique identifier of the project.

Request Body

Field

Type

Requirement

Description

name
string
Required
Display name for the source. Minimum length: 1. Maximum length: 128.
project_id
string
Optional
Project the source belongs to. Ignored when the nested path supplies it.

Comments

  • The project is supplied by the path.
  • Source names are unique within a project.

Response

201
{
  message: string;
  data: Source;
  status: 201;
  error: null;
  pagination: null;
  endpoint: string;
}

Update Source

Endpoint

Update a source.

POST
/v1/projects/:project_id/sources/:source_id

Path Parameters

Field

Type

Description

project_id
string Unique identifier of the project.
source_id
string Unique identifier of the source.

Request Body

Field

Type

Requirement

Description

name
string
Optional
Display name for the source. Minimum length: 1. Maximum length: 128.
deleted_at
null
Optional
Send null to restore a source that is scheduled for deletion. The deletion date itself is set by the delete endpoint and cannot be written here.

Comments

  • Send deleted_at as null to restore a source that is scheduled for deletion.

Response

200
{
  message: string;
  data: Source;
  status: 200;
  error: null;
  pagination: null;
  endpoint: string;
}

Delete Source

Endpoint

Schedule a source for deletion.

DELETE
/v1/projects/:project_id/sources/:source_id

Path Parameters

Field

Type

Description

project_id
string Unique identifier of the project.
source_id
string Unique identifier of the source.

Comments

  • The source is hidden immediately and permanently removed 7 days later. Restore it before then by updating it with deleted_at set to null.

Response

200
{
  message: string;
  data: Source;
  status: 200;
  error: null;
  pagination: null;
  endpoint: string;
}

Force Delete Source

Endpoint

Delete a source permanently, without waiting out its restore window.

DELETE
/v1/projects/:project_id/sources/:source_id/force

Path Parameters

Field

Type

Description

project_id
string Unique identifier of the project.
source_id
string Unique identifier of the source.

Comments

  • Works on a live source as well as one already scheduled for deletion.
  • Every collection, record and file under the source is destroyed immediately. Nothing here can be restored.

Response

200
{
  message: string;
  data: null;
  status: 200;
  error: null;
  pagination: null;
  endpoint: string;
}

Referenced Types

NullableDateFilter

Nullable date filters accept everything a date filter accepts, plus null to match records where the field is unset and not:null to match records where it is set.

ISODateString

An ISO 8601 date-time string returned at the JSON API boundary.