Tag Management API

/api/space/tag-management/tags/{id}/targets

The following operations are supported on this resource:

GET /api/space/tag-management/tags/{id}/targets (v1)


This API is used to fetch all the tagged objects corresponding to a particular tag.

Access Control

The following capabilities are required to access this API:
"DefaultRead"


Example Usage

GET /api/space/tag-management/tags/{id}/targets


Parameters

NameTypeURI TypeDescriptionRequired
idIntegerPathThe tag ID of the tag that will have all corresponding tagged objects fetched. Y

Content Types

  • Produces content types:
    application/vnd.net.juniper.space.tag-management.targets+xml;version=1
    application/vnd.net.juniper.space.tag-management.targets+json;version=1


  • Sample Output XML:

    <targets uri="/api/space/tag-management/tags/458766/targets">
       <target
          type="vnd.net.juniper.space.user-management.user"
          href="/api/space/user-management/users/1234"
          uri="/api/space/tag-management/tags/458766/targets/458767"/>
    </targets>


  • Sample Output JSON:

    {
    "targets":
       {
       "@uri":"/api/space/tag-management/tags/458766/targets",
          "target":
          {
             "@type":"vnd.net.juniper.space.user-management.user",
             "@href":"/api/space/user-management/users/1234",
             "@uri":"/api/space/tag-management/tags/458766/targets/458767"
          }
       }
    }



POST /api/space/tag-management/tags/{id}/targets (v1)


This API is used to "tag" an object as a secondary collection of tagged objects. The object is passed as a parameter and is added to the secondary collection of tagged objects inside the respective tag.

Access Control

The following capabilities are required to access this API:
"DefaultRead"


Example Usage

POST /api/space/tag-management/tags/{id}/targets


Parameters

NameTypeURI TypeDescriptionRequired
idIntegerPathThe tag ID of the object to be tagged. Y

Content Types


POST /api/space/tag-management/tags/{id}/targets (v1)


This API is used to "tag" multiple objects as a secondary collection of tagged objects. The objects, which are passed as a parameter, are added to the secondary collection of tagged objects inside the respective tag.

Access Control

The following capabilities are required to access this API:
"DefaultRead"


Example Usage

POST /api/space/tag-management/tags/{id}/targets


Parameters

NameTypeURI TypeDescriptionRequired
idIntegerPathThe ID of the tag for the target object Y

Content Types

  • Consumes content types:
    application/vnd.net.juniper.space.tag-management.targets+xml;version=1;charset=UTF-8
    application/vnd.net.juniper.space.tag-management.targets+json;version=1;charset=UTF-8


  • Produces content types:
    application/vnd.net.juniper.space.tag-management.targets+xml;version=1
    application/vnd.net.juniper.space.tag-management.targets+json;version=1


  • Sample Input XML:

    <targets>
        <target href="/api/space/user-management/users/1234"/>
        <target href="/api/space/user-management/users/234234"/>
        <target href="/api/space/user-management/users/234126"/>
    </targets>


  • Sample Output XML:

    <targets uri="/api/space/tag-management/tags/458766/targets">
       <target
          type="vnd.net.juniper.space.user-management.user"
          href="/api/space/user-management/users/1234"
          uri="/api/space/tag-management/tags/458766/targets/158767"/>
       <target
          type="vnd.net.juniper.space.user-management.user"
          href="/api/space/user-management/users/234234"
          uri="/api/space/tag-management/tags/458766/targets/453476"/>
       <target
          type="vnd.net.juniper.space.user-management.user"
          href="/api/space/user-management/users/234126"
          uri="/api/space/tag-management/tags/458766/targets/4567"/>
    </targets>


  • Sample Input JSON:

    {
    "targets":{
       "target":[
       {
          "@href":"/api/space/user-management/users/2651654"
       },
       {
          "@href":"/api/space/user-management/users/2651655"
       }
       ]
    }
    }


  • Sample Output JSON:

    {
    "targets":
    {
       "@uri":"/api/space/tag-management/tags/7536643/targets",
       "target":
       [
       {
          "@href":"/api/space/user-management/users/2651654",
          "@uri":"/api/space/tag-management/tags/7536643/targets/7733275",
          "@type":"vnd.net.juniper.space.user-management.user"
       },
       {
          "@href":"/api/space/user-management/users/2651655",
          "@uri":"/api/space/tag-management/tags/7536643/targets/7733276",
          "@type":"vnd.net.juniper.space.user-management.user"
       }
       ]
    }
    }