{
  "swagger": "2.0",
  "schemes": [
    "https"
  ],
  "host": "management.azure.com",
  "info": {
    "description": "Use these REST APIs for querying APIs. Operations and Products by tags in your Azure API Management deployment.",
    "title": "ApiManagementClient",
    "version": "2017-03-01",
    "x-apisguru-categories": [
      "cloud"
    ],
    "x-logo": {
      "url": "https://api.apis.guru/v2/cache/logo/https_assets.onestore.ms_cdnfiles_onestorerolling-1606-01000_shell_v3_images_logo_microsoft.png"
    },
    "x-origin": [
      {
        "format": "swagger",
        "url": "https://raw.githubusercontent.com/Azure/azure-rest-api-specs/master/specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2017-03-01/apimtagresources.json",
        "version": "2.0"
      }
    ],
    "x-preferred": false,
    "x-providerName": "azure.com",
    "x-serviceName": "apimanagement-apimtagresources",
    "x-tags": [
      "Azure",
      "Microsoft"
    ]
  },
  "consumes": [],
  "produces": [
    "application/json"
  ],
  "securityDefinitions": {
    "azure_auth": {
      "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize",
      "description": "Azure Active Directory OAuth2 Flow.",
      "flow": "implicit",
      "scopes": {
        "user_impersonation": "impersonate your user account"
      },
      "type": "oauth2"
    }
  },
  "security": [
    {
      "azure_auth": [
        "user_impersonation"
      ]
    }
  ],
  "parameters": {},
  "paths": {
    "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tagResources": {
      "get": {
        "description": "Lists a collection of resources associated with tags.",
        "operationId": "TagResource_ListByService",
        "parameters": [
          {
            "description": "The name of the resource group.",
            "in": "path",
            "name": "resourceGroupName",
            "required": true,
            "type": "string",
            "x-ms-parameter-location": "method"
          },
          {
            "description": "The name of the API Management service.",
            "in": "path",
            "maxLength": 50,
            "minLength": 1,
            "name": "serviceName",
            "pattern": "^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$",
            "required": true,
            "type": "string",
            "x-ms-parameter-location": "method"
          },
          {
            "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 |",
            "in": "query",
            "name": "$filter",
            "required": false,
            "type": "string"
          },
          {
            "description": "Number of records to return.",
            "format": "int32",
            "in": "query",
            "minimum": 1,
            "name": "$top",
            "required": false,
            "type": "integer",
            "x-ms-parameter-location": "method"
          },
          {
            "description": "Number of records to skip.",
            "format": "int32",
            "in": "query",
            "minimum": 0,
            "name": "$skip",
            "required": false,
            "type": "integer",
            "x-ms-parameter-location": "method"
          },
          {
            "description": "Version of the API to be used with the client request.",
            "in": "query",
            "name": "api-version",
            "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.",
            "in": "path",
            "name": "subscriptionId",
            "required": true,
            "type": "string"
          }
        ],
        "responses": {
          "200": {
            "description": "Lists a collection of TagResource entities.",
            "schema": {
              "$ref": "#/definitions/TagResourceCollection"
            }
          }
        },
        "tags": [
          "TagResources"
        ],
        "x-ms-examples": {
          "ApiManagementListTagResources": {
            "parameters": {
              "api-version": "2017-03-01",
              "resourceGroupName": "rg1",
              "serviceName": "apimService1",
              "subscriptionId": "subid"
            },
            "responses": {
              "200": {
                "body": {
                  "value": [
                    {
                      "properties": {
                        "operation": {
                          "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/apiId1/operations/opid1",
                          "name": "opid1",
                          "properties": {
                            "apiName": "api1",
                            "apiRevision": "1",
                            "apiVersion": null,
                            "description": "some operation",
                            "displayName": "apiop1",
                            "method": "GET",
                            "urlTemplate": "/op1"
                          },
                          "type": "Microsoft.ApiManagement/service/apis/operations"
                        },
                        "tag": {
                          "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/tags/5600b59375ff190048020001",
                          "name": "5600b59375ff190048020001",
                          "properties": {
                            "displayName": "tag1"
                          },
                          "type": "Microsoft.ApiManagement/service/tags"
                        }
                      }
                    },
                    {
                      "properties": {
                        "operation": {
                          "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/apiId1/operations/opid2",
                          "name": "opid2",
                          "properties": {
                            "apiName": "api1",
                            "apiRevision": "1",
                            "apiVersion": null,
                            "description": "some operation",
                            "displayName": "apiop2",
                            "method": "GET",
                            "urlTemplate": "/op2"
                          },
                          "type": "Microsoft.ApiManagement/service/apis/operations"
                        },
                        "tag": {
                          "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/tags/5600b59375ff190048020001",
                          "name": "5600b59375ff190048020001",
                          "properties": {
                            "displayName": "tag1"
                          },
                          "type": "Microsoft.ApiManagement/service/tags"
                        }
                      }
                    },
                    {
                      "properties": {
                        "api": {
                          "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/echo-api",
                          "name": "echo-api",
                          "properties": {
                            "apiRevision": "1",
                            "displayName": "Echo API",
                            "isCurrent": true,
                            "isOnline": true,
                            "path": "echo",
                            "protocols": [
                              "https"
                            ],
                            "serviceUrl": "http://echoapi.cloudapp.net/api"
                          },
                          "type": "Microsoft.ApiManagement/service/apis"
                        },
                        "tag": {
                          "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/tags/5600b59375ff190048020002",
                          "name": "5600b59375ff190048020002",
                          "properties": {
                            "displayName": "tag2"
                          },
                          "type": "Microsoft.ApiManagement/service/tags"
                        }
                      }
                    },
                    {
                      "properties": {
                        "product": {
                          "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/products/starter",
                          "name": "starter",
                          "properties": {
                            "approvalRequired": false,
                            "description": "Subscribers will be able to run 5 calls/minute up to a maximum of 100 calls/week.",
                            "displayName": "Starter",
                            "state": "published",
                            "subscriptionRequired": true,
                            "subscriptionsLimit": 1,
                            "terms": ""
                          },
                          "type": "Microsoft.ApiManagement/service/products"
                        },
                        "tag": {
                          "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/tags/5600b59375ff190048020002",
                          "name": "5600b59375ff190048020002",
                          "properties": {
                            "displayName": "tag2"
                          },
                          "type": "Microsoft.ApiManagement/service/tags"
                        }
                      }
                    }
                  ]
                },
                "nextLink": ""
              }
            }
          }
        },
        "x-ms-odata": "#/definitions/TagResourceContract",
        "x-ms-pageable": {
          "nextLinkName": "nextLink"
        }
      }
    }
  },
  "definitions": {
    "OperationEntityContract": {
      "allOf": [
        {
          "description": "The Resource definition.",
          "properties": {
            "id": {
              "description": "Resource ID.",
              "readOnly": true,
              "type": "string"
            },
            "name": {
              "description": "Resource name.",
              "readOnly": true,
              "type": "string"
            },
            "type": {
              "description": "Resource type for API Management resource.",
              "readOnly": true,
              "type": "string"
            }
          },
          "x-ms-azure-resource": true
        }
      ],
      "description": "Operation Entity Contract Properties.",
      "properties": {
        "properties": {
          "$ref": "#/definitions/OperationEntityContractProperties",
          "description": "Operation entity contract properties.",
          "x-ms-client-flatten": true
        }
      }
    },
    "OperationEntityContractProperties": {
      "description": "Operation Entity contract Properties.",
      "properties": {
        "apiName": {
          "description": "Api Name.",
          "readOnly": true,
          "type": "string"
        },
        "apiRevision": {
          "description": "Api Revision.",
          "readOnly": true,
          "type": "string"
        },
        "apiVersion": {
          "description": "Api Version.",
          "readOnly": true,
          "type": "string"
        },
        "description": {
          "description": "Operation Description.",
          "readOnly": true,
          "type": "string"
        },
        "displayName": {
          "description": "Operation name.",
          "readOnly": true,
          "type": "string"
        },
        "method": {
          "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,
          "type": "string"
        },
        "urlTemplate": {
          "description": "Relative URL template identifying the target resource for this operation. May include parameters. Example: /customers/{cid}/orders/{oid}/?date={date}",
          "readOnly": true,
          "type": "string"
        }
      }
    },
    "TagResourceCollection": {
      "description": "Paged Tag list representation.",
      "properties": {
        "nextLink": {
          "description": "Next page link if any.",
          "type": "string"
        },
        "value": {
          "description": "Page values.",
          "items": {
            "$ref": "#/definitions/TagResourceContract"
          },
          "type": "array"
        }
      }
    },
    "TagResourceContract": {
      "allOf": [
        {
          "description": "The Resource definition.",
          "properties": {
            "id": {
              "description": "Resource ID.",
              "readOnly": true,
              "type": "string"
            },
            "name": {
              "description": "Resource name.",
              "readOnly": true,
              "type": "string"
            },
            "type": {
              "description": "Resource type for API Management resource.",
              "readOnly": true,
              "type": "string"
            }
          },
          "x-ms-azure-resource": true
        }
      ],
      "description": "Contract details.",
      "properties": {
        "properties": {
          "$ref": "#/definitions/TagResourceContractProperties",
          "description": "TagResource entity contract properties.",
          "x-ms-client-flatten": true
        }
      }
    },
    "TagResourceContractProperties": {
      "description": "TagResource contract properties.",
      "properties": {
        "api": {
          "allOf": [
            {
              "description": "The Resource definition.",
              "properties": {
                "id": {
                  "description": "Resource ID.",
                  "readOnly": true,
                  "type": "string"
                },
                "name": {
                  "description": "Resource name.",
                  "readOnly": true,
                  "type": "string"
                },
                "type": {
                  "description": "Resource type for API Management resource.",
                  "readOnly": true,
                  "type": "string"
                }
              },
              "x-ms-azure-resource": true
            }
          ],
          "description": "API details.",
          "properties": {
            "properties": {
              "allOf": [
                {
                  "description": "API base contract details.",
                  "properties": {
                    "apiRevision": {
                      "description": "Describes the Revision of the Api. If no value is provided, default revision 1 is created",
                      "maxLength": 100,
                      "minLength": 1,
                      "type": "string"
                    },
                    "apiVersion": {
                      "description": "Indicates the Version identifier of the API if the API is versioned",
                      "maxLength": 100,
                      "type": "string"
                    },
                    "apiVersionSetId": {
                      "description": "A resource identifier for the related ApiVersionSet.",
                      "type": "string"
                    },
                    "authenticationSettings": {
                      "description": "API Authentication Settings.",
                      "properties": {
                        "oAuth2": {
                          "description": "API OAuth2 Authentication settings details.",
                          "properties": {
                            "authorizationServerId": {
                              "description": "OAuth authorization server identifier.",
                              "type": "string"
                            },
                            "scope": {
                              "description": "operations scope.",
                              "type": "string"
                            }
                          }
                        }
                      }
                    },
                    "description": {
                      "description": "Description of the API. May include HTML formatting tags.",
                      "type": "string"
                    },
                    "isCurrent": {
                      "description": "Indicates if API revision is current api revision.",
                      "readOnly": true,
                      "type": "boolean"
                    },
                    "isOnline": {
                      "description": "Indicates if API revision is accessible via the gateway.",
                      "readOnly": true,
                      "type": "boolean"
                    },
                    "subscriptionKeyParameterNames": {
                      "description": "Subscription key parameter names details.",
                      "example": {
                        "subscriptionKeyParameterNames": {
                          "header": "customHeaderParameterName",
                          "query": "customQueryParameterName"
                        }
                      },
                      "properties": {
                        "header": {
                          "description": "Subscription key header name.",
                          "type": "string"
                        },
                        "query": {
                          "description": "Subscription key query string parameter name.",
                          "type": "string"
                        }
                      }
                    },
                    "type": {
                      "description": "Type of API.",
                      "enum": [
                        "http",
                        "soap"
                      ],
                      "type": "string",
                      "x-ms-client-name": "ApiType",
                      "x-ms-enum": {
                        "modelAsString": true,
                        "name": "ApiType"
                      }
                    }
                  }
                }
              ],
              "description": "Api Entity Properties",
              "properties": {
                "apiVersionSet": {
                  "allOf": [
                    {
                      "description": "The Resource definition.",
                      "properties": {
                        "id": {
                          "description": "Resource ID.",
                          "readOnly": true,
                          "type": "string"
                        },
                        "name": {
                          "description": "Resource name.",
                          "readOnly": true,
                          "type": "string"
                        },
                        "type": {
                          "description": "Resource type for API Management resource.",
                          "readOnly": true,
                          "type": "string"
                        }
                      },
                      "x-ms-azure-resource": true
                    }
                  ],
                  "description": "Api Version Set Contract details.",
                  "properties": {
                    "properties": {
                      "allOf": [
                        {
                          "properties": {
                            "description": {
                              "description": "Description of API Version Set.",
                              "type": "string"
                            },
                            "versionHeaderName": {
                              "description": "Name of HTTP header parameter that indicates the API Version if versioningScheme is set to `header`.",
                              "maxLength": 100,
                              "minLength": 1,
                              "type": "string"
                            },
                            "versionQueryName": {
                              "description": "Name of query parameter that indicates the API Version if versioningScheme is set to `query`.",
                              "maxLength": 100,
                              "minLength": 1,
                              "type": "string"
                            }
                          }
                        }
                      ],
                      "description": "Properties of an API Version Set.",
                      "properties": {
                        "displayName": {
                          "description": "Name of API Version Set",
                          "maxLength": 100,
                          "minLength": 1,
                          "type": "string"
                        },
                        "versioningScheme": {
                          "description": "An value that determines where the API Version identifer will be located in a HTTP request.",
                          "enum": [
                            "Segment",
                            "Query",
                            "Header"
                          ],
                          "type": "string",
                          "x-ms-enum": {
                            "modelAsString": true,
                            "name": "versioningScheme",
                            "values": [
                              {
                                "description": "The API Version is passed in a path segment.",
                                "value": "Segment"
                              },
                              {
                                "description": "The API Version is passed in a query parameter.",
                                "value": "Query"
                              },
                              {
                                "description": "The API Version is passed in a HTTP header.",
                                "value": "Header"
                              }
                            ]
                          }
                        }
                      },
                      "required": [
                        "displayName",
                        "versioningScheme"
                      ]
                    }
                  }
                },
                "displayName": {
                  "description": "API name.",
                  "maxLength": 300,
                  "minLength": 1,
                  "type": "string"
                },
                "path": {
                  "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.",
                  "maxLength": 400,
                  "minLength": 0,
                  "type": "string"
                },
                "protocols": {
                  "description": "Describes on which protocols the operations in this API can be invoked.",
                  "items": {
                    "enum": [
                      "http",
                      "https"
                    ],
                    "type": "string",
                    "x-ms-enum": {
                      "modelAsString": false,
                      "name": "Protocol"
                    }
                  },
                  "type": "array"
                },
                "serviceUrl": {
                  "description": "Absolute URL of the backend service implementing this API.",
                  "maxLength": 2000,
                  "minLength": 1,
                  "type": "string"
                }
              },
              "required": [
                "path"
              ]
            }
          }
        },
        "operation": {
          "$ref": "#/definitions/OperationEntityContract",
          "description": "Api associated with the tag."
        },
        "product": {
          "allOf": [
            {
              "description": "The Resource definition.",
              "properties": {
                "id": {
                  "description": "Resource ID.",
                  "readOnly": true,
                  "type": "string"
                },
                "name": {
                  "description": "Resource name.",
                  "readOnly": true,
                  "type": "string"
                },
                "type": {
                  "description": "Resource type for API Management resource.",
                  "readOnly": true,
                  "type": "string"
                }
              },
              "x-ms-azure-resource": true
            }
          ],
          "description": "Product details.",
          "properties": {
            "properties": {
              "allOf": [
                {
                  "description": "Product Entity Base Parameters",
                  "properties": {
                    "approvalRequired": {
                      "description": "whether subscription approval is required. If false, new subscriptions will be approved automatically enabling developers to call the product’s APIs immediately after subscribing. If true, administrators must manually approve the subscription before the developer can any of the product’s APIs. Can be present only if subscriptionRequired property is present and has a value of true.",
                      "type": "boolean"
                    },
                    "description": {
                      "description": "Product description. May include HTML formatting tags.",
                      "maxLength": 1000,
                      "minLength": 1,
                      "type": "string"
                    },
                    "state": {
                      "description": "whether product is published or not. Published products are discoverable by users of developer portal. Non published products are visible only to administrators. Default state of Product is notPublished.",
                      "enum": [
                        "notPublished",
                        "published"
                      ],
                      "type": "string",
                      "x-ms-enum": {
                        "modelAsString": false,
                        "name": "ProductState"
                      }
                    },
                    "subscriptionRequired": {
                      "description": "Whether a product subscription is required for accessing APIs included in this product. If true, the product is referred to as \"protected\" and a valid subscription key is required for a request to an API included in the product to succeed. If false, the product is referred to as \"open\" and requests to an API included in the product can be made without a subscription key. If property is omitted when creating a new product it's value is assumed to be true.",
                      "type": "boolean"
                    },
                    "subscriptionsLimit": {
                      "description": "Whether the number of subscriptions a user can have to this product at the same time. Set to null or omit to allow unlimited per user subscriptions. Can be present only if subscriptionRequired property is present and has a value of true.",
                      "format": "int32",
                      "type": "integer"
                    },
                    "terms": {
                      "description": "Product terms of use. Developers trying to subscribe to the product will be presented and required to accept these terms before they can complete the subscription process.",
                      "type": "string"
                    }
                  }
                }
              ],
              "description": "Product profile.",
              "properties": {
                "displayName": {
                  "description": "Product name.",
                  "maxLength": 300,
                  "minLength": 1,
                  "type": "string"
                }
              },
              "required": [
                "displayName"
              ]
            }
          }
        },
        "tag": {
          "allOf": [
            {
              "description": "The Resource definition.",
              "properties": {
                "id": {
                  "description": "Resource ID.",
                  "readOnly": true,
                  "type": "string"
                },
                "name": {
                  "description": "Resource name.",
                  "readOnly": true,
                  "type": "string"
                },
                "type": {
                  "description": "Resource type for API Management resource.",
                  "readOnly": true,
                  "type": "string"
                }
              },
              "x-ms-azure-resource": true
            }
          ],
          "description": "Tag Contract details.",
          "properties": {
            "properties": {
              "description": "Tag contract Properties.",
              "properties": {
                "displayName": {
                  "description": "Tag name.",
                  "maxLength": 160,
                  "minLength": 1,
                  "type": "string"
                }
              },
              "required": [
                "displayName"
              ]
            }
          }
        }
      }
    }
  }
}