---
updatedAt: 2026-09-03T19:19:28.000Z
agentTools:
  projectIndex: https://docs.ternary.app/llms.txt
---

# List a tenant's AI Gateway connections

List the cost-ingestion connections for a tenant. The connection secret is never returned; only its keySuffix (the last 4 characters) is included.

# OpenAPI definition

```json
{
  "openapi": "3.1.0",
  "info": {
    "title": "Core API",
    "description": "Ternary Resource Management API",
    "version": "1.0.0",
    "contact": {},
    "license": {
      "name": "MIT",
      "identifier": "MIT"
    }
  },
  "servers": [
    {
      "url": "https://core-api.ternary.app/api",
      "description": "Core API"
    },
    {
      "url": "https://core-api.eu.ternary.app/api",
      "description": "Core API (EU)"
    }
  ],
  "externalDocs": {
    "description": "Raw JSON",
    "url": "https://core-api.ternary.app/api/docs.json"
  },
  "security": [
    {
      "bearerAuth": []
    }
  ],
  "components": {
    "securitySchemes": {
      "bearerAuth": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "JWT"
      }
    },
    "schemas": {
      "FailureResponse": {
        "type": "object",
        "properties": {
          "code": {
            "type": "string",
            "description": "HTTP status code",
            "example": "400 - Bad Request"
          },
          "message": {
            "type": "string",
            "description": "Error message",
            "example": "ERROR_INVALID_PARAMS"
          },
          "reason": {
            "type": "string",
            "description": "Error reason code"
          }
        },
        "required": [
          "code",
          "message"
        ]
      },
      "FindExternalCostSourceConnectionsResponseBody": {
        "type": "object",
        "properties": {
          "connections": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ExternalCostSourceConnection"
            }
          }
        },
        "required": [
          "connections"
        ]
      },
      "ExternalCostSourceConnection": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Connection ID (UUID) placed in the push URL path",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
            "example": "92f36764-5af2-4ff5-a494-d841f32040be"
          },
          "tenantID": {
            "type": "string",
            "format": "uuid",
            "description": "Tenant this connection lands data for",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
            "example": "92f36764-5af2-4ff5-a494-d841f32040be"
          },
          "createdAt": {
            "type": "string",
            "description": "Timestamp when the connection was minted",
            "readOnly": true
          },
          "createdByID": {
            "type": "string",
            "description": "ID of the user who minted the connection",
            "readOnly": true
          },
          "updatedAt": {
            "type": [
              "string",
              "null"
            ],
            "description": "Timestamp of the most recent update (e.g. revoke); null if never updated",
            "readOnly": true
          },
          "updatedByID": {
            "type": [
              "string",
              "null"
            ],
            "description": "ID of the user who most recently updated the connection",
            "readOnly": true
          },
          "cloudID": {
            "type": "string",
            "description": "ID of the EXTERNAL_PUSH custom-data integration this connection lands data into"
          },
          "keySuffix": {
            "type": "string",
            "description": "Last 4 characters of the connection secret, for matching a key to its masked form in the gateway without exposing it",
            "readOnly": true
          },
          "lastUsedAt": {
            "type": [
              "string",
              "null"
            ],
            "description": "Timestamp of the most recent upload URL issued on this connection; it does not mean the upload landed. Null if it has never been used",
            "readOnly": true
          },
          "provider": {
            "type": "string",
            "description": "LLM gateway this connection belongs to (e.g. litellm, bifrost, portkey)"
          },
          "status": {
            "type": "string",
            "enum": [
              "ACTIVE",
              "REVOKED"
            ],
            "description": "ACTIVE or REVOKED"
          }
        },
        "required": [
          "id",
          "tenantID",
          "createdAt",
          "createdByID",
          "updatedAt",
          "updatedByID",
          "cloudID",
          "keySuffix",
          "lastUsedAt",
          "provider",
          "status"
        ],
        "description": "Binding between a customer-held connection id + shared secret and one tenant's EXTERNAL_PUSH custom-data integration. Authenticates the cost-ingestion receiver's push endpoint."
      }
    }
  },
  "paths": {
    "/external-cost-source-connections": {
      "get": {
        "summary": "List a tenant's AI Gateway connections",
        "tags": [
          "External Cost Source Connection"
        ],
        "operationId": "getExternalCostSourceConnections",
        "description": "List the cost-ingestion connections for a tenant. The connection secret is never returned; only its keySuffix (the last 4 characters) is included.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
              "description": "A unique identifier for an organization",
              "example": "92f36764-5af2-4ff5-a494-d841f32040be"
            },
            "required": true,
            "description": "A unique identifier for an organization",
            "name": "tenantID",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Operation",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FindExternalCostSourceConnectionsResponseBody"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FailureResponse"
                },
                "examples": {
                  "400Response": {
                    "value": {
                      "code": "400 - Bad Request",
                      "message": "ERROR_INVALID_PARAMS"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FailureResponse"
                },
                "examples": {
                  "401Response": {
                    "value": {
                      "code": "401 - Unauthorized",
                      "message": "ERROR_UNAUTHORIZED"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FailureResponse"
                },
                "examples": {
                  "403Response": {
                    "value": {
                      "code": "403 - Forbidden",
                      "message": "ERROR_PERMISSION_DENIED"
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "x-tagGroups": [
    {
      "name": "Core API",
      "tags": [
        "Alert Rule",
        "Alert Rule Events",
        "API Keys",
        "AWS Rate Recommendations",
        "Azure Rate Recommendations",
        "Billing Rules",
        "Budget",
        "Cases",
        "Cost Alerts",
        "Custom Label",
        "Custom Measures",
        "Data Integration",
        "Data Integration: Alibaba",
        "Data Integration: AWS",
        "Data Integration: Azure",
        "Data Integration: Custom Data",
        "Data Integration: Databricks",
        "Data Integration: GCP",
        "Data Integration: Oracle",
        "Data Integration: Snowflake",
        "Dimension Preferences",
        "GCP Rate Recommendations",
        "Integrations",
        "Label Map",
        "MCP Availability",
        "MCP Client Usage",
        "Measure Preferences",
        "MSP Billing Information",
        "MSP Child",
        "MSP Shared Payer Integrations",
        "MSP Tenant Settings",
        "Permissions",
        "Ramp Plans",
        "Report",
        "Resource Subscriptions",
        "Role",
        "Savings Opportunity Filter",
        "Scoped View",
        "Support Tickets",
        "Tenant",
        "Tenant SSO Config",
        "Usage Recommendations",
        "User",
        "User Group Config"
      ]
    }
  ]
}
```