Share via


Connections - List

List all connections in the project, without populating connection credentials

GET {endpoint}/connections?api-version=v1
GET {endpoint}/connections?api-version=v1&connectionType={connectionType}&defaultConnection={defaultConnection}

URI Parameters

Name In Required Type Description
endpoint
path True

string (uri)

Project endpoint. In the form "https://<your-ai-services-account-name>.services.ai.azure.com/api/projects/_project" if your Foundry Hub has only one Project, or to use the default Project in your Hub. Or in the form "https://<your-ai-services-account-name>.services.ai.azure.com/api/projects/<your-project-name>" if you want to explicitly specify the Foundry Project name.

api-version
query True

string

minLength: 1

The API version to use for this operation.

connectionType
query

ConnectionType

List connections of this specific type

defaultConnection
query

boolean

List connections that are default connections

Request Header

Name Required Type Description
x-ms-client-request-id

string (uuid)

An opaque, globally-unique, client-generated string identifier for the request.

Responses

Name Type Description
200 OK

PagedConnection

The request has succeeded.

Headers

x-ms-client-request-id: string

Other Status Codes

Azure.Core.Foundations.ErrorResponse

An unexpected error response.

Headers

x-ms-error-code: string

Security

OAuth2Auth

Type: oauth2
Flow: implicit
Authorization URL: https://login.microsoftonline.com/common/oauth2/v2.0/authorize

Scopes

Name Description
https://ai.azure.com/.default

Examples

Connections_List_MaximumSet

Sample request

GET {endpoint}/connections?api-version=v1&connectionType=AzureOpenAI&defaultConnection=True

Sample response

{
  "value": [
    {
      "name": "we",
      "id": "unique-id",
      "type": "AzureOpenAI",
      "target": "bbzo",
      "isDefault": true,
      "credentials": {
        "type": "BaseCredentials"
      },
      "metadata": {
        "key9765": "voknfqanbxnseqg"
      }
    }
  ],
  "nextLink": "https://microsoft.com/a"
}

Definitions

Name Description
ApiKeyCredentials

API Key Credential definition

Azure.Core.Foundations.Error

The error object.

Azure.Core.Foundations.ErrorResponse

A response containing error details.

Azure.Core.Foundations.InnerError

An object containing more specific information about the error. As per Microsoft One API guidelines - https://github.com/microsoft/api-guidelines/blob/vNext/azure/Guidelines.md#handling-errors.

Connection

Response from the list and get connections operations

ConnectionType

The Type (or category) of the connection

CredentialType

The credential type used by the connection

CustomCredential

Custom credential definition

EntraIDCredentials

Entra ID credential definition

NoAuthenticationCredentials

Credentials that do not require authentication

PagedConnection

Paged collection of Connection items

SASCredentials

Shared Access Signature (SAS) credential definition

ApiKeyCredentials

API Key Credential definition

Name Type Description
key

string

API Key

type string:

ApiKey

The type of credential used by the connection

Azure.Core.Foundations.Error

The error object.

Name Type Description
code

string

One of a server-defined set of error codes.

details

Azure.Core.Foundations.Error[]

An array of details about specific errors that led to this reported error.

innererror

Azure.Core.Foundations.InnerError

An object containing more specific information than the current object about the error.

message

string

A human-readable representation of the error.

target

string

The target of the error.

Azure.Core.Foundations.ErrorResponse

A response containing error details.

Name Type Description
error

Azure.Core.Foundations.Error

The error object.

Azure.Core.Foundations.InnerError

An object containing more specific information about the error. As per Microsoft One API guidelines - https://github.com/microsoft/api-guidelines/blob/vNext/azure/Guidelines.md#handling-errors.

Name Type Description
code

string

One of a server-defined set of error codes.

innererror

Azure.Core.Foundations.InnerError

Inner error.

Connection

Response from the list and get connections operations

Name Type Description
credentials BaseCredentials:

The credentials used by the connection

id

string

A unique identifier for the connection, generated by the service

isDefault

boolean

Whether the connection is tagged as the default connection of its type

metadata

object

Metadata of the connection

name

string

The friendly name of the connection, provided by the user.

target

string

The connection URL to be used for this service

type

ConnectionType

Category of the connection

ConnectionType

The Type (or category) of the connection

Value Description
AzureOpenAI

Azure OpenAI Service

AzureBlob

Azure Blob Storage, with specified container

AzureStorageAccount

Azure Blob Storage, with container not specified (used by Agents)

CognitiveSearch

Azure AI Search

CosmosDB

CosmosDB

ApiKey

Generic connection that uses API Key authentication

AppConfig

Application Configuration

AppInsights

Application Insights

CustomKeys

Custom Keys

CredentialType

The credential type used by the connection

Value Description
ApiKey

API Key credential

AAD

Entra ID credential (formerly known as AAD)

SAS

Shared Access Signature (SAS) credential

CustomKeys

Custom credential

None

No credential

CustomCredential

Custom credential definition

Name Type Description
keys

object

The credential type

type string:

CustomKeys

The type of credential used by the connection

EntraIDCredentials

Entra ID credential definition

Name Type Description
type string:

AAD

The type of credential used by the connection

NoAuthenticationCredentials

Credentials that do not require authentication

Name Type Description
type string:

None

The type of credential used by the connection

PagedConnection

Paged collection of Connection items

Name Type Description
nextLink

string (uri)

The link to the next page of items

value

Connection[]

The Connection items on this page

SASCredentials

Shared Access Signature (SAS) credential definition

Name Type Description
SAS

string

SAS token

type string:

SAS

The type of credential used by the connection