Configuring REST APIs

You can configure the default behavior OpenAM will take when a REST call does not specify explicit version information using either of the following procedures:

The available options for default behavior are as follows:

Latest

The latest available supported version of the API is used.

This is the preset default for new installations of OpenAM.

Oldest

The oldest available supported version of the API is used.

This is the preset default for upgraded OpenAM instances.

None

No version will be used. When a REST client application calls a REST API without specifying the version, OpenAM returns an error and the request fails.

Configure Versioning Behavior by using the Web-based Console
  1. Log in as OpenAM administrator, amadmin.

  2. Click Configure > Global Services, and then click REST APIs.

  3. In Default Version, select the required response to a REST API request that does not specify an explicit version: Latest, Oldest, or None.

rest api default version config
  1. (Optional) Optionally, enable Warning Header to include warning messages in the headers of responses to requests.

  2. Save your work.

Configure Versioning Behavior by using SSOADM
  • Use the ssoadm set-attr-defs command with the openam-rest-apis-default-version attribute set to either LATEST, OLDEST or NONE, as in the following example:

    $ ssh openam.example.com
         $ cd /path/to/openam-tools/admin/openam/bin
         $ ./ssoadm \
         set-attr-defs \
         --adminid amadmin \
         --password-file /tmp/pwd.txt \
         --servicename RestApisService \
         --schematype Global \
         --attributevalues openam-rest-apis-default-version=NONE
    
         Schema attribute defaults were set.