Views

Update a view

Updates an existing view with the provided details.

PATCH
/v1/views/
id
curl --request PATCH \
  --url https://api.lunary.ai/v1/views/{id} \
  --header 'Authorization: Bearer <api_key>' \
  --header 'Content-Type: application/json' \
  --data '{"name":"Updated LLM View","data":["AND",{"id":"models","params":{"models":["gpt-4","gpt-3.5-turbo"]}}],"icon":"user"}'

Accepted Keys:

name
data
icon

Example response:

{
  "id": "1234abcd",
  "name": "Updated LLM View",
  "data": [
    "AND",
    {
      "id": "models",
      "params": {
        "models": [
          "gpt-4",
          "gpt-3.5-turbo"
        ]
      }
    }
  ],
  "columns": [],
  "icon": "user",
  "type": "llm",
  "projectId": "project123",
  "ownerId": "user456",
  "updatedAt": "2023-04-02T10:15:00Z"
}

Parameters

NameLocated InRequiredSchema
idpathYesstring

Request Body

PropertyTypeDescription
namestring
dataarray
columnsobject
iconstring

Responses

200

Successful response

PropertyTypeDescription
idstring
namestring
dataarray
columnsarray
iconstring
typestring
projectIdstring
ownerIdstring
updatedAtstring

Questions? We're here to help.

Email