plugin.json 845 B

12345678910111213141516171819202122232425262728293031
  1. {
  2. "type": "datasource",
  3. "name": "Test Datasource",
  4. "id": "test-ds",
  5. "routes": [
  6. {
  7. "path": "tokenTest",
  8. "method": "*",
  9. "url": "https://management.azure.com",
  10. "tokenAuth": {
  11. "url": "https://login.microsoftonline.com/{{.JsonData.tenantId}}/oauth2/token",
  12. "params": {
  13. "grant_type": "client_credentials",
  14. "client_id": "{{.JsonData.clientId}}",
  15. "client_secret": "{{.SecureJsonData.clientSecret}}",
  16. "resource": "https://management.azure.com/"
  17. }
  18. }
  19. },
  20. {
  21. "path": "api/v4/",
  22. "method": "*",
  23. "url": "http://localhost:3333",
  24. "headers": [
  25. {"name": "X-CH-Auth-API-Token", "content": "test {{.SecureJsonData.token}}"},
  26. {"name": "X-CH-Auth-Email", "content": "test {{.JsonData.email}}"}
  27. ]
  28. }
  29. ]
  30. }