Example of using the REST API to retrieve field metadata
Get field
You can use the GET operation to retrieve field metadata for a single field on a specified form as defined in the criteria. The following table lists the details about the GET operation:
URL qualifier | /fields/{formName}/{fieldId} formName is the name of the form for which an entry must be created. field_id indicates the list of field IDs for which details are required. | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Syntax | /api/arsys/v1.0/fields/{formname}/{field_ids}?field_criteria= | ||||||||||||
Example | Retrieves metadata for the field with Field ID 1 on _Form1: http://serverName:port/api/arsys/v1.0/fields/_Form1/1 Retrieves limited metadata for the field with Field ID 1 on _Form1 that matches the LAST_MODIFIED_BY criteria: http://serverName:port/api/arsys/v1.0/fields/_Form1/1?field_criteria=LAST_MODIFIED_BY | ||||||||||||
Method | GET | ||||||||||||
Headers |
| ||||||||||||
Parameters |
| ||||||||||||
Returns | Field metadata in JSON format | ||||||||||||
All possible error codes | If the request is not successful, one of the following error code is returned:
For more information, see Error-handling-for-the-REST-API. |
Example of retrieving field metadata from a single field on a form
"id": 536870913,
"name": "Character Field",
"help_text": "",
"last_update_time": "2019-01-28T09:12:18.786+0000",
"owner": "Demo",
"last_changed_by": "Demo",
"field_option": "OPTIONAL",
"audit": "NONE",
"create_mode": "PROTECTED_AT_CREATE",
"field_mapping": {
"mapping_type": "REGULAR"
},
"datatype": "CHAR",
"limit": {
"length_unit": "AR_LENGTH_UNIT_BYTE",
"storage_option_for_clob": "DEFAULT",
"max_length": 255,
"menu_style": "OVERWRITE",
"char_menu": "",
"qbe_match": "ANYWHERE",
"full_text_options": {
"index_for_fts": "None",
"literal_fts_index": false
},
"pattern": ""
},
"display_properties": {
"Default Administrator View": {
"BBOX": [
{
"x": 38357,
"y": 8400
},
{
"x": 65353,
"y": 10500
}
],
"VISIBLE": 1,
"ENABLE": 2,
"Z_ORDER": 2147483648,
"HIDE_WEBHELP": 1,
"LABEL": "Character Field",
"LABEL_BBOX": [
{
"x": 0,
"y": 400
},
{
"x": 8323,
"y": 2100
}
],
"DATA_ROWS": 1,
"DATA_EXPAND_BBOX": [
{
"x": 24634,
"y": 0
},
{
"x": 26996,
"y": 2100
}
],
"TAB_ORDER": 4294967295,
"DATA_BBOX": [
{
"x": 8886,
"y": 0
},
{
"x": 24071,
"y": 2100
}
],
"DISPLAY_PARENT": 0,
"MANAGE_EXPAND_BOX": 0,
"FIELD_HIGHLIGHT": 0,
"FIELD_HIGHLIGHT_START_COLOR": "0x00",
"FIELD_HIGHLIGHT_END_COLOR": "0x00",
"ALIGNED": 0,
"SHOWURL": 0
}
},
"_links": {
"self": [
{
"href": "http://<localhost>:<jettyport>/api/arsys/v1.0/fields/<form name>/<field ID>"
}
]
}
}
Get fields
You can use the GET operation to retrieve field metadata for specified fields on a specified form as defined in the criteria. The following table lists the details about the GET operation:
URL qualifier | /fields/{formname} | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Syntax | /api/arsys/v1.0/fields/{formname}/?field_ids= | ||||||||||||
Examples |
| ||||||||||||
Method | GET | ||||||||||||
Headers |
| ||||||||||||
Parameters |
You can provide the field_type or field_ids. | ||||||||||||
Returns | Field metadata of the requested fields in the JSON format. | ||||||||||||
All possible error codes | If the request is not successful, one of the following error code is returned:
For more information, see Error-handling-for-the-REST-API. |
Example of retrieving field metadata for specific fields
{
"id": 536870913,
"name": "Character Field",
"help_text": "",
"last_update_time": "2019-01-28T09:12:18.786+0000",
"owner": "Demo",
"last_changed_by": "Demo",
"field_option": "OPTIONAL",
"audit": "NONE",
"create_mode": "PROTECTED_AT_CREATE",
"field_mapping": {
"mapping_type":
"REGULAR"
},
"datatype": "CHAR",
"limit": {
"length_unit": "AR_LENGTH_UNIT_BYTE",
"storage_option_for_clob": "DEFAULT",
"max_length": 255,
"menu_style": "OVERWRITE",
"char_menu": "",
"qbe_match": "ANYWHERE",
"full_text_options": {
"index_for_fts": "None",
"literal_fts_index": false
},
"pattern": ""
},
"display_properties": {
"Default Administrator View": {
"BBOX": [
{
"x": 38357,
"y": 8400
},
{
"x": 65353,
"y": 10500
}
],
"VISIBLE": 1,
"ENABLE": 2,
"Z_ORDER": 2147483648,
"HIDE_WEBHELP": 1,
"LABEL": "Character Field",
"LABEL_BBOX": [
{
"x": 0,
"y": 400
},
{
"x": 8323,
"y": 2100
}
],
"DATA_ROWS": 1,
"DATA_EXPAND_BBOX": [
{
"x": 24634,
"y": 0
},
{
"x": 26996,
"y": 2100
}
],
"TAB_ORDER": 4294967295,
"DATA_BBOX": [
{
"x": 8886,
"y": 0
},
{
"x": 24071,
"y": 2100
}
],
"DISPLAY_PARENT": 0,
"MANAGE_EXPAND_BOX": 0,
"FIELD_HIGHLIGHT": 0,
"FIELD_HIGHLIGHT_START_COLOR": "0x00",
"FIELD_HIGHLIGHT_END_COLOR": "0x00",
"ALIGNED": 0,
"SHOWURL": 0
}
},
"_links": {
"self": [
{
"href": "http://clm-pun-t43rv6:8008/api/arsys/v1.0/fields/form99/536870913"
}
]
}
},
{
"id": 536870914,
"name": "Drop-Down List Field",
"help_text": "",
"last_update_time": "2019-01-28T11:28:00.947+0000",
"owner": "Demo",
"last_changed_by": "Demo",
"field_option": "OPTIONAL",
"audit": "NONE",
"create_mode": "PROTECTED_AT_CREATE",
"default_value": "Veg",
"field_mapping": {
"mapping_type": "REGULAR"
},
"datatype": "ENUM",
"limit": {
"selection_values": [
{
"name": "Non-Veg",
"id": 1
},
{
"name": "Egg",
"id": 2
},
{
"name": "Veg",
"id": 0
},
{
"name": "Fruit",
"id": 3
},
{
"name": "Milk",
"id": 4
}
],
"list_style": "REGULAR"
},
"display_properties": {
"Default Administrator View": {
"BBOX": [
{
"x": 43419,
"y": 14600
},
{
"x": 63666,
"y": 16700
}
],
"VISIBLE": 1,
"ENABLE": 2,
"Z_ORDER": 2147483649,
"HIDE_WEBHELP": 1,
"LABEL": "Drop-Down List Field",
"LABEL_BBOX": [
{
"x": 0,
"y": 400
},
{
"x": 11361,
"y":2100
}
],
"DATA_ROWS": 1,
"DATA_RADIO": 0,
"TAB_ORDER": 4294967295,
"DATA_BBOX": [
{
"x": 11923,
"y": 0
},
{
"x": 20246,
"y": 2100
}
],
"DISPLAY_PARENT": 0,
"ENUM_LABELS": "5\\0\\Egg\\1\\Fruit\\2\\Milk\\3\\Dessert\\4\\Soda",
"FIELD_HIGHLIGHT": 0,
"FIELD_HIGHLIGHT_START_COLOR": "0x00",
"FIELD_HIGHLIGHT_END_COLOR": "0x00",
"ALIGNED": 0
}
},
"_links": {
"self": [
{
"href": "http://<LocalHost>:<Jetty Port>/api/arsys/v1.0/fields/<form name>/<Field ID>"
}
]
}
}
]