Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

devices_1.json

 

 

Format

Using the format option is useful when using a web browser but you wish to see the result in JSON format. Adding format=json achieves this. Normally a web browser will set its accept header to html, so in that case we return the rendered page. Using an API to retrieve JSON you should set the accept header to contain the string "json". That might be "json/application" or whatever you like. You can override this by providing the format option in the URL..

...

Request Methodidactionsub_resourcesub_resource_idResulting ActionNotesURL Example
GETN<empty>  collection /devices
GETNcreate  create_form /devices?action=create
GETY/NcreateY sub_resource_create_form /devices?action=create&sub_resource=credentials
GETNimport  import_form /devices?action=import
GETY   read /devices/{id}
GETYupdate  update_form /devices/{id}?action=update
GETYdownload  download /scripts/{id}?action=download
GETNupdate  bulk_update_form

Should provide attribute "ids" which is a comma

seperated separated list of ID's upon which to bulk update.

/devices?action=update&ids=1,2,3,4
POSTN   create /devices
POSTNimport  import /devices?action=import
POSTNedit  bulk_update_form  
POST / PUT / PATCHY<empty>  update /devices/{id}?action=update
POSTY Y sub_resource_create /devices/{id}?sub_resource=credential
DELETEY N delete /scripts/{id}
DELETEY YYsub_resource_delete /devices/{id}/credential/{sub_resource_id}
ALL <empty> / list  collection  
        
        
        
        

...

VerbAcceptURLResultExample RresponseResponse
GETJSON/devicesGet a list of all devices 
GETJSON/devices/1Get the system table of device with id = 1. devices_1.json
GETJSON/devices/1&include=biosGet the system table and bios table for device with ID = 1 

...