Tags Resource

GET /tags

Returns the list of all the tag associated to the account of the currently connected user.

Response Body
media type data type description
application/json TagsResult (JSON) The list of requested Tag objects.
application/xml tagsResult (XML)

Example

Request
GET /tags
Content-Type: */*
Accept: application/json

                
...
                
              
Response
HTTP/1.1 200 OK
Content-Type: application/json

                
{
  "tag" : [ {
    "id" : 12345,
    "accountId" : 12345,
    "name" : "...",
    "createdOn" : 12345,
    "createdBy" : 12345,
    "modifiedOn" : 12345,
    "modifiedBy" : 12345,
    "optlock" : 12345
  }, {
    "id" : 12345,
    "accountId" : 12345,
    "name" : "...",
    "createdOn" : 12345,
    "createdBy" : 12345,
    "modifiedOn" : 12345,
    "modifiedBy" : 12345,
    "optlock" : 12345
  } ]
}
                
              

POST /tags

Creates a new Tag based on the information provided in TagCreator parameter.

Request Body
media type data type description
application/json TagCreator (JSON) Provides the information for the new Tag to be created.
application/xml tagCreator (XML)
Response Body
media type data type description
application/json Tag (JSON) The newly created Tag object.
application/xml tag (XML)

Example

Request
POST /tags
Content-Type: application/json
Accept: application/json

                
{
  "accountId" : 12345,
  "name" : "..."
}
                
              
Response
HTTP/1.1 201 Created
Content-Type: application/json

                
{
  "id" : 12345,
  "accountId" : 12345,
  "name" : "...",
  "createdOn" : 12345,
  "createdBy" : 12345,
  "modifiedOn" : 12345,
  "modifiedBy" : 12345,
  "optlock" : 12345
}
                
              

POST /tags/apply

Creates a new TagApplication on the information provided in TagApplicationCreator parameter.

Request Body
media type data type description
application/json TagApplicationCreator (JSON) Provides the information for the new TagApplication to be created.
application/xml tagApplicationCreator (XML)
Response Body
media type data type description
application/json TagApplication (JSON) The newly created TagApplication object.
application/xml tagApplication (XML)

Example

Request
POST /tags/apply
Content-Type: application/json
Accept: application/json

                
{
  "accountId" : 12345,
  "tagId" : 12345,
  "entityId" : {
    "accountId" : 12345,
    "entityType" : "DEVI",
    "eId" : "..."
  }
}
                
              
Response
HTTP/1.1 201 Created
Content-Type: application/json

                
{
  "accountId" : 12345,
  "tagId" : 12345,
  "entityType" : "DEVI",
  "entityId" : "...",
  "appliedOn" : 12345,
  "appliedBy" : 12345,
  "optlock" : 12345
}
                
              

GET /tags/findByName

Returns the Tag specified by the "name" query parameter.

Request Parameters
name type description
name query The name of the Tag requested.
Response Body
media type data type description
application/json Tag (JSON) The requested Tag object.
application/xml tag (XML)

Example

Request
GET /tags/findByName
Content-Type: */*
Accept: application/json

                
...
                
              
Response
HTTP/1.1 200 OK
Content-Type: application/json

                
{
  "id" : 12345,
  "accountId" : 12345,
  "name" : "...",
  "createdOn" : 12345,
  "createdBy" : 12345,
  "modifiedOn" : 12345,
  "modifiedBy" : 12345,
  "optlock" : 12345
}
                
              

GET /tags/findTagApplicationByTaggable

Gets the list of all the tag application associated to the given taggable entity.

Request Parameters
name type description
entityId query The id of the entity for which search.
entityType query The type of the entity for which search.
Response Body
media type data type description
application/json TagApplicationsResult (JSON) The list of associated TagApplication objects.
application/xml tagApplicationsResult (XML)

Example

Request
GET /tags/findTagApplicationByTaggable
Content-Type: */*
Accept: application/json

                
...
                
              
Response
HTTP/1.1 200 OK
Content-Type: application/json

                
{
  "tagApplication" : [ {
    "accountId" : 12345,
    "tagId" : 12345,
    "entityType" : "DEVI",
    "entityId" : "...",
    "appliedOn" : 12345,
    "appliedBy" : 12345,
    "optlock" : 12345
  }, {
    "accountId" : 12345,
    "tagId" : 12345,
    "entityType" : "DEVI",
    "entityId" : "...",
    "appliedOn" : 12345,
    "appliedBy" : 12345,
    "optlock" : 12345
  } ]
}
                
              

GET /tags/getTagSummary

Return a summary of total device assigned per Tag

Response Body
media type data type description
application/json TagDeviceSummary (JSON) A TagDeviceSummary object representing the summary
application/xml tagDeviceSummary (XML)

Example

Request
GET /tags/getTagSummary
Content-Type: */*
Accept: application/json

                
...
                
              
Response
HTTP/1.1 200 OK
Content-Type: application/json

                
{
  "tagSummary" : {
    "entry" : [ {
      "key" : { },
      "value" : 12345
    }, {
      "key" : { },
      "value" : 12345
    } ]
  }
}
                
              

DELETE /tags/remove

Deletes the TagApplication specified by the tagId, entityType and entityId path parameters.

Request Parameters
name type description constraints
entityId query The entityId of the TagApplication to be deleted.  
entityType query The entityType of the TagApplication to be deleted.  
tagId query The tagId of the TagApplication to be deleted. required

Example

Request
DELETE /tags/remove
Content-Type: */*

                
...
                
              
Response
HTTP/1.1 204 No Content

              

DELETE /tags/{tagId}

Deletes the Tag specified by the "id" path parameter.

Request Parameters
name type description constraints
tagId path The id of the Tag to be deleted. required

Example

Request
DELETE /tags/{tagId}
Content-Type: */*

                
...
                
              
Response
HTTP/1.1 204 No Content

              

GET /tags/{tagId}

Returns the Tag specified by the "id" path parameter.

Request Parameters
name type description constraints
tagId path The id of the Tag requested. required
Response Body
media type data type description
application/json Tag (JSON) The requested Tag object.
application/xml tag (XML)

Example

Request
GET /tags/{tagId}
Content-Type: */*
Accept: application/json

                
...
                
              
Response
HTTP/1.1 200 OK
Content-Type: application/json

                
{
  "id" : 12345,
  "accountId" : 12345,
  "name" : "...",
  "createdOn" : 12345,
  "createdBy" : 12345,
  "modifiedOn" : 12345,
  "modifiedBy" : 12345,
  "optlock" : 12345
}
                
              

PUT /tags/{tagId}

Updates the Tag specified by the "id" path parameter based on the information provided in the Tag parameter.

Request Parameters
name type description constraints
tagId path The id of the Tag to be updated. required
Request Body
media type data type description
application/json Tag (JSON) The modified Tag whose attributes need to be updated.
application/xml tag (XML)
Response Body
media type data type description
application/json Tag (JSON) The updated tag.
application/xml tag (XML)

Example

Request
PUT /tags/{tagId}
Content-Type: application/json
Accept: application/json

                
{
  "id" : 12345,
  "accountId" : 12345,
  "name" : "...",
  "createdOn" : 12345,
  "createdBy" : 12345,
  "modifiedOn" : 12345,
  "modifiedBy" : 12345,
  "optlock" : 12345
}
                
              
Response
HTTP/1.1 204 No Content
Content-Type: application/json

                
{
  "id" : 12345,
  "accountId" : 12345,
  "name" : "...",
  "createdOn" : 12345,
  "createdBy" : 12345,
  "modifiedOn" : 12345,
  "modifiedBy" : 12345,
  "optlock" : 12345
}