1Update Dataset Column Properties
Overview
This API updates one or more column properties of a Dataset.
Method: POST
Request URL: {kyvos-url}/rest/v2/datasets/{name-or-id}/column-properties
Authorization
API Key: sessionid
This method authenticates requests using a session ID which acts like an API key.
BasicAuth: HTTP Authorization Scheme
This method authenticates requests using a username and password sent in the HTTP Authorization header.
Headers
Header Name | Type | Description | Possible Values |
|---|---|---|---|
sessionid | String | The session ID is the token received from the login API. Note: Session ID is required for token-based authentication. | – |
Path Parameters
Parameter Name | Type | Description | Possible Values |
|---|---|---|---|
name-or-id (Required) | String | Name or ID of the Dataset whose column properties need to be updated. Note: If the Dataset name is provided, either folderName or folderId must also be provided. | – |
Query Parameters
Parameter Name | Type | Description | Possible Values |
|---|---|---|---|
by | String | Specifies whether the name-or-id parameter should be interpreted as a Dataset name or a Dataset ID. If by=name, provide the Dataset name in the name-or-id parameter. If by=id, provide the Dataset ID in the name-or-id parameter. The default value is name. | – |
Request Body
Parameter Name | Type | Description | Possible Values |
|---|---|---|---|
columnDetails (Required) | String | JSON containing an array of column property details. Note: An example JSON is provided in the Resources section. | – |
folderName | String | Name of the folder containing the Dataset. If the Dataset is present in the root directory, specify [Root]. Note: If neither folderName nor folderId is provided, the Dataset will be treated as a root-level entity by default. | – |
folderId | String | ID of the folder containing the Dataset. | – |
Responses
200 Success
{
"code": 0,
"message": "Successfully updated dataset: account-small"
}Status Code | Description |
|---|---|
401 | Authorization information is missing or invalid. |
404 | No matching record found. |
412 | Required parameter is missing. |
500 | Internal Server Error. |
Resources
Below is an example of JSON structure which can be used as a reference for the columnDetails parameter in the request body.
[
{
"originalName":"accountid",
"fieldName":"accountid",
"role":"None",
"isHidden":true,
"dataType":"CHAR",
"format":"0.",
"dataSubtype": ""
}
]Field | Type | Description | Possible Values | Example |
columnDetails | string | A JSON string representing an array of column update objects. Required. | Must be a valid JSON array. | "[{...}, {...}]" |
columnDetails[*] | object | One object per column. Required for each column to update. | JSON object. | {...} |
originalName | string | The original, unmodified column name as it exists in the dataset. This is the unique key used to find the right column. Required. | Must match originalName or name of an existing column. | "customer_id" |
fieldName | string | A new display name (updated name) for the column. If you want to keep the original name, omit this. Optional. | Any text. | "Customer ID" |
dataType | string | The high-level Kyvos data type for the column. Use the same value returned by Get Dataset Column Details API. Optional. | CHAR, NUMBER, DATE | "CHAR" |
dataSubtype | string | A more specific subtype of the data type. Use the same value returned by Get Dataset Column Details API. Optional. | DOUBLE, LONG, FLOAT, DECIMAL, (empty). | "" |
format | string | The display or parsing format for the column, such as a number or date pattern. Optional. | Any valid format string; for numbers e.g. "#,##0.00", for dates e.g. "yyyy-MM-dd". | "#,##0" |
role | string | Specifies the key role of a column within a dataset. It determines whether a column serves as a primary key, a foreign key, or has no special key role. Optional. | None, PRIMARY, FOREIGN. | "None" |
isHidden | boolean | Whether the column is hidden from users. Optional. | true, false | “FALSE” |