This operation can be used to delete an existing API proving the Id of the API.
apim:api_create
i
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
HTTP/1.1 200 OK
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
Type | Name | Description | Schema | Default |
---|---|---|---|---|
Path |
apiId required |
**API ID** consisting of the **UUID** of the API. The combination of the provider of the API, name of the API and the version is also accepted as a valid API ID. Should be formatted as **provider-name-version**. |
String | |
Header |
If-Match optional |
Validator for conditional requests; based on ETag. |
String | |
Header |
If-Unmodified-Since optional |
Validator for conditional requests; based on Last Modified header. |
String |
HTTP Code | Description | Schema |
---|---|---|
200 |
OK. Resource successfully deleted. |
|
403 |
Forbidden. The request must be conditional but no condition has been specified. |
Error |
404 |
Not Found. Resource to be deleted does not exist. |
Error |
412 |
Precondition Failed. The request has not been performed because one of the preconditions is not met. |
Error |
Using this operation, you can retrieve complete details of a single API. You need to provide the Id of the API to retrive it.
apim:api_view
i
GET https://127.0.0.1:9443/api/am/publisher/v0.11/apis/7a2298c4-c905-403f-8fac-38c73301631f
Authorization: Bearer ae4eae22-3f65-387b-a171-d37eaa366fa8
HTTP/1.1 200 OK
Content-Type: application/json
{
"id": "7a2298c4-c905-403f-8fac-38c73301631f",
"name": "PizzaShackAPI",
"description": "This document describe a RESTFul API for Pizza Shack online pizza delivery store.\r\n",
"context": "/pizzashack",
"version": "1.0.0",
"provider": "admin",
"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\"}}",
"wsdlUri": null,
"status": "CREATED",
"responseCaching": "Disabled",
"cacheTimeout": 300,
"destinationStatsEnabled": null,
"isDefaultVersion": false,
"transport": [
"http",
"https"
],
"tags": ["pizza"],
"tiers": ["Unlimited"],
"maxTps": {
"sandbox": 5000,
"production": 1000
},
"thumbnailUri": null,
"visibility": "PUBLIC",
"visibleRoles": [],
"visibleTenants": [],
"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\"}",
"endpointSecurity": {
"username": "user",
"type": "basic",
"password": "pass"
},
"gatewayEnvironments": "Production and Sandbox",
"sequences": [],
"subscriptionAvailability": null,
"subscriptionAvailableTenants": [],
"businessInformation": {
"businessOwnerEmail": "marketing@pizzashack.com",
"technicalOwnerEmail": "architecture@pizzashack.com",
"technicalOwner": "John Doe",
"businessOwner": "Jane Roe"
},
"corsConfiguration": {
"accessControlAllowOrigins": ["*"],
"accessControlAllowHeaders": [
"authorization",
"Access-Control-Allow-Origin",
"Content-Type",
"SOAPAction"
],
"accessControlAllowMethods": [
"GET",
"PUT",
"POST",
"DELETE",
"PATCH",
"OPTIONS"
],
"accessControlAllowCredentials": false,
"corsConfigurationEnabled": false
}
}
curl -k -H "Authorization: Bearer ae4eae22-3f65-387b-a171-d37eaa366fa8" https://127.0.0.1:9443/api/am/publisher/v0.11/apis/7a2298c4-c905-403f-8fac-38c73301631f
Type | Name | Description | Schema | Default |
---|---|---|---|---|
Path |
apiId required |
**API ID** consisting of the **UUID** of the API. The combination of the provider of the API, name of the API and the version is also accepted as a valid API ID. Should be formatted as **provider-name-version**. |
String | |
Header |
Accept optional |
Media types acceptable for the response. Default is application/json. |
String |
application/json |
Header |
If-None-Match optional |
Validator for conditional requests; based on the ETag of the formerly retrieved variant of the resourec. |
String | |
Header |
If-Modified-Since optional |
Validator for conditional requests; based on Last Modified header of the formerly retrieved variant of the resource. |
String |
HTTP Code | Description | Schema |
---|---|---|
200 |
OK. Requested API is returned |
API |
304 |
Not Modified. Empty body because the client has already the latest version of the requested resource (Will be supported in future). |
|
404 |
Not Found. Requested API does not exist. |
Error |
406 |
Not Acceptable. The requested media type is not supported |
Error |
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.
apim:api_create
i
PUT https://127.0.0.1:9443/api/am/publisher/v0.11/apis/7a2298c4-c905-403f-8fac-38c73301631f
Authorization: Bearer ae4eae22-3f65-387b-a171-d37eaa366fa8
Content-Type: application/json
{
"id": "7a2298c4-c905-403f-8fac-38c73301631f",
"name": "PizzaShackAPI",
"description": "This document describe a RESTFul API for Pizza Shack online pizza delivery store.\r\n",
"context": "/pizzashack",
"version": "1.0.0",
"provider": "admin",
"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\"}}",
"wsdlUri": null,
"status": "CREATED",
"responseCaching": "Disabled",
"cacheTimeout": 300,
"destinationStatsEnabled": null,
"isDefaultVersion": false,
"transport": [
"https"
],
"tags": ["pizza","chicken"],
"tiers": ["Unlimited"],
"maxTps": {
"sandbox": 500,
"production": 100
},
"thumbnailUri": null,
"visibility": "PUBLIC",
"visibleRoles": [],
"visibleTenants": [],
"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\"}",
"endpointSecurity": {
"username": "user",
"type": "basic",
"password": "pass"
},
"gatewayEnvironments": "Production and Sandbox",
"sequences": [],
"subscriptionAvailability": null,
"subscriptionAvailableTenants": [],
"businessInformation": {
"businessOwnerEmail": "marketing@pizzashack.com",
"technicalOwnerEmail": "architecture@pizzashack.com",
"technicalOwner": "John Doe",
"businessOwner": "Jane Roe"
},
"corsConfiguration": {
"accessControlAllowOrigins": ["*"],
"accessControlAllowHeaders": [
"authorization",
"Access-Control-Allow-Origin",
"Content-Type",
"SOAPAction"
],
"accessControlAllowMethods": [
"GET",
"PUT",
"POST",
"DELETE",
"PATCH",
"OPTIONS"
],
"accessControlAllowCredentials": false,
"corsConfigurationEnabled": false
}
}
HTTP/1.1 200 OK
Content-Type: application/json
{
"id": "7a2298c4-c905-403f-8fac-38c73301631f",
"name": "PizzaShackAPI",
"description": "This document describe a RESTFul API for Pizza Shack online pizza delivery store.\r\n",
"context": "/pizzashack",
"version": "1.0.0",
"provider": "admin",
"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\"}}",
"wsdlUri": null,
"status": "CREATED",
"responseCaching": "Disabled",
"cacheTimeout": 300,
"destinationStatsEnabled": null,
"isDefaultVersion": false,
"transport": ["https"],
"tags": [
"chicken",
"pizza"
],
"tiers": ["Unlimited"],
"maxTps": {
"sandbox": 500,
"production": 100
},
"thumbnailUri": null,
"visibility": "PUBLIC",
"visibleRoles": [],
"visibleTenants": [],
"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\"}",
"endpointSecurity": {
"username": "user",
"type": "basic",
"password": "pass"
},
"gatewayEnvironments": "Production and Sandbox",
"sequences": [],
"subscriptionAvailability": null,
"subscriptionAvailableTenants": [],
"businessInformation": {
"businessOwnerEmail": "marketing@pizzashack.com",
"technicalOwnerEmail": "architecture@pizzashack.com",
"technicalOwner": "John Doe",
"businessOwner": "Jane Roe"
},
"corsConfiguration": {
"accessControlAllowOrigins": ["*"],
"accessControlAllowHeaders": [
"authorization",
"Access-Control-Allow-Origin",
"Content-Type",
"SOAPAction"
],
"accessControlAllowMethods": [
"GET",
"PUT",
"POST",
"DELETE",
"PATCH",
"OPTIONS"
],
"accessControlAllowCredentials": false,
"corsConfigurationEnabled": false
}
}
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
Type | Name | Description | Schema | Default |
---|---|---|---|---|
Path |
apiId required |
**API ID** consisting of the **UUID** of the API. The combination of the provider of the API, name of the API and the version is also accepted as a valid API ID. Should be formatted as **provider-name-version**. |
String | |
Body |
body required |
API object that needs to be added |
API (API) | |
Header |
Content-Type required |
Media type of the entity in the body. Default is application/json. |
String |
application/json |
Header |
If-Match optional |
Validator for conditional requests; based on ETag. |
String | |
Header |
If-Unmodified-Since optional |
Validator for conditional requests; based on Last Modified header. |
String |
HTTP Code | Description | Schema |
---|---|---|
200 |
OK. Successful response with updated API object |
API |
400 |
Bad Request. Invalid request or validation error |
Error |
403 |
Forbidden. The request must be conditional but no condition has been specified. |
Error |
404 |
Not Found. The resource to be updated does not exist. |
Error |
412 |
Precondition Failed. The request has not been performed because one of the preconditions is not met. |
Error |
This operation can be used to retrieve the swagger definition of an API.
apim:api_view
i
GET https://127.0.0.1:9443/api/am/publisher/v0.11/apis/890a4f4d-09eb-4877-a323-57f6ce2ed79b/swagger
Authorization: Bearer ae4eae22-3f65-387b-a171-d37eaa366fa8
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 329
{
"paths": {"/*": {"get": {
"x-auth-type": "Application",
"x-throttling-tier": "Unlimited",
"responses": {"200": {"description": "OK"}}
}}},
"x-wso2-security": {"apim": {"x-wso2-scopes": []}},
"swagger": "2.0",
"info": {
"title": "PhoneVerification",
"description": "Verify a phone number",
"contact": {
"email": "xx@ee.com",
"name": "xx"
},
"version": "1.0.0"
}
}
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/swagger
Type | Name | Description | Schema | Default |
---|---|---|---|---|
Path |
apiId required |
**API ID** consisting of the **UUID** of the API. The combination of the provider of the API, name of the API and the version is also accepted as a valid API ID. Should be formatted as **provider-name-version**. |
String | |
Header |
Accept optional |
Media types acceptable for the response. Default is application/json. |
String |
application/json |
Header |
If-None-Match optional |
Validator for conditional requests; based on the ETag of the formerly retrieved variant of the resourec. |
String | |
Header |
If-Modified-Since optional |
Validator for conditional requests; based on Last Modified header of the formerly retrieved variant of the resource. |
String |
HTTP Code | Description | Schema |
---|---|---|
200 |
OK. Requested swagger document of the API is returned |
|
304 |
Not Modified. Empty body because the client has already the latest version of the requested resource (Will be supported in future). |
|
404 |
Not Found. Requested API does not exist. |
Error |
406 |
Not Acceptable. The requested media type is not supported |
Error |
This operation can be used to update the swagger definition of an existing API. Swagger definition to be updated is passed as a form data parameter `apiDefinition`.
apim:api_create
i
PUT https://127.0.0.1:9443/api/am/publisher/v0.11/apis/8848faaa-7fd1-478a-baa2-48a4ebb92c98/swagger
Authorization:Bearer 5311eca3-8ac8-354e-ab36-7e2fdd6a4013
Content-Length: 477
Content-Type: multipart/form-data; boundary=------------------------4f51e636c0003d99
--------------------------4f51e636c0003d99
Content-Disposition: form-data; name="apiDefinition"
{"paths":{"\/*":{"get":{"x-auth-type":"Application","x-throttling-tier":"Unlimited","responses":{"200":{"description":"OK"}}}}},"x-wso2-security":{"apim":{"x-wso2-scopes":[]}},"swagger":"2.0","info":{"title":"PhoneVerification","description":"Verify a phone number","contact":{"email":"xx@ee.com","name":"xx"},"version":"1.0.0"}}
--------------------------4f51e636c0003d99--
HTTP/1.1 200 OK
Content-Type: application/json
{
"paths": {"/*": {"get": {
"x-auth-type": "Application",
"x-throttling-tier": "Unlimited",
"responses": {"200": {"description": "OK"}}
}}},
"x-wso2-security": {"apim": {"x-wso2-scopes": []}},
"swagger": "2.0",
"info": {
"title": "PhoneVerification",
"description": "Verify a phone number",
"contact": {
"email": "xx@ee.com",
"name": "xx"
},
"version": "1.0.0"
}
}
curl -k -H "Authorization:Bearer 5311eca3-8ac8-354e-ab36-7e2fdd6a4013" -F apiDefinition="{\"paths\":{\"\/*\":{\"get\":{\"x-auth-type\":\"Application\",\"x-throttling-tier\":\"Unlimited\",\"responses\":{\"200\":{\"description\":\"OK\"}}}}},\"x-wso2-security\":{\"apim\":{\"x-wso2-scopes\":[]}},\"swagger\":\"2.0\",\"info\":{\"title\":\"PhoneVerification\",\"description\":\"Verify a phone number\",\"contact\":{\"email\":\"xx@ee.com\",\"name\":\"xx\"},\"version\":\"1.0.0\"}}" -X PUT "https://127.0.0.1:9443/api/am/publisher/v0.11/apis/8848faaa-7fd1-478a-baa2-48a4ebb92c98/swagger"
Type | Name | Description | Schema | Default |
---|---|---|---|---|
Path |
apiId required |
**API ID** consisting of the **UUID** of the API. The combination of the provider of the API, name of the API and the version is also accepted as a valid API ID. Should be formatted as **provider-name-version**. |
String | |
Form |
apiDefinition required |
Swagger definition of the API |
String | |
Header |
Content-Type required |
Media type of the entity in the body. Default is application/json. |
String |
application/json |
Header |
If-Match optional |
Validator for conditional requests; based on ETag. |
String | |
Header |
If-Unmodified-Since optional |
Validator for conditional requests; based on Last Modified header. |
String |
HTTP Code | Description | Schema |
---|---|---|
200 |
OK. Successful response with updated Swagger definition |
|
400 |
Bad Request. Invalid request or validation error |
Error |
403 |
Forbidden. The request must be conditional but no condition has been specified. |
Error |
404 |
Not Found. The resource to be updated does not exist. |
Error |
412 |
Precondition Failed. The request has not been performed because one of the preconditions is not met. |
Error |
This operation can be used to download a thumbnail image of an API.
apim:api_view
i
GET https://127.0.0.1:9443/api/am/publisher/v0.11/apis/29c9ec3d-f590-467e-83e6-96d43517080f/thumbnail
Authorization: Bearer d34baf74-3f02-3929-814e-88b27f750ba9
HTTP/1.1 200 OK
Content-Type: image/jpeg
[image content]
curl -k -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 > image.jpg
Type | Name | Description | Schema | Default |
---|---|---|---|---|
Path |
apiId required |
**API ID** consisting of the **UUID** of the API. The combination of the provider of the API, name of the API and the version is also accepted as a valid API ID. Should be formatted as **provider-name-version**. |
String | |
Header |
Accept optional |
Media types acceptable for the response. Default is application/json. |
String |
application/json |
Header |
If-None-Match optional |
Validator for conditional requests; based on the ETag of the formerly retrieved variant of the resourec. |
String | |
Header |
If-Modified-Since optional |
Validator for conditional requests; based on Last Modified header of the formerly retrieved variant of the resource. |
String |
HTTP Code | Description | Schema |
---|---|---|
200 |
OK. Thumbnail image returned |
|
304 |
Not Modified. Empty body because the client has already the latest version of the requested resource (Will be supported in future). |
|
404 |
Not Found. Requested Document does not exist. |
Error |
406 |
Not Acceptable. The requested media type is not supported |
Error |
This operation can be used to upload a thumbnail image of an API. The thumbnail to be uploaded should be given as a form data parameter `file`.
apim:api_create
i
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="image.jpg"
Content-Type: image/jpeg
[image content]
--------------------------5e542e0e5b50e1e4--
HTTP/1.1 201 Created
Location: https://127.0.0.1:9443/api/am/publisher/v0.11/apis/8848faaa-7fd1-478a-baa2-48a4ebb92c98/thumbnail
Content-Type: application/json
{
"relativePath": "/apis/8848faaa-7fd1-478a-baa2-48a4ebb92c98/thumbnail",
"mediaType": "image/jpeg"
}
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
Type | Name | Description | Schema | Default |
---|---|---|---|---|
Path |
apiId required |
**API ID** consisting of the **UUID** of the API. The combination of the provider of the API, name of the API and the version is also accepted as a valid API ID. Should be formatted as **provider-name-version**. |
String | |
Form |
file required |
Image to upload |
file | |
Header |
Content-Type required |
Media type of the entity in the body. Default is application/json. |
String |
application/json |
Header |
If-Match optional |
Validator for conditional requests; based on ETag. |
String | |
Header |
If-Unmodified-Since optional |
Validator for conditional requests; based on Last Modified header. |
String |
HTTP Code | Description | Schema |
---|---|---|
200 |
OK. Image updated |
FileInfo |
400 |
Bad Request. Invalid request or validation error. |
Error |
404 |
Not Found. The resource to be updated does not exist. |
Error |
412 |
Precondition Failed. The request has not been performed because one of the preconditions is not met. |
Error |
This operation is used to change the lifecycle of an API. Eg: Publish an API which is in `CREATED` state. In order to change the lifecycle, we need to provide the lifecycle `action` as a query parameter. For example, to Publish an API, `action` should be `Publish`. Some actions supports providing additional paramters which should be provided as `lifecycleChecklist` parameter. Please see parameters table for more information.
apim:api_publish
i
POST https://127.0.0.1:9443/api/am/publisher/v0.11/apis/change-lifecycle?apiId=890a4f4d-09eb-4877-a323-57f6ce2ed79b&action=Publish
Authorization: Bearer ae4eae22-3f65-387b-a171-d37eaa366fa8
HTTP/1.1 200 OK
curl -k -H "Authorization: Bearer ae4eae22-3f65-387b-a171-d37eaa366fa8" -X POST "https://127.0.0.1:9443/api/am/publisher/v0.11/apis/change-lifecycle?apiId=890a4f4d-09eb-4877-a323-57f6ce2ed79b&action=Publish"
Type | Name | Description | Schema | Default |
---|---|---|---|---|
Query |
action required |
The action to demote or promote the state of the API. Supported actions are [ **Publish, Deploy as a Prototype, Demote to Created, Demote to Prototyped, Block, Deprecate, Re-Publish, Retire **] Accepted values: Publish
Deploy as a Prototype
Demote to Created
Demote to Prototyped
Block
Deprecate
Re-Publish
Retire
|
String | |
Query |
apiId required |
**API ID** consisting of the **UUID** of the API. The combination of the provider of the API, name of the API and the version is also accepted as a valid API I. Should be formatted as **provider-name-version**. |
String | |
Query |
lifecycleChecklist optional |
You can specify additional checklist items by using an **"attribute:"** modifier. Eg: "Deprecate Old Versions:true" will deprecate older versions of a particular API when it is promoted to Published state from Created state. Multiple checklist items can be given in "attribute1:true, attribute2:false" format. Supported checklist items are as follows. 1. **Deprecate Old Versions**: Setting this to true will deprecate older versions of a particular API when it is promoted to Published state from Created state. 2. **Require Re-Subscription**: If you set this to true, users need to re subscribe to the API although they may have subscribed to an older version. |
String | |
Header |
If-Match optional |
Validator for conditional requests; based on ETag. |
String | |
Header |
If-Unmodified-Since optional |
Validator for conditional requests; based on Last Modified header. |
String |
HTTP Code | Description | Schema |
---|---|---|
200 |
OK. Lifecycle changed successfully. |
|
400 |
Bad Request. Invalid request or validation error |
Error |
404 |
Not Found. Requested API does not exist. |
Error |
412 |
Precondition Failed. The request has not been performed because one of the preconditions is not met. |
Error |
This operation can be used to create a new version of an existing API. The new version is specified as `newVersion` query parameter. New API will be in `CREATED` state.
apim:api_create
i
POST https://127.0.0.1:9443/api/am/publisher/v0.11/apis/copy-api?apiId=890a4f4d-09eb-4877-a323-57f6ce2ed79b&newVersion=2.0.0
Authorization: Bearer ae4eae22-3f65-387b-a171-d37eaa366fa8
HTTP/1.1 201 Created
Location: https://127.0.0.1:9443/api/am/publisher/v0.11/apis/25a84fc9-38c0-4578-95e8-29fb6b1c4771
Content-Type: application/json
{
"id": "25a84fc9-38c0-4578-95e8-29fb6b1c4771",
"name": "PizzaShackAPI",
"description": "This document describe a RESTFul API for Pizza Shack online pizza delivery store.\r\n",
"context": "/pizzashack",
"version": "2.0.0",
"provider": "admin",
"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\":{\"schema\":{\"$ref\":\"#\\/definitions\\/Order\"},\"headers\":{\"Location\":{\"description\":\"The URL of the newly created resource.\",\"type\":\"string\"}},\"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\":{\"schema\":{\"title\":\"Menu\",\"properties\":{\"list\":{\"items\":{\"$ref\":\"#\\/definitions\\/MenuItem\"},\"type\":\"array\"}},\"type\":\"object\"},\"headers\":{},\"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\"},\"pizzaType\":{\"type\":\"string\"},\"address\":{\"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\":\"2.0.0\"}}",
"wsdlUri": null,
"status": "CREATED",
"responseCaching": "Disabled",
"cacheTimeout": 300,
"destinationStatsEnabled": null,
"isDefaultVersion": false,
"transport": ["https"],
"tags": [
"chicken",
"pizza"
],
"tiers": ["Unlimited"],
"maxTps": {
"sandbox": 500,
"production": 100
},
"thumbnailUri": null,
"visibility": "PUBLIC",
"visibleRoles": [],
"visibleTenants": [],
"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\"}",
"endpointSecurity": {
"username": "user",
"type": "basic",
"password": "pass"
},
"gatewayEnvironments": "Production and Sandbox",
"sequences": [],
"subscriptionAvailability": null,
"subscriptionAvailableTenants": [],
"businessInformation": {
"businessOwnerEmail": "marketing@pizzashack.com",
"technicalOwnerEmail": "architecture@pizzashack.com",
"technicalOwner": "John Doe",
"businessOwner": "Jane Roe"
},
"corsConfiguration": {
"accessControlAllowOrigins": ["*"],
"accessControlAllowHeaders": [
"authorization",
"Access-Control-Allow-Origin",
"Content-Type",
"SOAPAction"
],
"accessControlAllowMethods": [
"GET",
"PUT",
"POST",
"DELETE",
"PATCH",
"OPTIONS"
],
"accessControlAllowCredentials": false,
"corsConfigurationEnabled": false
}
}
curl -k -H "Authorization: Bearer ae4eae22-3f65-387b-a171-d37eaa366fa8" -X POST "https://127.0.0.1:9443/api/am/publisher/v0.11/apis/copy-api?apiId=890a4f4d-09eb-4877-a323-57f6ce2ed79b&newVersion=2.0.0"
Type | Name | Description | Schema | Default |
---|---|---|---|---|
Query |
newVersion required |
Version of the new API. |
String | |
Query |
apiId required |
**API ID** consisting of the **UUID** of the API. The combination of the provider of the API, name of the API and the version is also accepted as a valid API I. Should be formatted as **provider-name-version**. |
String |
HTTP Code | Description | Schema |
---|---|---|
201 |
Created. Successful response with the newly created API as entity in the body. Location header contains URL of newly created API. |
|
400 |
Bad Request. Invalid request or validation error |
Error |
404 |
Not Found. API to copy does not exist. |
Error |