Difference between revisions of "DescribeFields"

From ARK
Jump to: navigation, search
(Created page with "This method is used to supply a list of available fields within the ARK instance. It will return a JSON array of all the different fields within ARK and their relative ids and sh...")
 
Line 1: Line 1:
 
This method is used to supply a list of available fields within the ARK instance. It will return a JSON array of all the different fields within ARK and their relative ids and shortnames, and other information.
 
This method is used to supply a list of available fields within the ARK instance. It will return a JSON array of all the different fields within ARK and their relative ids and shortnames, and other information.
 +
 +
Please note this method respects any security conditions set in the subform configuration - therefore if fields are, for instance, being restricted on userids or security groups they will not be made available for return by the API.
  
 
===Path===
 
===Path===

Revision as of 18:05, 20 November 2013

This method is used to supply a list of available fields within the ARK instance. It will return a JSON array of all the different fields within ARK and their relative ids and shortnames, and other information.

Please note this method respects any security conditions set in the subform configuration - therefore if fields are, for instance, being restricted on userids or security groups they will not be made available for return by the API.

Path

http://your.ark.instance/api.php?req=describeFields

Arguments

  • item_key - this is in the form 'cxt_cd and refers to the module from which the subforms are requested. If this is set to 'all' information about all available subforms are returned.

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=describeFields&item_key=hut_cd&handle=johndoe&passwd=johndoepassword

Example return (returned JSONified - displayed as an array here for ease of viewing):

Array
(
    [conf_field_description] => Array
        (
            [field_id] => conf_field_description
            [dataclass] => txt
            [classtype] => notes
            [aliasinfo] => 
            [editable] => 1
            [hidden] => 
            [add_validation] => Array
                (
                    [0] => Array
                        (
                            [rq_func] => reqManual
                            [vd_func] => chkSet
                            [var_name] => cre_on
                            [force_var] => NOW()
                        )

                    [1] => Array
                        (
                            [rq_func] => reqManual
                            [vd_func] => chkSet
                            [var_name] => log
                            [force_var] => on
                        )

                    [2] => Array
                        (
                            [rq_func] => reqMulti
                            [vd_func] => chkSet
                            [var_name] => ste_cd
                            [lv_name] => ste_cd
                            [var_locn] => session
                        )

                    [3] => Array
                        (
                            [rq_func] => reqMulti
                            [vd_func] => chkSet
                            [var_name] => cre_by
                            [lv_name] => user_id
                            [var_locn] => live
                        )

                    [4] => Array
                        (
                            [rq_func] => reqClassType
                            [vd_func] => chkSet
                            [var_name] => txttype
                            [lv_name] => classtype
                            [var_locn] => field
                        )

                    [5] => Array
                        (
                            [rq_func] => reqMulti
                            [vd_func] => chkSkipBlank
                            [var_name] => txt
                            [lv_name] => dyn_field
                            [var_locn] => request
                        )

                    [6] => Array
                        (
                            [rq_func] => reqMulti
                            [vd_func] => chkSet
                            [var_name] => itemkey
                            [lv_name] => item_key
                            [var_locn] => live
                        )

                    [7] => Array
                        (
                            [rq_func] => reqItemVal
                            [vd_func] => chkSet
                            [var_name] => itemval
                            [lv_name] => itemval
                            [var_locn] => request
                            [req_keytype] => auto
                            [ret_keytype] => cd
                        )

                    [8] => Array
                        (
                            [rq_func] => reqMulti
                            [vd_func] => chkSet
                            [var_name] => lang
                            [lv_name] => lang
                            [var_locn] => live
                        )

                )

            [edt_validation] => Array
                (
                    [0] => Array
                        (
                            [rq_func] => reqManual
                            [vd_func] => chkSet
                            [var_name] => cre_on
                            [force_var] => NOW()
                        )

                    [1] => Array
                        (
                            [rq_func] => reqManual
                            [vd_func] => chkSet
                            [var_name] => log
                            [force_var] => on
                        )

                    [2] => Array
                        (
                            [rq_func] => reqMulti
                            [vd_func] => chkSet
                            [var_name] => ste_cd
                            [lv_name] => ste_cd
                            [var_locn] => session
                        )

                    [3] => Array
                        (
                            [rq_func] => reqMulti
                            [vd_func] => chkSet
                            [var_name] => cre_by
                            [lv_name] => user_id
                            [var_locn] => live
                        )

                    [4] => Array
                        (
                            [rq_func] => reqClassType
                            [vd_func] => chkSet
                            [var_name] => txttype
                            [lv_name] => classtype
                            [var_locn] => field
                        )

                    [5] => Array
                        (
                            [rq_func] => reqMulti
                            [vd_func] => chkSkipBlank
                            [var_name] => txt
                            [lv_name] => dyn_field
                            [var_locn] => request
                        )

                    [6] => Array
                        (
                            [rq_func] => reqMulti
                            [vd_func] => chkSet
                            [var_name] => itemkey
                            [lv_name] => item_key
                            [var_locn] => live
                        )

                    [7] => Array
                        (
                            [rq_func] => reqItemVal
                            [vd_func] => chkSet
                            [var_name] => itemval
                            [lv_name] => itemval
                            [var_locn] => request
                            [req_keytype] => auto
                            [ret_keytype] => cd
                        )

                    [8] => Array
                        (
                            [rq_func] => reqFragId
                            [vd_func] => chkSet
                            [var_name] => frag_id
                            [lv_name] => id
                            [var_locn] => request
                        )

                    [9] => Array
                        (
                            [rq_func] => reqMulti
                            [vd_func] => chkSet
                            [var_name] => lang
                            [lv_name] => lang
                            [var_locn] => live
                        )

                )

        )

)