Tag Management API

/api/space/tag-management/tags

The following operations are supported on this resource:

GET /api/space/tag-management/tags (v1)


This API returns a collection of tag objects accessible to a user. These tag objects contain basic tag information and a URI to tag the object to fetch more information. It also supports filtering, paging, and sorting on a name field.

Note: Filtering on the 'type' field works only for the 'eq' operator.

.

Access Control

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


Example Usage

GET /api/space/tag-management/tags

Content Types

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


  • Sample Output XML:

    <tags size="2" uri="/api/space/tag-management/tags">
       <tag uri="/api/space/tag-management/tags/458765" href="/api/space/tag-management/tags/458765">
          <id>458765</id>
          <name>Junos</name>
          <type>private</type>
       </tag>
       <tag uri="/api/space/tag-management/tags/458766" href="/api/space/tag-management/tags/458766">
          <id>458766</id>
          <name>Junos-tag</name>
          <type>private</type>
          <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>
       </tag>
    </tags>


  • Sample Output JSON:
    {
       "tags":{
          "@size":"2",
          "@uri":"/api/space/tag-management/tags",
          "tag":
          [
          {
             "@uri":"/api/space/tag-management/tags/458765",
             "@href":"/api/space/tag-management/tags/458765",
             "id":458765,
             "name":"Junos",
             "type":"private"
          },
          {
             "@uri":"/api/space/tag-management/tags/458766",
             "@href":"/api/space/tag-management/tags/458766",
             "id":458766,
             "name":"Junos-tag",
             "type":"private",
             "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 (v1)


This API is used to create a tag object.

Note: The tag name cannot start with a space. It cannot contain a special character, such as a comma, double quote, or parentheses. The name cannot exceed 255 characters.

.

Access Control

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


Example Usage

POST /api/space/tag-management/tags

Data Notification

This API supports data notification.

See the following links for information about enabling data notifications changes to be received for this service:

  • Data Notification Usage.


Content Types

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


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


  • Sample Input XML:

    <tag>
       <name>test-tag</name>
       <type>private</type>
       <targets>
          <target href="/api/space/user-management/users/1234"/>
       </targets>
    </tag>


  • Sample Output XML:

    <tag>
       <id>458766</id>
       <name>test-tag</name>
       <type>private</type>
       <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>
    </tag>


  • Sample Input JSON:

    {
    "tag":
       {
       "name":"test-tag",
       "type":"private",
       "targets":
       {
          "target":
          {
          "@href":"/api/space/user-management/users/1234"
          }
       }
       }
    }


  • Sample Output JSON:

    {
    "tag":
       {
       "id":458766,
       "name":"test-tag",
       "type":"private",
       "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"
          }
       }
       }
    }