DELETE https://apis.wso2.com/api/am/admin/v0.15/policies/mediation/{mediationPolicyId}
This operation can be used to delete an existing global mediation policy providing the Id of the mediation policy.
apim:mediation_policy_create
i
DELETE https://localhost:9443/api/am/admin/v0.15/policies/mediation/2c85844c-588f-4000-9ce5-f4cdc422cc8b
Content-Type: application/json
Authorization: Bearer 58b3b072-74bb-3381-a213-ce1ca2857c2f
HTTP/1.1 200 OK
curl -k -H "Authorization: Bearer fb2a0784-f60c-3276-8fde-5b0f70e61ecc" -X DELETE https://localhost:9443/api/am/admin/v0.15/policies/mediation/2c85844c-588f-4000-9ce5-f4cdc422cc8b
Type | Name | Description | Schema | Default |
---|---|---|---|---|
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. Mediation policy 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/admin/v0.15/policies/mediation/{mediationPolicyId}
This operation can be used to retrieve a particular global mediation policy.
apim:mediation_policy_view
i
GET https://localhost:9443/api/am/admin/v0.15/policies/mediation/2e5cebbb-e48c-4345-a912-1f0a2058aa05
Authorization: Bearer da3b0521-5adb-3edc-8ab9-295b4c34c809
HTTP/1.1 200 OK
Content-Type: application/json
{
"id": "2e5cebbb-e48c-4345-a912-1f0a2058aa05",
"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 da3b0521-5adb-3edc-8ab9-295b4c34c809" https://localhost:9443/api/am/admin/v0.15/policies/mediation/2e5cebbb-e48c-4345-a912-1f0a2058aa05
Type | Name | Description | Schema | Default |
---|---|---|---|---|
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/admin/v0.15/policies/mediation/{mediationPolicyId}
This operation can be used to update an existing global mediation policy.
apim:mediation_policy_create
i
PUT https://localhost:9443/api/am/admin/v0.15/policies/mediation/76cc38e4-f41a-457a-a987-3a677c290dc6
Content-Type: application/json
Authorization: Bearer 58b3b072-74bb-3381-a213-ce1ca2857c2f
{
"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": "8242d72c-b7d7-4b51-9098-d24bd4a5ea3a",
"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 58b3b072-74bb-3381-a213-ce1ca2857c2f" -H "Content-Type: application/json" -X PUT -d @data.json https://localhost:9443/api/am/admin/v0.15/policies/mediation/8242d72c-b7d7-4b51-9098-d24bd4a5ea3a
Type | Name | Description | Schema | Default |
---|---|---|---|---|
Path |
mediationPolicyId required |
Mediation policy Id |
String | |
Body |
body required |
Mediation policy object that needs to be added |
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 mediation policy 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 |