Views

Create a new view

Creates a new dashboard view with the provided details.

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

Accepted Keys:

name
data
icon
type

Example response:

{
  "id": "5678efgh",
  "name": "New LLM View",
  "data": [
    "AND",
    {
      "id": "models",
      "params": {
        "models": [
          "gpt-4"
        ]
      }
    }
  ],
  "columns": [],
  "icon": "chart",
  "type": "llm",
  "projectId": "project123",
  "ownerId": "user456",
  "updatedAt": "2023-04-01T14:30:00Z"
}

Request Body

PropertyTypeDescription
namestring
dataarray
columnsobject
iconstring
typestring

Responses

200

Successful response

PropertyTypeDescription
idstring
namestring
dataarray
columnsarray
iconstring
typestring
projectIdstring
ownerIdstring
updatedAtstring

Questions? We're here to help.

Email