Sources
Create source
Sources
Create source
Create a new source
POST
/
v2
/
sources
curl --request POST \
--url https://api.portable.io/v2/sources \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"sourceSpec": "google_calendar"
}'
{
"data": {
"id": 80190,
"displayName": "John Doe's Google Calendar",
"sourceSpec": "google_calendar",
"properties": [
{
"name": "email",
"displayName": "Email",
"type": "string",
"required": true,
"description": "Email of the calendar's user",
"value": ""
}
],
"createdAt": "2023‐06‐12T20:03:00Z",
"updatedAt": "2023-08-01T00:00:00Z"
}
}
Authorizations
Bearer authentication header of the form Bearer <token>
, where <token>
is your auth token.
Body
application/json
Source to create
The name of the source spec to create a source for
A human-readable name for the source
Response
201
application/json
Created
Available options:
ALPHA
, BETA
, STABLE
, DEPRECATED
Available options:
NONE
, BASIC
, TOKEN
, AUTH_CODE
, CLIENT_CREDENTIALS
, FETCH_CREDENTIALS
, OIDC
A machine-readable name for the property
The type of the property
Available options:
STRING
, PASSWORD
, TEXT
, NUMBER
, BOOLEAN
, DATE
, DATETIME
, TIME
Whether the property's value is required
A human-readable name for the property
A human-readable description of the property
Example:
{
"$ref": "#/components/examples/sourceSpecGcal/value"
}
A human-readable name for the source
The properties of the source. This is a map of property names to their values. The names are defined in the propertyDefinitions
field of the source spec.
The timestamp marking when the source was created
The timestamp marking when the source was last updated
Example:
{
"$ref": "#/components/examples/sourceGcal/value"
}
curl --request POST \
--url https://api.portable.io/v2/sources \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"sourceSpec": "google_calendar"
}'
{
"data": {
"id": 80190,
"displayName": "John Doe's Google Calendar",
"sourceSpec": "google_calendar",
"properties": [
{
"name": "email",
"displayName": "Email",
"type": "string",
"required": true,
"description": "Email of the calendar's user",
"value": ""
}
],
"createdAt": "2023‐06‐12T20:03:00Z",
"updatedAt": "2023-08-01T00:00:00Z"
}
}