Skip to content

Update a data source template

PATCH/v2/themes/{themeId}/data-source-templates/{id}

PATCH
/v2/themes/{themeId}/data-source-templates/{id}
curl --request PATCH \
--url https://api.ligr.live/rest/v2/themes/1/data-source-templates/1 \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "ifUnchangedSince": "example", "config": "example", "sample": "example", "sampleBase64": "example", "schema": "example", "description": "example" }'

Beta. This operation can change between minor versions. See Beta status.

Updates a data source template. A new sample reinfers the schema, unless the request also names a schema. The alias, the source type and the shape never change.

themeId
required
number format: double

The theme identifier

id
required
number format: double

The data source template identifier

Media typeapplication/json

Body of PATCH /v2/themes/{themeId}/data-source-templates/{id}. A new sample reinfers the schema unless the request also names a schema.

object
ifUnchangedSince
string
config
sample
string
sampleBase64
string
schema
description
string
Examplegenerated
{
"ifUnchangedSince": "example",
"config": "example",
"sample": "example",
"sampleBase64": "example",
"schema": "example",
"description": "example"
}

Ok

Media typeapplication/json

One data source template. The alias names the schema a graphic selects, and an operator pushes rows into it with POST /v2/data-sources/{competitionThemeSettingId}/{alias}.

object
id
required
integer format: int32
alias
required
string
sourceType
required
string
Allowed values: csv xlsx
shape
required
string
Allowed values: cell kv rows
config
required

Parse options, for example headerRow and dataStartRow. Null when the defaults apply.

schema
required

JSON schema of the pushed data. The server infers it from the sample.

sample
required

First rows of the sample, so the builder can preview the shape.

description
required
string
nullable
updatedAt
required

ISO 8601 timestamp.

string
Example
{
"sourceType": "csv",
"shape": "cell"
}

Request is invalid

Media typeapplication/json
object
message
required
string
details
required
object
key
additional properties
Examplegenerated
{
"message": "example",
"details": {
"additionalProperty": "example"
}
}

Missing or invalid api key

Media typeapplication/json
object
message
required
string
Examplegenerated
{
"message": "example"
}

Api key provides insufficient access for the request

Media typeapplication/json
object
message
required
string
Examplegenerated
{
"message": "example"
}

Theme or data source template not found

Media typeapplication/json
object
message
required
string
Examplegenerated
{
"message": "example"
}

IfUnchangedSince no longer matches the template

Media typeapplication/json

Body of a 409 answer when the caller’s ifUnchangedSince no longer matches.

code is always TARGET_CHANGED. Read the resource again and send the write once more.

object
message
required
string
code
required
string
Examplegenerated
{
"message": "example",
"code": "example"
}

Api key has made too many requests

Media typeapplication/json
object
message
required
string
Examplegenerated
{
"message": "example"
}

An unexpected error has occured. If problems persist please contact support

Media typeapplication/json
object
message
required
string
Examplegenerated
{
"message": "example"
}