List All Tags

get

/paas/api/v1.1/tags/{identityDomainId}/tags

Returns all tags and tag assignments in the specified identity domain ID.

Set the ?outputLevel query parameter to FULL to return the service names of tag assignments along with the number of tag assignments.

Use the optional ?services query parameter to list tags for one or more specific service instances.

Use the optional ?tagFilter query parameter to provide a search criteria based on tags.

Request

Path Parameters
Query Parameters
  • Set to FULL to include the service names with the tag assignments. Otherwise only the number of service resources assigned with a tag is returned (default).
  • When set to a specific service type and service name in the format service_type.instance_name, the response includes tags and assignments for the specified instance only. Use a comma separated list to get information for two or more service instances.

    For example:

    • JaaS.ExampleInstance
    • JaaS.ExampleInstance,JaaS.MyInstance01
    • JaaS.ExampleInstance,DBaaS.MyDBInstance

  • An expression using tag keys and values for filtering search results. Only results that satisfy the expression are returned in a search.

    When creating your filter expression:

    • Use the percent sign (%) to match multiple characters.
    • Use the underscore character (_) to match a single character.
    • Precede a literal character by a backslash character (\) if a key or value contains a literal percent sign (%), apostrophe or single quote ('), or underscore (_).

    Valid expressions include:

    • 'foo':'bar' - Finds all tags and assignments that have a key of 'foo' and a value of 'bar'
    • 'ora\_%':'%prod%' - Finds all tags and assignments that have a key starting with 'ora_' and a value containing 'prod'.
    • 'haMode' - Finds all tags and assignments that have a tag key of 'haMode'
    • 'ora\_%' - Finds all tags and assignments that a tag key starting with 'ora_'
    • 'site':'pe_r' - Uses the underscore wildcard to wildcard-match only a single character. For example, site=pear or site=peer is a match. site=pepper is not a match.
    • 'foo':'' - Finds all tags and assignments that have a tag key of 'foo' and an empty string as the value.
    • 'accuracy':'100\%' - Uses the literal percent sign in a value, so that it is not interpreted as a wildcard match.
    • 'type':'Abe\'s test' - Uses the apostrophe (single quote) in a key or value.
    • 'key\_contains\_underscores':'value\_does\_too' - Uses underscores in a key or value, so that they are not interpreted as single-character wildcards.

Header Parameters
Back to Top

Response

Supported Media Types

200 Response

OK.

The response body contains information about all tags and their assignments.

Body ()
Root Schema : alltagsassignments-response
Type: object
Show Source
Nested Schema : items
Type: array
Groups details of tags and their assignments.
Show Source
Nested Schema : tagsassignments-details
Type: object
Each object describes a tag and its assignments.
Show Source
Nested Schema : assignmentCounts
Type: object
Tag assignments count.
Show Source
Nested Schema : assignments
Type: object
Groups assignment details for this tag.
Show Source
Nested Schema : services
Type: array
Groups the service resources assigned with this tag.
Show Source
Nested Schema : serviceassignment-details
Type: object
Each object describes a service resource.
Show Source

400 Response

Bad request.

If you get the message SM-UI-PROXY when you use the percent sign (%) to match multiple characters, this means the percent sign must be percent-encoded as %25. Try the command again using percent-encoding for the percent character.

Back to Top

Examples

Note: The commands in this example use the URL structure https://rest_server_url/resource-path, where rest_server_url is the REST server to contact for your identity domain (or Cloud Account). See Send Requests.

cURL Command

The following example shows how to list all tags and their assignments for an identity domain ID, by submitting a GET request on the REST resource using cURL.

curl -i -X GET -u username:password -H "X-ID-TENANT-NAME:ExampleIdentityDomain" "https://rest_server_url/paas/api/v1.1/tags/ExampleIdentityDomain/tags?outputLevel=FULL"

The following command uses the query parameter to list tags for a specific instance.

curl -i -X GET -u username:password -H "X-ID-TENANT-NAME:ExampleIdentityDomain" "https://rest_server_url/paas/api/v1.1/tags/ExampleIdentityDomain/tags?services=JaaS.MyJCSExample"

The following command uses the query parameter to search for tags and assignments based on a tag filter expression.

curl -i -X GET -u username:password -H "X-ID-TENANT-NAME:ExampleIdentityDomain" "https://rest_server_url/paas/api/v1.1/tags/ExampleIdentityDomain/tags?tagFilter='dev%25'&outputLevel=FULL"

Example of Response Header

The following shows an example of the response header.

HTTP/1.1 200 OK
Date: Fri, 05 Jan 2018 20:30:43 GMT
Content-Length: 1024
Content-Type: application/vnd.oracle.resource+json;type=collection
X-ORACLE-DMS-ECID: 1bcaf164-c5b5-4c70-b7d8-5a24c1e19493-00001d8f
X-Frame-Options: DENY
Access-Control-Allow-Methods: GET, POST, DELETE, PUT, OPTIONS, HEAD
Access-Control-Allow-Headers: Content-Type, api_key, Authorization, X-ID-TENANT-NAME, X-USER-IDENTITY-DOMAIN-NAME
Access-Control-Allow-Origin: *

Example of Response Body

The following is an example of the response returned for all tags when outputLevel=FULL.

{
   "items":[
      {
         "key": "db",
         "value": "atp",
         "readOnly": false,
         "assignments": {
            "services": [
               {
                  "serviceType": "JaaS",
                  "serviceName": "ExampleJaaSInstance",
                  "assignmentState": "Assigned"
               }
            ]
         },
         "assignmentCounts": {
            "services": 1
         },
         "links": [
            {
               "rel": "canonical",
               "href": "https://jaas.oraclecloud.com:443/paas/api/v1.1/tags/ExampleIdentityDomain/tags/db/atp"
            }
         ],
         "state": "Ready"
      },
   ],
   "limit":200,
   "hasMore":false,
   "offset":0,
   "links":[
      {
         "rel":"first",
         "href":"https://rest_server_url/paas/api/v1.1/tags/ExampleIdentityDomain/tags?offset=0&outputLevel=FULL"
      },
      {
         "rel":"last",
         "href":"https://rest_server_url/paas/api/v1.1/tags/ExampleIdentityDomain/tags?offset=0&outputLevel=FULL"
      },
      {
         "rel":"canonical",
         "href":"https://rest_server_url/paas/api/v1.1/tags/ExampleIdentityDomain/tags/"
      },
      {
         "rel":"self",
         "href":"https://rest_server_url/paas/api/v1.1/tags/ExampleIdentityDomain/tags?outputLevel=FULL"
      }
   ]
}

The following is an example of the response returned for one specific service instance.

{
   "items":[
      {
         "key":"environment",
         "value":"development",
         "readOnly":false,
         "assignmentCounts":{
            "services": 0
         },
         "links":[
            {
               "rel":"canonical",
               "href":"https://rest_server_url/paas/api/v1.1/tags/ExampleIdentityDomain/tags/environment/development"
            }
         ],
         "state": "Ready"
      },
      {
         "key":"environment",
         "value":"qa",
         "readOnly":false,
         "assignmentCounts":{
            "services": 0
         },
         "links":[
            {
               "rel":"canonical",
               "href":"https://rest_server_url/paas/api/v1.1/tags/ExampleIdentityDomain/tags/environment/qa"
            }
         ],
         "state": "Ready"
      }
   ],
   "limit":200,
   "hasMore":false,
   "offset":0,
   "links":[
      {
         "rel":"first",
         "href":"https://rest_server_url/paas/api/v1.1/tags/ExampleIdentityDomain/tags?services=JaaS.MyJCSExample&offset=0"
      },
      {
         "rel":"last",
         "href":"https://rest_server_url/paas/api/v1.1/tags/ExampleIdentityDomain/tags?services=JaaS.MyJCSExample&offset=0"
      },
      {
         "rel":"canonical",
         "href":"https://rest_server_url/paas/api/v1.1/tags/ExampleIdentityDomain/tags/"
      },
      {
         "rel":"self",
         "href":"https://rest_server_url/paas/api/v1.1/tags/ExampleIdentityDomain/tags?services=JaaS.MyJCSExample"
      }
   ]
}

The following is an example of the response returned for tags that have a key starting with 'dev' and also when outputLevel=FULL.

{
   "items":[
      {
         "key":"development",
         "value":"hr",
         "readOnly":false,
         "assignments":{
            "services":[
               {
                  "serviceType":"JaaS",
                  "serviceName":"MyJCSExample",
                  "assignmentState": "Assigned"
               }
            ]
         },
         "assignmentCounts": {
            "services": 1
         },
         "links":[
            {
               "rel":"canonical",
               "href":"https://rest_server_url/paas/api/v1.1/tags/ExampleIdentityDomain/tags/development/hr"
            }
         ],
         "state": "Ready"
      },
      {
         "key":"development",
         "value":"sales",
         "readOnly":false,
         "assignments":{
            "services":[
               {
                  "serviceType":"JaaS",
                  "serviceName":"MyJCSExampleSales",
                  "assignmentState": "Assigned"
               }
            ]
         },
         "assignmentCounts": {
            "services": 1
         },
         "links":[
            {
               "rel":"canonical",
               "href":"https://rest_server_url/paas/api/v1.1/tags/ExampleIdentityDomain/tags/development/sales"
            }
         ],
         "state": "Ready"
      },
      {
         "key":"development",
         "value":"",
         "readOnly":false,
         "assignments":{
            "services":[]
         },
         "assignmentCounts": {
            "services": 0
         },
         "links":[
            {
               "rel":"canonical",
               "href":"https://rest_server_url/paas/api/v1.1/tags/ExampleIdentityDomain/tags/development/"
            }
         ],
         "state": "Ready"
      }
   ],
   "limit":200,
   "hasMore":false,
   "offset":0,
   "links":[
      {
         "rel":"first",
         "href":"https://rest_server_url/paas/api/v1.1/tags/ExampleIdentityDomain/tags?tagFilter=%27dev%25%27&offset=0&outputLevel=FULL"
      },
      {
         "rel":"last",
         "href":"https://rest_server_url/paas/api/v1.1/tags/ExampleIdentityDomain/tags?tagFilter=%27dev%25%27&offset=0&outputLevel=FULL"
      },
      {
         "rel":"canonical",
         "href":"https://rest_server_url/paas/api/v1.1/tags/ExampleIdentityDomain/tags/"
      },
      {
         "rel":"self",
         "href":"https://rest_server_url/paas/api/v1.1/tags/ExampleIdentityDomain/tags?tagFilter=%27dev%25%27&outputLevel=FULL"
      }
   ]
}
Back to Top