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

The following operations are supported on this resource:

  • GET - Get a single tag
  • PUT - Replace/Update a tag
  • DELETE - Delete a tag
GET /tags/{id} Version 1

This API is used to get 'tag' information.

Sample Usage

GET /tags/{id}


  • Parameters:
    Name Type URI Type Description Required
    id Integer Path The ID of the tag to get tag information for. Y
  • Sample Output XML:

    <tag uri="/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>
       <method href="/api/space/tag-management/tags/458766/targets" rel="Method used to tag the targets"/>
    </tag>

  • Sample Output JSON:

    {
      "tag": {
         "@uri":"/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"
             }
         },
         "method": {
             "@href": "/api/space/tag-management/tags/458766/targets",
             "@rel": "Method used to tag the targets"
         }
      }

  • Access Control

    The following capabilities are required to access this API: DefaultRead

    PUT /tags/{id} Version 1

    This API is used to rename or share a tag object. Sharing can be done on a tag that is changed from private to public. However, once shared, a tag cannot be made private again.

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

    .

    Sample Usage

    PUT /tags/{id}


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

    <tag>
       <name>Junos-tag-new</name>
       <type>public</type>
    </tag>

  • Sample Output XML:

    <tag>
       <id>458766</id>
       <name>Junos-tag-new</name>
       <type>public</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":"Junos-1",
         "type":"public"
      }

  • Sample Output JSON:

    {
      "tag": {
         "id":458766,
         "name":"Junos-1",
         "type":"public",
         "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: ShareTag, RenameTag

    Data Notification

    This API supports data notification.

    DELETE /tags/{id} Version 1

    This API is used to delete a tag object.

    Sample Usage

    DELETE /tags/{id}


    • Parameters:
      Name Type URI Type Description Required
      id Integer Path The ID of the tag object to delete. Y

    Access Control

    The following capabilities are required to access this API: DeleteTag

    Data Notification

    This API supports data notification.