RestAPI SmAuthAzMaps asks for name to be defined, but cannot search by name

Document ID : KB000100337
Last Modified Date : 06/06/2018
Show Technical Document Details
Question:
From the Swagger UI, the SmAuthAzMaps has the following API call:

GET /ca/api/sso/services/policy/v1/SmAuthAzMaps/{SmAuthAzMapName}

This is, however incorrect definition, as there is no way to specify a name when creating an Auth/Az Mappings from the Admin UI, unless of course, it is the Admin UI to be blamed for not having the ability to specify a name.

Sample output from GET /ca/api/sso/services/policy/v1/SmAuthAzMaps/ follows:

{
  "responseType": "links",
  "path": "children",
  "xpsclass": "SmAuthAzMaps",
  "data": [
    {
      "id": "CA.SM::AuthAzMap@15-a727d969-e923-4ef8-8463-daffa1dbb9a4",
      "path": "CA.SM::AuthAzMap@15-a727d969-e923-4ef8-8463-daffa1dbb9a4",
      "href": "https://localhost:18443/ca/api/sso/services/policy/v1/objects/CA.SM::AuthAzMap@15-a727d969-e923-4ef8-8463-daffa1dbb9a4"
    }
  ],
  "links": {}
}
Answer:
You will only be able to access the SmAuthAzMaps objects by the Object XID, or get the href from the SmAuthAzMaps GET that will list them all out. 

GET https://ferph02.ca.com:9443/ca/api/sso/services/policy/v1/SmAuthAzMaps 

Will return a full list of all SmAuthAzMaps 



GET https://ferph02.ca.com:9443/ca/api/sso/services/policy/v1/objects/CA.SM::AuthAzMap@15-82f25569-2f7c-49ed-9974-390ff3acb5df 

Will return the data for that specific SmAuthAzMaps Object XID