openapi: 3.2.0 info: description: '# Introduction This API is documented using the **OpenAPI 2.0** specification.' title: Logz.io Grafana dashboards API termsOfService: https://logz.io/about-us/terms-of-use/ contact: email: help@logz.io url: https://docs.logz.io/ license: name: Apache 2.0 url: http://www.apache.org/licenses/LICENSE-2.0.html servers: - url: https://api.logz.io/ security: - X-API-TOKEN: [] tags: - name: Grafana dashboards paths: /v1/grafana/api/dashboards/db: post: operationId: createDashboard summary: Create/update a dashboard description: 'Creates or updates a new dashboard or updates an existing dashboard. Please ensure to change the region in the URL to match your account''s region.' tags: - Grafana dashboards responses: 200: description: successful query content: application/json: schema: type: object properties: id: type: integer example: 1 description: ID. uid: type: string example: cIBgcSjkk description: UID. url: type: string example: /d/cIBgcSjkk/production-overview description: URL. status: type: string example: success description: Request status. version: type: integer example: 1 description: Dashboard version. slug: type: string example: production-overview description: Dashboard slug. 412: description: failed content: application/json: schema: type: object properties: message: type: string example: The dashboard has been changed by someone else description: Error message. status: type: string example: version-mismatch description: Error status. requestBody: content: application/json: schema: properties: dashboard: type: object description: The complete dashboard model, to create a new dashboard. properties: id: type: integer description: Nullable to create a new dashboard. example: 1 uid: type: integer description: Optional unique identifier when creating a dashboard. will generate a new uid. example: 1 panels: type: array items: type: object properties: alert: type: object properties: alertRuleTags: type: object conditions: type: array items: type: object properties: evaluator: type: object properties: params: type: array items: type: integer format: int32 type: type: string operator: type: object properties: type: type: string query: type: object properties: params: type: array items: type: string reducer: type: object properties: params: type: array items: null type: type: string type: type: string executionErrorState: type: string for: type: string frequency: type: string handler: type: integer format: int32 name: type: string noDataState: type: string notifications: type: array items: null aliasColors: type: object properties: null bars: type: boolean dashLength: type: integer format: int32 dashes: type: boolean datasource: type: string format: nullable fieldConfig: type: object properties: defaults: type: object properties: custom: type: object properties: null overrides: type: array items: null fill: type: integer format: int32 fillGradient: type: integer format: int32 gridPos: type: object properties: h: type: integer format: int32 w: type: integer format: int32 x: type: integer format: int32 y: type: integer format: int32 hiddenSeries: type: boolean id: type: integer format: int32 legend: type: object properties: avg: type: boolean current: type: boolean max: type: boolean min: type: boolean show: type: boolean total: type: boolean values: type: boolean lines: type: boolean linewidth: type: integer format: int32 nullPointMode: type: string options: type: object properties: dataLinks: type: array items: null percentage: type: boolean pointradius: type: integer format: int32 points: type: boolean renderer: type: string seriesOverrides: type: array items: null spaceLength: type: integer format: int32 stack: type: boolean steppedLine: type: boolean targets: type: array items: type: object properties: refId: type: string scenarioId: type: string thresholds: type: array items: type: object properties: colorMode: type: string fill: type: boolean line: type: boolean op: type: string value: type: integer format: int32 timeFrom: type: string format: nullable timeRegions: type: array items: null timeShift: type: string format: nullable title: type: string tooltip: type: object properties: shared: type: boolean sort: type: integer format: int32 value_type: type: string type: type: string xaxis: type: object properties: buckets: type: string format: nullable mode: type: string name: type: string format: nullable show: type: boolean values: type: array items: null yaxes: type: array items: type: object properties: format: type: string label: type: string format: nullable logBase: type: integer format: int32 max: type: string format: nullable min: type: string format: nullable show: type: boolean yaxis: type: object properties: align: type: boolean alignLevel: type: string format: nullable title: type: string example: Production Overview tags: type: array items: type: string example: tag3 timezone: type: string example: browser schemaVersion: type: integer example: 1 version: type: integer example: 0 refresh: type: string description: Set the dashboard refresh interval. If this is lower than the minimum refresh interval, then Grafana will ignore it and will enforce the minimum refresh interval. example: 25s folderId: type: integer description: The id of the folder to save the dashboard in. example: 1 folderUid: type: string description: The unique identifier (uid) of a folder to search in for dashboards. You cannot use `General` folder or the folder generated by logz.io - `Logz.io Dashboards` - to place your alerts. example: l3KqBxCMz message: type: string description: Set a commit message for the version history. example: Made changes to xyz overwrite: description: Set to true if you want to overwrite existing dashboard with newer version, same dashboard title in folder or same dashboard uid. type: boolean /v1/grafana/api/dashboards/uid/<>: get: operationId: getDashboarById summary: Get dashboard by uid description: 'Will return the dashboard given the dashboard unique identifier (uid). Information about the unique identifier of a folder containing the requested dashboard might be found in the metadata. Please ensure to change the region in the URL to match your account''s region.' tags: - Grafana dashboards parameters: - in: path name: uid schema: description: Dashboard UID. required: true responses: 200: description: success content: application/json: schema: type: object properties: dashboard: type: object description: The complete dashboard model, `id = null ` to create a new dashboard. properties: id: type: integer description: Set `id = null` to create a new dashboard. example: 1 uid: type: integer description: Optional unique identifier when creating a dashboard, `id = null` will generate a new uid. example: 1 title: type: string example: Production Overview description: Dashboard title. tags: type: array description: Dashboard tags. items: type: string example: tag3 timezone: type: string description: Timezone. example: browser schemaVersion: type: integer description: Schema version. example: 1 version: type: integer description: Dashboard version. example: 0 meta: type: object description: Information about the unique identifier of a folder containing the requested dashboard. properties: isStarred: type: boolean example: true description: Whether the dashboard is starred. url: type: string example: /d/cIBgcSjkk/production-overview description: Dashboard url. folderId: type: integer example: 2 description: Dashboard folder id. folderUid: type: string example: l3KqBxCMz description: The unique identifier (uid) of a folder to search in for dashboards. You cannot use `General` folder or the folder generated by logz.io - `Logz.io Dashboards` - to place your alerts. slug: type: string example: production-overview description: Dashboard slug. delete: operationId: deleteDashboarById summary: Delete dashboard by uid description: 'Will delete the dashboard given the specified unique identifier (uid). Please ensure to change the region in the URL to match your account''s region.' tags: - Grafana dashboards parameters: - in: path name: uid schema: description: Dashboard UID. required: true responses: 200: description: success content: application/json: schema: type: object properties: title: type: object example: Production Overview description: Dashboard title. message: type: object description: Response message. id: type: integer example: 2 description: Dashboard id. /v1/grafana/api/dashboards/home: get: operationId: getHomeDashboard summary: Get home dashboard description: 'Will return the home dashboard. Please ensure to change the region in the URL to match your account''s region.' tags: - Grafana dashboards responses: 200: description: success content: application/json: schema: type: object properties: dashboard: type: object description: The complete dashboard model, `id = null` to create a new dashboard. properties: editable: type: boolean example: false hideControls: type: integer example: false nav: type: object properties: enable: type: boolean example: false type: type: string example: timepicker style: type: string example: dark tags: type: object properties: tag: type: string example: outage templating: type: object properties: list: type: array items: type: string time: type: object timezone: type: string example: browser title: type: string example: Home version: type: integer example: 2 meta: type: object description: The complete dashboard model, `id = null` to create a new dashboard. properties: isHome: type: boolean example: true canSave: type: boolean example: false canEdit: type: boolean example: false canStar: type: boolean example: false url: type: string example: url expires: type: string example: 0001-01-01 00:00:00+00:00 created: type: string example: 0001-01-01 00:00:00+00:00 /v1/grafana/api/dashboards/tags: get: operationId: getDashboardTags summary: Get all tags of dashboards description: 'Will return all tags for all dashboard. Please ensure to change the region in the URL to match your account''s region.' tags: - Grafana dashboards responses: 200: description: success content: application/json: schema: type: array items: type: object properties: term: type: string description: Tag term. example: tag1 count: type: string description: Tag count. example: count1 /v1/grafana/api/dashboards/id/:dashboardId/versions: get: operationId: getAllDashboardVersions summary: Get all dashboard versions description: 'Gets all existing dashboard versions for the dashboard with the given dashboardId. Please ensure to change the region in the URL to match your account''s region.' tags: - Grafana dashboards parameters: - in: path name: dashboardId schema: description: Dashboard ID. required: true - in: query name: limit schema: description: Maximum number of results to return. - in: query name: start schema: description: Version to start from when returning queries. responses: 200: description: success content: application/json: schema: type: object properties: id: type: integer description: ID. example: 1 dashboardId: type: integer description: Dashboard ID. example: 2 parentVersion: type: integer description: Dashboard parent version. example: 0 restoredFrom: type: integer description: Restored from. example: 0 version: type: integer description: Version. example: 2 created: type: integer description: Date created. example: 2017-06-08T17:24:33-04:00" createdBy: type: string description: Created by. example: admin message: type: string description: Message. example: Initial save /v1/grafana/api/dashboards/id/:dashboardId/versions/:id: get: operationId: getDashboardVersion summary: Get dashboard version description: 'Get the dashboard version with the given id, for the dashboard with the given id. Please ensure to change the region in the URL to match your account''s region.' parameters: - in: path name: dashboardId schema: description: Dashboard ID. required: true - in: path name: id schema: description: Version ID. required: true tags: - Grafana dashboards responses: 200: description: success content: application/json: schema: type: object properties: id: type: integer description: ID. example: 1 dashboardId: type: integer description: Dashboard ID. example: 1 parentVersion: type: integer description: Parent version. example: 0 restoredFrom: type: integer description: Restored from. example: 0 version: type: integer description: Version. example: 1 created: type: string description: Creation date. example: 2017-04-26 17:18:38-04:00 message: type: string description: Message. example: Initial save data: type: object description: Data. properties: annotations: type: object description: Annotations. properties: list: type: array items: null editable: type: boolean description: Whether the data is editable. gnetId: type: string description: Gnet Id. graphTooltip: type: integer description: Graph tooltip. example: 0 hideControls: type: boolean description: Whether to hide controls. id: type: integer description: ID. example: 1 links: type: array description: Links. items: null rows: type: array description: Rows. items: type: object description: Items. properties: collapse: type: boolean description: Whether to collapse items. height: type: string description: Height. example: 250px panels: type: array description: Panels. items: null repeat: type: string description: Repeat. repeatIteration: type: string description: Repeat iteration. repeatRowId: type: string description: Repeat row id. showTitle: type: boolean description: Whether to show title. title: type: string example: Dashboard Row description: Title. titleSize: type: string example: h6 description: Title size. schemaVersion: type: integer example: '14' description: Schema version. style: type: string example: dark description: Style. tags: type: array items: null description: Tags. templating: type: object description: Templating. properties: list: type: array items: null time: type: object description: Time. properties: from: type: string description: From. example: now-6h to: type: string description: To. example: now timepicker: type: object description: Time picker. properties: refresh_intervals: type: array description: Refresh intervals. items: type: string example: 5s time_options: type: array description: Time options. items: type: string example: 5m timezone: type: string description: Time zone. example: browser title: type: string description: Title. example: test version: type: integer description: Version. example: 1 createdBy: type: string description: Created by. example: admin /v1/grafana/api/dashboards/id/:dashboardId/restore: post: operationId: restoreDashboard summary: Restore a dashboard description: 'Restores a dashboard to a given dashboard version. Please ensure to change the region in the URL to match your account''s region.' tags: - Grafana dashboards parameters: - in: path name: dashboardId schema: description: Dashboard ID. required: true responses: 200: description: successful query content: application/json: schema: type: object properties: slug: type: string description: Dashboard slug. example: production-overview status: type: string description: Dashboard status. example: success version: type: integer description: Dashboard version. example: 1 requestBody: content: application/json: schema: properties: version: type: integer description: Dashboard version. /v1/grafana/api/dashboards/calculate-diff: post: operationId: compareDashboard summary: Compare dashboards description: 'Compares two dashboard versions by calculating the JSON diff of them. Please ensure to change the region in the URL to match your account''s region.' tags: - Grafana dashboards responses: 200: description: successful query content: application/json: schema: type: object requestBody: content: application/json: schema: properties: base: type: object description: Object representing the base dashboard version. properties: dashboardId: type: integer example: 1 version: type: integer example: 1 new: type: object description: Object representing the new dashboard version properties: dashboardId: type: integer example: 1 version: type: integer example: 1 diffType: type: string description: the type of diff to return. Can be “json” or “basic”. components: securitySchemes: X-API-TOKEN: description: 'You can manage your API tokens from the [Logz.io API tokens](https://app.logz.io/#/dashboard/settings/manage-tokens/api) page. API tokens are account-specific. You will need to be logged into the relevant Log Management or SIEM account to view the API tokens associated with it. To manage your API tokens, log into the relevant account in your Logz.io platform, click the gear in the top-right menu, and select [**Tools > Manage tokens > API tokens**](https://app.logz.io/#/dashboard/settings/manage-tokens/api). It''s important to keep your tokens secure. API tokens carry privileges to make changes to users and accounts, so if you believe an API token has been compromised, delete it, and replace it with a new token in your integrations.' type: apiKey in: header name: X-API-TOKEN x-servers: - url: https://api.logz.io description: US East (Northern Virginia) - url: https://api-au.logz.io description: Asia Pacific (Sydney) - url: https://api-ca.logz.io description: Canada (Central) - url: https://api-eu.logz.io description: Europe (Frankfurt) - url: https://api-uk.logz.io description: Europe (London) x-tagGroups: - name: Log Monitoring tags: - Search logs - Alerts - Deployments - Insights - Logz.io snapshots - name: Cloud SIEM tags: - Security account - Security rules - Security events - Lookup lists - name: Account administration tags: - Manage users - Manage metrics account - Associated accounts - Authentication groups - Who am I - Manage time-based log accounts - Manage shared tokens - Manage API tokens - Manage notification endpoints - Import or export Kibana objects - name: Manage data shipping tags: - Manage log shipping tokens - Drop filters - Archive logs - Restore logs - Parsing - Delete object API - name: Data security tags: - Retrieve audit trail - name: Connect to AWS resources tags: - Connect to CloudTrail - Connect to S3 Buckets - name: Metrics API Gateway tags: - Grafana contact points - Grafana data source - Grafana alerting provisioning - Grafana silence management - Grafana annotations - Grafana dashboards - Grafana dashboard search - Grafana snapshots - Grafana get all folders description: Metrics API Gateway to supported endpoints.