Sources
Manage your Cloud Data Sources with Felt REST API.
List Sources
Lists Sources that you have access to. To see the datasets in an individual Source, fetch it from the Show Source endpoint.
Only needed when using the API as part of a plugin
GET /api/v2/sources HTTP/1.1
Host: felt.com
Authorization: Bearer YOUR_API_KEY
Accept: */*
[
{
"automatic_sync": "enabled",
"connection_type": "abs_bucket",
"created_at": 1,
"id": "luCHyMruTQ6ozGk3gPJfEB",
"last_synced_at": 1,
"links": {
"self": "https://felt.com/api/v2/sources/V0dnOMOuTd9B9BOsL9C0UjmqC"
},
"name": "text",
"owner_id": "luCHyMruTQ6ozGk3gPJfEB",
"permissions": {
"type": "workspace_editors"
},
"sync_status": "syncing",
"type": "source_reference",
"updated_at": 1,
"workspace_id": "luCHyMruTQ6ozGk3gPJfEB"
}
]
Show Source
Fetches a single Source and all the datasets it contains.
The ID of the source to show
GET /api/v2/sources/{source_id} HTTP/1.1
Host: felt.com
Authorization: Bearer YOUR_API_KEY
Accept: */*
{
"automatic_sync": "enabled",
"connection": {
"account_id": "text",
"database": "text",
"role": "text",
"schema": "text",
"type": "snowflake",
"user": "text",
"warehouse": "text"
},
"created_at": 1,
"datasets": [
{
"created_at": 1,
"description": "text",
"geometry_type": "polygon",
"id": "luCHyMruTQ6ozGk3gPJfEB",
"inspection_status": "completed",
"name": "text",
"type": "dataset",
"updated_at": 1
}
],
"id": "luCHyMruTQ6ozGk3gPJfEB",
"last_synced_at": 1,
"name": "text",
"owner_id": "luCHyMruTQ6ozGk3gPJfEB",
"permissions": {
"type": "workspace_editors"
},
"sync_status": "syncing",
"type": "source",
"updated_at": 1,
"workspace_id": "luCHyMruTQ6ozGk3gPJfEB"
}
Add a layer from a Source
POST /api/v2/maps/{map_id}/add_source_layer HTTP/1.1
Host: felt.com
Authorization: Bearer YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 56
{
"dataset_id": "luCHyMruTQ6ozGk3gPJfEB",
"from": "dataset"
}
{
"links": {
"layer_group": "https://felt.com/api/v2/maps/V0dnOMOuTd9B9BOsL9C0UjmqC/layer_groups/KFFhKAbvS4anD3wxtwNEpD",
"self": "https://felt.com/api/v2/maps/V0dnOMOuTd9B9BOsL9C0UjmqC"
},
"status": "accepted"
}
Create a Source
Triggers the creation of a new Source. Each connection type has it's own set of required parameters, depending on what kind of Source it is. These are provided in the connection
field.
Connecting the Source and inspecting it's datasets will happen asynchronously after the API response is returned. To determine when the inspection process has completed, poll the Show Source endpoint and check for sync_status: completed
.
POST /api/v2/sources HTTP/1.1
Host: felt.com
Authorization: Bearer YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 211
{
"connection": {
"account_id": "text",
"database": "text",
"password": "text",
"role": "text",
"schema": "text",
"type": "snowflake",
"user": "text",
"warehouse": "text"
},
"name": "text",
"permissions": {
"type": "workspace_editors"
}
}
{
"automatic_sync": "enabled",
"connection_type": "abs_bucket",
"created_at": 1,
"id": "luCHyMruTQ6ozGk3gPJfEB",
"last_synced_at": 1,
"links": {
"self": "https://felt.com/api/v2/sources/V0dnOMOuTd9B9BOsL9C0UjmqC"
},
"name": "text",
"owner_id": "luCHyMruTQ6ozGk3gPJfEB",
"permissions": {
"type": "workspace_editors"
},
"sync_status": "syncing",
"type": "source_reference",
"updated_at": 1,
"workspace_id": "luCHyMruTQ6ozGk3gPJfEB"
}
Sync a Source
Triggers Felt to reconnect to your Source and re-inspect all the datasets it contains. Syncing will happen asynchronously after the API response is returned. To determine when the inspection process has completed, poll the Show Source endpoint and check for sync_status: completed
.
The ID of the source to sync
POST /api/v2/sources/{source_id}/sync HTTP/1.1
Host: felt.com
Authorization: Bearer YOUR_API_KEY
Accept: */*
{
"automatic_sync": "enabled",
"connection_type": "abs_bucket",
"created_at": 1,
"id": "luCHyMruTQ6ozGk3gPJfEB",
"last_synced_at": 1,
"links": {
"self": "https://felt.com/api/v2/sources/V0dnOMOuTd9B9BOsL9C0UjmqC"
},
"name": "text",
"owner_id": "luCHyMruTQ6ozGk3gPJfEB",
"permissions": {
"type": "workspace_editors"
},
"sync_status": "syncing",
"type": "source_reference",
"updated_at": 1,
"workspace_id": "luCHyMruTQ6ozGk3gPJfEB"
}
Update a Source
Updates details of a Source. Connecting the Source and inspecting it's datasets will happen asynchronously after the API response is returned. To determine when the inspection process has completed, poll the Show Source endpoint and check for sync_status: completed
.
The ID of the source to update
POST /api/v2/sources/{source_id}/update HTTP/1.1
Host: felt.com
Authorization: Bearer YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 211
{
"connection": {
"account_id": "text",
"database": "text",
"password": "text",
"role": "text",
"schema": "text",
"type": "snowflake",
"user": "text",
"warehouse": "text"
},
"name": "text",
"permissions": {
"type": "workspace_editors"
}
}
{
"automatic_sync": "enabled",
"connection_type": "abs_bucket",
"created_at": 1,
"id": "luCHyMruTQ6ozGk3gPJfEB",
"last_synced_at": 1,
"links": {
"self": "https://felt.com/api/v2/sources/V0dnOMOuTd9B9BOsL9C0UjmqC"
},
"name": "text",
"owner_id": "luCHyMruTQ6ozGk3gPJfEB",
"permissions": {
"type": "workspace_editors"
},
"sync_status": "syncing",
"type": "source_reference",
"updated_at": 1,
"workspace_id": "luCHyMruTQ6ozGk3gPJfEB"
}
Delete a Source
Deletes a Source.
Any layers created from the Source will remain after it is deleted, but they will no longer be refreshed.
The ID of the source to delete
DELETE /api/v2/sources/{source_id} HTTP/1.1
Host: felt.com
Authorization: Bearer YOUR_API_KEY
Accept: */*
No content
Last updated
Was this helpful?