* Refactor and seperate validate method

* re-use seperate validations

* refactoring

* use globby instead of glob sync

* mark that is a breaking change

* new return types

* Add snapshot tests

* Add snapshot tests for live validation

* Add option for relative source location url

* Add severity

* Don't expose get operations externally anymore
This commit is contained in:
Vlad Barosan 2019-03-28 11:47:48 -07:00 коммит произвёл GitHub
Родитель 6a1b7816af
Коммит 44a19e34a8
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
51 изменённых файлов: 23041 добавлений и 294 удалений

2
.vscode/launch.json поставляемый
Просмотреть файл

@ -123,7 +123,7 @@
"request": "launch",
"name": "Jest Current File",
"program": "${workspaceFolder}/node_modules/.bin/jest",
"args": ["${relativeFile}"],
"args": ["${relativeFile}", "--coverage", "false"],
"console": "integratedTerminal",
"internalConsoleOptions": "neverOpen",
"disableOptimisticBPs": true,

Просмотреть файл

@ -1,5 +1,12 @@
# Changelog
### 03/27/2019 0.15.0
- Refactor live validator and new types for validation results.
- Expose separate request and response validate methods.
- Expose types for live validation parameters.
- `processValidationErrors`, `serializeErrors` and `getPotentialOperations` are not exported anymore. Validation methods automatically call these.
### 03/20/2019 0.14.8
- Don't parse examples when not needed.

Просмотреть файл

@ -66,7 +66,6 @@ Examples of issues:
References: https://github.com/Azure/azure-rest-api-specs/issues/778 , https://github.com/Azure/azure-rest-api-specs/issues/755 , https://github.com/Azure/azure-rest-api-specs/issues/773
Model validation _requires_ example payloads (request/response) of the service, so the data can be matched with the defined models. See [x-ms-examples extension](https://github.com/Azure/azure-rest-api-specs/issues/648) on how to specify the examples/payloads. Swagger “examples” is also supported and data included there is validated as well. To get the most benefit from this tool, make sure to have the simplest and most complex examples possible as part of x-ms-examples.
The tool relies on swagger-tools package to perform model validation.
- Please take a look at the redis-cache swagger spec as an example for providing "x-ms-examples" over [here](https://github.com/Azure/azure-rest-api-specs/blob/master/arm-redis/2016-04-01/swagger/redis.json#L45).
- The examples need to be provided in a separate file in the examples directory under the api-version directory `azure-rest-api-specs/arm-<yourService>/<api-version>/examples/<exampleName>.json`. You can take a look over [here](https://github.com/Azure/azure-rest-api-specs/tree/master/arm-redis/2016-04-01/examples) for the structure of examples.
@ -75,7 +74,7 @@ The tool relies on swagger-tools package to perform model validation.
- If you are using **vscode** to edit your swaggers in the azure-rest-api-specs repo then everything should work out of the box as the schemas have been added in the `.vscode/settings.json` file over [here](https://github.com/Azure/azure-rest-api-specs/blob/master/.vscode/settings.json).
- If you are using **Visual Studio** then you can use the urls provided in the settings.json file and put them in the drop down list at the top of a json file when the file is opened in VS.
### How does this tool fit with others?
### How does this tool fit with others
Swagger specs validation could be split in the following:
@ -120,13 +119,11 @@ const liveValidatorOptions = {
shouldModelImplicitDefaultResponse: true
}
let apiValidator = new oav.LiveValidator(liveValidatorOptions)
const apiValidator = new oav.LiveValidator(liveValidatorOptions)
await apiValidator.initialize() // Note that for a large number of specs this can take some time.
// After `initialize()` finishes we are ready to validate
let validationResult = apiValidator.validateLiveRequestResponse(
requestResponsePair
)
const validationResult = apiValidator.validateLiveRequestResponse(requestResponsePair)
```
---

Просмотреть файл

@ -26,8 +26,6 @@ export {
export {
errorConstants,
errorCodeToSeverity,
processValidationErrors,
serializeErrors,
NodeError,
ValidationError,
ValidationResult
@ -35,7 +33,15 @@ export {
// Classes
export { SpecValidator } from "./lib/validators/specValidator"
export { LiveValidator } from "./lib/validators/liveValidator"
export {
LiveValidator,
RequestResponsePair,
LiveRequest,
LiveResponse,
LiveValidationIssue,
LiveValidatorOptions,
ApiOperationIdentifier
} from "./lib/validators/liveValidator"
export { SpecResolver } from "./lib/validators/specResolver"
// Constants

Просмотреть файл

@ -28,10 +28,10 @@ export class OperationInfo {
/**
* Defines the metadata of OperationInfo
*
* @returns {object} metadata of OperationInfo
* @returns metadata of OperationInfo
*
*/
public mapper() {
public mapper(): object {
return {
required: false,
serializedName: "OperationInfo",

Просмотреть файл

@ -22,9 +22,12 @@ import { LiveValidationError } from "./liveValidationError"
*
*/
export class PotentialOperationsResult {
public readonly operations: Operation[]
public readonly reason?: LiveValidationError
public constructor(operations: Operation[], reason: undefined | LiveValidationError) {
public constructor(
public readonly operations: Operation[],
public readonly resourceProvider: string,
public readonly apiVersion: string,
public readonly reason?: undefined | LiveValidationError
) {
this.operations = operations || []
if (reason) {
this.reason = reason

Просмотреть файл

@ -114,3 +114,4 @@ export const EnvironmentVariables = {
export const unknownResourceProvider = "microsoft.unknown"
export const unknownApiVersion = "unknown-api-version"
export const unknownOperationId = "unknownOperationId"

Просмотреть файл

@ -9,6 +9,7 @@ import {
getRootObjectInfo
} from "@ts-common/source-map"
import { merge } from "@ts-common/string-map"
import * as jsonRefs from "json-refs"
import { jsonSymbol, schemaSymbol } from "z-schema"
import { TitleObject } from "../validators/specTransformer"
@ -25,7 +26,7 @@ export const setPositionAndUrl = (error: CommonError, titleObject: TitleObject |
error.position = titleObject.position
error.url = titleObject.url
if (path !== undefined) {
error.title = "/" + path.join("/")
error.title = jsonRefs.pathToPtr(path as string[], true)
}
error.directives = titleObject.directives
}

Просмотреть файл

@ -5,7 +5,7 @@ import { MutableStringMap } from "@ts-common/string-map"
import { ModelValidationError } from "./modelValidationError"
import { toModelErrors } from "./toModelErrors"
import { processValidationErrors, ValidationResult } from "./validationError"
import { processValidationResult, ValidationResult } from "./validationError"
import { ValidationResultSource } from "./validationResultSource"
export interface Result {
@ -44,7 +44,7 @@ export function responseReducer(
? response.error.innerErrors
: []
const processedErrors = processValidationErrors(rawValidationResult)
const processedErrors = processValidationResult(rawValidationResult)
if (processedErrors.responseValidationResult.errors === undefined) {
throw new Error("ICE: processedErrors.responseValidationResult.errors === undefined")

Просмотреть файл

@ -8,7 +8,7 @@ import { CommonError } from "./commonError"
import { ModelValidationError } from "./modelValidationError"
import { MultipleScenarios, responseReducer, Scenario } from "./responseReducer"
import { toModelErrors } from "./toModelErrors"
import { processValidationErrors, ValidationResult } from "./validationError"
import { processValidationResult, ValidationResult } from "./validationError"
import { ValidationResultSource } from "./validationResultSource"
export interface Result {
@ -47,7 +47,7 @@ export function scenarioReducer(
}
}
// process request separately since its unique
const processedErrors = processValidationErrors(rawValidationResult)
const processedErrors = processValidationResult(rawValidationResult)
if (processedErrors.requestValidationResult.errors === undefined) {
throw new Error("ICE: processedErrors.requestValidationResult.errors === undefined")

Просмотреть файл

@ -83,8 +83,35 @@ export const errorCodeToSeverity = (code: string): Severity => {
return errorConstant ? errorConstant.severity : Severity.Critical
}
export interface LiveValidationIssue {
code: string
message: string
pathInPayload: string
similarPaths: string[]
operationId: string
source: SourceLocation
documentationUrl: string
params?: string[]
origin: string
inner?: object[]
}
export interface SourceLocation {
url: string
jsonRef?: string
jsonPath?: string
position: {
column: number
line: number
}
}
export interface RuntimeException {
code: string
message: string
}
export interface NodeError<T extends NodeError<T>> {
code?: string
message?: string
path?: string | string[]
similarPaths?: string[]
errors?: T[]
@ -94,7 +121,6 @@ export interface NodeError<T extends NodeError<T>> {
params?: unknown[]
inner?: T[]
title?: string
message?: string
position?: FilePosition
url?: string
@ -116,18 +142,25 @@ export interface ValidationResult<T extends NodeError<T>> {
/**
* Serializes validation results into a flat array.
*/
export function processValidationErrors<V extends ValidationResult<T>, T extends NodeError<T>>(
export function processValidationResult<V extends ValidationResult<T>, T extends NodeError<T>>(
rawValidation: V
): V {
const requestSerializedErrors: T[] = serializeErrors(rawValidation.requestValidationResult, [])
const responseSerializedErrors: T[] = serializeErrors(rawValidation.responseValidationResult, [])
rawValidation.requestValidationResult.errors = processValidationErrors(
rawValidation.requestValidationResult
)
rawValidation.requestValidationResult.errors = processErrors(requestSerializedErrors)
rawValidation.responseValidationResult.errors = processErrors(responseSerializedErrors)
rawValidation.responseValidationResult.errors = processValidationErrors(
rawValidation.responseValidationResult
)
return rawValidation
}
export function processValidationErrors<T extends NodeError<T>>(errorsNode: T) {
const requestSerializedErrors: T[] = serializeErrors(errorsNode, [])
return processErrors(requestSerializedErrors)
}
/**
* Serializes error tree
*/

Просмотреть файл

@ -1,8 +1,7 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
import { MutableStringMap } from "@ts-common/string-map"
import * as glob from "glob"
import globby from "globby"
import * as http from "http"
import * as _ from "lodash"
import * as msRest from "ms-rest"
@ -17,20 +16,27 @@ import * as models from "../models"
import { PotentialOperationsResult } from "../models/potentialOperationsResult"
import * as C from "../util/constants"
import { log } from "../util/logging"
import { Severity } from "../util/severity"
import * as utils from "../util/utils"
import {
errorCodeToSeverity,
processValidationErrors,
RuntimeException,
SourceLocation
} from "../util/validationError"
import { SpecValidator } from "./specValidator"
export interface Options {
export interface LiveValidatorOptions {
swaggerPaths: string[]
git: {
url: string
shouldClone: boolean
url?: string
branch?: string
}
useRelativeSourceLocationUrl?: boolean
directory: string
swaggerPathsPattern?: string
isPathCaseSensitive?: boolean
swaggerPathsPattern: string
isPathCaseSensitive: boolean
}
export interface ApiVersion {
@ -42,35 +48,64 @@ export interface Provider {
}
export interface LiveRequest extends Request {
readonly headers: {}
headers: object
body?: object
}
export interface RequestResponseObj {
export interface LiveResponse {
statusCode: string
headers: object
body?: object
}
export interface RequestResponsePair {
readonly liveRequest: LiveRequest
readonly liveResponse: {
statusCode: string
readonly headers: {}
}
readonly liveResponse: LiveResponse
}
interface OperationInfo {
readonly operationId: string
readonly apiVersion: string
}
export interface RequestValidationResult {
successfulRequest: unknown
operationInfo?: unknown
errors?: unknown[]
readonly successfulRequest: boolean
readonly operationInfo: OperationInfo
errors: LiveValidationIssue[]
runtimeException?: RuntimeException
}
export interface ResponseValidationResult {
successfulResponse: unknown
operationInfo?: unknown
errors?: unknown[]
readonly successfulResponse: boolean
readonly operationInfo: OperationInfo
errors: LiveValidationIssue[]
runtimeException?: RuntimeException
}
export interface ValidationResult {
readonly requestValidationResult: RequestValidationResult
readonly responseValidationResult: ResponseValidationResult
errors: unknown[]
readonly errors: unknown[]
}
export interface ApiOperationIdentifier {
url: string
method: string
}
export interface LiveValidationIssue {
code: string
message: string
pathInPayload: string
severity: Severity
similarPaths: string[]
source: SourceLocation
documentationUrl: string
params?: string[]
inner?: object[]
}
type OperationWithApiVersion = Operation & { apiVersion: string }
/**
* @class
* Live Validator for Azure swagger APIs.
@ -78,77 +113,45 @@ export interface ValidationResult {
export class LiveValidator {
public readonly cache: MutableStringMap<Provider> = {}
public options: Options
public options: LiveValidatorOptions
/**
* Constructs LiveValidator based on provided options.
*
* @param {object} optionsRaw The configuration options.
* @param {object} ops The configuration options.
*
* @param {array} [options.swaggerPaths] Array of swagger paths to be used for initializing Live
* Validator. This has precedence over {@link options.swaggerPathsPattern}.
*
* @param {string} [options.swaggerPathsPattern] Pattern for swagger paths to be used for
* initializing Live Validator.
*
* @param {string} [options.isPathCaseSensitive] Specifies if the swagger path is to be considered
* case sensitive.
*
* @param {string} [options.git.url] The url of the github repository. Defaults to
* "https://github.com/Azure/azure-rest-api-specs.git".
*
* @param {string} [options.git.shouldClone] Specifies whether to clone the repository or not.
* Defaults to false.
*
* @param {string} [options.git.branch] The branch of the github repository to use instead of the
* default branch.
*
* @param {string} [options.directory] The directory where to clone github repository or from
* where to find swaggers. Defaults to "repo" under user directory.
*
* @returns {object} CacheBuilder Returns the configured CacheBuilder object.
* @returns CacheBuilder Returns the configured CacheBuilder object.
*/
public constructor(optionsRaw?: any) {
optionsRaw = optionsRaw === null || optionsRaw === undefined ? {} : optionsRaw
public constructor(options?: Partial<LiveValidatorOptions>) {
const ops: Partial<LiveValidatorOptions> = options || {}
if (typeof optionsRaw !== "object") {
throw new Error('options must be of type "object".')
if (!ops.swaggerPaths) {
ops.swaggerPaths = []
}
if (optionsRaw.swaggerPaths === null || optionsRaw.swaggerPaths === undefined) {
optionsRaw.swaggerPaths = []
}
if (!Array.isArray(optionsRaw.swaggerPaths)) {
const paths = typeof optionsRaw.swaggerPaths
throw new Error(`options.swaggerPaths must be of type "array" instead of type "${paths}".`)
}
if (optionsRaw.git === null || optionsRaw.git === undefined) {
optionsRaw.git = {
if (!ops.git) {
ops.git = {
url: "https://github.com/Azure/azure-rest-api-specs.git",
shouldClone: false
}
}
if (typeof optionsRaw.git !== "object") {
throw new Error('options.git must be of type "object".')
if (!ops.git.url) {
ops.git.url = "https://github.com/Azure/azure-rest-api-specs.git"
}
if (optionsRaw.git.url === null || optionsRaw.git.url === undefined) {
optionsRaw.git.url = "https://github.com/Azure/azure-rest-api-specs.git"
if (!ops.git.shouldClone) {
ops.git.shouldClone = false
}
if (typeof optionsRaw.git.url.valueOf() !== "string") {
throw new Error('options.git.url must be of type "string".')
if (!ops.directory) {
ops.directory = path.resolve(os.homedir(), "repo")
}
if (optionsRaw.git.shouldClone === null || optionsRaw.git.shouldClone === undefined) {
optionsRaw.git.shouldClone = false
if (!ops.isPathCaseSensitive) {
ops.isPathCaseSensitive = false
}
if (typeof optionsRaw.git.shouldClone !== "boolean") {
throw new Error('options.git.shouldClone must be of type "boolean".')
}
if (optionsRaw.directory === null || optionsRaw.directory === undefined) {
optionsRaw.directory = path.resolve(os.homedir(), "repo")
}
if (typeof optionsRaw.directory.valueOf() !== "string") {
throw new Error('options.directory must be of type "string".')
}
this.options = optionsRaw
this.options = ops as LiveValidatorOptions
}
/**
@ -156,12 +159,12 @@ export class LiveValidator {
*/
public async initialize(): Promise<void> {
// Clone github repository if required
if (this.options.git.shouldClone) {
if (this.options.git.shouldClone && this.options.git.url) {
utils.gitClone(this.options.directory, this.options.git.url, this.options.git.branch)
}
// Construct array of swagger paths to be used for building a cache
const swaggerPaths = this.getSwaggerPaths()
const swaggerPaths = await this.getSwaggerPaths()
// console.log(swaggerPaths);
// Create array of promise factories that builds up cache
@ -202,13 +205,13 @@ export class LiveValidator {
/**
* Gets list of potential operations objects for given url and method.
*
* @param {string} requestUrl The url for which to find potential operations.
* @param requestUrl The url for which to find potential operations.
*
* @param {string} requestMethod The http verb for the method to be used for lookup.
* @param requestMethod The http verb for the method to be used for lookup.
*
* @returns {PotentialOperationsResult} Potential operation result object.
* @returns Potential operation result object.
*/
public getPotentialOperations(
private getPotentialOperations(
requestUrl: string,
requestMethod: string
): PotentialOperationsResult {
@ -245,7 +248,6 @@ export class LiveValidator {
const parsedUrl = url.parse(requestUrl, true)
const pathStr = parsedUrl.pathname
requestMethod = requestMethod.toLowerCase()
let result
let msg
let code
let liveValidationError: models.LiveValidationError | undefined
@ -255,8 +257,12 @@ export class LiveValidator {
C.ErrorCodes.PathNotFoundInRequestUrl.name,
msg
)
result = new models.PotentialOperationsResult(potentialOperations, liveValidationError)
return result
return new models.PotentialOperationsResult(
potentialOperations,
C.unknownResourceProvider,
C.unknownApiVersion,
liveValidationError
)
}
// Lower all the keys of query parameters before searching for `api-version`
@ -328,33 +334,160 @@ export class LiveValidator {
liveValidationError = new models.LiveValidationError(code.name, msg)
}
result = new models.PotentialOperationsResult(potentialOperations, liveValidationError)
return result
return new models.PotentialOperationsResult(
potentialOperations,
provider,
apiVersion,
liveValidationError
)
}
/**
* Validates live request.
*/
public validateLiveRequest(liveRequest: LiveRequest): RequestValidationResult {
let operation
try {
operation = this.findSpecOperation(liveRequest.url, liveRequest.method)
} catch (err) {
return {
successfulRequest: false,
errors: [err],
operationInfo: { apiVersion: C.unknownApiVersion, operationId: C.unknownOperationId }
}
}
if (!liveRequest.query) {
liveRequest.query = url.parse(liveRequest.url, true).query
}
let errors: LiveValidationIssue[] = []
let runtimeException
try {
const reqResult = operation.validateRequest(liveRequest)
const processedErrors = processValidationErrors({ errors: [...reqResult.errors] })
errors = processedErrors
? processedErrors.map(err => this.toLiveValidationIssue(err as any))
: []
} catch (reqValidationError) {
const msg =
`An error occurred while validating the live request for operation ` +
`"${operation.operationId}". The error is:\n ` +
`${util.inspect(reqValidationError, { depth: null })}`
runtimeException = { code: C.ErrorCodes.RequestValidationError.name, message: msg }
}
return {
successfulRequest: errors.length === 0,
operationInfo: {
apiVersion: operation.apiVersion,
operationId: operation.operationId
},
errors,
runtimeException
}
}
private toLiveValidationIssue(err: { [index: string]: any; url: string }): LiveValidationIssue {
return {
code: err.code,
message: err.message,
pathInPayload: err.path,
inner: err.inner,
severity: errorCodeToSeverity(err.code),
params: err.params,
similarPaths: err.similarPaths || [],
source: {
url:
this.options.useRelativeSourceLocationUrl && err.url
? err.url.substr(this.options.directory.length)
: err.url,
jsonRef: err.title,
position: {
column: err.position ? err.position.column : -1,
line: err.position ? err.position.line : -1
}
},
documentationUrl: ""
}
}
/**
* Validates live response.
*/
public validateLiveResponse(
liveResponse: LiveResponse,
specOperation: ApiOperationIdentifier
): ResponseValidationResult {
let operation: OperationWithApiVersion
try {
operation = this.findSpecOperation(specOperation.url, specOperation.method)
} catch (err) {
return {
successfulResponse: false,
errors: [err],
operationInfo: { apiVersion: C.unknownApiVersion, operationId: C.unknownOperationId }
}
}
let errors: LiveValidationIssue[] = []
let runtimeException
// If status code is passed as a status code string (e.g. "OK") transform it to the status code
// number (e.g. '200').
if (
!http.STATUS_CODES[liveResponse.statusCode] &&
utils.statusCodeStringToStatusCode[liveResponse.statusCode.toLowerCase()]
) {
liveResponse.statusCode =
utils.statusCodeStringToStatusCode[liveResponse.statusCode.toLowerCase()]
}
try {
const resResult = operation.validateResponse(liveResponse)
const processedErrors = processValidationErrors({ errors: [...resResult.errors] })
errors = processedErrors
? processedErrors.map(err => this.toLiveValidationIssue(err as any))
: []
} catch (resValidationError) {
const msg =
`An error occurred while validating the live response for operation ` +
`"${operation.operationId}". The error is:\n ` +
`${util.inspect(resValidationError, { depth: null })}`
runtimeException = { code: C.ErrorCodes.RequestValidationError.name, message: msg }
}
return {
successfulResponse: errors.length === 0,
operationInfo: {
apiVersion: operation.apiVersion,
operationId: operation.operationId
},
errors,
runtimeException
}
}
/**
* Validates live request and response.
*
* @param {object} requestResponseObj - The wrapper that contains the live request and response
* @param {object} requestResponseObj.liveRequest - The live request
* @param {object} requestResponseObj.liveResponse - The live response
* @returns {object} validationResult - Validation result for given input
* @param requestResponsePair - The wrapper that contains the live request and response
* @returns validationResult - Validation result for given input
*/
public validateLiveRequestResponse(requestResponseObj: RequestResponseObj): ValidationResult {
public validateLiveRequestResponse(requestResponseObj: RequestResponsePair): ValidationResult {
const validationResult: ValidationResult = {
requestValidationResult: {
successfulRequest: false
successfulRequest: false,
errors: [],
operationInfo: { apiVersion: C.unknownApiVersion, operationId: C.unknownOperationId }
},
responseValidationResult: {
successfulResponse: false
successfulResponse: false,
errors: [],
operationInfo: { apiVersion: C.unknownApiVersion, operationId: C.unknownOperationId }
},
errors: []
}
if (!requestResponseObj || (requestResponseObj && typeof requestResponseObj !== "object")) {
if (!requestResponseObj) {
const msg = 'requestResponseObj cannot be null or undefined and must be of type "object".'
const e = new models.LiveValidationError(C.ErrorCodes.IncorrectInput.name, msg)
validationResult.errors.push(e)
return validationResult
return {
...validationResult,
errors: [e]
}
}
try {
// We are using this to validate the payload as per the definitions in swagger.
@ -369,109 +502,25 @@ export class LiveValidator {
`Found errors "${err.message}" in the provided input:\n` +
`${util.inspect(requestResponseObj, { depth: null })}.`
const e = new models.LiveValidationError(C.ErrorCodes.IncorrectInput.name, msg)
validationResult.errors.push(e)
return validationResult
return {
...validationResult,
errors: [e]
}
}
const request = requestResponseObj.liveRequest
const response = requestResponseObj.liveResponse
// If status code is passed as a status code string (e.g. "OK") transform it to the status code
// number (e.g. '200').
if (
response &&
!http.STATUS_CODES[response.statusCode] &&
utils.statusCodeStringToStatusCode[response.statusCode.toLowerCase()]
) {
response.statusCode = utils.statusCodeStringToStatusCode[response.statusCode.toLowerCase()]
}
const requestValidationResult = this.validateLiveRequest(request)
const responseValidationResult = this.validateLiveResponse(response, {
method: request.method,
url: request.url
})
if (!request.query) {
request.query = url.parse(request.url, true).query
return {
requestValidationResult,
responseValidationResult,
errors: []
}
const currentApiVersion = request.query["api-version"] || C.unknownApiVersion
let potentialOperationsResult
let potentialOperations: Operation[] = []
try {
potentialOperationsResult = this.getPotentialOperations(request.url, request.method)
potentialOperations = potentialOperationsResult.operations
} catch (err) {
const msg =
`An error occurred while trying to search for potential operations:\n` +
`${util.inspect(err, { depth: null })}`
const e = new models.LiveValidationError(C.ErrorCodes.PotentialOperationSearchError.name, msg)
validationResult.errors.push(e)
return validationResult
}
// Found empty potentialOperations
if (potentialOperations.length === 0) {
validationResult.errors.push(potentialOperationsResult.reason)
return validationResult
// Found more than 1 potentialOperations
} else if (potentialOperations.length !== 1) {
const operationIds = potentialOperations.map(op => op.operationId).join()
const msg =
`Found multiple matching operations with operationIds "${operationIds}" ` +
`for request url "${request.url}" with HTTP Method "${request.method}".`
log.debug(msg)
const err = new models.LiveValidationError(C.ErrorCodes.MultipleOperationsFound.name, msg)
validationResult.errors = [err]
return validationResult
}
const operation = potentialOperations[0]
const basicOperationInfo = {
operationId: operation.operationId,
apiVersion: currentApiVersion
}
validationResult.requestValidationResult.operationInfo = [basicOperationInfo]
validationResult.responseValidationResult.operationInfo = [basicOperationInfo]
let reqResult
try {
reqResult = operation.validateRequest(request)
validationResult.requestValidationResult.errors = reqResult.errors || []
log.debug("Request Validation Result")
log.debug(reqResult.toString())
} catch (reqValidationError) {
const msg =
`An error occurred while validating the live request for operation ` +
`"${operation.operationId}". The error is:\n ` +
`${util.inspect(reqValidationError, { depth: null })}`
const err = new models.LiveValidationError(C.ErrorCodes.RequestValidationError.name, msg)
validationResult.requestValidationResult.errors = [err]
}
let resResult
try {
resResult = operation.validateResponse(response)
validationResult.responseValidationResult.errors = resResult.errors || []
log.debug("Response Validation Result")
log.debug(resResult.toString())
} catch (resValidationError) {
const msg =
`An error occurred while validating the live response for operation ` +
`"${operation.operationId}". The error is:\n ` +
`${util.inspect(resValidationError, { depth: null })}`
const err = new models.LiveValidationError(C.ErrorCodes.ResponseValidationError.name, msg)
validationResult.responseValidationResult.errors = [err]
}
if (
reqResult &&
reqResult.errors &&
Array.isArray(reqResult.errors) &&
!reqResult.errors.length
) {
validationResult.requestValidationResult.successfulRequest = true
}
if (
resResult &&
resResult.errors &&
Array.isArray(resResult.errors) &&
!resResult.errors.length
) {
validationResult.responseValidationResult.successfulResponse = true
}
return validationResult
}
/**
@ -516,9 +565,10 @@ export class LiveValidator {
throw new Error('operations is a required parameter of type "array".')
}
const requestUrl = formatUrlToExpectedFormat(requestPath)
let potentialOperations = operations.filter(operation => {
const pathObject = operation.pathObject
const pathMatch = pathObject.regexp.exec(requestPath)
const pathMatch = pathObject.regexp.exec(requestUrl)
return pathMatch !== null
})
@ -544,7 +594,43 @@ export class LiveValidator {
return potentialOperations
}
private getSwaggerPaths(): string[] {
/**
* Gets the swagger operation based on the HTTP url and method
*/
private findSpecOperation(requestUrl: string, requestMethod: string): OperationWithApiVersion {
let potentialOperationsResult
try {
potentialOperationsResult = this.getPotentialOperations(requestUrl, requestMethod)
} catch (err) {
const msg =
`An error occurred while trying to search for potential operations:\n` +
`${util.inspect(err, { depth: null })}`
const e = new models.LiveValidationError(C.ErrorCodes.PotentialOperationSearchError.name, msg)
throw e
}
// Found empty potentialOperations
if (potentialOperationsResult.operations.length === 0) {
throw potentialOperationsResult.reason
// Found more than 1 potentialOperations
} else if (potentialOperationsResult.operations.length > 1) {
const operationIds = potentialOperationsResult.operations
.map(operation => operation.operationId)
.join()
const msg =
`Found multiple matching operations with operationIds "${operationIds}" ` +
`for request url "${url}" with HTTP Method "${requestMethod}".`
log.debug(msg)
const e = new models.LiveValidationError(C.ErrorCodes.MultipleOperationsFound.name, msg)
throw e
}
const op = potentialOperationsResult.operations[0]
Object.assign(op, { apiVersion: potentialOperationsResult.apiVersion })
return op as OperationWithApiVersion
}
private async getSwaggerPaths(): Promise<string[]> {
if (this.options.swaggerPaths.length !== 0) {
log.debug(
`Using user provided swagger paths. Total paths: ${this.options.swaggerPaths.length}`
@ -556,19 +642,22 @@ export class LiveValidator {
this.options.directory,
this.options.swaggerPathsPattern || allJsonsPattern
)
const swaggerPaths = glob.sync(jsonsPattern, {
const swaggerPaths = await globby(jsonsPattern, {
ignore: [
"**/examples/**/*",
"**/quickstart-templates/**/*",
"**/schema/**/*",
"**/live/**/*",
"**/wire-format/**/*"
]
],
onlyFiles: true,
unique: true
})
const dir = this.options.directory
log.debug(
`Using swaggers found from directory "${dir}" and pattern "${jsonsPattern}".` +
`Total paths: ${swaggerPaths.length}`
`Using swaggers found from directory: "${
this.options.directory
}" and pattern: "${jsonsPattern}".
Total paths: ${swaggerPaths.length}`
)
return swaggerPaths
}
@ -637,3 +726,12 @@ export class LiveValidator {
}
}
}
/**
* OAV expects the url that is sent to match exactly with the swagger path. For this we need to keep only the part after
* where the swagger path starts. Currently those are '/subscriptions' and '/providers'.
*/
export function formatUrlToExpectedFormat(requestUrl: string): string {
return requestUrl.substring(requestUrl.search("/?(subscriptions|providers)"))
}

Просмотреть файл

@ -1,6 +1,6 @@
{
"name": "oav",
"version": "0.14.8",
"version": "0.15.0",
"author": {
"name": "Microsoft Corporation",
"email": "azsdkteam@microsoft.com",
@ -12,18 +12,18 @@
"@azure/openapi-markdown": "^0.8.0",
"@microsoft.azure/autorest-extension-base": "1.0.13",
"@ts-common/commonmark-to-markdown": "^1.1.10",
"@ts-common/iterator": "^0.1.4",
"@ts-common/iterator": "^0.2.0",
"@ts-common/json": "^0.2.0",
"@ts-common/json-parser": "^0.6.0",
"@ts-common/property-set": "^0.0.10",
"@ts-common/source-map": "^0.4.2",
"@ts-common/string-map": "^0.2.5",
"@ts-common/string-map": "^0.2.6",
"@ts-common/virtual-fs": "^0.1.2",
"commonmark": "^0.28.1",
"glob": "^5.0.14",
"globby": "^9.1.0",
"jest": "^24.5.0",
"jest-junit": "^6.3.0",
"js-yaml": "^3.12.2",
"js-yaml": "^3.13.0",
"json-pointer": "^0.6.0",
"json-refs": "^3.0.12",
"jsonpath": "^1.0.1",
@ -33,7 +33,6 @@
"ms-rest": "^2.3.8",
"request": "^2.88.0",
"swagger-parser": "^6.0.5",
"swagger-tools": "^0.10.4",
"ts-jest": "^24.0.0",
"uuid": "^3.3.2",
"vscode-jsonrpc": "^3.6.2",
@ -112,6 +111,7 @@
"tsc": "tsc",
"tslint": "tslint --project tsconfig.json ./*.ts ./lib/**/*.ts ./test/**/*.ts ./types/**/*.ts",
"test": "npm run tsc && npm run tslint && jest --ci --reporters=default --reporters=jest-junit",
"jest": "jest",
"start": "node ./dist/lib/autorestPlugin/pluginHost.js",
"tslint-check": "tslint-config-prettier-check ./tslint.json",
"prepack": "npm install && tsc && npm run tslint",
@ -159,7 +159,8 @@
},
"testMatch": [
"**/test/**/*.ts",
"!**/test/**/*.d.ts"
"!**/test/**/*.d.ts",
"!**/test/sample.ts"
],
"verbose": true
}

Просмотреть файл

@ -0,0 +1,343 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`Live validator snapshot validation should return no errors for valid input 1`] = `
Object {
"errors": Array [],
"requestValidationResult": Object {
"errors": Array [],
"operationInfo": Object {
"apiVersion": "2018-01-01",
"operationId": "User_Get",
},
"runtimeException": undefined,
"successfulRequest": true,
},
"responseValidationResult": Object {
"errors": Array [],
"operationInfo": Object {
"apiVersion": "2018-01-01",
"operationId": "User_Get",
},
"runtimeException": undefined,
"successfulResponse": true,
},
}
`;
exports[`Live validator snapshot validation should return the expected error requestResponse validation for ENUM_CASE_MISMATCH 1`] = `
Object {
"errors": Array [],
"requestValidationResult": Object {
"errors": Array [],
"operationInfo": Object {
"apiVersion": "2018-01-01",
"operationId": "User_CreateOrUpdate",
},
"runtimeException": undefined,
"successfulRequest": true,
},
"responseValidationResult": Object {
"errors": Array [
Object {
"code": "ENUM_CASE_MISMATCH",
"documentationUrl": "",
"inner": undefined,
"message": "Enum doesn not match case for: System",
"params": Array [
"System",
],
"pathInPayload": "properties/groups/0/type",
"severity": 1,
"similarPaths": Array [],
"source": Object {
"jsonRef": "#/definitions/GroupContractProperties/properties/type",
"position": Object {
"column": 17,
"line": 611,
},
"url": "specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2018-01-01/apimgroups.json",
},
},
],
"operationInfo": Object {
"apiVersion": "2018-01-01",
"operationId": "User_CreateOrUpdate",
},
"runtimeException": undefined,
"successfulResponse": false,
},
}
`;
exports[`Live validator snapshot validation should return the expected error requestResponse validation for ENUM_MISMATCH 1`] = `
Object {
"errors": Array [],
"requestValidationResult": Object {
"errors": Array [],
"operationInfo": Object {
"apiVersion": "2018-01-01",
"operationId": "User_CreateOrUpdate",
},
"runtimeException": undefined,
"successfulRequest": true,
},
"responseValidationResult": Object {
"errors": Array [
Object {
"code": "ENUM_MISMATCH",
"documentationUrl": "",
"inner": undefined,
"message": "No enum match for: banana",
"params": Array [
"banana",
],
"pathInPayload": "properties/groups/0/type",
"severity": 0,
"similarPaths": Array [],
"source": Object {
"jsonRef": "#/definitions/GroupContractProperties/properties/type",
"position": Object {
"column": 17,
"line": 611,
},
"url": "specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2018-01-01/apimgroups.json",
},
},
],
"operationInfo": Object {
"apiVersion": "2018-01-01",
"operationId": "User_CreateOrUpdate",
},
"runtimeException": undefined,
"successfulResponse": false,
},
}
`;
exports[`Live validator snapshot validation should return the expected error requestResponse validation for INVALID_FORMAT 1`] = `
Object {
"errors": Array [],
"requestValidationResult": Object {
"errors": Array [],
"operationInfo": Object {
"apiVersion": "2018-01-01",
"operationId": "ApiManagementService_Get",
},
"runtimeException": undefined,
"successfulRequest": true,
},
"responseValidationResult": Object {
"errors": Array [
Object {
"code": "INVALID_FORMAT",
"documentationUrl": "",
"inner": undefined,
"message": "Object didn't pass validation for format date-time: 0001-01-01T00:00:00",
"params": Array [
"date-time",
"0001-01-01T00:00:00",
],
"pathInPayload": "properties/createdAtUtc",
"severity": 0,
"similarPaths": Array [],
"source": Object {
"jsonRef": "#/definitions/ApiManagementServiceBaseProperties/properties/createdAtUtc",
"position": Object {
"column": 25,
"line": 903,
},
"url": "specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2018-01-01/apimdeployment.json",
},
},
],
"operationInfo": Object {
"apiVersion": "2018-01-01",
"operationId": "ApiManagementService_Get",
},
"runtimeException": undefined,
"successfulResponse": false,
},
}
`;
exports[`Live validator snapshot validation should return the expected error requestResponse validation for INVALID_TYPE 1`] = `
Object {
"errors": Array [],
"requestValidationResult": Object {
"errors": Array [],
"operationInfo": Object {
"apiVersion": "2018-01-01",
"operationId": "ApiManagementService_Get",
},
"runtimeException": undefined,
"successfulRequest": true,
},
"responseValidationResult": Object {
"errors": Array [
Object {
"code": "INVALID_TYPE",
"documentationUrl": "",
"inner": undefined,
"message": "Expected type array but found type string",
"params": Array [
"array",
"string",
],
"pathInPayload": "properties/hostnameConfigurations",
"severity": 0,
"similarPaths": Array [],
"source": Object {
"jsonRef": "#/definitions/ApiManagementServiceBaseProperties/properties/hostnameConfigurations",
"position": Object {
"column": 35,
"line": 934,
},
"url": "specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2018-01-01/apimdeployment.json",
},
},
],
"operationInfo": Object {
"apiVersion": "2018-01-01",
"operationId": "ApiManagementService_Get",
},
"runtimeException": undefined,
"successfulResponse": false,
},
}
`;
exports[`Live validator snapshot validation should return the expected error requestResponse validation for MAX_LENGTH 1`] = `
Object {
"errors": Array [],
"requestValidationResult": Object {
"errors": Array [],
"operationInfo": Object {
"apiVersion": "2018-01-01",
"operationId": "ApiOperation_Get",
},
"runtimeException": undefined,
"successfulRequest": true,
},
"responseValidationResult": Object {
"errors": Array [
Object {
"code": "MAX_LENGTH",
"documentationUrl": "",
"inner": undefined,
"message": "String is too long (1958 chars), maximum 1000",
"params": Array [
1958,
1000,
],
"pathInPayload": "properties/description",
"severity": 0,
"similarPaths": Array [],
"source": Object {
"jsonRef": "#/definitions/OperationEntityBaseContract/properties/description",
"position": Object {
"column": 24,
"line": 4231,
},
"url": "specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2018-01-01/apimapis.json",
},
},
],
"operationInfo": Object {
"apiVersion": "2018-01-01",
"operationId": "ApiOperation_Get",
},
"runtimeException": undefined,
"successfulResponse": false,
},
}
`;
exports[`Live validator snapshot validation should return the expected error requestResponse validation for OBJECT_ADDITIONAL_PROPERTIES 1`] = `
Object {
"errors": Array [],
"requestValidationResult": Object {
"errors": Array [],
"operationInfo": Object {
"apiVersion": "2018-01-01",
"operationId": "User_CreateOrUpdate",
},
"runtimeException": undefined,
"successfulRequest": true,
},
"responseValidationResult": Object {
"errors": Array [
Object {
"code": "OBJECT_ADDITIONAL_PROPERTIES",
"documentationUrl": "",
"inner": undefined,
"message": "Additional properties not allowed: id",
"params": Array [
"id",
],
"pathInPayload": "properties/groups/0",
"severity": 0,
"similarPaths": Array [],
"source": Object {
"jsonRef": "#/definitions/GroupContractProperties",
"position": Object {
"column": 32,
"line": 593,
},
"url": "specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2018-01-01/apimgroups.json",
},
},
],
"operationInfo": Object {
"apiVersion": "2018-01-01",
"operationId": "User_CreateOrUpdate",
},
"runtimeException": undefined,
"successfulResponse": false,
},
}
`;
exports[`Live validator snapshot validation should return the expected error requestResponse validation for OBJECT_MISSING_REQUIRED_PROPERTY 1`] = `
Object {
"errors": Array [],
"requestValidationResult": Object {
"errors": Array [],
"operationInfo": Object {
"apiVersion": "2018-01-01",
"operationId": "User_CreateOrUpdate",
},
"runtimeException": undefined,
"successfulRequest": true,
},
"responseValidationResult": Object {
"errors": Array [
Object {
"code": "OBJECT_MISSING_REQUIRED_PROPERTY",
"documentationUrl": "",
"inner": undefined,
"message": "Missing required property: displayName",
"params": Array [
"displayName",
],
"pathInPayload": "properties/groups/0",
"severity": 0,
"similarPaths": Array [],
"source": Object {
"jsonRef": "#/definitions/GroupContractProperties",
"position": Object {
"column": 32,
"line": 593,
},
"url": "specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2018-01-01/apimgroups.json",
},
},
],
"operationInfo": Object {
"apiVersion": "2018-01-01",
"operationId": "User_CreateOrUpdate",
},
"runtimeException": undefined,
"successfulResponse": false,
},
}
`;

Просмотреть файл

@ -0,0 +1,58 @@
{
"liveRequest": {
"headers": {
"strict-Transport-Security": "max-age=31536000; includeSubDomains",
"x-ms-request-id": "97856fec-304a-4317-87f0-f04c328402d3",
"date": "Tue, 11 Sep 2018 19:00:21 GMT",
"eTag": "\"AAAAAAAAQqUAAAAAAABCpw==\"",
"server": "Microsoft-HTTPAPI/2.0",
"Content-Type": "application/json"
},
"method": "PUT",
"url": "/subscriptions/randomSub/resourceGroups/randomRG/providers/Microsoft.ApiManagement/service/randomService/users/radomUser?api-version=2018-01-01",
"body": {
"properties": {
"firstName": "aaaaa",
"lastName": "aaaaa",
"email": "aaaaaaaaaaaaaaaaaaaaaa",
"password": "aaaaaaaaaa",
"state": "active"
}
},
"query": { "api-version": "2018-01-01" }
},
"liveResponse": {
"statusCode": "201",
"headers": {
"strict-Transport-Security": "max-age=31536000; includeSubDomains",
"x-ms-request-id": "97856fec-304a-4317-87f0-f04c328402d3",
"date": "Tue, 11 Sep 2018 19:00:21 GMT",
"eTag": "\"AAAAAAAAQqUAAAAAAABCpw==\"",
"server": "Microsoft-HTTPAPI/2.0",
"Content-Type": "application/json"
},
"body": {
"id": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"type": "Microsoft.ApiManagement/service/users",
"name": "david-kelly-us-abb-com",
"properties": {
"firstName": "aaaaa",
"lastName": "aaaaa",
"email": "aaaaaaaaaaaaaaaaaaaaaa",
"state": "active",
"registrationDate": "2018-09-11T19:00:21.037Z",
"note": null,
"groups": [
{
"displayName": "aaaaaaaaaaaaaaaaaaa",
"description": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"builtIn": true,
"type": "System",
"externalId": null
}
],
"identities": [{ "provider": "aaaaa", "id": "aaaaaaaaaaaaaaaaaaaaaa" }]
}
}
}
}

Просмотреть файл

@ -0,0 +1,58 @@
{
"liveRequest": {
"headers": {
"strict-Transport-Security": "max-age=31536000; includeSubDomains",
"x-ms-request-id": "97856fec-304a-4317-87f0-f04c328402d3",
"date": "Tue, 11 Sep 2018 19:00:21 GMT",
"eTag": "\"AAAAAAAAQqUAAAAAAABCpw==\"",
"server": "Microsoft-HTTPAPI/2.0",
"Content-Type": "application/json"
},
"method": "PUT",
"url": "/subscriptions/randomSub/resourceGroups/randomRG/providers/Microsoft.ApiManagement/service/randomService/users/radomUser?api-version=2018-01-01",
"body": {
"properties": {
"firstName": "aaaaa",
"lastName": "aaaaa",
"email": "aaaaaaaaaaaaaaaaaaaaaa",
"password": "aaaaaaaaaa",
"state": "active"
}
},
"query": { "api-version": "2018-01-01" }
},
"liveResponse": {
"statusCode": "201",
"headers": {
"strict-Transport-Security": "max-age=31536000; includeSubDomains",
"x-ms-request-id": "97856fec-304a-4317-87f0-f04c328402d3",
"date": "Tue, 11 Sep 2018 19:00:21 GMT",
"eTag": "\"AAAAAAAAQqUAAAAAAABCpw==\"",
"server": "Microsoft-HTTPAPI/2.0",
"Content-Type": "application/json"
},
"body": {
"id": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"type": "Microsoft.ApiManagement/service/users",
"name": "david-kelly-us-abb-com",
"properties": {
"firstName": "aaaaa",
"lastName": "aaaaa",
"email": "aaaaaaaaaaaaaaaaaaaaaa",
"state": "active",
"registrationDate": "2018-09-11T19:00:21.037Z",
"note": null,
"groups": [
{
"displayName": "aaaaaaaaaaaaaaaaaaa",
"description": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"builtIn": true,
"type": "banana",
"externalId": null
}
],
"identities": [{ "provider": "aaaaa", "id": "aaaaaaaaaaaaaaaaaaaaaa" }]
}
}
}
}

Просмотреть файл

@ -0,0 +1,57 @@
{
"liveRequest": {
"headers": {
"strict-Transport-Security": "max-age=31536000; includeSubDomains",
"x-ms-request-id": "53e62a45-dba0-46ab-965b-5c6d06cf9007",
"date": "Tue, 11 Sep 2018 19:12:21 GMT",
"eTag": "\"AAAAAAEei3k=\"",
"server": "Microsoft-HTTPAPI/2.0",
"Content-Type": "application/json"
},
"method": "GET",
"url": "/subscriptions/randomSub/resourcegroups/randomRG/providers/Microsoft.ApiManagement/service/randomService?api-version=2018-01-01",
"query": { "api-version": "2018-01-01" }
},
"liveResponse": {
"statusCode": "200",
"headers": {
"strict-Transport-Security": "max-age=31536000; includeSubDomains",
"x-ms-request-id": "53e62a45-dba0-46ab-965b-5c6d06cf9007",
"date": "Tue, 11 Sep 2018 19:12:21 GMT",
"eTag": "\"AAAAAAEei3k=\"",
"server": "Microsoft-HTTPAPI/2.0",
"Content-Type": "application/json"
},
"body": {
"id": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"name": "dev1apimanagement",
"type": "Microsoft.ApiManagement/service",
"tags": {},
"location": "aaaaaaaaa",
"etag": "aaaaaaaaaaaa",
"properties": {
"publisherEmail": "aaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"publisherName": "aaaaaaaaa",
"notificationSenderEmail": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"provisioningState": "aaaaaaaaaa",
"targetProvisioningState": "aaaaaaaaaa",
"createdAtUtc": "0001-01-01T00:00:00",
"gatewayUrl": null,
"gatewayRegionalUrl": null,
"portalUrl": null,
"managementApiUrl": null,
"scmUrl": null,
"hostnameConfigurations": [],
"publicIPAddresses": null,
"privateIPAddresses": null,
"additionalLocations": null,
"virtualNetworkConfiguration": null,
"customProperties": null,
"virtualNetworkType": "None",
"certificates": null
},
"sku": { "name": "Developer", "capacity": 1 },
"identity": null
}
}
}

Просмотреть файл

@ -0,0 +1,57 @@
{
"liveRequest": {
"headers": {
"strict-Transport-Security": "max-age=31536000; includeSubDomains",
"x-ms-request-id": "53e62a45-dba0-46ab-965b-5c6d06cf9007",
"date": "Tue, 11 Sep 2018 19:12:21 GMT",
"eTag": "\"AAAAAAEei3k=\"",
"server": "Microsoft-HTTPAPI/2.0",
"Content-Type": "application/json"
},
"method": "GET",
"url": "/subscriptions/randomSub/resourcegroups/randomRG/providers/Microsoft.ApiManagement/service/randomService?api-version=2018-01-01",
"query": { "api-version": "2018-01-01" }
},
"liveResponse": {
"statusCode": "200",
"headers": {
"strict-Transport-Security": "max-age=31536000; includeSubDomains",
"x-ms-request-id": "53e62a45-dba0-46ab-965b-5c6d06cf9007",
"date": "Tue, 11 Sep 2018 19:12:21 GMT",
"eTag": "\"AAAAAAEei3k=\"",
"server": "Microsoft-HTTPAPI/2.0",
"Content-Type": "application/json"
},
"body": {
"id": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"name": "dev1apimanagement",
"type": "Microsoft.ApiManagement/service",
"tags": {},
"location": "aaaaaaaaa",
"etag": "aaaaaaaaaaaa",
"properties": {
"publisherEmail": "aaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"publisherName": "aaaaaaaaa",
"notificationSenderEmail": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"provisioningState": "aaaaaaaaaa",
"targetProvisioningState": "aaaaaaaaaa",
"createdAtUtc": "2017-07-21T17:32:28Z",
"gatewayUrl": null,
"gatewayRegionalUrl": null,
"portalUrl": null,
"managementApiUrl": null,
"scmUrl": null,
"hostnameConfigurations": "config1",
"publicIPAddresses": null,
"privateIPAddresses": null,
"additionalLocations": null,
"virtualNetworkConfiguration": null,
"customProperties": null,
"virtualNetworkType": "None",
"certificates": null
},
"sku": { "name": "Developer", "capacity": 1 },
"identity": null
}
}
}

Просмотреть файл

@ -0,0 +1,190 @@
{
"liveRequest": {
"headers": {
"strict-Transport-Security": "max-age=31536000; includeSubDomains",
"x-ms-request-id": "7388e775-58be-4ca2-ab43-fd63ee973ee4",
"date": "Wed, 12 Sep 2018 04:49:26 GMT",
"eTag": "\"AAAAAAAAR58=\"",
"server": "Microsoft-HTTPAPI/2.0",
"Content-Type": "application/json"
},
"method": "GET",
"url": "/subscriptions/randomSub/resourceGroups/randomRG/providers/Microsoft.ApiManagement/service/randomService/apis/randomAPI/operations/customerauth_registerasync?api-version=2018-01-01",
"query": { "api-version": "2018-01-01" }
},
"liveResponse": {
"statusCode": "200",
"headers": {
"strict-Transport-Security": "max-age=31536000; includeSubDomains",
"x-ms-request-id": "7388e775-58be-4ca2-ab43-fd63ee973ee4",
"date": "Wed, 12 Sep 2018 04:49:26 GMT",
"eTag": "\"AAAAAAAAR58=\"",
"server": "Microsoft-HTTPAPI/2.0",
"Content-Type": "application/json"
},
"body": {
"id": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"type": "Microsoft.ApiManagement/service/apis/operations",
"name": "customerauth_registerasync",
"properties": {
"displayName": "aaaaaaaaaaaaaaaaaaaaaaaaaa",
"method": "aaaa",
"urlTemplate": "aaaaaaaaaaaaaaaaaaaaaaaaa",
"templateParameters": [],
"description": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"request": {
"description": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"queryParameters": [],
"headers": [
{
"name": "Chipotle-CorrelationId",
"description": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"type": "string",
"values": []
},
{
"name": "Authorization",
"description": "aaa",
"type": "string",
"values": []
}
],
"representations": [
{
"contentType": "aaaaaaaaaaaaaaaa",
"schemaId": "aaaaaaaaaaaaaaaaaaaaaaaa",
"typeName": "aaaaaaaaaaaaaaaaaaaaaaa"
},
{
"contentType": "aaaaaaaaa",
"schemaId": "aaaaaaaaaaaaaaaaaaaaaaaa",
"typeName": "aaaaaaaaaaaaaaaaaaaaaaa"
},
{
"contentType": "aaaaaaaaaaaaaaa",
"schemaId": "aaaaaaaaaaaaaaaaaaaaaaaa",
"typeName": "aaaaaaaaaaaaaaaaaaaaaaa"
},
{
"contentType": "aaaaaaaa",
"schemaId": "aaaaaaaaaaaaaaaaaaaaaaaa",
"typeName": "aaaaaaaaaaaaaaaaaaaaaaa"
},
{ "contentType": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" }
]
},
"responses": [
{
"statusCode": 200,
"description": "aa",
"representations": [
{
"contentType": "aaaaaaaaaaaaaaaa",
"schemaId": "aaaaaaaaaaaaaaaaaaaaaaaa",
"typeName": "aaaaaaaaaaaaaaaaaaaaaa"
},
{
"contentType": "aaaaaaaaa",
"schemaId": "aaaaaaaaaaaaaaaaaaaaaaaa",
"typeName": "aaaaaaaaaaaaaaaaaaaaaa"
},
{
"contentType": "aaaaaaaaaaaaaaa",
"schemaId": "aaaaaaaaaaaaaaaaaaaaaaaa",
"typeName": "aaaaaaaaaaaaaaaaaaaaaa"
},
{
"contentType": "aaaaaaaa",
"schemaId": "aaaaaaaaaaaaaaaaaaaaaaaa",
"typeName": "aaaaaaaaaaaaaaaaaaaaaa"
}
],
"headers": []
},
{
"statusCode": 201,
"description": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"representations": [
{
"contentType": "aaaaaaaaaaaaaaaa",
"schemaId": "aaaaaaaaaaaaaaaaaaaaaaaa",
"typeName": "aaaaaaaaaaaaaaaaaaaaaa"
},
{
"contentType": "aaaaaaaaa",
"schemaId": "aaaaaaaaaaaaaaaaaaaaaaaa",
"typeName": "aaaaaaaaaaaaaaaaaaaaaa"
},
{
"contentType": "aaaaaaaaaaaaaaa",
"schemaId": "aaaaaaaaaaaaaaaaaaaaaaaa",
"typeName": "aaaaaaaaaaaaaaaaaaaaaa"
},
{
"contentType": "aaaaaaaa",
"schemaId": "aaaaaaaaaaaaaaaaaaaaaaaa",
"typeName": "aaaaaaaaaaaaaaaaaaaaaa"
}
],
"headers": []
},
{
"statusCode": 400,
"description": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"representations": [
{
"contentType": "aaaaaaaaaaaaaaaa",
"schemaId": "aaaaaaaaaaaaaaaaaaaaaaaa",
"typeName": "aaaaaaaaaaaaaaaaaaaaaaaaaaa"
},
{
"contentType": "aaaaaaaaa",
"schemaId": "aaaaaaaaaaaaaaaaaaaaaaaa",
"typeName": "aaaaaaaaaaaaaaaaaaaaaaaaaaa"
},
{
"contentType": "aaaaaaaaaaaaaaa",
"schemaId": "aaaaaaaaaaaaaaaaaaaaaaaa",
"typeName": "aaaaaaaaaaaaaaaaaaaaaaaaaaa"
},
{
"contentType": "aaaaaaaa",
"schemaId": "aaaaaaaaaaaaaaaaaaaaaaaa",
"typeName": "aaaaaaaaaaaaaaaaaaaaaaaaaaa"
}
],
"headers": []
},
{
"statusCode": 500,
"description": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"representations": [
{
"contentType": "aaaaaaaaaaaaaaaa",
"schemaId": "aaaaaaaaaaaaaaaaaaaaaaaa",
"typeName": "aaaaaaaaaaaaaaaaaaaaa"
},
{
"contentType": "aaaaaaaaa",
"schemaId": "aaaaaaaaaaaaaaaaaaaaaaaa",
"typeName": "aaaaaaaaaaaaaaaaaaaaa"
},
{
"contentType": "aaaaaaaaaaaaaaa",
"schemaId": "aaaaaaaaaaaaaaaaaaaaaaaa",
"typeName": "aaaaaaaaaaaaaaaaaaaaa"
},
{
"contentType": "aaaaaaaa",
"schemaId": "aaaaaaaaaaaaaaaaaaaaaaaa",
"typeName": "aaaaaaaaaaaaaaaaaaaaa"
}
],
"headers": []
}
],
"policies": null
}
}
}
}

Просмотреть файл

@ -0,0 +1,59 @@
{
"liveRequest": {
"headers": {
"strict-Transport-Security": "max-age=31536000; includeSubDomains",
"x-ms-request-id": "97856fec-304a-4317-87f0-f04c328402d3",
"date": "Tue, 11 Sep 2018 19:00:21 GMT",
"eTag": "\"AAAAAAAAQqUAAAAAAABCpw==\"",
"server": "Microsoft-HTTPAPI/2.0",
"Content-Type": "application/json"
},
"method": "PUT",
"url": "/subscriptions/randomSub/resourceGroups/randomRG/providers/Microsoft.ApiManagement/service/randomService/users/radomUser?api-version=2018-01-01",
"body": {
"properties": {
"firstName": "aaaaa",
"lastName": "aaaaa",
"email": "aaaaaaaaaaaaaaaaaaaaaa",
"password": "aaaaaaaaaa",
"state": "active"
}
},
"query": { "api-version": "2018-01-01" }
},
"liveResponse": {
"statusCode": "201",
"headers": {
"strict-Transport-Security": "max-age=31536000; includeSubDomains",
"x-ms-request-id": "97856fec-304a-4317-87f0-f04c328402d3",
"date": "Tue, 11 Sep 2018 19:00:21 GMT",
"eTag": "\"AAAAAAAAQqUAAAAAAABCpw==\"",
"server": "Microsoft-HTTPAPI/2.0",
"Content-Type": "application/json"
},
"body": {
"id": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"type": "Microsoft.ApiManagement/service/users",
"name": "aaaaaaaaaaaa",
"properties": {
"firstName": "aaaaa",
"lastName": "aaaaa",
"email": "aaaaaaaaaaaaaaaaaaaaaa",
"state": "active",
"registrationDate": "2018-09-11T19:00:21.037Z",
"note": null,
"groups": [
{
"displayName": "aaaaaaaaaaaaaaaaaaa",
"id": "aaaaaaaaaaaaaaaaaaaaaaaa",
"description": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"builtIn": true,
"type": "system",
"externalId": null
}
],
"identities": [{ "provider": "aaaaa", "id": "aaaaaaaaaaaaaaaaaaaaaa" }]
}
}
}
}

Просмотреть файл

@ -0,0 +1,57 @@
{
"liveRequest": {
"headers": {
"strict-Transport-Security": "max-age=31536000; includeSubDomains",
"x-ms-request-id": "97856fec-304a-4317-87f0-f04c328402d3",
"date": "Tue, 11 Sep 2018 19:00:21 GMT",
"eTag": "\"AAAAAAAAQqUAAAAAAABCpw==\"",
"server": "Microsoft-HTTPAPI/2.0",
"Content-Type": "application/json"
},
"method": "PUT",
"url": "/subscriptions/randomSub/resourceGroups/randomRG/providers/Microsoft.ApiManagement/service/randomService/users/radomUser?api-version=2018-01-01",
"body": {
"properties": {
"firstName": "aaaaa",
"lastName": "aaaaa",
"email": "aaaaaaaaaaaaaaaaaaaaaa",
"password": "aaaaaaaaaa",
"state": "active"
}
},
"query": { "api-version": "2018-01-01" }
},
"liveResponse": {
"statusCode": "201",
"headers": {
"strict-Transport-Security": "max-age=31536000; includeSubDomains",
"x-ms-request-id": "97856fec-304a-4317-87f0-f04c328402d3",
"date": "Tue, 11 Sep 2018 19:00:21 GMT",
"eTag": "\"AAAAAAAAQqUAAAAAAABCpw==\"",
"server": "Microsoft-HTTPAPI/2.0",
"Content-Type": "application/json"
},
"body": {
"id": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"type": "Microsoft.ApiManagement/service/users",
"name": "david-kelly-us-abb-com",
"properties": {
"firstName": "aaaaa",
"lastName": "aaaaa",
"email": "aaaaaaaaaaaaaaaaaaaaaa",
"state": "active",
"registrationDate": "2018-09-11T19:00:21.037Z",
"note": null,
"groups": [
{
"description": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"builtIn": true,
"type": "system",
"externalId": null
}
],
"identities": [{ "provider": "aaaaa", "id": "aaaaaaaaaaaaaaaaaaaaaa" }]
}
}
}
}

Просмотреть файл

@ -0,0 +1,126 @@
{
"liveRequest": {
"headers": {
"strict-Transport-Security": "max-age=31536000; includeSubDomains",
"x-ms-request-id": "90a50d53-257d-42c0-a888-67501884e8f6",
"date": "Tue, 11 Sep 2018 17:41:28 GMT",
"eTag": "\"AAAAAAEdnhs=\"",
"server": "Microsoft-HTTPAPI/2.0",
"Content-Type": "application/json"
},
"method": "GET",
"url": "/subscriptions/367b68e8-7a71-46ee-8c43-f5488498ed9e/resourceGroups/dc-p-apim-rg/providers/Microsoft.ApiManagement/service/dc-p-apim-svc01?api-version=2018-01-01",
"query": { "api-version": "2018-01-01" }
},
"liveResponse": {
"statusCode": "200",
"headers": {
"strict-Transport-Security": "max-age=31536000; includeSubDomains",
"x-ms-request-id": "90a50d53-257d-42c0-a888-67501884e8f6",
"date": "Tue, 11 Sep 2018 17:41:28 GMT",
"eTag": "\"AAAAAAEdnhs=\"",
"server": "Microsoft-HTTPAPI/2.0",
"Content-Type": "application/json"
},
"body": {
"id": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"name": "dc-p-apim-svc01",
"type": "Microsoft.ApiManagement/service",
"tags": {},
"location": "aaaaaaa",
"etag": "aaaaaaaaaaaa",
"properties": {
"publisherEmail": "aaaaaaaaaaaaaaaaaaaaaaaaaaa",
"publisherName": "aaaaaaaaaaaaaaaaaaaaaaa",
"notificationSenderEmail": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"provisioningState": "aaaaaaaaa",
"targetProvisioningState": "",
"createdAtUtc": "2018-04-28T04:24:05.4989542Z",
"gatewayUrl": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"gatewayRegionalUrl": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"portalUrl": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"managementApiUrl": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"scmUrl": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"hostnameConfigurations": [
{
"type": "Management",
"hostName": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"encodedCertificate": null,
"keyVaultId": null,
"certificatePassword": null,
"negotiateClientCertificate": false,
"certificate": {
"expiry": "2020-05-09T22:58:11+00:00",
"thumbprint": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"subject": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
},
"defaultSslBinding": false
},
{
"type": "Portal",
"hostName": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"encodedCertificate": null,
"keyVaultId": null,
"certificatePassword": null,
"negotiateClientCertificate": false,
"certificate": {
"expiry": "2020-05-09T22:58:11+00:00",
"thumbprint": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"subject": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
},
"defaultSslBinding": false
},
{
"type": "Proxy",
"hostName": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"encodedCertificate": null,
"keyVaultId": null,
"certificatePassword": null,
"negotiateClientCertificate": false,
"certificate": {
"expiry": "2020-05-09T22:58:11+00:00",
"thumbprint": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"subject": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
},
"defaultSslBinding": true
},
{
"type": "Scm",
"hostName": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"encodedCertificate": null,
"keyVaultId": null,
"certificatePassword": null,
"negotiateClientCertificate": false,
"certificate": {
"expiry": "2020-05-09T22:58:11+00:00",
"thumbprint": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"subject": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
},
"defaultSslBinding": false
}
],
"publicIPAddresses": ["aaaaaaaaaaaaa"],
"privateIPAddresses": ["aaaaaaaaaa"],
"additionalLocations": null,
"virtualNetworkConfiguration": {
"subnetResourceId": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"vnetid": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"subnetname": null
},
"customProperties": {
"Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls10": "aaaa",
"Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls11": "aaaa",
"Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Ssl30": "aaaaa",
"Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls10": "aaaa",
"Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls11": "aaaa",
"Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Ssl30": "aaaaa",
"Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.TripleDes168": "aaaa"
},
"virtualNetworkType": "Internal",
"certificates": null
},
"sku": { "name": "Premium", "capacity": 1 },
"identity": null
}
}
}

Просмотреть файл

@ -0,0 +1,39 @@
{
"liveRequest": {
"headers": {
"strict-Transport-Security": "max-age=31536000; includeSubDomains",
"x-ms-request-id": "8e3485b6-c8a7-45c2-a9f5-59b826e42880",
"date": "Tue, 11 Sep 2018 18:45:41 GMT",
"eTag": "\"AAAAAAAAjAIAAAAAAACL/A==\"",
"server": "Microsoft-HTTPAPI/2.0",
"Content-Type": "application/json"
},
"method": "GET",
"url": "/subscriptions/randomSub/resourceGroups/randomRG/providers/Microsoft.ApiManagement/service/randomService/users/randomUsers?api-version=2018-01-01",
"query": { "api-version": "2018-01-01" }
},
"liveResponse": {
"statusCode": "200",
"headers": {
"x-ms-request-id": "8e3485b6-c8a7-45c2-a9f5-59b826e42880",
"date": "Tue, 11 Sep 2018 18:45:41 GMT",
"eTag": "\"AAAAAAAAjAIAAAAAAACL/A==\"",
"server": "Microsoft-HTTPAPI/2.0",
"Content-Type": "application/json"
},
"body": {
"id": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"type": "Microsoft.ApiManagement/service/users",
"name": "5b92dc1a4de8a7229083f7bf",
"properties": {
"firstName": "aaaaa",
"lastName": "aaaaa",
"email": "aaaaaaaaaaaaaaaaaaaaa",
"state": "active",
"registrationDate": "2018-09-07T20:14:18.357Z",
"note": null,
"identities": [{ "provider": "aaaaa", "id": "aaaaaaaaaaaaaaaaaaaaa" }]
}
}
}
}

Просмотреть файл

@ -0,0 +1,651 @@
{
"swagger": "2.0",
"info": {
"title": "ApiManagementClient",
"description": "Use these REST APIs for performing operations on entities like API, Product, and Subscription associated with your Azure API Management deployment.",
"version": "2018-01-01"
},
"host": "management.azure.com",
"schemes": ["https"],
"consumes": ["application/json"],
"produces": ["application/json"],
"security": [
{
"azure_auth": ["user_impersonation"]
}
],
"securityDefinitions": {
"azure_auth": {
"type": "oauth2",
"authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize",
"flow": "implicit",
"description": "Azure Active Directory OAuth2 Flow.",
"scopes": {
"user_impersonation": "impersonate your user account"
}
}
},
"paths": {
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/policies": {
"get": {
"tags": ["Policy"],
"operationId": "Policy_ListByService",
"description": "Lists all the Global Policy definitions of the Api Management service.",
"x-ms-examples": {
"ApiManagementListPolicies": {
"$ref": "./examples/ApiManagementListPolicies.json"
}
},
"parameters": [
{
"$ref": "#/parameters/ResourceGroupNameParameter"
},
{
"$ref": "#/parameters/ServiceNameParameter"
},
{
"name": "scope",
"in": "query",
"required": false,
"type": "string",
"description": "Policy scope.",
"enum": ["Tenant", "Product", "Api", "Operation", "All"],
"x-ms-enum": {
"name": "PolicyScopeContract",
"modelAsString": false
}
},
{
"$ref": "#/parameters/ApiVersionParameter"
},
{
"$ref": "#/parameters/SubscriptionIdParameter"
}
],
"responses": {
"200": {
"description": "Returns an array of Policy Contracts.",
"schema": {
"$ref": "#/definitions/PolicyCollection"
}
}
}
}
},
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/policies/{policyId}": {
"head": {
"tags": ["Policy"],
"operationId": "Policy_GetEntityTag",
"description": "Gets the entity state (Etag) version of the Global policy definition in the Api Management service.",
"x-ms-examples": {
"ApiManagementHeadPolicy": {
"$ref": "./examples/ApiManagementHeadPolicy.json"
}
},
"parameters": [
{
"$ref": "#/parameters/ResourceGroupNameParameter"
},
{
"$ref": "#/parameters/ServiceNameParameter"
},
{
"$ref": "#/parameters/PolicyIdParameter"
},
{
"$ref": "#/parameters/ApiVersionParameter"
},
{
"$ref": "#/parameters/SubscriptionIdParameter"
}
],
"responses": {
"200": {
"description": "The current entity state version is present in the ETag header.",
"headers": {
"ETag": {
"description": "Current entity state version. Should be treated as opaque and used to make conditional HTTP requests.",
"type": "string"
}
}
},
"default": {
"description": "Error response describing why the operation failed.",
"schema": {
"$ref": "./apimanagement.json#/definitions/ErrorResponse"
}
}
}
},
"get": {
"tags": ["Policy"],
"operationId": "Policy_Get",
"description": "Get the Global policy definition of the Api Management service.",
"x-ms-examples": {
"ApiManagementGetPolicy": {
"$ref": "./examples/ApiManagementGetPolicy.json"
}
},
"parameters": [
{
"$ref": "#/parameters/ResourceGroupNameParameter"
},
{
"$ref": "#/parameters/ServiceNameParameter"
},
{
"$ref": "#/parameters/PolicyIdParameter"
},
{
"$ref": "#/parameters/ApiVersionParameter"
},
{
"$ref": "#/parameters/SubscriptionIdParameter"
}
],
"responses": {
"200": {
"description": "Returns the Policy Contracts.",
"schema": {
"$ref": "#/definitions/PolicyContract"
},
"headers": {
"ETag": {
"description": "Current entity state version. Should be treated as opaque and used to make conditional HTTP requests.",
"type": "string"
}
}
},
"default": {
"description": "Error response describing why the operation failed.",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
}
}
},
"put": {
"tags": ["Policy"],
"operationId": "Policy_CreateOrUpdate",
"description": "Creates or updates the global policy configuration of the Api Management service.",
"x-ms-examples": {
"ApiManagementCreatePolicy": {
"$ref": "./examples/ApiManagementCreatePolicy.json"
}
},
"parameters": [
{
"$ref": "#/parameters/ResourceGroupNameParameter"
},
{
"$ref": "#/parameters/ServiceNameParameter"
},
{
"$ref": "#/parameters/PolicyIdParameter"
},
{
"name": "parameters",
"in": "body",
"schema": {
"$ref": "#/definitions/PolicyContract"
},
"required": true,
"description": "The policy contents to apply."
},
{
"$ref": "#/parameters/ApiVersionParameter"
},
{
"$ref": "#/parameters/SubscriptionIdParameter"
}
],
"responses": {
"201": {
"description": "Global policy configuration was successfully created.",
"schema": {
"$ref": "#/definitions/PolicyContract"
}
},
"200": {
"description": "Global policy configuration of the Api Management service was successfully updated.",
"schema": {
"$ref": "#/definitions/PolicyContract"
}
},
"default": {
"description": "Error response describing why the operation failed.",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
}
}
},
"delete": {
"tags": ["Policy"],
"operationId": "Policy_Delete",
"description": "Deletes the global policy configuration of the Api Management Service.",
"x-ms-examples": {
"ApiManagementDeletePolicy": {
"$ref": "./examples/ApiManagementDeletePolicy.json"
}
},
"parameters": [
{
"$ref": "#/parameters/ResourceGroupNameParameter"
},
{
"$ref": "#/parameters/ServiceNameParameter"
},
{
"$ref": "#/parameters/PolicyIdParameter"
},
{
"$ref": "#/parameters/IfMatchRequiredParameter"
},
{
"$ref": "#/parameters/ApiVersionParameter"
},
{
"$ref": "#/parameters/SubscriptionIdParameter"
}
],
"responses": {
"200": {
"description": "Successfully deleted the policy configuration at the Global level."
},
"204": {
"description": "Successfully deleted the policy configuration at the Global level."
},
"default": {
"description": "Error response describing why the operation failed.",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
}
}
}
},
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/policySnippets": {
"get": {
"tags": ["PolicySnippets"],
"operationId": "PolicySnippets_ListByService",
"description": "Lists all policy snippets.",
"x-ms-examples": {
"ApiManagementListPolicySnippets": {
"$ref": "./examples/ApiManagementListPolicySnippets.json"
}
},
"parameters": [
{
"$ref": "#/parameters/ResourceGroupNameParameter"
},
{
"$ref": "#/parameters/ServiceNameParameter"
},
{
"name": "scope",
"in": "query",
"required": false,
"type": "string",
"description": "Policy scope.",
"enum": ["Tenant", "Product", "Api", "Operation", "All"],
"x-ms-enum": {
"name": "PolicyScopeContract",
"modelAsString": false
}
},
{
"$ref": "#/parameters/ApiVersionParameter"
},
{
"$ref": "#/parameters/SubscriptionIdParameter"
}
],
"responses": {
"200": {
"description": "Returns an array of Policy Contracts.",
"schema": {
"$ref": "#/definitions/PolicySnippetsCollection"
}
}
}
}
},
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/regions": {
"get": {
"tags": ["Regions"],
"operationId": "Regions_ListByService",
"description": "Lists all azure regions in which the service exists.",
"x-ms-examples": {
"ApiManagementListRegions": {
"$ref": "./examples/ApiManagementListRegions.json"
}
},
"parameters": [
{
"$ref": "#/parameters/ResourceGroupNameParameter"
},
{
"$ref": "#/parameters/ServiceNameParameter"
},
{
"$ref": "#/parameters/ApiVersionParameter"
},
{
"$ref": "#/parameters/SubscriptionIdParameter"
}
],
"responses": {
"200": {
"description": "Lists of Regions in which the service is deployed.",
"schema": {
"$ref": "#/definitions/RegionListResult"
}
}
},
"x-ms-pageable": {
"nextLinkName": "nextLink"
}
}
}
},
"definitions": {
"ErrorFieldContract": {
"properties": {
"code": {
"type": "string",
"description": "Property level error code."
},
"message": {
"type": "string",
"description": "Human-readable representation of property-level error."
},
"target": {
"type": "string",
"description": "Property name."
}
},
"description": "Error Field contract."
},
"ErrorResponse": {
"properties": {
"error": {
"x-ms-client-flatten": true,
"$ref": "#/definitions/ErrorResponseBody",
"description": "Properties of the Error Response."
}
},
"description": "Error Response."
},
"ErrorResponseBody": {
"properties": {
"code": {
"type": "string",
"description": "Service-defined error code. This code serves as a sub-status for the HTTP error code specified in the response."
},
"message": {
"type": "string",
"description": "Human-readable representation of the error."
},
"details": {
"type": "array",
"items": {
"$ref": "#/definitions/ErrorFieldContract"
},
"description": "The list of invalid fields send in request, in case of validation error."
}
},
"description": "Error Body contract."
},
"PolicyCollection": {
"properties": {
"value": {
"type": "array",
"items": {
"$ref": "#/definitions/PolicyContract"
},
"description": "Policy Contract value."
},
"nextLink": {
"type": "string",
"description": "Next page link if any."
}
},
"description": "The response of the list policy operation."
},
"PolicyContract": {
"properties": {
"properties": {
"x-ms-client-flatten": true,
"$ref": "#/definitions/PolicyContractProperties",
"description": "Properties of the Policy."
}
},
"allOf": [
{
"$ref": "#/definitions/Resource"
}
],
"description": "Policy Contract details."
},
"PolicyContractProperties": {
"properties": {
"policyContent": {
"type": "string",
"description": "Json escaped Xml Encoded contents of the Policy."
},
"contentFormat": {
"type": "string",
"description": "Format of the policyContent.",
"enum": ["xml", "xml-link", "rawxml", "rawxml-link"],
"x-ms-enum": {
"name": "PolicyContentFormat",
"modelAsString": true,
"values": [
{
"value": "xml",
"description": "The contents are inline and Content type is an XML document."
},
{
"value": "xml-link",
"description": "The policy XML document is hosted on a http endpoint accessible from the API Management service."
},
{
"value": "rawxml",
"description": "The contents are inline and Content type is a non XML encoded policy document."
},
{
"value": "rawxml-link",
"description": "The policy document is not Xml encoded and is hosted on a http endpoint accessible from the API Management service."
}
]
},
"default": "xml"
}
},
"required": ["policyContent"],
"description": "Policy contract Properties."
},
"PolicySnippetsCollection": {
"properties": {
"value": {
"type": "array",
"items": {
"$ref": "#/definitions/PolicySnippetContract"
},
"description": "Policy snippet value."
}
},
"description": "The response of the list policy snippets operation."
},
"PolicySnippetContract": {
"properties": {
"name": {
"type": "string",
"description": "Snippet name.",
"readOnly": true
},
"content": {
"type": "string",
"description": "Snippet content.",
"readOnly": true
},
"toolTip": {
"type": "string",
"description": "Snippet toolTip.",
"readOnly": true
},
"scope": {
"type": "integer",
"description": "Binary OR value of the Snippet scope.",
"readOnly": true
}
},
"description": "Policy snippet."
},
"RegionContract": {
"properties": {
"name": {
"type": "string",
"description": "Region name.",
"readOnly": true
},
"isMasterRegion": {
"description": "whether Region is the master region.",
"type": "boolean"
},
"isDeleted": {
"description": "whether Region is deleted.",
"type": "boolean"
}
},
"description": "Region profile."
},
"RegionListResult": {
"properties": {
"value": {
"type": "array",
"items": {
"$ref": "#/definitions/RegionContract"
},
"description": "Lists of Regions."
},
"count": {
"type": "integer",
"format": "int64",
"description": "Total record count number across all pages."
},
"nextLink": {
"type": "string",
"description": "Next page link if any."
}
},
"description": "Lists Regions operation response details."
},
"Resource": {
"description": "The Resource definition.",
"x-ms-azure-resource": true,
"properties": {
"id": {
"readOnly": true,
"type": "string",
"description": "Resource ID."
},
"name": {
"type": "string",
"description": "Resource name.",
"readOnly": true
},
"type": {
"readOnly": true,
"type": "string",
"description": "Resource type for API Management resource."
}
}
}
},
"parameters": {
"ApiVersionParameter": {
"name": "api-version",
"in": "query",
"required": true,
"type": "string",
"description": "Version of the API to be used with the client request."
},
"ResourceGroupNameParameter": {
"name": "resourceGroupName",
"in": "path",
"required": true,
"type": "string",
"description": "The name of the resource group.",
"x-ms-parameter-location": "method"
},
"ServiceNameParameter": {
"name": "serviceName",
"in": "path",
"required": true,
"type": "string",
"description": "The name of the API Management service.",
"minLength": 1,
"maxLength": 50,
"pattern": "^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$",
"x-ms-parameter-location": "method"
},
"SkipQueryParameter": {
"name": "$skip",
"in": "query",
"required": false,
"type": "integer",
"format": "int32",
"description": "Number of records to skip.",
"minimum": 0,
"x-ms-parameter-location": "method"
},
"SubscriptionIdParameter": {
"name": "subscriptionId",
"in": "path",
"required": true,
"type": "string",
"description": "Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call."
},
"TopQueryParameter": {
"name": "$top",
"in": "query",
"required": false,
"type": "integer",
"format": "int32",
"description": "Number of records to return.",
"minimum": 1,
"x-ms-parameter-location": "method"
},
"PolicyIdParameter": {
"name": "policyId",
"in": "path",
"required": true,
"type": "string",
"enum": ["policy"],
"description": "The identifier of the Policy.",
"x-ms-enum": {
"modelAsString": true,
"name": "PolicyIdName"
},
"x-ms-parameter-location": "method"
},
"IfMatchRequiredParameter": {
"name": "If-Match",
"in": "header",
"required": true,
"description": "ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update.",
"type": "string",
"x-ms-parameter-location": "method"
},
"IfMatchOptionalParameter": {
"name": "If-Match",
"in": "header",
"required": false,
"description": "ETag of the Entity. Not required when creating an entity, but required when updating an entity.",
"type": "string",
"x-ms-parameter-location": "method"
}
}
}

Разница между файлами не показана из-за своего большого размера Загрузить разницу

Просмотреть файл

@ -0,0 +1,682 @@
{
"swagger": "2.0",
"info": {
"title": "ApiManagementClient",
"description": "Use these REST APIs for managing OAuth2 servers configuration in your Azure API Management deployment. OAuth 2.0 can be used to authorize developer accounts for Azure API Management. For more information refer to [How to OAuth2](https://docs.microsoft.com/en-us/azure/api-management/api-management-howto-oauth2).",
"version": "2018-01-01"
},
"host": "management.azure.com",
"schemes": [
"https"
],
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"security": [
{
"azure_auth": [
"user_impersonation"
]
}
],
"securityDefinitions": {
"azure_auth": {
"type": "oauth2",
"authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize",
"flow": "implicit",
"description": "Azure Active Directory OAuth2 Flow.",
"scopes": {
"user_impersonation": "impersonate your user account"
}
}
},
"paths": {
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationServers": {
"get": {
"tags": [
"AuthorizationServers"
],
"operationId": "AuthorizationServer_ListByService",
"description": "Lists a collection of authorization servers defined within a service instance.",
"x-ms-examples": {
"ApiManagementListAuthorizationServers": {
"$ref": "./examples/ApiManagementListAuthorizationServers.json"
}
},
"parameters": [
{
"$ref": "./apimanagement.json#/parameters/ResourceGroupNameParameter"
},
{
"$ref": "./apimanagement.json#/parameters/ServiceNameParameter"
},
{
"name": "$filter",
"in": "query",
"required": false,
"type": "string",
"description": "| Field | Supported operators | Supported functions |\n|-------|------------------------|---------------------------------------------|\n| id | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |\n| name | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |"
},
{
"$ref": "./apimanagement.json#/parameters/TopQueryParameter"
},
{
"$ref": "./apimanagement.json#/parameters/SkipQueryParameter"
},
{
"$ref": "./apimanagement.json#/parameters/ApiVersionParameter"
},
{
"$ref": "./apimanagement.json#/parameters/SubscriptionIdParameter"
}
],
"responses": {
"200": {
"description": "A Collection of the Authorization Server entities for the specified API Management service instance.",
"schema": {
"$ref": "#/definitions/AuthorizationServerCollection"
}
}
},
"x-ms-pageable": {
"nextLinkName": "nextLink"
},
"x-ms-odata": "#/definitions/AuthorizationServerContract"
}
},
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationServers/{authsid}": {
"head": {
"tags": [
"AuthorizationServers"
],
"operationId": "AuthorizationServer_GetEntityTag",
"description": "Gets the entity state (Etag) version of the authorizationServer specified by its identifier.",
"x-ms-examples": {
"ApiManagementHeadAuthorizationServer": {
"$ref": "./examples/ApiManagementHeadAuthorizationServer.json"
}
},
"parameters": [
{
"$ref": "./apimanagement.json#/parameters/ResourceGroupNameParameter"
},
{
"$ref": "./apimanagement.json#/parameters/ServiceNameParameter"
},
{
"$ref": "#/parameters/AuthenticationServerIdParameter"
},
{
"$ref": "./apimanagement.json#/parameters/ApiVersionParameter"
},
{
"$ref": "./apimanagement.json#/parameters/SubscriptionIdParameter"
}
],
"responses": {
"200": {
"description": "Specified authorization server entity exists and current entity state version is present in the ETag header.",
"headers": {
"ETag": {
"description": "Current entity state version. Should be treated as opaque and used to make conditional HTTP requests.",
"type": "string"
}
}
},
"default": {
"description": "Error response describing why the operation failed.",
"schema": {
"$ref": "./apimanagement.json#/definitions/ErrorResponse"
}
}
}
},
"get": {
"tags": [
"AuthorizationServers"
],
"operationId": "AuthorizationServer_Get",
"description": "Gets the details of the authorization server specified by its identifier.",
"x-ms-examples": {
"ApiManagementGetAuthorizationServer": {
"$ref": "./examples/ApiManagementGetAuthorizationServer.json"
}
},
"parameters": [
{
"$ref": "./apimanagement.json#/parameters/ResourceGroupNameParameter"
},
{
"$ref": "./apimanagement.json#/parameters/ServiceNameParameter"
},
{
"$ref": "#/parameters/AuthenticationServerIdParameter"
},
{
"$ref": "./apimanagement.json#/parameters/ApiVersionParameter"
},
{
"$ref": "./apimanagement.json#/parameters/SubscriptionIdParameter"
}
],
"responses": {
"200": {
"description": "Gets the details of the specified authorization server.",
"schema": {
"$ref": "#/definitions/AuthorizationServerContract"
},
"headers": {
"ETag": {
"description": "Current entity state version. Should be treated as opaque and used to make conditional HTTP requests.",
"type": "string"
}
}
},
"default": {
"description": "Error response describing why the operation failed.",
"schema": {
"$ref": "./apimanagement.json#/definitions/ErrorResponse"
}
}
}
},
"put": {
"tags": [
"AuthorizationServers"
],
"operationId": "AuthorizationServer_CreateOrUpdate",
"description": "Creates new authorization server or updates an existing authorization server.",
"x-ms-examples": {
"ApiManagementCreateAuthorizationServer": {
"$ref": "./examples/ApiManagementCreateAuthorizationServer.json"
}
},
"parameters": [
{
"$ref": "./apimanagement.json#/parameters/ResourceGroupNameParameter"
},
{
"$ref": "./apimanagement.json#/parameters/ServiceNameParameter"
},
{
"$ref": "#/parameters/AuthenticationServerIdParameter"
},
{
"name": "parameters",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/AuthorizationServerContract"
},
"description": "Create or update parameters."
},
{
"$ref": "./apimanagement.json#/parameters/IfMatchOptionalParameter"
},
{
"$ref": "./apimanagement.json#/parameters/ApiVersionParameter"
},
{
"$ref": "./apimanagement.json#/parameters/SubscriptionIdParameter"
}
],
"responses": {
"201": {
"description": "Authorization server was successfully registered.",
"schema": {
"$ref": "#/definitions/AuthorizationServerContract"
}
},
"200": {
"description": "Authorization server is already registered.",
"schema": {
"$ref": "#/definitions/AuthorizationServerContract"
}
},
"default": {
"description": "Error response describing why the operation failed.",
"schema": {
"$ref": "./apimanagement.json#/definitions/ErrorResponse"
}
}
}
},
"patch": {
"tags": [
"AuthorizationServers"
],
"operationId": "AuthorizationServer_Update",
"description": "Updates the details of the authorization server specified by its identifier.",
"x-ms-examples": {
"ApiManagementUpdateAuthorizationServer": {
"$ref": "./examples/ApiManagementUpdateAuthorizationServer.json"
}
},
"parameters": [
{
"$ref": "./apimanagement.json#/parameters/ResourceGroupNameParameter"
},
{
"$ref": "./apimanagement.json#/parameters/ServiceNameParameter"
},
{
"$ref": "#/parameters/AuthenticationServerIdParameter"
},
{
"name": "parameters",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/AuthorizationServerUpdateContract"
},
"description": "OAuth2 Server settings Update parameters."
},
{
"$ref": "./apimanagement.json#/parameters/IfMatchRequiredParameter"
},
{
"$ref": "./apimanagement.json#/parameters/ApiVersionParameter"
},
{
"$ref": "./apimanagement.json#/parameters/SubscriptionIdParameter"
}
],
"responses": {
"204": {
"description": "The authorization server settings were successfully updated."
},
"default": {
"description": "Error response describing why the operation failed.",
"schema": {
"$ref": "./apimanagement.json#/definitions/ErrorResponse"
}
}
}
},
"delete": {
"tags": [
"AuthorizationServers"
],
"operationId": "AuthorizationServer_Delete",
"description": "Deletes specific authorization server instance.",
"x-ms-examples": {
"ApiManagementDeleteAuthorizationServer": {
"$ref": "./examples/ApiManagementDeleteAuthorizationServer.json"
}
},
"parameters": [
{
"$ref": "./apimanagement.json#/parameters/ResourceGroupNameParameter"
},
{
"$ref": "./apimanagement.json#/parameters/ServiceNameParameter"
},
{
"$ref": "#/parameters/AuthenticationServerIdParameter"
},
{
"$ref": "./apimanagement.json#/parameters/IfMatchRequiredParameter"
},
{
"$ref": "./apimanagement.json#/parameters/ApiVersionParameter"
},
{
"$ref": "./apimanagement.json#/parameters/SubscriptionIdParameter"
}
],
"responses": {
"200": {
"description": "The authorization server settings were successfully deleted."
},
"204": {
"description": "The authorization server settings were successfully deleted."
},
"default": {
"description": "Error response describing why the operation failed.",
"schema": {
"$ref": "./apimanagement.json#/definitions/ErrorResponse"
}
}
}
}
}
},
"definitions": {
"AuthorizationServerCollection": {
"properties": {
"value": {
"type": "array",
"items": {
"$ref": "#/definitions/AuthorizationServerContract"
},
"description": "Page values."
},
"count": {
"type": "integer",
"format": "int64",
"description": "Total record count number across all pages."
},
"nextLink": {
"type": "string",
"description": "Next page link if any."
}
},
"description": "Paged OAuth2 Authorization Servers list representation."
},
"AuthorizationServerContract": {
"properties": {
"properties": {
"x-ms-client-flatten": true,
"$ref": "#/definitions/AuthorizationServerContractProperties",
"description": "Properties of the External OAuth authorization server Contract."
}
},
"allOf": [
{
"$ref": "./apimanagement.json#/definitions/Resource"
}
],
"description": "External OAuth authorization server settings."
},
"AuthorizationServerContractProperties": {
"properties": {
"displayName": {
"type": "string",
"description": "User-friendly authorization server name.",
"minLength": 1,
"maxLength": 50
},
"clientRegistrationEndpoint": {
"type": "string",
"description": "Optional reference to a page where client or app registration for this authorization server is performed. Contains absolute URL to entity being referenced."
},
"authorizationEndpoint": {
"type": "string",
"description": "OAuth authorization endpoint. See http://tools.ietf.org/html/rfc6749#section-3.2."
},
"grantTypes": {
"type": "array",
"items": {
"type": "string",
"enum": [
"authorizationCode",
"implicit",
"resourceOwnerPassword",
"clientCredentials"
],
"x-ms-enum": {
"name": "GrantType",
"modelAsString": true,
"values": [
{
"value": "authorizationCode",
"description": "Authorization Code Grant flow as described https://tools.ietf.org/html/rfc6749#section-4.1."
},
{
"value": "implicit",
"description": "Implicit Code Grant flow as described https://tools.ietf.org/html/rfc6749#section-4.2."
},
{
"value": "resourceOwnerPassword",
"description": "Resource Owner Password Grant flow as described https://tools.ietf.org/html/rfc6749#section-4.3."
},
{
"value": "clientCredentials",
"description": "Client Credentials Grant flow as described https://tools.ietf.org/html/rfc6749#section-4.4."
}
]
}
},
"description": "Form of an authorization grant, which the client uses to request the access token.",
"externalDocs": {
"url": "http://tools.ietf.org/html/rfc6749#section-4"
}
},
"clientId": {
"type": "string",
"description": "Client or app id registered with this authorization server."
}
},
"allOf": [
{
"$ref": "#/definitions/AuthorizationServerContractBaseProperties"
}
],
"required": [
"displayName",
"clientRegistrationEndpoint",
"authorizationEndpoint",
"clientId",
"grantTypes"
],
"description": "External OAuth authorization server settings Properties."
},
"AuthorizationServerUpdateContract": {
"properties": {
"properties": {
"x-ms-client-flatten": true,
"$ref": "#/definitions/AuthorizationServerUpdateContractProperties",
"description": "Properties of the External OAuth authorization server update Contract."
}
},
"allOf": [
{
"$ref": "./apimanagement.json#/definitions/Resource"
}
],
"description": "External OAuth authorization server settings."
},
"AuthorizationServerUpdateContractProperties": {
"properties": {
"displayName": {
"type": "string",
"description": "User-friendly authorization server name.",
"minLength": 1,
"maxLength": 50
},
"clientRegistrationEndpoint": {
"type": "string",
"description": "Optional reference to a page where client or app registration for this authorization server is performed. Contains absolute URL to entity being referenced."
},
"authorizationEndpoint": {
"type": "string",
"description": "OAuth authorization endpoint. See http://tools.ietf.org/html/rfc6749#section-3.2."
},
"grantTypes": {
"type": "array",
"items": {
"type": "string",
"enum": [
"authorizationCode",
"implicit",
"resourceOwnerPassword",
"clientCredentials"
],
"x-ms-enum": {
"name": "GrantType",
"modelAsString": true,
"values": [
{
"value": "authorizationCode",
"description": "Authorization Code Grant flow as described https://tools.ietf.org/html/rfc6749#section-4.1."
},
{
"value": "implicit",
"description": "Implicit Code Grant flow as described https://tools.ietf.org/html/rfc6749#section-4.2."
},
{
"value": "resourceOwnerPassword",
"description": "Resource Owner Password Grant flow as described https://tools.ietf.org/html/rfc6749#section-4.3."
},
{
"value": "clientCredentials",
"description": "Client Credentials Grant flow as described https://tools.ietf.org/html/rfc6749#section-4.4."
}
]
}
},
"description": "Form of an authorization grant, which the client uses to request the access token.",
"externalDocs": {
"url": "http://tools.ietf.org/html/rfc6749#section-4"
}
},
"clientId": {
"type": "string",
"description": "Client or app id registered with this authorization server."
}
},
"allOf": [
{
"$ref": "#/definitions/AuthorizationServerContractBaseProperties"
}
],
"description": "External OAuth authorization server Update settings contract."
},
"AuthorizationServerContractBaseProperties": {
"properties": {
"description": {
"type": "string",
"description": "Description of the authorization server. Can contain HTML formatting tags."
},
"authorizationMethods": {
"type": "array",
"items": {
"type": "string",
"enum": [
"HEAD",
"OPTIONS",
"TRACE",
"GET",
"POST",
"PUT",
"PATCH",
"DELETE"
],
"x-ms-enum": {
"name": "AuthorizationMethod",
"modelAsString": false
}
},
"description": "HTTP verbs supported by the authorization endpoint. GET must be always present. POST is optional."
},
"clientAuthenticationMethod": {
"type": "array",
"items": {
"type": "string",
"enum": [
"Basic",
"Body"
],
"x-ms-enum": {
"name": "ClientAuthenticationMethod",
"modelAsString": true,
"values": [
{
"value": "Basic",
"description": "Basic Client Authentication method."
},
{
"value": "Body",
"description": "Body based Authentication method."
}
]
}
},
"description": "Method of authentication supported by the token endpoint of this authorization server. Possible values are Basic and/or Body. When Body is specified, client credentials and other parameters are passed within the request body in the application/x-www-form-urlencoded format."
},
"tokenBodyParameters": {
"type": "array",
"items": {
"$ref": "#/definitions/TokenBodyParameterContract"
},
"description": "Additional parameters required by the token endpoint of this authorization server represented as an array of JSON objects with name and value string properties, i.e. {\"name\" : \"name value\", \"value\": \"a value\"}."
},
"tokenEndpoint": {
"type": "string",
"description": "OAuth token endpoint. Contains absolute URI to entity being referenced.",
"externalDocs": {
"url": "http://tools.ietf.org/html/rfc6749#section-3.1"
}
},
"supportState": {
"type": "boolean",
"description": "If true, authorization server will include state parameter from the authorization request to its response. Client may use state parameter to raise protocol security.",
"externalDocs": {
"url": "http://tools.ietf.org/html/rfc6749#section-3.1"
}
},
"defaultScope": {
"type": "string",
"description": "Access token scope that is going to be requested by default. Can be overridden at the API level. Should be provided in the form of a string containing space-delimited values.",
"externalDocs": {
"url": "http://tools.ietf.org/html/rfc6749#section-3.3"
}
},
"bearerTokenSendingMethods": {
"type": "array",
"items": {
"type": "string",
"enum": [
"authorizationHeader",
"query"
],
"x-ms-enum": {
"name": "BearerTokenSendingMethod",
"modelAsString": true
}
},
"description": "Specifies the mechanism by which access token is passed to the API. ",
"externalDocs": {
"url": "http://tools.ietf.org/html/rfc6749#section-4"
}
},
"clientSecret": {
"type": "string",
"description": "Client or app secret registered with this authorization server."
},
"resourceOwnerUsername": {
"type": "string",
"description": "Can be optionally specified when resource owner password grant type is supported by this authorization server. Default resource owner username."
},
"resourceOwnerPassword": {
"type": "string",
"description": "Can be optionally specified when resource owner password grant type is supported by this authorization server. Default resource owner password."
}
},
"description": "External OAuth authorization server Update settings contract."
},
"TokenBodyParameterContract": {
"properties": {
"name": {
"type": "string",
"description": "body parameter name."
},
"value": {
"type": "string",
"description": "body parameter value."
}
},
"required": [
"name",
"value"
],
"description": "OAuth acquire token request body parameter (www-url-form-encoded)."
}
},
"parameters": {
"AuthenticationServerIdParameter": {
"name": "authsid",
"in": "path",
"required": true,
"type": "string",
"description": "Identifier of the authorization server.",
"minLength": 1,
"maxLength": 80,
"pattern": "(^[\\w]+$)|(^[\\w][\\w\\-]+[\\w]$)",
"x-ms-parameter-location": "method"
}
}
}

Просмотреть файл

@ -0,0 +1,770 @@
{
"swagger": "2.0",
"info": {
"title": "ApiManagementClient",
"description": "Use these REST APIs for performing operations on Backend entity in Azure API Management deployment. The Backend entity in API Management represents a backend service that is configured to skip certification chain validation when using a self-signed certificate to test mutual certificate authentication.",
"version": "2018-01-01"
},
"host": "management.azure.com",
"schemes": [
"https"
],
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"security": [
{
"azure_auth": [
"user_impersonation"
]
}
],
"securityDefinitions": {
"azure_auth": {
"type": "oauth2",
"authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize",
"flow": "implicit",
"description": "Azure Active Directory OAuth2 Flow.",
"scopes": {
"user_impersonation": "impersonate your user account"
}
}
},
"paths": {
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/backends": {
"get": {
"tags": [
"Backends"
],
"operationId": "Backend_ListByService",
"description": "Lists a collection of backends in the specified service instance.",
"x-ms-examples": {
"ApiManagementListBackends": {
"$ref": "./examples/ApiManagementListBackends.json"
}
},
"parameters": [
{
"$ref": "./apimanagement.json#/parameters/ResourceGroupNameParameter"
},
{
"$ref": "./apimanagement.json#/parameters/ServiceNameParameter"
},
{
"name": "$filter",
"in": "query",
"required": false,
"type": "string",
"description": "| Field | Supported operators | Supported functions |\n|-------|------------------------|---------------------------------------------|\n| id | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |\n| host | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |"
},
{
"$ref": "./apimanagement.json#/parameters/TopQueryParameter"
},
{
"$ref": "./apimanagement.json#/parameters/SkipQueryParameter"
},
{
"$ref": "./apimanagement.json#/parameters/ApiVersionParameter"
},
{
"$ref": "./apimanagement.json#/parameters/SubscriptionIdParameter"
}
],
"responses": {
"200": {
"description": "Lists a collection of Backend entities.",
"schema": {
"$ref": "#/definitions/BackendCollection"
}
},
"default": {
"description": "Error response describing why the operation failed.",
"schema": {
"$ref": "./apimanagement.json#/definitions/ErrorResponse"
}
}
},
"x-ms-pageable": {
"nextLinkName": "nextLink"
},
"x-ms-odata": "#/definitions/BackendContract"
}
},
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/backends/{backendid}": {
"head": {
"tags": [
"Backends"
],
"operationId": "Backend_GetEntityTag",
"description": "Gets the entity state (Etag) version of the backend specified by its identifier.",
"x-ms-examples": {
"ApiManagementHeadBackend": {
"$ref": "./examples/ApiManagementHeadBackend.json"
}
},
"parameters": [
{
"$ref": "./apimanagement.json#/parameters/ResourceGroupNameParameter"
},
{
"$ref": "./apimanagement.json#/parameters/ServiceNameParameter"
},
{
"$ref": "#/parameters/BackendIdParameter"
},
{
"$ref": "./apimanagement.json#/parameters/ApiVersionParameter"
},
{
"$ref": "./apimanagement.json#/parameters/SubscriptionIdParameter"
}
],
"responses": {
"200": {
"description": "Specified backend entity exists and current entity state version is present in the ETag header.",
"headers": {
"ETag": {
"description": "Current entity state version. Should be treated as opaque and used to make conditional HTTP requests.",
"type": "string"
}
}
},
"default": {
"description": "Error response describing why the operation failed.",
"schema": {
"$ref": "./apimanagement.json#/definitions/ErrorResponse"
}
}
}
},
"get": {
"tags": [
"Backends"
],
"operationId": "Backend_Get",
"description": "Gets the details of the backend specified by its identifier.",
"x-ms-examples": {
"ApiManagementGetBackend": {
"$ref": "./examples/ApiManagementGetBackend.json"
}
},
"parameters": [
{
"$ref": "./apimanagement.json#/parameters/ResourceGroupNameParameter"
},
{
"$ref": "./apimanagement.json#/parameters/ServiceNameParameter"
},
{
"$ref": "#/parameters/BackendIdParameter"
},
{
"$ref": "./apimanagement.json#/parameters/ApiVersionParameter"
},
{
"$ref": "./apimanagement.json#/parameters/SubscriptionIdParameter"
}
],
"responses": {
"200": {
"description": "The response body contains the specified Backend entity.",
"schema": {
"$ref": "#/definitions/BackendContract"
},
"headers": {
"ETag": {
"description": "Current entity state version. Should be treated as opaque and used to make conditional HTTP requests.",
"type": "string"
}
}
},
"default": {
"description": "Error response describing why the operation failed.",
"schema": {
"$ref": "./apimanagement.json#/definitions/ErrorResponse"
}
}
}
},
"put": {
"tags": [
"Backends"
],
"operationId": "Backend_CreateOrUpdate",
"description": "Creates or Updates a backend.",
"x-ms-examples": {
"ApiManagementCreateBackendServiceFabric": {
"$ref": "./examples/ApiManagementCreateBackendServiceFabric.json"
},
"ApiManagementCreateBackendProxyBackend": {
"$ref": "./examples/ApiManagementCreateBackendProxyBackend.json"
}
},
"parameters": [
{
"$ref": "./apimanagement.json#/parameters/ResourceGroupNameParameter"
},
{
"$ref": "./apimanagement.json#/parameters/ServiceNameParameter"
},
{
"$ref": "#/parameters/BackendIdParameter"
},
{
"name": "parameters",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/BackendContract"
},
"description": "Create parameters."
},
{
"$ref": "./apimanagement.json#/parameters/IfMatchOptionalParameter"
},
{
"$ref": "./apimanagement.json#/parameters/ApiVersionParameter"
},
{
"$ref": "./apimanagement.json#/parameters/SubscriptionIdParameter"
}
],
"responses": {
"201": {
"description": "Backend was successfully created.",
"schema": {
"$ref": "#/definitions/BackendContract"
}
},
"200": {
"description": "The existing backend was successfully updated.",
"schema": {
"$ref": "#/definitions/BackendContract"
}
},
"default": {
"description": "Error response describing why the operation failed.",
"schema": {
"$ref": "./apimanagement.json#/definitions/ErrorResponse"
}
}
}
},
"patch": {
"tags": [
"Backends"
],
"operationId": "Backend_Update",
"description": "Updates an existing backend.",
"x-ms-examples": {
"ApiManagementUpdateBackend": {
"$ref": "./examples/ApiManagementUpdateBackend.json"
}
},
"parameters": [
{
"$ref": "./apimanagement.json#/parameters/ResourceGroupNameParameter"
},
{
"$ref": "./apimanagement.json#/parameters/ServiceNameParameter"
},
{
"$ref": "#/parameters/BackendIdParameter"
},
{
"name": "parameters",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/BackendUpdateParameters"
},
"description": "Update parameters."
},
{
"$ref": "./apimanagement.json#/parameters/IfMatchRequiredParameter"
},
{
"$ref": "./apimanagement.json#/parameters/ApiVersionParameter"
},
{
"$ref": "./apimanagement.json#/parameters/SubscriptionIdParameter"
}
],
"responses": {
"204": {
"description": "The existing backend was successfully updated."
},
"default": {
"description": "Error response describing why the operation failed.",
"schema": {
"$ref": "./apimanagement.json#/definitions/ErrorResponse"
}
}
}
},
"delete": {
"tags": [
"Backends"
],
"operationId": "Backend_Delete",
"x-ms-examples": {
"ApiManagementDeleteBackend": {
"$ref": "./examples/ApiManagementDeleteBackend.json"
}
},
"description": "Deletes the specified backend.",
"parameters": [
{
"$ref": "./apimanagement.json#/parameters/ResourceGroupNameParameter"
},
{
"$ref": "./apimanagement.json#/parameters/ServiceNameParameter"
},
{
"$ref": "#/parameters/BackendIdParameter"
},
{
"$ref": "./apimanagement.json#/parameters/IfMatchRequiredParameter"
},
{
"$ref": "./apimanagement.json#/parameters/ApiVersionParameter"
},
{
"$ref": "./apimanagement.json#/parameters/SubscriptionIdParameter"
}
],
"responses": {
"200": {
"description": "The backend was successfully deleted."
},
"204": {
"description": "The backend was successfully deleted."
},
"default": {
"description": "Error response describing why the operation failed.",
"schema": {
"$ref": "./apimanagement.json#/definitions/ErrorResponse"
}
}
}
}
},
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/backends/{backendid}/reconnect": {
"post": {
"tags": [
"Backends"
],
"operationId": "Backend_Reconnect",
"description": "Notifies the APIM proxy to create a new connection to the backend after the specified timeout. If no timeout was specified, timeout of 2 minutes is used.",
"x-ms-examples": {
"ApiManagementBackendReconnect": {
"$ref": "./examples/ApiManagementBackendReconnect.json"
}
},
"parameters": [
{
"$ref": "./apimanagement.json#/parameters/ResourceGroupNameParameter"
},
{
"$ref": "./apimanagement.json#/parameters/ServiceNameParameter"
},
{
"$ref": "#/parameters/BackendIdParameter"
},
{
"name": "parameters",
"in": "body",
"required": false,
"schema": {
"$ref": "#/definitions/BackendReconnectContract"
},
"description": "Reconnect request parameters."
},
{
"$ref": "./apimanagement.json#/parameters/ApiVersionParameter"
},
{
"$ref": "./apimanagement.json#/parameters/SubscriptionIdParameter"
}
],
"responses": {
"202": {
"description": "Reconnect request accepted."
},
"default": {
"description": "Error response describing why the operation failed.",
"schema": {
"$ref": "./apimanagement.json#/definitions/ErrorResponse"
}
}
}
}
}
},
"definitions": {
"BackendAuthorizationHeaderCredentials": {
"properties": {
"scheme": {
"type": "string",
"description": "Authentication Scheme name.",
"minLength": 1,
"maxLength": 100
},
"parameter": {
"type": "string",
"description": "Authentication Parameter value.",
"minLength": 1,
"maxLength": 300
}
},
"required": [
"scheme",
"parameter"
],
"description": "Authorization header information."
},
"BackendBaseParameters": {
"properties": {
"title": {
"type": "string",
"description": "Backend Title.",
"minLength": 1,
"maxLength": 300
},
"description": {
"type": "string",
"description": "Backend Description.",
"minLength": 1,
"maxLength": 2000
},
"resourceId": {
"type": "string",
"description": "Management Uri of the Resource in External System. This url can be the Arm Resource Id of Logic Apps, Function Apps or Api Apps.",
"minLength": 1,
"maxLength": 2000
},
"properties": {
"$ref": "#/definitions/BackendProperties",
"description": "Backend Properties contract"
},
"credentials": {
"$ref": "#/definitions/BackendCredentialsContract",
"description": "Backend Credentials Contract Properties"
},
"proxy": {
"$ref": "#/definitions/BackendProxyContract",
"description": "Backend Proxy Contract Properties"
},
"tls": {
"$ref": "#/definitions/BackendTlsProperties",
"description": "Backend TLS Properties"
}
},
"description": "Backend entity base Parameter set."
},
"BackendCollection": {
"properties": {
"value": {
"type": "array",
"items": {
"$ref": "#/definitions/BackendContract"
},
"description": "Backend values."
},
"nextLink": {
"type": "string",
"description": "Next page link if any."
}
},
"description": "Paged Backend list representation."
},
"BackendContract": {
"properties": {
"properties": {
"x-ms-client-flatten": true,
"$ref": "#/definitions/BackendContractProperties",
"description": "Backend entity contract properties."
}
},
"allOf": [
{
"$ref": "./apimanagement.json#/definitions/Resource"
}
],
"description": "Backend details."
},
"BackendContractProperties": {
"properties": {
"url": {
"type": "string",
"description": "Runtime Url of the Backend.",
"minLength": 1,
"maxLength": 2000
},
"protocol": {
"type": "string",
"enum": [
"http",
"soap"
],
"x-ms-enum": {
"name": "BackendProtocol",
"modelAsString": true,
"values": [
{
"value": "http",
"description": "The Backend is a RESTful service."
},
{
"value": "soap",
"description": "The Backend is a SOAP service."
}
]
},
"description": "Backend communication protocol."
}
},
"allOf": [
{
"$ref": "#/definitions/BackendBaseParameters"
}
],
"required": [
"url",
"protocol"
],
"description": "Parameters supplied to the Create Backend operation."
},
"BackendCredentialsContract": {
"properties": {
"certificate": {
"type": "array",
"items": {
"type": "string"
},
"maxItems": 32,
"description": "List of Client Certificate Thumbprint."
},
"query": {
"type": "object",
"additionalProperties": {
"type": "array",
"items": {
"type": "string"
}
},
"description": "Query Parameter description."
},
"header": {
"type": "object",
"additionalProperties": {
"type": "array",
"items": {
"type": "string"
}
},
"description": "Header Parameter description."
},
"authorization": {
"description": "Authorization header authentication",
"$ref": "#/definitions/BackendAuthorizationHeaderCredentials"
}
},
"description": "Details of the Credentials used to connect to Backend."
},
"BackendProperties": {
"properties": {
"serviceFabricCluster": {
"$ref": "#/definitions/BackendServiceFabricClusterProperties",
"description": "Backend Service Fabric Cluster Properties"
}
},
"description": "Properties specific to the Backend Type."
},
"BackendServiceFabricClusterProperties": {
"properties": {
"clientCertificatethumbprint": {
"description": "The client certificate thumbprint for the management endpoint.",
"type": "string"
},
"maxPartitionResolutionRetries": {
"description": "Maximum number of retries while attempting resolve the parition.",
"format": "int32",
"type": "integer"
},
"managementEndpoints": {
"type": "array",
"items": {
"type": "string"
},
"description": "The cluster management endpoint."
},
"serverCertificateThumbprints": {
"type": "array",
"items": {
"type": "string"
},
"description": "Thumbprints of certificates cluster management service uses for tls communication"
},
"serverX509Names": {
"type": "array",
"items": {
"$ref": "#/definitions/X509CertificateName"
},
"description": "Server X509 Certificate Names Collection"
}
},
"required": [
"managementEndpoints",
"clientCertificatethumbprint"
],
"description": "Properties of the Service Fabric Type Backend."
},
"X509CertificateName": {
"properties": {
"name": {
"description": "Common Name of the Certificate.",
"type": "string"
},
"issuerCertificateThumbprint": {
"description": "Thumbprint for the Issuer of the Certificate.",
"type": "string"
}
},
"externalDocs": {
"url": "https://docs.microsoft.com/en-us/azure/service-fabric/service-fabric-windows-cluster-x509-security"
},
"description": "Properties of server X509Names."
},
"BackendTlsProperties": {
"properties": {
"validateCertificateChain": {
"description": "Flag indicating whether SSL certificate chain validation should be done when using self-signed certificates for this backend host.",
"type": "boolean",
"default": true
},
"validateCertificateName": {
"description": "Flag indicating whether SSL certificate name validation should be done when using self-signed certificates for this backend host.",
"type": "boolean",
"default": true
}
},
"description": "Properties controlling TLS Certificate Validation."
},
"BackendProxyContract": {
"externalDocs": {
"url": "https://msdn.microsoft.com/en-us/library/system.net.webproxy(v=vs.110).aspx",
"description": "Backend entity uses these details to connect to a WebProxy."
},
"properties": {
"url": {
"type": "string",
"description": "WebProxy Server AbsoluteUri property which includes the entire URI stored in the Uri instance, including all fragments and query strings.",
"minLength": 1,
"maxLength": 2000
},
"username": {
"type": "string",
"description": "Username to connect to the WebProxy server"
},
"password": {
"type": "string",
"description": "Password to connect to the WebProxy Server"
}
},
"required": [
"url"
],
"description": "Details of the Backend WebProxy Server to use in the Request to Backend."
},
"BackendUpdateParameters": {
"properties": {
"properties": {
"x-ms-client-flatten": true,
"$ref": "#/definitions/BackendUpdateParameterProperties",
"description": "Backend entity update contract properties."
}
},
"description": "Backend update parameters."
},
"BackendUpdateParameterProperties": {
"properties": {
"url": {
"type": "string",
"description": "Runtime Url of the Backend.",
"minLength": 1,
"maxLength": 2000
},
"protocol": {
"type": "string",
"enum": [
"http",
"soap"
],
"x-ms-enum": {
"name": "BackendProtocol",
"modelAsString": true,
"values": [
{
"value": "http",
"description": "The Backend is a RESTful service."
},
{
"value": "soap",
"description": "The Backend is a SOAP service."
}
]
},
"description": "Backend communication protocol."
}
},
"allOf": [
{
"$ref": "#/definitions/BackendBaseParameters"
}
],
"description": "Parameters supplied to the Update Backend operation."
},
"BackendReconnectContract": {
"properties": {
"properties": {
"x-ms-client-flatten": true,
"$ref": "#/definitions/BackendReconnectProperties",
"description": "Reconnect request properties."
}
},
"allOf": [
{
"$ref": "./apimanagement.json#/definitions/Resource"
}
],
"description": "Reconnect request parameters."
},
"BackendReconnectProperties": {
"properties": {
"after": {
"type": "string",
"format": "duration",
"description": "Duration in ISO8601 format after which reconnect will be initiated. Minimum duration of the Reconect is PT2M."
}
},
"description": "Properties to control reconnect requests."
}
},
"parameters": {
"BackendIdParameter": {
"name": "backendid",
"in": "path",
"required": true,
"type": "string",
"description": "Identifier of the Backend entity. Must be unique in the current API Management service instance.",
"minLength": 1,
"maxLength": 80,
"pattern": "(^[\\w]+$)|(^[\\w][\\w\\-]+[\\w]$)",
"x-ms-parameter-location": "method"
}
}
}

Просмотреть файл

@ -0,0 +1,401 @@
{
"swagger": "2.0",
"info": {
"title": "ApiManagementClient",
"description": "Use these REST APIs for performing operations on Certificate entity in your Azure API Management deployment. Certificates can be used to setup mutual authentication with your Backend in API Management. For more information refer to [How to secure backend using Mutual Auth Certificate](https://docs.microsoft.com/en-us/azure/api-management/api-management-howto-mutual-certificates).",
"version": "2018-01-01"
},
"host": "management.azure.com",
"schemes": [
"https"
],
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"security": [
{
"azure_auth": [
"user_impersonation"
]
}
],
"securityDefinitions": {
"azure_auth": {
"type": "oauth2",
"authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize",
"flow": "implicit",
"description": "Azure Active Directory OAuth2 Flow.",
"scopes": {
"user_impersonation": "impersonate your user account"
}
}
},
"paths": {
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/certificates": {
"get": {
"tags": [
"Certificates"
],
"operationId": "Certificate_ListByService",
"description": "Lists a collection of all certificates in the specified service instance.",
"x-ms-examples": {
"ApiManagementListCertificates": {
"$ref": "./examples/ApiManagementListCertificates.json"
}
},
"parameters": [
{
"$ref": "./apimanagement.json#/parameters/ResourceGroupNameParameter"
},
{
"$ref": "./apimanagement.json#/parameters/ServiceNameParameter"
},
{
"name": "$filter",
"in": "query",
"required": false,
"type": "string",
"description": "| Field | Supported operators | Supported functions |\n|----------------|------------------------|---------------------------------------------|\n| id | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |\n| subject | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |\n| thumbprint | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |\n| expirationDate | ge, le, eq, ne, gt, lt | N/A |"
},
{
"$ref": "./apimanagement.json#/parameters/TopQueryParameter"
},
{
"$ref": "./apimanagement.json#/parameters/SkipQueryParameter"
},
{
"$ref": "./apimanagement.json#/parameters/ApiVersionParameter"
},
{
"$ref": "./apimanagement.json#/parameters/SubscriptionIdParameter"
}
],
"responses": {
"200": {
"description": "Returns a collection of Certificate entity.",
"schema": {
"$ref": "#/definitions/CertificateCollection"
}
},
"default": {
"description": "Error response describing why the operation failed.",
"schema": {
"$ref": "./apimanagement.json#/definitions/ErrorResponse"
}
}
},
"x-ms-pageable": {
"nextLinkName": "nextLink"
},
"x-ms-odata": "#/definitions/CertificateContract"
}
},
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/certificates/{certificateId}": {
"head": {
"tags": [
"Certificates"
],
"operationId": "Certificate_GetEntityTag",
"description": "Gets the entity state (Etag) version of the certificate specified by its identifier.",
"x-ms-examples": {
"ApiManagementHeadCertificate": {
"$ref": "./examples/ApiManagementHeadCertificate.json"
}
},
"parameters": [
{
"$ref": "./apimanagement.json#/parameters/ResourceGroupNameParameter"
},
{
"$ref": "./apimanagement.json#/parameters/ServiceNameParameter"
},
{
"$ref": "#/parameters/CertificateIdParameter"
},
{
"$ref": "./apimanagement.json#/parameters/ApiVersionParameter"
},
{
"$ref": "./apimanagement.json#/parameters/SubscriptionIdParameter"
}
],
"responses": {
"200": {
"description": "Specified certificate entity exists and current entity state version is present in the ETag header.",
"headers": {
"ETag": {
"description": "Current entity state version. Should be treated as opaque and used to make conditional HTTP requests.",
"type": "string"
}
}
},
"default": {
"description": "Error response describing why the operation failed.",
"schema": {
"$ref": "./apimanagement.json#/definitions/ErrorResponse"
}
}
}
},
"get": {
"tags": [
"Certificates"
],
"operationId": "Certificate_Get",
"description": "Gets the details of the certificate specified by its identifier.",
"x-ms-examples": {
"ApiManagementGetCertificate": {
"$ref": "./examples/ApiManagementGetCertificate.json"
}
},
"parameters": [
{
"$ref": "./apimanagement.json#/parameters/ResourceGroupNameParameter"
},
{
"$ref": "./apimanagement.json#/parameters/ServiceNameParameter"
},
{
"$ref": "#/parameters/CertificateIdParameter"
},
{
"$ref": "./apimanagement.json#/parameters/ApiVersionParameter"
},
{
"$ref": "./apimanagement.json#/parameters/SubscriptionIdParameter"
}
],
"responses": {
"200": {
"description": "The response body contains the specified Certificate entity.",
"schema": {
"$ref": "#/definitions/CertificateContract"
},
"headers": {
"ETag": {
"description": "Current entity state version. Should be treated as opaque and used to make conditional HTTP requests.",
"type": "string"
}
}
},
"default": {
"description": "Error response describing why the operation failed.",
"schema": {
"$ref": "./apimanagement.json#/definitions/ErrorResponse"
}
}
}
},
"put": {
"tags": [
"Certificates"
],
"operationId": "Certificate_CreateOrUpdate",
"description": "Creates or updates the certificate being used for authentication with the backend.",
"externalDocs": {
"description": "How to secure back-end services using client certificate authentication in Azure API Management",
"url": "https://azure.microsoft.com/en-us/documentation/articles/api-management-howto-mutual-certificates/"
},
"x-ms-examples": {
"ApiManagementCreateCertificate": {
"$ref": "./examples/ApiManagementCreateCertificate.json"
}
},
"parameters": [
{
"$ref": "./apimanagement.json#/parameters/ResourceGroupNameParameter"
},
{
"$ref": "./apimanagement.json#/parameters/ServiceNameParameter"
},
{
"$ref": "#/parameters/CertificateIdParameter"
},
{
"name": "parameters",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/CertificateCreateOrUpdateParameters"
},
"description": "Create or Update parameters."
},
{
"$ref": "./apimanagement.json#/parameters/IfMatchOptionalParameter"
},
{
"$ref": "./apimanagement.json#/parameters/ApiVersionParameter"
},
{
"$ref": "./apimanagement.json#/parameters/SubscriptionIdParameter"
}
],
"responses": {
"201": {
"description": "The new certificate was successfully added.",
"schema": {
"$ref": "#/definitions/CertificateContract"
}
},
"200": {
"description": "The certificate details were successfully updated.",
"schema": {
"$ref": "#/definitions/CertificateContract"
}
},
"default": {
"description": "Error response describing why the operation failed.",
"schema": {
"$ref": "./apimanagement.json#/definitions/ErrorResponse"
}
}
}
},
"delete": {
"tags": [
"Certificates"
],
"operationId": "Certificate_Delete",
"description": "Deletes specific certificate.",
"x-ms-examples": {
"ApiManagementDeleteCertificate": {
"$ref": "./examples/ApiManagementDeleteCertificate.json"
}
},
"parameters": [
{
"$ref": "./apimanagement.json#/parameters/ResourceGroupNameParameter"
},
{
"$ref": "./apimanagement.json#/parameters/ServiceNameParameter"
},
{
"$ref": "#/parameters/CertificateIdParameter"
},
{
"$ref": "./apimanagement.json#/parameters/IfMatchRequiredParameter"
},
{
"$ref": "./apimanagement.json#/parameters/ApiVersionParameter"
},
{
"$ref": "./apimanagement.json#/parameters/SubscriptionIdParameter"
}
],
"responses": {
"200": {
"description": "The certificate was successfully deleted."
},
"204": {
"description": "The certificate was successfully deleted."
},
"default": {
"description": "Error response describing why the operation failed.",
"schema": {
"$ref": "./apimanagement.json#/definitions/ErrorResponse"
}
}
}
}
}
},
"definitions": {
"CertificateCollection": {
"properties": {
"value": {
"type": "array",
"items": {
"$ref": "#/definitions/CertificateContract"
},
"description": "Page values."
},
"nextLink": {
"type": "string",
"description": "Next page link if any."
}
},
"description": "Paged Certificates list representation."
},
"CertificateContract": {
"properties": {
"properties": {
"x-ms-client-flatten": true,
"$ref": "#/definitions/CertificateContractProperties",
"description": "Certificate properties details."
}
},
"allOf": [
{
"$ref": "./apimanagement.json#/definitions/Resource"
}
],
"description": "Certificate details."
},
"CertificateContractProperties": {
"properties": {
"subject": {
"type": "string",
"description": "Subject attribute of the certificate."
},
"thumbprint": {
"type": "string",
"description": "Thumbprint of the certificate."
},
"expirationDate": {
"type": "string",
"format": "date-time",
"description": "Expiration date of the certificate. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard.\n"
}
},
"required": [
"subject",
"thumbprint",
"expirationDate"
],
"description": "Properties of the Certificate contract."
},
"CertificateCreateOrUpdateParameters": {
"properties": {
"properties": {
"x-ms-client-flatten": true,
"$ref": "#/definitions/CertificateCreateOrUpdateProperties",
"description": "Certificate create or update properties details."
}
},
"description": "Certificate create or update details."
},
"CertificateCreateOrUpdateProperties": {
"properties": {
"data": {
"type": "string",
"description": "Base 64 encoded certificate using the application/x-pkcs12 representation."
},
"password": {
"type": "string",
"description": "Password for the Certificate"
}
},
"required": [
"data",
"password"
],
"description": "Parameters supplied to the CreateOrUpdate certificate operation."
}
},
"parameters": {
"CertificateIdParameter": {
"name": "certificateId",
"in": "path",
"required": true,
"type": "string",
"description": "Identifier of the certificate entity. Must be unique in the current API Management service instance.",
"minLength": 1,
"maxLength": 80,
"pattern": "(^[\\w]+$)|(^[\\w][\\w\\-]+[\\w]$)",
"x-ms-parameter-location": "method"
}
}
}

Разница между файлами не показана из-за своего большого размера Загрузить разницу

Просмотреть файл

@ -0,0 +1,619 @@
{
"swagger": "2.0",
"info": {
"title": "ApiManagementClient",
"description": "Use these REST APIs for performing operations on Diagnostic entity associated with your Azure API Management deployment. Diagnostics are used to log requests/responses in the APIM proxy.",
"version": "2018-01-01"
},
"host": "management.azure.com",
"schemes": [
"https"
],
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"security": [
{
"azure_auth": [
"user_impersonation"
]
}
],
"securityDefinitions": {
"azure_auth": {
"type": "oauth2",
"authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize",
"flow": "implicit",
"description": "Azure Active Directory OAuth2 Flow.",
"scopes": {
"user_impersonation": "impersonate your user account"
}
}
},
"paths": {
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/diagnostics": {
"get": {
"tags": [
"Diagnostics"
],
"operationId": "Diagnostic_ListByService",
"description": "Lists all diagnostics of the API Management service instance.",
"x-ms-examples": {
"ApiManagementListDiagnostics": {
"$ref": "./examples/ApiManagementListDiagnostics.json"
}
},
"parameters": [
{
"$ref": "./apimanagement.json#/parameters/ResourceGroupNameParameter"
},
{
"$ref": "./apimanagement.json#/parameters/ServiceNameParameter"
},
{
"$ref": "./apimanagement.json#/parameters/ApiVersionParameter"
},
{
"$ref": "./apimanagement.json#/parameters/SubscriptionIdParameter"
},
{
"name": "$filter",
"in": "query",
"required": false,
"type": "string",
"description": "| Field | Supported operators | Supported functions |\n|-------------|------------------------|-----------------------------------|\n| id | ge, le, eq, ne, gt, lt | substringof, startswith, endswith |"
},
{
"$ref": "./apimanagement.json#/parameters/TopQueryParameter"
},
{
"$ref": "./apimanagement.json#/parameters/SkipQueryParameter"
}
],
"responses": {
"200": {
"description": "Paged Result reponse of diagnostics.",
"schema": {
"$ref": "#/definitions/DiagnosticCollection"
}
},
"default": {
"description": "Error response describing why the operation failed.",
"schema": {
"$ref": "./apimanagement.json#/definitions/ErrorResponse"
}
}
},
"x-ms-pageable": {
"nextLinkName": "nextLink"
},
"x-ms-odata": "#/definitions/DiagnosticContract"
}
},
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/diagnostics/{diagnosticId}": {
"head": {
"tags": [
"Diagnostics"
],
"operationId": "Diagnostic_GetEntityTag",
"description": "Gets the entity state (Etag) version of the Diagnostic specified by its identifier.",
"x-ms-examples": {
"ApiManagementHeadDiagnostic": {
"$ref": "./examples/ApiManagementHeadDiagnostic.json"
}
},
"parameters": [
{
"$ref": "./apimanagement.json#/parameters/ResourceGroupNameParameter"
},
{
"$ref": "./apimanagement.json#/parameters/ServiceNameParameter"
},
{
"$ref": "#/parameters/DiagnosticIdParameter"
},
{
"$ref": "./apimanagement.json#/parameters/ApiVersionParameter"
},
{
"$ref": "./apimanagement.json#/parameters/SubscriptionIdParameter"
}
],
"responses": {
"200": {
"description": "Operation completed successfully.",
"headers": {
"ETag": {
"description": "Current entity state version. Should be treated as opaque and used to make conditional HTTP requests.",
"type": "string"
}
}
},
"default": {
"description": "Error response describing why the operation failed.",
"schema": {
"$ref": "./apimanagement.json#/definitions/ErrorResponse"
}
}
}
},
"get": {
"tags": [
"Diagnostics"
],
"operationId": "Diagnostic_Get",
"description": "Gets the details of the Diagnostic specified by its identifier.",
"x-ms-examples": {
"ApiManagementGetDiagnostic": {
"$ref": "./examples/ApiManagementGetDiagnostic.json"
}
},
"parameters": [
{
"$ref": "./apimanagement.json#/parameters/ResourceGroupNameParameter"
},
{
"$ref": "./apimanagement.json#/parameters/ServiceNameParameter"
},
{
"$ref": "#/parameters/DiagnosticIdParameter"
},
{
"$ref": "./apimanagement.json#/parameters/ApiVersionParameter"
},
{
"$ref": "./apimanagement.json#/parameters/SubscriptionIdParameter"
}
],
"responses": {
"200": {
"description": "The response body contains the specified Diagnostic entity.",
"schema": {
"$ref": "#/definitions/DiagnosticContract"
},
"headers": {
"ETag": {
"description": "Current entity state version. Should be treated as opaque and used to make conditional HTTP requests.",
"type": "string"
}
}
},
"default": {
"description": "Error response describing why the operation failed.",
"schema": {
"$ref": "./apimanagement.json#/definitions/ErrorResponse"
}
}
}
},
"put": {
"tags": [
"Diagnostics"
],
"operationId": "Diagnostic_CreateOrUpdate",
"description": "Creates a new Diagnostic or updates an existing one.",
"x-ms-examples": {
"ApiManagementCreateDiagnostic": {
"$ref": "./examples/ApiManagementCreateDiagnostic.json"
}
},
"parameters": [
{
"$ref": "./apimanagement.json#/parameters/ResourceGroupNameParameter"
},
{
"$ref": "./apimanagement.json#/parameters/ServiceNameParameter"
},
{
"$ref": "#/parameters/DiagnosticIdParameter"
},
{
"name": "parameters",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/DiagnosticContract"
},
"description": "Create parameters."
},
{
"$ref": "./apimanagement.json#/parameters/IfMatchOptionalParameter"
},
{
"$ref": "./apimanagement.json#/parameters/ApiVersionParameter"
},
{
"$ref": "./apimanagement.json#/parameters/SubscriptionIdParameter"
}
],
"responses": {
"201": {
"description": "Diagnostic was successfully created.",
"schema": {
"$ref": "#/definitions/DiagnosticContract"
}
},
"200": {
"description": "Diagnostic was successfully updated.",
"schema": {
"$ref": "#/definitions/DiagnosticContract"
}
},
"default": {
"description": "Error response describing why the operation failed.",
"schema": {
"$ref": "./apimanagement.json#/definitions/ErrorResponse"
}
}
}
},
"patch": {
"tags": [
"Diagnostics"
],
"operationId": "Diagnostic_Update",
"description": "Updates the details of the Diagnostic specified by its identifier.",
"x-ms-examples": {
"ApiManagementUpdateDiagnostic": {
"$ref": "./examples/ApiManagementUpdateDiagnostic.json"
}
},
"parameters": [
{
"$ref": "./apimanagement.json#/parameters/ResourceGroupNameParameter"
},
{
"$ref": "./apimanagement.json#/parameters/ServiceNameParameter"
},
{
"$ref": "#/parameters/DiagnosticIdParameter"
},
{
"name": "parameters",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/DiagnosticContract"
},
"description": "Diagnostic Update parameters."
},
{
"$ref": "./apimanagement.json#/parameters/IfMatchRequiredParameter"
},
{
"$ref": "./apimanagement.json#/parameters/ApiVersionParameter"
},
{
"$ref": "./apimanagement.json#/parameters/SubscriptionIdParameter"
}
],
"responses": {
"204": {
"description": "The Diagnostic was successfully updated."
},
"default": {
"description": "Error response describing why the operation failed.",
"schema": {
"$ref": "./apimanagement.json#/definitions/ErrorResponse"
}
}
}
},
"delete": {
"tags": [
"Diagnostics"
],
"operationId": "Diagnostic_Delete",
"description": "Deletes the specified Diagnostic.",
"x-ms-examples": {
"ApiManagementDeleteDiagnostic": {
"$ref": "./examples/ApiManagementDeleteDiagnostic.json"
}
},
"parameters": [
{
"$ref": "./apimanagement.json#/parameters/ResourceGroupNameParameter"
},
{
"$ref": "./apimanagement.json#/parameters/ServiceNameParameter"
},
{
"$ref": "#/parameters/DiagnosticIdParameter"
},
{
"$ref": "./apimanagement.json#/parameters/IfMatchRequiredParameter"
},
{
"$ref": "./apimanagement.json#/parameters/ApiVersionParameter"
},
{
"$ref": "./apimanagement.json#/parameters/SubscriptionIdParameter"
}
],
"responses": {
"200": {
"description": "The Diagnostic was successfully deleted."
},
"204": {
"description": "The Diagnostic was successfully deleted."
},
"default": {
"description": "Error response describing why the operation failed.",
"schema": {
"$ref": "./apimanagement.json#/definitions/ErrorResponse"
}
}
}
}
},
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/diagnostics/{diagnosticId}/loggers": {
"get": {
"tags": [
"DiagnosticLoggers"
],
"operationId": "DiagnosticLogger_ListByService",
"description": "Lists all loggers assosiated with the specified Diagnostic of the API Management service instance.",
"x-ms-examples": {
"ApiManagementListDiagnosticLoggers": {
"$ref": "./examples/ApiManagementListDiagnosticLoggers.json"
}
},
"parameters": [
{
"$ref": "./apimanagement.json#/parameters/ResourceGroupNameParameter"
},
{
"$ref": "./apimanagement.json#/parameters/ServiceNameParameter"
},
{
"$ref": "./apimanagement.json#/parameters/ApiVersionParameter"
},
{
"$ref": "./apimanagement.json#/parameters/SubscriptionIdParameter"
},
{
"$ref": "#/parameters/DiagnosticIdParameter"
},
{
"name": "$filter",
"in": "query",
"required": false,
"type": "string",
"description": "| Field | Supported operators | Supported functions |\n|-------------|------------------------|-----------------------------------|\n| id | ge, le, eq, ne, gt, lt | substringof, startswith, endswith |\n| type | eq | |"
},
{
"$ref": "./apimanagement.json#/parameters/TopQueryParameter"
},
{
"$ref": "./apimanagement.json#/parameters/SkipQueryParameter"
}
],
"responses": {
"200": {
"description": "Paged Result reponse of loggers assigned to the specified Diagnostic.",
"schema": {
"$ref": "./apimloggers.json#/definitions/LoggerCollection"
}
},
"default": {
"description": "Error response describing why the operation failed.",
"schema": {
"$ref": "./apimanagement.json#/definitions/ErrorResponse"
}
}
},
"x-ms-pageable": {
"nextLinkName": "nextLink"
},
"x-ms-odata": "./apimloggers.json#/definitions/LoggerContract"
}
},
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/diagnostics/{diagnosticId}/loggers/{loggerid}": {
"head": {
"tags": [
"DiagnosticLoggers"
],
"operationId": "DiagnosticLogger_CheckEntityExists",
"description": "Checks that logger entity specified by identifier is associated with the diagnostics entity.",
"x-ms-examples": {
"ApiManagementHeadDiagnosticLogger": {
"$ref": "./examples/ApiManagementHeadDiagnosticLogger.json"
}
},
"parameters": [
{
"$ref": "./apimanagement.json#/parameters/ResourceGroupNameParameter"
},
{
"$ref": "./apimanagement.json#/parameters/ServiceNameParameter"
},
{
"$ref": "#/parameters/DiagnosticIdParameter"
},
{
"$ref": "./apimloggers.json#/parameters/LoggerIdParameter"
},
{
"$ref": "./apimanagement.json#/parameters/ApiVersionParameter"
},
{
"$ref": "./apimanagement.json#/parameters/SubscriptionIdParameter"
}
],
"responses": {
"204": {
"description": "The logger is associated with the diagnostic entity."
},
"404": {
"description": "The logger is not associated with the diagnostic entity."
},
"default": {
"description": "Error response describing why the operation failed.",
"schema": {
"$ref": "./apimanagement.json#/definitions/ErrorResponse"
}
}
}
},
"put": {
"tags": [
"DiagnosticLoggers"
],
"operationId": "DiagnosticLogger_CreateOrUpdate",
"description": "Attaches a logger to a dignostic.",
"x-ms-examples": {
"ApiManagementCreateDiagnosticLogger": {
"$ref": "./examples/ApiManagementCreateDiagnosticLogger.json"
}
},
"parameters": [
{
"$ref": "./apimanagement.json#/parameters/ResourceGroupNameParameter"
},
{
"$ref": "./apimanagement.json#/parameters/ServiceNameParameter"
},
{
"$ref": "#/parameters/DiagnosticIdParameter"
},
{
"$ref": "./apimloggers.json#/parameters/LoggerIdParameter"
},
{
"$ref": "./apimanagement.json#/parameters/ApiVersionParameter"
},
{
"$ref": "./apimanagement.json#/parameters/SubscriptionIdParameter"
}
],
"responses": {
"201": {
"description": "Logger was successfully attached to Diagnostic.",
"schema": {
"$ref": "./apimloggers.json#/definitions/LoggerContract"
}
},
"200": {
"description": "Logger to Diagnostic link was successfully updated.",
"schema": {
"$ref": "./apimloggers.json#/definitions/LoggerContract"
}
},
"default": {
"description": "Error response describing why the operation failed.",
"schema": {
"$ref": "./apimanagement.json#/definitions/ErrorResponse"
}
}
}
},
"delete": {
"tags": [
"DiagnosticLoggers"
],
"operationId": "DiagnosticLogger_Delete",
"description": "Deletes the specified Logger from Diagnostic.",
"x-ms-examples": {
"ApiManagementDeleteDiagnosticLogger": {
"$ref": "./examples/ApiManagementDeleteDiagnosticLogger.json"
}
},
"parameters": [
{
"$ref": "./apimanagement.json#/parameters/ResourceGroupNameParameter"
},
{
"$ref": "./apimanagement.json#/parameters/ServiceNameParameter"
},
{
"$ref": "#/parameters/DiagnosticIdParameter"
},
{
"$ref": "./apimloggers.json#/parameters/LoggerIdParameter"
},
{
"$ref": "./apimanagement.json#/parameters/ApiVersionParameter"
},
{
"$ref": "./apimanagement.json#/parameters/SubscriptionIdParameter"
}
],
"responses": {
"200": {
"description": "The Logger was successfully detached from Diagnostic."
},
"204": {
"description": "The Logger was successfully detached from Diagnostic."
},
"default": {
"description": "Error response describing why the operation failed.",
"schema": {
"$ref": "./apimanagement.json#/definitions/ErrorResponse"
}
}
}
}
}
},
"definitions": {
"DiagnosticCollection": {
"properties": {
"value": {
"type": "array",
"items": {
"$ref": "#/definitions/DiagnosticContract"
},
"description": "Page values."
},
"nextLink": {
"type": "string",
"description": "Next page link if any."
}
},
"description": "Paged Diagnostic list representation."
},
"DiagnosticContract": {
"properties": {
"properties": {
"x-ms-client-flatten": true,
"$ref": "#/definitions/DiagnosticContractProperties",
"description": "Diagnostic entity contract properties."
}
},
"allOf": [
{
"$ref": "./apimanagement.json#/definitions/Resource"
}
],
"description": "Diagnostic details."
},
"DiagnosticContractProperties": {
"properties": {
"enabled": {
"type": "boolean",
"description": "Indicates whether a diagnostic should receive data or not."
}
},
"required": [
"enabled"
],
"description": "Diagnostic Entity Properties"
}
},
"parameters": {
"DiagnosticIdParameter": {
"name": "diagnosticId",
"in": "path",
"required": true,
"type": "string",
"description": "Diagnostic identifier. Must be unique in the current API Management service instance.",
"minLength": 1,
"maxLength": 80,
"pattern": "(^[\\w]+$)|(^[\\w][\\w\\-]+[\\w]$)",
"x-ms-parameter-location": "method"
}
}
}

Просмотреть файл

@ -0,0 +1,505 @@
{
"swagger": "2.0",
"info": {
"title": "ApiManagementClient",
"description": "Use these REST APIs for performing operations on Email Templates associated with your Azure API Management deployment.",
"version": "2018-01-01"
},
"host": "management.azure.com",
"schemes": [
"https"
],
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"security": [
{
"azure_auth": [
"user_impersonation"
]
}
],
"securityDefinitions": {
"azure_auth": {
"type": "oauth2",
"authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize",
"flow": "implicit",
"description": "Azure Active Directory OAuth2 Flow.",
"scopes": {
"user_impersonation": "impersonate your user account"
}
}
},
"paths": {
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/templates": {
"get": {
"tags": [
"EmailTemplate"
],
"operationId": "EmailTemplate_ListByService",
"description": "Lists a collection of properties defined within a service instance.",
"x-ms-examples": {
"ApiManagementListEmailTemplates": {
"$ref": "./examples/ApiManagementListEmailTemplates.json"
}
},
"parameters": [
{
"$ref": "./apimanagement.json#/parameters/ResourceGroupNameParameter"
},
{
"$ref": "./apimanagement.json#/parameters/ServiceNameParameter"
},
{
"$ref": "./apimanagement.json#/parameters/TopQueryParameter"
},
{
"$ref": "./apimanagement.json#/parameters/SkipQueryParameter"
},
{
"$ref": "./apimanagement.json#/parameters/ApiVersionParameter"
},
{
"$ref": "./apimanagement.json#/parameters/SubscriptionIdParameter"
}
],
"responses": {
"200": {
"description": "A Collection of the Email Template for the specified API Management service instance.",
"schema": {
"$ref": "#/definitions/EmailTemplateCollection"
}
}
},
"x-ms-pageable": {
"nextLinkName": "nextLink"
}
}
},
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/templates/{templateName}": {
"head": {
"tags": [
"EmailTemplates"
],
"operationId": "EmailTemplate_GetEntityTag",
"description": "Gets the entity state (Etag) version of the email template specified by its identifier.",
"x-ms-examples": {
"ApiManagementHeadEmailTemplate": {
"$ref": "./examples/ApiManagementHeadEmailTemplate.json"
}
},
"parameters": [
{
"$ref": "./apimanagement.json#/parameters/ResourceGroupNameParameter"
},
{
"$ref": "./apimanagement.json#/parameters/ServiceNameParameter"
},
{
"$ref": "#/parameters/TemplateNameParameter"
},
{
"$ref": "./apimanagement.json#/parameters/ApiVersionParameter"
},
{
"$ref": "./apimanagement.json#/parameters/SubscriptionIdParameter"
}
],
"responses": {
"200": {
"description": "Specified email template entity exists and current entity state version is present in the ETag header.",
"headers": {
"ETag": {
"description": "Current entity state version. Should be treated as opaque and used to make conditional HTTP requests.",
"type": "string"
}
}
},
"default": {
"description": "Error response describing why the operation failed.",
"schema": {
"$ref": "./apimanagement.json#/definitions/ErrorResponse"
}
}
}
},
"get": {
"tags": [
"EmailTemplates"
],
"operationId": "EmailTemplate_Get",
"description": "Gets the details of the email template specified by its identifier.",
"x-ms-examples": {
"ApiManagementGetEmailTemplate": {
"$ref": "./examples/ApiManagementGetEmailTemplate.json"
}
},
"parameters": [
{
"$ref": "./apimanagement.json#/parameters/ResourceGroupNameParameter"
},
{
"$ref": "./apimanagement.json#/parameters/ServiceNameParameter"
},
{
"$ref": "#/parameters/TemplateNameParameter"
},
{
"$ref": "./apimanagement.json#/parameters/ApiVersionParameter"
},
{
"$ref": "./apimanagement.json#/parameters/SubscriptionIdParameter"
}
],
"responses": {
"200": {
"description": "The response body contains the specified Email template.",
"schema": {
"$ref": "#/definitions/EmailTemplateContract"
},
"headers": {
"ETag": {
"description": "Current entity state version. Should be treated as opaque and used to make conditional HTTP requests.",
"type": "string"
}
}
},
"default": {
"description": "Error response describing why the operation failed.",
"schema": {
"$ref": "./apimanagement.json#/definitions/ErrorResponse"
}
}
}
},
"put": {
"tags": [
"EmailTemplates"
],
"operationId": "EmailTemplate_CreateOrUpdate",
"description": "Updates an Email Template.",
"x-ms-examples": {
"ApiManagementCreateEmailTemplate": {
"$ref": "./examples/ApiManagementCreateEmailTemplate.json"
}
},
"parameters": [
{
"$ref": "./apimanagement.json#/parameters/ResourceGroupNameParameter"
},
{
"$ref": "./apimanagement.json#/parameters/ServiceNameParameter"
},
{
"$ref": "#/parameters/TemplateNameParameter"
},
{
"name": "parameters",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/EmailTemplateUpdateParameters"
},
"description": "Email Template update parameters."
},
{
"$ref": "./apimanagement.json#/parameters/IfMatchOptionalParameter"
},
{
"$ref": "./apimanagement.json#/parameters/ApiVersionParameter"
},
{
"$ref": "./apimanagement.json#/parameters/SubscriptionIdParameter"
}
],
"responses": {
"201": {
"description": "Email Template was successfully updated.",
"schema": {
"$ref": "#/definitions/EmailTemplateContract"
}
},
"200": {
"description": "Email Template was successfully updated.",
"schema": {
"$ref": "#/definitions/EmailTemplateContract"
}
},
"default": {
"description": "Error response describing why the operation failed.",
"schema": {
"$ref": "./apimanagement.json#/definitions/ErrorResponse"
}
}
}
},
"patch": {
"tags": [
"EmailTemplates"
],
"operationId": "EmailTemplate_Update",
"description": "Updates the specific Email Template.",
"x-ms-examples": {
"ApiManagementUpdateEmailTemplate": {
"$ref": "./examples/ApiManagementUpdateEmailTemplate.json"
}
},
"parameters": [
{
"$ref": "./apimanagement.json#/parameters/ResourceGroupNameParameter"
},
{
"$ref": "./apimanagement.json#/parameters/ServiceNameParameter"
},
{
"$ref": "#/parameters/TemplateNameParameter"
},
{
"name": "parameters",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/EmailTemplateUpdateParameters"
},
"description": "Update parameters."
},
{
"$ref": "./apimanagement.json#/parameters/ApiVersionParameter"
},
{
"$ref": "./apimanagement.json#/parameters/SubscriptionIdParameter"
}
],
"responses": {
"204": {
"description": "Email Template was successfully updated."
},
"default": {
"description": "Error response describing why the operation failed.",
"schema": {
"$ref": "./apimanagement.json#/definitions/ErrorResponse"
}
}
}
},
"delete": {
"tags": [
"EmailTemplates"
],
"operationId": "EmailTemplate_Delete",
"description": "Reset the Email Template to default template provided by the API Management service instance.",
"x-ms-examples": {
"ApiManagementDeleteEmailTemplate": {
"$ref": "./examples/ApiManagementDeleteEmailTemplate.json"
}
},
"parameters": [
{
"$ref": "./apimanagement.json#/parameters/ResourceGroupNameParameter"
},
{
"$ref": "./apimanagement.json#/parameters/ServiceNameParameter"
},
{
"$ref": "#/parameters/TemplateNameParameter"
},
{
"$ref": "./apimanagement.json#/parameters/IfMatchRequiredParameter"
},
{
"$ref": "./apimanagement.json#/parameters/ApiVersionParameter"
},
{
"$ref": "./apimanagement.json#/parameters/SubscriptionIdParameter"
}
],
"responses": {
"200": {
"description": "Email Template was successfully reset to default."
},
"204": {
"description": "Email Template was successfully reset to default."
},
"default": {
"description": "Error response describing why the operation failed.",
"schema": {
"$ref": "./apimanagement.json#/definitions/ErrorResponse"
}
}
}
}
}
},
"definitions": {
"EmailTemplateCollection": {
"properties": {
"value": {
"type": "array",
"items": {
"$ref": "#/definitions/EmailTemplateContract"
},
"description": "Page values."
},
"nextLink": {
"type": "string",
"description": "Next page link if any."
}
},
"description": "Paged email template list representation."
},
"EmailTemplateContract": {
"properties": {
"properties": {
"x-ms-client-flatten": true,
"$ref": "#/definitions/EmailTemplateContractProperties",
"description": "Email Template entity contract properties."
}
},
"allOf": [
{
"$ref": "./apimanagement.json#/definitions/Resource"
}
],
"description": "Email Template details."
},
"EmailTemplateContractProperties": {
"properties": {
"subject": {
"type": "string",
"description": "Subject of the Template.",
"minLength": 1,
"maxLength": 1000
},
"body": {
"type": "string",
"description": "Email Template Body. This should be a valid XDocument",
"minLength": 1
},
"title": {
"type": "string",
"description": "Title of the Template."
},
"description": {
"type": "string",
"description": "Description of the Email Template."
},
"isDefault": {
"type": "boolean",
"description": "Whether the template is the default template provided by Api Management or has been edited.",
"readOnly": true
},
"parameters": {
"type": "array",
"items": {
"$ref": "#/definitions/EmailTemplateParametersContractProperties"
},
"description": "Email Template Parameter values."
}
},
"required": [
"body",
"subject"
],
"description": "Email Template Contract properties."
},
"EmailTemplateUpdateParameters": {
"properties": {
"properties": {
"x-ms-client-flatten": true,
"$ref": "#/definitions/EmailTemplateUpdateParameterProperties",
"description": "Email Template Update contract properties."
}
},
"description": "Email Template update Parameters."
},
"EmailTemplateUpdateParameterProperties": {
"properties": {
"subject": {
"type": "string",
"description": "Subject of the Template.",
"minLength": 1,
"maxLength": 1000
},
"title": {
"type": "string",
"description": "Title of the Template."
},
"description": {
"type": "string",
"description": "Description of the Email Template."
},
"body": {
"type": "string",
"description": "Email Template Body. This should be a valid XDocument",
"minLength": 1
},
"parameters": {
"type": "array",
"items": {
"$ref": "#/definitions/EmailTemplateParametersContractProperties"
},
"description": "Email Template Parameter values."
}
},
"description": "Email Template Update Contract properties."
},
"EmailTemplateParametersContractProperties": {
"properties": {
"name": {
"type": "string",
"description": "Template parameter name.",
"minLength": 1,
"maxLength": 256,
"pattern": "^[A-Za-z0-9-._]+$"
},
"title": {
"type": "string",
"description": "Template parameter title.",
"minLength": 1,
"maxLength": 4096
},
"description": {
"type": "string",
"description": "Template parameter description.",
"minLength": 1,
"maxLength": 256,
"pattern": "^[A-Za-z0-9-._]+$"
}
},
"description": "Email Template Parameter contract."
}
},
"parameters": {
"TemplateNameParameter": {
"name": "templateName",
"in": "path",
"required": true,
"type": "string",
"enum": [
"applicationApprovedNotificationMessage",
"accountClosedDeveloper",
"quotaLimitApproachingDeveloperNotificationMessage",
"newDeveloperNotificationMessage",
"emailChangeIdentityDefault",
"inviteUserNotificationMessage",
"newCommentNotificationMessage",
"confirmSignUpIdentityDefault",
"newIssueNotificationMessage",
"purchaseDeveloperNotificationMessage",
"passwordResetIdentityDefault",
"passwordResetByAdminNotificationMessage",
"rejectDeveloperNotificationMessage",
"requestDeveloperNotificationMessage"
],
"x-ms-enum": {
"name": "TemplateName",
"modelAsString": true
},
"description": "Email Template Name Identifier.",
"x-ms-parameter-location": "method"
}
}
}

Просмотреть файл

@ -0,0 +1,735 @@
{
"swagger": "2.0",
"info": {
"title": "ApiManagementClient",
"description": "Use these REST APIs for performing operations on Group entity in your Azure API Management deployment. Groups are used to manage the visibility of products to developers. Each API Management service instance comes with the following immutable system groups whose membership is automatically managed by API Management. - **Administrators** - Azure subscription administrators are members of this group. - **Developers** - Authenticated developer portal users fall into this group. - **Guests** - Unauthenticated developer portal users are placed into this group. In addition to these system groups, administrators can create custom groups or [leverage external groups in associated Azure Active Directory tenants](https://docs.microsoft.com/en-us/azure/api-management/api-management-howto-aad#how-to-add-an-external-azure-active-directory-group). Custom and external groups can be used alongside system groups in giving developers visibility and access to API products. For example, you could create one custom group for developers affiliated with a specific partner organization and allow them access to the APIs from a product containing relevant APIs only. A user can be a member of more than one group.",
"version": "2018-01-01"
},
"host": "management.azure.com",
"schemes": [
"https"
],
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"security": [
{
"azure_auth": [
"user_impersonation"
]
}
],
"securityDefinitions": {
"azure_auth": {
"type": "oauth2",
"authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize",
"flow": "implicit",
"description": "Azure Active Directory OAuth2 Flow.",
"scopes": {
"user_impersonation": "impersonate your user account"
}
}
},
"paths": {
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/groups": {
"get": {
"tags": [
"Groups"
],
"operationId": "Group_ListByService",
"description": "Lists a collection of groups defined within a service instance.",
"externalDocs": {
"url": "https://docs.microsoft.com/en-us/azure/api-management/api-management-howto-create-groups"
},
"x-ms-examples": {
"ApiManagementListGroups": {
"$ref": "./examples/ApiManagementListGroups.json"
}
},
"parameters": [
{
"$ref": "./apimanagement.json#/parameters/ResourceGroupNameParameter"
},
{
"$ref": "./apimanagement.json#/parameters/ServiceNameParameter"
},
{
"name": "$filter",
"in": "query",
"required": false,
"type": "string",
"description": "| Field | Supported operators | Supported functions |\n|-------------|------------------------|---------------------------------------------|\n| id | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |\n| name | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |\n| description | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |\n| type | eq, ne | N/A |"
},
{
"$ref": "./apimanagement.json#/parameters/TopQueryParameter"
},
{
"$ref": "./apimanagement.json#/parameters/SkipQueryParameter"
},
{
"$ref": "./apimanagement.json#/parameters/ApiVersionParameter"
},
{
"$ref": "./apimanagement.json#/parameters/SubscriptionIdParameter"
}
],
"responses": {
"200": {
"description": "Lists a collection of Group entities.",
"schema": {
"$ref": "#/definitions/GroupCollection"
}
}
},
"x-ms-pageable": {
"nextLinkName": "nextLink"
},
"x-ms-odata": "#/definitions/GroupContract"
}
},
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/groups/{groupId}": {
"head": {
"tags": [
"Groups"
],
"operationId": "Group_GetEntityTag",
"description": "Gets the entity state (Etag) version of the group specified by its identifier.",
"x-ms-examples": {
"ApiManagementHeadGroup": {
"$ref": "./examples/ApiManagementHeadGroup.json"
}
},
"parameters": [
{
"$ref": "./apimanagement.json#/parameters/ResourceGroupNameParameter"
},
{
"$ref": "./apimanagement.json#/parameters/ServiceNameParameter"
},
{
"$ref": "#/parameters/GroupIdParameter"
},
{
"$ref": "./apimanagement.json#/parameters/ApiVersionParameter"
},
{
"$ref": "./apimanagement.json#/parameters/SubscriptionIdParameter"
}
],
"responses": {
"200": {
"description": "Specified group entity exists and current entity state version is present in the ETag header.",
"headers": {
"ETag": {
"description": "Current entity state version. Should be treated as opaque and used to make conditional HTTP requests.",
"type": "string"
}
}
},
"default": {
"description": "Error response describing why the operation failed.",
"schema": {
"$ref": "./apimanagement.json#/definitions/ErrorResponse"
}
}
}
},
"get": {
"tags": [
"Groups"
],
"operationId": "Group_Get",
"description": "Gets the details of the group specified by its identifier.",
"x-ms-examples": {
"ApiManagementGetGroup": {
"$ref": "./examples/ApiManagementGetGroup.json"
}
},
"parameters": [
{
"$ref": "./apimanagement.json#/parameters/ResourceGroupNameParameter"
},
{
"$ref": "./apimanagement.json#/parameters/ServiceNameParameter"
},
{
"$ref": "#/parameters/GroupIdParameter"
},
{
"$ref": "./apimanagement.json#/parameters/ApiVersionParameter"
},
{
"$ref": "./apimanagement.json#/parameters/SubscriptionIdParameter"
}
],
"responses": {
"200": {
"description": "The response body contains the specified Group entity.",
"schema": {
"$ref": "#/definitions/GroupContract"
},
"headers": {
"ETag": {
"description": "Current entity state version. Should be treated as opaque and used to make conditional HTTP requests.",
"type": "string"
}
}
},
"default": {
"description": "Error response describing why the operation failed.",
"schema": {
"$ref": "./apimanagement.json#/definitions/ErrorResponse"
}
}
}
},
"put": {
"tags": [
"Groups"
],
"operationId": "Group_CreateOrUpdate",
"description": "Creates or Updates a group.",
"x-ms-examples": {
"ApiManagementCreateGroup": {
"$ref": "./examples/ApiManagementCreateGroup.json"
},
"ApiManagementCreateGroupExternal": {
"$ref": "./examples/ApiManagementCreateGroupExternal.json"
}
},
"parameters": [
{
"$ref": "./apimanagement.json#/parameters/ResourceGroupNameParameter"
},
{
"$ref": "./apimanagement.json#/parameters/ServiceNameParameter"
},
{
"$ref": "#/parameters/GroupIdParameter"
},
{
"name": "parameters",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/GroupCreateParameters"
},
"description": "Create parameters."
},
{
"$ref": "./apimanagement.json#/parameters/IfMatchOptionalParameter"
},
{
"$ref": "./apimanagement.json#/parameters/ApiVersionParameter"
},
{
"$ref": "./apimanagement.json#/parameters/SubscriptionIdParameter"
}
],
"responses": {
"201": {
"description": "Group was created succesfully.",
"schema": {
"$ref": "#/definitions/GroupContract"
}
},
"200": {
"description": "Group already exists.",
"schema": {
"$ref": "#/definitions/GroupContract"
}
},
"default": {
"description": "Error response describing why the operation failed.",
"schema": {
"$ref": "./apimanagement.json#/definitions/ErrorResponse"
}
}
}
},
"patch": {
"tags": [
"Groups"
],
"operationId": "Group_Update",
"description": "Updates the details of the group specified by its identifier.",
"x-ms-examples": {
"ApiManagementUpdateGroup": {
"$ref": "./examples/ApiManagementUpdateGroup.json"
}
},
"parameters": [
{
"$ref": "./apimanagement.json#/parameters/ResourceGroupNameParameter"
},
{
"$ref": "./apimanagement.json#/parameters/ServiceNameParameter"
},
{
"$ref": "#/parameters/GroupIdParameter"
},
{
"name": "parameters",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/GroupUpdateParameters"
},
"description": "Update parameters."
},
{
"$ref": "./apimanagement.json#/parameters/IfMatchRequiredParameter"
},
{
"$ref": "./apimanagement.json#/parameters/ApiVersionParameter"
},
{
"$ref": "./apimanagement.json#/parameters/SubscriptionIdParameter"
}
],
"responses": {
"204": {
"description": "The group details were successfully updated."
},
"default": {
"description": "Error response describing why the operation failed.",
"schema": {
"$ref": "./apimanagement.json#/definitions/ErrorResponse"
}
}
}
},
"delete": {
"tags": [
"Groups"
],
"operationId": "Group_Delete",
"description": "Deletes specific group of the API Management service instance.",
"x-ms-examples": {
"ApiManagementDeleteGroup": {
"$ref": "./examples/ApiManagementDeleteGroup.json"
}
},
"parameters": [
{
"$ref": "./apimanagement.json#/parameters/ResourceGroupNameParameter"
},
{
"$ref": "./apimanagement.json#/parameters/ServiceNameParameter"
},
{
"$ref": "#/parameters/GroupIdParameter"
},
{
"$ref": "./apimanagement.json#/parameters/IfMatchRequiredParameter"
},
{
"$ref": "./apimanagement.json#/parameters/ApiVersionParameter"
},
{
"$ref": "./apimanagement.json#/parameters/SubscriptionIdParameter"
}
],
"responses": {
"200": {
"description": "The group was successfully deleted."
},
"204": {
"description": "The group was successfully deleted."
},
"default": {
"description": "Error response describing why the operation failed.",
"schema": {
"$ref": "./apimanagement.json#/definitions/ErrorResponse"
}
}
}
}
},
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/groups/{groupId}/users": {
"get": {
"tags": [
"GroupUsers"
],
"operationId": "GroupUser_List",
"description": "Lists a collection of the members of the group, specified by its identifier.",
"x-ms-examples": {
"ApiManagementListGroupUsers": {
"$ref": "./examples/ApiManagementListGroupUsers.json"
}
},
"parameters": [
{
"$ref": "./apimanagement.json#/parameters/ResourceGroupNameParameter"
},
{
"$ref": "./apimanagement.json#/parameters/ServiceNameParameter"
},
{
"$ref": "#/parameters/GroupIdParameter"
},
{
"name": "$filter",
"in": "query",
"required": false,
"type": "string",
"description": "| Field | Supported operators | Supported functions |\n|------------------|------------------------|-----------------------------------|\n| id | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |\n| firstName | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |\n| lastName | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |\n| email | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |\n| state | eq | N/A |\n| registrationDate | ge, le, eq, ne, gt, lt | N/A |\n| note | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |"
},
{
"$ref": "./apimanagement.json#/parameters/TopQueryParameter"
},
{
"$ref": "./apimanagement.json#/parameters/SkipQueryParameter"
},
{
"$ref": "./apimanagement.json#/parameters/ApiVersionParameter"
},
{
"$ref": "./apimanagement.json#/parameters/SubscriptionIdParameter"
}
],
"responses": {
"200": {
"description": "Lists a collection of user entities associated with the group.",
"schema": {
"$ref": "./apimusers.json#/definitions/UserCollection"
}
},
"default": {
"description": "Error response describing why the operation failed.",
"schema": {
"$ref": "./apimanagement.json#/definitions/ErrorResponse"
}
}
},
"x-ms-pageable": {
"nextLinkName": "nextLink"
},
"x-ms-odata": "./apimusers.json#/definitions/UserContract"
}
},
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/groups/{groupId}/users/{uid}": {
"head": {
"tags": [
"GroupUsers"
],
"operationId": "GroupUser_CheckEntityExists",
"description": "Checks that user entity specified by identifier is associated with the group entity.",
"x-ms-examples": {
"ApiManagementHeadGroupUser": {
"$ref": "./examples/ApiManagementHeadGroupUser.json"
}
},
"parameters": [
{
"$ref": "./apimanagement.json#/parameters/ResourceGroupNameParameter"
},
{
"$ref": "./apimanagement.json#/parameters/ServiceNameParameter"
},
{
"$ref": "#/parameters/GroupIdParameter"
},
{
"$ref": "./apimusers.json#/parameters/UserIdParameter"
},
{
"$ref": "./apimanagement.json#/parameters/ApiVersionParameter"
},
{
"$ref": "./apimanagement.json#/parameters/SubscriptionIdParameter"
}
],
"responses": {
"204": {
"description": "Entity exists"
},
"404" : {
"description": "Entity does not exists."
},
"default": {
"description": "Error response describing why the operation failed.",
"schema": {
"$ref": "./apimanagement.json#/definitions/ErrorResponse"
}
}
}
},
"put": {
"tags": [
"GroupUsers"
],
"operationId": "GroupUser_Create",
"description": "Adds a user to the specified group.",
"x-ms-examples": {
"ApiManagementCreateGroupUser": {
"$ref": "./examples/ApiManagementCreateGroupUser.json"
}
},
"parameters": [
{
"$ref": "./apimanagement.json#/parameters/ResourceGroupNameParameter"
},
{
"$ref": "./apimanagement.json#/parameters/ServiceNameParameter"
},
{
"$ref": "#/parameters/GroupIdParameter"
},
{
"$ref": "./apimusers.json#/parameters/UserIdParameter"
},
{
"$ref": "./apimanagement.json#/parameters/ApiVersionParameter"
},
{
"$ref": "./apimanagement.json#/parameters/SubscriptionIdParameter"
}
],
"responses": {
"201": {
"description": "The user was successfully added to the group.",
"schema": {
"$ref": "./apimusers.json#/definitions/UserContract"
}
},
"200": {
"description": "The specified user is already a member of the specified group.",
"schema": {
"$ref": "./apimusers.json#/definitions/UserContract"
}
},
"default": {
"description": "Error response describing why the operation failed.",
"schema": {
"$ref": "./apimanagement.json#/definitions/ErrorResponse"
}
}
}
},
"delete": {
"tags": [
"GroupUsers"
],
"operationId": "GroupUser_Delete",
"description": "Remove existing user from existing group.",
"x-ms-examples": {
"ApiManagementDeleteGroupUser": {
"$ref": "./examples/ApiManagementDeleteGroupUser.json"
}
},
"parameters": [
{
"$ref": "./apimanagement.json#/parameters/ResourceGroupNameParameter"
},
{
"$ref": "./apimanagement.json#/parameters/ServiceNameParameter"
},
{
"$ref": "#/parameters/GroupIdParameter"
},
{
"$ref": "./apimusers.json#/parameters/UserIdParameter"
},
{
"$ref": "./apimanagement.json#/parameters/ApiVersionParameter"
},
{
"$ref": "./apimanagement.json#/parameters/SubscriptionIdParameter"
}
],
"responses": {
"200": {
"description": "The user was successfully removed from the group."
},
"204": {
"description": "The user was successfully removed from the group."
},
"default": {
"description": "Error response describing why the operation failed.",
"schema": {
"$ref": "./apimanagement.json#/definitions/ErrorResponse"
}
}
}
}
}
},
"definitions": {
"GroupCollection": {
"properties": {
"value": {
"type": "array",
"items": {
"$ref": "#/definitions/GroupContract"
},
"description": "Page values."
},
"nextLink": {
"type": "string",
"description": "Next page link if any."
}
},
"description": "Paged Group list representation."
},
"GroupContract": {
"properties": {
"properties": {
"x-ms-client-flatten": true,
"$ref": "#/definitions/GroupContractProperties",
"description": "Group entity contract properties."
}
},
"allOf": [
{
"$ref": "./apimanagement.json#/definitions/Resource"
}
],
"description": "Contract details."
},
"GroupContractProperties": {
"properties": {
"displayName": {
"type": "string",
"description": "Group name.",
"maxLength": 300,
"minLength": 1
},
"description": {
"type": "string",
"description": "Group description. Can contain HTML formatting tags.",
"maxLength": 1000
},
"builtIn": {
"readOnly": true,
"type": "boolean",
"description": "true if the group is one of the three system groups (Administrators, Developers, or Guests); otherwise false."
},
"type": {
"type": "string",
"description": "Group type.",
"enum": [
"custom",
"system",
"external"
],
"x-ms-enum": {
"name": "GroupType",
"modelAsString": false
}
},
"externalId": {
"type": "string",
"description": "For external groups, this property contains the id of the group from the external identity provider, e.g. for Azure Active Directory aad://<tenant>.onmicrosoft.com/groups/<group object id>; otherwise the value is null."
}
},
"required": [
"displayName"
],
"description": "Group contract Properties."
},
"GroupCreateParameters": {
"properties": {
"properties": {
"x-ms-client-flatten": true,
"$ref": "#/definitions/GroupCreateParametersProperties",
"description": "Properties supplied to Create Group operation."
}
},
"description": "Parameters supplied to the Create Group operation."
},
"GroupCreateParametersProperties": {
"properties": {
"displayName": {
"type": "string",
"description": "Group name.",
"maxLength": 300,
"minLength": 1
},
"description": {
"type": "string",
"description": "Group description."
},
"type": {
"type": "string",
"description": "Group type.",
"enum": [
"custom",
"system",
"external"
],
"x-ms-enum": {
"name": "GroupType",
"modelAsString": false
}
},
"externalId": {
"type": "string",
"description": "Identifier of the external groups, this property contains the id of the group from the external identity provider, e.g. for Azure Active Directory aad://<tenant>.onmicrosoft.com/groups/<group object id>; otherwise the value is null."
}
},
"required": [
"displayName"
],
"description": "Parameters supplied to the Create Group operation."
},
"GroupUpdateParameters": {
"properties": {
"properties": {
"x-ms-client-flatten": true,
"$ref": "#/definitions/GroupUpdateParametersProperties",
"description": "Group entity update contract properties."
}
},
"description": "Parameters supplied to the Update Group operation."
},
"GroupUpdateParametersProperties": {
"properties": {
"displayName": {
"type": "string",
"description": "Group name.",
"maxLength": 300,
"minLength": 1
},
"description": {
"type": "string",
"description": "Group description."
},
"type": {
"type": "string",
"description": "Group type.",
"enum": [
"custom",
"system",
"external"
],
"x-ms-enum": {
"name": "GroupType",
"modelAsString": false
}
},
"externalId": {
"type": "string",
"description": "Identifier of the external groups, this property contains the id of the group from the external identity provider, e.g. for Azure Active Directory aad://<tenant>.onmicrosoft.com/groups/<group object id>; otherwise the value is null."
}
},
"description": "Parameters supplied to the Update Group operation."
}
},
"parameters": {
"GroupIdParameter": {
"name": "groupId",
"in": "path",
"required": true,
"type": "string",
"description": "Group identifier. Must be unique in the current API Management service instance.",
"minLength": 1,
"maxLength": 80,
"pattern": "(^[\\w]+$)|(^[\\w][\\w\\-]+[\\w]$)",
"x-ms-parameter-location": "method"
}
}
}

Просмотреть файл

@ -0,0 +1,552 @@
{
"swagger": "2.0",
"info": {
"title": "ApiManagementClient",
"description": "Use these REST APIs for performing operations on Identity Provider entity associated with your Azure API Management deployment. Setting up an external Identity Provider for authentication can help you manage the developer portal logins using the OAuth2 flow.",
"version": "2018-01-01"
},
"host": "management.azure.com",
"schemes": [
"https"
],
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"security": [
{
"azure_auth": [
"user_impersonation"
]
}
],
"securityDefinitions": {
"azure_auth": {
"type": "oauth2",
"authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize",
"flow": "implicit",
"description": "Azure Active Directory OAuth2 Flow.",
"scopes": {
"user_impersonation": "impersonate your user account"
}
}
},
"paths": {
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/identityProviders": {
"get": {
"tags": [
"IdentityProvider"
],
"operationId": "IdentityProvider_ListByService",
"description": "Lists a collection of Identity Provider configured in the specified service instance.",
"externalDocs": {
"url": "https://docs.microsoft.com/en-us/azure/api-management/api-management-howto-aad#how-to-authorize-developer-accounts-using-azure-active-directory"
},
"x-ms-examples": {
"ApiManagementListIdentityProviders": {
"$ref": "./examples/ApiManagementListIdentityProviders.json"
}
},
"parameters": [
{
"$ref": "./apimanagement.json#/parameters/SubscriptionIdParameter"
},
{
"$ref": "./apimanagement.json#/parameters/ResourceGroupNameParameter"
},
{
"$ref": "./apimanagement.json#/parameters/ServiceNameParameter"
},
{
"$ref": "./apimanagement.json#/parameters/ApiVersionParameter"
}
],
"x-ms-pageable": {
"nextLinkName": "nextLink"
},
"responses": {
"200": {
"description": "Lists a collection of Identity Providers.",
"schema": {
"$ref": "#/definitions/IdentityProviderList"
}
},
"default": {
"description": "Error response describing why the operation failed.",
"schema": {
"$ref": "./apimanagement.json#/definitions/ErrorResponse"
}
}
}
}
},
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/identityProviders/{identityProviderName}": {
"head": {
"tags": [
"IdentityProvider"
],
"operationId": "IdentityProvider_GetEntityTag",
"description": "Gets the entity state (Etag) version of the identityProvider specified by its identifier.",
"x-ms-examples": {
"ApiManagementHeadIdentityProvider": {
"$ref": "./examples/ApiManagementHeadIdentityProvider.json"
}
},
"parameters": [
{
"$ref": "./apimanagement.json#/parameters/SubscriptionIdParameter"
},
{
"$ref": "./apimanagement.json#/parameters/ResourceGroupNameParameter"
},
{
"$ref": "./apimanagement.json#/parameters/ServiceNameParameter"
},
{
"$ref": "#/parameters/IdentityProviderNameParameter"
},
{
"$ref": "./apimanagement.json#/parameters/ApiVersionParameter"
}
],
"responses": {
"200": {
"description": "Specified identity provider entity exists and current entity state version is present in the ETag header.",
"headers": {
"ETag": {
"description": "Current entity state version. Should be treated as opaque and used to make conditional HTTP requests.",
"type": "string"
}
}
},
"default": {
"description": "Error response describing why the operation failed.",
"schema": {
"$ref": "./apimanagement.json#/definitions/ErrorResponse"
}
}
}
},
"get": {
"tags": [
"IdentityProvider"
],
"operationId": "IdentityProvider_Get",
"description": "Gets the configuration details of the identity Provider configured in specified service instance.",
"x-ms-examples": {
"ApiManagementGetIdentityProvider": {
"$ref": "./examples/ApiManagementGetIdentityProvider.json"
}
},
"parameters": [
{
"$ref": "./apimanagement.json#/parameters/SubscriptionIdParameter"
},
{
"$ref": "./apimanagement.json#/parameters/ResourceGroupNameParameter"
},
{
"$ref": "./apimanagement.json#/parameters/ServiceNameParameter"
},
{
"$ref": "#/parameters/IdentityProviderNameParameter"
},
{
"$ref": "./apimanagement.json#/parameters/ApiVersionParameter"
}
],
"responses": {
"200": {
"description": "The response body contains the specified IdentityProvider entity configuration details.",
"schema": {
"$ref": "#/definitions/IdentityProviderContract"
},
"headers": {
"ETag": {
"description": "Current entity state version. Should be treated as opaque and used to make conditional HTTP requests.",
"type": "string"
}
}
},
"default": {
"description": "Error response describing why the operation failed.",
"schema": {
"$ref": "./apimanagement.json#/definitions/ErrorResponse"
}
}
}
},
"put": {
"tags": [
"IdentityProvider"
],
"operationId": "IdentityProvider_CreateOrUpdate",
"description": "Creates or Updates the IdentityProvider configuration.",
"x-ms-examples": {
"ApiManagementCreateIdentityProvider": {
"$ref": "./examples/ApiManagementCreateIdentityProvider.json"
}
},
"parameters": [
{
"$ref": "./apimanagement.json#/parameters/ResourceGroupNameParameter"
},
{
"$ref": "./apimanagement.json#/parameters/ServiceNameParameter"
},
{
"$ref": "#/parameters/IdentityProviderNameParameter"
},
{
"name": "parameters",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/IdentityProviderContract"
},
"description": "Create parameters."
},
{
"$ref": "./apimanagement.json#/parameters/IfMatchOptionalParameter"
},
{
"$ref": "./apimanagement.json#/parameters/ApiVersionParameter"
},
{
"$ref": "./apimanagement.json#/parameters/SubscriptionIdParameter"
}
],
"responses": {
"201": {
"description": "IdentityProvider configuration were successfully created.",
"schema": {
"$ref": "#/definitions/IdentityProviderContract"
}
},
"200": {
"description": "The existing Identity Provider was successfully updated.",
"schema": {
"$ref": "#/definitions/IdentityProviderContract"
}
},
"default": {
"description": "Error response describing why the operation failed.",
"schema": {
"$ref": "./apimanagement.json#/definitions/ErrorResponse"
}
}
}
},
"patch": {
"tags": [
"IdentityProviders"
],
"operationId": "IdentityProvider_Update",
"description": "Updates an existing IdentityProvider configuration.",
"x-ms-examples": {
"ApiManagementUpdateIdentityProvider": {
"$ref": "./examples/ApiManagementUpdateIdentityProvider.json"
}
},
"parameters": [
{
"$ref": "./apimanagement.json#/parameters/ResourceGroupNameParameter"
},
{
"$ref": "./apimanagement.json#/parameters/ServiceNameParameter"
},
{
"$ref": "#/parameters/IdentityProviderNameParameter"
},
{
"name": "parameters",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/IdentityProviderUpdateParameters"
},
"description": "Update parameters."
},
{
"$ref": "./apimanagement.json#/parameters/IfMatchRequiredParameter"
},
{
"$ref": "./apimanagement.json#/parameters/ApiVersionParameter"
},
{
"$ref": "./apimanagement.json#/parameters/SubscriptionIdParameter"
}
],
"responses": {
"204": {
"description": "The existing identity provider configuration was successfully updated."
},
"default": {
"description": "Error response describing why the operation failed.",
"schema": {
"$ref": "./apimanagement.json#/definitions/ErrorResponse"
}
}
}
},
"delete": {
"tags": [
"IdentityProvider"
],
"operationId": "IdentityProvider_Delete",
"description": "Deletes the specified identity provider configuration.",
"x-ms-examples": {
"ApiManagementDeleteIdentityProvider": {
"$ref": "./examples/ApiManagementDeleteIdentityProvider.json"
}
},
"parameters": [
{
"$ref": "./apimanagement.json#/parameters/ResourceGroupNameParameter"
},
{
"$ref": "./apimanagement.json#/parameters/ServiceNameParameter"
},
{
"$ref": "#/parameters/IdentityProviderNameParameter"
},
{
"$ref": "./apimanagement.json#/parameters/IfMatchRequiredParameter"
},
{
"$ref": "./apimanagement.json#/parameters/ApiVersionParameter"
},
{
"$ref": "./apimanagement.json#/parameters/SubscriptionIdParameter"
}
],
"responses": {
"200": {
"description": "The identity provider configuration was successfully deleted."
},
"204": {
"description": "The identity provider configuration was successfully deleted."
},
"default": {
"description": "Error response describing why the operation failed.",
"schema": {
"$ref": "./apimanagement.json#/definitions/ErrorResponse"
}
}
}
}
}
},
"definitions": {
"IdentityProviderContract": {
"properties": {
"properties": {
"x-ms-client-flatten": true,
"$ref": "#/definitions/IdentityProviderContractProperties",
"description": "Identity Provider contract properties."
}
},
"allOf": [
{
"$ref": "./apimanagement.json#/definitions/Resource"
}
],
"description": "Identity Provider details."
},
"IdentityProviderContractProperties": {
"properties": {
"clientId": {
"type": "string",
"description": "Client Id of the Application in the external Identity Provider. It is App ID for Facebook login, Client ID for Google login, App ID for Microsoft.",
"minLength": 1
},
"clientSecret": {
"type": "string",
"description": "Client secret of the Application in external Identity Provider, used to authenticate login request. For example, it is App Secret for Facebook login, API Key for Google login, Public Key for Microsoft.",
"minLength": 1
}
},
"allOf": [
{
"$ref": "#/definitions/IdentityProviderBaseParameters"
}
],
"required": [
"clientId",
"clientSecret"
],
"description": "The external Identity Providers like Facebook, Google, Microsoft, Twitter or Azure Active Directory which can be used to enable access to the API Management service developer portal for all users."
},
"IdentityProviderList": {
"properties": {
"value": {
"type": "array",
"items": {
"$ref": "#/definitions/IdentityProviderContract"
},
"description": "Identity Provider configuration values."
},
"nextLink": {
"type": "string",
"description": "Next page link if any."
}
},
"description": "List of all the Identity Providers configured on the service instance."
},
"IdentityProviderUpdateParameters": {
"properties": {
"properties": {
"x-ms-client-flatten": true,
"$ref": "#/definitions/IdentityProviderUpdateProperties",
"description": "Identity Provider update properties."
}
},
"description": "Parameters supplied to update Identity Provider"
},
"IdentityProviderUpdateProperties": {
"properties": {
"clientId": {
"type": "string",
"description": "Client Id of the Application in the external Identity Provider. It is App ID for Facebook login, Client ID for Google login, App ID for Microsoft.",
"minLength": 1
},
"clientSecret": {
"type": "string",
"description": "Client secret of the Application in external Identity Provider, used to authenticate login request. For example, it is App Secret for Facebook login, API Key for Google login, Public Key for Microsoft.",
"minLength": 1
}
},
"allOf": [
{
"$ref": "#/definitions/IdentityProviderBaseParameters"
}
],
"description": "Parameters supplied to the Update Identity Provider operation."
},
"IdentityProviderBaseParameters": {
"properties": {
"type": {
"type": "string",
"enum": [
"facebook",
"google",
"microsoft",
"twitter",
"aad",
"aadB2C"
],
"x-ms-enum": {
"name": "IdentityProviderType",
"modelAsString": true,
"values": [
{
"value": "facebook",
"description": "Facebook as Identity provider."
},
{
"value": "google",
"description": "Google as Identity provider."
},
{
"value": "microsoft",
"description": "Microsoft Live as Identity provider."
},
{
"value": "twitter",
"description": "Twitter as Identity provider."
},
{
"value": "aad",
"description": "Azure Active Directory as Identity provider."
},
{
"value": "aadB2C",
"description": "Azure Active Directory B2C as Identity provider."
}
]
},
"description": "Identity Provider Type identifier."
},
"allowedTenants": {
"type": "array",
"items": {
"type": "string"
},
"maxItems": 32,
"description": "List of Allowed Tenants when configuring Azure Active Directory login."
},
"signupPolicyName": {
"type": "string",
"description": "Signup Policy Name. Only applies to AAD B2C Identity Provider.",
"minLength": 1
},
"signinPolicyName": {
"type": "string",
"description": "Signin Policy Name. Only applies to AAD B2C Identity Provider.",
"minLength": 1
},
"profileEditingPolicyName": {
"type": "string",
"description": "Profile Editing Policy Name. Only applies to AAD B2C Identity Provider.",
"minLength": 1
},
"passwordResetPolicyName": {
"type": "string",
"description": "Password Reset Policy Name. Only applies to AAD B2C Identity Provider.",
"minLength": 1
}
},
"description": "Identity Provider Base Parameter Properties."
}
},
"parameters": {
"IdentityProviderNameParameter": {
"name": "identityProviderName",
"in": "path",
"required": true,
"type": "string",
"enum": [
"facebook",
"google",
"microsoft",
"twitter",
"aad",
"aadB2C"
],
"x-ms-enum": {
"name": "IdentityProviderType",
"modelAsString": true,
"values": [
{
"value": "facebook",
"description": "Facebook as Identity provider."
},
{
"value": "google",
"description": "Google as Identity provider."
},
{
"value": "microsoft",
"description": "Microsoft Live as Identity provider."
},
{
"value": "twitter",
"description": "Twitter as Identity provider."
},
{
"value": "aad",
"description": "Azure Active Directory as Identity provider."
},
{
"value": "aadB2C",
"description": "Azure Active Directory B2C as Identity provider."
}
]
},
"description": "Identity Provider Type identifier.",
"x-ms-parameter-location": "method"
}
}
}

Просмотреть файл

@ -0,0 +1,97 @@
{
"swagger": "2.0",
"info": {
"title": "ApiManagementClient",
"description": "Use this REST API to get all the issues across an Azure Api Management service.",
"version": "2018-01-01"
},
"host": "management.azure.com",
"schemes": [
"https"
],
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"security": [
{
"azure_auth": [
"user_impersonation"
]
}
],
"securityDefinitions": {
"azure_auth": {
"type": "oauth2",
"authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize",
"flow": "implicit",
"description": "Azure Active Directory OAuth2 Flow.",
"scopes": {
"user_impersonation": "impersonate your user account"
}
}
},
"paths": {
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/issues": {
"get": {
"tags": [
"Issues"
],
"operationId": "Issue_ListByService",
"description": "Lists a collection of issues in the specified service instance.",
"x-ms-examples": {
"ApiManagementListLoggers": {
"$ref": "./examples/ApiManagementListIssues.json"
}
},
"parameters": [
{
"$ref": "./apimanagement.json#/parameters/ResourceGroupNameParameter"
},
{
"$ref": "./apimanagement.json#/parameters/ServiceNameParameter"
},
{
"name": "$filter",
"in": "query",
"required": false,
"type": "string",
"description": "| Field | Supported operators | Supported functions |\n|-------------|------------------------|-----------------------------------|\n| id | ge, le, eq, ne, gt, lt | substringof, startswith, endswith |\n| state | eq | |\n| userId | ge, le, eq, ne, gt, lt | substringof, startswith, endswith |"
},
{
"$ref": "./apimanagement.json#/parameters/TopQueryParameter"
},
{
"$ref": "./apimanagement.json#/parameters/SkipQueryParameter"
},
{
"$ref": "./apimanagement.json#/parameters/ApiVersionParameter"
},
{
"$ref": "./apimanagement.json#/parameters/SubscriptionIdParameter"
}
],
"responses": {
"200": {
"description": "Lists a collection of Issue entities.",
"schema": {
"$ref": "./apimapis.json#/definitions/IssueCollection"
}
},
"default": {
"description": "Error response describing why the operation failed.",
"schema": {
"$ref": "./apimanagement.json#/definitions/ErrorResponse"
}
}
},
"x-ms-pageable": {
"nextLinkName": "nextLink"
},
"x-ms-odata": "./apimapis.json#/definitions/IssueContract"
}
}
}
}

Просмотреть файл

@ -0,0 +1,512 @@
{
"swagger": "2.0",
"info": {
"title": "ApiManagementClient",
"description": "Use these REST APIs for performing operations on logger entity Azure API Management deployment.The Logger entity in API Management represents an event sink that you can use to log API Management events. Currently the Logger entity supports logging API Management events to Azure EventHub.",
"version": "2018-01-01"
},
"host": "management.azure.com",
"schemes": [
"https"
],
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"security": [
{
"azure_auth": [
"user_impersonation"
]
}
],
"securityDefinitions": {
"azure_auth": {
"type": "oauth2",
"authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize",
"flow": "implicit",
"description": "Azure Active Directory OAuth2 Flow.",
"scopes": {
"user_impersonation": "impersonate your user account"
}
}
},
"paths": {
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/loggers": {
"get": {
"tags": [
"Loggers"
],
"operationId": "Logger_ListByService",
"description": "Lists a collection of loggers in the specified service instance.",
"externalDocs": {
"url": "https://docs.microsoft.com/en-us/azure/api-management/api-management-howto-log-event-hubs"
},
"x-ms-examples": {
"ApiManagementListLoggers": {
"$ref": "./examples/ApiManagementListLoggers.json"
}
},
"parameters": [
{
"$ref": "./apimanagement.json#/parameters/ResourceGroupNameParameter"
},
{
"$ref": "./apimanagement.json#/parameters/ServiceNameParameter"
},
{
"name": "$filter",
"in": "query",
"required": false,
"type": "string",
"description": "| Field | Supported operators | Supported functions |\n|-------|------------------------|---------------------------------------------|\n| id | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |\n| type | eq | |"
},
{
"$ref": "./apimanagement.json#/parameters/TopQueryParameter"
},
{
"$ref": "./apimanagement.json#/parameters/SkipQueryParameter"
},
{
"$ref": "./apimanagement.json#/parameters/ApiVersionParameter"
},
{
"$ref": "./apimanagement.json#/parameters/SubscriptionIdParameter"
}
],
"responses": {
"200": {
"description": "Lists a collection of Logger entities.",
"schema": {
"$ref": "#/definitions/LoggerCollection"
}
},
"default": {
"description": "Error response describing why the operation failed.",
"schema": {
"$ref": "./apimanagement.json#/definitions/ErrorResponse"
}
}
},
"x-ms-pageable": {
"nextLinkName": "nextLink"
},
"x-ms-odata": "#/definitions/LoggerContract"
}
},
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/loggers/{loggerid}": {
"head": {
"tags": [
"Loggers"
],
"operationId": "Logger_GetEntityTag",
"description": "Gets the entity state (Etag) version of the logger specified by its identifier.",
"x-ms-examples": {
"ApiManagementHeadLogger": {
"$ref": "./examples/ApiManagementHeadLogger.json"
}
},
"parameters": [
{
"$ref": "./apimanagement.json#/parameters/ResourceGroupNameParameter"
},
{
"$ref": "./apimanagement.json#/parameters/ServiceNameParameter"
},
{
"$ref": "#/parameters/LoggerIdParameter"
},
{
"$ref": "./apimanagement.json#/parameters/ApiVersionParameter"
},
{
"$ref": "./apimanagement.json#/parameters/SubscriptionIdParameter"
}
],
"responses": {
"200": {
"description": "Specified logger entity exists and current entity state version is present in the ETag header.",
"headers": {
"ETag": {
"description": "Current entity state version. Should be treated as opaque and used to make conditional HTTP requests.",
"type": "string"
}
}
},
"default": {
"description": "Error response describing why the operation failed.",
"schema": {
"$ref": "./apimanagement.json#/definitions/ErrorResponse"
}
}
}
},
"get": {
"tags": [
"Loggers"
],
"operationId": "Logger_Get",
"description": "Gets the details of the logger specified by its identifier.",
"x-ms-examples": {
"ApiManagementGetLogger": {
"$ref": "./examples/ApiManagementGetLogger.json"
}
},
"parameters": [
{
"$ref": "./apimanagement.json#/parameters/ResourceGroupNameParameter"
},
{
"$ref": "./apimanagement.json#/parameters/ServiceNameParameter"
},
{
"$ref": "#/parameters/LoggerIdParameter"
},
{
"$ref": "./apimanagement.json#/parameters/ApiVersionParameter"
},
{
"$ref": "./apimanagement.json#/parameters/SubscriptionIdParameter"
}
],
"responses": {
"200": {
"description": "The response body contains the specified Logger entity.",
"schema": {
"$ref": "#/definitions/LoggerContract"
},
"headers": {
"ETag": {
"description": "Current entity state version. Should be treated as opaque and used to make conditional HTTP requests.",
"type": "string"
}
}
},
"default": {
"description": "Error response describing why the operation failed.",
"schema": {
"$ref": "./apimanagement.json#/definitions/ErrorResponse"
}
}
}
},
"put": {
"tags": [
"Loggers"
],
"operationId": "Logger_CreateOrUpdate",
"description": "Creates or Updates a logger.",
"x-ms-examples": {
"ApiManagementCreateEHLogger": {
"$ref": "./examples/ApiManagementCreateEHLogger.json"
},
"ApiManagementCreateAILogger": {
"$ref": "./examples/ApiManagementCreateAILogger.json"
}
},
"parameters": [
{
"$ref": "./apimanagement.json#/parameters/ResourceGroupNameParameter"
},
{
"$ref": "./apimanagement.json#/parameters/ServiceNameParameter"
},
{
"$ref": "#/parameters/LoggerIdParameter"
},
{
"name": "parameters",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/LoggerContract"
},
"description": "Create parameters."
},
{
"$ref": "./apimanagement.json#/parameters/IfMatchOptionalParameter"
},
{
"$ref": "./apimanagement.json#/parameters/ApiVersionParameter"
},
{
"$ref": "./apimanagement.json#/parameters/SubscriptionIdParameter"
}
],
"responses": {
"201": {
"description": "Logger was successfully created.",
"schema": {
"$ref": "#/definitions/LoggerContract"
}
},
"200": {
"description": "The existing logger was successfully updated.",
"schema": {
"$ref": "#/definitions/LoggerContract"
}
},
"default": {
"description": "Error response describing why the operation failed.",
"schema": {
"$ref": "./apimanagement.json#/definitions/ErrorResponse"
}
}
}
},
"patch": {
"tags": [
"Loggers"
],
"operationId": "Logger_Update",
"description": "Updates an existing logger.",
"x-ms-examples": {
"ApiManagementUpdateLogger": {
"$ref": "./examples/ApiManagementUpdateLogger.json"
}
},
"parameters": [
{
"$ref": "./apimanagement.json#/parameters/ResourceGroupNameParameter"
},
{
"$ref": "./apimanagement.json#/parameters/ServiceNameParameter"
},
{
"$ref": "#/parameters/LoggerIdParameter"
},
{
"name": "parameters",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/LoggerUpdateContract"
},
"description": "Update parameters."
},
{
"$ref": "./apimanagement.json#/parameters/IfMatchRequiredParameter"
},
{
"$ref": "./apimanagement.json#/parameters/ApiVersionParameter"
},
{
"$ref": "./apimanagement.json#/parameters/SubscriptionIdParameter"
}
],
"responses": {
"204": {
"description": "The existing logger was successfully updated."
},
"default": {
"description": "Error response describing why the operation failed.",
"schema": {
"$ref": "./apimanagement.json#/definitions/ErrorResponse"
}
}
}
},
"delete": {
"tags": [
"Loggers"
],
"operationId": "Logger_Delete",
"description": "Deletes the specified logger.",
"x-ms-examples": {
"ApiManagementDeleteLogger": {
"$ref": "./examples/ApiManagementDeleteLogger.json"
}
},
"parameters": [
{
"$ref": "./apimanagement.json#/parameters/ResourceGroupNameParameter"
},
{
"$ref": "./apimanagement.json#/parameters/ServiceNameParameter"
},
{
"$ref": "#/parameters/LoggerIdParameter"
},
{
"$ref": "./apimanagement.json#/parameters/IfMatchRequiredParameter"
},
{
"$ref": "./apimanagement.json#/parameters/ApiVersionParameter"
},
{
"$ref": "./apimanagement.json#/parameters/SubscriptionIdParameter"
}
],
"responses": {
"200": {
"description": "The logger was successfully deleted."
},
"204": {
"description": "The logger was successfully deleted."
},
"default": {
"description": "Error response describing why the operation failed.",
"schema": {
"$ref": "./apimanagement.json#/definitions/ErrorResponse"
}
}
}
}
}
},
"definitions": {
"LoggerCollection": {
"properties": {
"value": {
"type": "array",
"items": {
"$ref": "#/definitions/LoggerContract"
},
"description": "Logger values."
},
"count": {
"type": "integer",
"format": "int64",
"description": "Total record count number across all pages."
},
"nextLink": {
"type": "string",
"description": "Next page link if any."
}
},
"description": "Paged Logger list representation."
},
"LoggerContract": {
"properties": {
"properties": {
"x-ms-client-flatten": true,
"$ref": "#/definitions/LoggerContractProperties",
"description": "Logger entity contract properties."
}
},
"allOf": [
{
"$ref": "./apimanagement.json#/definitions/Resource"
}
],
"description": "Logger details."
},
"LoggerContractProperties": {
"properties": {
"loggerType": {
"type": "string",
"description": "Logger type.",
"enum": [
"azureEventHub",
"applicationInsights"
],
"x-ms-enum": {
"name": "LoggerType",
"modelAsString": true,
"values": [
{
"value": "azureEventHub",
"description": "Azure Event Hub as log destination."
},
{
"value": "applicationInsights",
"description": "Azure Application Insights as log destination."
}
]
}
},
"description": {
"type": "string",
"description": "Logger description.",
"maxLength": 256
},
"credentials": {
"type": "object",
"additionalProperties": {
"type": "string"
},
"description": "The name and SendRule connection string of the event hub for azureEventHub logger.\nInstrumentation key for applicationInsights logger.",
"example": {
"name": "apim",
"connectionString": "Endpoint=sb://contoso-ns.servicebus.windows.net/;SharedAccessKeyName=Sender;SharedAccessKey=..."
}
},
"isBuffered": {
"type": "boolean",
"description": "Whether records are buffered in the logger before publishing. Default is assumed to be true."
}
},
"required": [
"loggerType",
"credentials"
],
"description": "The Logger entity in API Management represents an event sink that you can use to log API Management events. Currently the Logger entity supports logging API Management events to Azure Event Hubs."
},
"LoggerUpdateContract": {
"properties": {
"properties": {
"x-ms-client-flatten": true,
"$ref": "#/definitions/LoggerUpdateParameters",
"description": "Logger entity update contract properties."
}
},
"description": "Logger update contract."
},
"LoggerUpdateParameters": {
"properties": {
"loggerType": {
"type": "string",
"description": "Logger type.",
"enum": [
"azureEventHub",
"applicationInsights"
],
"x-ms-enum": {
"name": "LoggerType",
"modelAsString": true,
"values": [
{
"value": "azureEventHub",
"description": "Azure Event Hub as log destination."
},
{
"value": "applicationInsights",
"description": "Azure Application Insights as log destination."
}
]
}
},
"description": {
"type": "string",
"description": "Logger description."
},
"credentials": {
"type": "object",
"additionalProperties": {
"type": "string"
},
"description": "Logger credentials."
},
"isBuffered": {
"type": "boolean",
"description": "Whether records are buffered in the logger before publishing. Default is assumed to be true."
}
},
"description": "Parameters supplied to the Update Logger operation."
}
},
"parameters": {
"LoggerIdParameter": {
"name": "loggerid",
"in": "path",
"required": true,
"type": "string",
"maxLength": 80,
"pattern": "(^[\\w]+$)|(^[\\w][\\w\\-]+[\\w]$)",
"description": "Logger identifier. Must be unique in the API Management service instance.",
"x-ms-parameter-location": "method"
}
}
}

Просмотреть файл

@ -0,0 +1,222 @@
{
"swagger": "2.0",
"info": {
"title": "ApiManagementClient",
"description": "Use these REST APIs for getting the network connectivity status of your Azure API Management deployment. When the API Management service is deployed inside a Virtual Network, it needs to have access to other Azure resources it depends on. This also gives details about the DNS Servers visible to Azure API Management deployment.",
"version": "2018-01-01"
},
"host": "management.azure.com",
"schemes": [
"https"
],
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"security": [
{
"azure_auth": [
"user_impersonation"
]
}
],
"securityDefinitions": {
"azure_auth": {
"type": "oauth2",
"authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize",
"flow": "implicit",
"description": "Azure Active Directory OAuth2 Flow.",
"scopes": {
"user_impersonation": "impersonate your user account"
}
}
},
"paths": {
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/networkstatus": {
"get": {
"tags": [
"NetworkStatus"
],
"operationId": "NetworkStatus_ListByService",
"description": "Gets the Connectivity Status to the external resources on which the Api Management service depends from inside the Cloud Service. This also returns the DNS Servers as visible to the CloudService.",
"x-ms-examples": {
"ApiManagementServiceGetNetworkStatus": {
"$ref": "./examples/ApiManagementServiceGetNetworkStatus.json"
}
},
"parameters": [
{
"$ref": "./apimanagement.json#/parameters/SubscriptionIdParameter"
},
{
"$ref": "./apimanagement.json#/parameters/ResourceGroupNameParameter"
},
{
"$ref": "./apimanagement.json#/parameters/ServiceNameParameter"
},
{
"$ref": "./apimanagement.json#/parameters/ApiVersionParameter"
}
],
"responses": {
"200": {
"description": "Gets the list Network status details for all regions in which service is deployed.",
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/NetworkStatusContractByLocation"
},
"description": "List of Network Status values."
}
},
"default": {
"description": "Error response describing why the operation failed.",
"schema": {
"$ref": "./apimanagement.json#/definitions/ErrorResponse"
}
}
}
}
},
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/locations/{locationName}/networkstatus": {
"get": {
"tags": [
"NetworkStatus"
],
"operationId": "NetworkStatus_ListByLocation",
"description": "Gets the Connectivity Status to the external resources on which the Api Management service depends from inside the Cloud Service. This also returns the DNS Servers as visible to the CloudService.",
"x-ms-examples": {
"ApiManagementServiceGetNetworkStatusByLocation": {
"$ref": "./examples/ApiManagementServiceGetNetworkStatusByLocation.json"
}
},
"parameters": [
{
"$ref": "./apimanagement.json#/parameters/SubscriptionIdParameter"
},
{
"$ref": "./apimanagement.json#/parameters/ResourceGroupNameParameter"
},
{
"$ref": "./apimanagement.json#/parameters/ServiceNameParameter"
},
{
"$ref": "#/parameters/LocationNameParameter"
},
{
"$ref": "./apimanagement.json#/parameters/ApiVersionParameter"
}
],
"responses": {
"200": {
"description": "Gets the Network status details.",
"schema": {
"$ref": "#/definitions/NetworkStatusContract"
}
},
"default": {
"description": "Error response describing why the operation failed.",
"schema": {
"$ref": "./apimanagement.json#/definitions/ErrorResponse"
}
}
}
}
}
},
"definitions": {
"ConnectivityStatusContract": {
"properties": {
"name": {
"type": "string",
"description": "The hostname of the resource which the service depends on. This can be the database, storage or any other azure resource on which the service depends upon.",
"minLength": 1
},
"status": {
"type": "string",
"enum": [
"initializing",
"success",
"failure"
],
"x-ms-enum": {
"name": "ConnectivityStatusType",
"modelAsString": true
},
"description": "Resource Connectivity Status Type identifier."
},
"error": {
"type": "string",
"description": "Error details of the connectivity to the resource."
},
"lastUpdated": {
"type": "string",
"format": "date-time",
"description": "The date when the resource connectivity status was last updated. This status should be updated every 15 minutes. If this status has not been updated, then it means that the service has lost network connectivity to the resource, from inside the Virtual Network.The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard.\n"
},
"lastStatusChange": {
"type": "string",
"format": "date-time",
"description": "The date when the resource connectivity status last Changed from success to failure or vice-versa. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard.\n"
}
},
"required": [
"name",
"status",
"lastUpdated",
"lastStatusChange"
],
"description": "Details about connectivity to a resource."
},
"NetworkStatusContractByLocation": {
"properties": {
"location": {
"type": "string",
"description": "Location of service",
"minLength": 1
},
"networkStatus": {
"$ref": "#/definitions/NetworkStatusContract",
"description": "Network status in Location"
}
},
"description": "Network Status in the Location"
},
"NetworkStatusContract": {
"properties": {
"dnsServers": {
"type": "array",
"items": {
"type": "string"
},
"description": "Gets the list of DNS servers IPV4 addresses."
},
"connectivityStatus": {
"type": "array",
"items": {
"$ref": "#/definitions/ConnectivityStatusContract"
},
"description": "Gets the list of Connectivity Status to the Resources on which the service depends upon."
}
},
"required": [
"dnsServers",
"connectivityStatus"
],
"description": "Network Status details."
}
},
"parameters": {
"LocationNameParameter": {
"name": "locationName",
"in": "path",
"required": true,
"type": "string",
"description": "Location in which the API Management service is deployed. This is one of the Azure Regions like West US, East US, South Central US.",
"minLength": 1,
"x-ms-parameter-location": "method"
}
}
}

Просмотреть файл

@ -0,0 +1,771 @@
{
"swagger": "2.0",
"info": {
"title": "ApiManagementClient",
"description": "Use these REST APIs for performing operations on who is going to receive notifications associated with your Azure API Management deployment.",
"version": "2018-01-01"
},
"host": "management.azure.com",
"schemes": [
"https"
],
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"security": [
{
"azure_auth": [
"user_impersonation"
]
}
],
"securityDefinitions": {
"azure_auth": {
"type": "oauth2",
"authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize",
"flow": "implicit",
"description": "Azure Active Directory OAuth2 Flow.",
"scopes": {
"user_impersonation": "impersonate your user account"
}
}
},
"paths": {
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/notifications": {
"get": {
"tags": [
"Notification"
],
"operationId": "Notification_ListByService",
"description": "Lists a collection of properties defined within a service instance.",
"x-ms-examples": {
"ApiManagementListNotification": {
"$ref": "./examples/ApiManagementListNotifications.json"
}
},
"parameters": [
{
"$ref": "./apimanagement.json#/parameters/ResourceGroupNameParameter"
},
{
"$ref": "./apimanagement.json#/parameters/ServiceNameParameter"
},
{
"$ref": "./apimanagement.json#/parameters/TopQueryParameter"
},
{
"$ref": "./apimanagement.json#/parameters/SkipQueryParameter"
},
{
"$ref": "./apimanagement.json#/parameters/ApiVersionParameter"
},
{
"$ref": "./apimanagement.json#/parameters/SubscriptionIdParameter"
}
],
"responses": {
"200": {
"description": "A Collection of the Notification for the specified API Management service instance.",
"schema": {
"$ref": "#/definitions/NotificationCollection"
}
}
},
"x-ms-pageable": {
"nextLinkName": "nextLink"
}
}
},
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/notifications/{notificationName}": {
"get": {
"tags": [
"Notification"
],
"operationId": "Notification_Get",
"description": "Gets the details of the Notification specified by its identifier.",
"x-ms-examples": {
"ApiManagementGetNotification": {
"$ref": "./examples/ApiManagementGetNotification.json"
}
},
"parameters": [
{
"$ref": "./apimanagement.json#/parameters/ResourceGroupNameParameter"
},
{
"$ref": "./apimanagement.json#/parameters/ServiceNameParameter"
},
{
"$ref": "#/parameters/NotificationNameParameter"
},
{
"$ref": "./apimanagement.json#/parameters/ApiVersionParameter"
},
{
"$ref": "./apimanagement.json#/parameters/SubscriptionIdParameter"
}
],
"responses": {
"200": {
"description": "The response body contains the specified Notification.",
"schema": {
"$ref": "#/definitions/NotificationContract"
}
},
"default": {
"description": "Error response describing why the operation failed.",
"schema": {
"$ref": "./apimanagement.json#/definitions/ErrorResponse"
}
}
}
},
"put": {
"tags": [
"Notification"
],
"operationId": "Notification_CreateOrUpdate",
"description": "Updates an Notification.",
"x-ms-examples": {
"ApiManagementGetNotification": {
"$ref": "./examples/ApiManagementGetNotification.json"
}
},
"parameters": [
{
"$ref": "./apimanagement.json#/parameters/ResourceGroupNameParameter"
},
{
"$ref": "./apimanagement.json#/parameters/ServiceNameParameter"
},
{
"$ref": "#/parameters/NotificationNameParameter"
},
{
"$ref": "./apimanagement.json#/parameters/IfMatchOptionalParameter"
},
{
"$ref": "./apimanagement.json#/parameters/ApiVersionParameter"
},
{
"$ref": "./apimanagement.json#/parameters/SubscriptionIdParameter"
}
],
"responses": {
"200": {
"description": "Notification was successfully updated.",
"schema": {
"$ref": "#/definitions/NotificationContract"
}
},
"default": {
"description": "Error response describing why the operation failed.",
"schema": {
"$ref": "./apimanagement.json#/definitions/ErrorResponse"
}
}
}
}
},
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/notifications/{notificationName}/recipientUsers": {
"get": {
"tags": [
"Notification"
],
"operationId": "NotificationRecipientUser_ListByNotification",
"description": "Gets the list of the Notification Recipient User subscribed to the notification.",
"x-ms-examples": {
"ApiManagementListNotificationRecipientUser": {
"$ref": "./examples/ApiManagementListNotificationRecipientUser.json"
}
},
"parameters": [
{
"$ref": "./apimanagement.json#/parameters/ResourceGroupNameParameter"
},
{
"$ref": "./apimanagement.json#/parameters/ServiceNameParameter"
},
{
"$ref": "#/parameters/NotificationNameParameter"
},
{
"$ref": "./apimanagement.json#/parameters/ApiVersionParameter"
},
{
"$ref": "./apimanagement.json#/parameters/SubscriptionIdParameter"
}
],
"responses": {
"200": {
"description": "The response body contains the Recipient User collection for the notification.",
"schema": {
"$ref": "#/definitions/RecipientUserCollection"
}
},
"default": {
"description": "Error response describing why the operation failed.",
"schema": {
"$ref": "./apimanagement.json#/definitions/ErrorResponse"
}
}
}
}
},
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/notifications/{notificationName}/recipientUsers/{uid}": {
"head": {
"tags": [
"NotificationRecipientUser"
],
"operationId": "NotificationRecipientUser_CheckEntityExists",
"description": "Determine if the Notification Recipient User is subscribed to the notification.",
"x-ms-examples": {
"ApiManagementHeadNotificationRecipientUser": {
"$ref": "./examples/ApiManagementHeadNotificationRecipientUser.json"
}
},
"parameters": [
{
"$ref": "./apimanagement.json#/parameters/ResourceGroupNameParameter"
},
{
"$ref": "./apimanagement.json#/parameters/ServiceNameParameter"
},
{
"$ref": "#/parameters/NotificationNameParameter"
},
{
"$ref": "./apimusers.json#/parameters/UserIdParameter"
},
{
"$ref": "./apimanagement.json#/parameters/ApiVersionParameter"
},
{
"$ref": "./apimanagement.json#/parameters/SubscriptionIdParameter"
}
],
"responses": {
"204": {
"description": "The User is subscribed to receive the notification."
},
"404" : {
"description": "Entity does not exists."
},
"default": {
"description": "Error response describing why the operation failed.",
"schema": {
"$ref": "./apimanagement.json#/definitions/ErrorResponse"
}
}
}
},
"put": {
"tags": [
"NotificationRecipientUser"
],
"operationId": "NotificationRecipientUser_CreateOrUpdate",
"description": "Adds the API Management User to the list of Recipients for the Notification.",
"x-ms-examples": {
"ApiManagementCreateRecipientUser": {
"$ref": "./examples/ApiManagementCreateRecipientUser.json"
}
},
"parameters": [
{
"$ref": "./apimanagement.json#/parameters/ResourceGroupNameParameter"
},
{
"$ref": "./apimanagement.json#/parameters/ServiceNameParameter"
},
{
"$ref": "#/parameters/NotificationNameParameter"
},
{
"$ref": "./apimusers.json#/parameters/UserIdParameter"
},
{
"$ref": "./apimanagement.json#/parameters/ApiVersionParameter"
},
{
"$ref": "./apimanagement.json#/parameters/SubscriptionIdParameter"
}
],
"responses": {
"201": {
"description": "Recipient User was successfully added to the notification list.",
"schema": {
"$ref": "#/definitions/RecipientUserContract"
}
},
"200": {
"description": "Recipient User is already part of the notification list.",
"schema": {
"$ref": "#/definitions/RecipientUserContract"
}
},
"default": {
"description": "Error response describing why the operation failed.",
"schema": {
"$ref": "./apimanagement.json#/definitions/ErrorResponse"
}
}
}
},
"delete": {
"tags": [
"NotificationRecipientUser"
],
"operationId": "NotificationRecipientUser_Delete",
"description": "Removes the API Management user from the list of Notification.",
"x-ms-examples": {
"ApiManagementDeleteNotificationRecipientUser": {
"$ref": "./examples/ApiManagementDeleteNotificationRecipientUser.json"
}
},
"parameters": [
{
"$ref": "./apimanagement.json#/parameters/ResourceGroupNameParameter"
},
{
"$ref": "./apimanagement.json#/parameters/ServiceNameParameter"
},
{
"$ref": "#/parameters/NotificationNameParameter"
},
{
"$ref": "./apimusers.json#/parameters/UserIdParameter"
},
{
"$ref": "./apimanagement.json#/parameters/ApiVersionParameter"
},
{
"$ref": "./apimanagement.json#/parameters/SubscriptionIdParameter"
}
],
"responses": {
"200": {
"description": "Recipient User was successfully removed from the notification list."
},
"204": {
"description": "Recipient User was successfully removed from the notification list."
},
"default": {
"description": "Error response describing why the operation failed.",
"schema": {
"$ref": "./apimanagement.json#/definitions/ErrorResponse"
}
}
}
}
},
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/notifications/{notificationName}/recipientEmails": {
"get": {
"tags": [
"NotificationRecipientEmail"
],
"operationId": "NotificationRecipientEmail_ListByNotification",
"description": "Gets the list of the Notification Recipient Emails subscribed to a notification.",
"x-ms-examples": {
"ApiManagementListNotificationRecipientEmail": {
"$ref": "./examples/ApiManagementListNotificationRecipientEmail.json"
}
},
"parameters": [
{
"$ref": "./apimanagement.json#/parameters/ResourceGroupNameParameter"
},
{
"$ref": "./apimanagement.json#/parameters/ServiceNameParameter"
},
{
"$ref": "#/parameters/NotificationNameParameter"
},
{
"$ref": "./apimanagement.json#/parameters/ApiVersionParameter"
},
{
"$ref": "./apimanagement.json#/parameters/SubscriptionIdParameter"
}
],
"responses": {
"200": {
"description": "The response body contains the Recipient Email collection subscribed to the notification.",
"schema": {
"$ref": "#/definitions/RecipientEmailCollection"
}
},
"default": {
"description": "Error response describing why the operation failed.",
"schema": {
"$ref": "./apimanagement.json#/definitions/ErrorResponse"
}
}
}
}
},
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/notifications/{notificationName}/recipientEmails/{email}": {
"head": {
"tags": [
"NotificationRecipientEmail"
],
"operationId": "NotificationRecipientEmail_CheckEntityExists",
"description": "Determine if Notification Recipient Email subscribed to the notification.",
"x-ms-examples": {
"ApiManagementHeadNotificationRecipientEmail": {
"$ref": "./examples/ApiManagementHeadNotificationRecipientEmail.json"
}
},
"parameters": [
{
"$ref": "./apimanagement.json#/parameters/ResourceGroupNameParameter"
},
{
"$ref": "./apimanagement.json#/parameters/ServiceNameParameter"
},
{
"$ref": "#/parameters/NotificationNameParameter"
},
{
"$ref": "#/parameters/EmailParameter"
},
{
"$ref": "./apimanagement.json#/parameters/ApiVersionParameter"
},
{
"$ref": "./apimanagement.json#/parameters/SubscriptionIdParameter"
}
],
"responses": {
"204": {
"description": "The Users is subscribed to receive the notification."
},
"404" : {
"description": "The Users is not subscribed to receive the notification."
},
"default": {
"description": "Error response describing why the operation failed.",
"schema": {
"$ref": "./apimanagement.json#/definitions/ErrorResponse"
}
}
}
},
"put": {
"tags": [
"NotificationRecipientEmail"
],
"operationId": "NotificationRecipientEmail_CreateOrUpdate",
"description": "Adds the Email address to the list of Recipients for the Notification.",
"x-ms-examples": {
"ApiManagementCreateRecipientEmail": {
"$ref": "./examples/ApiManagementCreateRecipientEmail.json"
}
},
"parameters": [
{
"$ref": "./apimanagement.json#/parameters/ResourceGroupNameParameter"
},
{
"$ref": "./apimanagement.json#/parameters/ServiceNameParameter"
},
{
"$ref": "#/parameters/NotificationNameParameter"
},
{
"$ref": "#/parameters/EmailParameter"
},
{
"$ref": "./apimanagement.json#/parameters/ApiVersionParameter"
},
{
"$ref": "./apimanagement.json#/parameters/SubscriptionIdParameter"
}
],
"responses": {
"201": {
"description": "Recipient Email was successfully added to the notification list.",
"schema": {
"$ref": "#/definitions/RecipientEmailContract"
}
},
"200": {
"description": "Recipient Email is already part of the notification list.",
"schema": {
"$ref": "#/definitions/RecipientEmailContract"
}
},
"default": {
"description": "Error response describing why the operation failed.",
"schema": {
"$ref": "./apimanagement.json#/definitions/ErrorResponse"
}
}
}
},
"delete": {
"tags": [
"NotificationRecipientEmail"
],
"operationId": "NotificationRecipientEmail_Delete",
"description": "Removes the email from the list of Notification.",
"x-ms-examples": {
"ApiManagementDeleteNotificationRecipientEmail": {
"$ref": "./examples/ApiManagementDeleteNotificationRecipientEmail.json"
}
},
"parameters": [
{
"$ref": "./apimanagement.json#/parameters/ResourceGroupNameParameter"
},
{
"$ref": "./apimanagement.json#/parameters/ServiceNameParameter"
},
{
"$ref": "#/parameters/NotificationNameParameter"
},
{
"$ref": "#/parameters/EmailParameter"
},
{
"$ref": "./apimanagement.json#/parameters/ApiVersionParameter"
},
{
"$ref": "./apimanagement.json#/parameters/SubscriptionIdParameter"
}
],
"responses": {
"200": {
"description": "Recipient Email was successfully removed to the notification list."
},
"204": {
"description": "Recipient Email was successfully removed to the notification list."
},
"default": {
"description": "Error response describing why the operation failed.",
"schema": {
"$ref": "./apimanagement.json#/definitions/ErrorResponse"
}
}
}
}
}
},
"definitions": {
"NotificationCollection": {
"properties": {
"value": {
"type": "array",
"items": {
"$ref": "#/definitions/NotificationContract"
},
"description": "Page values."
},
"nextLink": {
"type": "string",
"description": "Next page link if any."
}
},
"description": "Paged Notification list representation."
},
"NotificationContract": {
"properties": {
"properties": {
"x-ms-client-flatten": true,
"$ref": "#/definitions/NotificationContractProperties",
"description": "Notification entity contract properties."
}
},
"allOf": [
{
"$ref": "./apimanagement.json#/definitions/Resource"
}
],
"description": "Notification details."
},
"NotificationContractProperties": {
"properties": {
"title": {
"type": "string",
"description": "Title of the Notification.",
"minLength": 1,
"maxLength": 1000
},
"description": {
"type": "string",
"description": "Description of the Notification."
},
"recipients": {
"$ref": "#/definitions/RecipientsContractProperties",
"description": "Recipient Parameter values."
}
},
"required": [
"title"
],
"description": "Notification Contract properties."
},
"RecipientsContractProperties": {
"properties": {
"emails": {
"type": "array",
"items": {
"type": "string"
},
"description": "List of Emails subscribed for the notification."
},
"users": {
"type": "array",
"items": {
"type": "string"
},
"description": "List of Users subscribed for the notification."
}
},
"description": "Notification Parameter contract."
},
"RecipientUserCollection": {
"properties": {
"value": {
"type": "array",
"items": {
"$ref": "#/definitions/RecipientUserContract"
},
"description": "Page values."
},
"nextLink": {
"type": "string",
"description": "Next page link if any."
}
},
"description": "Paged Recipient User list representation."
},
"RecipientUserContract": {
"properties": {
"properties": {
"x-ms-client-flatten": true,
"$ref": "#/definitions/RecipientUsersContractProperties",
"description": "Recipient User entity contract properties."
}
},
"allOf": [
{
"$ref": "./apimanagement.json#/definitions/Resource"
}
],
"description": "Recipient User details."
},
"RecipientUsersContractProperties": {
"properties": {
"userId": {
"type": "string",
"description": "API Management UserId subscribed to notification."
}
},
"description": "Recipient User Contract Properties."
},
"RecipientEmailCollection": {
"properties": {
"value": {
"type": "array",
"items": {
"$ref": "#/definitions/RecipientEmailContract"
},
"description": "Page values."
},
"nextLink": {
"type": "string",
"description": "Next page link if any."
}
},
"description": "Paged Recipient User list representation."
},
"RecipientEmailContract": {
"properties": {
"properties": {
"x-ms-client-flatten": true,
"$ref": "#/definitions/RecipientEmailContractProperties",
"description": "Recipient Email contract properties."
}
},
"allOf": [
{
"$ref": "./apimanagement.json#/definitions/Resource"
}
],
"description": "Recipient Email details."
},
"RecipientEmailContractProperties": {
"properties": {
"email": {
"type": "string",
"description": "User Email subscribed to notification."
}
},
"description": "Recipient Email Contract Properties."
}
},
"parameters": {
"NotificationNameParameter": {
"name": "notificationName",
"in": "path",
"required": true,
"type": "string",
"enum": [
"RequestPublisherNotificationMessage",
"PurchasePublisherNotificationMessage",
"NewApplicationNotificationMessage",
"BCC",
"NewIssuePublisherNotificationMessage",
"AccountClosedPublisher",
"QuotaLimitApproachingPublisherNotificationMessage"
],
"x-ms-enum": {
"name": "NotificationName",
"modelAsString": true,
"values": [
{
"value": "RequestPublisherNotificationMessage",
"description": "The following email recipients and users will receive email notifications about subscription requests for API products requiring approval."
},
{
"value": "PurchasePublisherNotificationMessage",
"description": "The following email recipients and users will receive email notifications about new API product subscriptions."
},
{
"value": "NewApplicationNotificationMessage",
"description": "The following email recipients and users will receive email notifications when new applications are submitted to the application gallery."
},
{
"value": "BCC",
"description": "The following recipients will receive blind carbon copies of all emails sent to developers."
},
{
"value": "NewIssuePublisherNotificationMessage",
"description": "The following email recipients and users will receive email notifications when a new issue or comment is submitted on the developer portal."
},
{
"value": "AccountClosedPublisher",
"description": "The following email recipients and users will receive email notifications when developer closes his account."
},
{
"value": "QuotaLimitApproachingPublisherNotificationMessage",
"description": "The following email recipients and users will receive email notifications when subscription usage gets close to usage quota."
}
]
},
"description": "Notification Name Identifier.",
"x-ms-parameter-location": "method"
},
"EmailParameter": {
"name": "email",
"in": "path",
"required": true,
"type": "string",
"description": "Email identifier.",
"x-ms-parameter-location": "method"
}
}
}

Просмотреть файл

@ -0,0 +1,459 @@
{
"swagger": "2.0",
"info": {
"title": "ApiManagementClient",
"description": "Use these REST APIs for performing operations on OpenId Connect Provider entity associated with your Azure API Management deployment. API Management allows you to access APIs secured with token from [OpenID Connect Provider ](http://openid.net/connect/) to be accessed from the Developer Console.",
"version": "2018-01-01"
},
"host": "management.azure.com",
"schemes": [
"https"
],
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"security": [
{
"azure_auth": [
"user_impersonation"
]
}
],
"securityDefinitions": {
"azure_auth": {
"type": "oauth2",
"authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize",
"flow": "implicit",
"description": "Azure Active Directory OAuth2 Flow.",
"scopes": {
"user_impersonation": "impersonate your user account"
}
}
},
"paths": {
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/openidConnectProviders": {
"get": {
"tags": [
"OpenIdConnectProviders"
],
"operationId": "OpenIdConnectProvider_ListByService",
"description": "Lists all OpenID Connect Providers.",
"x-ms-examples": {
"ApiManagementListOpenIdConnectProviders": {
"$ref": "./examples/ApiManagementListOpenIdConnectProviders.json"
}
},
"parameters": [
{
"$ref": "./apimanagement.json#/parameters/ResourceGroupNameParameter"
},
{
"$ref": "./apimanagement.json#/parameters/ServiceNameParameter"
},
{
"name": "$filter",
"in": "query",
"required": false,
"type": "string",
"description": "| Field | Supported operators | Supported functions |\n|-------|------------------------|---------------------------------------------|\n| id | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |\n| name | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |"
},
{
"$ref": "./apimanagement.json#/parameters/TopQueryParameter"
},
{
"$ref": "./apimanagement.json#/parameters/SkipQueryParameter"
},
{
"$ref": "./apimanagement.json#/parameters/ApiVersionParameter"
},
{
"$ref": "./apimanagement.json#/parameters/SubscriptionIdParameter"
}
],
"responses": {
"200": {
"description": "Lists of all the OpenId Connect Providers.",
"schema": {
"$ref": "#/definitions/OpenIdConnectProviderCollection"
}
}
},
"x-ms-pageable": {
"nextLinkName": "nextLink"
},
"x-ms-odata": "#/definitions/OpenidConnectProviderContract"
}
},
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/openidConnectProviders/{opid}": {
"head": {
"tags": [
"OpenIdConnectProviders"
],
"operationId": "OpenIdConnectProvider_GetEntityTag",
"description": "Gets the entity state (Etag) version of the openIdConnectProvider specified by its identifier.",
"x-ms-examples": {
"ApiManagementHeadOpenIdConnectProvider": {
"$ref": "./examples/ApiManagementHeadOpenIdConnectProvider.json"
}
},
"parameters": [
{
"$ref": "./apimanagement.json#/parameters/ResourceGroupNameParameter"
},
{
"$ref": "./apimanagement.json#/parameters/ServiceNameParameter"
},
{
"$ref": "#/parameters/OpenIdConnectIdParameter"
},
{
"$ref": "./apimanagement.json#/parameters/ApiVersionParameter"
},
{
"$ref": "./apimanagement.json#/parameters/SubscriptionIdParameter"
}
],
"responses": {
"200": {
"description": "Specified openidConnectProvider entity exists and current entity state version is present in the ETag header.",
"headers": {
"ETag": {
"description": "Current entity state version. Should be treated as opaque and used to make conditional HTTP requests.",
"type": "string"
}
}
},
"default": {
"description": "Error response describing why the operation failed.",
"schema": {
"$ref": "./apimanagement.json#/definitions/ErrorResponse"
}
}
}
},
"get": {
"tags": [
"OpenIdConnectProviders"
],
"operationId": "OpenIdConnectProvider_Get",
"description": "Gets specific OpenID Connect Provider.",
"x-ms-examples": {
"ApiManagementGetOpenIdConnectProvider": {
"$ref": "./examples/ApiManagementGetOpenIdConnectProvider.json"
}
},
"parameters": [
{
"$ref": "./apimanagement.json#/parameters/ResourceGroupNameParameter"
},
{
"$ref": "./apimanagement.json#/parameters/ServiceNameParameter"
},
{
"$ref": "#/parameters/OpenIdConnectIdParameter"
},
{
"$ref": "./apimanagement.json#/parameters/ApiVersionParameter"
},
{
"$ref": "./apimanagement.json#/parameters/SubscriptionIdParameter"
}
],
"responses": {
"200": {
"description": "The response body contains the specified OpenId Connect Provider entity.",
"schema": {
"$ref": "#/definitions/OpenidConnectProviderContract"
},
"headers": {
"ETag": {
"description": "Current entity state version. Should be treated as opaque and used to make conditional HTTP requests.",
"type": "string"
}
}
},
"default": {
"description": "Error response describing why the operation failed.",
"schema": {
"$ref": "./apimanagement.json#/definitions/ErrorResponse"
}
}
}
},
"put": {
"tags": [
"OpenIdConnectProviders"
],
"operationId": "OpenIdConnectProvider_CreateOrUpdate",
"description": "Creates or updates the OpenID Connect Provider.",
"x-ms-examples": {
"ApiManagementCreateOpenIdConnectProvider": {
"$ref": "./examples/ApiManagementCreateOpenIdConnectProvider.json"
}
},
"parameters": [
{
"$ref": "./apimanagement.json#/parameters/ResourceGroupNameParameter"
},
{
"$ref": "./apimanagement.json#/parameters/ServiceNameParameter"
},
{
"$ref": "#/parameters/OpenIdConnectIdParameter"
},
{
"name": "parameters",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/OpenidConnectProviderContract"
},
"description": "Create parameters."
},
{
"$ref": "./apimanagement.json#/parameters/IfMatchOptionalParameter"
},
{
"$ref": "./apimanagement.json#/parameters/ApiVersionParameter"
},
{
"$ref": "./apimanagement.json#/parameters/SubscriptionIdParameter"
}
],
"responses": {
"201": {
"description": "OpenIdConnect Provider was successfully created.",
"schema": {
"$ref": "#/definitions/OpenidConnectProviderContract"
}
},
"200": {
"description": "OpenIdConnect Provider was successfully updated.",
"schema": {
"$ref": "#/definitions/OpenidConnectProviderContract"
}
},
"default": {
"description": "Error response describing why the operation failed.",
"schema": {
"$ref": "./apimanagement.json#/definitions/ErrorResponse"
}
}
}
},
"patch": {
"tags": [
"OpenIdConnectProviders"
],
"operationId": "OpenIdConnectProvider_Update",
"description": "Updates the specific OpenID Connect Provider.",
"x-ms-examples": {
"ApiManagementUpdateOpenIdConnectProvider": {
"$ref": "./examples/ApiManagementUpdateOpenIdConnectProvider.json"
}
},
"parameters": [
{
"$ref": "./apimanagement.json#/parameters/ResourceGroupNameParameter"
},
{
"$ref": "./apimanagement.json#/parameters/ServiceNameParameter"
},
{
"$ref": "#/parameters/OpenIdConnectIdParameter"
},
{
"name": "parameters",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/OpenidConnectProviderUpdateContract"
},
"description": "Update parameters."
},
{
"$ref": "./apimanagement.json#/parameters/IfMatchRequiredParameter"
},
{
"$ref": "./apimanagement.json#/parameters/ApiVersionParameter"
},
{
"$ref": "./apimanagement.json#/parameters/SubscriptionIdParameter"
}
],
"responses": {
"204": {
"description": "OpenId Connect Provider was successfully updated."
},
"default": {
"description": "Error response describing why the operation failed.",
"schema": {
"$ref": "./apimanagement.json#/definitions/ErrorResponse"
}
}
}
},
"delete": {
"tags": [
"OpenIdConnectProviders"
],
"operationId": "OpenIdConnectProvider_Delete",
"description": "Deletes specific OpenID Connect Provider of the API Management service instance.",
"x-ms-examples": {
"ApiManagementDeleteOpenIdConnectProvider": {
"$ref": "./examples/ApiManagementDeleteOpenIdConnectProvider.json"
}
},
"parameters": [
{
"$ref": "./apimanagement.json#/parameters/ResourceGroupNameParameter"
},
{
"$ref": "./apimanagement.json#/parameters/ServiceNameParameter"
},
{
"$ref": "#/parameters/OpenIdConnectIdParameter"
},
{
"$ref": "./apimanagement.json#/parameters/IfMatchRequiredParameter"
},
{
"$ref": "./apimanagement.json#/parameters/ApiVersionParameter"
},
{
"$ref": "./apimanagement.json#/parameters/SubscriptionIdParameter"
}
],
"responses": {
"200": {
"description": "OpenId Connect Provider was successfully deleted."
},
"204": {
"description": "OpenId Connect Provider was successfully deleted."
},
"default": {
"description": "Error response describing why the operation failed.",
"schema": {
"$ref": "./apimanagement.json#/definitions/ErrorResponse"
}
}
}
}
}
},
"definitions": {
"OpenIdConnectProviderCollection": {
"properties": {
"value": {
"type": "array",
"items": {
"$ref": "#/definitions/OpenidConnectProviderContract"
},
"description": "Page values."
},
"nextLink": {
"type": "string",
"description": "Next page link if any."
}
},
"description": "Paged OpenIdProviders list representation."
},
"OpenidConnectProviderContract": {
"properties": {
"properties": {
"x-ms-client-flatten": true,
"$ref": "#/definitions/OpenidConnectProviderContractProperties",
"description": "OpenId Connect Provider contract properties."
}
},
"allOf": [
{
"$ref": "./apimanagement.json#/definitions/Resource"
}
],
"description": "OpenId Connect Provider details."
},
"OpenidConnectProviderContractProperties": {
"properties": {
"displayName": {
"type": "string",
"description": "User-friendly OpenID Connect Provider name.",
"maxLength": 50
},
"description": {
"type": "string",
"description": "User-friendly description of OpenID Connect Provider."
},
"metadataEndpoint": {
"type": "string",
"description": "Metadata endpoint URI."
},
"clientId": {
"type": "string",
"description": "Client ID of developer console which is the client application."
},
"clientSecret": {
"type": "string",
"description": "Client Secret of developer console which is the client application."
}
},
"required": [
"displayName",
"metadataEndpoint",
"clientId"
],
"description": "OpenID Connect Providers Contract."
},
"OpenidConnectProviderUpdateContract": {
"properties": {
"properties": {
"x-ms-client-flatten": true,
"$ref": "#/definitions/OpenidConnectProviderUpdateContractProperties",
"description": "OpenId Connect Provider Update contract properties."
}
},
"description": "Parameters supplied to the Update OpenID Connect Provider operation."
},
"OpenidConnectProviderUpdateContractProperties": {
"properties": {
"displayName": {
"type": "string",
"description": "User-friendly OpenID Connect Provider name.",
"maxLength": 50
},
"description": {
"type": "string",
"description": "User-friendly description of OpenID Connect Provider."
},
"metadataEndpoint": {
"type": "string",
"description": "Metadata endpoint URI."
},
"clientId": {
"type": "string",
"description": "Client ID of developer console which is the client application."
},
"clientSecret": {
"type": "string",
"description": "Client Secret of developer console which is the client application."
}
},
"description": "Parameters supplied to the Update OpenID Connect Provider operation."
}
},
"parameters": {
"OpenIdConnectIdParameter": {
"name": "opid",
"in": "path",
"required": true,
"type": "string",
"description": "Identifier of the OpenID Connect Provider.",
"maxLength": 256,
"pattern": "^[^*#&+:<>?]+$",
"x-ms-parameter-location": "method"
}
}
}

Просмотреть файл

@ -0,0 +1,713 @@
{
"swagger": "2.0",
"info": {
"title": "ApiManagementClient",
"description": "Use these REST APIs for performing operations on PortalSettings entity associated with your Azure API Management deployment. Using this entity you can manage settings for a Developer Portal.",
"version": "2018-01-01"
},
"host": "management.azure.com",
"schemes": [
"https"
],
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"security": [
{
"azure_auth": [
"user_impersonation"
]
}
],
"securityDefinitions": {
"azure_auth": {
"type": "oauth2",
"authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize",
"flow": "implicit",
"description": "Azure Active Directory OAuth2 Flow.",
"scopes": {
"user_impersonation": "impersonate your user account"
}
}
},
"paths": {
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalsettings/signin": {
"head": {
"tags": [
"SignInSettings"
],
"operationId": "SignInSettings_GetEntityTag",
"description": "Gets the entity state (Etag) version of the SignInSettings.",
"x-ms-examples": {
"ApiManagementHeadSignInSettings": {
"$ref": "./examples/ApiManagementHeadSignInSettings.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": "Operation completed successfully.",
"headers": {
"ETag": {
"description": "Current entity state version. Should be treated as opaque and used to make conditional HTTP requests.",
"type": "string"
}
}
},
"default": {
"description": "Error response describing why the operation failed.",
"schema": {
"$ref": "./apimanagement.json#/definitions/ErrorResponse"
}
}
}
},
"get": {
"tags": [
"SignInSettings"
],
"operationId": "SignInSettings_Get",
"description": "Get Sign-In settings.",
"x-ms-examples": {
"ApiManagementPortalSettingsGetSignIn": {
"$ref": "./examples/ApiManagementPortalSettingsGetSignIn.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": "Sign-In settings.",
"schema": {
"$ref": "#/definitions/PortalSigninSettings"
},
"headers": {
"ETag": {
"description": "Current entity state version. Should be treated as opaque and used to make conditional HTTP requests.",
"type": "string"
}
}
}
}
},
"patch": {
"tags": [
"SignInSettings"
],
"operationId": "SignInSettings_Update",
"description": "Update Sign-In settings.",
"x-ms-examples": {
"ApiManagementPortalSettingsUpdateSignIn": {
"$ref": "./examples/ApiManagementPortalSettingsUpdateSignIn.json"
}
},
"parameters": [
{
"$ref": "./apimanagement.json#/parameters/ResourceGroupNameParameter"
},
{
"$ref": "./apimanagement.json#/parameters/ServiceNameParameter"
},
{
"name": "parameters",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/PortalSigninSettings"
},
"description": "Update Sign-In settings."
},
{
"$ref": "./apimanagement.json#/parameters/IfMatchRequiredParameter"
},
{
"$ref": "./apimanagement.json#/parameters/ApiVersionParameter"
},
{
"$ref": "./apimanagement.json#/parameters/SubscriptionIdParameter"
}
],
"responses": {
"204": {
"description": "Sign-In settings was updated successfully."
},
"default": {
"description": "Error response describing why the operation failed.",
"schema": {
"$ref": "./apimanagement.json#/definitions/ErrorResponse"
}
}
}
},
"put": {
"tags": [
"SignInSettings"
],
"operationId": "SignInSettings_CreateOrUpdate",
"description": "Create or Update Sign-In settings.",
"x-ms-examples": {
"ApiManagementPortalSettingsUpdateSignIn": {
"$ref": "./examples/ApiManagementPortalSettingsPutSignIn.json"
}
},
"parameters": [
{
"$ref": "./apimanagement.json#/parameters/ResourceGroupNameParameter"
},
{
"$ref": "./apimanagement.json#/parameters/ServiceNameParameter"
},
{
"name": "parameters",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/PortalSigninSettings"
},
"description": "Create or update parameters."
},
{
"$ref": "./apimanagement.json#/parameters/ApiVersionParameter"
},
{
"$ref": "./apimanagement.json#/parameters/SubscriptionIdParameter"
}
],
"responses": {
"200": {
"description": "Sign-In settings was successfully updated.",
"schema": {
"$ref": "#/definitions/PortalSigninSettings"
}
},
"default": {
"description": "Error response describing why the operation failed.",
"schema": {
"$ref": "./apimanagement.json#/definitions/ErrorResponse"
}
}
}
}
},
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalsettings/signup": {
"head": {
"tags": [
"SignUpSettings"
],
"operationId": "SignUpSettings_GetEntityTag",
"description": "Gets the entity state (Etag) version of the SignUpSettings.",
"x-ms-examples": {
"ApiManagementHeadSignUpSettings": {
"$ref": "./examples/ApiManagementHeadSignUpSettings.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": "Operation completed successfully.",
"headers": {
"ETag": {
"description": "Current entity state version. Should be treated as opaque and used to make conditional HTTP requests.",
"type": "string"
}
}
},
"default": {
"description": "Error response describing why the operation failed.",
"schema": {
"$ref": "./apimanagement.json#/definitions/ErrorResponse"
}
}
}
},
"get": {
"tags": [
"SignUpSettings"
],
"operationId": "SignUpSettings_Get",
"description": "Get Sign-Up settings.",
"x-ms-examples": {
"ApiManagementPortalSettingsGetSignUp": {
"$ref": "./examples/ApiManagementPortalSettingsGetSignUp.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": "Sign-Up settings.",
"schema": {
"$ref": "#/definitions/PortalSignupSettings"
},
"headers": {
"ETag": {
"description": "Current entity state version. Should be treated as opaque and used to make conditional HTTP requests.",
"type": "string"
}
}
}
}
},
"patch": {
"tags": [
"SignUpSettings"
],
"operationId": "SignUpSettings_Update",
"description": "Update Sign-Up settings.",
"x-ms-examples": {
"ApiManagementPortalSettingsUpdateSignUp": {
"$ref": "./examples/ApiManagementPortalSettingsUpdateSignUp.json"
}
},
"parameters": [
{
"$ref": "./apimanagement.json#/parameters/ResourceGroupNameParameter"
},
{
"$ref": "./apimanagement.json#/parameters/ServiceNameParameter"
},
{
"name": "parameters",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/PortalSignupSettings"
},
"description": "Update Sign-Up settings."
},
{
"$ref": "./apimanagement.json#/parameters/IfMatchRequiredParameter"
},
{
"$ref": "./apimanagement.json#/parameters/ApiVersionParameter"
},
{
"$ref": "./apimanagement.json#/parameters/SubscriptionIdParameter"
}
],
"responses": {
"204": {
"description": "Sign-Up settings was updated successfully."
},
"default": {
"description": "Error response describing why the operation failed.",
"schema": {
"$ref": "./apimanagement.json#/definitions/ErrorResponse"
}
}
}
},
"put": {
"tags": [
"SignUpSettings"
],
"operationId": "SignUpSettings_CreateOrUpdate",
"description": "Create or Update Sign-Up settings.",
"x-ms-examples": {
"ApiManagementPortalSettingsUpdateSignUp": {
"$ref": "./examples/ApiManagementPortalSettingsPutSignUp.json"
}
},
"parameters": [
{
"$ref": "./apimanagement.json#/parameters/ResourceGroupNameParameter"
},
{
"$ref": "./apimanagement.json#/parameters/ServiceNameParameter"
},
{
"name": "parameters",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/PortalSignupSettings"
},
"description": "Create or update parameters."
},
{
"$ref": "./apimanagement.json#/parameters/ApiVersionParameter"
},
{
"$ref": "./apimanagement.json#/parameters/SubscriptionIdParameter"
}
],
"responses": {
"200": {
"description": "Sign-Up settings was successfully updated.",
"schema": {
"$ref": "#/definitions/PortalSignupSettings"
}
},
"default": {
"description": "Error response describing why the operation failed.",
"schema": {
"$ref": "./apimanagement.json#/definitions/ErrorResponse"
}
}
}
}
},
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalsettings/delegation": {
"head": {
"tags": [
"DelegationSettings"
],
"operationId": "DelegationSettings_GetEntityTag",
"description": "Gets the entity state (Etag) version of the DelegationSettings.",
"x-ms-examples": {
"ApiManagementHeadDelegationSettings": {
"$ref": "./examples/ApiManagementHeadDelegationSettings.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": "Operation completed successfully.",
"headers": {
"ETag": {
"description": "Current entity state version. Should be treated as opaque and used to make conditional HTTP requests.",
"type": "string"
}
}
},
"default": {
"description": "Error response describing why the operation failed.",
"schema": {
"$ref": "./apimanagement.json#/definitions/ErrorResponse"
}
}
}
},
"get": {
"tags": [
"DelegationSettings"
],
"operationId": "DelegationSettings_Get",
"description": "Get Delegation settings.",
"x-ms-examples": {
"ApiManagementPortalSettingsGetDelegation": {
"$ref": "./examples/ApiManagementPortalSettingsGetDelegation.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": "Delegation settings.",
"schema": {
"$ref": "#/definitions/PortalDelegationSettings"
},
"headers": {
"ETag": {
"description": "Current entity state version. Should be treated as opaque and used to make conditional HTTP requests.",
"type": "string"
}
}
}
}
},
"patch": {
"tags": [
"DelegationSettings"
],
"operationId": "DelegationSettings_Update",
"description": "Update Delegation settings.",
"x-ms-examples": {
"ApiManagementPortalSettingsUpdateDelegation": {
"$ref": "./examples/ApiManagementPortalSettingsUpdateDelegation.json"
}
},
"parameters": [
{
"$ref": "./apimanagement.json#/parameters/ResourceGroupNameParameter"
},
{
"$ref": "./apimanagement.json#/parameters/ServiceNameParameter"
},
{
"name": "parameters",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/PortalDelegationSettings"
},
"description": "Update Delegation settings."
},
{
"$ref": "./apimanagement.json#/parameters/IfMatchRequiredParameter"
},
{
"$ref": "./apimanagement.json#/parameters/ApiVersionParameter"
},
{
"$ref": "./apimanagement.json#/parameters/SubscriptionIdParameter"
}
],
"responses": {
"204": {
"description": "Delegation settings was updated successfully."
},
"default": {
"description": "Error response describing why the operation failed.",
"schema": {
"$ref": "./apimanagement.json#/definitions/ErrorResponse"
}
}
}
},
"put": {
"tags": [
"DelegationSettings"
],
"operationId": "DelegationSettings_CreateOrUpdate",
"description": "Create or Update Delegation settings.",
"x-ms-examples": {
"ApiManagementPortalSettingsUpdateDelegation": {
"$ref": "./examples/ApiManagementPortalSettingsPutDelegation.json"
}
},
"parameters": [
{
"$ref": "./apimanagement.json#/parameters/ResourceGroupNameParameter"
},
{
"$ref": "./apimanagement.json#/parameters/ServiceNameParameter"
},
{
"name": "parameters",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/PortalDelegationSettings"
},
"description": "Create or update parameters."
},
{
"$ref": "./apimanagement.json#/parameters/ApiVersionParameter"
},
{
"$ref": "./apimanagement.json#/parameters/SubscriptionIdParameter"
}
],
"responses": {
"200": {
"description": "Delegation settings was successfully updated.",
"schema": {
"$ref": "#/definitions/PortalDelegationSettings"
}
},
"default": {
"description": "Error response describing why the operation failed.",
"schema": {
"$ref": "./apimanagement.json#/definitions/ErrorResponse"
}
}
}
}
}
},
"definitions": {
"PortalSigninSettings": {
"properties": {
"properties": {
"x-ms-client-flatten": true,
"$ref": "#/definitions/PortalSigninSettingProperties",
"description": "Sign-in settings contract properties."
}
},
"allOf": [
{
"$ref": "./apimanagement.json#/definitions/Resource"
}
],
"description": "Sign-In settings for the Developer Portal."
},
"PortalSigninSettingProperties": {
"properties": {
"enabled": {
"type": "boolean",
"description": "Redirect Anonymous users to the Sign-In page."
}
},
"description": "Sign-in settings contract properties."
},
"PortalSignupSettings": {
"properties": {
"properties": {
"x-ms-client-flatten": true,
"$ref": "#/definitions/PortalSignupSettingsProperties",
"description": "Sign-up settings contract properties."
}
},
"allOf": [
{
"$ref": "./apimanagement.json#/definitions/Resource"
}
],
"description": "Sign-Up settings for a developer portal."
},
"PortalSignupSettingsProperties": {
"properties": {
"enabled": {
"type": "boolean",
"description": "Allow users to sign up on a developer portal."
},
"termsOfService": {
"type": "object",
"$ref": "#/definitions/TermsOfServiceProperties",
"description": "Terms of service contract properties."
}
},
"description": "Sign-up settings contract properties."
},
"TermsOfServiceProperties": {
"properties": {
"text": {
"type": "string",
"description": "A terms of service text."
},
"enabled": {
"type": "boolean",
"description": "Display terms of service during a sign-up process."
},
"consentRequired": {
"type": "boolean",
"description": "Ask user for consent to the terms of service."
}
},
"description": "Terms of service contract properties."
},
"PortalDelegationSettings": {
"properties": {
"properties": {
"x-ms-client-flatten": true,
"$ref": "#/definitions/PortalDelegationSettingsProperties",
"description": "Delegation settings contract properties."
}
},
"allOf": [
{
"$ref": "./apimanagement.json#/definitions/Resource"
}
],
"description": "Delegation settings for a developer portal."
},
"PortalDelegationSettingsProperties": {
"properties": {
"url": {
"type": "string",
"description": "A delegation Url."
},
"validationKey": {
"type": "string",
"description": "A base64-encoded validation key to validate, that a request is coming from Azure API Management."
},
"subscriptions": {
"$ref": "#/definitions/SubscriptionsDelegationSettingsProperties",
"description": "Subscriptions delegation settings."
},
"userRegistration": {
"$ref": "#/definitions/RegistrationDelegationSettingsProperties",
"description": "User registration delegation settings."
}
},
"description": "Delegation settings contract properties."
},
"SubscriptionsDelegationSettingsProperties": {
"properties": {
"enabled": {
"type": "boolean",
"description": "Enable or disable delegation for subscriptions."
}
},
"description": "Subscriptions delegation settings properties."
},
"RegistrationDelegationSettingsProperties": {
"properties": {
"enabled": {
"type": "boolean",
"description": "Enable or disable delegation for user registration."
}
},
"description": "User registration delegation settings properties."
}
}
}

Разница между файлами не показана из-за своего большого размера Загрузить разницу

Просмотреть файл

@ -0,0 +1,472 @@
{
"swagger": "2.0",
"info": {
"title": "ApiManagementClient",
"description": "Use these REST APIs for performing operations on Property entity associated with your Azure API Management deployment. API Management policies are a powerful capability of the system that allow the publisher to change the behavior of the API through configuration. Policies are a collection of statements that are executed sequentially on the request or response of an API. Policy statements can be constructed using literal text values, policy expressions, and properties. Each API Management service instance has a properties collection of key/value pairs that are global to the service instance. These properties can be used to manage constant string values across all API configuration and policies.",
"version": "2018-01-01"
},
"host": "management.azure.com",
"schemes": [
"https"
],
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"security": [
{
"azure_auth": [
"user_impersonation"
]
}
],
"securityDefinitions": {
"azure_auth": {
"type": "oauth2",
"authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize",
"flow": "implicit",
"description": "Azure Active Directory OAuth2 Flow.",
"scopes": {
"user_impersonation": "impersonate your user account"
}
}
},
"paths": {
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/properties": {
"get": {
"tags": [
"Property"
],
"operationId": "Property_ListByService",
"description": "Lists a collection of properties defined within a service instance.",
"externalDocs": {
"url": "https://docs.microsoft.com/en-us/azure/api-management/api-management-howto-properties"
},
"x-ms-examples": {
"ApiManagementListProperties": {
"$ref": "./examples/ApiManagementListProperties.json"
}
},
"parameters": [
{
"$ref": "./apimanagement.json#/parameters/ResourceGroupNameParameter"
},
{
"$ref": "./apimanagement.json#/parameters/ServiceNameParameter"
},
{
"name": "$filter",
"in": "query",
"required": false,
"type": "string",
"description": "| Field | Supported operators | Supported functions |\n|-------|------------------------|-------------------------------------------------------|\n| tags | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith, any, all |\n| name | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |"
},
{
"$ref": "./apimanagement.json#/parameters/TopQueryParameter"
},
{
"$ref": "./apimanagement.json#/parameters/SkipQueryParameter"
},
{
"$ref": "./apimanagement.json#/parameters/ApiVersionParameter"
},
{
"$ref": "./apimanagement.json#/parameters/SubscriptionIdParameter"
}
],
"responses": {
"200": {
"description": "A Collection of the Property entities for the specified API Management service instance.",
"schema": {
"$ref": "#/definitions/PropertyCollection"
}
}
},
"x-ms-pageable": {
"nextLinkName": "nextLink"
},
"x-ms-odata": "#/definitions/PropertyContract"
}
},
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/properties/{propId}": {
"head": {
"tags": [
"Property"
],
"operationId": "Property_GetEntityTag",
"description": "Gets the entity state (Etag) version of the property specified by its identifier.",
"x-ms-examples": {
"ApiManagementHeadProperty": {
"$ref": "./examples/ApiManagementHeadProperty.json"
}
},
"parameters": [
{
"$ref": "./apimanagement.json#/parameters/ResourceGroupNameParameter"
},
{
"$ref": "./apimanagement.json#/parameters/ServiceNameParameter"
},
{
"$ref": "#/parameters/PropertyIdParameter"
},
{
"$ref": "./apimanagement.json#/parameters/ApiVersionParameter"
},
{
"$ref": "./apimanagement.json#/parameters/SubscriptionIdParameter"
}
],
"responses": {
"200": {
"description": "Specified Property entity exists and current entity state version is present in the ETag header.",
"headers": {
"ETag": {
"description": "Current entity state version. Should be treated as opaque and used to make conditional HTTP requests.",
"type": "string"
}
}
},
"default": {
"description": "Error response describing why the operation failed.",
"schema": {
"$ref": "./apimanagement.json#/definitions/ErrorResponse"
}
}
}
},
"get": {
"tags": [
"Property"
],
"operationId": "Property_Get",
"description": "Gets the details of the property specified by its identifier.",
"x-ms-examples": {
"ApiManagementGetProperty": {
"$ref": "./examples/ApiManagementGetProperty.json"
}
},
"parameters": [
{
"$ref": "./apimanagement.json#/parameters/ResourceGroupNameParameter"
},
{
"$ref": "./apimanagement.json#/parameters/ServiceNameParameter"
},
{
"$ref": "#/parameters/PropertyIdParameter"
},
{
"$ref": "./apimanagement.json#/parameters/ApiVersionParameter"
},
{
"$ref": "./apimanagement.json#/parameters/SubscriptionIdParameter"
}
],
"responses": {
"200": {
"description": "The response body contains the specified Property entity.",
"schema": {
"$ref": "#/definitions/PropertyContract"
},
"headers": {
"ETag": {
"description": "Current entity state version. Should be treated as opaque and used to make conditional HTTP requests.",
"type": "string"
}
}
},
"default": {
"description": "Error response describing why the operation failed.",
"schema": {
"$ref": "./apimanagement.json#/definitions/ErrorResponse"
}
}
}
},
"put": {
"tags": [
"Property"
],
"operationId": "Property_CreateOrUpdate",
"description": "Creates or updates a property.",
"x-ms-examples": {
"ApiManagementCreateProperty": {
"$ref": "./examples/ApiManagementCreateProperty.json"
}
},
"parameters": [
{
"$ref": "./apimanagement.json#/parameters/ResourceGroupNameParameter"
},
{
"$ref": "./apimanagement.json#/parameters/ServiceNameParameter"
},
{
"$ref": "#/parameters/PropertyIdParameter"
},
{
"name": "parameters",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/PropertyContract"
},
"description": "Create parameters."
},
{
"$ref": "./apimanagement.json#/parameters/IfMatchOptionalParameter"
},
{
"$ref": "./apimanagement.json#/parameters/ApiVersionParameter"
},
{
"$ref": "./apimanagement.json#/parameters/SubscriptionIdParameter"
}
],
"responses": {
"201": {
"description": "Property was successfully created.",
"schema": {
"$ref": "#/definitions/PropertyContract"
}
},
"200": {
"description": "Property was successfully updated.",
"schema": {
"$ref": "#/definitions/PropertyContract"
}
},
"default": {
"description": "Error response describing why the operation failed.",
"schema": {
"$ref": "./apimanagement.json#/definitions/ErrorResponse"
}
}
}
},
"patch": {
"tags": [
"Property"
],
"operationId": "Property_Update",
"description": "Updates the specific property.",
"x-ms-examples": {
"ApiManagementUpdateProperty": {
"$ref": "./examples/ApiManagementUpdateProperty.json"
}
},
"parameters": [
{
"$ref": "./apimanagement.json#/parameters/ResourceGroupNameParameter"
},
{
"$ref": "./apimanagement.json#/parameters/ServiceNameParameter"
},
{
"$ref": "#/parameters/PropertyIdParameter"
},
{
"name": "parameters",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/PropertyUpdateParameters"
},
"description": "Update parameters."
},
{
"$ref": "./apimanagement.json#/parameters/IfMatchRequiredParameter"
},
{
"$ref": "./apimanagement.json#/parameters/ApiVersionParameter"
},
{
"$ref": "./apimanagement.json#/parameters/SubscriptionIdParameter"
}
],
"responses": {
"204": {
"description": "Property was successfully updated."
},
"default": {
"description": "Error response describing why the operation failed.",
"schema": {
"$ref": "./apimanagement.json#/definitions/ErrorResponse"
}
}
}
},
"delete": {
"tags": [
"Property"
],
"operationId": "Property_Delete",
"description": "Deletes specific property from the the API Management service instance.",
"x-ms-examples": {
"ApiManagementDeleteProperty": {
"$ref": "./examples/ApiManagementDeleteProperty.json"
}
},
"parameters": [
{
"$ref": "./apimanagement.json#/parameters/ResourceGroupNameParameter"
},
{
"$ref": "./apimanagement.json#/parameters/ServiceNameParameter"
},
{
"$ref": "#/parameters/PropertyIdParameter"
},
{
"$ref": "./apimanagement.json#/parameters/IfMatchRequiredParameter"
},
{
"$ref": "./apimanagement.json#/parameters/ApiVersionParameter"
},
{
"$ref": "./apimanagement.json#/parameters/SubscriptionIdParameter"
}
],
"responses": {
"200": {
"description": "Property was successfully deleted."
},
"204": {
"description": "Property was successfully deleted."
},
"default": {
"description": "Error response describing why the operation failed.",
"schema": {
"$ref": "./apimanagement.json#/definitions/ErrorResponse"
}
}
}
}
}
},
"definitions": {
"PropertyCollection": {
"properties": {
"value": {
"type": "array",
"items": {
"$ref": "#/definitions/PropertyContract"
},
"description": "Page values."
},
"nextLink": {
"type": "string",
"description": "Next page link if any."
}
},
"description": "Paged Property list representation."
},
"PropertyContract": {
"properties": {
"properties": {
"x-ms-client-flatten": true,
"$ref": "#/definitions/PropertyContractProperties",
"description": "Property entity contract properties."
}
},
"allOf": [
{
"$ref": "./apimanagement.json#/definitions/Resource"
}
],
"description": "Property details."
},
"PropertyContractProperties": {
"properties": {
"displayName": {
"type": "string",
"description": "Unique name of Property. It may contain only letters, digits, period, dash, and underscore characters.",
"minLength": 1,
"maxLength": 256,
"pattern": "^[A-Za-z0-9-._]+$"
},
"value": {
"type": "string",
"description": "Value of the property. Can contain policy expressions. It may not be empty or consist only of whitespace.",
"minLength": 1,
"maxLength": 4096
}
},
"allOf": [
{
"$ref": "#/definitions/PropertyEntityBaseParameters"
}
],
"required": [
"displayName",
"value"
],
"description": "Property Contract properties."
},
"PropertyUpdateParameters": {
"properties": {
"properties": {
"x-ms-client-flatten": true,
"$ref": "#/definitions/PropertyUpdateParameterProperties",
"description": "Property entity Update contract properties."
}
},
"description": "Property update Parameters."
},
"PropertyUpdateParameterProperties": {
"properties": {
"displayName": {
"type": "string",
"description": "Unique name of Property. It may contain only letters, digits, period, dash, and underscore characters.",
"minLength": 1,
"maxLength": 256,
"pattern": "^[A-Za-z0-9-._]+$"
},
"value": {
"type": "string",
"description": "Value of the property. Can contain policy expressions. It may not be empty or consist only of whitespace.",
"minLength": 1,
"maxLength": 4096
}
},
"allOf": [
{
"$ref": "#/definitions/PropertyEntityBaseParameters"
}
],
"description": "Property Contract properties."
},
"PropertyEntityBaseParameters": {
"properties": {
"tags": {
"type": "array",
"items": {
"type": "string"
},
"maxItems": 32,
"description": "Optional tags that when provided can be used to filter the property list."
},
"secret": {
"description": "Determines whether the value is a secret and should be encrypted or not. Default value is false.",
"type": "boolean"
}
},
"description": "Property Entity Base Parameters set."
}
},
"parameters": {
"PropertyIdParameter": {
"name": "propId",
"in": "path",
"required": true,
"type": "string",
"description": "Identifier of the property.",
"maxLength": 80,
"pattern": "(^[\\w]+$)|(^[\\w][\\w\\-]+[\\w]$)",
"x-ms-parameter-location": "method"
}
}
}

Просмотреть файл

@ -0,0 +1,341 @@
{
"swagger": "2.0",
"info": {
"title": "ApiManagementClient",
"description": "Use these REST APIs for performing operations on Quota entity associated with your Azure API Management deployment. To configure call rate limit and quota policies refer to [how to configure call rate limit and quota](https://docs.microsoft.com/en-us/azure/api-management/api-management-howto-product-with-rules#a-namepolicies-ato-configure-call-rate-limit-and-quota-policies).",
"version": "2018-01-01"
},
"host": "management.azure.com",
"schemes": [
"https"
],
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"security": [
{
"azure_auth": [
"user_impersonation"
]
}
],
"securityDefinitions": {
"azure_auth": {
"type": "oauth2",
"authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize",
"flow": "implicit",
"description": "Azure Active Directory OAuth2 Flow.",
"scopes": {
"user_impersonation": "impersonate your user account"
}
}
},
"paths": {
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/quotas/{quotaCounterKey}": {
"get": {
"tags": [
"QuotaByCounterKeys"
],
"operationId": "QuotaByCounterKeys_ListByService",
"description": "Lists a collection of current quota counter periods associated with the counter-key configured in the policy on the specified service instance. The api does not support paging yet.",
"externalDocs": {
"url": "https://docs.microsoft.com/en-us/azure/api-management/api-management-howto-product-with-rules#a-namepolicies-ato-configure-call-rate-limit-and-quota-policies",
"description": "Document describing how to configure the quota policies."
},
"x-ms-examples": {
"ApiManagementGetQuotaCounteryKeys": {
"$ref": "./examples/ApiManagementGetQuotaCounteryKeys.json"
}
},
"parameters": [
{
"$ref": "./apimanagement.json#/parameters/SubscriptionIdParameter"
},
{
"$ref": "./apimanagement.json#/parameters/ResourceGroupNameParameter"
},
{
"$ref": "./apimanagement.json#/parameters/ServiceNameParameter"
},
{
"$ref": "#/parameters/QuotaCounterKeyParameter"
},
{
"$ref": "./apimanagement.json#/parameters/ApiVersionParameter"
}
],
"responses": {
"200": {
"description": "Lists a collection of the quota counter values.",
"schema": {
"$ref": "#/definitions/QuotaCounterCollection"
}
},
"default": {
"description": "Error response describing why the operation failed.",
"schema": {
"$ref": "./apimanagement.json#/definitions/ErrorResponse"
}
}
}
},
"patch": {
"tags": [
"QuotaByCounterKeys"
],
"operationId": "QuotaByCounterKeys_Update",
"description": "Updates all the quota counter values specified with the existing quota counter key to a value in the specified service instance. This should be used for reset of the quota counter values.",
"x-ms-examples": {
"ApiManagementUpdateQuotaCounterKey": {
"$ref": "./examples/ApiManagementUpdateQuotaCounterKey.json"
}
},
"parameters": [
{
"$ref": "./apimanagement.json#/parameters/ResourceGroupNameParameter"
},
{
"$ref": "./apimanagement.json#/parameters/ServiceNameParameter"
},
{
"$ref": "#/parameters/QuotaCounterKeyParameter"
},
{
"name": "parameters",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/QuotaCounterValueContractProperties"
},
"description": "The value of the quota counter to be applied to all quota counter periods."
},
{
"$ref": "./apimanagement.json#/parameters/ApiVersionParameter"
},
{
"$ref": "./apimanagement.json#/parameters/SubscriptionIdParameter"
}
],
"responses": {
"204": {
"description": "Quota counter period was successfully updated."
},
"default": {
"description": "Error response describing why the operation failed.",
"schema": {
"$ref": "./apimanagement.json#/definitions/ErrorResponse"
}
}
}
}
},
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/quotas/{quotaCounterKey}/periods/{quotaPeriodKey}": {
"get": {
"tags": [
"QuotaByPeriodKeys"
],
"operationId": "QuotaByPeriodKeys_Get",
"description": "Gets the value of the quota counter associated with the counter-key in the policy for the specific period in service instance.",
"externalDocs": {
"url": "https://docs.microsoft.com/en-us/azure/api-management/api-management-howto-product-with-rules#a-namepolicies-ato-configure-call-rate-limit-and-quota-policies",
"description": "Document describing how to configure the quota policies."
},
"x-ms-examples": {
"ApiManagementGetQuotaCounteryKeysByQuotaPeriod": {
"$ref": "./examples/ApiManagementGetQuotaCounteryKeysByQuotaPeriod.json"
}
},
"parameters": [
{
"$ref": "./apimanagement.json#/parameters/SubscriptionIdParameter"
},
{
"$ref": "./apimanagement.json#/parameters/ResourceGroupNameParameter"
},
{
"$ref": "./apimanagement.json#/parameters/ServiceNameParameter"
},
{
"$ref": "#/parameters/QuotaCounterKeyParameter"
},
{
"$ref": "#/parameters/QuotaPeriodKeyParameter"
},
{
"$ref": "./apimanagement.json#/parameters/ApiVersionParameter"
}
],
"responses": {
"200": {
"description": "The response body contains the Quota counter details for the specified period.",
"schema": {
"$ref": "#/definitions/QuotaCounterContract"
}
},
"default": {
"description": "Error response describing why the operation failed.",
"schema": {
"$ref": "./apimanagement.json#/definitions/ErrorResponse"
}
}
}
},
"patch": {
"tags": [
"QuotaByPeriodKeys"
],
"operationId": "QuotaByPeriodKeys_Update",
"description": "Updates an existing quota counter value in the specified service instance.",
"x-ms-examples": {
"ApiManagementUpdateQuotaCounterKeyByQuotaPeriod": {
"$ref": "./examples/ApiManagementUpdateQuotaCounterKeyByQuotaPeriod.json"
}
},
"parameters": [
{
"$ref": "./apimanagement.json#/parameters/ResourceGroupNameParameter"
},
{
"$ref": "./apimanagement.json#/parameters/ServiceNameParameter"
},
{
"$ref": "#/parameters/QuotaCounterKeyParameter"
},
{
"$ref": "#/parameters/QuotaPeriodKeyParameter"
},
{
"name": "parameters",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/QuotaCounterValueContractProperties"
},
"description": "The value of the Quota counter to be applied on the specified period."
},
{
"$ref": "./apimanagement.json#/parameters/ApiVersionParameter"
},
{
"$ref": "./apimanagement.json#/parameters/SubscriptionIdParameter"
}
],
"responses": {
"204": {
"description": "The quota counter value was successfully updated."
},
"default": {
"description": "Error response describing why the operation failed.",
"schema": {
"$ref": "./apimanagement.json#/definitions/ErrorResponse"
}
}
}
}
}
},
"definitions": {
"QuotaCounterCollection": {
"properties": {
"value": {
"type": "array",
"items": {
"$ref": "#/definitions/QuotaCounterContract"
},
"description": "Quota counter values."
},
"count": {
"type": "integer",
"format": "int64",
"description": "Total record count number across all pages."
},
"nextLink": {
"type": "string",
"description": "Next page link if any."
}
},
"description": "Paged Quota Counter list representation."
},
"QuotaCounterContract": {
"properties": {
"counterKey": {
"type": "string",
"description": "The Key value of the Counter. Must not be empty.",
"minLength": 1
},
"periodKey": {
"type": "string",
"description": "Identifier of the Period for which the counter was collected. Must not be empty.",
"minLength": 1
},
"periodStartTime": {
"type": "string",
"format": "date-time",
"description": "The date of the start of Counter Period. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard.\n"
},
"periodEndTime": {
"type": "string",
"format": "date-time",
"description": "The date of the end of Counter Period. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard.\n"
},
"value": {
"$ref": "#/definitions/QuotaCounterValueContractProperties",
"description": "Quota Value Properties"
}
},
"required": [
"counterKey",
"periodKey",
"periodStartTime",
"periodEndTime"
],
"description": "Quota counter details."
},
"QuotaCounterValueContract": {
"properties": {
"value": {
"x-ms-client-flatten": true,
"$ref": "#/definitions/QuotaCounterValueContractProperties",
"description": "Quota counter Value Properties."
}
},
"description": "Quota counter value details."
},
"QuotaCounterValueContractProperties": {
"properties": {
"callsCount": {
"type": "integer",
"format": "int32",
"description": "Number of times Counter was called."
},
"kbTransferred": {
"type": "number",
"format": "double",
"description": "Data Transferred in KiloBytes."
}
},
"description": "Quota counter value details."
}
},
"parameters": {
"QuotaCounterKeyParameter": {
"name": "quotaCounterKey",
"in": "path",
"required": true,
"type": "string",
"description": "Quota counter key identifier.This is the result of expression defined in counter-key attribute of the quota-by-key policy.For Example, if you specify counter-key=\"boo\" in the policy, then its accessible by \"boo\" counter key. But if its defined as counter-key=\"@(\"b\"+\"a\")\" then it will be accessible by \"ba\" key",
"x-ms-parameter-location": "method"
},
"QuotaPeriodKeyParameter": {
"name": "quotaPeriodKey",
"in": "path",
"required": true,
"type": "string",
"description": "Quota period key identifier.",
"x-ms-parameter-location": "method"
}
}
}

Просмотреть файл

@ -0,0 +1,722 @@
{
"swagger": "2.0",
"info": {
"title": "ApiManagementClient",
"description": "Use these REST APIs to get the analytics reports associated with your Azure API Management deployment.",
"version": "2018-01-01"
},
"host": "management.azure.com",
"schemes": [
"https"
],
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"security": [
{
"azure_auth": [
"user_impersonation"
]
}
],
"securityDefinitions": {
"azure_auth": {
"type": "oauth2",
"authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize",
"flow": "implicit",
"description": "Azure Active Directory OAuth2 Flow.",
"scopes": {
"user_impersonation": "impersonate your user account"
}
}
},
"paths": {
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/reports/byApi": {
"get": {
"tags": [
"Reports"
],
"operationId": "Reports_ListByApi",
"description": "Lists report records by API.",
"x-ms-examples": {
"ApiManagementGetReportsByApi": {
"$ref": "./examples/ApiManagementGetReportsByApi.json"
}
},
"parameters": [
{
"$ref": "./apimanagement.json#/parameters/ResourceGroupNameParameter"
},
{
"$ref": "./apimanagement.json#/parameters/ServiceNameParameter"
},
{
"name": "$filter",
"in": "query",
"required": true,
"type": "string",
"description": "The filter to apply on the operation."
},
{
"$ref": "./apimanagement.json#/parameters/TopQueryParameter"
},
{
"$ref": "./apimanagement.json#/parameters/SkipQueryParameter"
},
{
"$ref": "./apimanagement.json#/parameters/ApiVersionParameter"
},
{
"$ref": "./apimanagement.json#/parameters/SubscriptionIdParameter"
}
],
"responses": {
"200": {
"description": "Lists a collection of Report record.",
"schema": {
"$ref": "#/definitions/ReportCollection"
}
}
},
"x-ms-pageable": {
"nextLinkName": "nextLink"
},
"x-ms-odata": "#/definitions/ReportRecordContract"
}
},
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/reports/byUser": {
"get": {
"tags": [
"Reports"
],
"operationId": "Reports_ListByUser",
"description": "Lists report records by User.",
"x-ms-examples": {
"ApiManagementGetReportsByUser": {
"$ref": "./examples/ApiManagementGetReportsByUser.json"
}
},
"parameters": [
{
"$ref": "./apimanagement.json#/parameters/ResourceGroupNameParameter"
},
{
"$ref": "./apimanagement.json#/parameters/ServiceNameParameter"
},
{
"name": "$filter",
"in": "query",
"required": true,
"type": "string",
"description": "The filter to apply on the operation."
},
{
"$ref": "./apimanagement.json#/parameters/TopQueryParameter"
},
{
"$ref": "./apimanagement.json#/parameters/SkipQueryParameter"
},
{
"$ref": "./apimanagement.json#/parameters/ApiVersionParameter"
},
{
"$ref": "./apimanagement.json#/parameters/SubscriptionIdParameter"
}
],
"responses": {
"200": {
"description": "Lists a collection of Report record.",
"schema": {
"$ref": "#/definitions/ReportCollection"
}
}
},
"x-ms-pageable": {
"nextLinkName": "nextLink"
},
"x-ms-odata": "#/definitions/ReportRecordContract"
}
},
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/reports/byOperation": {
"get": {
"tags": [
"Reports"
],
"operationId": "Reports_ListByOperation",
"description": "Lists report records by API Operations.",
"x-ms-examples": {
"ApiManagementGetReportsByOperation": {
"$ref": "./examples/ApiManagementGetReportsByOperation.json"
}
},
"parameters": [
{
"$ref": "./apimanagement.json#/parameters/ResourceGroupNameParameter"
},
{
"$ref": "./apimanagement.json#/parameters/ServiceNameParameter"
},
{
"name": "$filter",
"in": "query",
"required": true,
"type": "string",
"description": "The filter to apply on the operation."
},
{
"$ref": "./apimanagement.json#/parameters/TopQueryParameter"
},
{
"$ref": "./apimanagement.json#/parameters/SkipQueryParameter"
},
{
"$ref": "./apimanagement.json#/parameters/ApiVersionParameter"
},
{
"$ref": "./apimanagement.json#/parameters/SubscriptionIdParameter"
}
],
"responses": {
"200": {
"description": "Lists a collection of Report record.",
"schema": {
"$ref": "#/definitions/ReportCollection"
}
}
},
"x-ms-pageable": {
"nextLinkName": "nextLink"
},
"x-ms-odata": "#/definitions/ReportRecordContract"
}
},
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/reports/byProduct": {
"get": {
"tags": [
"Reports"
],
"operationId": "Reports_ListByProduct",
"description": "Lists report records by Product.",
"x-ms-examples": {
"ApiManagementGetReportsByProduct": {
"$ref": "./examples/ApiManagementGetReportsByProduct.json"
}
},
"parameters": [
{
"$ref": "./apimanagement.json#/parameters/ResourceGroupNameParameter"
},
{
"$ref": "./apimanagement.json#/parameters/ServiceNameParameter"
},
{
"name": "$filter",
"in": "query",
"required": true,
"type": "string",
"description": "The filter to apply on the operation."
},
{
"$ref": "./apimanagement.json#/parameters/TopQueryParameter"
},
{
"$ref": "./apimanagement.json#/parameters/SkipQueryParameter"
},
{
"$ref": "./apimanagement.json#/parameters/ApiVersionParameter"
},
{
"$ref": "./apimanagement.json#/parameters/SubscriptionIdParameter"
}
],
"responses": {
"200": {
"description": "Lists a collection of Report record.",
"schema": {
"$ref": "#/definitions/ReportCollection"
}
}
},
"x-ms-pageable": {
"nextLinkName": "nextLink"
},
"x-ms-odata": "#/definitions/ReportRecordContract"
}
},
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/reports/byGeo": {
"get": {
"tags": [
"Reports"
],
"operationId": "Reports_ListByGeo",
"description": "Lists report records by GeoGraphy.",
"x-ms-examples": {
"ApiManagementGetReportsByGeo": {
"$ref": "./examples/ApiManagementGetReportsByGeo.json"
}
},
"parameters": [
{
"$ref": "./apimanagement.json#/parameters/ResourceGroupNameParameter"
},
{
"$ref": "./apimanagement.json#/parameters/ServiceNameParameter"
},
{
"name": "$filter",
"in": "query",
"required": false,
"type": "string",
"description": "The filter to apply on the operation."
},
{
"$ref": "./apimanagement.json#/parameters/TopQueryParameter"
},
{
"$ref": "./apimanagement.json#/parameters/SkipQueryParameter"
},
{
"$ref": "./apimanagement.json#/parameters/ApiVersionParameter"
},
{
"$ref": "./apimanagement.json#/parameters/SubscriptionIdParameter"
}
],
"responses": {
"200": {
"description": "Lists a collection of Report record.",
"schema": {
"$ref": "#/definitions/ReportCollection"
}
}
},
"x-ms-pageable": {
"nextLinkName": "nextLink"
},
"x-ms-odata": "#/definitions/ReportRecordContract"
}
},
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/reports/bySubscription": {
"get": {
"tags": [
"Reports"
],
"operationId": "Reports_ListBySubscription",
"description": "Lists report records by subscription.",
"x-ms-examples": {
"ApiManagementGetReportsBySubscription": {
"$ref": "./examples/ApiManagementGetReportsBySubscription.json"
}
},
"parameters": [
{
"$ref": "./apimanagement.json#/parameters/ResourceGroupNameParameter"
},
{
"$ref": "./apimanagement.json#/parameters/ServiceNameParameter"
},
{
"name": "$filter",
"in": "query",
"required": false,
"type": "string",
"description": "The filter to apply on the operation."
},
{
"$ref": "./apimanagement.json#/parameters/TopQueryParameter"
},
{
"$ref": "./apimanagement.json#/parameters/SkipQueryParameter"
},
{
"$ref": "./apimanagement.json#/parameters/ApiVersionParameter"
},
{
"$ref": "./apimanagement.json#/parameters/SubscriptionIdParameter"
}
],
"responses": {
"200": {
"description": "Lists a collection of Report record.",
"schema": {
"$ref": "#/definitions/ReportCollection"
}
}
},
"x-ms-pageable": {
"nextLinkName": "nextLink"
},
"x-ms-odata": "#/definitions/ReportRecordContract"
}
},
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/reports/byTime": {
"get": {
"tags": [
"Reports"
],
"operationId": "Reports_ListByTime",
"description": "Lists report records by Time.",
"x-ms-examples": {
"ApiManagementGetReportsByTime": {
"$ref": "./examples/ApiManagementGetReportsByTime.json"
}
},
"parameters": [
{
"$ref": "./apimanagement.json#/parameters/ResourceGroupNameParameter"
},
{
"$ref": "./apimanagement.json#/parameters/ServiceNameParameter"
},
{
"name": "$filter",
"in": "query",
"required": false,
"type": "string",
"description": "The filter to apply on the operation."
},
{
"$ref": "./apimanagement.json#/parameters/TopQueryParameter"
},
{
"$ref": "./apimanagement.json#/parameters/SkipQueryParameter"
},
{
"name": "interval",
"in": "query",
"required": true,
"type": "string",
"format": "duration",
"description": "By time interval. Interval must be multiple of 15 minutes and may not be zero. The value should be in ISO 8601 format (http://en.wikipedia.org/wiki/ISO_8601#Durations).This code can be used to convert TimeSpan to a valid interval string: XmlConvert.ToString(new TimeSpan(hours, minutes, secconds))"
},
{
"$ref": "./apimanagement.json#/parameters/ApiVersionParameter"
},
{
"$ref": "./apimanagement.json#/parameters/SubscriptionIdParameter"
}
],
"responses": {
"200": {
"description": "Lists a collection of Report record.",
"schema": {
"$ref": "#/definitions/ReportCollection"
}
}
},
"x-ms-pageable": {
"nextLinkName": "nextLink"
},
"x-ms-odata": "#/definitions/ReportRecordContract"
}
},
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/reports/byRequest": {
"get": {
"tags": [
"Reports"
],
"operationId": "Reports_ListByRequest",
"description": "Lists report records by Request.",
"x-ms-examples": {
"ApiManagementGetReportsByRequest": {
"$ref": "./examples/ApiManagementGetReportsByRequest.json"
}
},
"parameters": [
{
"$ref": "./apimanagement.json#/parameters/ResourceGroupNameParameter"
},
{
"$ref": "./apimanagement.json#/parameters/ServiceNameParameter"
},
{
"name": "$filter",
"in": "query",
"required": true,
"type": "string",
"description": "The filter to apply on the operation."
},
{
"$ref": "./apimanagement.json#/parameters/TopQueryParameter"
},
{
"$ref": "./apimanagement.json#/parameters/SkipQueryParameter"
},
{
"$ref": "./apimanagement.json#/parameters/ApiVersionParameter"
},
{
"$ref": "./apimanagement.json#/parameters/SubscriptionIdParameter"
}
],
"responses": {
"200": {
"description": "Lists a collection of Report record.",
"schema": {
"$ref": "#/definitions/RequestReportCollection"
}
}
},
"x-ms-pageable": {
"nextLinkName": null
},
"x-ms-odata": "#/definitions/RequestReportRecordContract"
}
}
},
"definitions": {
"ReportCollection": {
"properties": {
"value": {
"type": "array",
"items": {
"$ref": "#/definitions/ReportRecordContract"
},
"description": "Page values."
},
"count": {
"type": "integer",
"format": "int64",
"description": "Total record count number across all pages."
},
"nextLink": {
"type": "string",
"description": "Next page link if any."
}
},
"description": "Paged Report records list representation."
},
"ReportRecordContract": {
"properties": {
"name": {
"type": "string",
"description": "Name depending on report endpoint specifies product, API, operation or developer name."
},
"timestamp": {
"type": "string",
"format": "date-time",
"description": "Start of aggregation period. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard.\n"
},
"interval": {
"type": "string",
"description": "Length of agregation period. Interval must be multiple of 15 minutes and may not be zero. The value should be in ISO 8601 format (http://en.wikipedia.org/wiki/ISO_8601#Durations)."
},
"country": {
"type": "string",
"description": "Country to which this record data is related."
},
"region": {
"type": "string",
"description": "Country region to which this record data is related."
},
"zip": {
"type": "string",
"description": "Zip code to which this record data is related."
},
"userId": {
"readOnly": true,
"type": "string",
"description": "User identifier path. /users/{userId}"
},
"productId": {
"readOnly": true,
"type": "string",
"description": "Product identifier path. /products/{productId}"
},
"apiId": {
"type": "string",
"description": "API identifier path. /apis/{apiId}"
},
"operationId": {
"type": "string",
"description": "Operation identifier path. /apis/{apiId}/operations/{operationId}"
},
"apiRegion": {
"type": "string",
"description": "API region identifier."
},
"subscriptionId": {
"type": "string",
"description": "Subscription identifier path. /subscriptions/{subscriptionId}"
},
"callCountSuccess": {
"type": "integer",
"format": "int32",
"description": "Number of succesful calls. This includes calls returning HttpStatusCode <= 301 and HttpStatusCode.NotModified and HttpStatusCode.TemporaryRedirect"
},
"callCountBlocked": {
"type": "integer",
"format": "int32",
"description": "Number of calls blocked due to invalid credentials. This includes calls returning HttpStatusCode.Unauthorize and HttpStatusCode.Forbidden and HttpStatusCode.TooManyRequests"
},
"callCountFailed": {
"type": "integer",
"format": "int32",
"description": "Number of calls failed due to proxy or backend errors. This includes calls returning HttpStatusCode.BadRequest(400) and any Code between HttpStatusCode.InternalServerError (500) and 600"
},
"callCountOther": {
"type": "integer",
"format": "int32",
"description": "Number of other calls."
},
"callCountTotal": {
"type": "integer",
"format": "int32",
"description": "Total number of calls."
},
"bandwidth": {
"type": "integer",
"format": "int64",
"description": "Bandwidth consumed."
},
"cacheHitCount": {
"type": "integer",
"format": "int32",
"description": "Number of times when content was served from cache policy."
},
"cacheMissCount": {
"type": "integer",
"format": "int32",
"description": "Number of times content was fetched from backend."
},
"apiTimeAvg": {
"type": "number",
"format": "double",
"description": "Average time it took to process request."
},
"apiTimeMin": {
"type": "number",
"format": "double",
"description": "Minimum time it took to process request."
},
"apiTimeMax": {
"type": "number",
"format": "double",
"description": "Maximum time it took to process request."
},
"serviceTimeAvg": {
"type": "number",
"format": "double",
"description": "Average time it took to process request on backend."
},
"serviceTimeMin": {
"type": "number",
"format": "double",
"description": "Minimum time it took to process request on backend."
},
"serviceTimeMax": {
"type": "number",
"format": "double",
"description": "Maximum time it took to process request on backend."
}
},
"description": "Report data."
},
"RequestReportCollection": {
"properties": {
"value": {
"type": "array",
"items": {
"$ref": "#/definitions/RequestReportRecordContract"
},
"description": "Page values."
},
"count": {
"type": "integer",
"format": "int64",
"description": "Total record count number across all pages."
}
},
"description": "Paged Report records list representation."
},
"RequestReportRecordContract": {
"properties": {
"apiId": {
"type": "string",
"description": "API identifier path. /apis/{apiId}"
},
"operationId": {
"type": "string",
"description": "Operation identifier path. /apis/{apiId}/operations/{operationId}"
},
"productId": {
"readOnly": true,
"type": "string",
"description": "Product identifier path. /products/{productId}"
},
"userId": {
"readOnly": true,
"type": "string",
"description": "User identifier path. /users/{userId}"
},
"method": {
"type": "string",
"description": "The HTTP method associated with this request.."
},
"url": {
"type": "string",
"description": "The full URL associated with this request."
},
"ipAddress": {
"type": "string",
"description": "The client IP address associated with this request."
},
"backendResponseCode": {
"type": "string",
"description": "The HTTP status code received by the gateway as a result of forwarding this request to the backend."
},
"responseCode": {
"type": "integer",
"format": "int32",
"description": "The HTTP status code returned by the gateway."
},
"responseSize": {
"type": "integer",
"format": "int32",
"description": "The size of the response returned by the gateway."
},
"timestamp": {
"type": "string",
"format": "date-time",
"description": "The date and time when this request was received by the gateway in ISO 8601 format."
},
"cache": {
"type": "string",
"description": "Specifies if response cache was involved in generating the response. If the value is none, the cache was not used. If the value is hit, cached response was returned. If the value is miss, the cache was used but lookup resulted in a miss and request was fullfilled by the backend."
},
"apiTime": {
"type": "number",
"format": "double",
"description": "The total time it took to process this request."
},
"serviceTime": {
"type": "number",
"format": "double",
"description": "he time it took to forward this request to the backend and get the response back."
},
"apiRegion": {
"type": "string",
"description": "Azure region where the gateway that processed this request is located."
},
"subscriptionId": {
"type": "string",
"description": "Subscription identifier path. /subscriptions/{subscriptionId}"
},
"requestId": {
"type": "string",
"description": "Request Identifier."
},
"requestSize": {
"type": "integer",
"format": "int32",
"description": "The size of this request.."
}
},
"description": "Request Report data."
}
},
"parameters": {}
}

Просмотреть файл

@ -0,0 +1,706 @@
{
"swagger": "2.0",
"info": {
"title": "ApiManagementClient",
"description": "Use these REST APIs for performing operations on Subscription entity associated with your Azure API Management deployment. The Subscription entity represents the association between a user and a product in API Management. Products contain one or more APIs, and once a product is published, developers can subscribe to the product and begin to use the products APIs.",
"version": "2018-01-01"
},
"host": "management.azure.com",
"schemes": [
"https"
],
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"security": [
{
"azure_auth": [
"user_impersonation"
]
}
],
"securityDefinitions": {
"azure_auth": {
"type": "oauth2",
"authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize",
"flow": "implicit",
"description": "Azure Active Directory OAuth2 Flow.",
"scopes": {
"user_impersonation": "impersonate your user account"
}
}
},
"paths": {
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/subscriptions": {
"get": {
"tags": [
"Subscriptions"
],
"operationId": "Subscription_List",
"description": "Lists all subscriptions of the API Management service instance.",
"x-ms-examples": {
"ApiManagementListSubscriptions": {
"$ref": "./examples/ApiManagementListSubscriptions.json"
}
},
"parameters": [
{
"$ref": "./apimanagement.json#/parameters/ResourceGroupNameParameter"
},
{
"$ref": "./apimanagement.json#/parameters/ServiceNameParameter"
},
{
"name": "$filter",
"in": "query",
"required": false,
"type": "string",
"description": "| Field | Supported operators | Supported functions |\n|--------------|------------------------|---------------------------------------------|\n| id | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |\n| name | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |\n| stateComment | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |\n| userId | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |\n| productId | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |\n| state | eq | |"
},
{
"$ref": "./apimanagement.json#/parameters/TopQueryParameter"
},
{
"$ref": "./apimanagement.json#/parameters/SkipQueryParameter"
},
{
"$ref": "./apimanagement.json#/parameters/ApiVersionParameter"
},
{
"$ref": "./apimanagement.json#/parameters/SubscriptionIdParameter"
}
],
"responses": {
"200": {
"description": "A collection of the Subscription entities for the specified API Management service instance.",
"schema": {
"$ref": "#/definitions/SubscriptionCollection"
}
},
"default": {
"description": "Error response describing why the operation failed.",
"schema": {
"$ref": "./apimanagement.json#/definitions/ErrorResponse"
}
}
},
"x-ms-pageable": {
"nextLinkName": "nextLink"
},
"x-ms-odata": "#/definitions/SubscriptionContract"
}
},
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/subscriptions/{sid}": {
"head": {
"tags": [
"Subscriptions"
],
"operationId": "Subscription_GetEntityTag",
"description": "Gets the entity state (Etag) version of the apimanagement subscription specified by its identifier.",
"x-ms-examples": {
"ApiManagementHeadSubscription": {
"$ref": "./examples/ApiManagementHeadSubscription.json"
}
},
"parameters": [
{
"$ref": "./apimanagement.json#/parameters/ResourceGroupNameParameter"
},
{
"$ref": "./apimanagement.json#/parameters/ServiceNameParameter"
},
{
"$ref": "#/parameters/SubscriptionEntityIdParameter"
},
{
"$ref": "./apimanagement.json#/parameters/ApiVersionParameter"
},
{
"$ref": "./apimanagement.json#/parameters/SubscriptionIdParameter"
}
],
"responses": {
"200": {
"description": "Specified apimanagement subscription entity exists and current entity state version is present in the ETag header.",
"headers": {
"ETag": {
"description": "Current entity state version. Should be treated as opaque and used to make conditional HTTP requests.",
"type": "string"
}
}
},
"default": {
"description": "Error response describing why the operation failed.",
"schema": {
"$ref": "./apimanagement.json#/definitions/ErrorResponse"
}
}
}
},
"get": {
"tags": [
"Subscriptions"
],
"operationId": "Subscription_Get",
"description": "Gets the specified Subscription entity.",
"x-ms-examples": {
"ApiManagementGetSubscription": {
"$ref": "./examples/ApiManagementGetSubscription.json"
}
},
"parameters": [
{
"$ref": "./apimanagement.json#/parameters/ResourceGroupNameParameter"
},
{
"$ref": "./apimanagement.json#/parameters/ServiceNameParameter"
},
{
"$ref": "#/parameters/SubscriptionEntityIdParameter"
},
{
"$ref": "./apimanagement.json#/parameters/ApiVersionParameter"
},
{
"$ref": "./apimanagement.json#/parameters/SubscriptionIdParameter"
}
],
"responses": {
"200": {
"description": "The response body contains the specified Subscription entity.",
"schema": {
"$ref": "#/definitions/SubscriptionContract"
},
"headers": {
"ETag": {
"description": "Current entity state version. Should be treated as opaque and used to make conditional HTTP requests.",
"type": "string"
}
}
},
"default": {
"description": "Error response describing why the operation failed.",
"schema": {
"$ref": "./apimanagement.json#/definitions/ErrorResponse"
}
}
}
},
"put": {
"tags": [
"Subscriptions"
],
"operationId": "Subscription_CreateOrUpdate",
"description": "Creates or updates the subscription of specified user to the specified product.",
"x-ms-examples": {
"ApiManagementCreateSubscription": {
"$ref": "./examples/ApiManagementCreateSubscription.json"
}
},
"parameters": [
{
"$ref": "./apimanagement.json#/parameters/ResourceGroupNameParameter"
},
{
"$ref": "./apimanagement.json#/parameters/ServiceNameParameter"
},
{
"$ref": "#/parameters/SubscriptionEntityIdParameter"
},
{
"name": "parameters",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/SubscriptionCreateParameters"
},
"description": "Create parameters."
},
{
"$ref": "#/parameters/NotifySubscriptionStateChangeParameter"
},
{
"$ref": "./apimanagement.json#/parameters/IfMatchOptionalParameter"
},
{
"$ref": "./apimanagement.json#/parameters/ApiVersionParameter"
},
{
"$ref": "./apimanagement.json#/parameters/SubscriptionIdParameter"
}
],
"responses": {
"201": {
"description": "The user was successfully subscribed to the product.",
"schema": {
"$ref": "#/definitions/SubscriptionContract"
}
},
"200": {
"description": "The user already subscribed to the product.",
"schema": {
"$ref": "#/definitions/SubscriptionContract"
}
},
"default": {
"description": "Error response describing why the operation failed.",
"schema": {
"$ref": "./apimanagement.json#/definitions/ErrorResponse"
}
}
}
},
"patch": {
"tags": [
"Subscriptions"
],
"operationId": "Subscription_Update",
"description": "Updates the details of a subscription specificied by its identifier.",
"x-ms-examples": {
"ApiManagementUpdateSubscription": {
"$ref": "./examples/ApiManagementUpdateSubscription.json"
}
},
"parameters": [
{
"$ref": "./apimanagement.json#/parameters/ResourceGroupNameParameter"
},
{
"$ref": "./apimanagement.json#/parameters/ServiceNameParameter"
},
{
"$ref": "#/parameters/SubscriptionEntityIdParameter"
},
{
"name": "parameters",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/SubscriptionUpdateParameters"
},
"description": "Update parameters."
},
{
"$ref": "#/parameters/NotifySubscriptionStateChangeParameter"
},
{
"$ref": "./apimanagement.json#/parameters/IfMatchRequiredParameter"
},
{
"$ref": "./apimanagement.json#/parameters/ApiVersionParameter"
},
{
"$ref": "./apimanagement.json#/parameters/SubscriptionIdParameter"
}
],
"responses": {
"204": {
"description": "The subscription details were successfully updated."
},
"default": {
"description": "Error response describing why the operation failed.",
"schema": {
"$ref": "./apimanagement.json#/definitions/ErrorResponse"
}
}
}
},
"delete": {
"tags": [
"Subscriptions"
],
"operationId": "Subscription_Delete",
"description": "Deletes the specified subscription.",
"x-ms-examples": {
"ApiManagementDeleteSubscription": {
"$ref": "./examples/ApiManagementDeleteSubscription.json"
}
},
"parameters": [
{
"$ref": "./apimanagement.json#/parameters/ResourceGroupNameParameter"
},
{
"$ref": "./apimanagement.json#/parameters/ServiceNameParameter"
},
{
"$ref": "#/parameters/SubscriptionEntityIdParameter"
},
{
"$ref": "./apimanagement.json#/parameters/IfMatchRequiredParameter"
},
{
"$ref": "./apimanagement.json#/parameters/ApiVersionParameter"
},
{
"$ref": "./apimanagement.json#/parameters/SubscriptionIdParameter"
}
],
"responses": {
"200": {
"description": "The subscription details were successfully deleted."
},
"204": {
"description": "The subscription details were successfully deleted."
},
"default": {
"description": "Error response describing why the operation failed.",
"schema": {
"$ref": "./apimanagement.json#/definitions/ErrorResponse"
}
}
}
}
},
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/subscriptions/{sid}/regeneratePrimaryKey": {
"post": {
"tags": [
"Subscriptions"
],
"operationId": "Subscription_RegeneratePrimaryKey",
"description": "Regenerates primary key of existing subscription of the API Management service instance.",
"x-ms-examples": {
"ApiManagementSubscriptionRegenerateKey": {
"$ref": "./examples/ApiManagementSubscriptionRegenerateKey.json"
}
},
"parameters": [
{
"$ref": "./apimanagement.json#/parameters/ResourceGroupNameParameter"
},
{
"$ref": "./apimanagement.json#/parameters/ServiceNameParameter"
},
{
"$ref": "#/parameters/SubscriptionEntityIdParameter"
},
{
"$ref": "./apimanagement.json#/parameters/ApiVersionParameter"
},
{
"$ref": "./apimanagement.json#/parameters/SubscriptionIdParameter"
}
],
"responses": {
"204": {
"description": "The primary key was successfully regenerated."
},
"default": {
"description": "Error response describing why the operation failed.",
"schema": {
"$ref": "./apimanagement.json#/definitions/ErrorResponse"
}
}
}
}
},
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/subscriptions/{sid}/regenerateSecondaryKey": {
"post": {
"tags": [
"Subscriptions"
],
"operationId": "Subscription_RegenerateSecondaryKey",
"description": "Regenerates secondary key of existing subscription of the API Management service instance.",
"x-ms-examples": {
"ApiManagementSubscriptionRegenerateKey": {
"$ref": "./examples/ApiManagementSubscriptionRegenerateKey.json"
}
},
"parameters": [
{
"$ref": "./apimanagement.json#/parameters/ResourceGroupNameParameter"
},
{
"$ref": "./apimanagement.json#/parameters/ServiceNameParameter"
},
{
"$ref": "#/parameters/SubscriptionEntityIdParameter"
},
{
"$ref": "./apimanagement.json#/parameters/ApiVersionParameter"
},
{
"$ref": "./apimanagement.json#/parameters/SubscriptionIdParameter"
}
],
"responses": {
"204": {
"description": "The secondary key was successfully regenerated."
},
"default": {
"description": "Error response describing why the operation failed.",
"schema": {
"$ref": "./apimanagement.json#/definitions/ErrorResponse"
}
}
}
}
}
},
"definitions": {
"SubscriptionCollection": {
"properties": {
"value": {
"type": "array",
"items": {
"$ref": "#/definitions/SubscriptionContract"
},
"description": "Page values."
},
"nextLink": {
"type": "string",
"description": "Next page link if any."
}
},
"description": "Paged Subscriptions list representation."
},
"SubscriptionContract": {
"properties": {
"properties": {
"x-ms-client-flatten": true,
"$ref": "#/definitions/SubscriptionContractProperties",
"description": "Subscription contract properties."
}
},
"allOf": [
{
"$ref": "./apimanagement.json#/definitions/Resource"
}
],
"description": "Subscription details."
},
"SubscriptionContractProperties": {
"properties": {
"userId": {
"type": "string",
"description": "The user resource identifier of the subscription owner. The value is a valid relative URL in the format of /users/{uid} where {uid} is a user identifier."
},
"productId": {
"type": "string",
"description": "The product resource identifier of the subscribed product. The value is a valid relative URL in the format of /products/{productId} where {productId} is a product identifier."
},
"displayName": {
"type": "string",
"description": "The name of the subscription, or null if the subscription has no name.",
"minLength": 0,
"maxLength": 100
},
"state": {
"type": "string",
"description": "Subscription state. Possible states are * active – the subscription is active, * suspended – the subscription is blocked, and the subscriber cannot call any APIs of the product, * submitted – the subscription request has been made by the developer, but has not yet been approved or rejected, * rejected – the subscription request has been denied by an administrator, * cancelled – the subscription has been cancelled by the developer or administrator, * expired – the subscription reached its expiration date and was deactivated.",
"enum": [
"suspended",
"active",
"expired",
"submitted",
"rejected",
"cancelled"
],
"x-ms-enum": {
"name": "SubscriptionState",
"modelAsString": false
}
},
"createdDate": {
"type": "string",
"format": "date-time",
"description": "Subscription creation date. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard.\n",
"readOnly": true
},
"startDate": {
"type": "string",
"format": "date-time",
"description": "Subscription activation date. The setting is for audit purposes only and the subscription is not automatically activated. The subscription lifecycle can be managed by using the `state` property. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard.\n"
},
"expirationDate": {
"type": "string",
"format": "date-time",
"description": "Subscription expiration date. The setting is for audit purposes only and the subscription is not automatically expired. The subscription lifecycle can be managed by using the `state` property. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard.\n"
},
"endDate": {
"type": "string",
"format": "date-time",
"description": "Date when subscription was cancelled or expired. The setting is for audit purposes only and the subscription is not automatically cancelled. The subscription lifecycle can be managed by using the `state` property. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard.\n"
},
"notificationDate": {
"type": "string",
"format": "date-time",
"description": "Upcoming subscription expiration notification date. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard.\n"
},
"primaryKey": {
"type": "string",
"description": "Subscription primary key.",
"minLength": 1,
"maxLength": 256
},
"secondaryKey": {
"type": "string",
"description": "Subscription secondary key.",
"minLength": 1,
"maxLength": 256
},
"stateComment": {
"type": "string",
"description": "Optional subscription comment added by an administrator."
}
},
"required": [
"userId",
"productId",
"state",
"primaryKey",
"secondaryKey"
],
"description": "Subscription details."
},
"SubscriptionCreateParameters": {
"properties": {
"properties": {
"x-ms-client-flatten": true,
"$ref": "#/definitions/SubscriptionCreateParameterProperties",
"description": "Subscription contract properties."
}
},
"description": "Subscription create details."
},
"SubscriptionCreateParameterProperties": {
"properties": {
"userId": {
"type": "string",
"description": "User (user id path) for whom subscription is being created in form /users/{uid}"
},
"productId": {
"type": "string",
"description": "Product (product id path) for which subscription is being created in form /products/{productid}"
},
"displayName": {
"type": "string",
"description": "Subscription name.",
"minLength": 1,
"maxLength": 100
},
"primaryKey": {
"type": "string",
"description": "Primary subscription key. If not specified during request key will be generated automatically.",
"minLength": 1,
"maxLength": 256
},
"secondaryKey": {
"type": "string",
"description": "Secondary subscription key. If not specified during request key will be generated automatically.",
"minLength": 1,
"maxLength": 256
},
"state": {
"type": "string",
"description": "Initial subscription state. If no value is specified, subscription is created with Submitted state. Possible states are * active – the subscription is active, * suspended – the subscription is blocked, and the subscriber cannot call any APIs of the product, * submitted – the subscription request has been made by the developer, but has not yet been approved or rejected, * rejected – the subscription request has been denied by an administrator, * cancelled – the subscription has been cancelled by the developer or administrator, * expired – the subscription reached its expiration date and was deactivated.",
"enum": [
"suspended",
"active",
"expired",
"submitted",
"rejected",
"cancelled"
],
"x-ms-enum": {
"name": "SubscriptionState",
"modelAsString": false
}
}
},
"required": [
"userId",
"productId",
"displayName"
],
"description": "Parameters supplied to the Create subscription operation."
},
"SubscriptionUpdateParameters": {
"properties": {
"properties": {
"x-ms-client-flatten": true,
"$ref": "#/definitions/SubscriptionUpdateParameterProperties",
"description": "Subscription Update contract properties."
}
},
"description": "Subscription update details."
},
"SubscriptionUpdateParameterProperties": {
"properties": {
"userId": {
"type": "string",
"description": "User identifier path: /users/{uid}"
},
"productId": {
"type": "string",
"description": "Product identifier path: /products/{productId}"
},
"expirationDate": {
"type": "string",
"format": "date-time",
"description": "Subscription expiration date. The setting is for audit purposes only and the subscription is not automatically expired. The subscription lifecycle can be managed by using the `state` property. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard."
},
"displayName": {
"type": "string",
"description": "Subscription name."
},
"primaryKey": {
"type": "string",
"description": "Primary subscription key.",
"minLength": 1,
"maxLength": 256
},
"secondaryKey": {
"type": "string",
"description": "Secondary subscription key.",
"minLength": 1,
"maxLength": 256
},
"state": {
"type": "string",
"description": "Subscription state. Possible states are * active – the subscription is active, * suspended – the subscription is blocked, and the subscriber cannot call any APIs of the product, * submitted – the subscription request has been made by the developer, but has not yet been approved or rejected, * rejected – the subscription request has been denied by an administrator, * cancelled – the subscription has been cancelled by the developer or administrator, * expired – the subscription reached its expiration date and was deactivated.",
"enum": [
"suspended",
"active",
"expired",
"submitted",
"rejected",
"cancelled"
],
"x-ms-enum": {
"name": "SubscriptionState",
"modelAsString": false
}
},
"stateComment": {
"type": "string",
"description": "Comments describing subscription state change by the administrator."
}
},
"description": "Parameters supplied to the Update subscription operation."
}
},
"parameters": {
"SubscriptionEntityIdParameter": {
"name": "sid",
"in": "path",
"required": true,
"type": "string",
"description": "Subscription entity Identifier. The entity represents the association between a user and a product in API Management.",
"maxLength": 80,
"pattern": "(^[\\w]+$)|(^[\\w][\\w\\-]+[\\w]$)",
"x-ms-parameter-location": "method"
},
"NotifySubscriptionStateChangeParameter": {
"name": "notify",
"in": "query",
"required": false,
"type": "boolean",
"description": "Notify change in Subscription State. \n - If false, do not send any email notification for change of state of subscription \n - If true, send email notification of change of state of subscription ",
"x-ms-parameter-location": "method"
}
}
}

Просмотреть файл

@ -0,0 +1,270 @@
{
"swagger": "2.0",
"info": {
"title": "ApiManagementClient",
"description": "Use these REST APIs for queuering APIs. Operations and Products by tags in your Azure API Management deployment.",
"version": "2018-01-01"
},
"host": "management.azure.com",
"schemes": [
"https"
],
"consumes": [],
"produces": [
"application/json"
],
"security": [
{
"azure_auth": [
"user_impersonation"
]
}
],
"securityDefinitions": {
"azure_auth": {
"type": "oauth2",
"authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize",
"flow": "implicit",
"description": "Azure Active Directory OAuth2 Flow.",
"scopes": {
"user_impersonation": "impersonate your user account"
}
}
},
"paths": {
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tagResources": {
"get": {
"tags": [
"TagResources"
],
"operationId": "TagResource_ListByService",
"description": "Lists a collection of resources associated with tags.",
"x-ms-examples": {
"ApiManagementListTagResources": {
"$ref": "./examples/ApiManagementListTagResources.json"
}
},
"parameters": [
{
"$ref": "./apimanagement.json#/parameters/ResourceGroupNameParameter"
},
{
"$ref": "./apimanagement.json#/parameters/ServiceNameParameter"
},
{
"name": "$filter",
"in": "query",
"required": false,
"type": "string",
"description": "| Field | Supported operators | Supported functions |\n|-------------|------------------------|---------------------------------------------|\n| id | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |\n| name | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |\n| aid | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |\n| apiName | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |\n| apiRevision | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |\n| path | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |\n| description | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |\n| serviceUrl | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |\n| method | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |\n| urlTemplate | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |\n| terms | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |\n| state | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |\n| isCurrent | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |"
},
{
"$ref": "./apimanagement.json#/parameters/TopQueryParameter"
},
{
"$ref": "./apimanagement.json#/parameters/SkipQueryParameter"
},
{
"$ref": "./apimanagement.json#/parameters/ApiVersionParameter"
},
{
"$ref": "./apimanagement.json#/parameters/SubscriptionIdParameter"
}
],
"responses": {
"200": {
"description": "Lists a collection of TagResource entities.",
"schema": {
"$ref": "#/definitions/TagResourceCollection"
}
}
},
"x-ms-pageable": {
"nextLinkName": "nextLink"
},
"x-ms-odata": "#/definitions/TagResourceContract"
}
}
},
"definitions": {
"TagResourceCollection": {
"properties": {
"value": {
"type": "array",
"items": {
"$ref": "#/definitions/TagResourceContract"
},
"description": "Page values."
},
"count": {
"type": "integer",
"format": "int64",
"description": "Total record count number across all pages."
},
"nextLink": {
"type": "string",
"description": "Next page link if any."
}
},
"description": "Paged Tag list representation."
},
"TagResourceContract": {
"properties": {
"tag": {
"$ref": "#/definitions/TagTagResourceContractProperties",
"description": "Tag associated with the resource."
},
"api": {
"$ref": "#/definitions/ApiTagResourceContractProperties",
"description": "Api associated with the tag."
},
"operation": {
"$ref": "#/definitions/OperationTagResourceContractProperties",
"description": "Operation associated with the tag."
},
"product": {
"$ref": "#/definitions/ProductTagResourceContractProperties",
"description": "Product associated with the tag."
}
},
"required": [
"tag"
],
"description": "TagResource contract properties."
},
"TagTagResourceContractProperties": {
"properties": {
"id": {
"type": "string",
"description": "Tag identifier"
},
"name": {
"type": "string",
"description": "Tag Name",
"minLength": 1,
"maxLength": 160
}
},
"description": "Contract defining the Tag property in the Tag Resource Contract"
},
"ApiTagResourceContractProperties": {
"properties": {
"id": {
"type": "string",
"description": "API identifier in the form /apis/{apiId}."
},
"name": {
"type": "string",
"description": "API name.",
"minLength": 1,
"maxLength": 300
},
"serviceUrl": {
"type": "string",
"description": "Absolute URL of the backend service implementing this API.",
"minLength": 1,
"maxLength": 2000
},
"path": {
"type": "string",
"description": "Relative URL uniquely identifying this API and all of its resource paths within the API Management service instance. It is appended to the API endpoint base URL specified during the service instance creation to form a public URL for this API.",
"minLength": 0,
"maxLength": 400
},
"protocols": {
"type": "array",
"items": {
"type": "string",
"enum": [
"http",
"https"
],
"x-ms-enum": {
"name": "Protocol",
"modelAsString": false
}
},
"description": "Describes on which protocols the operations in this API can be invoked."
}
},
"allOf": [
{
"$ref": "./apimapis.json#/definitions/ApiEntityBaseContract"
}
],
"description": "API contract properties for the Tag Resources."
},
"ProductTagResourceContractProperties": {
"properties": {
"id": {
"type": "string",
"description": "Identifier of the product in the form of /products/{productId}"
},
"name": {
"type": "string",
"description": "Product name.",
"minLength": 1,
"maxLength": 300
}
},
"allOf": [
{
"$ref": "./apimproducts.json#/definitions/ProductEntityBaseParameters"
}
],
"required": [
"name"
],
"description": "Product profile."
},
"OperationTagResourceContractProperties": {
"properties": {
"id": {
"type": "string",
"description": "Identifier of the operation in form /operations/{operationId}."
},
"name": {
"type": "string",
"description": "Operation name.",
"readOnly": true
},
"apiName": {
"type": "string",
"description": "Api Name.",
"readOnly": true
},
"apiRevision": {
"type": "string",
"description": "Api Revision.",
"readOnly": true
},
"apiVersion": {
"type": "string",
"description": "Api Version.",
"readOnly": true
},
"description": {
"type": "string",
"description": "Operation Description.",
"readOnly": true
},
"method": {
"type": "string",
"description": "A Valid HTTP Operation Method. Typical Http Methods like GET, PUT, POST but not limited by only them.",
"externalDocs": {
"description": "As defined by RFC.",
"url": "http://www.rfc-editor.org/rfc/rfc7230.txt"
},
"readOnly": true
},
"urlTemplate": {
"type": "string",
"description": "Relative URL template identifying the target resource for this operation. May include parameters. Example: /customers/{cid}/orders/{oid}/?date={date}",
"readOnly": true
}
},
"description": "Operation Entity contract Properties."
}
},
"parameters": {}
}

Разница между файлами не показана из-за своего большого размера Загрузить разницу

Просмотреть файл

@ -0,0 +1,772 @@
{
"swagger": "2.0",
"info": {
"title": "ApiManagementClient",
"description": "Use these REST APIs for performing operations on tenant entity associated with your Azure API Management deployment. Using this entity you can manage properties and configuration that apply to the entire API Management service instance.",
"version": "2018-01-01"
},
"host": "management.azure.com",
"schemes": [
"https"
],
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"security": [
{
"azure_auth": [
"user_impersonation"
]
}
],
"securityDefinitions": {
"azure_auth": {
"type": "oauth2",
"authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize",
"flow": "implicit",
"description": "Azure Active Directory OAuth2 Flow.",
"scopes": {
"user_impersonation": "impersonate your user account"
}
}
},
"paths": {
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tenant/{accessName}": {
"get": {
"tags": [
"TenantAccess"
],
"operationId": "TenantAccess_Get",
"description": "Get tenant access information details.",
"x-ms-examples": {
"ApiManagementGetTenantAccess": {
"$ref": "./examples/ApiManagementGetTenantAccess.json"
}
},
"parameters": [
{
"$ref": "./apimanagement.json#/parameters/ResourceGroupNameParameter"
},
{
"$ref": "./apimanagement.json#/parameters/ServiceNameParameter"
},
{
"$ref": "./apimanagement.json#/parameters/ApiVersionParameter"
},
{
"$ref": "./apimanagement.json#/parameters/SubscriptionIdParameter"
},
{
"$ref": "#/parameters/AccessParameter"
}
],
"responses": {
"200": {
"description": "Tenant Access information.",
"schema": {
"$ref": "#/definitions/AccessInformationContract"
},
"headers": {
"ETag": {
"description": "Current entity state version. Should be treated as opaque and used to make conditional HTTP requests.",
"type": "string"
}
}
}
}
},
"patch": {
"tags": [
"TenantAccess"
],
"operationId": "TenantAccess_Update",
"description": "Update tenant access information details.",
"x-ms-examples": {
"ApiManagementUpdateTenantAccess": {
"$ref": "./examples/ApiManagementUpdateTenantAccess.json"
}
},
"parameters": [
{
"$ref": "./apimanagement.json#/parameters/ResourceGroupNameParameter"
},
{
"$ref": "./apimanagement.json#/parameters/ServiceNameParameter"
},
{
"name": "parameters",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/AccessInformationUpdateParameters"
},
"description": "Parameters supplied to retrieve the Tenant Access Information."
},
{
"$ref": "#/parameters/AccessParameter"
},
{
"$ref": "./apimanagement.json#/parameters/IfMatchRequiredParameter"
},
{
"$ref": "./apimanagement.json#/parameters/ApiVersionParameter"
},
{
"$ref": "./apimanagement.json#/parameters/SubscriptionIdParameter"
}
],
"responses": {
"204": {
"description": "Tenant's access information updated successfully."
},
"default": {
"description": "Error response describing why the operation failed.",
"schema": {
"$ref": "./apimanagement.json#/definitions/ErrorResponse"
}
}
}
}
},
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tenant/{accessName}/regeneratePrimaryKey": {
"post": {
"tags": [
"TenantAccess"
],
"operationId": "TenantAccess_RegeneratePrimaryKey",
"description": "Regenerate primary access key.",
"x-ms-examples": {
"ApiManagementTenantAccessRegenerateKey": {
"$ref": "./examples/ApiManagementTenantAccessRegenerateKey.json"
}
},
"parameters": [
{
"$ref": "./apimanagement.json#/parameters/ResourceGroupNameParameter"
},
{
"$ref": "./apimanagement.json#/parameters/ServiceNameParameter"
},
{
"$ref": "./apimanagement.json#/parameters/ApiVersionParameter"
},
{
"$ref": "./apimanagement.json#/parameters/SubscriptionIdParameter"
},
{
"$ref": "#/parameters/AccessParameter"
}
],
"responses": {
"204": {
"description": "The primary key was successfully regenerated."
},
"default": {
"description": "Error response describing why the operation failed.",
"schema": {
"$ref": "./apimanagement.json#/definitions/ErrorResponse"
}
}
}
}
},
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tenant/{accessName}/regenerateSecondaryKey": {
"post": {
"tags": [
"TenantAccess"
],
"operationId": "TenantAccess_RegenerateSecondaryKey",
"description": "Regenerate secondary access key.",
"x-ms-examples": {
"ApiManagementTenantAccessRegenerateKey": {
"$ref": "./examples/ApiManagementTenantAccessRegenerateKey.json"
}
},
"parameters": [
{
"$ref": "./apimanagement.json#/parameters/ResourceGroupNameParameter"
},
{
"$ref": "./apimanagement.json#/parameters/ServiceNameParameter"
},
{
"$ref": "./apimanagement.json#/parameters/ApiVersionParameter"
},
{
"$ref": "./apimanagement.json#/parameters/SubscriptionIdParameter"
},
{
"$ref": "#/parameters/AccessParameter"
}
],
"responses": {
"204": {
"description": "The secondary key was successfully regenerated."
},
"default": {
"description": "Error response describing why the operation failed.",
"schema": {
"$ref": "./apimanagement.json#/definitions/ErrorResponse"
}
}
}
}
},
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tenant/{accessName}/git": {
"get": {
"tags": [
"TenantAccessGit"
],
"operationId": "TenantAccessGit_Get",
"description": "Gets the Git access configuration for the tenant.",
"x-ms-examples": {
"ApiManagementGetTenantAccess": {
"$ref": "./examples/ApiManagementGetTenantAccess.json"
}
},
"parameters": [
{
"$ref": "./apimanagement.json#/parameters/ResourceGroupNameParameter"
},
{
"$ref": "./apimanagement.json#/parameters/ServiceNameParameter"
},
{
"$ref": "./apimanagement.json#/parameters/ApiVersionParameter"
},
{
"$ref": "./apimanagement.json#/parameters/SubscriptionIdParameter"
},
{
"$ref": "#/parameters/AccessParameter"
}
],
"responses": {
"200": {
"description": "Git Access Information for the Service.",
"schema": {
"$ref": "#/definitions/AccessInformationContract"
},
"headers": {
"ETag": {
"description": "Current entity state version. Should be treated as opaque and used to make conditional HTTP requests.",
"type": "string"
}
}
},
"default": {
"description": "Error response describing why the operation failed.",
"schema": {
"$ref": "./apimanagement.json#/definitions/ErrorResponse"
}
}
}
}
},
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tenant/{accessName}/git/regeneratePrimaryKey": {
"post": {
"tags": [
"TenantAccessGit"
],
"operationId": "TenantAccessGit_RegeneratePrimaryKey",
"description": "Regenerate primary access key for GIT.",
"x-ms-examples": {
"ApiManagementTenantAccessRegenerateKey": {
"$ref": "./examples/ApiManagementTenantAccessRegenerateKey.json"
}
},
"parameters": [
{
"$ref": "./apimanagement.json#/parameters/ResourceGroupNameParameter"
},
{
"$ref": "./apimanagement.json#/parameters/ServiceNameParameter"
},
{
"$ref": "./apimanagement.json#/parameters/ApiVersionParameter"
},
{
"$ref": "./apimanagement.json#/parameters/SubscriptionIdParameter"
},
{
"$ref": "#/parameters/AccessParameter"
}
],
"responses": {
"204": {
"description": "The primary key was successfully regenerated."
},
"default": {
"description": "Error response describing why the operation failed.",
"schema": {
"$ref": "./apimanagement.json#/definitions/ErrorResponse"
}
}
}
}
},
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tenant/{accessName}/git/regenerateSecondaryKey": {
"post": {
"tags": [
"TenantAccessGit"
],
"operationId": "TenantAccessGit_RegenerateSecondaryKey",
"description": "Regenerate secondary access key for GIT.",
"x-ms-examples": {
"ApiManagementTenantAccessRegenerateKey": {
"$ref": "./examples/ApiManagementTenantAccessRegenerateKey.json"
}
},
"parameters": [
{
"$ref": "./apimanagement.json#/parameters/ResourceGroupNameParameter"
},
{
"$ref": "./apimanagement.json#/parameters/ServiceNameParameter"
},
{
"$ref": "./apimanagement.json#/parameters/ApiVersionParameter"
},
{
"$ref": "./apimanagement.json#/parameters/SubscriptionIdParameter"
},
{
"$ref": "#/parameters/AccessParameter"
}
],
"responses": {
"204": {
"description": "The secondary key was successfully regenerated."
},
"default": {
"description": "Error response describing why the operation failed.",
"schema": {
"$ref": "./apimanagement.json#/definitions/ErrorResponse"
}
}
}
}
},
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tenant/{configurationName}/deploy": {
"post": {
"tags": [
"TenantConfiguration"
],
"operationId": "TenantConfiguration_Deploy",
"description": "This operation applies changes from the specified Git branch to the configuration database. This is a long running operation and could take several minutes to complete.",
"externalDocs": {
"description": "To deploy any service configuration changes to the API Management service instance",
"url": "https://azure.microsoft.com/en-us/documentation/articles/api-management-configuration-repository-git/#to-deploy-any-service-configuration-changes-to-the-api-management-service-instance"
},
"x-ms-examples": {
"ApiManagementTenantConfigurationDeploy": {
"$ref": "./examples/ApiManagementTenantConfigurationDeploy.json"
}
},
"parameters": [
{
"$ref": "./apimanagement.json#/parameters/ResourceGroupNameParameter"
},
{
"$ref": "./apimanagement.json#/parameters/ServiceNameParameter"
},
{
"name": "parameters",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/DeployConfigurationParameters"
},
"description": "Deploy Configuration parameters."
},
{
"$ref": "./apimanagement.json#/parameters/ApiVersionParameter"
},
{
"$ref": "./apimanagement.json#/parameters/SubscriptionIdParameter"
},
{
"$ref": "#/parameters/ConfigurationParameter"
}
],
"responses": {
"202": {
"description": "Accepted: Location header contains the URL where the status of the long running operation can be checked."
},
"200": {
"description": "Result of appplying changes from Git branch to database.",
"schema": {
"$ref": "#/definitions/OperationResultContract"
}
},
"default": {
"description": "Error response describing why the operation failed.",
"schema": {
"$ref": "./apimanagement.json#/definitions/ErrorResponse"
}
}
},
"x-ms-long-running-operation": true
}
},
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tenant/{configurationName}/save": {
"post": {
"tags": [
"TenantConfiguration"
],
"operationId": "TenantConfiguration_Save",
"description": "This operation creates a commit with the current configuration snapshot to the specified branch in the repository. This is a long running operation and could take several minutes to complete.",
"externalDocs": {
"description": "To save the service configuration to the Git repository",
"url": "https://azure.microsoft.com/en-us/documentation/articles/api-management-configuration-repository-git/#to-save-the-service-configuration-to-the-git-repository"
},
"x-ms-examples": {
"ApiManagementTenantConfigurationSave": {
"$ref": "./examples/ApiManagementTenantConfigurationSave.json"
}
},
"parameters": [
{
"$ref": "./apimanagement.json#/parameters/ResourceGroupNameParameter"
},
{
"$ref": "./apimanagement.json#/parameters/ServiceNameParameter"
},
{
"name": "parameters",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/SaveConfigurationParameter"
},
"description": "Save Configuration parameters."
},
{
"$ref": "./apimanagement.json#/parameters/ApiVersionParameter"
},
{
"$ref": "./apimanagement.json#/parameters/SubscriptionIdParameter"
},
{
"$ref": "#/parameters/ConfigurationParameter"
}
],
"responses": {
"202": {
"description": "Accepted: Location header contains the URL where the status of the long running operation can be checked."
},
"200": {
"description": "Result of creating a commit in the repository.",
"schema": {
"$ref": "#/definitions/OperationResultContract"
}
},
"default": {
"description": "Error response describing why the operation failed.",
"schema": {
"$ref": "./apimanagement.json#/definitions/ErrorResponse"
}
}
},
"x-ms-long-running-operation": true
}
},
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tenant/{configurationName}/validate": {
"post": {
"tags": [
"TenantConfiguration"
],
"operationId": "TenantConfiguration_Validate",
"description": "This operation validates the changes in the specified Git branch. This is a long running operation and could take several minutes to complete.",
"x-ms-examples": {
"ApiManagementTenantConfigurationValidate": {
"$ref": "./examples/ApiManagementTenantConfigurationValidate.json"
}
},
"parameters": [
{
"$ref": "./apimanagement.json#/parameters/ResourceGroupNameParameter"
},
{
"$ref": "./apimanagement.json#/parameters/ServiceNameParameter"
},
{
"name": "parameters",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/DeployConfigurationParameters"
},
"description": "Validate Configuration parameters."
},
{
"$ref": "./apimanagement.json#/parameters/ApiVersionParameter"
},
{
"$ref": "./apimanagement.json#/parameters/SubscriptionIdParameter"
},
{
"$ref": "#/parameters/ConfigurationParameter"
}
],
"responses": {
"202": {
"description": "Accepted: Location header contains the URL where the status of the long running operation can be checked."
},
"200": {
"description": "Result of validating the changes in the specified Git branch.",
"schema": {
"$ref": "#/definitions/OperationResultContract"
}
},
"default": {
"description": "Error response describing why the operation failed.",
"schema": {
"$ref": "./apimanagement.json#/definitions/ErrorResponse"
}
}
},
"x-ms-long-running-operation": true
}
},
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tenant/{configurationName}/syncState": {
"get": {
"tags": [
"TenantConfigurationSyncState"
],
"operationId": "TenantConfiguration_GetSyncState",
"description": "Gets the status of the most recent synchronization between the configuration database and the Git repository.",
"x-ms-examples": {
"ApiManagementTenantAccessSyncState": {
"$ref": "./examples/ApiManagementTenantAccessSyncState.json"
}
},
"parameters": [
{
"$ref": "./apimanagement.json#/parameters/ResourceGroupNameParameter"
},
{
"$ref": "./apimanagement.json#/parameters/ServiceNameParameter"
},
{
"$ref": "./apimanagement.json#/parameters/ApiVersionParameter"
},
{
"$ref": "./apimanagement.json#/parameters/SubscriptionIdParameter"
},
{
"$ref": "#/parameters/ConfigurationParameter"
}
],
"responses": {
"200": {
"description": "Sync state result.",
"schema": {
"$ref": "#/definitions/TenantConfigurationSyncStateContract"
}
}
}
}
}
},
"definitions": {
"AccessInformationContract": {
"properties": {
"id": {
"type": "string",
"description": "Identifier."
},
"primaryKey": {
"type": "string",
"description": "Primary access key."
},
"secondaryKey": {
"type": "string",
"description": "Secondary access key."
},
"enabled": {
"type": "boolean",
"description": "Tenant access information of the API Management service."
}
},
"description": "Tenant access information contract of the API Management service."
},
"AccessInformationUpdateParameters": {
"properties": {
"enabled": {
"type": "boolean",
"description": "Tenant access information of the API Management service."
}
},
"description": "Tenant access information update parameters of the API Management service."
},
"DeployConfigurationParameters": {
"properties": {
"branch": {
"type": "string",
"description": "The name of the Git branch from which the configuration is to be deployed to the configuration database."
},
"force": {
"type": "boolean",
"description": "The value enforcing deleting subscriptions to products that are deleted in this update."
}
},
"required": [
"branch"
],
"description": "Parameters supplied to the Deploy Configuration operation."
},
"OperationResultContract": {
"properties": {
"id": {
"type": "string",
"description": "Operation result identifier."
},
"status": {
"type": "string",
"description": "Status of an async operation.",
"enum": [
"Started",
"InProgress",
"Succeeded",
"Failed"
],
"x-ms-enum": {
"name": "AsyncOperationStatus",
"modelAsString": false
}
},
"started": {
"type": "string",
"format": "date-time",
"description": "Start time of an async operation. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard.\n"
},
"updated": {
"type": "string",
"format": "date-time",
"description": "Last update time of an async operation. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard.\n"
},
"resultInfo": {
"type": "string",
"description": "Optional result info."
},
"error": {
"$ref": "./apimanagement.json#/definitions/ErrorResponseBody",
"description": "Error Body Contract"
},
"actionLog": {
"type": "array",
"items": {
"$ref": "#/definitions/OperationResultLogItemContract"
},
"readOnly": true,
"description": "This property if only provided as part of the TenantConfiguration_Validate operation. It contains the log the entities which will be updated/created/deleted as part of the TenantConfiguration_Deploy operation."
}
},
"description": "Operation Result."
},
"OperationResultLogItemContract": {
"properties": {
"objectType": {
"type": "string",
"description": "The type of entity contract."
},
"action": {
"type": "string",
"description": "Action like create/update/delete."
},
"objectKey": {
"type": "string",
"description": "Identifier of the entity being created/updated/deleted."
}
},
"description": "Log of the entity being created, updated or deleted."
},
"SaveConfigurationParameter": {
"properties": {
"branch": {
"type": "string",
"description": "The name of the Git branch in which to commit the current configuration snapshot."
},
"force": {
"type": "boolean",
"description": "The value if true, the current configuration database is committed to the Git repository, even if the Git repository has newer changes that would be overwritten."
}
},
"required": [
"branch"
],
"description": "Parameters supplied to the Save Tenant Configuration operation."
},
"TenantConfigurationSyncStateContract": {
"properties": {
"branch": {
"type": "string",
"description": "The name of Git branch."
},
"commitId": {
"type": "string",
"description": "The latest commit Id."
},
"isExport": {
"type": "boolean",
"description": "value indicating if last sync was save (true) or deploy (false) operation."
},
"isSynced": {
"type": "boolean",
"description": "value indicating if last synchronization was later than the configuration change."
},
"isGitEnabled": {
"type": "boolean",
"description": "value indicating whether Git configuration access is enabled."
},
"syncDate": {
"type": "string",
"format": "date-time",
"description": "The date of the latest synchronization. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard.\n"
},
"configurationChangeDate": {
"type": "string",
"format": "date-time",
"description": "The date of the latest configuration change. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard.\n"
}
},
"description": "Tenant Configuration Synchronization State."
}
},
"parameters": {
"AccessParameter": {
"name": "accessName",
"in": "path",
"required": true,
"type": "string",
"enum": [
"access"
],
"x-ms-enum": {
"modelAsString": true,
"name": "AccessIdName"
},
"description": "The identifier of the Access configuration.",
"x-ms-parameter-location": "method"
},
"ConfigurationParameter": {
"name": "configurationName",
"in": "path",
"required": true,
"type": "string",
"enum": [
"configuration"
],
"x-ms-enum": {
"modelAsString": true,
"name": "configurationIdName"
},
"description": "The identifier of the Git Configuration Operation.",
"x-ms-parameter-location": "method"
}
}
}

Просмотреть файл

@ -0,0 +1,961 @@
{
"swagger": "2.0",
"info": {
"title": "ApiManagementClient",
"description": "Use these REST APIs for performing operations on User entity in Azure API Management deployment. The User entity in API Management represents the developers that call the APIs of the products to which they are subscribed.",
"version": "2018-01-01"
},
"host": "management.azure.com",
"schemes": [
"https"
],
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"security": [
{
"azure_auth": [
"user_impersonation"
]
}
],
"securityDefinitions": {
"azure_auth": {
"type": "oauth2",
"authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize",
"flow": "implicit",
"description": "Azure Active Directory OAuth2 Flow.",
"scopes": {
"user_impersonation": "impersonate your user account"
}
}
},
"paths": {
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/users": {
"get": {
"tags": [
"Users"
],
"operationId": "User_ListByService",
"description": "Lists a collection of registered users in the specified service instance.",
"x-ms-examples": {
"ApiManagementListUsers": {
"$ref": "./examples/ApiManagementListUsers.json"
}
},
"parameters": [
{
"$ref": "./apimanagement.json#/parameters/ResourceGroupNameParameter"
},
{
"$ref": "./apimanagement.json#/parameters/ServiceNameParameter"
},
{
"name": "$filter",
"in": "query",
"required": false,
"type": "string",
"description": "| Field | Supported operators | Supported functions |\n|------------------|------------------------|-----------------------------------|\n| id | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |\n| firstName | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |\n| lastName | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |\n| email | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |\n| state | eq | N/A |\n| registrationDate | ge, le, eq, ne, gt, lt | N/A |\n| note | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |"
},
{
"$ref": "./apimanagement.json#/parameters/TopQueryParameter"
},
{
"$ref": "./apimanagement.json#/parameters/SkipQueryParameter"
},
{
"$ref": "./apimanagement.json#/parameters/ApiVersionParameter"
},
{
"$ref": "./apimanagement.json#/parameters/SubscriptionIdParameter"
}
],
"responses": {
"200": {
"description": "Lists a collection of User entities.",
"schema": {
"$ref": "#/definitions/UserCollection"
}
},
"default": {
"description": "Error response describing why the operation failed.",
"schema": {
"$ref": "./apimanagement.json#/definitions/ErrorResponse"
}
}
},
"x-ms-pageable": {
"nextLinkName": "nextLink"
},
"x-ms-odata": "#/definitions/UserContract"
}
},
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/users/{uid}": {
"head": {
"tags": [
"Users"
],
"operationId": "User_GetEntityTag",
"description": "Gets the entity state (Etag) version of the user specified by its identifier.",
"x-ms-examples": {
"ApiManagementHeadUser": {
"$ref": "./examples/ApiManagementHeadUser.json"
}
},
"parameters": [
{
"$ref": "./apimanagement.json#/parameters/ResourceGroupNameParameter"
},
{
"$ref": "./apimanagement.json#/parameters/ServiceNameParameter"
},
{
"$ref": "#/parameters/UserIdParameter"
},
{
"$ref": "./apimanagement.json#/parameters/ApiVersionParameter"
},
{
"$ref": "./apimanagement.json#/parameters/SubscriptionIdParameter"
}
],
"responses": {
"200": {
"description": "Specified user entity exists and current entity state version is present in the ETag header.",
"headers": {
"ETag": {
"description": "Current entity state version. Should be treated as opaque and used to make conditional HTTP requests.",
"type": "string"
}
}
},
"default": {
"description": "Error response describing why the operation failed.",
"schema": {
"$ref": "./apimanagement.json#/definitions/ErrorResponse"
}
}
}
},
"get": {
"tags": [
"Users"
],
"operationId": "User_Get",
"description": "Gets the details of the user specified by its identifier.",
"x-ms-examples": {
"ApiManagementGetUser": {
"$ref": "./examples/ApiManagementGetUser.json"
}
},
"parameters": [
{
"$ref": "./apimanagement.json#/parameters/ResourceGroupNameParameter"
},
{
"$ref": "./apimanagement.json#/parameters/ServiceNameParameter"
},
{
"$ref": "#/parameters/UserIdParameter"
},
{
"$ref": "./apimanagement.json#/parameters/ApiVersionParameter"
},
{
"$ref": "./apimanagement.json#/parameters/SubscriptionIdParameter"
}
],
"responses": {
"200": {
"description": "Gets the specified user entity.",
"schema": {
"$ref": "#/definitions/UserContract"
},
"headers": {
"ETag": {
"description": "Current entity state version. Should be treated as opaque and used to make conditional HTTP requests.",
"type": "string"
}
}
},
"default": {
"description": "Error response describing why the operation failed.",
"schema": {
"$ref": "./apimanagement.json#/definitions/ErrorResponse"
}
}
}
},
"put": {
"tags": [
"Users"
],
"operationId": "User_CreateOrUpdate",
"description": "Creates or Updates a user.",
"x-ms-examples": {
"ApiManagementCreateUserBasic": {
"$ref": "./examples/ApiManagementCreateUserBasic.json"
}
},
"parameters": [
{
"$ref": "./apimanagement.json#/parameters/ResourceGroupNameParameter"
},
{
"$ref": "./apimanagement.json#/parameters/ServiceNameParameter"
},
{
"$ref": "#/parameters/UserIdParameter"
},
{
"name": "parameters",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/UserCreateParameters"
},
"description": "Create or update parameters."
},
{
"$ref": "./apimanagement.json#/parameters/IfMatchOptionalParameter"
},
{
"$ref": "./apimanagement.json#/parameters/ApiVersionParameter"
},
{
"$ref": "./apimanagement.json#/parameters/SubscriptionIdParameter"
}
],
"responses": {
"201": {
"description": "User was successfully created.",
"schema": {
"$ref": "#/definitions/UserContract"
}
},
"200": {
"description": "User was successfully updated.",
"schema": {
"$ref": "#/definitions/UserContract"
}
},
"default": {
"description": "Error response describing why the operation failed.",
"schema": {
"$ref": "./apimanagement.json#/definitions/ErrorResponse"
}
}
}
},
"patch": {
"tags": [
"Users"
],
"operationId": "User_Update",
"description": "Updates the details of the user specified by its identifier.",
"x-ms-examples": {
"ApiManagementUpdateUserBasic": {
"$ref": "./examples/ApiManagementUpdateUserBasic.json"
}
},
"parameters": [
{
"$ref": "./apimanagement.json#/parameters/ResourceGroupNameParameter"
},
{
"$ref": "./apimanagement.json#/parameters/ServiceNameParameter"
},
{
"$ref": "#/parameters/UserIdParameter"
},
{
"name": "parameters",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/UserUpdateParameters"
},
"description": "Update parameters."
},
{
"$ref": "./apimanagement.json#/parameters/IfMatchRequiredParameter"
},
{
"$ref": "./apimanagement.json#/parameters/ApiVersionParameter"
},
{
"$ref": "./apimanagement.json#/parameters/SubscriptionIdParameter"
}
],
"responses": {
"204": {
"description": "The user details were successfully updated."
},
"default": {
"description": "*** Error Responses: ***\n\n * 405 Administrator user cannot be modified\n\n * 4XX Error response giving details why the operation failed.",
"schema": {
"$ref": "./apimanagement.json#/definitions/ErrorResponse"
}
}
}
},
"delete": {
"tags": [
"Users"
],
"operationId": "User_Delete",
"description": "Deletes specific user.",
"x-ms-examples": {
"ApiManagementDeleteUser": {
"$ref": "./examples/ApiManagementDeleteUser.json"
}
},
"parameters": [
{
"$ref": "./apimanagement.json#/parameters/ResourceGroupNameParameter"
},
{
"$ref": "./apimanagement.json#/parameters/ServiceNameParameter"
},
{
"$ref": "#/parameters/UserIdParameter"
},
{
"name": "deleteSubscriptions",
"in": "query",
"required": false,
"type": "boolean",
"description": "Whether to delete user's subscription or not."
},
{
"name": "notify",
"in": "query",
"required": false,
"type": "boolean",
"description": "Send an Account Closed Email notification to the User."
},
{
"$ref": "./apimanagement.json#/parameters/IfMatchRequiredParameter"
},
{
"$ref": "./apimanagement.json#/parameters/ApiVersionParameter"
},
{
"$ref": "./apimanagement.json#/parameters/SubscriptionIdParameter"
}
],
"responses": {
"200": {
"description": "The user details were successfully deleted."
},
"204": {
"description": "The user details were successfully deleted."
},
"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/{uid}/generateSsoUrl": {
"post": {
"tags": [
"Users"
],
"operationId": "User_GenerateSsoUrl",
"description": "Retrieves a redirection URL containing an authentication token for signing a given user into the developer portal.",
"x-ms-examples": {
"ApiManagementUsersGenerateSsoUrl": {
"$ref": "./examples/ApiManagementUsersGenerateSsoUrl.json"
}
},
"parameters": [
{
"$ref": "./apimanagement.json#/parameters/ResourceGroupNameParameter"
},
{
"$ref": "./apimanagement.json#/parameters/ServiceNameParameter"
},
{
"$ref": "#/parameters/UserIdParameter"
},
{
"$ref": "./apimanagement.json#/parameters/ApiVersionParameter"
},
{
"$ref": "./apimanagement.json#/parameters/SubscriptionIdParameter"
}
],
"responses": {
"200": {
"description": "The response body contains the single sign-on URL.",
"schema": {
"x-ms-client-flatten": true,
"$ref": "#/definitions/GenerateSsoUrlResult"
}
},
"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/{uid}/groups": {
"get": {
"tags": [
"UserGroups"
],
"operationId": "UserGroup_List",
"description": "Lists all user groups.",
"x-ms-examples": {
"ApiManagementListUserGroups": {
"$ref": "./examples/ApiManagementListUserGroups.json"
}
},
"parameters": [
{
"$ref": "./apimanagement.json#/parameters/ResourceGroupNameParameter"
},
{
"$ref": "./apimanagement.json#/parameters/ServiceNameParameter"
},
{
"$ref": "#/parameters/UserIdParameter"
},
{
"name": "$filter",
"in": "query",
"required": false,
"type": "string",
"description": "| Field | Supported operators | Supported functions |\n|-------------|------------------------|---------------------------------------------|\n| id | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |\n| name | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |\n| description | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |"
},
{
"$ref": "./apimanagement.json#/parameters/TopQueryParameter"
},
{
"$ref": "./apimanagement.json#/parameters/SkipQueryParameter"
},
{
"$ref": "./apimanagement.json#/parameters/ApiVersionParameter"
},
{
"$ref": "./apimanagement.json#/parameters/SubscriptionIdParameter"
}
],
"responses": {
"200": {
"description": "Lists a collection of Group entities.",
"schema": {
"$ref": "./apimgroups.json#/definitions/GroupCollection"
}
},
"default": {
"description": "Error response describing why the operation failed.",
"schema": {
"$ref": "./apimanagement.json#/definitions/ErrorResponse"
}
}
},
"x-ms-pageable": {
"nextLinkName": "nextLink"
},
"x-ms-odata": "./apimgroups.json#/definitions/GroupContract"
}
},
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/users/{uid}/subscriptions": {
"get": {
"tags": [
"UserSubscriptions"
],
"operationId": "UserSubscription_List",
"description": "Lists the collection of subscriptions of the specified user.",
"x-ms-examples": {
"ApiManagementListUserSubscriptions": {
"$ref": "./examples/ApiManagementListUserSubscriptions.json"
}
},
"parameters": [
{
"$ref": "./apimanagement.json#/parameters/ResourceGroupNameParameter"
},
{
"$ref": "./apimanagement.json#/parameters/ServiceNameParameter"
},
{
"$ref": "#/parameters/UserIdParameter"
},
{
"name": "$filter",
"in": "query",
"required": false,
"type": "string",
"description": "| Field | Supported operators | Supported functions |\n|--------------|------------------------|---------------------------------------------|\n| id | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |\n| name | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |\n| stateComment | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |\n| userId | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |\n| productId | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |\n| state | eq | |"
},
{
"$ref": "./apimanagement.json#/parameters/TopQueryParameter"
},
{
"$ref": "./apimanagement.json#/parameters/SkipQueryParameter"
},
{
"$ref": "./apimanagement.json#/parameters/ApiVersionParameter"
},
{
"$ref": "./apimanagement.json#/parameters/SubscriptionIdParameter"
}
],
"responses": {
"200": {
"description": "Lists a collection of Subscription entities.",
"schema": {
"$ref": "./apimsubscriptions.json#/definitions/SubscriptionCollection"
}
},
"default": {
"description": "Error response describing why the operation failed.",
"schema": {
"$ref": "./apimanagement.json#/definitions/ErrorResponse"
}
}
},
"x-ms-pageable": {
"nextLinkName": "nextLink"
},
"x-ms-odata": "./apimsubscriptions.json#/definitions/SubscriptionContract"
}
},
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/users/{uid}/identities": {
"get": {
"tags": [
"UserIdentities"
],
"operationId": "UserIdentities_List",
"description": "Lists all user identities.",
"x-ms-examples": {
"ApiManagementListUsersIdentities": {
"$ref": "./examples/ApiManagementListUsersIdentities.json"
}
},
"parameters": [
{
"$ref": "./apimanagement.json#/parameters/ResourceGroupNameParameter"
},
{
"$ref": "./apimanagement.json#/parameters/ServiceNameParameter"
},
{
"$ref": "#/parameters/UserIdParameter"
},
{
"$ref": "./apimanagement.json#/parameters/ApiVersionParameter"
},
{
"$ref": "./apimanagement.json#/parameters/SubscriptionIdParameter"
}
],
"x-ms-pageable": {
"nextLinkName": "nextLink"
},
"responses": {
"200": {
"description": "Lists of User Identities.",
"schema": {
"$ref": "#/definitions/UserIdentityCollection"
}
},
"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/{uid}/token": {
"post": {
"tags": [
"Users"
],
"operationId": "User_GetSharedAccessToken",
"description": "Gets the Shared Access Authorization Token for the User.",
"x-ms-examples": {
"ApiManagementUsersGetToken": {
"$ref": "./examples/ApiManagementUsersGetToken.json"
}
},
"parameters": [
{
"$ref": "./apimanagement.json#/parameters/ResourceGroupNameParameter"
},
{
"$ref": "./apimanagement.json#/parameters/ServiceNameParameter"
},
{
"$ref": "#/parameters/UserIdParameter"
},
{
"name": "parameters",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/UserTokenParameters"
},
"description": "Create Authorization Token parameters."
},
{
"$ref": "./apimanagement.json#/parameters/ApiVersionParameter"
},
{
"$ref": "./apimanagement.json#/parameters/SubscriptionIdParameter"
}
],
"responses": {
"200": {
"description": "The response body contains the authorization token for the user.",
"schema": {
"x-ms-client-flatten": true,
"$ref": "#/definitions/UserTokenResult"
}
},
"default": {
"description": "Error response describing why the operation failed.",
"schema": {
"$ref": "./apimanagement.json#/definitions/ErrorResponse"
}
}
}
}
}
},
"definitions": {
"GenerateSsoUrlResult": {
"properties": {
"value": {
"type": "string",
"description": "Redirect Url containing the SSO URL value."
}
},
"description": "Generate SSO Url operations response details."
},
"UserCollection": {
"properties": {
"value": {
"type": "array",
"items": {
"$ref": "#/definitions/UserContract"
},
"description": "Page values."
},
"nextLink": {
"type": "string",
"description": "Next page link if any."
}
},
"description": "Paged Users list representation."
},
"UserContract": {
"properties": {
"properties": {
"x-ms-client-flatten": true,
"$ref": "#/definitions/UserContractProperties",
"description": "User entity contract properties."
}
},
"allOf": [
{
"$ref": "./apimanagement.json#/definitions/Resource"
}
],
"description": "User details."
},
"UserContractProperties": {
"properties": {
"firstName": {
"type": "string",
"description": "First name."
},
"lastName": {
"type": "string",
"description": "Last name."
},
"email": {
"type": "string",
"description": "Email address."
},
"registrationDate": {
"type": "string",
"format": "date-time",
"description": "Date of user registration. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard.\n"
},
"groups": {
"readOnly": true,
"type": "array",
"items": {
"$ref": "./apimgroups.json#/definitions/GroupContractProperties"
},
"description": "Collection of groups user is part of."
}
},
"allOf": [
{
"$ref": "#/definitions/UserEntityBaseParameters"
}
],
"description": "User profile."
},
"UserCreateParameters": {
"properties": {
"properties": {
"x-ms-client-flatten": true,
"$ref": "#/definitions/UserCreateParameterProperties",
"description": "User entity create contract properties."
}
},
"description": "User create details."
},
"UserCreateParameterProperties": {
"properties": {
"email": {
"type": "string",
"description": "Email address. Must not be empty and must be unique within the service instance.",
"minLength": 1,
"maxLength": 254
},
"firstName": {
"type": "string",
"description": "First name.",
"minLength": 1,
"maxLength": 100
},
"lastName": {
"type": "string",
"description": "Last name.",
"minLength": 1,
"maxLength": 100
},
"password": {
"type": "string",
"description": "User Password. If no value is provided, a default password is generated."
},
"confirmation": {
"type": "string",
"description": "Determines the type of confirmation e-mail that will be sent to the newly created user.",
"enum": [
"signup",
"invite"
],
"x-ms-enum": {
"name": "Confirmation",
"modelAsString": true,
"values": [
{
"value": "signup",
"description": "Send an e-mail to the user confirming they have successfully signed up."
},
{
"value": "invite",
"description": "Send an e-mail inviting the user to sign-up and complete registration."
}
]
}
}
},
"allOf": [
{
"$ref": "#/definitions/UserEntityBaseParameters"
}
],
"required": [
"email",
"firstName",
"lastName"
],
"description": "Parameters supplied to the Create User operation."
},
"UserEntityBaseParameters": {
"properties": {
"state": {
"type": "string",
"description": "Account state. Specifies whether the user is active or not. Blocked users are unable to sign into the developer portal or call any APIs of subscribed products. Default state is Active.",
"enum": [
"active",
"blocked",
"pending",
"deleted"
],
"default": "active",
"x-ms-enum": {
"name": "UserState",
"modelAsString": true,
"values": [
{
"value": "active",
"description": "User state is active."
},
{
"value": "blocked",
"description": "User is blocked. Blocked users cannot authenticate at developer portal or call API."
},
{
"value": "pending",
"description": "User account is pending. Requires identity confirmation before it can be made active."
},
{
"value": "deleted",
"description": "User account is closed. All identities and related entities are removed."
}
]
}
},
"note": {
"type": "string",
"description": "Optional note about a user set by the administrator."
},
"identities": {
"readOnly": true,
"type": "array",
"items": {
"$ref": "#/definitions/UserIdentityContract"
},
"description": "Collection of user identities."
}
},
"description": "User Entity Base Parameters set."
},
"UserIdentityCollection": {
"properties": {
"value": {
"type": "array",
"items": {
"$ref": "#/definitions/UserIdentityContract"
},
"description": "User Identity values."
},
"count": {
"type": "integer",
"format": "int64",
"description": "Total record count number across all pages."
},
"nextLink": {
"type": "string",
"description": "Next page link if any."
}
},
"description": "List of Users Identity list representation."
},
"UserIdentityContract": {
"properties": {
"provider": {
"type": "string",
"description": "Identity provider name."
},
"id": {
"type": "string",
"description": "Identifier value within provider."
}
},
"description": "User identity details."
},
"UserTokenParameters": {
"properties": {
"keyType": {
"type": "string",
"description": "The Key to be used to generate token for user.",
"enum": [
"primary",
"secondary"
],
"default": "primary",
"x-ms-enum": {
"name": "KeyType",
"modelAsString": false
}
},
"expiry": {
"type": "string",
"format": "date-time",
"description": "The Expiry time of the Token. Maximum token expiry time is set to 30 days. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard.\n"
}
},
"required": [
"keyType",
"expiry"
],
"description": "Parameters supplied to the Get User Token operation."
},
"UserTokenResult": {
"properties": {
"value": {
"type": "string",
"description": "Shared Access Authorization token for the User."
}
},
"description": "Get User Token response details."
},
"UserUpdateParameters": {
"properties": {
"properties": {
"x-ms-client-flatten": true,
"$ref": "#/definitions/UserUpdateParametersProperties",
"description": "User entity update contract properties."
}
},
"description": "User update parameters."
},
"UserUpdateParametersProperties": {
"properties": {
"email": {
"type": "string",
"description": "Email address. Must not be empty and must be unique within the service instance.",
"minLength": 1,
"maxLength": 254
},
"password": {
"type": "string",
"description": "User Password."
},
"firstName": {
"type": "string",
"description": "First name.",
"minLength": 1,
"maxLength": 100
},
"lastName": {
"type": "string",
"description": "Last name.",
"minLength": 1,
"maxLength": 100
}
},
"allOf": [
{
"$ref": "#/definitions/UserEntityBaseParameters"
}
],
"description": "Parameters supplied to the Update User operation."
}
},
"parameters": {
"UserIdParameter": {
"name": "uid",
"in": "path",
"required": true,
"type": "string",
"description": "User identifier. Must be unique in the current API Management service instance.",
"minLength": 1,
"maxLength": 80,
"pattern": "(^[\\w]+$)|(^[\\w][\\w\\-]+[\\w]$)",
"x-ms-parameter-location": "method"
}
}
}

Просмотреть файл

@ -0,0 +1,520 @@
{
"swagger": "2.0",
"info": {
"title": "ApiManagementClient",
"description": "Use these REST APIs for performing operations on the ApiVersionSet entity associated with your Azure API Management deployment. Using this entity you create and manage API Version Sets that are used to group APIs for consistent versioning.",
"version": "2018-01-01"
},
"host": "management.azure.com",
"schemes": [
"https"
],
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"security": [
{
"azure_auth": [
"user_impersonation"
]
}
],
"securityDefinitions": {
"azure_auth": {
"type": "oauth2",
"authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize",
"flow": "implicit",
"description": "Azure Active Directory OAuth2 Flow.",
"scopes": {
"user_impersonation": "impersonate your user account"
}
}
},
"paths": {
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/api-version-sets": {
"get": {
"tags": [
"ApiVersionSets"
],
"operationId": "ApiVersionSet_ListByService",
"description": "Lists a collection of API Version Sets in the specified service instance.",
"x-ms-examples": {
"ApiManagementListApiVersionSets": {
"$ref": "./examples/ApiManagementListApiVersionSets.json"
}
},
"parameters": [
{
"$ref": "./apimanagement.json#/parameters/ResourceGroupNameParameter"
},
{
"$ref": "./apimanagement.json#/parameters/ServiceNameParameter"
},
{
"$ref": "./apimanagement.json#/parameters/ApiVersionParameter"
},
{
"$ref": "./apimanagement.json#/parameters/SubscriptionIdParameter"
},
{
"name": "$filter",
"in": "query",
"required": false,
"type": "string",
"description": "| Field | Supported operators | Supported functions |\n|------------------|------------------------|-----------------------------------|\n| id | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |\n| firstName | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |\n| lastName | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |\n| email | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |\n| state | eq | N/A |\n| registrationDate | ge, le, eq, ne, gt, lt | N/A |\n| note | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |"
},
{
"$ref": "./apimanagement.json#/parameters/TopQueryParameter"
},
{
"$ref": "./apimanagement.json#/parameters/SkipQueryParameter"
}
],
"responses": {
"200": {
"description": "Lists a collection of Api Version Set entities.",
"schema": {
"$ref": "#/definitions/ApiVersionSetCollection"
}
},
"default": {
"description": "Error response describing why the operation failed.",
"schema": {
"$ref": "./apimanagement.json#/definitions/ErrorResponse"
}
}
},
"x-ms-pageable": {
"nextLinkName": "nextLink"
},
"x-ms-odata": "#/definitions/ApiVersionSetContract"
}
},
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/api-version-sets/{versionSetId}": {
"head": {
"tags": [
"ApiVersionSets"
],
"operationId": "ApiVersionSet_GetEntityTag",
"description": "Gets the entity state (Etag) version of the Api Version Set specified by its identifier.",
"x-ms-examples": {
"ApiManagementHeadApiVersionSet": {
"$ref": "./examples/ApiManagementHeadApiVersionSet.json"
}
},
"parameters": [
{
"$ref": "./apimanagement.json#/parameters/ResourceGroupNameParameter"
},
{
"$ref": "./apimanagement.json#/parameters/ServiceNameParameter"
},
{
"$ref": "./apimanagement.json#/parameters/ApiVersionParameter"
},
{
"$ref": "./apimanagement.json#/parameters/SubscriptionIdParameter"
},
{
"$ref": "#/parameters/ApiVersionSetIdParameter"
}
],
"responses": {
"200": {
"description": "Specified Api Version Set entity exists and current entity state version is present in the ETag header.",
"headers": {
"ETag": {
"description": "Current entity state version. Should be treated as opaque and used to make conditional HTTP requests.",
"type": "string"
}
}
},
"default": {
"description": "Error response describing why the operation failed.",
"schema": {
"$ref": "./apimanagement.json#/definitions/ErrorResponse"
}
}
}
},
"get": {
"tags": [
"ApiVersionSets"
],
"operationId": "ApiVersionSet_Get",
"description": "Gets the details of the Api Version Set specified by its identifier.",
"x-ms-examples": {
"ApiManagementGetApiVersionSet": {
"$ref": "./examples/ApiManagementGetApiVersionSet.json"
}
},
"parameters": [
{
"$ref": "./apimanagement.json#/parameters/ResourceGroupNameParameter"
},
{
"$ref": "./apimanagement.json#/parameters/ServiceNameParameter"
},
{
"$ref": "./apimanagement.json#/parameters/ApiVersionParameter"
},
{
"$ref": "./apimanagement.json#/parameters/SubscriptionIdParameter"
},
{
"$ref": "#/parameters/ApiVersionSetIdParameter"
}
],
"responses": {
"200": {
"description": "Gets the specified Api Version Set entity.",
"schema": {
"$ref": "#/definitions/ApiVersionSetContract"
},
"headers": {
"ETag": {
"description": "Current entity state version. Should be treated as opaque and used to make conditional HTTP requests.",
"type": "string"
}
}
},
"default": {
"description": "Error response describing why the operation failed.",
"schema": {
"$ref": "./apimanagement.json#/definitions/ErrorResponse"
}
}
}
},
"put": {
"tags": [
"ApiVersionSets"
],
"operationId": "ApiVersionSet_CreateOrUpdate",
"description": "Creates or Updates a Api Version Set.",
"x-ms-examples": {
"ApiManagementCreateApiVersionSet": {
"$ref": "./examples/ApiManagementCreateApiVersionSet.json"
}
},
"parameters": [
{
"$ref": "./apimanagement.json#/parameters/ResourceGroupNameParameter"
},
{
"$ref": "./apimanagement.json#/parameters/ServiceNameParameter"
},
{
"$ref": "./apimanagement.json#/parameters/ApiVersionParameter"
},
{
"$ref": "./apimanagement.json#/parameters/SubscriptionIdParameter"
},
{
"$ref": "#/parameters/ApiVersionSetIdParameter"
},
{
"name": "parameters",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/ApiVersionSetContract"
},
"description": "Create or update parameters."
},
{
"$ref": "./apimanagement.json#/parameters/IfMatchOptionalParameter"
}
],
"responses": {
"200": {
"description": "Api Version Set was successfully updated.",
"schema": {
"$ref": "#/definitions/ApiVersionSetContract"
}
},
"201": {
"description": "Api Version Set was successfully created.",
"schema": {
"$ref": "#/definitions/ApiVersionSetContract"
}
},
"default": {
"description": "Error response describing why the operation failed.",
"schema": {
"$ref": "./apimanagement.json#/definitions/ErrorResponse"
}
}
}
},
"patch": {
"tags": [
"ApiVersionSets"
],
"operationId": "ApiVersionSet_Update",
"description": "Updates the details of the Api VersionSet specified by its identifier.",
"x-ms-examples": {
"ApiManagementUpdateApiVersionSet": {
"$ref": "./examples/ApiManagementUpdateApiVersionSet.json"
}
},
"parameters": [
{
"$ref": "./apimanagement.json#/parameters/ResourceGroupNameParameter"
},
{
"$ref": "./apimanagement.json#/parameters/ServiceNameParameter"
},
{
"$ref": "./apimanagement.json#/parameters/ApiVersionParameter"
},
{
"$ref": "./apimanagement.json#/parameters/SubscriptionIdParameter"
},
{
"$ref": "#/parameters/ApiVersionSetIdParameter"
},
{
"name": "parameters",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/ApiVersionSetUpdateParameters"
},
"description": "Update parameters."
},
{
"$ref": "./apimanagement.json#/parameters/IfMatchRequiredParameter"
}
],
"responses": {
"204": {
"description": "The Api Version Set details were successfully updated."
},
"default": {
"description": "*** Error Responses: ***\n\n * 4XX Error response giving details why the operation failed.",
"schema": {
"$ref": "./apimanagement.json#/definitions/ErrorResponse"
}
}
}
},
"delete": {
"tags": [
"ApiVersionSets"
],
"operationId": "ApiVersionSet_Delete",
"description": "Deletes specific Api Version Set.",
"x-ms-examples": {
"ApiManagementDeleteApiVersionSet": {
"$ref": "./examples/ApiManagementDeleteApiVersionSet.json"
}
},
"parameters": [
{
"$ref": "./apimanagement.json#/parameters/ResourceGroupNameParameter"
},
{
"$ref": "./apimanagement.json#/parameters/ServiceNameParameter"
},
{
"$ref": "./apimanagement.json#/parameters/ApiVersionParameter"
},
{
"$ref": "./apimanagement.json#/parameters/SubscriptionIdParameter"
},
{
"$ref": "#/parameters/ApiVersionSetIdParameter"
},
{
"$ref": "./apimanagement.json#/parameters/IfMatchRequiredParameter"
}
],
"responses": {
"200": {
"description": "The ApiVersion Set details were successfully deleted."
},
"204": {
"description": "The ApiVersion Set details were successfully deleted."
},
"default": {
"description": "Error response describing why the operation failed.",
"schema": {
"$ref": "./apimanagement.json#/definitions/ErrorResponse"
}
}
}
}
}
},
"definitions": {
"ApiVersionSetCollection": {
"properties": {
"value": {
"type": "array",
"items": {
"$ref": "#/definitions/ApiVersionSetContract"
},
"description": "Page values."
},
"nextLink": {
"type": "string",
"description": "Next page link if any."
}
},
"description": "Paged Api Version Set list representation."
},
"ApiVersionSetEntityBase": {
"properties": {
"description": {
"type": "string",
"description": "Description of API Version Set."
},
"versionQueryName": {
"type": "string",
"description": "Name of query parameter that indicates the API Version if versioningScheme is set to `query`.",
"minLength": 1,
"maxLength": 100
},
"versionHeaderName": {
"type": "string",
"description": "Name of HTTP header parameter that indicates the API Version if versioningScheme is set to `header`.",
"minLength": 1,
"maxLength": 100
}
},
"description": "Api Version set base parameters"
},
"ApiVersionSetContractProperties": {
"properties": {
"displayName": {
"type": "string",
"description": "Name of API Version Set",
"minLength": 1,
"maxLength": 100
},
"versioningScheme": {
"type": "string",
"description": "An value that determines where the API Version identifer will be located in a HTTP request.",
"enum": [
"Segment",
"Query",
"Header"
],
"x-ms-enum": {
"name": "versioningScheme",
"modelAsString": true,
"values": [
{
"value": "Segment",
"description": "The API Version is passed in a path segment."
},
{
"value": "Query",
"description": "The API Version is passed in a query parameter."
},
{
"value": "Header",
"description": "The API Version is passed in a HTTP header."
}
]
}
}
},
"allOf": [
{
"$ref": "#/definitions/ApiVersionSetEntityBase"
}
],
"required": [
"displayName",
"versioningScheme"
],
"description": "Properties of an API Version Set."
},
"ApiVersionSetContract": {
"properties": {
"properties": {
"x-ms-client-flatten": true,
"$ref": "#/definitions/ApiVersionSetContractProperties",
"description": "Api VersionSet contract properties."
}
},
"allOf": [
{
"$ref": "./apimanagement.json#/definitions/Resource"
}
],
"description": "Api Version Set Contract details."
},
"ApiVersionSetUpdateParametersProperties": {
"properties": {
"displayName": {
"type": "string",
"description": "Name of API Version Set",
"minLength": 1,
"maxLength": 100
},
"versioningScheme": {
"type": "string",
"description": "An value that determines where the API Version identifer will be located in a HTTP request.",
"enum": [
"Segment",
"Query",
"Header"
],
"x-ms-enum": {
"name": "versioningScheme",
"modelAsString": true,
"values": [
{
"value": "Segment",
"description": "The API Version is passed in a path segment."
},
{
"value": "Query",
"description": "The API Version is passed in a query parameter."
},
{
"value": "Header",
"description": "The API Version is passed in a HTTP header."
}
]
}
}
},
"allOf": [
{
"$ref": "#/definitions/ApiVersionSetEntityBase"
}
],
"description": "Properties used to create or update an API Version Set."
},
"ApiVersionSetUpdateParameters": {
"properties": {
"properties": {
"x-ms-client-flatten": true,
"$ref": "#/definitions/ApiVersionSetUpdateParametersProperties",
"description": "Parameters to update or create an Api Version Set Contract."
}
},
"description": "Parameters to update or create an Api Version Set Contract."
}
},
"parameters": {
"ApiVersionSetIdParameter": {
"name": "versionSetId",
"in": "path",
"required": true,
"type": "string",
"description": "Api Version Set identifier. Must be unique in the current API Management service instance.",
"minLength": 1,
"maxLength": 80,
"pattern": "(^[\\w]+$)|(^[\\w][\\w\\-]+[\\w]$)",
"x-ms-parameter-location": "method"
}
}
}

Просмотреть файл

@ -1,8 +1,8 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
import * as assert from "assert"
import * as glob from "glob"
import * as globby from "globby"
import * as lodash from "lodash"
import * as os from "os"
import * as path from "path"
import { ResponsesObject } from "yasway"
@ -10,8 +10,8 @@ import { ResponsesObject } from "yasway"
import * as Constants from "../lib/util/constants"
import { LiveValidator } from "../lib/validators/liveValidator"
const numberOfSpecs = 8
const livePaths = glob.sync(path.join(__dirname, "test/liveValidation/swaggers/**/live/*.json"))
const numberOfSpecs = 9
jest.setTimeout(150000)
describe("Live Validator", () => {
describe("Initialization", () => {
@ -22,7 +22,8 @@ describe("Live Validator", () => {
url: "https://github.com/Azure/azure-rest-api-specs.git",
shouldClone: false
},
directory: path.resolve(os.homedir(), "repo")
directory: path.resolve(os.homedir(), "repo"),
isPathCaseSensitive: false
}
const validator = new LiveValidator()
assert.deepStrictEqual(validator.cache, {})
@ -57,22 +58,10 @@ describe("Live Validator", () => {
"https://github.com/Azure/azure-rest-api-specs.git"
)
})
it("should throw during initialization with invalid directory", () => {
assert.throws(() => {
const options = {
swaggerPaths: [],
git: {
shouldClone: false
},
directory: 54
}
const validator = new LiveValidator(options)
assert.notStrictEqual(validator, null)
})
})
it("should initialize with user provided swaggerPaths", () => {
const swaggerPaths = ["swaggerPath1", "swaggerPath2"]
const options = {
isPathCaseSensitive: false,
swaggerPaths,
git: {
url: "https://github.com/Azure/azure-rest-api-specs.git",
@ -89,6 +78,7 @@ describe("Live Validator", () => {
const directory = "/Users/username/repos/"
const options = {
swaggerPaths,
isPathCaseSensitive: false,
git: {
url: "https://github.com/Azure/azure-rest-api-specs.git",
shouldClone: false
@ -103,10 +93,12 @@ describe("Live Validator", () => {
const swaggerPaths = ["swaggerPath1", "swaggerPath2"]
const directory = "/Users/username/repos/"
const git = {
url: "https://github.com/Azure/azure-rest-api-specs.git"
url: "https://github.com/Azure/azure-rest-api-specs.git",
shouldClone: false
}
const options = {
swaggerPaths,
isPathCaseSensitive: false,
git: {
url: git.url,
shouldClone: false
@ -132,7 +124,8 @@ describe("Live Validator", () => {
const options = {
swaggerPaths,
git,
directory
directory,
isPathCaseSensitive: false
}
const validator = new LiveValidator({
swaggerPaths,
@ -142,28 +135,6 @@ describe("Live Validator", () => {
assert.deepStrictEqual(validator.cache, {})
assert.deepStrictEqual(validator.options, options)
})
it("should throw on invalid options types", () => {
assert.throws(() => {
const _ = new LiveValidator("string")
assert.notStrictEqual(_, null)
}, /must be of type "object"/)
assert.throws(() => {
const _ = new LiveValidator({ swaggerPaths: "should be array" })
assert.notStrictEqual(_, null)
}, /must be of type "array"/)
assert.throws(() => {
const _ = new LiveValidator({ git: 1 })
assert.notStrictEqual(_, null)
}, /must be of type "object"/)
assert.throws(() => {
const _ = new LiveValidator({ git: { url: [] } })
assert.notStrictEqual(_, null)
}, /must be of type "string"/)
assert.throws(() => {
const _ = new LiveValidator({ git: { url: "url", shouldClone: "no" } })
assert.notStrictEqual(_, null)
}, /must be of type "boolean"/)
})
})
describe("Initialize cache", () => {
@ -294,7 +265,7 @@ describe("Live Validator", () => {
"https://management.azure.com/" +
"subscriptions/subscriptionId/resourceGroups/myRG/providers/Microsoft.Storage/" +
"storageAccounts/accname?api-version=2015-06-15"
const validator = new LiveValidator(options)
const validator: any = new LiveValidator(options)
await validator.initialize()
// Operations to match is StorageAccounts_List
let operations = validator.getPotentialOperations(listRequestUrl, "Get").operations
@ -353,7 +324,7 @@ describe("Live Validator", () => {
"https://management.azure.com/" +
"subscriptions/subscriptionId/providers/Microsoft.Storage/storageAccounts/accountName/" +
"properties?api-version=2015-06-15"
const validator = new LiveValidator(options)
const validator: any = new LiveValidator(options)
await validator.initialize()
// Operations to match is StorageAccounts_List with api-version 2015-08-15
// [non cached api version]
@ -426,6 +397,9 @@ describe("Live Validator", () => {
})
describe("Initialize cache and validate", () => {
const livePaths = globby.sync(
path.join(__dirname, "test/liveValidation/swaggers/**/live/*.json")
)
livePaths.forEach(livePath => {
it(`should validate request and response for "${livePath}"`, async () => {
const options = {
@ -502,3 +476,60 @@ describe("Live Validator", () => {
})
})
})
describe("Live validator snapshot validation", () => {
let validator: LiveValidator
const errors = [
"OBJECT_MISSING_REQUIRED_PROPERTY",
"OBJECT_ADDITIONAL_PROPERTIES",
"MAX_LENGTH",
"INVALID_FORMAT",
"INVALID_TYPE",
"ENUM_MISMATCH",
"ENUM_CASE_MISMATCH"
]
beforeAll(async () => {
const options = {
directory: `${__dirname}/liveValidation/swaggers/`,
isPathCaseSensitive: false,
useRelativeSourceLocationUrl: true,
swaggerPathsPattern:
"specification\\apimanagement\\resource-manager\\Microsoft.ApiManagement\\preview\\2018-01-01\\*.json",
git: {
shouldClone: false
}
}
validator = new LiveValidator(options)
await validator.initialize()
}, 100000)
test(`should return no errors for valid input`, async () => {
const payload = require(`${__dirname}/liveValidation/payloads/valid_input.json`)
const validationResult = validator.validateLiveRequestResponse(payload)
expect(validationResult).toMatchSnapshot()
})
errors.forEach(error => {
test(`should return the expected error requestResponse validation for ${error}`, async () => {
const payload = require(`${__dirname}/liveValidation/payloads/${lodash.camelCase(
error
)}_input.json`)
const validationResult = validator.validateLiveRequestResponse(payload)
expect(validationResult).toMatchSnapshot()
})
test(`should match pair validation with response request validation for ${error}`, async () => {
const payload = require(`${__dirname}/liveValidation/payloads/${lodash.camelCase(
error
)}_input.json`)
const validationResult = validator.validateLiveRequestResponse(payload)
const requestValidationResult = validator.validateLiveRequest(payload.liveRequest)
const responseValidationResult = validator.validateLiveResponse(payload.liveResponse, {
url: payload.liveRequest.url,
method: payload.liveRequest.method
})
expect(validationResult.requestValidationResult).toStrictEqual(requestValidationResult)
expect(validationResult.responseValidationResult).toStrictEqual(responseValidationResult)
})
})
})

Просмотреть файл

@ -5,25 +5,19 @@
import { LiveValidator } from "../lib/validators/liveValidator"
const options = {
directory: "C:\\github.com\\Azure\\azure-rest-api-specs",
directory: `${__dirname}/liveValidation/swaggers/`,
swaggerPathsPattern:
"specification\\batch\\resource-manager\\Microsoft.Batch\\stable\\2017-01-01\\" +
"BatchManagement.json"
"specification\\apimanagement\\resource-manager\\Microsoft.ApiManagement\\preview\\2018-01-01\\*.json",
git: {
shouldClone: false
}
}
const validator = new LiveValidator(options)
describe("Live validation", () => {
test("sample call", async () => {
// tslint:disable-next-line:no-floating-promises
validator.initialize().then(() => {
const reqRes = require(__dirname +
"/liveValidation/swaggers/specification/storage/resource-manager/" +
"Microsoft.Storage/2016-01-01/live/StorageAccounts_CheckNameAvailability.json")
const requestResponseObj = {
liveRequest: reqRes.request,
liveResponse: reqRes.response
}
validator.validateLiveRequestResponse(requestResponseObj)
})
})
// tslint:disable-next-line:no-floating-promises
validator.initialize().then(() => {
const reqRes = require(`${__dirname}/liveValidation/payloads/objectMissingRequiredProperty_input.json`)
const result = validator.validateLiveRequestResponse(reqRes)
// tslint:disable-next-line:no-console
console.log(`${result}`)
})