Grafana · Capability

Grafana HTTP API — Teams

Grafana HTTP API — Teams. 7 operations. Lead operation: Create team. Self-contained Naftiko capability covering one Grafana business surface.

Run with Naftiko GrafanaTeams

What You Can Do

POST
Createteam — Create team
/v1/teams
GET
Searchteams — Search teams
/v1/teams/search
GET
Getteambyid — Get team by ID
/v1/teams/{id}
PUT
Updateteam — Update team
/v1/teams/{id}
DELETE
Deleteteam — Delete team
/v1/teams/{id}
GET
Getteammembers — Get team members
/v1/teams/{id}/members
POST
Addteammember — Add team member
/v1/teams/{id}/members

MCP Tools

create-team

Create team

search-teams

Search teams

read-only idempotent
get-team-id

Get team by ID

read-only idempotent
update-team

Update team

idempotent
delete-team

Delete team

idempotent
get-team-members

Get team members

read-only idempotent
add-team-member

Add team member

Capability Spec

grafana-teams.yaml Raw ↑
naftiko: 1.0.0-alpha2
info:
  label: Grafana HTTP API — Teams
  description: 'Grafana HTTP API — Teams. 7 operations. Lead operation: Create team. Self-contained Naftiko capability covering
    one Grafana business surface.'
  tags:
  - Grafana
  - Teams
  created: '2026-05-19'
  modified: '2026-05-19'
binds:
- namespace: env
  keys:
    GRAFANA_API_KEY: GRAFANA_API_KEY
capability:
  consumes:
  - type: http
    namespace: grafana-teams
    baseUri: https://{instance}.grafana.net/api
    description: Grafana HTTP API — Teams business capability. Self-contained, no shared references.
    resources:
    - name: teams
      path: /teams
      operations:
      - name: createteam
        method: POST
        description: Create team
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: true
    - name: teams-search
      path: /teams/search
      operations:
      - name: searchteams
        method: GET
        description: Search teams
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: query
          in: query
          type: string
        - name: page
          in: query
          type: integer
        - name: perpage
          in: query
          type: integer
    - name: teams-id
      path: /teams/{id}
      operations:
      - name: getteambyid
        method: GET
        description: Get team by ID
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: id
          in: path
          type: integer
          required: true
      - name: updateteam
        method: PUT
        description: Update team
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: id
          in: path
          type: integer
          required: true
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: true
      - name: deleteteam
        method: DELETE
        description: Delete team
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: id
          in: path
          type: integer
          required: true
    - name: teams-id-members
      path: /teams/{id}/members
      operations:
      - name: getteammembers
        method: GET
        description: Get team members
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: id
          in: path
          type: integer
          required: true
      - name: addteammember
        method: POST
        description: Add team member
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: id
          in: path
          type: integer
          required: true
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: true
    authentication:
      type: bearer
      token: '{{env.GRAFANA_API_KEY}}'
  exposes:
  - type: rest
    namespace: grafana-teams-rest
    port: 8080
    description: REST adapter for Grafana HTTP API — Teams. One Spectral-compliant resource per consumed operation, prefixed
      with /v1.
    resources:
    - path: /v1/teams
      name: teams
      description: REST surface for teams.
      operations:
      - method: POST
        name: createteam
        description: Create team
        call: grafana-teams.createteam
        with:
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/teams/search
      name: teams-search
      description: REST surface for teams-search.
      operations:
      - method: GET
        name: searchteams
        description: Search teams
        call: grafana-teams.searchteams
        with:
          query: rest.query
          page: rest.page
          perpage: rest.perpage
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/teams/{id}
      name: teams-id
      description: REST surface for teams-id.
      operations:
      - method: GET
        name: getteambyid
        description: Get team by ID
        call: grafana-teams.getteambyid
        with:
          id: rest.id
        outputParameters:
        - type: object
          mapping: $.
      - method: PUT
        name: updateteam
        description: Update team
        call: grafana-teams.updateteam
        with:
          id: rest.id
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
      - method: DELETE
        name: deleteteam
        description: Delete team
        call: grafana-teams.deleteteam
        with:
          id: rest.id
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/teams/{id}/members
      name: teams-id-members
      description: REST surface for teams-id-members.
      operations:
      - method: GET
        name: getteammembers
        description: Get team members
        call: grafana-teams.getteammembers
        with:
          id: rest.id
        outputParameters:
        - type: object
          mapping: $.
      - method: POST
        name: addteammember
        description: Add team member
        call: grafana-teams.addteammember
        with:
          id: rest.id
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
  - type: mcp
    namespace: grafana-teams-mcp
    port: 9090
    transport: http
    description: MCP adapter for Grafana HTTP API — Teams. One tool per consumed operation, routed inline through this capability's
      consumes block.
    tools:
    - name: create-team
      description: Create team
      hints:
        readOnly: false
        destructive: false
        idempotent: false
      call: grafana-teams.createteam
      with:
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.
    - name: search-teams
      description: Search teams
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: grafana-teams.searchteams
      with:
        query: tools.query
        page: tools.page
        perpage: tools.perpage
      outputParameters:
      - type: object
        mapping: $.
    - name: get-team-id
      description: Get team by ID
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: grafana-teams.getteambyid
      with:
        id: tools.id
      outputParameters:
      - type: object
        mapping: $.
    - name: update-team
      description: Update team
      hints:
        readOnly: false
        destructive: false
        idempotent: true
      call: grafana-teams.updateteam
      with:
        id: tools.id
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.
    - name: delete-team
      description: Delete team
      hints:
        readOnly: false
        destructive: true
        idempotent: true
      call: grafana-teams.deleteteam
      with:
        id: tools.id
      outputParameters:
      - type: object
        mapping: $.
    - name: get-team-members
      description: Get team members
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: grafana-teams.getteammembers
      with:
        id: tools.id
      outputParameters:
      - type: object
        mapping: $.
    - name: add-team-member
      description: Add team member
      hints:
        readOnly: false
        destructive: false
        idempotent: false
      call: grafana-teams.addteammember
      with:
        id: tools.id
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.