{
  "swagger": "2.0",
  "schemes": [
    "https"
  ],
  "host": "management.azure.com",
  "info": {
    "description": "Use these REST APIs for performing operations on Product entity associated with your Azure API Management deployment. The Product entity represents a product in API Management. Products include one or more APIs and their associated terms of use. Once a product is published, developers can subscribe to the product and begin to use the product’s APIs.",
    "title": "ApiManagementClient",
    "version": "2016-10-10",
    "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/2016-10-10/apimproducts.json",
        "version": "2.0"
      }
    ],
    "x-preferred": false,
    "x-providerName": "azure.com",
    "x-serviceName": "apimanagement-apimproducts",
    "x-tags": [
      "Azure",
      "Microsoft"
    ]
  },
  "consumes": [
    "application/json"
  ],
  "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": {
    "ProductIdParameter": {
      "description": "Product identifier. Must be unique in the current API Management service instance.",
      "in": "path",
      "maxLength": 256,
      "minLength": 1,
      "name": "productId",
      "pattern": "^[^*#&+:<>?]+$",
      "required": true,
      "type": "string",
      "x-ms-parameter-location": "method"
    }
  },
  "paths": {
    "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products": {
      "get": {
        "description": "Lists a collection of products in the specified service instance.",
        "externalDocs": {
          "url": "https://msdn.microsoft.com/en-us/library/azure/dn776336.aspx"
        },
        "operationId": "Products_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| description | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |\n| terms       | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |\n| state       | eq                     |                                             |",
            "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": "When set to true, the response contains an array of groups that have visibility to the product. The default is false.",
            "in": "query",
            "name": "expandGroups",
            "required": false,
            "type": "boolean"
          },
          {
            "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": "A Collection of the Product entities for the specified API Management service instance.",
            "schema": {
              "$ref": "#/definitions/ProductCollection"
            }
          },
          "default": {
            "description": "Error response describing why the operation failed.",
            "schema": {
              "description": "Error Body contract.",
              "properties": {
                "code": {
                  "description": "Service-defined error code. This code serves as a sub-status for the HTTP error code specified in the response.",
                  "type": "string"
                },
                "details": {
                  "description": "The list of invalid fields send in request, in case of validation error.",
                  "items": {
                    "description": "Error Field contract.",
                    "properties": {
                      "code": {
                        "description": "Property level error code.",
                        "type": "string"
                      },
                      "message": {
                        "description": "Human-readable representation of property-level error.",
                        "type": "string"
                      },
                      "target": {
                        "description": "Property name.",
                        "type": "string"
                      }
                    }
                  },
                  "type": "array"
                },
                "message": {
                  "description": "Human-readable representation of the error.",
                  "type": "string"
                }
              }
            }
          }
        },
        "tags": [
          "Products"
        ],
        "x-ms-odata": "#/definitions/ProductContract",
        "x-ms-pageable": {
          "nextLinkName": "nextLink"
        }
      }
    },
    "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}": {
      "delete": {
        "description": "Delete product.",
        "operationId": "Products_Delete",
        "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"
          },
          {
            "$ref": "#/parameters/ProductIdParameter"
          },
          {
            "description": "Delete existing subscriptions to the product or not.",
            "in": "query",
            "name": "deleteSubscriptions",
            "required": false,
            "type": "boolean"
          },
          {
            "description": "ETag of the Product Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update.",
            "in": "header",
            "name": "If-Match",
            "required": true,
            "type": "string"
          },
          {
            "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": {
          "204": {
            "description": "The product was successfully deleted."
          },
          "default": {
            "description": "Error response describing why the operation failed.",
            "schema": {
              "description": "Error Body contract.",
              "properties": {
                "code": {
                  "description": "Service-defined error code. This code serves as a sub-status for the HTTP error code specified in the response.",
                  "type": "string"
                },
                "details": {
                  "description": "The list of invalid fields send in request, in case of validation error.",
                  "items": {
                    "description": "Error Field contract.",
                    "properties": {
                      "code": {
                        "description": "Property level error code.",
                        "type": "string"
                      },
                      "message": {
                        "description": "Human-readable representation of property-level error.",
                        "type": "string"
                      },
                      "target": {
                        "description": "Property name.",
                        "type": "string"
                      }
                    }
                  },
                  "type": "array"
                },
                "message": {
                  "description": "Human-readable representation of the error.",
                  "type": "string"
                }
              }
            }
          }
        },
        "tags": [
          "Products"
        ]
      },
      "get": {
        "description": "Gets the details of the product specified by its identifier.",
        "operationId": "Products_Get",
        "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"
          },
          {
            "$ref": "#/parameters/ProductIdParameter"
          },
          {
            "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": "The response body contains the specified Product entity.",
            "headers": {
              "ETag": {
                "description": "Current entity state version. Should be treated as opaque and used to make conditional HTTP requests.",
                "type": "string"
              }
            },
            "schema": {
              "$ref": "#/definitions/ProductContract"
            }
          },
          "default": {
            "description": "Error response describing why the operation failed.",
            "schema": {
              "description": "Error Body contract.",
              "properties": {
                "code": {
                  "description": "Service-defined error code. This code serves as a sub-status for the HTTP error code specified in the response.",
                  "type": "string"
                },
                "details": {
                  "description": "The list of invalid fields send in request, in case of validation error.",
                  "items": {
                    "description": "Error Field contract.",
                    "properties": {
                      "code": {
                        "description": "Property level error code.",
                        "type": "string"
                      },
                      "message": {
                        "description": "Human-readable representation of property-level error.",
                        "type": "string"
                      },
                      "target": {
                        "description": "Property name.",
                        "type": "string"
                      }
                    }
                  },
                  "type": "array"
                },
                "message": {
                  "description": "Human-readable representation of the error.",
                  "type": "string"
                }
              }
            }
          }
        },
        "tags": [
          "Products"
        ]
      },
      "patch": {
        "description": "Update product.",
        "operationId": "Products_Update",
        "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"
          },
          {
            "$ref": "#/parameters/ProductIdParameter"
          },
          {
            "description": "Update parameters.",
            "in": "body",
            "name": "parameters",
            "required": true,
            "schema": {
              "$ref": "#/definitions/ProductUpdateParameters"
            }
          },
          {
            "description": "ETag of the Product Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update.",
            "in": "header",
            "name": "If-Match",
            "required": true,
            "type": "string"
          },
          {
            "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": {
          "204": {
            "description": "No Content in case of Update Successful."
          },
          "default": {
            "description": "Error response describing why the operation failed.",
            "schema": {
              "description": "Error Body contract.",
              "properties": {
                "code": {
                  "description": "Service-defined error code. This code serves as a sub-status for the HTTP error code specified in the response.",
                  "type": "string"
                },
                "details": {
                  "description": "The list of invalid fields send in request, in case of validation error.",
                  "items": {
                    "description": "Error Field contract.",
                    "properties": {
                      "code": {
                        "description": "Property level error code.",
                        "type": "string"
                      },
                      "message": {
                        "description": "Human-readable representation of property-level error.",
                        "type": "string"
                      },
                      "target": {
                        "description": "Property name.",
                        "type": "string"
                      }
                    }
                  },
                  "type": "array"
                },
                "message": {
                  "description": "Human-readable representation of the error.",
                  "type": "string"
                }
              }
            }
          }
        },
        "tags": [
          "Products"
        ]
      },
      "put": {
        "description": "Creates or Updates a product.",
        "operationId": "Products_CreateOrUpdate",
        "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"
          },
          {
            "$ref": "#/parameters/ProductIdParameter"
          },
          {
            "description": "Create or update parameters.",
            "in": "body",
            "name": "parameters",
            "required": true,
            "schema": {
              "$ref": "#/definitions/ProductContract"
            }
          },
          {
            "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": {
          "201": {
            "description": "Product was successfully created."
          },
          "204": {
            "description": "Product was successfully updated."
          },
          "default": {
            "description": "Error response describing why the operation failed.",
            "schema": {
              "description": "Error Body contract.",
              "properties": {
                "code": {
                  "description": "Service-defined error code. This code serves as a sub-status for the HTTP error code specified in the response.",
                  "type": "string"
                },
                "details": {
                  "description": "The list of invalid fields send in request, in case of validation error.",
                  "items": {
                    "description": "Error Field contract.",
                    "properties": {
                      "code": {
                        "description": "Property level error code.",
                        "type": "string"
                      },
                      "message": {
                        "description": "Human-readable representation of property-level error.",
                        "type": "string"
                      },
                      "target": {
                        "description": "Property name.",
                        "type": "string"
                      }
                    }
                  },
                  "type": "array"
                },
                "message": {
                  "description": "Human-readable representation of the error.",
                  "type": "string"
                }
              }
            }
          }
        },
        "tags": [
          "Products"
        ]
      }
    },
    "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/apis": {
      "get": {
        "description": "Lists a collection of the APIs associated with a product.",
        "operationId": "ProductApis_ListByProducts",
        "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"
          },
          {
            "$ref": "#/parameters/ProductIdParameter"
          },
          {
            "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| serviceUrl  | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |\n| path        | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |\n",
            "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": "The response body contains a collection of Api entities in the product.",
            "schema": {
              "description": "Paged Api list representation.",
              "properties": {
                "count": {
                  "description": "Total record count number across all pages.",
                  "format": "int64",
                  "type": "integer"
                },
                "nextLink": {
                  "description": "Next page link if any.",
                  "type": "string"
                },
                "value": {
                  "description": "Page values.",
                  "items": {
                    "allOf": [
                      {
                        "description": "API base contract details.",
                        "properties": {
                          "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"
                          },
                          "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-enum": {
                              "modelAsString": false,
                              "name": "ApiTypeContract"
                            }
                          }
                        }
                      }
                    ],
                    "description": "API details.",
                    "properties": {
                      "id": {
                        "description": "API identifier path: /apis/{apiId}",
                        "readOnly": true,
                        "type": "string"
                      },
                      "name": {
                        "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": "ApiProtocolContract"
                          }
                        },
                        "type": "array"
                      },
                      "serviceUrl": {
                        "description": "Absolute URL of the backend service implementing this API.",
                        "maxLength": 2000,
                        "minLength": 1,
                        "type": "string"
                      }
                    },
                    "required": [
                      "name",
                      "serviceUrl",
                      "path",
                      "protocols"
                    ]
                  },
                  "type": "array"
                }
              }
            }
          },
          "default": {
            "description": "Error response describing why the operation failed.",
            "schema": {
              "description": "Error Body contract.",
              "properties": {
                "code": {
                  "description": "Service-defined error code. This code serves as a sub-status for the HTTP error code specified in the response.",
                  "type": "string"
                },
                "details": {
                  "description": "The list of invalid fields send in request, in case of validation error.",
                  "items": {
                    "description": "Error Field contract.",
                    "properties": {
                      "code": {
                        "description": "Property level error code.",
                        "type": "string"
                      },
                      "message": {
                        "description": "Human-readable representation of property-level error.",
                        "type": "string"
                      },
                      "target": {
                        "description": "Property name.",
                        "type": "string"
                      }
                    }
                  },
                  "type": "array"
                },
                "message": {
                  "description": "Human-readable representation of the error.",
                  "type": "string"
                }
              }
            }
          }
        },
        "tags": [
          "ProductApis"
        ],
        "x-ms-odata": "./apimapis.json#/definitions/ApiContract",
        "x-ms-pageable": {
          "nextLinkName": "nextLink"
        }
      }
    },
    "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/apis/{apiId}": {
      "delete": {
        "description": "Deletes the specified API from the specified product.",
        "operationId": "ProductApis_Delete",
        "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"
          },
          {
            "$ref": "#/parameters/ProductIdParameter"
          },
          {
            "description": "API identifier. Must be unique in the current API Management service instance.",
            "in": "path",
            "maxLength": 256,
            "minLength": 1,
            "name": "apiId",
            "pattern": "^[^*#&+:<>?]+$",
            "required": true,
            "type": "string",
            "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": {
          "204": {
            "description": "The API was successfully removed from the product."
          },
          "default": {
            "description": "Error response describing why the operation failed.",
            "schema": {
              "description": "Error Body contract.",
              "properties": {
                "code": {
                  "description": "Service-defined error code. This code serves as a sub-status for the HTTP error code specified in the response.",
                  "type": "string"
                },
                "details": {
                  "description": "The list of invalid fields send in request, in case of validation error.",
                  "items": {
                    "description": "Error Field contract.",
                    "properties": {
                      "code": {
                        "description": "Property level error code.",
                        "type": "string"
                      },
                      "message": {
                        "description": "Human-readable representation of property-level error.",
                        "type": "string"
                      },
                      "target": {
                        "description": "Property name.",
                        "type": "string"
                      }
                    }
                  },
                  "type": "array"
                },
                "message": {
                  "description": "Human-readable representation of the error.",
                  "type": "string"
                }
              }
            }
          }
        },
        "tags": [
          "ProductApis"
        ]
      },
      "put": {
        "description": "Adds an API to the specified product.",
        "operationId": "ProductApis_Create",
        "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"
          },
          {
            "$ref": "#/parameters/ProductIdParameter"
          },
          {
            "description": "API identifier. Must be unique in the current API Management service instance.",
            "in": "path",
            "maxLength": 256,
            "minLength": 1,
            "name": "apiId",
            "pattern": "^[^*#&+:<>?]+$",
            "required": true,
            "type": "string",
            "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": {
          "201": {
            "description": "The API was successfully added to the product."
          },
          "204": {
            "description": "The specified API is already added to the product."
          },
          "default": {
            "description": "Error response describing why the operation failed.",
            "schema": {
              "description": "Error Body contract.",
              "properties": {
                "code": {
                  "description": "Service-defined error code. This code serves as a sub-status for the HTTP error code specified in the response.",
                  "type": "string"
                },
                "details": {
                  "description": "The list of invalid fields send in request, in case of validation error.",
                  "items": {
                    "description": "Error Field contract.",
                    "properties": {
                      "code": {
                        "description": "Property level error code.",
                        "type": "string"
                      },
                      "message": {
                        "description": "Human-readable representation of property-level error.",
                        "type": "string"
                      },
                      "target": {
                        "description": "Property name.",
                        "type": "string"
                      }
                    }
                  },
                  "type": "array"
                },
                "message": {
                  "description": "Human-readable representation of the error.",
                  "type": "string"
                }
              }
            }
          }
        },
        "tags": [
          "ProductApis"
        ]
      }
    },
    "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/groups": {
      "get": {
        "description": "Lists the collection of developer groups associated with the specified product.",
        "operationId": "ProductGroups_ListByProducts",
        "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"
          },
          {
            "$ref": "#/parameters/ProductIdParameter"
          },
          {
            "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                                         |",
            "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 Group entities.",
            "schema": {
              "description": "Paged Group list representation.",
              "properties": {
                "count": {
                  "description": "Total record count number across all pages.",
                  "format": "int64",
                  "type": "integer"
                },
                "nextLink": {
                  "description": "Next page link if any.",
                  "type": "string"
                },
                "value": {
                  "description": "Page values.",
                  "items": {
                    "description": "Developer group.",
                    "properties": {
                      "builtIn": {
                        "description": "true if the group is one of the three system groups (Administrators, Developers, or Guests); otherwise false.",
                        "readOnly": true,
                        "type": "boolean"
                      },
                      "description": {
                        "description": "Group description. Can contain HTML formatting tags.",
                        "maxLength": 1000,
                        "type": "string"
                      },
                      "externalId": {
                        "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.",
                        "readOnly": true,
                        "type": "string"
                      },
                      "id": {
                        "description": "Uniquely identifies the group within the current API Management service instance. The value is a valid relative URL in the format of /groups/{groupId} where {groupId} is a group identifier.",
                        "readOnly": true,
                        "type": "string"
                      },
                      "name": {
                        "description": "Group name.",
                        "maxLength": 300,
                        "minLength": 1,
                        "type": "string"
                      },
                      "type": {
                        "description": "Group type.",
                        "enum": [
                          "Custom",
                          "System",
                          "External"
                        ],
                        "readOnly": true,
                        "type": "string",
                        "x-ms-enum": {
                          "modelAsString": false,
                          "name": "GroupTypeContract"
                        }
                      }
                    },
                    "required": [
                      "name"
                    ]
                  },
                  "type": "array"
                }
              }
            }
          },
          "default": {
            "description": "Error response describing why the operation failed.",
            "schema": {
              "description": "Error Body contract.",
              "properties": {
                "code": {
                  "description": "Service-defined error code. This code serves as a sub-status for the HTTP error code specified in the response.",
                  "type": "string"
                },
                "details": {
                  "description": "The list of invalid fields send in request, in case of validation error.",
                  "items": {
                    "description": "Error Field contract.",
                    "properties": {
                      "code": {
                        "description": "Property level error code.",
                        "type": "string"
                      },
                      "message": {
                        "description": "Human-readable representation of property-level error.",
                        "type": "string"
                      },
                      "target": {
                        "description": "Property name.",
                        "type": "string"
                      }
                    }
                  },
                  "type": "array"
                },
                "message": {
                  "description": "Human-readable representation of the error.",
                  "type": "string"
                }
              }
            }
          }
        },
        "tags": [
          "ProductGroups"
        ],
        "x-ms-odata": "./apimgroups.json#/definitions/GroupContract",
        "x-ms-pageable": {
          "nextLinkName": "nextLink"
        }
      }
    },
    "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/groups/{groupId}": {
      "delete": {
        "description": "Deletes the association between the specified group and product.",
        "operationId": "ProductGroups_Delete",
        "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"
          },
          {
            "$ref": "#/parameters/ProductIdParameter"
          },
          {
            "description": "Group identifier. Must be unique in the current API Management service instance.",
            "in": "path",
            "maxLength": 256,
            "minLength": 1,
            "name": "groupId",
            "pattern": "^[^*#&+:<>?]+$",
            "required": true,
            "type": "string",
            "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": {
          "204": {
            "description": "The group was successfully disassociated with the product."
          },
          "400": {
            "description": "Request validation failed.This is typically caused by an invalid product or group id.",
            "schema": {
              "description": "Error Body contract.",
              "properties": {
                "code": {
                  "description": "Service-defined error code. This code serves as a sub-status for the HTTP error code specified in the response.",
                  "type": "string"
                },
                "details": {
                  "description": "The list of invalid fields send in request, in case of validation error.",
                  "items": {
                    "description": "Error Field contract.",
                    "properties": {
                      "code": {
                        "description": "Property level error code.",
                        "type": "string"
                      },
                      "message": {
                        "description": "Human-readable representation of property-level error.",
                        "type": "string"
                      },
                      "target": {
                        "description": "Property name.",
                        "type": "string"
                      }
                    }
                  },
                  "type": "array"
                },
                "message": {
                  "description": "Human-readable representation of the error.",
                  "type": "string"
                }
              }
            }
          },
          "default": {
            "description": "Error response describing why the operation failed.",
            "schema": {
              "description": "Error Body contract.",
              "properties": {
                "code": {
                  "description": "Service-defined error code. This code serves as a sub-status for the HTTP error code specified in the response.",
                  "type": "string"
                },
                "details": {
                  "description": "The list of invalid fields send in request, in case of validation error.",
                  "items": {
                    "description": "Error Field contract.",
                    "properties": {
                      "code": {
                        "description": "Property level error code.",
                        "type": "string"
                      },
                      "message": {
                        "description": "Human-readable representation of property-level error.",
                        "type": "string"
                      },
                      "target": {
                        "description": "Property name.",
                        "type": "string"
                      }
                    }
                  },
                  "type": "array"
                },
                "message": {
                  "description": "Human-readable representation of the error.",
                  "type": "string"
                }
              }
            }
          }
        },
        "tags": [
          "ProductGroups"
        ]
      },
      "put": {
        "description": "Adds the association between the specified developer group with the specified product.",
        "operationId": "ProductGroups_Create",
        "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"
          },
          {
            "$ref": "#/parameters/ProductIdParameter"
          },
          {
            "description": "Group identifier. Must be unique in the current API Management service instance.",
            "in": "path",
            "maxLength": 256,
            "minLength": 1,
            "name": "groupId",
            "pattern": "^[^*#&+:<>?]+$",
            "required": true,
            "type": "string",
            "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": {
          "201": {
            "description": "The group was successfully associated with the product.."
          },
          "204": {
            "description": "The specified group is already associated with the product."
          },
          "default": {
            "description": "Error response describing why the operation failed.",
            "schema": {
              "description": "Error Body contract.",
              "properties": {
                "code": {
                  "description": "Service-defined error code. This code serves as a sub-status for the HTTP error code specified in the response.",
                  "type": "string"
                },
                "details": {
                  "description": "The list of invalid fields send in request, in case of validation error.",
                  "items": {
                    "description": "Error Field contract.",
                    "properties": {
                      "code": {
                        "description": "Property level error code.",
                        "type": "string"
                      },
                      "message": {
                        "description": "Human-readable representation of property-level error.",
                        "type": "string"
                      },
                      "target": {
                        "description": "Property name.",
                        "type": "string"
                      }
                    }
                  },
                  "type": "array"
                },
                "message": {
                  "description": "Human-readable representation of the error.",
                  "type": "string"
                }
              }
            }
          }
        },
        "tags": [
          "ProductGroups"
        ]
      }
    },
    "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/policy": {
      "delete": {
        "description": "Deletes the policy configuration at the Product.",
        "operationId": "ProductPolicy_Delete",
        "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"
          },
          {
            "$ref": "#/parameters/ProductIdParameter"
          },
          {
            "description": "The entity state (Etag) version of the product policy to update. A value of \"*\" can be used for If-Match to unconditionally apply the operation.",
            "in": "header",
            "name": "If-Match",
            "required": true,
            "type": "string"
          },
          {
            "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": {
          "204": {
            "description": "Successfully deleted the policy configuration at the Product level."
          },
          "default": {
            "description": "Error response describing why the operation failed.",
            "schema": {
              "description": "Error Body contract.",
              "properties": {
                "code": {
                  "description": "Service-defined error code. This code serves as a sub-status for the HTTP error code specified in the response.",
                  "type": "string"
                },
                "details": {
                  "description": "The list of invalid fields send in request, in case of validation error.",
                  "items": {
                    "description": "Error Field contract.",
                    "properties": {
                      "code": {
                        "description": "Property level error code.",
                        "type": "string"
                      },
                      "message": {
                        "description": "Human-readable representation of property-level error.",
                        "type": "string"
                      },
                      "target": {
                        "description": "Property name.",
                        "type": "string"
                      }
                    }
                  },
                  "type": "array"
                },
                "message": {
                  "description": "Human-readable representation of the error.",
                  "type": "string"
                }
              }
            }
          }
        },
        "tags": [
          "ProductPolicy"
        ]
      },
      "get": {
        "description": "Get the policy configuration at the Product level.",
        "operationId": "ProductPolicy_Get",
        "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": "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"
          },
          {
            "$ref": "#/parameters/ProductIdParameter"
          }
        ],
        "produces": [
          "application/vnd.ms-azure-apim.policy+xml"
        ],
        "responses": {
          "200": {
            "description": "Product Policy information.",
            "headers": {
              "ETag": {
                "description": "Current entity state version. Should be treated as opaque and used to make conditional HTTP requests.",
                "type": "string"
              }
            },
            "schema": {
              "type": "file"
            }
          }
        },
        "tags": [
          "ProductPolicy"
        ]
      },
      "put": {
        "consumes": [
          "application/vnd.ms-azure-apim.policy+xml"
        ],
        "description": "Creates or updates policy configuration for the Product.",
        "operationId": "ProductPolicy_CreateOrUpdate",
        "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"
          },
          {
            "$ref": "#/parameters/ProductIdParameter"
          },
          {
            "description": "The policy contents to apply.",
            "in": "body",
            "name": "parameters",
            "required": true,
            "schema": {
              "format": "file",
              "type": "object"
            }
          },
          {
            "description": "The entity state (Etag) version of the product policy to update. A value of \"*\" can be used for If-Match to unconditionally apply the operation.",
            "in": "header",
            "name": "If-Match",
            "required": true,
            "type": "string"
          },
          {
            "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": {
          "201": {
            "description": "Product policy configuration was successfully created."
          },
          "204": {
            "description": "Product policy configuration of the tenant was successfully updated."
          },
          "default": {
            "description": "Error response describing why the operation failed.",
            "schema": {
              "description": "Error Body contract.",
              "properties": {
                "code": {
                  "description": "Service-defined error code. This code serves as a sub-status for the HTTP error code specified in the response.",
                  "type": "string"
                },
                "details": {
                  "description": "The list of invalid fields send in request, in case of validation error.",
                  "items": {
                    "description": "Error Field contract.",
                    "properties": {
                      "code": {
                        "description": "Property level error code.",
                        "type": "string"
                      },
                      "message": {
                        "description": "Human-readable representation of property-level error.",
                        "type": "string"
                      },
                      "target": {
                        "description": "Property name.",
                        "type": "string"
                      }
                    }
                  },
                  "type": "array"
                },
                "message": {
                  "description": "Human-readable representation of the error.",
                  "type": "string"
                }
              }
            }
          }
        },
        "tags": [
          "ProductPolicy"
        ]
      }
    },
    "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/subscriptions": {
      "get": {
        "description": "Lists the collection of subscriptions to the specified product.",
        "operationId": "ProductSubscriptions_ListByProducts",
        "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"
          },
          {
            "$ref": "#/parameters/ProductIdParameter"
          },
          {
            "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                     |                                             |",
            "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 subscription entities.",
            "schema": {
              "description": "Paged Subscriptions list representation.",
              "properties": {
                "count": {
                  "description": "Total record count number across all pages.",
                  "format": "int64",
                  "type": "integer"
                },
                "nextLink": {
                  "description": "Next page link if any.",
                  "type": "string"
                },
                "value": {
                  "description": "Page values.",
                  "items": {
                    "description": "Subscription details.",
                    "properties": {
                      "createdDate": {
                        "description": "Subscription creation date. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard.\n",
                        "format": "date-time",
                        "readOnly": true,
                        "type": "string"
                      },
                      "endDate": {
                        "description": "Date when subscription was cancelled or expired. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard.\n",
                        "format": "date-time",
                        "type": "string"
                      },
                      "expirationDate": {
                        "description": "Subscription expiration date. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard.\n",
                        "format": "date-time",
                        "type": "string"
                      },
                      "id": {
                        "description": "Uniquely identifies the subscription within the current API Management service instance. The value is a valid relative URL in the format of /subscriptions/{sid} where {sid} is a subscription identifier.",
                        "readOnly": true,
                        "type": "string"
                      },
                      "name": {
                        "description": "The name of the subscription, or null if the subscription has no name.",
                        "maxLength": 100,
                        "minLength": 0,
                        "type": "string"
                      },
                      "notificationDate": {
                        "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",
                        "format": "date-time",
                        "type": "string"
                      },
                      "primaryKey": {
                        "description": "Subscription primary key.",
                        "maxLength": 256,
                        "minLength": 1,
                        "type": "string"
                      },
                      "productId": {
                        "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.",
                        "type": "string"
                      },
                      "secondaryKey": {
                        "description": "Subscription secondary key.",
                        "maxLength": 256,
                        "minLength": 1,
                        "type": "string"
                      },
                      "startDate": {
                        "description": "Subscription activation date. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard.\n",
                        "format": "date-time",
                        "type": "string"
                      },
                      "state": {
                        "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"
                        ],
                        "type": "string",
                        "x-ms-enum": {
                          "modelAsString": false,
                          "name": "SubscriptionStateContract"
                        }
                      },
                      "stateComment": {
                        "description": "Optional subscription comment added by an administrator.",
                        "type": "string"
                      },
                      "userId": {
                        "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.",
                        "type": "string"
                      }
                    }
                  },
                  "type": "array"
                }
              }
            }
          },
          "default": {
            "description": "Error response describing why the operation failed.",
            "schema": {
              "description": "Error Body contract.",
              "properties": {
                "code": {
                  "description": "Service-defined error code. This code serves as a sub-status for the HTTP error code specified in the response.",
                  "type": "string"
                },
                "details": {
                  "description": "The list of invalid fields send in request, in case of validation error.",
                  "items": {
                    "description": "Error Field contract.",
                    "properties": {
                      "code": {
                        "description": "Property level error code.",
                        "type": "string"
                      },
                      "message": {
                        "description": "Human-readable representation of property-level error.",
                        "type": "string"
                      },
                      "target": {
                        "description": "Property name.",
                        "type": "string"
                      }
                    }
                  },
                  "type": "array"
                },
                "message": {
                  "description": "Human-readable representation of the error.",
                  "type": "string"
                }
              }
            }
          }
        },
        "tags": [
          "ProductSubscriptions"
        ],
        "x-ms-odata": "./apimsubscriptions.json#/definitions/SubscriptionContract",
        "x-ms-pageable": {
          "nextLinkName": "nextLink"
        }
      }
    }
  },
  "definitions": {
    "ProductCollection": {
      "description": "Paged Products list representation.",
      "properties": {
        "count": {
          "description": "Total record count number across all pages.",
          "format": "int64",
          "type": "integer"
        },
        "nextLink": {
          "description": "Next page link if any.",
          "type": "string"
        },
        "value": {
          "description": "Page values.",
          "items": {
            "$ref": "#/definitions/ProductContract"
          },
          "type": "array"
        }
      }
    },
    "ProductContract": {
      "description": "Product profile.",
      "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"
        },
        "id": {
          "description": "Uniquely identifies the product within the current API Management service instance. The value is a valid relative URL in the format of /products/{productId} where {productId} is a product identifier.",
          "readOnly": true,
          "type": "string"
        },
        "name": {
          "description": "Product name.",
          "maxLength": 300,
          "minLength": 1,
          "type": "string"
        },
        "state": {
          "default": "NotPublished",
          "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": "ProductStateContract"
          }
        },
        "subscriptionRequired": {
          "default": true,
          "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"
        }
      },
      "required": [
        "name"
      ]
    },
    "ProductUpdateParameters": {
      "description": "Parameters supplied to the CreateOrUpdate Product operation.",
      "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.",
          "maxLength": 500,
          "minLength": 1,
          "type": "string"
        },
        "name": {
          "description": "Product name.",
          "maxLength": 300,
          "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.",
          "enum": [
            "NotPublished",
            "Published"
          ],
          "type": "string",
          "x-ms-enum": {
            "modelAsString": false,
            "name": "ProductStateContract"
          }
        },
        "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 and conditions. Developer will have to accept these terms before he's allowed to call product API.",
          "type": "string"
        }
      }
    }
  }
}