Difference between revisions of "GetItems"
From ARK
(Created page with "This method is used to get a list of items of a specific module within the ARK instance. It will return a JSON array of all the different itemkeys for a specific module - or alte...") |
(→Arguments) |
||
(One intermediate revision by the same user not shown) | |||
Line 3: | Line 3: | ||
===Path=== | ===Path=== | ||
− | http://your.ark.instance/api.php? | + | http://your.ark.instance/api.php?req=getItems |
===Arguments=== | ===Arguments=== | ||
Line 14: | Line 14: | ||
*'''passwd''' - password | *'''passwd''' - password | ||
+ | |||
+ | The method returns a JSON array unless otherwise specified: | ||
+ | |||
+ | *'''format''' - 'json' by default, but sending 'html' prints a human-readable array to screen | ||
===Example=== | ===Example=== | ||
− | http://your.ark.instance/api.php? | + | http://your.ark.instance/api.php?req=getItems&item_key=hut_cd&handle=johndoe&passwd=johndoepassword |
Example return (returned JSONified - displayed as an array here for ease of viewing): | Example return (returned JSONified - displayed as an array here for ease of viewing): |
Latest revision as of 15:51, 15 November 2013
This method is used to get a list of items of a specific module within the ARK instance. It will return a JSON array of all the different itemkeys for a specific module - or alternatively for ever module.
Path
http://your.ark.instance/api.php?req=getItems
Arguments
- item_key - this is the item_key of the required module (for instance 'cxt_cd'). A list of available modules can be obtained using describeItems. If item_key is set to 'all' this method will return all the items within the ARK instance
If anonymous logins are not enabled a username and password will need to be supplied:
- handle - username
- passwd - password
The method returns a JSON array unless otherwise specified:
- format - 'json' by default, but sending 'html' prints a human-readable array to screen
Example
http://your.ark.instance/api.php?req=getItems&item_key=hut_cd&handle=johndoe&passwd=johndoepassword
Example return (returned JSONified - displayed as an array here for ease of viewing):
Array ( [hut] => Array ( [0] => Array ( [0] => LK12_1 [hut_cd] => LK12_1 [1] => 1 [hut_no] => 1 [2] => LK12 [ste_cd] => LK12 [3] => 1 [cre_by] => 1 [4] => 2012-05-24 00:00:00 [cre_on] => 2012-05-24 00:00:00 ) [1] => Array ( [0] => LK12_2 [hut_cd] => LK12_2 [1] => 2 [hut_no] => 2 [2] => LK12 [ste_cd] => LK12 [3] => 1 [cre_by] => 1 [4] => 2012-05-24 00:00:00 [cre_on] => 2012-05-24 00:00:00 ) [2] => Array ( [0] => LK12_3 [hut_cd] => LK12_3 [1] => 3 [hut_no] => 3 [2] => LK12 [ste_cd] => LK12 [3] => 0 [cre_by] => 0 [4] => 0000-00-00 00:00:00 [cre_on] => 0000-00-00 00:00:00 ) ) )