DELETE https://apis.wso2.com/api/am/publisher/v0.16/apis/{apiId}
This operation can be used to delete an existing API proving the Id of the API.
Not required
Type | Name | Description | Schema | Default |
---|---|---|---|---|
Path |
apiId required |
**API ID** consisting of the **UUID** of the API. Using the **UUID** in the API call is recommended. 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 (Will be supported in future). |
String | |
Header |
If-Unmodified-Since optional |
Validator for conditional requests; based on Last Modified header (Will be supported in future). |
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 |
GET https://apis.wso2.com/api/am/publisher/v0.16/apis/{apiId}
Using this operation, you can retrieve complete details of a single API. You need to provide the Id of the API to retrive it.
Not required
Type | Name | Description | Schema | Default |
---|---|---|---|---|
Path |
apiId required |
**API ID** consisting of the **UUID** of the API. Using the **UUID** in the API call is recommended. 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 resource (Will be supported in future). |
String | |
Header |
If-Modified-Since optional |
Validator for conditional requests; based on Last Modified header of the formerly retrieved variant of the resource (Will be supported in future). |
String |
HTTP Code | Description | Schema |
---|---|---|
200 |
OK. Requested API is returned |
APIDetailed |
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 |
PUT https://apis.wso2.com/api/am/publisher/v0.16/apis/{apiId}
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.
Not required
Type | Name | Description | Schema | Default |
---|---|---|---|---|
Path |
apiId required |
**API ID** consisting of the **UUID** of the API. Using the **UUID** in the API call is recommended. 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 |
APIDetailed (APIDetailed) | |
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 (Will be supported in future). |
String | |
Header |
If-Unmodified-Since optional |
Validator for conditional requests; based on Last Modified header (Will be supported in future). |
String |
HTTP Code | Description | Schema |
---|---|---|
200 |
OK. Successful response with updated API object |
APIDetailed |
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 |
GET https://apis.wso2.com/api/am/publisher/v0.16/apis/{apiId}/resource-policies
This operation can be used to retrieve conversion policy resource definitions of an API.
Not required
Type | Name | Description | Schema | Default |
---|---|---|---|---|
Path |
apiId required |
**API ID** consisting of the **UUID** of the API. Using the **UUID** in the API call is recommended. 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 | |
Query |
sequenceType required |
sequence type of the resource policy resource definition |
String | |
Query |
resourcePath optional |
Resource path of the resource policy definition |
String | |
Query |
verb optional |
HTTP verb of the resource path of the resource policy definition |
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 resource (Will be supported in future). |
String | |
Header |
If-Modified-Since optional |
Validator for conditional requests; based on Last Modified header of the formerly retrieved variant of the resource (Will be supported in future). |
String |
HTTP Code | Description | Schema |
---|---|---|
200 |
OK. List of resource policy definitions of the API is returned |
ResourcePolicyList |
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 |
GET https://apis.wso2.com/api/am/publisher/v0.16/apis/{apiId}/resource-policies/{resourceId}
This operation can be used to retrieve conversion policy resource definitions of an API given the resource identifier.
Not required
Type | Name | Description | Schema | Default |
---|---|---|---|---|
Path |
apiId required |
**API ID** consisting of the **UUID** of the API. Using the **UUID** in the API call is recommended. 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 | |
Path |
resourceId required |
registry resource Id |
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 resource (Will be supported in future). |
String | |
Header |
If-Modified-Since optional |
Validator for conditional requests; based on Last Modified header of the formerly retrieved variant of the resource (Will be supported in future). |
String |
HTTP Code | Description | Schema |
---|---|---|
200 |
OK. Requested resource policy definition of the API is returned for the given resource identifier. |
ResourcePolicyInfo |
304 |
Not Modified. Empty body because the client has already the latest version of the requested resource (Will be supported in future). |
|
400 |
Bad Request. Invalid request or validation error |
Error |
404 |
Not Found. Requested API does not exist. |
Error |
406 |
Not Acceptable. The requested media type is not supported |
Error |
PUT https://apis.wso2.com/api/am/publisher/v0.16/apis/{apiId}/resource-policies/{resourceId}
This operation can be used to update the resource policy(inflow/outflow) definition for the given resource identifier of an existing API. resource policy definition to be updated is passed as a body parameter `content`.
Not required
Type | Name | Description | Schema | Default |
---|---|---|---|---|
Path |
apiId required |
**API ID** consisting of the **UUID** of the API. Using the **UUID** in the API call is recommended. 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 | |
Path |
resourceId required |
registry resource Id |
String | |
Body |
body required |
Content of the resource policy definition that needs to be updated |
ResourcePolicyInfo (ResourcePolicyInfo) | |
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 (Will be supported in future). |
String | |
Header |
If-Unmodified-Since optional |
Validator for conditional requests; based on Last Modified header (Will be supported in future). |
String |
HTTP Code | Description | Schema |
---|---|---|
200 |
OK. Successful response with updated the resource policy definition |
ResourcePolicyInfo |
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 |
GET https://apis.wso2.com/api/am/publisher/v0.16/apis/{apiId}/swagger
This operation can be used to retrieve the swagger definition of an API.
Not required
Type | Name | Description | Schema | Default |
---|---|---|---|---|
Path |
apiId required |
**API ID** consisting of the **UUID** of the API. Using the **UUID** in the API call is recommended. 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 resource (Will be supported in future). |
String | |
Header |
If-Modified-Since optional |
Validator for conditional requests; based on Last Modified header of the formerly retrieved variant of the resource (Will be supported in future). |
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 |
PUT https://apis.wso2.com/api/am/publisher/v0.16/apis/{apiId}/swagger
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`.
Not required
Type | Name | Description | Schema | Default |
---|---|---|---|---|
Path |
apiId required |
**API ID** consisting of the **UUID** of the API. Using the **UUID** in the API call is recommended. 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 (Will be supported in future). |
String | |
Header |
If-Unmodified-Since optional |
Validator for conditional requests; based on Last Modified header (Will be supported in future). |
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 |
GET https://apis.wso2.com/api/am/publisher/v0.16/apis/{apiId}/thumbnail
This operation can be used to download a thumbnail image of an API.
Not required
Type | Name | Description | Schema | Default |
---|---|---|---|---|
Path |
apiId required |
**API ID** consisting of the **UUID** of the API. Using the **UUID** in the API call is recommended. 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 resource (Will be supported in future). |
String | |
Header |
If-Modified-Since optional |
Validator for conditional requests; based on Last Modified header of the formerly retrieved variant of the resource (Will be supported in future). |
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 |
POST https://apis.wso2.com/api/am/publisher/v0.16/apis/{apiId}/thumbnail
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`.
Not required
Type | Name | Description | Schema | Default |
---|---|---|---|---|
Path |
apiId required |
**API ID** consisting of the **UUID** of the API. Using the **UUID** in the API call is recommended. 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 (Will be supported in future). |
String | |
Header |
If-Unmodified-Since optional |
Validator for conditional requests; based on Last Modified header (Will be supported in future). |
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 |
POST https://apis.wso2.com/api/am/publisher/v0.16/apis/change-lifecycle
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`. Note that the `Re-publish` action is available only after calling `Block`. Some actions supports providing additional paramters which should be provided as `lifecycleChecklist` parameter. Please see parameters table for more information.
Not required
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. Using the **UUID** in the API call is recommended. 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 |
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. 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. **Sample CURL :** curl -k -H "Authorization: Bearer ae4eae22-3f65-387b-a171-d37eaa366fa8" -X POST "https://localhost:9443/api/am/publisher/v0.16/apis/change-lifecycle?apiId=890a4f4d-09eb-4877-a323-57f6ce2ed79b&action=Publish&lifecycleChecklist=Deprecate Old Versions:true,Require Re-Subscription:true" |
String | |
Header |
If-Match optional |
Validator for conditional requests; based on ETag (Will be supported in future). |
String | |
Header |
If-Unmodified-Since optional |
Validator for conditional requests; based on Last Modified header (Will be supported in future). |
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 |
POST https://apis.wso2.com/api/am/publisher/v0.16/apis/copy-api
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.
Not required
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. Using the **UUID** in the API call is recommended. 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 |
401 |
Unauthenticated request. |
Error |
404 |
Not Found. API to copy does not exist. |
POST https://apis.wso2.com/api/am/publisher/v0.16/apis
This operation can be used to create a new API specifying the details of the API in the payload. The new API will be in `CREATED` state. There is a special capability for a user who has `APIM Admin` permission such that he can create APIs on behalf of other users. For that he can to specify `"provider" : "some_other_user"` in the payload so that the API's creator will be shown as `some_other_user` in the UI.
Not required
Type | Name | Description | Schema | Default |
---|---|---|---|---|
Body |
body required |
API object that needs to be added |
APIDetailed (APIDetailed) | |
Header |
Content-Type required |
Media type of the entity in the body. Default is application/json. |
String |
application/json |
HTTP Code | Description | Schema |
---|---|---|
201 |
Created. Successful response with the newly created object as entity in the body. Location header contains URL of newly created entity. |
APIDetailed |
400 |
Bad Request. Invalid request or validation error. |
Error |
415 |
Unsupported Media Type. The entity of the request was in a not supported format. |
Error |