From 4f93deeb63f7b766f639ac2c697aba0260b62bbc Mon Sep 17 00:00:00 2001 From: VitaliyKurokhtin Date: Wed, 14 Nov 2018 08:39:54 -0800 Subject: [PATCH] /identity endpoint added (#4460) --- .../preview/2018-06-01-preview/apimusers.json | 50 +++++++++++++++++++ .../ApiManagementGetUserIdentity.json | 15 ++++++ .../stable/2018-01-01/apimusers.json | 50 +++++++++++++++++++ .../ApiManagementGetUserIdentity.json | 15 ++++++ 4 files changed, 130 insertions(+) create mode 100644 specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2018-06-01-preview/examples/ApiManagementGetUserIdentity.json create mode 100644 specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2018-01-01/examples/ApiManagementGetUserIdentity.json diff --git a/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2018-06-01-preview/apimusers.json b/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2018-06-01-preview/apimusers.json index 1207811dfd69..8e7367a34444 100644 --- a/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2018-06-01-preview/apimusers.json +++ b/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2018-06-01-preview/apimusers.json @@ -34,6 +34,48 @@ } }, "paths": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/identity": { + "get": { + "tags": [ + "Users" + ], + "operationId": "User_GetIdentity", + "description": "Returns calling user identity information.", + "x-ms-examples": { + "ApiManagementListUsers": { + "$ref": "./examples/ApiManagementGetUserIdentity.json" + } + }, + "parameters": [ + { + "$ref": "./apimanagement.json#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "./apimanagement.json#/parameters/ServiceNameParameter" + }, + { + "$ref": "./apimanagement.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "./apimanagement.json#/parameters/SubscriptionIdParameter" + } + ], + "responses": { + "200": { + "description": "Current user APIM id.", + "schema": { + "$ref": "#/definitions/CurrentUserIdentity" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "./apimanagement.json#/definitions/ErrorResponse" + } + } + } + } + }, "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/users": { "get": { "tags": [ @@ -942,6 +984,14 @@ } ], "description": "Parameters supplied to the Update User operation." + }, + "CurrentUserIdentity": { + "properties": { + "id": { + "type": "string", + "description": "API Management service user id." + } + } } }, "parameters": { diff --git a/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2018-06-01-preview/examples/ApiManagementGetUserIdentity.json b/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2018-06-01-preview/examples/ApiManagementGetUserIdentity.json new file mode 100644 index 000000000000..4d5903dd3554 --- /dev/null +++ b/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2018-06-01-preview/examples/ApiManagementGetUserIdentity.json @@ -0,0 +1,15 @@ +{ + "parameters": { + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "api-version": "2018-06-01-preview", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "id": "1" + } + } + } +} \ No newline at end of file diff --git a/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2018-01-01/apimusers.json b/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2018-01-01/apimusers.json index 5da0e9deb3c8..2413c3b71f61 100644 --- a/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2018-01-01/apimusers.json +++ b/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2018-01-01/apimusers.json @@ -34,6 +34,48 @@ } }, "paths": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/identity": { + "get": { + "tags": [ + "Users" + ], + "operationId": "User_GetIdentity", + "description": "Returns calling user identity information.", + "x-ms-examples": { + "ApiManagementListUsers": { + "$ref": "./examples/ApiManagementGetUserIdentity.json" + } + }, + "parameters": [ + { + "$ref": "./apimanagement.json#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "./apimanagement.json#/parameters/ServiceNameParameter" + }, + { + "$ref": "./apimanagement.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "./apimanagement.json#/parameters/SubscriptionIdParameter" + } + ], + "responses": { + "200": { + "description": "Current user APIM id.", + "schema": { + "$ref": "#/definitions/CurrentUserIdentity" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "./apimanagement.json#/definitions/ErrorResponse" + } + } + } + } + }, "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/users": { "get": { "tags": [ @@ -942,6 +984,14 @@ } ], "description": "Parameters supplied to the Update User operation." + }, + "CurrentUserIdentity": { + "properties": { + "id": { + "type": "string", + "description": "API Management service user id." + } + } } }, "parameters": { diff --git a/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2018-01-01/examples/ApiManagementGetUserIdentity.json b/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2018-01-01/examples/ApiManagementGetUserIdentity.json new file mode 100644 index 000000000000..e740bc2d0bf9 --- /dev/null +++ b/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2018-01-01/examples/ApiManagementGetUserIdentity.json @@ -0,0 +1,15 @@ +{ + "parameters": { + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "api-version": "2018-01-01", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "id": "1" + } + } + } +} \ No newline at end of file