GET /api/policies

Returns a list of supported policies, such as Service Level, Management, or Compliance policies.

Authorization Roles/Permissions: To complete this operation successfully, a user must be logged in.

This topic includes the following sections:

HTTP Method

GET

Back to top

URL

https://{hostname}/api/policies?Type={Type}

Back to top

Sample Request

Sample request URL #1

Returns all policies:

https://{hostname}/api/policies

Sample request URL #2

Returns compliance policies:

https://{hostname}/api/policies?Type=Compliance%20Policy

Sample request headers

Accept: application/json
X-Csrf-Token_{tenant}: {TokenID}

Sample request body

Not applicable.

Back to top

Request Headers

For general information on request header values, refer to HTTP Request Headers.

Header Description
Accept

application/json, text/xml

application/vnd.soa.v71+json, application/vnd.soa.v71+xml

application/vnd.soa.v72+json, application/vnd.soa.v72+xml

application/vnd.soa.v80+json, application/vnd.soa.v80+xml

application/vnd.soa.v81+json, application/vnd.soa.v81+xml

Back to top

Request Parameters

Parameter Parm Type Data Type Required Description
Type[ ] Query string Optional

The policy type governing API operation.

If this parameter is not specified, all types are returned. To request multiple types, include this parameter multiple times.

IncludeInactivePolicies Boolean Boolean Optional If included and set to true, inactive policies are included in the results. Default: false.

Back to top

Response

If successful, this operation returns HTTP status code 200, with a list of supported policies in the form of an RSS feed (JSON or XML).

Back to top

Sample Response

The sample response below shows five policies returned.

Sample response headers: application/json

HTTP/1.1 200 OK
Content-Type: application/json
Date: Tue, 03 May 2016 21:39:44 GMT

Sample response body: application/json

{
  "channel" : {
    "title" : "Policies",
    "item" : [ {
      "title" : "AtmosphereApplicationSecurityPolicy",
      "description" : "",
      "category" : [ {
        "value" : "policy.apisec",
        "domain" : "soa.com:policy:subtype"
      }, {
        "value" : "Operational Policy",
        "domain" : "soa.com:policy:type"
      } ],
      "guid" : {
        "value" : "Atmosphere-AtmosphereApplicationSecurityPolicy"
      }
    }, {
      "title" : "BasicAuditing",
      "description" : "",
      "category" : [ {
        "value" : "policy.auditservice",
        "domain" : "soa.com:policy:subtype"
      }, {
        "value" : "Operational Policy",
        "domain" : "soa.com:policy:type"
      } ],
      "guid" : {
        "value" : "Atmosphere-BasicAuditing"
      }
    }, {
      "title" : "CORSAllowAll",
      "description" : "",
      "category" : [ {
        "value" : "policy.cors",
        "domain" : "soa.com:policy:subtype"
      }, {
        "value" : "Operational Policy",
        "domain" : "soa.com:policy:type"
      } ],
      "guid" : {
        "value" : "Atmosphere-CORSAllowAll"
      }
    }, {
      "title" : "DetailedAuditing",
      "description" : "",
      "category" : [ {
        "value" : "policy.auditservice",
        "domain" : "soa.com:policy:subtype"
      }, {
        "value" : "Operational Policy",
        "domain" : "soa.com:policy:type"
      } ],
      "guid" : {
        "value" : "Atmosphere-DetailedAuditing"
      }
    }, {
      "title" : "OAuthSecurity",
      "description" : "",
      "category" : [ {
        "value" : "policy.oauth",
        "domain" : "soa.com:policy:subtype"
      }, {
        "value" : "Operational Policy",
        "domain" : "soa.com:policy:type"
      } ],
      "guid" : {
        "value" : "Atmosphere-OAuthSecurity"
      }
    } ]
  },
  "version" : "1.0"
}

Back to top

Sample response headers: application/vnd.soa.v81+xml

HTTP/1.1 200 OK
Content-Type: application/vnd.soa.v81+xml
Date: Tue, 03 May 2016 21:50:58 GMT

Sample response body: application/vnd.soa.v81+xml

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<rss xmlns:ns2="http://soa.com/xsd/business/1.0" xmlns:ns3="http://soa.com/xsd/user/1.0" 
xmlns:ns4="http://soa.com/xsd/rss/1.0" xmlns:ns5="http://soa.com/xsd/comment/1.0" 
xmlns:ns6="http://soa.com/xsd/board/1.0" xmlns:ns7="http://soa.com/xsd/dnmodel/1.0" 
xmlns:ns8="http://a9.com/-/spec/opensearch/1.1/" xmlns:ns9="http://soa.com/xsd/resource/1.0" 
xmlns:ns10="http://soa.com/xsd/legals/1.0" xmlns:ns11="http://soa.com/xsd/fault/1.0" 
xmlns:ns12="http://soa.com/xsd/api/1.0" xmlns:ns13="http://soa.com/xsd/deploymentzone/1.0" 
xmlns:ns14="http://soa.com/xsd/asset/1.0" xmlns:ns15="http://soa.com/xsd/ticket/1.0" 
xmlns:ns16="http://soa.com/xsd/app/1.0" xmlns:ns17="http://soa.com/xsd/review/1.0" 
xmlns:ns18="http://soa.com/xsd/alert/1.0" xmlns:ns19="http://soa.com/xsd/contract/1.0" 
xmlns:ns20="http://soa.com/xsd/discussion/1.0" xmlns:ns21="http://soa.com/xsd/search/1.0" 
xmlns:ns22="http://soa.com/xsd/workflow/1.0" xmlns:ns23="http://soa.com/xsd/client/services/1.0" version="1.0">
  <channel>
    <title>Policies</title>
    <item>
      <title>AtmosphereApplicationSecurityPolicy</title>
      <description></description>
      <category domain="soa.com:policy:subtype">policy.apisec</category>
      <category domain="soa.com:policy:type">Operational Policy</category>
      <guid>Atmosphere-AtmosphereApplicationSecurityPolicy</guid>
    </item>
    <item>
      <title>BasicAuditing</title>
      <description></description>
      <category domain="soa.com:policy:subtype">policy.auditservice</category>
      <category domain="soa.com:policy:type">Operational Policy</category>
      <guid>Atmosphere-BasicAuditing</guid>
    </item>
    <item>
      <title>CORSAllowAll</title>
      <description></description>
      <category domain="soa.com:policy:subtype">policy.cors</category>
      <category domain="soa.com:policy:type">Operational Policy</category>
      <guid>Atmosphere-CORSAllowAll</guid>
    </item>
    <item>
      <title>DetailedAuditing</title>
      <description></description>
      <category domain="soa.com:policy:subtype">policy.auditservice</category>
      <category domain="soa.com:policy:type">Operational Policy</category>
      <guid>Atmosphere-DetailedAuditing</guid>
    </item>
    <item>
      <title>OAuthSecurity</title>
      <description></description>
      <category domain="soa.com:policy:subtype">policy.oauth</category>
      <category domain="soa.com:policy:type">Operational Policy</category>
      <guid>Atmosphere-OAuthSecurity</guid>
    </item>
  </channel>
</rss>

Back to top

Response Headers

For general information on response header values, refer to HTTP Response Headers.

Header Description
Content-Type

application/json, text/xml

application/vnd.soa.v71+json, application/vnd.soa.v71+xml

application/vnd.soa.v72+json, application/vnd.soa.v72+xml

application/vnd.soa.v80+json, application/vnd.soa.v80+xml

application/vnd.soa.v81+json, application/vnd.soa.v81+xml

Back to top

Response Body

The response body is in the form of an RSS channel, and includes the items listed below. The RSS version is 1.0. The title of the RSS channel is Policies. Each item in the channel represents a governance policy, and includes the information listed below.

Name Description
Title Title of the policy.
Description Description of the policy
Category Information about one or more categories for the policy. Each category is a name/value pair, value and domain. Domain is soa.com.policy.subtype, and the value is the policy subType value, indicating the type of policy.
GUID GUID for the policy

Back to top

Error Codes/Messages

If the call is unsuccessful an error code/message is returned. One or more examples of possible errors for this operation are shown below.

Item Value
401 Unauthorized. For example, you would get this response if you didn't include the custom X-Csrf-Token_{fedmemberID} header in the request, when it was required by the platform settings; or if you included an invalid or expired value for this header.
500 An error occurred processing the call.

More information about Akana API Platform API error messages.

Back to top

Related Topics