Update a data source template
PATCH/v2/themes/{themeId}/data-source-templates/{id}
const url = 'https://api.ligr.live/rest/v2/themes/1/data-source-templates/1';const options = { method: 'PATCH', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"ifUnchangedSince":"example","config":"example","sample":"example","sampleBase64":"example","schema":"example","description":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}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.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”The theme identifier
The data source template identifier
Request Bodyrequired
Section titled “Request Bodyrequired”Body of PATCH /v2/themes/{themeId}/data-source-templates/{id}. A new sample reinfers the
schema unless the request also names a schema.
object
Examplegenerated
{ "ifUnchangedSince": "example", "config": "example", "sample": "example", "sampleBase64": "example", "schema": "example", "description": "example"}Responses
Section titled “Responses”Ok
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
Parse options, for example headerRow and dataStartRow. Null when the defaults apply.
JSON schema of the pushed data. The server infers it from the sample.
First rows of the sample, so the builder can preview the shape.
ISO 8601 timestamp.
Example
{ "sourceType": "csv", "shape": "cell"}Request is invalid
object
object
Examplegenerated
{ "message": "example", "details": { "additionalProperty": "example" }}Missing or invalid api key
object
Examplegenerated
{ "message": "example"}Api key provides insufficient access for the request
object
Examplegenerated
{ "message": "example"}Theme or data source template not found
object
Examplegenerated
{ "message": "example"}IfUnchangedSince no longer matches the template
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
Examplegenerated
{ "message": "example", "code": "example"}Api key has made too many requests
object
Examplegenerated
{ "message": "example"}An unexpected error has occured. If problems persist please contact support
object
Examplegenerated
{ "message": "example"}