swagger: '2.0' ###################################################### # Prolog ###################################################### info: version: "0.11.0" title: "WSO2 API Manager - Admin" description: | This document specifies a **RESTful API** for WSO2 **API Manager** - Admin Portal. It is written with [swagger 2](http://swagger.io/). contact: name: "WSO2" url: "http://wso2.com/products/api-manager/" email: "architecture@wso2.com" license: name: "Apache 2.0" url: "http://www.apache.org/licenses/LICENSE-2.0.html" ###################################################### # The fixed parts of the URLs of the API ###################################################### # The schemes supported by the API schemes: - https # The domain of the API. # This is configured by the customer during deployment. # The given host is just an example. host: apis.wso2.com # The base path of the API. # Will be prefixed to all paths. basePath: /api/am/admin/v0.11 # The following media types can be passed as input in message bodies of the API. # The actual media type must be specified in the Content-Type header field of the request. # The default is json, i.e. the Content-Type header is not needed to # be set, but supporting it serves extensibility. consumes: - application/json # The following media types may be passed as output in message bodies of the API. # The media type(s) consumable by the requestor is specified in the Accept header field # of the corresponding request. # The actual media type returned will be specfied in the Content-Type header field # of the of the response. # The default of the Accept header is json, i.e. there is not needed to # set the value, but supporting it serves extensibility. produces: - application/json x-wso2-security: apim: x-wso2-scopes: - description: "" roles: admin name: apim:tier_view key: apim:tier_view - description: "" roles: admin name: apim:tier_manage key: apim:tier_manage - description: "" roles: admin name: apim:bl_view key: apim:bl_view - description: "" roles: admin name: apim:bl_manage key: apim:bl_manage - description: "" roles: admin name: apim:mediation_policy_view key: apim:mediation_policy_view - description: "" roles: admin name: apim:mediation_policy_create key: apim:mediation_policy_create ###################################################### # The "API Collection" resource APIs ###################################################### paths: ###################################################### # The "Application Throttle Policy Collection" resource API ###################################################### '/throttling/policies/application': #----------------------------------------------------- # Retrieve all Application level policies #----------------------------------------------------- get: x-scope: apim:tier_view summary: Get all Application level throttle policies description: | Get all Application level throttle policies parameters: - $ref: '#/parameters/Accept' - $ref: '#/parameters/If-None-Match' - $ref: '#/parameters/If-Modified-Since' tags: - Application Policies responses: 200: description: | OK. Policies returned schema: $ref: '#/definitions/ApplicationThrottlePolicyList' headers: Content-Type: description: | The content type of the body. type: string ETag: description: | Entity Tag of the response resource. Used by caches, or in conditional requests. type: string Last-Modified: description: | Date and time the resource has been modifed the last time. Used by caches, or in conditional reuquests. type: string 304: description: | Not Modified. Empty body because the client has already the latest version of the requested resource. 406: description: | Not Acceptable. The requested media type is not supported. schema: $ref: '#/definitions/Error' #----------------------------------------------------- # Add a Application level throttle policy #----------------------------------------------------- post: x-scope: apim:tier_manage summary: Add an Application level throttle policy description: | Add an Application level throttle policy parameters: - in: body name: body description: | Application level policy object that should to be added required: true schema: $ref: '#/definitions/ApplicationThrottlePolicy' - $ref: '#/parameters/Content-Type' tags: - Application Policies responses: 201: description: | Created. Successful response with the newly created object as entity in the body. Location header contains URL of newly created entity. schema: $ref: '#/definitions/ApplicationThrottlePolicy' headers: Location: description: | Location of the newly created Policy object. type: string Content-Type: description: | The content type of the body. type: string ETag: description: | Entity Tag of the response resource. Used by caches, or in conditional request' type: string 400: description: | Bad Request. Invalid request or validation error schema: $ref: '#/definitions/Error' 415: description: | Unsupported media type. The entity of the request was in a not supported format. ###################################################### # The "Individual Application Throttle Policy" resource API ###################################################### '/throttling/policies/application/{policyId}': #----------------------------------------------------- # Retrieve a certain Application Policy #----------------------------------------------------- get: x-scope: apim:tier_view summary: Retrieve an Application Policy description: | Retrieve an Application Policy providing the policy name. parameters: - $ref: '#/parameters/policyId' - $ref: '#/parameters/If-None-Match' - $ref: '#/parameters/If-Modified-Since' tags: - Application Policies responses: 200: description: | OK. Policy returned schema: $ref: '#/definitions/ApplicationThrottlePolicy' headers: Content-Type: description: | The content type of the body. type: string ETag: description: | Entity Tag of the response resource. Used by caches, or in conditional requests. type: string Last-Modified: description: | Date and time the resource has been modifed the last time. Used by caches, or in conditional reuquests. type: string 304: description: | Not Modified. Empty body because the client has already the latest version of the requested resource. 404: description: | Not Found. Requested Tier does not exist. schema: $ref: '#/definitions/Error' 406: description: | Not Acceptable. The requested media type is not supported. schema: $ref: '#/definitions/Error' #----------------------------------------------------- # Delete an Application level throttle policy #----------------------------------------------------- delete: x-scope: apim:tier_manage summary: Delete an Application level throttle policy description: | Delete an Application level throttle policy parameters: - $ref: '#/parameters/policyId' - $ref: '#/parameters/If-Match' - $ref: '#/parameters/If-Unmodified-Since' tags: - Application Policies responses: 200: description: | OK. Resource successfully deleted. 404: description: | Not Found. Resource to be deleted does not exist. schema: $ref: '#/definitions/Error' 412: description: | Precondition Failed. The request has not been performed because one of the preconditions is not met. schema: $ref: '#/definitions/Error' #----------------------------------------------------- # Update an Application throttle policy #----------------------------------------------------- put: x-scope: apim:tier_manage summary: Update an Application level throttle policy description: | Update an Application level throttle policy parameters: - $ref: '#/parameters/policyId' - in: body name: body description: | Policy object that needs to be modified required: true schema: $ref: '#/definitions/ApplicationThrottlePolicy' - $ref: '#/parameters/Content-Type' - $ref: '#/parameters/If-Match' - $ref: '#/parameters/If-Unmodified-Since' tags: - Application Policies responses: 200: description: | OK. Policy updated. schema: $ref: '#/definitions/ApplicationThrottlePolicy' headers: Location: description: | The URL of the newly created resource. type: string Content-Type: description: | The content type of the body. type: string ETag: description: | Entity Tag of the response resource. Used by caches, or in conditional request. type: string Last-Modified: description: | Date and time the resource has been modifed the last time. Used by caches, or in conditional reuquests. type: string 400: description: | Bad Request. Invalid request or validation error. schema: $ref: '#/definitions/Error' 404: description: | Not Found. The resource to be updated does not exist. schema: $ref: '#/definitions/Error' 412: description: | Precondition Failed. The request has not been performed because one of the preconditions is not met. schema: $ref: '#/definitions/Error' /policies/mediation: #----------------------------------------------------------------------------------------- # Retrieving the list of all global mediation sequences under a given search condition #----------------------------------------------------------------------------------------- get: x-scope: apim:mediation_policy_view x-wso2-curl: "curl -k -H \"Authorization: Bearer ae4eae22-3f65-387b-a171-d37eaa366fa8\" https://127.0.0.1:9443/api/am/publisher/v0.11/apis" x-wso2-request: | GET https://127.0.0.1:9443/api/am/publisher/v0.11/apis Authorization: Bearer ae4eae22-3f65-387b-a171-d37eaa366fa8 x-wso2-response: "HTTP/1.1 200 OK\nContent-Type: application/json\n\n{\n \"previous\": \"\",\n \"list\": [\n {\n \"provider\": \"admin\",\n \"version\": \"1.0.0\",\n \"description\": \"This sample API provides Account Status Validation\",\n \"name\": \"AccountVal\",\n \"context\": \"/account\",\n \"id\": \"2e81f147-c8a8-4f68-b4f0-69e0e7510b01\",\n \"status\": \"PUBLISHED\"\n },\n {\n \"provider\": \"admin\",\n \"version\": \"1.0.0\",\n \"description\": null,\n \"name\": \"api1\",\n \"context\": \"/api1\",\n \"id\": \"3e22d2fb-277a-4e9e-8c7e-1c0f7f73960e\",\n \"status\": \"PUBLISHED\"\n }\n ],\n \"next\": \"\",\n \"count\": 2\n}" summary: | Retrieve/Search APIs description: | This operation provides you a list of available APIs qualifying under a given search condition. Each retrieved API is represented with a minimal amount of attributes. If you want to get complete details of an API, you need to use **Get details of an API** operation. parameters: - $ref : '#/parameters/limit' - $ref : '#/parameters/offset' - name : query in: query description: | **Search condition**. You can search in attributes by using an **":"** modifier. Eg. "provider:wso2" will match an API if the provider of the API is exactly "wso2". Additionally you can use wildcards. Eg. "provider:wso2*" will match an API if the provider of the API starts with "wso2". Supported attribute modifiers are [**version, context, status, description, subcontext, doc, provider**] If no advanced attribute modifier has been specified, search will match the given query string against API Name. type: string - $ref : "#/parameters/Accept" - $ref : "#/parameters/If-None-Match" tags: - API (Collection) responses: 200: description: | OK. List of qualifying APIs is returned. schema: $ref: '#/definitions/mediationList' headers: Content-Type: description: The content type of the body. type: string ETag: description: | Entity Tag of the response resource. Used by caches, or in conditional requests (Will be supported in future). type: string 304: description: | Not Modified. Empty body because the client has already the latest version of the requested resource (Will be supported in future). 406: description: | Not Acceptable. The requested media type is not supported schema: $ref: '#/definitions/Error' #---------------------------------------------------------------------------- # Upload a global mediation policy #---------------------------------------------------------------------------- post: x-scope: apim:mediation_policy_create x-wso2-curl: "curl -X POST -H \"Authorization: Bearer d34baf74-3f02-3929-814e-88b27f750ba9\" https://127.0.0.1:9443/api/am/publisher/v0.11/apis/29c9ec3d-f590-467e-83e6-96d43517080f/thumbnail -F file=@image.jpg" x-wso2-request: | POST https://127.0.0.1:9443/api/am/publisher/v0.11/apis/8848faaa-7fd1-478a-baa2-48a4ebb92c98/thumbnail Authorization: Bearer d34baf74-3f02-3929-814e-88b27f750ba9 Content-Type: multipart/form-data; boundary=------------------------5e542e0e5b50e1e4 Content-Length: 18333 --------------------------5e542e0e5b50e1e4 Content-Disposition: form-data; name="file"; filename="sample.pdf" Content-Type: application/octet-stream [file content] --------------------------5e542e0e5b50e1e4-- x-wso2-response: "HTTP/1.1 201 Created\r\nLocation: https://127.0.0.1:9443/api/am/publisher/v0.11/apis/8848faaa-7fd1-478a-baa2-48a4ebb92c98/thumbnail\r\nContent-Type: application/json\r\n\r\n{\r\n \"relativePath\": \"/apis/8848faaa-7fd1-478a-baa2-48a4ebb92c98/thumbnail\",\r\n \"mediaType\": \"image/jpeg\"\r\n}" summary: Upload a global mediation policy description: | This operation can be used to upload a global mediatoin policy to the registry. The file to be uploaded should be given as a form data parameter `file`. parameters: - in: body name: body description: mediation policy to upload required: true schema: $ref: '#/definitions/Mediation' - $ref: '#/parameters/Content-Type' - $ref: '#/parameters/If-Match' - $ref: '#/parameters/If-Unmodified-Since' tags: - mediation policy responses: 200: description: | OK. mediation policy uploaded schema: $ref : '#/definitions/Mediation' headers: Location: description: | The URL of the uploaded thumbnail image of the API. type: string Content-Type: description: | The content type of the body. type: string ETag: description: | Entity Tag of the response resource. Used by caches, or in conditional requests (Will be supported in future). type: string Last-Modified: description: | Date and time the resource has been modifed the last time. Used by caches, or in conditional requests (Will be supported in future). type: string 400: description: | Bad Request. Invalid request or validation error. schema: $ref: '#/definitions/Error' 404: description: | Not Found. The resource to be updated does not exist. schema: $ref: '#/definitions/Error' 412: description: | Precondition Failed. The request has not been performed because one of the preconditions is not met. schema: $ref: '#/definitions/Error' ###################################################### # The "Individual global mediation sequence" resource ###################################################### /policies/mediation/{mediationPolicyId}: #----------------------------------------------------- # Retrieve a particular globle mediation squence #----------------------------------------------------- get: x-scope: apim:mediation_policy_view x-wso2-curl: "curl -k -H \"Authorization: Bearer ae4eae22-3f65-387b-a171-d37eaa366fa8\" \"https://127.0.0.1:9443/api/am/publisher/v0.11/apis/890a4f4d-09eb-4877-a323-57f6ce2ed79b/documents/0bcb7f05-599d-4e1a-adce-5cb89bfe58d5\"" x-wso2-request: | GET https://127.0.0.1:9443/api/am/publisher/v0.11/apis/890a4f4d-09eb-4877-a323-57f6ce2ed79b/documents/0bcb7f05-599d-4e1a-adce-5cb89bfe58d5 Authorization: Bearer ae4eae22-3f65-387b-a171-d37eaa366fa8 x-wso2-response: "HTTP/1.1 200 OK\nContent-Type: application/json\n\n{\n \"visibility\": \"API_LEVEL\",\n \"sourceType\": \"INLINE\",\n \"sourceUrl\": null,\n \"otherTypeName\": null,\n \"documentId\": \"0bcb7f05-599d-4e1a-adce-5cb89bfe58d5\",\n \"summary\": \"This is a sample documentation\",\n \"name\": \"PhoneVerification API Documentation\",\n \"type\": \"HOWTO\"\n}" summary: Get a global mediation squence description: | This operation can be used to retrieve a particular global mediation policy. parameters: - $ref: '#/parameters/mediationPolicyId' - $ref: '#/parameters/Accept' - $ref: '#/parameters/If-None-Match' - $ref: '#/parameters/If-Modified-Since' tags: - Mediation (Individual) responses: 200: description: | OK. Mediation Sequence returned. schema: $ref: '#/definitions/Mediation' headers: Content-Type: description: | The content type of the body. type: string ETag: description: | Entity Tag of the response resource. Used by caches, or in conditional requests (Will be supported in future). type: string Last-Modified: description: | Date and time the resource has been modifed the last time. Used by caches, or in conditional requests (Will be supported in future). type: string 304: description: | Not Modified. Empty body because the client has already the latest version of the requested resource (Will be supported in future). 404: description: | Not Found. Requested Document does not exist. schema: $ref: '#/definitions/Error' 406: description: | Not Acceptable. The requested media type is not supported schema: $ref: '#/definitions/Error' #----------------------------------------------------- # Delete the mediation policy #----------------------------------------------------- delete: x-scope: apim:mediation_policy_create x-wso2-curl: "curl -k -H \"Authorization: Bearer ae4eae22-3f65-387b-a171-d37eaa366fa8\" -X DELETE https://127.0.0.1:9443/api/am/publisher/v0.11/apis/6fb74674-4ab8-4b52-9886-f9a376985060" x-wso2-request: | DELETE https://127.0.0.1:9443/api/am/publisher/v0.11/apis/6fb74674-4ab8-4b52-9886-f9a376985060 Authorization: Bearer ae4eae22-3f65-387b-a171-d37eaa366fa8 x-wso2-response: "HTTP/1.1 200 OK" summary: Delete an API description: | This operation can be used to delete an existing API proving the Id of the API. parameters: - $ref: '#/parameters/mediationPolicyId' - $ref: '#/parameters/If-Match' - $ref: '#/parameters/If-Unmodified-Since' tags: - Mediation (Individual) responses: 200: description: | OK. Resource successfully deleted. 403: description: | Forbidden. The request must be conditional but no condition has been specified. schema: $ref: '#/definitions/Error' 404: description: | Not Found. Resource to be deleted does not exist. schema: $ref: '#/definitions/Error' 412: description: | Precondition Failed. The request has not been performed because one of the preconditions is not met. schema: $ref: '#/definitions/Error' #----------------------------------------------------- # Update the a mediation policy #----------------------------------------------------- put: x-scope: apim:mediation_policy_create x-wso2-curl: "curl -k -H \"Authorization: Bearer ae4eae22-3f65-387b-a171-d37eaa366fa8\" -H \"Content-Type: application/json\" -X PUT -d @data.json https://127.0.0.1:9443/api/am/publisher/v0.11/apis/7a2298c4-c905-403f-8fac-38c73301631f" x-wso2-request: "PUT https://127.0.0.1:9443/api/am/publisher/v0.11/apis/7a2298c4-c905-403f-8fac-38c73301631f\nAuthorization: Bearer ae4eae22-3f65-387b-a171-d37eaa366fa8\nContent-Type: application/json\n\n{\r\n \"id\": \"7a2298c4-c905-403f-8fac-38c73301631f\",\r\n \"name\": \"PizzaShackAPI\",\r\n \"description\": \"This document describe a RESTFul API for Pizza Shack online pizza delivery store.\\r\\n\",\r\n \"context\": \"/pizzashack\",\r\n \"version\": \"1.0.0\",\r\n \"provider\": \"admin\",\r\n \"apiDefinition\": \"{\\\"paths\\\":{\\\"/order\\\":{\\\"post\\\":{\\\"x-auth-type\\\":\\\"Application & Application User\\\",\\\"x-throttling-tier\\\":\\\"Unlimited\\\",\\\"description\\\":\\\"Create a new Order\\\",\\\"parameters\\\":[{\\\"schema\\\":{\\\"$ref\\\":\\\"#/definitions/Order\\\"},\\\"description\\\":\\\"Order object that needs to be added\\\",\\\"name\\\":\\\"body\\\",\\\"required\\\":true,\\\"in\\\":\\\"body\\\"}],\\\"responses\\\":{\\\"201\\\":{\\\"headers\\\":{\\\"Location\\\":{\\\"description\\\":\\\"The URL of the newly created resource.\\\",\\\"type\\\":\\\"string\\\"}},\\\"schema\\\":{\\\"$ref\\\":\\\"#/definitions/Order\\\"},\\\"description\\\":\\\"Created.\\\"}}}},\\\"/menu\\\":{\\\"get\\\":{\\\"x-auth-type\\\":\\\"Application & Application User\\\",\\\"x-throttling-tier\\\":\\\"Unlimited\\\",\\\"description\\\":\\\"Return a list of available menu items\\\",\\\"parameters\\\":[],\\\"responses\\\":{\\\"200\\\":{\\\"headers\\\":{},\\\"schema\\\":{\\\"title\\\":\\\"Menu\\\",\\\"properties\\\":{\\\"list\\\":{\\\"items\\\":{\\\"$ref\\\":\\\"#/definitions/MenuItem\\\"},\\\"type\\\":\\\"array\\\"}},\\\"type\\\":\\\"object\\\"},\\\"description\\\":\\\"OK.\\\"}}}}},\\\"schemes\\\":[\\\"https\\\"],\\\"produces\\\":[\\\"application/json\\\"],\\\"swagger\\\":\\\"2.0\\\",\\\"definitions\\\":{\\\"MenuItem\\\":{\\\"title\\\":\\\"Pizza menu Item\\\",\\\"properties\\\":{\\\"price\\\":{\\\"type\\\":\\\"string\\\"},\\\"description\\\":{\\\"type\\\":\\\"string\\\"},\\\"name\\\":{\\\"type\\\":\\\"string\\\"},\\\"image\\\":{\\\"type\\\":\\\"string\\\"}},\\\"required\\\":[\\\"name\\\"]},\\\"Order\\\":{\\\"title\\\":\\\"Pizza Order\\\",\\\"properties\\\":{\\\"customerName\\\":{\\\"type\\\":\\\"string\\\"},\\\"delivered\\\":{\\\"type\\\":\\\"boolean\\\"},\\\"address\\\":{\\\"type\\\":\\\"string\\\"},\\\"pizzaType\\\":{\\\"type\\\":\\\"string\\\"},\\\"creditCardNumber\\\":{\\\"type\\\":\\\"string\\\"},\\\"quantity\\\":{\\\"type\\\":\\\"number\\\"},\\\"orderId\\\":{\\\"type\\\":\\\"integer\\\"}},\\\"required\\\":[\\\"orderId\\\"]}},\\\"consumes\\\":[\\\"application/json\\\"],\\\"info\\\":{\\\"title\\\":\\\"PizzaShackAPI\\\",\\\"description\\\":\\\"This document describe a RESTFul API for Pizza Shack online pizza delivery store.\\\\n\\\",\\\"license\\\":{\\\"name\\\":\\\"Apache 2.0\\\",\\\"url\\\":\\\"http://www.apache.org/licenses/LICENSE-2.0.html\\\"},\\\"contact\\\":{\\\"email\\\":\\\"architecture@pizzashack.com\\\",\\\"name\\\":\\\"John Doe\\\",\\\"url\\\":\\\"http://www.pizzashack.com\\\"},\\\"version\\\":\\\"1.0.0\\\"}}\",\r\n \"wsdlUri\": null,\r\n \"status\": \"CREATED\",\r\n \"responseCaching\": \"Disabled\",\r\n \"cacheTimeout\": 300,\r\n \"destinationStatsEnabled\": null,\r\n \"isDefaultVersion\": false,\r\n \"transport\": [\r\n \"https\"\r\n ],\r\n \"tags\": [\"pizza\",\"chicken\"],\r\n \"tiers\": [\"Unlimited\"],\r\n \"maxTps\": {\r\n \"sandbox\": 500,\r\n \"production\": 100\r\n },\r\n \"thumbnailUri\": null,\r\n \"visibility\": \"PUBLIC\",\r\n \"visibleRoles\": [],\r\n \"visibleTenants\": [],\r\n \"endpointConfig\": \"{\\\"production_endpoints\\\":{\\\"url\\\":\\\"https://localhost:9443/am/sample/pizzashack/v1/api/\\\",\\\"config\\\":null},\\\"sandbox_endpoints\\\":{\\\"url\\\":\\\"https://localhost:9443/am/sample/pizzashack/v1/api/\\\",\\\"config\\\":null},\\\"endpoint_type\\\":\\\"http\\\"}\",\r\n \"endpointSecurity\": {\r\n \"username\": \"user\",\r\n \"type\": \"basic\",\r\n \"password\": \"pass\"\r\n },\r\n \"gatewayEnvironments\": \"Production and Sandbox\",\r\n \"sequences\": [],\r\n \"subscriptionAvailability\": null,\r\n \"subscriptionAvailableTenants\": [],\r\n \"businessInformation\": {\r\n \"businessOwnerEmail\": \"marketing@pizzashack.com\",\r\n \"technicalOwnerEmail\": \"architecture@pizzashack.com\",\r\n \"technicalOwner\": \"John Doe\",\r\n \"businessOwner\": \"Jane Roe\"\r\n },\r\n \"corsConfiguration\": {\r\n \"accessControlAllowOrigins\": [\"*\"],\r\n \"accessControlAllowHeaders\": [\r\n \"authorization\",\r\n \"Access-Control-Allow-Origin\",\r\n \"Content-Type\",\r\n \"SOAPAction\"\r\n ],\r\n \"accessControlAllowMethods\": [\r\n \"GET\",\r\n \"PUT\",\r\n \"POST\",\r\n \"DELETE\",\r\n \"PATCH\",\r\n \"OPTIONS\"\r\n ],\r\n \"accessControlAllowCredentials\": false,\r\n \"corsConfigurationEnabled\": false\r\n }\r\n}" x-wso2-response: "HTTP/1.1 200 OK\nContent-Type: application/json\n\n{\r\n \"id\": \"7a2298c4-c905-403f-8fac-38c73301631f\",\r\n \"name\": \"PizzaShackAPI\",\r\n \"description\": \"This document describe a RESTFul API for Pizza Shack online pizza delivery store.\\r\\n\",\r\n \"context\": \"/pizzashack\",\r\n \"version\": \"1.0.0\",\r\n \"provider\": \"admin\",\r\n \"apiDefinition\": \"{\\\"paths\\\":{\\\"/order\\\":{\\\"post\\\":{\\\"x-auth-type\\\":\\\"Application & Application User\\\",\\\"x-throttling-tier\\\":\\\"Unlimited\\\",\\\"description\\\":\\\"Create a new Order\\\",\\\"parameters\\\":[{\\\"schema\\\":{\\\"$ref\\\":\\\"#/definitions/Order\\\"},\\\"description\\\":\\\"Order object that needs to be added\\\",\\\"name\\\":\\\"body\\\",\\\"required\\\":true,\\\"in\\\":\\\"body\\\"}],\\\"responses\\\":{\\\"201\\\":{\\\"headers\\\":{\\\"Location\\\":{\\\"description\\\":\\\"The URL of the newly created resource.\\\",\\\"type\\\":\\\"string\\\"}},\\\"schema\\\":{\\\"$ref\\\":\\\"#/definitions/Order\\\"},\\\"description\\\":\\\"Created.\\\"}}}},\\\"/menu\\\":{\\\"get\\\":{\\\"x-auth-type\\\":\\\"Application & Application User\\\",\\\"x-throttling-tier\\\":\\\"Unlimited\\\",\\\"description\\\":\\\"Return a list of available menu items\\\",\\\"parameters\\\":[],\\\"responses\\\":{\\\"200\\\":{\\\"headers\\\":{},\\\"schema\\\":{\\\"title\\\":\\\"Menu\\\",\\\"properties\\\":{\\\"list\\\":{\\\"items\\\":{\\\"$ref\\\":\\\"#/definitions/MenuItem\\\"},\\\"type\\\":\\\"array\\\"}},\\\"type\\\":\\\"object\\\"},\\\"description\\\":\\\"OK.\\\"}}}}},\\\"schemes\\\":[\\\"https\\\"],\\\"produces\\\":[\\\"application/json\\\"],\\\"swagger\\\":\\\"2.0\\\",\\\"definitions\\\":{\\\"MenuItem\\\":{\\\"title\\\":\\\"Pizza menu Item\\\",\\\"properties\\\":{\\\"price\\\":{\\\"type\\\":\\\"string\\\"},\\\"description\\\":{\\\"type\\\":\\\"string\\\"},\\\"name\\\":{\\\"type\\\":\\\"string\\\"},\\\"image\\\":{\\\"type\\\":\\\"string\\\"}},\\\"required\\\":[\\\"name\\\"]},\\\"Order\\\":{\\\"title\\\":\\\"Pizza Order\\\",\\\"properties\\\":{\\\"customerName\\\":{\\\"type\\\":\\\"string\\\"},\\\"delivered\\\":{\\\"type\\\":\\\"boolean\\\"},\\\"address\\\":{\\\"type\\\":\\\"string\\\"},\\\"pizzaType\\\":{\\\"type\\\":\\\"string\\\"},\\\"creditCardNumber\\\":{\\\"type\\\":\\\"string\\\"},\\\"quantity\\\":{\\\"type\\\":\\\"number\\\"},\\\"orderId\\\":{\\\"type\\\":\\\"integer\\\"}},\\\"required\\\":[\\\"orderId\\\"]}},\\\"consumes\\\":[\\\"application/json\\\"],\\\"info\\\":{\\\"title\\\":\\\"PizzaShackAPI\\\",\\\"description\\\":\\\"This document describe a RESTFul API for Pizza Shack online pizza delivery store.\\\\n\\\",\\\"license\\\":{\\\"name\\\":\\\"Apache 2.0\\\",\\\"url\\\":\\\"http://www.apache.org/licenses/LICENSE-2.0.html\\\"},\\\"contact\\\":{\\\"email\\\":\\\"architecture@pizzashack.com\\\",\\\"name\\\":\\\"John Doe\\\",\\\"url\\\":\\\"http://www.pizzashack.com\\\"},\\\"version\\\":\\\"1.0.0\\\"}}\",\r\n \"wsdlUri\": null,\r\n \"status\": \"CREATED\",\r\n \"responseCaching\": \"Disabled\",\r\n \"cacheTimeout\": 300,\r\n \"destinationStatsEnabled\": null,\r\n \"isDefaultVersion\": false,\r\n \"transport\": [\"https\"],\r\n \"tags\": [\r\n \"chicken\",\r\n \"pizza\"\r\n ],\r\n \"tiers\": [\"Unlimited\"],\r\n \"maxTps\": {\r\n \"sandbox\": 500,\r\n \"production\": 100\r\n },\r\n \"thumbnailUri\": null,\r\n \"visibility\": \"PUBLIC\",\r\n \"visibleRoles\": [],\r\n \"visibleTenants\": [],\r\n \"endpointConfig\": \"{\\\"production_endpoints\\\":{\\\"url\\\":\\\"https://localhost:9443/am/sample/pizzashack/v1/api/\\\",\\\"config\\\":null},\\\"sandbox_endpoints\\\":{\\\"url\\\":\\\"https://localhost:9443/am/sample/pizzashack/v1/api/\\\",\\\"config\\\":null},\\\"endpoint_type\\\":\\\"http\\\"}\",\r\n \"endpointSecurity\": {\r\n \"username\": \"user\",\r\n \"type\": \"basic\",\r\n \"password\": \"pass\"\r\n },\r\n \"gatewayEnvironments\": \"Production and Sandbox\",\r\n \"sequences\": [],\r\n \"subscriptionAvailability\": null,\r\n \"subscriptionAvailableTenants\": [],\r\n \"businessInformation\": {\r\n \"businessOwnerEmail\": \"marketing@pizzashack.com\",\r\n \"technicalOwnerEmail\": \"architecture@pizzashack.com\",\r\n \"technicalOwner\": \"John Doe\",\r\n \"businessOwner\": \"Jane Roe\"\r\n },\r\n \"corsConfiguration\": {\r\n \"accessControlAllowOrigins\": [\"*\"],\r\n \"accessControlAllowHeaders\": [\r\n \"authorization\",\r\n \"Access-Control-Allow-Origin\",\r\n \"Content-Type\",\r\n \"SOAPAction\"\r\n ],\r\n \"accessControlAllowMethods\": [\r\n \"GET\",\r\n \"PUT\",\r\n \"POST\",\r\n \"DELETE\",\r\n \"PATCH\",\r\n \"OPTIONS\"\r\n ],\r\n \"accessControlAllowCredentials\": false,\r\n \"corsConfigurationEnabled\": false\r\n }\r\n}" summary: Update an mediation policy description: | This operation can be used to update an existing API. But the properties `name`, `version`, `context`, `provider`, `state` will not be changed by this operation. parameters: - $ref: '#/parameters/mediationPolicyId' - in: body name: body description: | Mediation policy object that needs to be added required: true schema: $ref: '#/definitions/Mediation' - $ref: '#/parameters/Content-Type' - $ref: '#/parameters/If-Match' - $ref: '#/parameters/If-Unmodified-Since' tags: - Mediation (Individual) responses: 200: description: | OK. Successful response with updated API object schema: $ref: '#/definitions/Mediation' headers: Location: description: | The URL of the newly created resource. type: string Content-Type: description: | The content type of the body. type: string ETag: description: | Entity Tag of the response resource. Used by caches, or in conditional requests (Will be supported in future). type: string Last-Modified: description: | Date and time the resource has been modifed the last time. Used by caches, or in conditional requests (Will be supported in future). type: string 400: description: | Bad Request. Invalid request or validation error schema: $ref: '#/definitions/Error' 403: description: | Forbidden. The request must be conditional but no condition has been specified. schema: $ref: '#/definitions/Error' 404: description: | Not Found. The resource to be updated does not exist. schema: $ref: '#/definitions/Error' 412: description: | Precondition Failed. The request has not been performed because one of the preconditions is not met. schema: $ref: '#/definitions/Error' ###################################################### # The "Subscription Throttle Policy Collection" resource API ###################################################### '/throttling/policies/subscription': #----------------------------------------------------- # Retrieve all Subscription level policies #----------------------------------------------------- get: x-scope: apim:tier_view summary: Get all Subscription level throttle policies description: | Get all Subscription level throttle policies parameters: - $ref: '#/parameters/Accept' - $ref: '#/parameters/If-None-Match' - $ref: '#/parameters/If-Modified-Since' tags: - Subscription Policies responses: 200: description: | OK. Policies returned schema: $ref: '#/definitions/SubscriptionThrottlePolicyList' headers: Content-Type: description: | The content type of the body. type: string ETag: description: | Entity Tag of the response resource. Used by caches, or in conditional requests. type: string Last-Modified: description: | Date and time the resource has been modifed the last time. Used by caches, or in conditional reuquests. type: string 304: description: | Not Modified. Empty body because the client has already the latest version of the requested resource. 406: description: | Not Acceptable. The requested media type is not supported. schema: $ref: '#/definitions/Error' #----------------------------------------------------- # Add a Subscription level throttle policy #----------------------------------------------------- post: x-scope: apim:tier_manage summary: Add a Subscription level throttle policy description: | Add a Subscription level throttle policy parameters: - in: body name: body description: | Subscripion level policy object that should to be added required: true schema: $ref: '#/definitions/SubscriptionThrottlePolicy' - $ref: '#/parameters/Content-Type' tags: - Subscription Policies responses: 201: description: | Created. Successful response with the newly created object as entity in the body. Location header contains URL of newly created entity. schema: $ref: '#/definitions/SubscriptionThrottlePolicy' headers: Location: description: | Location of the newly created Policy object. type: string Content-Type: description: | The content type of the body. type: string ETag: description: | Entity Tag of the response resource. Used by caches, or in conditional request' type: string 400: description: | Bad Request. Invalid request or validation error schema: $ref: '#/definitions/Error' 415: description: | Unsupported media type. The entity of the request was in a not supported format. ###################################################### # The "Individual Subscription Throttle Policy" resource API ###################################################### '/throttling/policies/subscription/{policyId}': #----------------------------------------------------- # Retrieve a certain Subscription Policy #----------------------------------------------------- get: x-scope: apim:tier_view summary: Retrieve a Subscription Policy description: | Retrieve a Subscription Policy providing the policy name. parameters: - $ref: '#/parameters/policyId' - $ref: '#/parameters/If-None-Match' - $ref: '#/parameters/If-Modified-Since' tags: - Subscription Policies responses: 200: description: | OK. Policy returned schema: $ref: '#/definitions/SubscriptionThrottlePolicy' headers: Content-Type: description: | The content type of the body. type: string ETag: description: | Entity Tag of the response resource. Used by caches, or in conditional requests. type: string Last-Modified: description: | Date and time the resource has been modifed the last time. Used by caches, or in conditional reuquests. type: string 304: description: | Not Modified. Empty body because the client has already the latest version of the requested resource. 404: description: | Not Found. Requested Policy does not exist. schema: $ref: '#/definitions/Error' 406: description: | Not Acceptable. The requested media type is not supported. schema: $ref: '#/definitions/Error' #----------------------------------------------------- # Delete a Subscription level throttle policy #----------------------------------------------------- delete: x-scope: apim:tier_manage summary: Delete a Subscription level throttle policy description: | Delete a Subscription level throttle policy parameters: - $ref: '#/parameters/policyId' - $ref: '#/parameters/If-Match' - $ref: '#/parameters/If-Unmodified-Since' tags: - Subscription Policies responses: 200: description: | OK. Resource successfully deleted. 404: description: | Not Found. Resource to be deleted does not exist. schema: $ref: '#/definitions/Error' 412: description: | Precondition Failed. The request has not been performed because one of the preconditions is not met. schema: $ref: '#/definitions/Error' #----------------------------------------------------- # Update a Subscription throttle policy #----------------------------------------------------- put: x-scope: apim:tier_manage summary: Update a Subscription level throttle policy description: | Update a Subscription level throttle policy parameters: - $ref: '#/parameters/policyId' - in: body name: body description: | Policy object that needs to be modified required: true schema: $ref: '#/definitions/SubscriptionThrottlePolicy' - $ref: '#/parameters/Content-Type' - $ref: '#/parameters/If-Match' - $ref: '#/parameters/If-Unmodified-Since' tags: - Subscription Policies responses: 200: description: | OK. Policy updated. schema: $ref: '#/definitions/SubscriptionThrottlePolicy' headers: Location: description: | The URL of the newly created resource. type: string Content-Type: description: | The content type of the body. type: string ETag: description: | Entity Tag of the response resource. Used by caches, or in conditional request. type: string Last-Modified: description: | Date and time the resource has been modifed the last time. Used by caches, or in conditional reuquests. type: string 400: description: | Bad Request. Invalid request or validation error. schema: $ref: '#/definitions/Error' 404: description: | Not Found. The resource to be updated does not exist. schema: $ref: '#/definitions/Error' 412: description: | Precondition Failed. The request has not been performed because one of the preconditions is not met. schema: $ref: '#/definitions/Error' ###################################################### # The "Custom Rule Collection" resource API ###################################################### '/throttling/policies/custom': #----------------------------------------------------- # Retrieve all Custom Rules #----------------------------------------------------- get: x-scope: apim:tier_view summary: Get all Custom Rules description: | Get all Custom Rules parameters: - $ref: '#/parameters/Accept' - $ref: '#/parameters/If-None-Match' - $ref: '#/parameters/If-Modified-Since' tags: - Custom Rules responses: 200: description: | OK. Policies returned schema: $ref: '#/definitions/CustomRuleList' headers: Content-Type: description: | The content type of the body. type: string ETag: description: | Entity Tag of the response resource. Used by caches, or in conditional requests. type: string Last-Modified: description: | Date and time the resource has been modifed the last time. Used by caches, or in conditional reuquests. type: string 304: description: | Not Modified. Empty body because the client has already the latest version of the requested resource. 406: description: | Not Acceptable. The requested media type is not supported. schema: $ref: '#/definitions/Error' #----------------------------------------------------- # Add a Custom Rule #----------------------------------------------------- post: x-scope: apim:tier_manage summary: Add a Custom Rule description: | Add a Custom Rule parameters: - in: body name: body description: | Custom Rule object that should to be added required: true schema: $ref: '#/definitions/CustomRule' - $ref: '#/parameters/Content-Type' tags: - Custom Rules responses: 201: description: | Created. Successful response with the newly created object as entity in the body. Location header contains URL of newly created entity. schema: $ref: '#/definitions/CustomRule' headers: Location: description: | Location of the newly created resource. type: string Content-Type: description: | The content type of the body. type: string ETag: description: | Entity Tag of the response resource. Used by caches, or in conditional request' type: string 400: description: | Bad Request. Invalid request or validation error schema: $ref: '#/definitions/Error' 415: description: | Unsupported media type. The entity of the request was in a not supported format. ###################################################### # The "Individual Custom Rule" resource API ###################################################### '/throttling/policies/custom/{ruleId}': #----------------------------------------------------- # Retrieve a certain Custom Rule #----------------------------------------------------- get: x-scope: apim:tier_view summary: Retrieve a Custom Rule description: | Retrieve a Custom Rule providing the policy name. parameters: - $ref: '#/parameters/ruleId' - $ref: '#/parameters/If-None-Match' - $ref: '#/parameters/If-Modified-Since' tags: - Custom Rules responses: 200: description: | OK. Policy returned schema: $ref: '#/definitions/CustomRule' headers: Content-Type: description: | The content type of the body. type: string ETag: description: | Entity Tag of the response resource. Used by caches, or in conditional requests. type: string Last-Modified: description: | Date and time the resource has been modifed the last time. Used by caches, or in conditional reuquests. type: string 304: description: | Not Modified. Empty body because the client has already the latest version of the requested resource. 404: description: | Not Found. Requested Policy does not exist. schema: $ref: '#/definitions/Error' 406: description: | Not Acceptable. The requested media type is not supported. schema: $ref: '#/definitions/Error' #----------------------------------------------------- # Delete a Custom Rule #----------------------------------------------------- delete: x-scope: apim:tier_manage summary: Delete a Custom Rule description: | Delete a Custom Rule parameters: - $ref: '#/parameters/ruleId' - $ref: '#/parameters/If-Match' - $ref: '#/parameters/If-Unmodified-Since' tags: - Custom Rules responses: 200: description: | OK. Resource successfully deleted. 404: description: | Not Found. Resource to be deleted does not exist. schema: $ref: '#/definitions/Error' 412: description: | Precondition Failed. The request has not been performed because one of the preconditions is not met. schema: $ref: '#/definitions/Error' #----------------------------------------------------- # Update a Custom Rule #----------------------------------------------------- put: x-scope: apim:tier_manage summary: Update a Custom Rule description: | Update a Custom Rule parameters: - $ref: '#/parameters/ruleId' - in: body name: body description: | Policy object that needs to be modified required: true schema: $ref: '#/definitions/CustomRule' - $ref: '#/parameters/Content-Type' - $ref: '#/parameters/If-Match' - $ref: '#/parameters/If-Unmodified-Since' tags: - Custom Rules responses: 200: description: | OK. Policy updated. schema: $ref: '#/definitions/CustomRule' headers: Location: description: | The URL of the newly created resource. type: string Content-Type: description: | The content type of the body. type: string ETag: description: | Entity Tag of the response resource. Used by caches, or in conditional request. type: string Last-Modified: description: | Date and time the resource has been modifed the last time. Used by caches, or in conditional reuquests. type: string 400: description: | Bad Request. Invalid request or validation error. schema: $ref: '#/definitions/Error' 404: description: | Not Found. The resource to be updated does not exist. schema: $ref: '#/definitions/Error' 412: description: | Precondition Failed. The request has not been performed because one of the preconditions is not met. schema: $ref: '#/definitions/Error' ###################################################### # The "Advanced Throttle Policy Collection" resource API ###################################################### '/throttling/policies/advanced': #----------------------------------------------------- # Retrieve all Advanced level policies #----------------------------------------------------- get: x-scope: apim:tier_view summary: Get all Advanced level throttle policies description: | Get all Advanced level throttle policies parameters: - $ref: '#/parameters/Accept' - $ref: '#/parameters/If-None-Match' - $ref: '#/parameters/If-Modified-Since' tags: - Advanced Policies responses: 200: description: | OK. Policies returned schema: $ref: '#/definitions/AdvancedThrottlePolicyList' headers: Content-Type: description: | The content type of the body. type: string ETag: description: | Entity Tag of the response resource. Used by caches, or in conditional requests. type: string Last-Modified: description: | Date and time the resource has been modifed the last time. Used by caches, or in conditional reuquests. type: string 304: description: | Not Modified. Empty body because the client has already the latest version of the requested resource. 406: description: | Not Acceptable. The requested media type is not supported. schema: $ref: '#/definitions/Error' #----------------------------------------------------- # Add an Advanced level throttle policy #----------------------------------------------------- post: x-scope: apim:tier_manage summary: Add an Advanced level throttle policy description: | Add an Advanced level throttle policy parameters: - in: body name: body description: | Advanced level policy object that should to be added required: true schema: $ref: '#/definitions/AdvancedThrottlePolicy' - $ref: '#/parameters/Content-Type' tags: - Advanced Policies responses: 201: description: | Created. Successful response with the newly created object as entity in the body. Location header contains URL of newly created entity. schema: $ref: '#/definitions/AdvancedThrottlePolicy' headers: Location: description: | Location of the newly created Advanced Throttle policy. type: string Content-Type: description: | The content type of the body. type: string ETag: description: | Entity Tag of the response resource. Used by caches, or in conditional request' type: string 400: description: | Bad Request. Invalid request or validation error schema: $ref: '#/definitions/Error' 415: description: | Unsupported media type. The entity of the request was in a not supported format. ###################################################### # The "Individual Advanced Throttle Policy" resource API ###################################################### '/throttling/policies/advanced/{policyId}': #----------------------------------------------------- # Retrieve a certain Advanced Throttling Policy #----------------------------------------------------- get: x-scope: apim:tier_view summary: Retrieve an Advanced Policy description: | Retrieve a Advanced Policy providing the policy name. parameters: - $ref: '#/parameters/policyId' - $ref: '#/parameters/If-None-Match' - $ref: '#/parameters/If-Modified-Since' tags: - Advanced Policies responses: 200: description: | OK. Policy returned schema: $ref: '#/definitions/AdvancedThrottlePolicy' headers: Content-Type: description: | The content type of the body. type: string ETag: description: | Entity Tag of the response resource. Used by caches, or in conditional requests. type: string Last-Modified: description: | Date and time the resource has been modifed the last time. Used by caches, or in conditional reuquests. type: string 304: description: | Not Modified. Empty body because the client has already the latest version of the requested resource. 404: description: | Not Found. Requested Policy does not exist. schema: $ref: '#/definitions/Error' 406: description: | Not Acceptable. The requested media type is not supported. schema: $ref: '#/definitions/Error' #----------------------------------------------------- # Delete an Advanced level throttle policy #----------------------------------------------------- delete: x-scope: apim:tier_manage summary: Delete an Advanced level throttle policy description: | Delete an Advanced level throttle policy parameters: - $ref: '#/parameters/policyId' - $ref: '#/parameters/If-Match' - $ref: '#/parameters/If-Unmodified-Since' tags: - Advanced Policies responses: 200: description: | OK. Resource successfully deleted. 404: description: | Not Found. Resource to be deleted does not exist. schema: $ref: '#/definitions/Error' 412: description: | Precondition Failed. The request has not been performed because one of the preconditions is not met. schema: $ref: '#/definitions/Error' #----------------------------------------------------- # Update an Advanced throttle policy #----------------------------------------------------- put: x-scope: apim:tier_manage summary: Update an Advanced level throttle policy description: | Update an Advanced level throttle policy parameters: - $ref: '#/parameters/policyId' - in: body name: body description: | Policy object that needs to be modified required: true schema: $ref: '#/definitions/AdvancedThrottlePolicy' - $ref: '#/parameters/Content-Type' - $ref: '#/parameters/If-Match' - $ref: '#/parameters/If-Unmodified-Since' tags: - Advanced Policies responses: 200: description: | OK. Policy updated. schema: $ref: '#/definitions/AdvancedThrottlePolicy' headers: Location: description: | The URL of the newly created resource. type: string Content-Type: description: | The content type of the body. type: string ETag: description: | Entity Tag of the response resource. Used by caches, or in conditional request. type: string Last-Modified: description: | Date and time the resource has been modifed the last time. Used by caches, or in conditional reuquests. type: string 400: description: | Bad Request. Invalid request or validation error. schema: $ref: '#/definitions/Error' 404: description: | Not Found. The resource to be updated does not exist. schema: $ref: '#/definitions/Error' 412: description: | Precondition Failed. The request has not been performed because one of the preconditions is not met. schema: $ref: '#/definitions/Error' ###################################################### # The "Blocking Condition Collection" resource API ###################################################### '/throttling/blacklist': #----------------------------------------------------- # Retrieve all Blocking conditions #----------------------------------------------------- get: x-scope: apim:bl_view summary: Get all blocking condtions description: | Get all blocking condtions parameters: - $ref: '#/parameters/Accept' - $ref: '#/parameters/If-None-Match' - $ref: '#/parameters/If-Modified-Since' tags: - Blacklist responses: 200: description: | OK. Blocking conditions returned schema: $ref: '#/definitions/BlockingConditionList' headers: Content-Type: description: | The content type of the body. type: string ETag: description: | Entity Tag of the response resource. Used by caches, or in conditional requests. type: string Last-Modified: description: | Date and time the resource has been modifed the last time. Used by caches, or in conditional reuquests. type: string 304: description: | Not Modified. Empty body because the client has already the latest version of the requested resource. 406: description: | Not Acceptable. The requested media type is not supported. schema: $ref: '#/definitions/Error' #----------------------------------------------------- # Add a Custom Rule #----------------------------------------------------- post: x-scope: apim:bl_manage summary: Add a Blocking condition description: | Add a Blocking condition parameters: - in: body name: body description: | Blocking condition object that should to be added required: true schema: $ref: '#/definitions/BlockingCondition' - $ref: '#/parameters/Content-Type' tags: - Blacklist responses: 201: description: | Created. Successful response with the newly created object as entity in the body. Location header contains URL of newly created entity. schema: $ref: '#/definitions/BlockingCondition' headers: Location: description: | Location of the newly created resource. type: string Content-Type: description: | The content type of the body. type: string ETag: description: | Entity Tag of the response resource. Used by caches, or in conditional request' type: string 400: description: | Bad Request. Invalid request or validation error schema: $ref: '#/definitions/Error' 415: description: | Unsupported media type. The entity of the request was in a not supported format. ###################################################### # The "Individual Blocking Condition" resource API ###################################################### '/throttling/blacklist/{conditionId}': #----------------------------------------------------- # Retrieve a Blocking condition #----------------------------------------------------- get: x-scope: apim:bl_view summary: Retrieve a Blocking Condition description: | Retrieve a Blocking Condition providing the condition Id parameters: - $ref: '#/parameters/conditionId' - $ref: '#/parameters/If-None-Match' - $ref: '#/parameters/If-Modified-Since' tags: - Blacklist responses: 200: description: | OK. Condition returned schema: $ref: '#/definitions/BlockingCondition' headers: Content-Type: description: | The content type of the body. type: string ETag: description: | Entity Tag of the response resource. Used by caches, or in conditional requests. type: string Last-Modified: description: | Date and time the resource has been modifed the last time. Used by caches, or in conditional reuquests. type: string 304: description: | Not Modified. Empty body because the client has already the latest version of the requested resource. 404: description: | Not Found. Requested Condition does not exist. schema: $ref: '#/definitions/Error' 406: description: | Not Acceptable. The requested media type is not supported. schema: $ref: '#/definitions/Error' #----------------------------------------------------- # Delete a Blocking condition #----------------------------------------------------- delete: x-scope: apim:bl_manage summary: Delete a Blocking condition description: | Delete a Blocking condition parameters: - $ref: '#/parameters/conditionId' - $ref: '#/parameters/If-Match' - $ref: '#/parameters/If-Unmodified-Since' tags: - Blacklist responses: 200: description: | OK. Resource successfully deleted. 404: description: | Not Found. Resource to be deleted does not exist. schema: $ref: '#/definitions/Error' 412: description: | Precondition Failed. The request has not been performed because one of the preconditions is not met. schema: $ref: '#/definitions/Error' ###################################################### # Parameters - required by some of the APIs above ###################################################### parameters: # Throttle Policy Id # Specified as part of the path expression policyId: name: policyId in: path description: | Thorttle policy UUID type: string required: true # Custom rule Id # Specified as part of the path expression ruleId: name: ruleId in: path description: | Custom rule UUID type: string required: true # Blocking Condition Id # Specified as part of the path expression conditionId: name: conditionId in: path description: | Blocking condition identifier type: string required: true # The HTTP Accept header Accept: name: Accept in: header description: | Media types acceptable for the response. Default is JSON. default: JSON type: string # The HTTP Content-Type header Content-Type: name: Content-Type in: header description: | Media type of the entity in the body. Default is JSON. default: JSON required: true type : string # The HTTP If-None-Match header # Used to avoid retrieving data that are already cached If-None-Match: name: If-None-Match in: header description: | Validator for conditional requests; based on the ETag of the formerly retrieved variant of the resourec. type : string # The HTTP If-Modified-Since header # Used to avoid retrieving data that are already cached If-Modified-Since: name: If-Modified-Since in: header description: | Validator for conditional requests; based on Last Modified header of the formerly retrieved variant of the resource. type: string # The HTTP If-Match header # Used to avoid concurrent updates If-Match: name: If-Match in: header description: | Validator for conditional requests; based on ETag. type: string # The HTTP If-Unmodified-Since header # Used to avoid concurrent updates If-Unmodified-Since: name: If-Unmodified-Since in: header description: | Validator for conditional requests; based on Last Modified header. type: string # Used for pagination: # The maximum number of resoures to be returned by a GET limit: name: limit in: query description: | Maximum size of resource array to return. default: 25 type: integer # Used for pagination: # The order number of an instance in a qualified set of resoures # at which to start to return the next batch of qualified resources offset: name: offset in: query description: | Starting point within the complete list of items qualified. default: 0 type: integer # Mediation policy identifier # Specified as part of the path expression mediationPolicyId: name: mediationPolicyId in: path description: | Mediation policy Id required: true type: string ###################################################### # The resources used by some of the APIs above within the message body ###################################################### definitions: #----------------------------------------------------- # The Error resource #----------------------------------------------------- Error: title: Error object returned with 4XX HTTP status required: - code - message properties: code: type: integer format: int64 message: type: string description: Error message. description: type: string description: | A detail description about the error message. moreInfo: type: string description: | Preferably an url with more details about the error. error: type: array description: | If there are more than one error list them out. For example, list out validation errors by each field. items: $ref: '#/definitions/ErrorListItem' #----------------------------------------------------- # The Error List Item resource #----------------------------------------------------- ErrorListItem: title: Description of individual errors that may have occurred during a request. required: - code - message properties: code: type: string message: type: string description: | Description about individual errors occurred #----------------------------------------------------- # The Throttle Policy resource #----------------------------------------------------- ThrottlePolicy : title: Generic Throttle Policy required: - policyName properties: policyId: type: string policyName: type: string displayName: type: string description: type: string isDeployed: type: boolean default: false #----------------------------------------------------- # The Advanced Throttle Policy Info resource #----------------------------------------------------- AdvancedThrottlePolicyInfo : title: Advanced Throttling Policy required: - defaultLimit allOf: - $ref: '#/definitions/ThrottlePolicy' - properties: defaultLimit: $ref: '#/definitions/ThrottleLimit' #----------------------------------------------------- # The Advanced Throttle Policy resource #----------------------------------------------------- AdvancedThrottlePolicy : title: Advanced Throttling Policy required: - defaultLimit allOf: - $ref: '#/definitions/ThrottlePolicy' - properties: defaultLimit: $ref: '#/definitions/ThrottleLimit' conditionalGroups: type: array items: $ref: '#/definitions/ConditionalGroup' #----------------------------------------------------- # The Advanced Throttle Policy List resource #----------------------------------------------------- AdvancedThrottlePolicyList: title: Advanced Throttle Policy List properties: count: type: integer description: | Number of Advanced throttle policies returned. example: 1 list: type: array items: $ref: '#/definitions/AdvancedThrottlePolicyInfo' #----------------------------------------------------- # The Application Throttle Policy resource #----------------------------------------------------- ApplicationThrottlePolicy: title: Application Throttle Policy required: - defaultLimit allOf: - $ref: '#/definitions/ThrottlePolicy' - properties: defaultLimit: $ref: '#/definitions/ThrottleLimit' #----------------------------------------------------- # The Advanced Throttle Policy List resource #----------------------------------------------------- ApplicationThrottlePolicyList: title: Application Level Throttle Policy List properties: count: type: integer description: | Number of Application throttle policies returned. example: 1 list: type: array items: $ref: '#/definitions/ApplicationThrottlePolicy' #----------------------------------------------------- # The Subscription Throttle Policy resource #----------------------------------------------------- SubscriptionThrottlePolicy: title: Subscription Throttle Policy required: - defaultLimit allOf: - $ref: '#/definitions/ThrottlePolicy' - properties: defaultLimit: $ref: '#/definitions/ThrottleLimit' rateLimitCount: type: integer default: 0 rateLimitTimeUnit: type: string customAttributes: description: | Custom attributes added to the Subscription Throttle policy type: array items: $ref: '#/definitions/CustomAttribute' additionalProperties: type: string example: {} stopOnQuotaReach: type: boolean default: false billingPlan: type: string #----------------------------------------------------- # The Subscription Throttle Policy List resource #----------------------------------------------------- SubscriptionThrottlePolicyList: title: Subscription Level Throttle Policy List properties: count: type: integer description: | Number of Subscription throttle policies returned. example: 1 list: type: array items: $ref: '#/definitions/SubscriptionThrottlePolicy' #----------------------------------------------------- # The Custom Rule resource #----------------------------------------------------- CustomRule: title: Custom Rule required: - siddhiQuery - keyTemplate allOf: - $ref: '#/definitions/ThrottlePolicy' - properties: siddhiQuery: type: string keyTemplate: type: string #----------------------------------------------------- # The Custom Rule List resource #----------------------------------------------------- CustomRuleList: title: Custom Rule List properties: count: type: integer description: | Number of Custom Rules returned. example: 1 list: type: array items: $ref: '#/definitions/CustomRule' #----------------------------------------------------- # The Conditional Group resource #----------------------------------------------------- ConditionalGroup : title: Conditional Groups for Throttling required: - limit - conditions properties: description: type: string conditions: type: array items: $ref: '#/definitions/ThrottleCondition' limit: $ref: '#/definitions/ThrottleLimit' #----------------------------------------------------- # The Throttle Condition resource #----------------------------------------------------- ThrottleCondition: discriminator: type x-wso2-subtypes: - HeaderCondition - IPCondition - JWTClaimsCondition - QueryParameterCondition title: Conditions used for Throttling description: Throttling Conditions required: - type properties: type: type: string enum: - HeaderCondition - IPCondition - JWTClaimsCondition - QueryParameterCondition invertCondition: type: boolean default: false #----------------------------------------------------- # The Throttle HTTP Header Condition resource #----------------------------------------------------- HeaderCondition: title: HTTP Header based throttle condition required: - headerName - headerValue allOf: - $ref: '#/definitions/ThrottleCondition' - properties: headerName: type: string headerValue: type: string #----------------------------------------------------- # The Throttle IP Condition resource #----------------------------------------------------- IPCondition: title: IP based throttle condition required: - specificIP allOf: - $ref: '#/definitions/ThrottleCondition' - properties: ipConditionType: type: string enum: - IPRange - IPSpecific specificIP: type: string startingIP: type: string endingIP: type: string #----------------------------------------------------- # The Throttle JWT Claims Condition resource #----------------------------------------------------- JWTClaimsCondition: title: JWT claim attibute based throttle condition required: - claimUrl - attribute allOf: - $ref: '#/definitions/ThrottleCondition' - properties: claimUrl: type: string attribute: type: string #----------------------------------------------------- # The Throttle Query Parameter Condition resource #----------------------------------------------------- QueryParameterCondition: title: Query parameter based throttle condition required: - parameterName - parameterValue allOf: - $ref: '#/definitions/ThrottleCondition' - properties: parameterName: type: string parameterValue: type: string #----------------------------------------------------- # The Throttle Limit resource #----------------------------------------------------- ThrottleLimit : discriminator: type x-wso2-subtypes: - RequestCountLimit - BandwidthLimit required: - type - timeUnit - unitTime properties: type: type: string enum: - RequestCountLimit - BandwidthLimit timeUnit: type: string unitTime: type: integer default: 0 #----------------------------------------------------- # The Throttle Bandwidth Limit resource #----------------------------------------------------- BandwidthLimit : required: - dataAmount - dataUnit allOf: - $ref: '#/definitions/ThrottleLimit' - properties: dataAmount: type: integer format: int64 default: 0 dataUnit: type: string #----------------------------------------------------- # The Throttle Request Count Limit resource #----------------------------------------------------- RequestCountLimit : required: - requestCount allOf: - $ref: '#/definitions/ThrottleLimit' - properties: requestCount: type: integer format: int64 default: 0 #----------------------------------------------------- # The Throttle Blocking Condition resource #----------------------------------------------------- BlockingCondition: title: Blocking Conditions description: Blocking Conditions required: - conditionType - conditionValue properties: conditionId: type: string conditionType: type: string conditionValue: type: string #----------------------------------------------------- # The Throttle Blocking Condition List resource #----------------------------------------------------- BlockingConditionList: title: Blocking Conditions List properties: count: type: integer description: | Number of Blocking Conditions returned. example: 1 list: type: array items: $ref: '#/definitions/BlockingCondition' #----------------------------------------------------- # Custom Attribute object #----------------------------------------------------- CustomAttribute: title: Name-Value pair required: - name - value properties: name: type: string value: type: string #----------------------------------------------------- # The Mediation List resource #----------------------------------------------------- mediationList: title: Mediation List properties: count: type: integer description: | Number of mediation sequences returned. example: 1 next: type: string description: | Link to the next subset of sequences qualified. Empty if no more sequences are to be returned. example: "" previous: type: string description: | Link to the previous subset of sequences qualified. Empty if current subset is the first subset returned. example: "" list: type: array items: $ref: '#/definitions/MediationInfo' #----------------------------------------------------- # The MediationInfo resource #----------------------------------------------------- MediationInfo: title: MediationInfo required: - name - type - id properties: name: type: string example: json_fault.xml id: type: string example: 01234567-0123-0123-0123-012345678901 type: type: string enum: - in - out - fault example: in #----------------------------------------------------- # The Mediation resource #----------------------------------------------------- Mediation: title: Mediation required: - name - type - config properties: id: type: string example: 01234567-0123-0123-0123-012345678901 name: type: string example: json_fault.xml type: type: string enum: - in - out - fault example: in config: type: string example: ' ' #----------------------------------------------------- # END-OF-FILE #-----------------------------------------------------