Get policy partial.
http://apis.wso2.com/api/appm/publisher/v1.1/administration/xacmlpolicies/{policyPartialId}
GET
appm:administration
curl -X GET -H "Authorization: Bearer 5e3e12917945881407eaad1868ea4629" "http://localhost:9763/api/appm/publisher/v1.1/administration/xacmlpolicies/40"
{"policyPartial": "<Rule Effect="Permit" RuleId="Rule001"><Condition>
<Apply FunctionId="urn:oasis:names:tc:xacml:1.0:function:any-of">
<Function FunctionId="urn:oasis:names:tc:xacml:1.0:function:string-equal"/>
<AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">admin</AttributeValue>
<AttributeDesignator AttributeId="http://wso2.org/claims/role" Category="urn:oasis:names:tc:xacml:1.0:subject-category:access-subject" DataType="http://www.w3.org/2001/XMLSchema#string" MustBePresent="true"/>
</Apply>
</Condition>
</Rule>","policyPartialName": "ddd","isSharedPartial": true,"policyPartialDesc": null,"policyPartialIc": 2}
Type | Name | Description | Schema | Default |
---|---|---|---|---|
Path |
policyPartialId required |
Policy partial ID |
Integer | |
Header |
Accept optional |
Media types acceptable for the response. Default is JSON. |
String |
JSON |
Header |
If-None-Match optional |
Validator for conditional requests; based on the ETag of the formerly retrieved variant of the resource. |
String | |
Header |
If-Modified-Since optional |
Validator for conditional requests; based on the Last Modified header of the formerly retrieved variant of the resource. |
String |
HTTP Code | Description | Schema |
---|---|---|
200 |
OK. Qualifying App is returned. |
PolicyPartial |
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 |
Update an existing policy partial
http://apis.wso2.com/api/appm/publisher/v1.1/administration/xacmlpolicies/{policyPartialId}
PUT
appm:administration
curl -X PUT -H "Authorization: Bearer 28bc70efa75175336e177d88e148c46d" -H "Content-Type: application/json" -H "Cache-Control: no-cache" -H "Postman-Token: 02ec508b-85ef-c4fa-5cb3-e5b4ab440948" -d '{"isSharedPartial":true,"policyPartialDesc":"asdasdasdadsad","policyPartial":"<Rule Effect=\"Permit\" RuleId=\"Rule001\"><Condition>\n <Apply FunctionId=\"urn:oasis:names:tc:xacml:1.0:function:any-of\">\n <Function FunctionId=\"urn:oasis:names:tc:xacml:1.0:function:string-equal\"/>\n <AttributeValue DataType=\"http://www.w3.org/2001/XMLSchema#string\">admin</AttributeValue>\n <AttributeDesignator AttributeId=\"http://wso2.org/claims/role\" Category=\"urn:oasis:names:tc:xacml:1.0:subject-category:access-subject\" DataType=\"http://www.w3.org/2001/XMLSchema#string\" MustBePresent=\"true\"/>\n </Apply>\n</Condition>\n</Rule>","policyPartialName":"asdasd","policyPartialId":1}' "http://localhost:9763/api/appm/publisher/v1.1/administration/xacmlpolicies/1"
{"policyPartial": "<Rule Effect="Permit" RuleId="Rule001"><Condition>
<Apply FunctionId="urn:oasis:names:tc:xacml:1.0:function:any-of">
<Function FunctionId="urn:oasis:names:tc:xacml:1.0:function:string-equal"/>
<AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">admin</AttributeValue>
<AttributeDesignator AttributeId="http://wso2.org/claims/role" Category="urn:oasis:names:tc:xacml:1.0:subject-category:access-subject" DataType="http://www.w3.org/2001/XMLSchema#string" MustBePresent="true"/>
</Apply>
</Condition>
</Rule>","policyPartialName": "ddd","isSharedPartial": true,"policyPartialDesc": null}
HTTP/1.1 200 OK
Type | Name | Description | Schema | Default |
---|---|---|---|---|
Path |
policyPartialId required |
Policy partial ID |
Integer | |
Body |
body required |
App object that needs to be added. |
PolicyPartial (PolicyPartial) | |
Header |
Content-Type required |
Media type of the entity in the body. Default is JSON. |
String |
JSON |
Header |
If-Match optional |
Validator for conditional requests; based on the ETag. |
String | |
Header |
If-Unmodified-Since optional |
Validator for conditional requests; based on the Last Modified header. |
String |
HTTP Code | Description | Schema |
---|---|---|
200 |
OK. |
|
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 |
Create a new Policy Partial.
http://apis.wso2.com/api/appm/publisher/v1.1/administration/xacmlpolicies/
POST
appm:administration
curl -X POST -H "Authorization: Bearer 28bc70efa75175336e177d88e148c46d" -H "Content-Type: application/json" -H "Cache-Control: no-cache" -H "Postman-Token: 02ec508b-85ef-c4fa-5cb3-e5b4ab440948" -d '{"isSharedPartial":true,"policyPartialDesc":"asdasdasdadsad","policyPartial":"<Rule Effect=\"Permit\" RuleId=\"Rule001\"><Condition>\n <Apply FunctionId=\"urn:oasis:names:tc:xacml:1.0:function:any-of\">\n <Function FunctionId=\"urn:oasis:names:tc:xacml:1.0:function:string-equal\"/>\n <AttributeValue DataType=\"http://www.w3.org/2001/XMLSchema#string\">admin</AttributeValue>\n <AttributeDesignator AttributeId=\"http://wso2.org/claims/role\" Category=\"urn:oasis:names:tc:xacml:1.0:subject-category:access-subject\" DataType=\"http://www.w3.org/2001/XMLSchema#string\" MustBePresent=\"true\"/>\n </Apply>\n</Condition>\n</Rule>","policyPartialName":"asdasd","policyPartialId":1}' "http://localhost:9763/api/appm/publisher/v1.1/administration/xacmlpolicies/"
{"policyPartial": "<Rule Effect="Permit" RuleId="Rule001"><Condition>
<Apply FunctionId="urn:oasis:names:tc:xacml:1.0:function:any-of">
<Function FunctionId="urn:oasis:names:tc:xacml:1.0:function:string-equal"/>
<AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">admin</AttributeValue>
<AttributeDesignator AttributeId="http://wso2.org/claims/role" Category="urn:oasis:names:tc:xacml:1.0:subject-category:access-subject" DataType="http://www.w3.org/2001/XMLSchema#string" MustBePresent="true"/>
</Apply>
</Condition>
</Rule>","policyPartialName": "ddd","isSharedPartial": true,"policyPartialDesc": null}
{"policyPartial": "<Rule Effect="Permit" RuleId="Rule001"><Condition>
<Apply FunctionId="urn:oasis:names:tc:xacml:1.0:function:any-of">
<Function FunctionId="urn:oasis:names:tc:xacml:1.0:function:string-equal"/>
<AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">admin</AttributeValue>
<AttributeDesignator AttributeId="http://wso2.org/claims/role" Category="urn:oasis:names:tc:xacml:1.0:subject-category:access-subject" DataType="http://www.w3.org/2001/XMLSchema#string" MustBePresent="true"/>
</Apply>
</Condition>
</Rule>","policyPartialName": "ddd","isSharedPartial": true,"policyPartialDesc": null,"policyPartialIc": 2}
Type | Name | Description | Schema | Default |
---|---|---|---|---|
Body |
body required |
Policy Partial object that needs to be added. |
PolicyPartial (PolicyPartial) | |
Header |
Content-Type required |
Media type of the entity in the body. Default is JSON. |
String |
JSON |
Header |
If-Modified-Since optional |
Validator for conditional requests; based on the Last Modified header of the formerly retrieved variant of the resource. |
String |
HTTP Code | Description | Schema |
---|---|---|
201 |
Created. Successful response with the newly created object as the entity in the body. Location header contains the URL of the newly created entity. |
PolicyPartial |
400 |
Bad Request. Invalid request or validation error. |
Error |
415 |
Unsupported Media Type. The entity of the request was in an unsupported format. |
Error |
Validates the content of the policy.
http://apis.wso2.com/api/appm/publisher/v1.1/administration/xacmlpolicies/validate
POST
appm:administration
curl -X POST -H "Authorization: Bearer 04b1607a56c2d51adb35912943335322" -H "Content-Type: application/json" -d '{ "policyPartial": "<Condition>\n <Apply FunctionId=\"urn:oasis:names:tc:xacml:1.0:function:any-of\">\n <Function FunctionId=\"urn:oasis:names:tc:xacml:1.0:function:string-equal\"/>\n <AttributeValue DataType=\"http://www.w3.org/2001/XMLSchema#string\">admin</AttributeValue>\n <AttributeDesignator AttributeId=\"http://wso2.org/claims/role\" Category=\"urn:oasis:names:tc:xacml:1.0:subject-category:access-subject\" DataType=\"http://www.w3.org/2001/XMLSchema#string\" MustBePresent=\"true\"/>\n </Apply>\n</Condition>"}' "http://localhost:9763/api/appm/publisher/v1.1/administration/xacmlpolicies/validate"
{"policyPartial": "<Rule Effect="Permit" RuleId="Rule001"><Condition>
<Apply FunctionId="urn:oasis:names:tc:xacml:1.0:function:any-of">
<Function FunctionId="urn:oasis:names:tc:xacml:1.0:function:string-equal"/>
<AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">admin</AttributeValue>
<AttributeDesignator AttributeId="http://wso2.org/claims/role" Category="urn:oasis:names:tc:xacml:1.0:subject-category:access-subject" DataType="http://www.w3.org/2001/XMLSchema#string" MustBePresent="true"/>
</Apply>
</Condition></Rule>"}
HTTP/1.1 200 OK
Type | Name | Description | Schema | Default |
---|---|---|---|---|
Body |
body required |
Policy Partial object that needs to be added. |
PolicyPartial (PolicyPartial) | |
Header |
Content-Type required |
Media type of the entity in the body. Default is JSON. |
String |
JSON |
Header |
If-Modified-Since optional |
Validator for conditional requests; based on the Last Modified header of the formerly retrieved variant of the resource. |
String |
HTTP Code | Description | Schema |
---|---|---|
200 |
OK. |
|
400 |
Bad Request. Invalid request or validation error. |
Error |
415 |
Unsupported Media Type. The entity of the request was in an unsupported format. |
Error |
Get a list of XACML policies.
http://apis.wso2.com/api/appm/publisher/v1.1/xacmlpolicies/
GET
appm:create
curl -X GET -H "Authorization: Bearer e819870696cc39494d12841b5094a411" "http://localhost:9763/api/appm/publisher/v1.1/xacmlpolicies"
{"policyPartial": "<Rule Effect="Permit" RuleId="Rule001"><Condition>
<Apply FunctionId="urn:oasis:names:tc:xacml:1.0:function:any-of">
<Function FunctionId="urn:oasis:names:tc:xacml:1.0:function:string-equal"/>
<AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">admin</AttributeValue>
<AttributeDesignator AttributeId="http://wso2.org/claims/role" Category="urn:oasis:names:tc:xacml:1.0:subject-category:access-subject" DataType="http://www.w3.org/2001/XMLSchema#string" MustBePresent="true"/>
</Apply>
</Condition>
</Rule>","policyPartialName": policy1,"isSharedPartial": true,"policyPartialDesc": null,,"policyPartialId": 1}
Type | Name | Description | Schema | Default |
---|---|---|---|---|
Query |
limit optional |
Maximum size of resource array to return. |
Integer |
25 |
Query |
offset optional |
Starting point within the complete list of items qualified. |
Integer |
0 |
Header |
Accept optional |
Media types acceptable for the response. Default is JSON. |
String |
JSON |
Header |
If-None-Match optional |
Validator for conditional requests; based on the ETag of the formerly retrieved variant of the resource. |
String |
HTTP Code | Description | Schema |
---|---|---|
200 |
OK. List of XACML policies is returned. |
PolicyPartialList |
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 |