Difference between revisions of "Get Assets Updated Since"

From MyMobileWorkers API
Jump to: navigation, search
(Created page with "== Summary == {| border="1" class="wikitable" ! Jobs Update Since ! colspan="2" | |- ! URL | colspan="2" | http://:base_url/:api_path/:version/assets/asset/updated?api_key=...")
 
(→‎Example curl request)
 
(8 intermediate revisions by one user not shown)
Line 2: Line 2:
 
{| border="1" class="wikitable"
 
{| border="1" class="wikitable"
  
−
! Jobs Update Since
+
! Assets Updated Since
 
! colspan="2" |  
 
! colspan="2" |  
 
|-
 
|-
Line 21: Line 21:
 
| colspan="2" | JSON
 
| colspan="2" | JSON
 
|}
 
|}
−
 
  
 
The Get Assets Updated method returns all assets that have been updated since the specified "since" parameter
 
The Get Assets Updated method returns all assets that have been updated since the specified "since" parameter
  
 +
== Response Parameters ==
 +
{| border="1" class="wikitable"
 +
 +
! 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 ==
 
== Example response ==
Line 30: Line 81:
 
<source lang="java">
 
<source lang="java">
 
{
 
{
−
   "assets":[
+
   "location":"aPlace2",
−
      {
+
  "status":{
−
        "location":"aPlace2",
+
      "external_id":null,
−
        "status":{
+
      "name":"test"
−
            "external_id":null,
+
  },
−
            "name":"test"
+
  "description":"describingwords",
−
        },
+
  "item":{
−
        "description":"describingwords",
+
      "external_id":null,
−
        "item":{
+
      "category":"test3",
−
            "external_id":null,
+
      "name":"Woo"
−
            "category":"Test Numero 1",
+
  },
−
            "name":"Woo"
+
  "serial_number":"serialNo456",
−
        },
+
  "created_at":"2013-10-08 14:19:17",
−
        "serial_number":"serialNo456",
+
  "last_updated_by":null,
−
        "created_at":1375888861000,
+
  "external_id":"sss32",
−
        "last_updated_by":null,
+
  "last_scanned_by":null,
−
        "external_id":"sss32",
+
  "job":{
−
        "last_scanned_by":null,
+
      "job_ number":"123"
−
        "custom_fields":null,
+
  },
−
        "job":{
+
  "customer":{
−
            "job_ number":"123"
+
      "name":"john"
−
        },
+
  },
−
        "customer":{
+
  "custom_fields":{
−
            "name":"john"
+
      "testFieldName3":"testFieldValue3",
−
        }
+
      "testFieldName2":"testFieldValue2",
−
      },
+
      "testFieldName1":"testFieldValue1"
−
      {
+
  },
−
        "location":"aPlace2",
+
  "branch":{
−
        "status":{
+
      "name":"DarrenDevTest"
−
            "external_id":null,
+
  }
−
            "name":"test"
+
−
        },
+
−
        "description":"describingwords",
+
−
        "item":{
+
−
            "external_id":null,
+
−
            "category":"Test Numero 1",
+
−
            "name":"Woo"
+
−
        },
+
−
        "serial_number":"serialNo123",
+
−
        "created_at":1375874083000,
+
−
        "last_updated_by":null,
+
−
        "external_id":"sss32",
+
−
        "last_scanned_by":null,
+
−
        "custom_fields":null,
+
−
        "job":{
+
−
            "job_ number":"123"
+
−
        },
+
−
        "customer":{
+
−
            "name":"john"
+
−
        }
+
−
      }
+
−
  ]
+
 
}
 
}
 
</source>
 
</source>
Line 87: Line 116:
 
== Example curl request ==
 
== Example curl request ==
  
−
http://10.1.0.75:8080/api/1/jobs/updated?api_key=YOUR_KEY&since=2013-05-20%2012:12:12
+
curl "https://api.mymobileworkers.com:8181/api/1/assets/asset/updated/?api_key=darrenwebapi&since=2013-08-07T12:50:44"

Latest revision as of 12:38, 14 November 2016

Contents

[edit] 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

[edit] 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

[edit] 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":"2013-10-08 14:19:17",
   "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"
   }
}

[edit] Example curl request

curl "https://api.mymobileworkers.com:8181/api/1/assets/asset/updated/?api_key=darrenwebapi&since=2013-08-07T12:50:44"

Personal tools
Namespaces

Variants
Actions
Navigation
Toolbox