> ## Documentation Index
> Fetch the complete documentation index at: https://docs.igrisecurity.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Test an upstream

> Probes an MCP upstream URL or an LLM provider with the credential you send, without saving anything. Probe failures still return `200`, with `reachable: false` and the reason in `details`. URLs that resolve to internal addresses are refused.

**Required permission:** `connections:write`




## OpenAPI

````yaml /api-reference/openapi.yaml post /api/v1/connections/test
openapi: 3.1.0
info:
  title: Igris Management API
  version: '1'
  description: >-
    REST API for managing Igris connections, policies, sessions, audit events
    and alerts.
servers:
  - url: https://api.igrisecurity.com
security:
  - bearerAuth: []
tags:
  - name: Connections
  - name: Policies
  - name: Sessions
  - name: Audit Events
  - name: Incidents
  - name: Webhooks
  - name: API Keys
  - name: Members
  - name: LLM Providers
  - name: LLM Cost
  - name: Observe
paths:
  /api/v1/connections/test:
    post:
      tags:
        - Connections
      summary: Test an upstream
      description: >
        Probes an MCP upstream URL or an LLM provider with the credential you
        send, without saving anything. Probe failures still return `200`, with
        `reachable: false` and the reason in `details`. URLs that resolve to
        internal addresses are refused.


        **Required permission:** `connections:write`
      operationId: testConnection
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - serverType
              properties:
                serverType:
                  type: string
                  enum:
                    - http
                    - llm
                upstreamUrl:
                  type: string
                  format: uri
                  description: Required for `http`.
                llmProvider:
                  type: string
                  description: Required for `llm`.
                credential:
                  type: string
                authType:
                  type: string
                  enum:
                    - none
                    - bearer
                    - header
                    - api_key
                  default: none
                authConfig:
                  type:
                    - object
                    - 'null'
                customBaseUrl:
                  type: string
                  format: uri
                slug:
                  type: string
                  description: An existing connection to take stored values from.
                customHeaders:
                  type: object
                  additionalProperties:
                    type:
                      - string
                      - 'null'
            example:
              serverType: http
              upstreamUrl: https://api.github.com/mcp
              authType: bearer
              credential: ghp_xxx
      responses:
        '200':
          description: The probe result.
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      reachable:
                        type: boolean
                      latencyMs:
                        type: integer
                      details:
                        type: string
              example:
                data:
                  reachable: true
                  latencyMs: 142
                  details: HTTP 200 OK in 142ms
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '422':
          $ref: '#/components/responses/ZodValidationFailed'
components:
  responses:
    Unauthorized:
      description: No valid session or API key, or the key's creator is no longer a member.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error: Unauthorized
    Forbidden:
      description: The caller lacks the required permission.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ForbiddenError'
    ZodValidationFailed:
      description: Validation failed.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ZodValidationError'
  schemas:
    Error:
      type: object
      required:
        - error
      properties:
        error:
          type: string
    ForbiddenError:
      type: object
      properties:
        error:
          type: string
          example: Forbidden
        required:
          type: string
          description: The permission the caller lacks.
          example: policies:write
    ZodValidationError:
      type: object
      properties:
        success:
          type: boolean
          const: false
        error:
          type: object
          properties:
            name:
              type: string
              example: ZodError
            message:
              type: string
              description: JSON string of the validation issues.
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: ig_...
      description: >-
        An Igris API key. It acts with the current role and permission overrides
        of the member who created it.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.