diff --git a/specification/ai/Azure.AI.Projects/connections/models.tsp b/specification/ai/Azure.AI.Projects/connections/models.tsp index e0a059cdd2f6..738de331bb60 100644 --- a/specification/ai/Azure.AI.Projects/connections/models.tsp +++ b/specification/ai/Azure.AI.Projects/connections/models.tsp @@ -15,7 +15,6 @@ namespace Azure.AI.Projects; @discriminator("authType") @added(Versions.v2025_05_01) model Connection { - @doc("The name of the resource") @visibility(Lifecycle.Read) @key("name") @@ -45,7 +44,6 @@ model Connection { @doc("A base class for connection credentials") @discriminator("authType") model BaseCredentials { - @doc("The type of credential used by the connection") @visibility(Lifecycle.Read) authType: CredentialType; @@ -53,7 +51,6 @@ model BaseCredentials { @doc("API Key Credential definition") model ApiKeyCredentials extends BaseCredentials { - @doc("The credentail type") @visibility(Lifecycle.Read) authType: CredentialType.apiKey; @@ -66,7 +63,6 @@ model ApiKeyCredentials extends BaseCredentials { #suppress "@azure-tools/typespec-azure-core/casing-style" @doc("Entra ID credential definition") model EntraIDCredentials extends BaseCredentials { - @doc("The credential type") @visibility(Lifecycle.Read) authType: CredentialType.entraId; @@ -74,7 +70,6 @@ model EntraIDCredentials extends BaseCredentials { @doc("Custom credential defintion") model CustomCredential extends BaseCredentials { - @doc("The credential type ") @visibility(Lifecycle.Read) authType: CredentialType.custom; @@ -83,7 +78,6 @@ model CustomCredential extends BaseCredentials { #suppress "@azure-tools/typespec-azure-core/casing-style" @doc("Shared Access Signature (SAS) credential definition") model SASCredentials extends BaseCredentials { - @doc("The credential type") @visibility(Lifecycle.Read) authType: CredentialType.SAS; @@ -95,7 +89,6 @@ model SASCredentials extends BaseCredentials { @doc("Credentials that do not require authentication") model NoAuthenticationCredentials extends BaseCredentials { - @doc("The credential type ") @visibility(Lifecycle.Read) authType: CredentialType.None; diff --git a/specification/ai/Azure.AI.Projects/connections/routes.tsp b/specification/ai/Azure.AI.Projects/connections/routes.tsp index 5009073c659c..adc1c5a8473b 100644 --- a/specification/ai/Azure.AI.Projects/connections/routes.tsp +++ b/specification/ai/Azure.AI.Projects/connections/routes.tsp @@ -23,9 +23,15 @@ interface Connections { get is ConnectionOperations.ResourceRead; @doc("Get a connection by name, with its connection credentials") + @TypeSpec.Http.post @Rest.actionSeparator("/") @Rest.action("withCredentials") - getWithCredentials is ConnectionOperations.ResourceRead; + getWithCredentials is ConnectionOperations.ResourceAction< + Connection, + {}, + Connection + >; + @doc("List all connections in the project, without populating connection credentials") list is ConnectionOperations.ResourceList< Connection, @@ -41,4 +47,28 @@ interface Connections { ...StandardListQueryParameters; }> >; + + @doc("List all connections in the project, with their connection credentials") + @TypeSpec.Http.post + @Rest.actionSeparator("/") + @Rest.action("withCredentials") + listWithCredentials is ConnectionOperations.ResourceCollectionAction< + Connection, + { + @doc("List connections of this specific type") + @query("connectionType") + connectionType?: ConnectionType; + + @doc("List connections that are default connections") + @query("defaultConnection") + defaultConnection?: boolean; + + ...StandardListQueryParameters; + }, + Internal.ConnectionPaged + >; +} + +namespace Internal { + model ConnectionPaged is Azure.Core.Page; } diff --git a/specification/ai/Azure.AI.Projects/evaluations/models.tsp b/specification/ai/Azure.AI.Projects/evaluations/models.tsp index 9a25d2e7d154..8b0ba0f283df 100644 --- a/specification/ai/Azure.AI.Projects/evaluations/models.tsp +++ b/specification/ai/Azure.AI.Projects/evaluations/models.tsp @@ -77,5 +77,4 @@ model Evaluation { @doc("Evaluators to be used for the evaluation.") evaluators: Record; - } diff --git a/specification/ai/Azure.AI.Projects/main.tsp b/specification/ai/Azure.AI.Projects/main.tsp index 367cc5b8f00b..076330a08d0b 100644 --- a/specification/ai/Azure.AI.Projects/main.tsp +++ b/specification/ai/Azure.AI.Projects/main.tsp @@ -34,7 +34,10 @@ namespace Azure.AI { "Azure AI", { @doc(""" - Project endpoint in the form of: https://.services.ai.azure.com/api/projects/ + Project endpoint. In the form "https://.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://.services.ai.azure.com/api/projects/" if you want to explicitly + specify the Foundry Project name. """) endpoint: url, } diff --git a/specification/ai/data-plane/Azure.AI.Projects/preview/2025-05-15-preview/azure-ai-projects-1dp.json b/specification/ai/data-plane/Azure.AI.Projects/preview/2025-05-15-preview/azure-ai-projects-1dp.json index 61de4d68e4d6..62f2c639353c 100644 --- a/specification/ai/data-plane/Azure.AI.Projects/preview/2025-05-15-preview/azure-ai-projects-1dp.json +++ b/specification/ai/data-plane/Azure.AI.Projects/preview/2025-05-15-preview/azure-ai-projects-1dp.json @@ -19,7 +19,7 @@ { "name": "endpoint", "in": "path", - "description": "Project endpoint in the form of: https://.services.ai.azure.com/api/projects/", + "description": "Project endpoint. In the form \"https://.services.ai.azure.com/api/projects/_project\"\nif your Foundry Hub has only one Project, or to use the default Project in your Hub. Or in the form \n\"https://.services.ai.azure.com/api/projects/\" if you want to explicitly\nspecify the Foundry Project name.", "required": true, "type": "string", "format": "uri", @@ -230,7 +230,7 @@ } }, "/connections/{name}/withCredentials": { - "get": { + "post": { "operationId": "Connections_GetWithCredentials", "description": "Get a connection by name, with its connection credentials", "parameters": [ @@ -277,6 +277,135 @@ } } }, + "/connections/withCredentials": { + "post": { + "operationId": "Connections_ListWithCredentials", + "description": "List all connections in the project, with their connection credentials", + "parameters": [ + { + "$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter" + }, + { + "name": "connectionType", + "in": "query", + "description": "List connections of this specific type", + "required": false, + "type": "string", + "enum": [ + "AzureOpenAI", + "AzureBlob", + "AzureStorageAccount", + "CognitiveSearch", + "CosmosDB", + "ApiKey", + "AppConfig", + "AppInsights", + "CustomKeys" + ], + "x-ms-enum": { + "name": "ConnectionType", + "modelAsString": true, + "values": [ + { + "name": "AzureOpenAI", + "value": "AzureOpenAI", + "description": "Azure OpenAI Service" + }, + { + "name": "AzureBlobStorage", + "value": "AzureBlob", + "description": "Azure Blob Storage, with specified container" + }, + { + "name": "AzureStorageAccount", + "value": "AzureStorageAccount", + "description": "Azure Blob Storage, with container not specified (used by Assistants)" + }, + { + "name": "AzureAISearch", + "value": "CognitiveSearch", + "description": "Azure AI Search" + }, + { + "name": "CosmosDB", + "value": "CosmosDB", + "description": "CosmosDB" + }, + { + "name": "APIKey", + "value": "ApiKey", + "description": "Generic connection that uses API Key authentication" + }, + { + "name": "ApplicationConfiguration", + "value": "AppConfig", + "description": "Application Configuration" + }, + { + "name": "ApplicationInsights", + "value": "AppInsights", + "description": "Application Insights" + }, + { + "name": "Custom", + "value": "CustomKeys", + "description": "Custom Keys" + } + ] + } + }, + { + "name": "defaultConnection", + "in": "query", + "description": "List connections that are default connections", + "required": false, + "type": "boolean" + }, + { + "$ref": "#/parameters/Azure.Core.TopQueryParameter" + }, + { + "$ref": "#/parameters/Azure.Core.SkipQueryParameter" + }, + { + "$ref": "#/parameters/Azure.Core.MaxPageSizeQueryParameter" + }, + { + "$ref": "#/parameters/Azure.Core.ClientRequestIdHeader" + } + ], + "responses": { + "200": { + "description": "The request has succeeded.", + "schema": { + "$ref": "#/definitions/Internal.ConnectionPaged" + }, + "headers": { + "x-ms-client-request-id": { + "type": "string", + "format": "uuid", + "description": "An opaque, globally-unique, client-generated string identifier for the request." + } + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/Azure.Core.Foundations.ErrorResponse" + }, + "headers": { + "x-ms-error-code": { + "type": "string", + "description": "String error code indicating what went wrong." + } + } + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } + }, "/datasets": { "get": { "operationId": "Datasets_ListLatest", @@ -2241,6 +2370,28 @@ ], "x-ms-discriminator-value": "dataset" }, + "Internal.ConnectionPaged": { + "type": "object", + "description": "Paged collection of Connection items", + "properties": { + "value": { + "type": "array", + "description": "The Connection items on this page", + "items": { + "$ref": "#/definitions/Connection" + }, + "x-ms-identifiers": [] + }, + "nextLink": { + "type": "string", + "format": "uri", + "description": "The link to the next page of items" + } + }, + "required": [ + "value" + ] + }, "ListSortOrder": { "type": "string", "description": "The available sorting options when requesting a list of response objects.", diff --git a/specification/ai/data-plane/Azure.AI.Projects/stable/2025-05-01/azure-ai-projects-1dp.json b/specification/ai/data-plane/Azure.AI.Projects/stable/2025-05-01/azure-ai-projects-1dp.json index 7c1b91502f14..b55f77784708 100644 --- a/specification/ai/data-plane/Azure.AI.Projects/stable/2025-05-01/azure-ai-projects-1dp.json +++ b/specification/ai/data-plane/Azure.AI.Projects/stable/2025-05-01/azure-ai-projects-1dp.json @@ -19,7 +19,7 @@ { "name": "endpoint", "in": "path", - "description": "Project endpoint in the form of: https://.services.ai.azure.com/api/projects/", + "description": "Project endpoint. In the form \"https://.services.ai.azure.com/api/projects/_project\"\nif your Foundry Hub has only one Project, or to use the default Project in your Hub. Or in the form \n\"https://.services.ai.azure.com/api/projects/\" if you want to explicitly\nspecify the Foundry Project name.", "required": true, "type": "string", "format": "uri", @@ -230,7 +230,7 @@ } }, "/connections/{name}/withCredentials": { - "get": { + "post": { "operationId": "Connections_GetWithCredentials", "description": "Get a connection by name, with its connection credentials", "parameters": [ @@ -277,6 +277,135 @@ } } }, + "/connections/withCredentials": { + "post": { + "operationId": "Connections_ListWithCredentials", + "description": "List all connections in the project, with their connection credentials", + "parameters": [ + { + "$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter" + }, + { + "name": "connectionType", + "in": "query", + "description": "List connections of this specific type", + "required": false, + "type": "string", + "enum": [ + "AzureOpenAI", + "AzureBlob", + "AzureStorageAccount", + "CognitiveSearch", + "CosmosDB", + "ApiKey", + "AppConfig", + "AppInsights", + "CustomKeys" + ], + "x-ms-enum": { + "name": "ConnectionType", + "modelAsString": true, + "values": [ + { + "name": "AzureOpenAI", + "value": "AzureOpenAI", + "description": "Azure OpenAI Service" + }, + { + "name": "AzureBlobStorage", + "value": "AzureBlob", + "description": "Azure Blob Storage, with specified container" + }, + { + "name": "AzureStorageAccount", + "value": "AzureStorageAccount", + "description": "Azure Blob Storage, with container not specified (used by Assistants)" + }, + { + "name": "AzureAISearch", + "value": "CognitiveSearch", + "description": "Azure AI Search" + }, + { + "name": "CosmosDB", + "value": "CosmosDB", + "description": "CosmosDB" + }, + { + "name": "APIKey", + "value": "ApiKey", + "description": "Generic connection that uses API Key authentication" + }, + { + "name": "ApplicationConfiguration", + "value": "AppConfig", + "description": "Application Configuration" + }, + { + "name": "ApplicationInsights", + "value": "AppInsights", + "description": "Application Insights" + }, + { + "name": "Custom", + "value": "CustomKeys", + "description": "Custom Keys" + } + ] + } + }, + { + "name": "defaultConnection", + "in": "query", + "description": "List connections that are default connections", + "required": false, + "type": "boolean" + }, + { + "$ref": "#/parameters/Azure.Core.TopQueryParameter" + }, + { + "$ref": "#/parameters/Azure.Core.SkipQueryParameter" + }, + { + "$ref": "#/parameters/Azure.Core.MaxPageSizeQueryParameter" + }, + { + "$ref": "#/parameters/Azure.Core.ClientRequestIdHeader" + } + ], + "responses": { + "200": { + "description": "The request has succeeded.", + "schema": { + "$ref": "#/definitions/Internal.ConnectionPaged" + }, + "headers": { + "x-ms-client-request-id": { + "type": "string", + "format": "uuid", + "description": "An opaque, globally-unique, client-generated string identifier for the request." + } + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/Azure.Core.Foundations.ErrorResponse" + }, + "headers": { + "x-ms-error-code": { + "type": "string", + "description": "String error code indicating what went wrong." + } + } + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } + }, "/datasets": { "get": { "operationId": "Datasets_ListLatest", @@ -1781,6 +1910,28 @@ ] } }, + "Internal.ConnectionPaged": { + "type": "object", + "description": "Paged collection of Connection items", + "properties": { + "value": { + "type": "array", + "description": "The Connection items on this page", + "items": { + "$ref": "#/definitions/Connection" + }, + "x-ms-identifiers": [] + }, + "nextLink": { + "type": "string", + "format": "uri", + "description": "The link to the next page of items" + } + }, + "required": [ + "value" + ] + }, "ListSortOrder": { "type": "string", "description": "The available sorting options when requesting a list of response objects.", diff --git a/specification/ai/data-plane/Azure.AI.Projects/stable/latest/azure-ai-projects-1dp.json b/specification/ai/data-plane/Azure.AI.Projects/stable/latest/azure-ai-projects-1dp.json index 31fb0938415a..46b392b25d19 100644 --- a/specification/ai/data-plane/Azure.AI.Projects/stable/latest/azure-ai-projects-1dp.json +++ b/specification/ai/data-plane/Azure.AI.Projects/stable/latest/azure-ai-projects-1dp.json @@ -19,7 +19,7 @@ { "name": "endpoint", "in": "path", - "description": "Project endpoint in the form of: https://.services.ai.azure.com/api/projects/", + "description": "Project endpoint. In the form \"https://.services.ai.azure.com/api/projects/_project\"\nif your Foundry Hub has only one Project, or to use the default Project in your Hub. Or in the form \n\"https://.services.ai.azure.com/api/projects/\" if you want to explicitly\nspecify the Foundry Project name.", "required": true, "type": "string", "format": "uri", @@ -230,7 +230,7 @@ } }, "/connections/{name}/withCredentials": { - "get": { + "post": { "operationId": "Connections_GetWithCredentials", "description": "Get a connection by name, with its connection credentials", "parameters": [ @@ -277,6 +277,135 @@ } } }, + "/connections/withCredentials": { + "post": { + "operationId": "Connections_ListWithCredentials", + "description": "List all connections in the project, with their connection credentials", + "parameters": [ + { + "$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter" + }, + { + "name": "connectionType", + "in": "query", + "description": "List connections of this specific type", + "required": false, + "type": "string", + "enum": [ + "AzureOpenAI", + "AzureBlob", + "AzureStorageAccount", + "CognitiveSearch", + "CosmosDB", + "ApiKey", + "AppConfig", + "AppInsights", + "CustomKeys" + ], + "x-ms-enum": { + "name": "ConnectionType", + "modelAsString": true, + "values": [ + { + "name": "AzureOpenAI", + "value": "AzureOpenAI", + "description": "Azure OpenAI Service" + }, + { + "name": "AzureBlobStorage", + "value": "AzureBlob", + "description": "Azure Blob Storage, with specified container" + }, + { + "name": "AzureStorageAccount", + "value": "AzureStorageAccount", + "description": "Azure Blob Storage, with container not specified (used by Assistants)" + }, + { + "name": "AzureAISearch", + "value": "CognitiveSearch", + "description": "Azure AI Search" + }, + { + "name": "CosmosDB", + "value": "CosmosDB", + "description": "CosmosDB" + }, + { + "name": "APIKey", + "value": "ApiKey", + "description": "Generic connection that uses API Key authentication" + }, + { + "name": "ApplicationConfiguration", + "value": "AppConfig", + "description": "Application Configuration" + }, + { + "name": "ApplicationInsights", + "value": "AppInsights", + "description": "Application Insights" + }, + { + "name": "Custom", + "value": "CustomKeys", + "description": "Custom Keys" + } + ] + } + }, + { + "name": "defaultConnection", + "in": "query", + "description": "List connections that are default connections", + "required": false, + "type": "boolean" + }, + { + "$ref": "#/parameters/Azure.Core.TopQueryParameter" + }, + { + "$ref": "#/parameters/Azure.Core.SkipQueryParameter" + }, + { + "$ref": "#/parameters/Azure.Core.MaxPageSizeQueryParameter" + }, + { + "$ref": "#/parameters/Azure.Core.ClientRequestIdHeader" + } + ], + "responses": { + "200": { + "description": "The request has succeeded.", + "schema": { + "$ref": "#/definitions/Internal.ConnectionPaged" + }, + "headers": { + "x-ms-client-request-id": { + "type": "string", + "format": "uuid", + "description": "An opaque, globally-unique, client-generated string identifier for the request." + } + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/Azure.Core.Foundations.ErrorResponse" + }, + "headers": { + "x-ms-error-code": { + "type": "string", + "description": "String error code indicating what went wrong." + } + } + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } + }, "/datasets": { "get": { "operationId": "Datasets_ListLatest", @@ -1781,6 +1910,28 @@ ] } }, + "Internal.ConnectionPaged": { + "type": "object", + "description": "Paged collection of Connection items", + "properties": { + "value": { + "type": "array", + "description": "The Connection items on this page", + "items": { + "$ref": "#/definitions/Connection" + }, + "x-ms-identifiers": [] + }, + "nextLink": { + "type": "string", + "format": "uri", + "description": "The link to the next page of items" + } + }, + "required": [ + "value" + ] + }, "ListSortOrder": { "type": "string", "description": "The available sorting options when requesting a list of response objects.",