Policy

From ToxBank API Wiki
(Difference between revisions)
Jump to: navigation, search
m (Created page with "TBD")
 
m (moved API Policy to Policy)
 
(2 intermediate revisions by one user not shown)
Line 1: Line 1:
 
TBD
 
TBD
 +
 +
 +
= Verify (authorize) =
 +
 +
# OpenTox [[OpenTox_API_1.2_A%26A]]  or / and
 +
# wrapper for the [[OpenTox_API_1.2_A%26A]])
 +
 +
=== cURL example ===
 +
curl -X GET /policy -d "uri=the-uri-to-be-verified"
 +
 +
input media: application/x-www-form-urlencoded
 +
 +
 +
= Create new policy =
 +
 +
{{REST Operations
 +
|REST_op_description=Creates a policy
 +
|REST_op_method=POST
 +
|REST_op_uri=/policy
 +
|REST_op_params=uri, user/group, methods (see example) or the XML as defined by OpenSSO
 +
|REST_op_mime_input=application/x-www-form-urlencoded, application/xml
 +
|REST_op_result=Task URI, when complete - URI of the new policy, e.g. /policy/ABCDEF
 +
|REST_op_mime_output=text/uri-list
 +
|REST_op_status=200,202,400,401,402,403
 +
}}
 +
 +
 +
=== cURL example ===
 +
curl -X POST /authorize \
 +
-d "uri=the-uri-to-be-verified" \
 +
-d "type=user|group" \
 +
-d "name=user or group name" \
 +
-d "GET=on| " \
 +
-d "POST=on| " \
 +
-d "PUT=on| " \
 +
-d "DELETE=on| " \
 +
-d "Content-type=application/x-www-form-urlencoded" \

Latest revision as of 11:45, 7 October 2011

TBD


Contents

Verify (authorize)

  1. OpenTox OpenTox_API_1.2_A&A or / and
  2. wrapper for the OpenTox_API_1.2_A&A)

cURL example

curl -X GET /policy -d "uri=the-uri-to-be-verified" 

input media: application/x-www-form-urlencoded


Create new policy

Description Creates a policy
Resource [[]]
Method POST
URI /policy
Parameters uri, user/group, methods (see example) or the XML as defined by OpenSSO
Header Parameters
Media Type (input) application/x-www-form-urlencoded, application/xml
Results Task URI, when complete - URI of the new policy, e.g. /policy/ABCDEF
Media Type (output) text/uri-list
Status code 200,202,400,401,402,403


cURL example

curl -X POST /authorize \
-d "uri=the-uri-to-be-verified" \
-d "type=user|group" \
-d "name=user or group name" \ 
-d "GET=on| " \
-d "POST=on| " \ 
-d "PUT=on| " \
-d "DELETE=on| " \
-d "Content-type=application/x-www-form-urlencoded" \
Facts about PolicyRDF feed
Acts on
Has output media typetext/uri-list  +
Has status code200,202,400,401,402,403  +
Personal tools