Components and Configurations

Update Configuration

Updates an existing configuration for Development Branch. When the configuration is updated in a development branch, it does not affect currentVersion of the configuration.

The optional If-Match header turns the update into an optimistic-concurrency operation: the change is applied only if the configuration is still at the given version, otherwise nothing is written and the request fails with 412 Precondition Failed. Send the version field of a configuration detail response as a strong entity tag, e.g. If-Match: "5".

If-Match: * only requires that the configuration still exists. Weak validators (W/"5") and tag lists are rejected with 400, because If-Match mandates strong comparison and a configuration has a single version.

Reads deliberately do not emit an ETag. The version covers the whole configuration including its rows and row order, but not state or folder, so job state writes and folder moves never invalidate a caller's precondition, and If-Match does not protect folder. This also means the version is not a valid strong validator for the full representation and must not be used for caching.

Without the header the update is unconditional and overwrites concurrent changes.

The variant without branch/{branchId} in the URL is deprecated, use the branch endpoint and set branch/default.

put/v2/storage/components/{componentId}/configs/{configurationId}

Request

Path parameters

componentIdstring required

Id of the component.

configurationIdstring required

Id of the configuration.

Query parameters

workspaceIdinteger nullable

When provided, enqueues a workspace output-mapping sync job after the config update. The workspace must be linked to this component and configuration.

Headers

If-Matchstring

Optimistic concurrency precondition, RFC 9110 form. Send the version field of the configuration detail response as a strong entity tag, e.g. "5"; the update is applied only if the configuration is still at that version, otherwise it fails with 412. * only requires that the configuration still exists. Weak validators and tag lists are rejected with 400.

Request body

namestring nullable

Configuration name.

descriptionstring nullable

Configuration description.

configurationobject nullable

Configuration data; the maximum allowed size is 4MB.

stateobject nullable

State data; the maximum allowed size is 4MB.

changeDescriptionstring nullable

Description of the configuration modification.

isDisabledboolean nullable

Disabled flag. Accepts booleanish values.

rowsSortOrderstring[] nullable

Row ids in the desired order; all row ids must be specified.

folderstring nullable

Folder the configuration is grouped under, at most 400 characters after trimming. Surrounding whitespace is trimmed; an empty string removes the configuration from its folder. Omitted or null leaves the folder unchanged. Setting it does not create a new configuration version.

Example request

{
  "name": "My new configuration",
  "configuration": {
    "key": "value",
    "key3": "value3"
  },
  "changeDescription": "Added new key",
  "rowsSortOrder": [
    "row1",
    "row2"
  ],
  "folder": "Marketing"
}

Response

Configuration updated.

idstring required

Configuration id, unique within the component.

namestring required

Configuration name.

descriptionstring required

Configuration description.

createdstring required

When the configuration was created, ISO 8601 with a +hhmm offset; "" when none was recorded.

versioninteger required

Current version number. Use it as the If-Match precondition for update, delete and purge.

changeDescriptionstring nullable required

Change description of the current version.

isDisabledboolean required

Whether the configuration is disabled.

isDeletedboolean required

Whether the configuration is in the trash.

folderstring nullable required

Folder the configuration is grouped under; null when it is in none.

folderUpdatedstring nullable required

When the folder was last written (set, cleared, copied to a branch or merged), ISO 8601 with a +hhmm offset; null when the configuration has no folder. Read-only.

configurationobject required

Configuration data, arbitrary object defined by the component.

rowsSortOrderstring[] required

Row ids in the desired order; empty when the default order (by id) applies.

stateobject required

Configuration state data, arbitrary object.

Example response

{
  "id": "236606822",
  "name": "My new configuration",
  "created": "2017-02-13T12:01:05+0100",
  "creatorToken": {
    "id": 27978,
    "description": "dev@keboola.com"
  },
  "version": 1,
  "changeDescription": "Initial configuration",
  "folder": "Marketing",
  "folderUpdated": "2017-02-13T12:01:05+0100",
  "rows": [
    {
      "id": "row1",
      "name": "First row",
      "version": 1,
      "created": "2017-02-13T12:01:05+0100",
      "creatorToken": {
        "id": 27978,
        "description": "dev@keboola.com"
      },
      "changeDescription": "Row created",
      "versionIdentifier": "01H2W8N0ZJJB6V126C8ZSND28N"
    }
  ],
  "currentVersion": {
    "created": "2017-02-13T12:01:05+0100",
    "creatorToken": {
      "id": 27978,
      "description": "dev@keboola.com"
    },
    "changeDescription": "Initial configuration",
    "versionIdentifier": "01H2W7DAN0QT78NZQ2BD2BZT4S"
  }
}

Changes

No recorded changes to this operation across all 1 revision of this API.