Consul Connect Intentions API

Service-to-service traffic authorization

Operations 6

GET /connect/intentions List all intentions #
GET /connect/intentions/exact Read intention by source and destination #
PUT /connect/intentions/exact Create or replace intention by source and destination #
DELETE /connect/intentions/exact Delete intention by source and destination #
GET /connect/intentions/check Check if a connection would be authorized #
GET /connect/intentions/match List intentions matching a source or destination #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/consul-connect-intentions-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

consul-connect-intentions-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: HashiCorp Consul Connect CA Intentions API
  description: HTTP API for the Consul Connect service mesh subsystem of HashiCorp Consul. Connect APIs cover intentions (service-to-service traffic authorization) and certificate authority (CA) management for the built-in mesh CA. ACL tokens are typically passed via the X-Consul-Token header.
  version: 1.0.0
  contact:
    name: HashiCorp Consul
    url: https://developer.hashicorp.com/consul
servers:
- url: http://localhost:8500/v1
  description: Local Consul agent
- url: https://consul.example.com/v1
  description: Production Consul cluster
security:
- ConsulToken: []
tags:
- name: Intentions
  description: Service-to-service traffic authorization
paths:
  /connect/intentions:
    get:
      operationId: listIntentions
      summary: List all intentions
      tags:
      - Intentions
      parameters:
      - $ref: '#/components/parameters/Namespace'
      - $ref: '#/components/parameters/Partition'
      - name: filter
        in: query
        description: Filter expression for intentions
        schema:
          type: string
      responses:
        '200':
          description: A list of intentions
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Intention'
  /connect/intentions/exact:
    get:
      operationId: readIntentionByExact
      summary: Read intention by source and destination
      tags:
      - Intentions
      parameters:
      - name: source
        in: query
        required: true
        schema:
          type: string
      - name: destination
        in: query
        required: true
        schema:
          type: string
      - $ref: '#/components/parameters/Namespace'
      - $ref: '#/components/parameters/Partition'
      responses:
        '200':
          description: Matching intention
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Intention'
    put:
      operationId: upsertIntentionByExact
      summary: Create or replace intention by source and destination
      tags:
      - Intentions
      parameters:
      - name: source
        in: query
        required: true
        schema:
          type: string
      - name: destination
        in: query
        required: true
        schema:
          type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/IntentionInput'
      responses:
        '200':
          description: Intention upserted
    delete:
      operationId: deleteIntentionByExact
      summary: Delete intention by source and destination
      tags:
      - Intentions
      parameters:
      - name: source
        in: query
        required: true
        schema:
          type: string
      - name: destination
        in: query
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Intention deleted
  /connect/intentions/check:
    get:
      operationId: checkIntention
      summary: Check if a connection would be authorized
      tags:
      - Intentions
      parameters:
      - name: source
        in: query
        required: true
        schema:
          type: string
      - name: destination
        in: query
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Authorization decision
          content:
            application/json:
              schema:
                type: object
                properties:
                  Allowed:
                    type: boolean
  /connect/intentions/match:
    get:
      operationId: matchIntentions
      summary: List intentions matching a source or destination
      tags:
      - Intentions
      parameters:
      - name: by
        in: query
        required: true
        schema:
          type: string
          enum:
          - source
          - destination
      - name: name
        in: query
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Matching intentions
          content:
            application/json:
              schema:
                type: object
                additionalProperties:
                  type: array
                  items:
                    $ref: '#/components/schemas/Intention'
components:
  parameters:
    Namespace:
      name: ns
      in: query
      description: Namespace (Consul Enterprise)
      schema:
        type: string
    Partition:
      name: partition
      in: query
      description: Admin partition (Consul Enterprise)
      schema:
        type: string
  schemas:
    Intention:
      type: object
      properties:
        ID:
          type: string
        SourceName:
          type: string
        DestinationName:
          type: string
        SourceNS:
          type: string
        DestinationNS:
          type: string
        Action:
          type: string
          enum:
          - allow
          - deny
        Description:
          type: string
        Precedence:
          type: integer
        Meta:
          type: object
          additionalProperties:
            type: string
        CreateIndex:
          type: integer
        ModifyIndex:
          type: integer
    IntentionInput:
      type: object
      properties:
        Action:
          type: string
          enum:
          - allow
          - deny
        Description:
          type: string
        Meta:
          type: object
          additionalProperties:
            type: string
  securitySchemes:
    ConsulToken:
      type: apiKey
      in: header
      name: X-Consul-Token