Difference between revisions of "Get Assets Updated Since"

From MyMobileWorkers API
Jump to: navigation, search
(→‎Example response)
(→‎Example curl request)
Line 116: Line 116:
 
== Example curl request ==
 
== Example curl request ==
  
−
curl "http://10.1.0.87:8080/api/1/assets/asset/updated/?api_key=darrenwebapi&since=2013-08-07%2012:50:44"
+
curl "http://10.1.0.87:8080/api/1/assets/asset/updated/?api_key=darrenwebapi&since=2013-08-07T12:50:44"
−
 
+
−
NOTE: the '%20' between the date and time is not part of the DATETIME but is needed.
+

Revision as of 13:08, 1 October 2013

Contents

Summary

Assets Updated Since
URL http://:base_url/:api_path/:version/assets/asset/updated?api_key=YOUR_KEY&since=DATETIME
Type GET
Params: api_key required
since required
Response JSON

The Get Assets Updated method returns all assets that have been updated since the specified "since" parameter

Response Parameters

Field Description
location Asset location
status Contains both external id and status name for asset status
description Asset description
item Contains the name, category and external id of the item the asset is linked to
serial_number Asset serial number
created_at Date asset was created
last_updated_by User who last updated asset
external_id Asset external id
last_scanned_by User who last scanned asset
custom_fields Asset custom fields
last_updated_by User who last updated asset
job Job the asset is linked to
customer Customer the asset is linked to
branch Branch the asset is linked to

Example response

{
   "location":"aPlace2",
   "status":{
      "external_id":null,
      "name":"test"
   },
   "description":"describingwords",
   "item":{
      "external_id":null,
      "category":"test3",
      "name":"Woo"
   },
   "serial_number":"serialNo456",
   "created_at":1376650412900,
   "last_updated_by":null,
   "external_id":"sss32",
   "last_scanned_by":null,
   "job":{
      "job_ number":"123"
   },
   "customer":{
      "name":"john"
   },
   "custom_fields":{
      "testFieldName3":"testFieldValue3",
      "testFieldName2":"testFieldValue2",
      "testFieldName1":"testFieldValue1"
   },
   "branch":{
      "name":"DarrenDevTest"
   }
}

Example curl request

curl "http://10.1.0.87:8080/api/1/assets/asset/updated/?api_key=darrenwebapi&since=2013-08-07T12:50:44"

Personal tools
Namespaces

Variants
Actions
Navigation
Toolbox