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

The following operations are supported on this resource:

  • GET - Get all targets for a tag
  • POST - Add a target for a tag
  • POST - Add multiple targets to a tag
GET /tags/{id}/targets Version 1

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

Sample Usage

GET /tags/{id}/targets


  • Parameters:
    Name Type URI Type Description Required
    id Integer Path The tag ID of the tag that will have all corresponding tagged objects fetched. Y
  • 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"
          }
      }

  • Access Control

    The following capabilities are required to access this API: DefaultRead

    POST /tags/{id}/targets Version 1

    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.

    Sample Usage

    POST /tags/{id}/targets


    • Parameters:
      Name Type URI Type Description Required
      id Integer Path The tag ID of the object to be tagged. Y
  • Sample Input XML:

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

  • Sample Output XML:

       <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"/>

  • Sample Input JSON:

    {
      "target": {
          "@href":"/api/space/user-management/users/1234"
      }

  • Sample Output JSON:

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

  • Access Control

    The following capabilities are required to access this API: DefaultRead

    POST /tags/{id}/targets Version 1

    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.

    Sample Usage

    POST /tags/{id}/targets


    • Parameters:
      Name Type URI Type Description Required
      id Integer Path The ID of the tag for the target object Y
  • 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"
            }
          ]
      }

  • Access Control

    The following capabilities are required to access this API: DefaultRead