lib/nexpose/tag.rb
# Adds a tag to an asset
#
# @param [Connection] connection Nexpose connection
# @param [Fixnum] asset_id of the asset to be tagged
# @return [Fixnum] ID of applied tag
#
Adds a tag to an asset
Adds a tag to an asset
def add_to_asset(connection, asset_id)
      params = _to_json_for_add
      uri = AJAX.post(connection, "/api/2.0/assets/#{asset_id}/tags", params, AJAX::CONTENT_TYPE::JSON)
      @id = uri.split('/').last.to_i
    end
def add_to_asset ( connection , asset_id ) params = _to_json_for_add uri = AJAX . post ( connection , "/api/2.0/assets/#{asset_id}/tags" , params , AJAX :: CONTENT_TYPE :: JSON ) @id = uri . split ( '/' ) . last . to_i end
Adds a tag to an asset
Adds a tag to an asset
ID of applied tag
ID of applied tag
Fixnum
connection
<not_specific>
asset_id
<not_specific>
<not_specific>
asset_id of the asset to be tagged
asset_id of the asset to be tagged