共用方式為


Api Deployments - List Deployments

List a collection of API deployments.

GET https://{serviceName}.data.azure-apicenter.net/workspaces/{workspaceName}/apis/{apiName}/deployments?api-version=2024-02-01-preview
GET https://{serviceName}.data.azure-apicenter.net/workspaces/{workspaceName}/apis/{apiName}/deployments?api-version=2024-02-01-preview&top={top}&skip={skip}&maxpagesize={maxpagesize}

URI Parameters

Name In Required Type Description
apiName
path True

string

Api identifier.

serviceName
path True

string

Region-unique API Center service name

workspaceName
path True

string

Workspace identifier.

api-version
query True

string

The API version to use for this operation.

maxpagesize
query

integer

int32

The maximum number of result items per page.

skip
query

integer

int32

The number of result items to skip.

top
query

integer

int32

The number of result items to return.

Responses

Name Type Description
200 OK

PagedApiDeployment

The request has succeeded.

Other Status Codes

Azure.Core.Foundations.ErrorResponse

An unexpected error response.

Headers

x-ms-error-code: string

Security

AadOauth2Auth

The Azure Active Directory OAuth2 Flow

Type: oauth2
Flow: accessCode
Authorization URL: https://login.microsoftonline.com/common/oauth2/authorize
Token URL: https://login.microsoftonline.com/common/oauth2/token

Scopes

Name Description
https://azure-apicenter.net/user_impersonation

Examples

ApiDeployments_ListDeployments

Sample request

GET https://{serviceName}.data.azure-apicenter.net/workspaces/default/apis/echo-api/deployments?api-version=2024-02-01-preview

Sample response

{
  "value": [
    {
      "name": "production",
      "title": "Production",
      "description": "Production deployment (Public Cloud)",
      "environment": "public",
      "server": {
        "runtimeUris": [
          "https://contoso.azure-api.net"
        ]
      },
      "recommended": true
    }
  ],
  "nextLink": "https://microsoft.com/aiofpisa"
}

Definitions

Name Description
ApiDeployment

API deployment resource model.

ApiDeploymentServer

Api Deployment Server

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/Guidelines.md#7102-error-condition-responses.

PagedApiDeployment

Paged collection of ApiDeployment items

ApiDeployment

API deployment resource model.

Name Type Description
customProperties

object

The custom metadata defined for API deployment entities.

description

string

The description of the deployment.

environment

string

The name of the deployment environment.

name

string

Deployment identifier.

recommended

boolean

Indicates if this is currently recommended deployment.

server

ApiDeploymentServer

The server information of the API deployment.

title

string

The name of the deployment.

ApiDeploymentServer

Api Deployment Server

Name Type Description
runtimeUris

string[]

Base runtime URIs for this deployment.

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/Guidelines.md#7102-error-condition-responses.

Name Type Description
code

string

One of a server-defined set of error codes.

innererror

Azure.Core.Foundations.InnerError

Inner error.

PagedApiDeployment

Paged collection of ApiDeployment items

Name Type Description
nextLink

string

The link to the next page of items

value

ApiDeployment[]

The ApiDeployment items on this page