Apis - Get
返回 API 的详细信息。
GET https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiCenter/services/{serviceName}/workspaces/{workspaceName}/apis/{apiName}?api-version=2024-03-01
URI 参数
| 名称 | 在 | 必需 | 类型 | 说明 |
|---|---|---|---|---|
|
api
|
path | True |
string minLength: 1maxLength: 90 pattern: ^[a-zA-Z0-9-]{3,90}$ |
API 的名称。 |
|
resource
|
path | True |
string minLength: 1maxLength: 90 |
资源组的名称。 名称不区分大小写。 |
|
service
|
path | True |
string minLength: 1maxLength: 90 pattern: ^[a-zA-Z0-9-]{3,90}$ |
Azure API 中心服务的名称。 |
|
subscription
|
path | True |
string (uuid) |
目标订阅的 ID。 该值必须是 UUID。 |
|
workspace
|
path | True |
string minLength: 1maxLength: 90 pattern: ^[a-zA-Z0-9-]{3,90}$ |
工作区的名称。 |
|
api-version
|
query | True |
string minLength: 1 |
用于此操作的 API 版本。 |
响应
| 名称 | 类型 | 说明 |
|---|---|---|
| 200 OK |
Azure作已成功完成。 标头 ETag: string |
|
| Other Status Codes |
意外的错误响应。 |
安全性
azure_auth
Azure Active Directory OAuth2 Flow。
类型:
oauth2
流向:
implicit
授权 URL:
https://login.microsoftonline.com/common/oauth2/authorize
作用域
| 名称 | 说明 |
|---|---|
| user_impersonation | 模拟用户帐户 |
示例
Apis_Get
示例请求
示例响应
{
"type": "Microsoft.ApiCenter/services/apis",
"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contoso-resources/providers/Microsoft.ApiCenter/services/contoso/workspaces/default/apis/echo-api",
"name": "public",
"systemData": {
"createdAt": "2023-07-03T18:27:09.128871Z",
"lastModifiedAt": "2023-07-03T18:27:09.1288716Z"
},
"properties": {
"title": "Echo API",
"description": "A simple HTTP request/response service.",
"lifecycleStage": "design",
"kind": "rest",
"termsOfService": {
"url": "https://contoso.com/terms-of-service"
},
"license": {
"url": "https://contoso.com/license"
},
"externalDocumentation": [
{
"title": "Onboarding docs",
"url": "https://docs.contoso.com"
}
],
"customProperties": {
"author": "John Doe"
}
}
}
定义
| 名称 | 说明 |
|---|---|
| Api |
API 实体。 |
|
Api |
API 的类型 |
| Contact |
联系信息 |
|
created |
创建资源的标识的类型。 |
|
Error |
资源管理错误附加信息。 |
|
Error |
错误详细信息。 |
|
Error |
错误响应 |
|
External |
此外,API 的外部文档。 |
| License |
API 的许可证信息。 |
|
Lifecycle |
Api 开发生命周期的阶段 |
|
system |
与创建和上次修改资源相关的元数据。 |
|
Terms |
API 的服务条款。 |
Api
API 实体。
| 名称 | 类型 | 说明 |
|---|---|---|
| id |
string (arm-id) |
资源的完全限定资源 ID。 例如“/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}” |
| name |
string |
资源的名称 |
| properties.contacts |
Contact[] |
联系人集 |
| properties.customProperties |
object |
自定义属性 |
| properties.description |
string maxLength: 1000 |
API 的说明。 |
| properties.externalDocumentation |
外部文档集 |
|
| properties.kind |
API 类型。 例如,REST 或 GraphQL。 |
|
| properties.license |
API 的许可证信息。 |
|
| properties.lifecycleStage |
API 的当前生命周期阶段。 |
|
| properties.summary |
string maxLength: 200 |
API 的简短说明。 |
| properties.termsOfService |
API 的服务条款。 |
|
| properties.title |
string minLength: 1maxLength: 50 |
API 标题。 |
| systemData |
包含 createdBy 和 modifiedBy 信息的 Azure 资源管理器元数据。 |
|
| type |
string |
资源的类型。 例如“Microsoft.Compute/virtualMachines”或“Microsoft.Storage/storageAccounts” |
ApiKind
API 的类型
| 值 | 说明 |
|---|---|
| rest |
表示性状态传输 API |
| graphql |
图形查询语言 API |
| grpc |
一个 gRPC API |
| soap |
一个 SOAP API |
| webhook |
Web 挂钩 |
| websocket |
Web 套接字 |
Contact
联系信息
| 名称 | 类型 | 说明 |
|---|---|---|
|
string maxLength: 100 |
联系人的电子邮件地址。 |
|
| name |
string maxLength: 100 |
联系人的名称。 |
| url |
string (uri) maxLength: 200 |
联系人的 URL。 |
createdByType
创建资源的标识的类型。
| 值 | 说明 |
|---|---|
| User | |
| Application | |
| ManagedIdentity | |
| Key |
ErrorAdditionalInfo
资源管理错误附加信息。
| 名称 | 类型 | 说明 |
|---|---|---|
| info |
object |
其他信息。 |
| type |
string |
其他信息类型。 |
ErrorDetail
错误详细信息。
| 名称 | 类型 | 说明 |
|---|---|---|
| additionalInfo |
错误附加信息。 |
|
| code |
string |
错误代码。 |
| details |
错误详细信息。 |
|
| message |
string |
错误消息。 |
| target |
string |
错误目标。 |
ErrorResponse
错误响应
| 名称 | 类型 | 说明 |
|---|---|---|
| error |
错误对象。 |
ExternalDocumentation
此外,API 的外部文档。
| 名称 | 类型 | 说明 |
|---|---|---|
| description |
string maxLength: 500 |
文档的说明。 |
| title |
string maxLength: 50 |
文档的标题。 |
| url |
string (uri) maxLength: 200 |
指向文档的 URL。 |
License
API 的许可证信息。
| 名称 | 类型 | 说明 |
|---|---|---|
| identifier |
string (uri) maxLength: 50 |
API 的 SPDX 许可证信息。 标识符字段互斥 URL 字段。 |
| name |
string maxLength: 100 |
许可证的名称。 |
| url |
string (uri) maxLength: 200 |
指向许可证详细信息的 URL。 URL 字段互斥标识符字段。 |
LifecycleStage
Api 开发生命周期的阶段
| 值 | 说明 |
|---|---|
| design |
设计阶段 |
| development |
开发阶段 |
| testing |
测试阶段 |
| preview |
预览版 |
| production |
在生产环境中 |
| deprecated |
已弃用的阶段 |
| retired |
停用阶段 |
systemData
与创建和上次修改资源相关的元数据。
| 名称 | 类型 | 说明 |
|---|---|---|
| createdAt |
string (date-time) |
资源创建时间戳(UTC)。 |
| createdBy |
string |
创建资源的标识。 |
| createdByType |
创建资源的标识的类型。 |
|
| lastModifiedAt |
string (date-time) |
上次修改的资源时间戳(UTC) |
| lastModifiedBy |
string |
上次修改资源的标识。 |
| lastModifiedByType |
上次修改资源的标识的类型。 |
TermsOfService
API 的服务条款。
| 名称 | 类型 | 说明 |
|---|---|---|
| url |
string (uri) maxLength: 200 |
指向服务条款的 URL。 |