Delete an asset from a group

Purpose: Use this API to delete an asset from a group. You may delete a single as well as multiple assets from an existing group.

You must specify the ID of the group as well as the ID of the asset that you want to remove. Refer to the Path and Query parameters section for more info.

require 'uri'
require 'net/http'

url = URI('https://api.gomotive.com/v1/groups/<id>/assets')

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Delete.new(url)
request['Authorization'] = "Bearer <OAUTH_TOKEN>"

response = http.request(request)
puts response.read_body

Response Parameters

success

  • Type: Boolean
  • Description: Denotes if the assets were deleted successfully from the group. Mostly the value for this parameter will be "true". Otherwise, you will see the status 400 appearing.

Path Params
int32
required

Specify the ID of the group from which you want to delete a vehicle.

Query Params
ids[]
array of int32s

Specify the ID or IDs of assets that you want to remove from an existing group. You may add multiple values.

ids[]
Headers
string

Specify the timezone for formatting the timestamps.

boolean

Specify if you want to use the Metric units or the Imperial units. TRUE: Metric units. FALSE: Imperial Units

int32

Specify the ID of the Fleet Admin or the Fleet Manager who is accessing this endpoint.

Responses

Language
Credentials
Header
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json