---
updatedAt: 2026-04-24T16:37:26.000Z
agentTools:
  projectIndex: https://developers.cloudbeds.com/llms.txt
---

# Search for a chart

# OpenAPI definition

```json
{
  "info": {
    "description": "#### The Cloudbeds Data Insights API provides programmatic methods to access report data in [Data Insights](https://www.cloudbeds.com/measure-success/). With the Cloudbeds Data Insights API, you can:\n\n- Build custom reports to display Cloudbeds data.\n- Automate complex reporting tasks to save time.\n- Integrate your Cloudbeds data with other business applications.\n- Schedule your reports to your email in a custom frequency\n- Access stock/custom reports created by Cloudbeds\n- And many others\n- Export Request has a limit of 100000 records\n- Data and Summary requests has a limit of 100 records when the mode is Preview\n- Data and Summary requests has a limit of 12000 records when the mode is Run\n\n*Note: The API return application/json*.",
    "version": "1.1",
    "title": "Data Insights API",
    "termsOfService": "https://www.cloudbeds.com/terms/api/",
    "contact": {
      "email": "support@cloudbeds.com"
    },
    "license": {
      "name": "Cloudbeds",
      "url": "https://www.cloudbeds.com/"
    }
  },
  "components": {
    "securitySchemes": {
      "Authorization": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "JWT",
        "description": "##### Authorization refers to the process of granting a user or application access permissions to Cloudbeds data and features.\n\nTo authenticate your users, your App will need to implement an [authorization code flow](https://datatracker.ietf.org/doc/html/rfc6749#section-4.1).\n[Cloudbeds API Authentication](https://hotels.cloudbeds.com/api/docs/#api-Authentication) lets you direct your users to an authorization dialog on Cloudbeds.\nFrom there, the primary Cloudbeds experience will show the authorization dialog and handle the authorization on behalf of your App.\nYour users will be able to authorize or decline.\nAfter the user makes their choice, Cloudbeds will redirect the user to your App, where you can exchange the authorization code for an access token (if the user authorized your App), or handle a rejection (if the user did not authorize your App).\n\nIf using a cloudbeds API key, you can pass it as a header with the following format: `X-API-KEY: <your_api_key>`\n\n###### Cloudbeds implements the [OAuth 2.0](https://integrations.cloudbeds.com/hc/en-us/articles/360006450433-OAuth-2-0) authorization framework."
      }
    },
    "schemas": {
      "ErrorContent": {
        "type": "object",
        "properties": {
          "code": {
            "type": "integer",
            "description": "Error code"
          },
          "status": {
            "type": "string",
            "description": "Error status"
          },
          "description": {
            "type": "string",
            "description": "Error description"
          },
          "message": {
            "type": "object",
            "description": "Error message"
          }
        }
      },
      "Error": {
        "type": "object",
        "properties": {
          "error": {
            "$ref": "#/components/schemas/ErrorContent"
          }
        }
      },
      "ReportCDF": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "default": "default",
            "enum": [
              "default",
              "custom"
            ],
            "description": "Report cdf type",
            "example": "default"
          },
          "column": {
            "type": "string",
            "description": "Report cdf name",
            "example": "credit_amount"
          },
          "multi_level_id": {
            "type": "integer",
            "enum": [
              1,
              2,
              3,
              4
            ],
            "description": "Multi-level where CDF is located"
          }
        },
        "required": [
          "column"
        ]
      },
      "ChartSettingsMetrics": {
        "type": "object",
        "properties": {
          "cdf": {
            "description": "Report CDF",
            "example": {
              "type": "default",
              "column": "credit_amount"
            },
            "allOf": [
              {
                "$ref": "#/components/schemas/ReportCDF"
              }
            ]
          },
          "metric": {
            "type": "string",
            "enum": [
              "sum",
              "mean",
              "max",
              "min",
              "count",
              "std",
              "var"
            ],
            "description": "Chart metric. Not required for dynamic cdfs",
            "example": "sum"
          },
          "kind": {
            "type": "string",
            "enum": [
              "line",
              "bar",
              "area"
            ],
            "description": "Kind of chart",
            "example": "line"
          },
          "axis": {
            "type": "string",
            "enum": [
              "left",
              "right"
            ],
            "description": "Left or right vertical axis",
            "example": "left"
          }
        },
        "required": [
          "axis",
          "cdf",
          "kind"
        ]
      },
      "ChartSettings": {
        "type": "object",
        "properties": {
          "legend": {
            "type": "boolean",
            "description": "Toggle to show/hide legend",
            "example": false,
            "nullable": false
          },
          "toolbox": {
            "type": "boolean",
            "description": "Toggle to show/hide the toolbox",
            "example": false,
            "nullable": false
          },
          "metrics": {
            "description": "List of CDFs with metrics and vertical axis to represent data.",
            "example": {
              "cdf": {
                "type": "default",
                "column": "credit_amount"
              },
              "metric": "sum",
              "kind": "line",
              "axis": "left"
            },
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ChartSettingsMetrics"
            }
          },
          "stack": {
            "type": "string",
            "enum": [
              "normalized",
              "standard"
            ],
            "description": "Stack option of Chart kind bar",
            "example": "normalized"
          }
        }
      },
      "ReportColumns": {
        "type": "object",
        "properties": {
          "cdf": {
            "example": {
              "type": "default",
              "column": "credit_amount"
            },
            "allOf": [
              {
                "$ref": "#/components/schemas/ReportCDF"
              }
            ]
          },
          "metrics": {
            "type": "array",
            "minItems": 1,
            "description": "Report column metrics",
            "items": {
              "type": "string",
              "enum": [
                "sum",
                "mean",
                "max",
                "min",
                "count",
                "std",
                "var"
              ],
              "example": "sum"
            }
          }
        },
        "required": [
          "cdf"
        ]
      },
      "Chart": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "readOnly": true,
            "description": "Chart Id",
            "example": "1"
          },
          "datasource_id": {
            "type": "integer",
            "readOnly": true,
            "description": "ID of the datasource",
            "example": "1"
          },
          "datasource_kind": {
            "type": "string",
            "enum": [
              "report",
              "stock_report"
            ],
            "readOnly": true,
            "description": "Datasource Kind",
            "example": "stock_report"
          },
          "datasource_title": {
            "type": "string",
            "readOnly": true,
            "description": "Title of the datasource",
            "example": "My Report"
          },
          "datasource_description": {
            "type": "string",
            "readOnly": true,
            "description": "Description of the datasource",
            "example": "Detailed Report Description"
          },
          "title": {
            "type": "string",
            "description": "Chart title",
            "example": "My cool new chart"
          },
          "kind": {
            "type": "string",
            "enum": [
              "line",
              "bar",
              "area",
              "pie",
              "donut",
              "sunburst",
              "treemap",
              "geomap",
              "heatmap",
              "combo"
            ],
            "description": "Kind of chart",
            "example": "bar"
          },
          "settings": {
            "default": {
              "legend": false,
              "toolbox": false
            },
            "allOf": [
              {
                "$ref": "#/components/schemas/ChartSettings"
              }
            ]
          },
          "categories": {
            "description": "List of CDFs in group rows or group columns (or the text string \"Periods\" for period comparison reports) to categorize data.  Categories are represented horizontally (x-axis) on most charts",
            "example": "\"Periods\""
          },
          "metrics": {
            "description": "List of CDFs with metrics to represent data. Metrics will be represented vertically (y-axis) on most charts.",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ReportColumns"
            }
          },
          "user_id": {
            "type": "integer",
            "readOnly": true,
            "description": "User id",
            "example": "1"
          },
          "created_at": {
            "type": "string",
            "readOnly": true,
            "description": "Created At Time",
            "example": "2022-01-01T00:00:00Z"
          },
          "updated_at": {
            "type": "string",
            "readOnly": true,
            "description": "Updated At Time",
            "example": "2022-01-01T00:00:00Z"
          }
        },
        "required": [
          "datasource_id",
          "datasource_kind",
          "id",
          "kind",
          "title",
          "user_id"
        ]
      },
      "Charts": {
        "type": "object",
        "properties": {
          "offset": {
            "type": "integer",
            "default": 0,
            "minimum": 0,
            "description": "The difference between start of the data and the start of the response data",
            "example": 0
          },
          "limit": {
            "type": "integer",
            "default": 25,
            "minimum": 0,
            "maximum": 100,
            "description": "The maximum number of results in the response",
            "example": 5
          },
          "total": {
            "type": "integer",
            "default": 0,
            "minimum": 0,
            "description": "The total number of records",
            "example": 42
          },
          "charts": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Chart"
            }
          }
        }
      }
    },
    "responses": {
      "BAD_REQUEST": {
        "description": "Bad Request",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      }
    }
  },
  "paths": {
    "/datainsights/v1.1/charts/search": {
      "get": {
        "parameters": [
          {
            "in": "query",
            "name": "offset",
            "required": false,
            "description": "The difference between start of the data and the start of the response data",
            "schema": {
              "type": "integer",
              "default": 0,
              "minimum": 0,
              "example": 0
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "description": "The maximum number of results in the response",
            "schema": {
              "type": "integer",
              "default": 25,
              "minimum": 0,
              "maximum": 100,
              "example": 5
            }
          },
          {
            "in": "query",
            "name": "sort",
            "required": false,
            "description": "Sort Charts",
            "schema": {
              "type": "string",
              "default": "updated_at,desc",
              "enum": [
                "id,asc",
                "id,desc",
                "title,asc",
                "title,desc",
                "kind,asc",
                "kind,desc",
                "created_at,asc",
                "created_at,desc",
                "updated_at,asc",
                "updated_at,desc"
              ]
            }
          },
          {
            "in": "query",
            "name": "ids",
            "required": false,
            "explode": false,
            "style": "form",
            "description": "Chart IDs , delimited. For example ?ids=1,2,3",
            "schema": {
              "type": "array",
              "minItems": 1,
              "items": {
                "type": "integer"
              }
            }
          },
          {
            "in": "query",
            "name": "datasource_kind",
            "required": false,
            "description": "Datasource Kind",
            "schema": {
              "type": "string",
              "enum": [
                "report",
                "stock_report"
              ],
              "example": "stock_report"
            }
          },
          {
            "in": "query",
            "name": "tag_ids",
            "required": false,
            "explode": false,
            "style": "form",
            "description": "Tag IDs , delimited. For example ?tag_ids=1,2,3",
            "schema": {
              "type": "array",
              "minItems": 1,
              "items": {
                "type": "integer"
              }
            }
          },
          {
            "in": "query",
            "name": "chart_kind",
            "required": false,
            "explode": false,
            "style": "form",
            "description": "Chart Kinds, delimited",
            "schema": {
              "type": "array",
              "minItems": 1,
              "example": "bar,line",
              "items": {
                "type": "string",
                "enum": [
                  "line",
                  "bar",
                  "area",
                  "pie",
                  "donut",
                  "sunburst",
                  "treemap",
                  "geomap",
                  "heatmap",
                  "combo"
                ],
                "description": "Kind of chart",
                "example": "bar"
              }
            }
          },
          {
            "in": "query",
            "name": "dataset_ids",
            "required": false,
            "explode": false,
            "style": "form",
            "description": "Dataset IDs, delimited",
            "schema": {
              "type": "array",
              "minItems": 1,
              "example": "1,2,3",
              "items": {
                "type": "integer",
                "enum": [
                  1,
                  2,
                  3,
                  4,
                  5,
                  6,
                  7,
                  8,
                  9
                ]
              }
            }
          },
          {
            "in": "query",
            "name": "search_term",
            "required": false,
            "description": "A text string to search for in any of the search column fields",
            "schema": {
              "type": "string",
              "example": "in-house"
            }
          },
          {
            "in": "query",
            "name": "search_columns",
            "required": false,
            "explode": false,
            "style": "form",
            "schema": {
              "type": "array",
              "items": {
                "type": "string",
                "enum": [
                  "title",
                  "datasource_title",
                  "datasource_description"
                ]
              }
            }
          },
          {
            "in": "header",
            "name": "X-PROPERTY-ID",
            "required": true,
            "description": "Property id of the client",
            "schema": {
              "type": "integer",
              "writeOnly": true,
              "minimum": 1
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Charts"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BAD_REQUEST"
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "summary": "Search for a chart",
        "tags": [
          "Chart"
        ],
        "security": [
          {
            "Authorization": []
          }
        ]
      }
    }
  },
  "tags": [
    {
      "name": "Chart",
      "description": "Operations on Charts"
    }
  ],
  "openapi": "3.0.2",
  "x-readme": {
    "explorer-enabled": true,
    "proxy-enabled": true
  }
}
```