DELETE https://apis.wso2.com/api/am/publisher/v0.13/apis/{apiId}/policies/mediation/{mediationPolicyId}
This operation can be used to delete an existing API specific mediation policy providing the Id of the API and the Id of the mediation policy.
apim:api_create
i
DELETE https://localhost:9443/api/am/publisher/v0.13/apis/40082986-6488-4b86-801a-b0b069d4588c/policies/mediation/60f5146d-1774-405d-86b3-9b040ac266d5
Authorization: Bearer fb2a0784-f60c-3276-8fde-5b0f70e61ecc
HTTP/1.1 200 OK
curl -k -H "Authorization: Bearer fb2a0784-f60c-3276-8fde-5b0f70e61ecc" -X DELETE https://localhost:9443/api/am/publisher/v0.13/apis/40082986-6488-4b86-801a-b0b069d4588c/policies/mediation/60f5146d-1774-405d-86b3-9b040ac266d5
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 |
mediationPolicyId required |
Mediation policy Id |
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.13/apis/{apiId}/policies/mediation/{mediationPolicyId}
This operation can be used to retrieve a particular API specific mediation policy.
apim:api_view
i
GET https://localhost:9443/api/am/publisher/v0.13/apis/40082986-6488-4b86-801a-b0b069d4588c/policies/mediation/624b9f7d-bfaf-484b-94cc-e84491f5d725
Authorization: Bearer 5aa0acc0-0ce3-3a0b-8cc8-db5ef696ee23
HTTP/1.1 200 OK
Content-Type: application/json
{
"id": "624b9f7d-bfaf-484b-94cc-e84491f5d725",
"name": "add_custom_header_fault",
"type": "fault",
"config": "<sequence xmlns=\"http://ws.apache.org/ns/synapse\" name=\"add_custom_header_fault\">\n <property name=\"CustomHeader\" scope=\"transport\" value=\"example\"/>\n<\/sequence>\n"
}
curl -k -H "Authorization: Bearer 5aa0acc0-0ce3-3a0b-8cc8-db5ef696ee23" https://localhost:9443/api/am/publisher/v0.13/apis/40082986-6488-4b86-801a-b0b069d4588c/policies/mediation/624b9f7d-bfaf-484b-94cc-e84491f5d725
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 |
mediationPolicyId required |
Mediation policy 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. Mediation policy returned. |
Mediation |
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 |
PUT https://apis.wso2.com/api/am/publisher/v0.13/apis/{apiId}/policies/mediation/{mediationPolicyId}
This operation can be used to update an existing mediation policy of an API.
apim:api_create
i
PUT https://localhost:9443/api/am/publisher/v0.13/apis/40082986-6488-4b86-801a-b0b069d4588c/policies/mediation/820fdcf7-7258-42b5-809e-674b893644d1
Content-Type: application/json
Authorization: Bearer 9e41fae2-3ada-3dd1-8f12-2077202f4285
{
"name": "add_custom_header_fault",
"type": "fault",
"config": "<sequence xmlns=\"http://ws.apache.org/ns/synapse\" name=\"add_custom_header_fault\">\n <property name=\"CustomHeader\" scope=\"transport\" value=\"example\"/>\n<\/sequence>\n"
}
HTTP/1.1 200 OK
Content-Type: application/json
{
"id": "a7365481-5b3f-463c-a646-a498895ac210",
"name": "add_custom_header_fault",
"type": "fault",
"config": "<sequence xmlns=\"http://ws.apache.org/ns/synapse\" name=\"add_custom_header_fault\">\n <property name=\"CustomHeader\" scope=\"transport\" value=\"example\"/>\n<\/sequence>\n"
}
curl -k -H "Authorization: Bearer 9e41fae2-3ada-3dd1-8f12-2077202f4285" -H "Content-Type: application/json" -X PUT -d @data.json https://localhost:9443/api/am/publisher/v0.13/apis/40082986-6488-4b86-801a-b0b069d4588c/policies/mediation/820fdcf7-7258-42b5-809e-674b893644d1
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 |
mediationPolicyId required |
Mediation policy Id |
String | |
Body |
body required |
Mediation policy object that needs to be updated |
Mediation (Mediation) | |
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 |
Mediation |
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 |