{
  "status": "deprecated",
  "id": 25,
  "typeId": 2,
  "typeName": "Data Source",
  "typeCode": "datasource",
  "slug": "grafana-simple-json-datasource",
  "name": "SimpleJson",
  "description": "simple json datasource",
  "keywords": [],
  "version": "1.4.2",
  "versionStatus": "active",
  "versionSignatureType": "grafana",
  "versionDistributionType": "catalog",
  "versionSignedByOrg": "grafana",
  "versionSignedByOrgName": "Grafana Labs",
  "userId": 0,
  "orgId": 5000,
  "orgName": "Grafana Labs",
  "orgSlug": "grafana",
  "orgUrl": "https://grafana.org",
  "url": "https://github.com/grafana/simple-json-datasource",
  "createdAt": "2016-03-31T13:09:33.000Z",
  "updatedAt": "2024-01-16T09:29:40.000Z",
  "json": {
    "name": "SimpleJson",
    "id": "grafana-simple-json-datasource",
    "type": "datasource",
    "partials": {
      "config": "public/app/plugins/datasource/simplejson/partials/config.html"
    },
    "metrics": true,
    "annotations": true,
    "info": {
      "description": "simple json datasource",
      "author": {
        "name": "Grafana Labs",
        "url": "https://grafana.com"
      },
      "logos": {
        "small": "img/simpleJson_logo.svg",
        "large": "img/simpleJson_logo.svg"
      },
      "links": [
        {
          "name": "GitHub",
          "url": "https://github.com/grafana/simple-json-datasource"
        },
        {
          "name": "MIT License",
          "url": "https://github.com/grafana/simple-json-datasource/blob/master/LICENSE"
        }
      ],
      "version": "1.4.2",
      "updated": "2020-07-31"
    },
    "dependencies": {
      "grafanaVersion": "3.x.x",
      "plugins": []
    }
  },
  "readme": "<h2>Simple JSON Datasource - a generic backend datasource</h2>\n<p>More documentation about datasource plugins can be found in the <a href=\"https://github.com/grafana/grafana/blob/master/docs/sources/plugins/developing/datasources.md\" target=\"_blank\" rel=\"noopener nofollow\">Docs</a>.</p>\n<p>This also serves as a living example implementation of a datasource.</p>\n<p>Your backend needs to implement 4 urls:</p>\n<ul>\n<li><code>/</code> should return 200 ok. Used for \"Test connection\" on the datasource config page.</li>\n<li><code>/search</code> used by the find metric options on the query tab in panels.</li>\n<li><code>/query</code> should return metrics based on input.</li>\n<li><code>/annotations</code> should return annotations.</li>\n</ul>\n<p>Those two urls are optional:</p>\n<ul>\n<li><code>/tag-keys</code> should return tag keys for ad hoc filters.</li>\n<li><code>/tag-values</code> should return tag values for ad hoc filters.</li>\n</ul>\n<h2>Installation</h2>\n<p>To install this plugin using the <code>grafana-cli</code> tool:</p>\n<pre><code>sudo grafana-cli plugins install grafana-simple-json-datasource\nsudo service grafana-server restart\n</code></pre>\n<p>See <a href=\"https://grafana.com/plugins/grafana-simple-json-datasource/installation\" target=\"_blank\" rel=\"noopener nofollow\">here</a> for more\ninformation.</p>\n<h3>Example backend implementations</h3>\n<ul>\n<li><a href=\"https://github.com/bergquist/fake-simple-json-datasource\" target=\"_blank\" rel=\"noopener nofollow\">https://github.com/bergquist/fake-simple-json-datasource</a></li>\n<li><a href=\"https://github.com/smcquay/jsonds\" target=\"_blank\" rel=\"noopener nofollow\">https://github.com/smcquay/jsonds</a></li>\n<li><a href=\"https://github.com/ContextLogic/eventmaster\" target=\"_blank\" rel=\"noopener nofollow\">https://github.com/ContextLogic/eventmaster</a></li>\n<li><a href=\"https://gist.github.com/linar-jether/95ff412f9d19fdf5e51293eb0c09b850\" target=\"_blank\" rel=\"noopener nofollow\">https://gist.github.com/linar-jether/95ff412f9d19fdf5e51293eb0c09b850</a> (Python/pandas backend)</li>\n</ul>\n<h3>Query API</h3>\n<p>Example <code>timeserie</code> request</p>\n<pre><code class=\"language-javascript\">{\n  \"panelId\": 1,\n  \"range\": {\n    \"from\": \"2016-10-31T06:33:44.866Z\",\n    \"to\": \"2016-10-31T12:33:44.866Z\",\n    \"raw\": {\n      \"from\": \"now-6h\",\n      \"to\": \"now\"\n    }\n  },\n  \"rangeRaw\": {\n    \"from\": \"now-6h\",\n    \"to\": \"now\"\n  },\n  \"interval\": \"30s\",\n  \"intervalMs\": 30000,\n  \"targets\": [\n     { \"target\": \"upper_50\", \"refId\": \"A\", \"type\": \"timeserie\" },\n     { \"target\": \"upper_75\", \"refId\": \"B\", \"type\": \"timeserie\" }\n  ],\n  \"adhocFilters\": [{\n    \"key\": \"City\",\n    \"operator\": \"=\",\n    \"value\": \"Berlin\"\n  }],\n  \"format\": \"json\",\n  \"maxDataPoints\": 550\n}\n</code></pre>\n<p>Example <code>timeserie</code> response</p>\n<pre><code class=\"language-javascript\">[\n  {\n    \"target\":\"upper_75\", // The field being queried for\n    \"datapoints\":[\n      [622,1450754160000],  // Metric value as a float , unixtimestamp in milliseconds\n      [365,1450754220000]\n    ]\n  },\n  {\n    \"target\":\"upper_90\",\n    \"datapoints\":[\n      [861,1450754160000],\n      [767,1450754220000]\n    ]\n  }\n]\n</code></pre>\n<p>If the metric selected is <code>\"type\": \"table\"</code>, an example <code>table</code> response:</p>\n<pre><code class=\"language-json\">[\n  {\n    \"columns\":[\n      {\"text\":\"Time\",\"type\":\"time\"},\n      {\"text\":\"Country\",\"type\":\"string\"},\n      {\"text\":\"Number\",\"type\":\"number\"}\n    ],\n    \"rows\":[\n      [1234567,\"SE\",123],\n      [1234567,\"DE\",231],\n      [1234567,\"US\",321]\n    ],\n    \"type\":\"table\"\n  }\n]\n</code></pre>\n<h3>Annotation API</h3>\n<p>The annotation request from the Simple JSON Datasource is a POST request to\nthe <code>/annotations</code> endpoint in your datasource. The JSON request body looks like this:</p>\n<pre><code class=\"language-javascript\">{\n  \"range\": {\n    \"from\": \"2016-04-15T13:44:39.070Z\",\n    \"to\": \"2016-04-15T14:44:39.070Z\"\n  },\n  \"rangeRaw\": {\n    \"from\": \"now-1h\",\n    \"to\": \"now\"\n  },\n  \"annotation\": {\n    \"name\": \"deploy\",\n    \"datasource\": \"Simple JSON Datasource\",\n    \"iconColor\": \"rgba(255, 96, 96, 1)\",\n    \"enable\": true,\n    \"query\": \"#deploy\"\n  }\n}\n</code></pre>\n<p>Grafana expects a response containing an array of annotation objects in the\nfollowing format:</p>\n<pre><code class=\"language-javascript\">[\n  {\n    annotation: annotation, // The original annotation sent from Grafana.\n    time: time, // Time since UNIX Epoch in milliseconds. (required)\n    title: title, // The title for the annotation tooltip. (required)\n    tags: tags, // Tags for the annotation. (optional)\n    text: text // Text for the annotation. (optional)\n  }\n]\n</code></pre>\n<p>Note: If the datasource is configured to connect directly to the backend, you\nalso need to implement an OPTIONS endpoint at <code>/annotations</code> that responds\nwith the correct CORS headers:</p>\n<pre><code>Access-Control-Allow-Headers:accept, content-type\nAccess-Control-Allow-Methods:POST\nAccess-Control-Allow-Origin:*\n</code></pre>\n<h3>Search API</h3>\n<p>Example request</p>\n<pre><code class=\"language-javascript\">{ target: 'upper_50' }\n</code></pre>\n<p>The search api can either return an array or map.</p>\n<p>Example array response</p>\n<pre><code class=\"language-javascript\">[\"upper_25\",\"upper_50\",\"upper_75\",\"upper_90\",\"upper_95\"]\n</code></pre>\n<p>Example map response</p>\n<pre><code class=\"language-javascript\">[ { \"text\" :\"upper_25\", \"value\": 1}, { \"text\" :\"upper_75\", \"value\": 2} ]\n</code></pre>\n<h3>Tag Keys API</h3>\n<p>Example request</p>\n<pre><code class=\"language-javascript\">{ }\n</code></pre>\n<p>The tag keys api returns:</p>\n<pre><code class=\"language-javascript\">[\n    {\"type\":\"string\",\"text\":\"City\"},\n    {\"type\":\"string\",\"text\":\"Country\"}\n]\n</code></pre>\n<h3>Tag Values API</h3>\n<p>Example request</p>\n<pre><code class=\"language-javascript\">{\"key\": \"City\"}\n</code></pre>\n<p>The tag values api returns:</p>\n<pre><code class=\"language-javascript\">[\n    {'text': 'Eins!'},\n    {'text': 'Zwei'},\n    {'text': 'Drei!'}\n]\n</code></pre>\n<h3>Dev setup</h3>\n<p>This plugin requires node 6.10.0</p>\n<pre><code>npm install -g yarn\nyarn install\nnpm run build\n</code></pre>\n<h3>Changelog</h3>\n<p>1.4.1</p>\n<ul>\n<li>Fix for query editor to be compatible with Grafana 7+ (broke due to change in Grafana).</li>\n</ul>\n<p>1.4.0</p>\n<ul>\n<li>Support for adhoc filters:<ul>\n<li>added tag-keys + tag-values api</li>\n<li>added adHocFilters parameter to query body</li>\n</ul>\n</li>\n</ul>\n<p>1.3.5</p>\n<ul>\n<li>Fix for dropdowns in query editor to allow writing template variables (broke due to change in Grafana).</li>\n</ul>\n<p>1.3.4</p>\n<ul>\n<li>Adds support for With Credentials (sends grafana cookies with request) when using Direct mode</li>\n<li>Fix for the typeahead component for metrics dropdown (<code>/search</code> endpoint).</li>\n</ul>\n<p>1.3.3</p>\n<ul>\n<li>Adds support for basic authentication</li>\n</ul>\n<p>1.2.4</p>\n<ul>\n<li>Add support returning sets in the search endpoint</li>\n</ul>\n<p>1.2.3</p>\n<ul>\n<li>Allow nested templates in find metric query. #23</li>\n</ul>\n<p>1.2.2</p>\n<ul>\n<li>Dont execute hidden queries</li>\n<li>Template support for metrics queries</li>\n<li>Template support for annotation queries</li>\n</ul>\n<h3>If using Grafana 2.6</h3>\n<p>NOTE!\nfor grafana 2.6 please use <a href=\"https://github.com/grafana/simple-json-datasource/commit/b78720f6e00c115203d8f4c0e81ccd3c16001f94\" target=\"_blank\" rel=\"noopener nofollow\">this version</a></p>\n<p>Copy the data source you want to <code>/public/app/plugins/datasource/</code>. Then restart grafana-server. The new data source should now be available in the data source type dropdown in the Add Data Source View.</p>\n",
  "changelog": "",
  "statusContext": "This plugin is now **DEPRECATED** and **NO LONGER MAINTAINED** by the Grafana team. This deprecation means that this plugin won't receive any feature updates or bug fixes. After 6 months (End of June 2024), the plugin will reach EOL and the repository will be archived. You can use [Grafana Infinity data source plugin](https://grafana.com/grafana/plugins/yesoreyeram-infinity-datasource/) as an alternative for connecting to JSON/CSV/XML/GraphQL endpoints. Refer the migration guide [here](https://github.com/grafana/grafana-infinity-datasource/discussions/740), if you still prefer connecting to existing grafana simple JSON backend server implementation. Alternatively, If you are looking for building your own plugin, consider the examples [here](https://github.com/grafana/grafana-plugin-examples) and documentation [here](https://grafana.com/developers).",
  "downloads": 283385097,
  "verified": false,
  "featured": 0,
  "internal": false,
  "downloadSlug": "grafana-simple-json-datasource",
  "popularity": 0.2063,
  "signatureType": "grafana",
  "grafanaDependency": "",
  "packages": {
    "any": {
      "md5": "bc81611bb73b2059bc311188390dc2b0",
      "sha256": "515c6dd38310c97c735bba34b5f8038b5909677dad8f09626d1189c06139c8c8",
      "packageName": "any",
      "downloadUrl": "/api/plugins/grafana-simple-json-datasource/versions/1.4.2/download"
    }
  },
  "links": [
    {
      "rel": "self",
      "href": "/plugins/grafana-simple-json-datasource"
    },
    {
      "rel": "versions",
      "href": "/plugins/grafana-simple-json-datasource/versions"
    },
    {
      "rel": "latest",
      "href": "/plugins/grafana-simple-json-datasource/versions/1.4.2"
    },
    {
      "rel": "download",
      "href": "/plugins/grafana-simple-json-datasource/versions/1.4.2/download"
    }
  ],
  "angularDetected": true,
  "repositoryUrl": "https://github.com/grafana/simple-json-datasource",
  "licenseUrl": "https://github.com/grafana/simple-json-datasource/blob/master/LICENSE",
  "raiseAnIssueUrl": null,
  "scopes": [
    "universal"
  ],
  "federalDisabled": false,
  "managed": {
    "enabled": false
  },
  "hasDocumentation": false,
  "releaseCountLastYear": 0,
  "datasourceQueryCount": 1,
  "activeInstances": 59180
}