BETA: This functionality is under development and there may be changes not reflected in this help.

This section handles the fields usage.

GET fields/{id}/values

This method returns the list of fields values.

Request attribute:

    • id [mandatory]: the Id of the field.

Request parameters:

    • company [mandatory]: the company name or id.
    • session [mandatory]: the Id of the active session.
    • module [obligatorio]: indicates the module where is the field you want to get. 0: results, 1: autocontrol.

Response:

    • status: returns "0" on success, and an error code in any other case.
    • data: returns the properties of the fields.
    • message: "Success" or a descriptive information of the error in any other case.

Example:

Content-Type: application/json

Request:/fields/values?company=edinn&session=0PY4RhPbK7YW5sbRXiwASrA2HEeCP0eGFzunnfiEJYWrp4whnU11FLESeYpB&idfield1=20200411155128ACBCENTRAL&mod=0&idfield2=20200411155128ACBCENTRAL&parentid=20190507075910AAFDTRONCHO&values=testvalue&idproc=HC00

Reponse (success):

{

 "status": "0",

 "data": [

{

"id": "20200423095359AAQDTRONCHO",

"machdate": "HC0020200423095359",

"id2": "20200421121153AAPDTRONCHO",

"id_field": "20190507075910AAFDTRONCHO",

"val": "",

"id_author": "DAVID.TRONCHONI",

"created": "20200423095359",

"id_mod": "",

"modified": ""

},

 {

"id": "20200423095359AATDTRONCHO",

"machdate": "HC0020200423095359",

"id2": "20200421121153AAPDTRONCHO",

"id_field": "20190507093159AANDTRONCHO",

"val": "20200423140000",

"id_author": "DAVID.TRONCHONI",

"created": "20200423095359",

"id_mod": "",

"modified": ""

}

 ],

 "message": "Success"

}

GET fields/values/gen

This method returns the list of fields values.

Request attribute:

    • company [mandatory]: the company name or id.
    • session [mandatory]: the Id of the active session.
    • idproc [mandatory]: id of the process.
    • module [obligatorio]: indicates the module where is the field you want to get. 0: results, 1: autocontrol.
    • field1 [obligatorio]: id of the result or autocontrol
    • field2 [obligatorio]: id of the proces, status, result relation
    • field3 [obligatorio]: id of the order, production registry or autocontrol
    • value [mandatory]: value to insert
    • parent [mandatory]: id of the field you want to assign the value
    • result: Id of the result (indicate only if there is a result change)

Response:

    • status: returns "0" on success, and an error code in any other case.
    • data: returns the properties of the fields.
    • message: "Success" or a descriptive information of the error in any other case.

Example:

Content-Type: application/json

Request:/fields/values?company=edinn&session=0PY4RhPbK7YW5sbRXiwASrA2HEeCP0eGFzunnfiEJYWrp4whnU11FLESeYpB&idfield1=20200411155128ACBCENTRAL&mod=0&idfield2=20200411155128ACBCENTRAL&parentid=20190507075910AAFDTRONCHO&values=testvalue&idproc=HC00

Reponse (success):

{

 "status": "0",

 "data": [

{

"id": "20200423095359AAQDTRONCHO",

"machdate": "HC0020200423095359",

"id2": "20200421121153AAPDTRONCHO",

"id_field": "20190507075910AAFDTRONCHO",

"val": "",

"id_author": "DAVID.TRONCHONI",

"created": "20200423095359",

"id_mod": "",

"modified": ""

},

 {

"id": "20200423095359AATDTRONCHO",

"machdate": "HC0020200423095359",

"id2": "20200421121153AAPDTRONCHO",

"id_field": "20190507093159AANDTRONCHO",

"val": "20200423140000",

"id_author": "DAVID.TRONCHONI",

"created": "20200423095359",

"id_mod": "",

"modified": ""

}

 ],

 "message": "Success"

}


POST /fields/values

This method creates a new field values. The user must have the administrator role.

Request parameters:

    • company [mandatory]: the company name or id.
    • session [mandatory]: the Id of the active session.
    • idproc [mandatory]: id of the process.
    • module [obligatorio]: indicates the module where is the field you want to get. 0: results, 1: autocontrol.
    • field [mandatory]: id of the result
    • value [mandatory]: value to insert
    • parent [mandatory]: id of the field you want to assign the value

Response:

    • status: returns "0" on success, and an error code in any other case.
    • data: "Success" on success, and empty in case of error.
    • message: "Success" or a descriptive information of the error in any other case.

Content-Type: application/json

Request: /fields/values?company=edinn&session=0PY4RhPbK7YW5sbRXiwASrA2HEeCP0eGFzunnfiEJYWrp4whnU11FLESeYpB&idfield1=20200411155128ACBCENTRAL&mod=0&idfield2=20200411155128ACBCENTRAL&parentid=20190507075910AAFDTRONCHO&values=testvalue&idproc=HC00

Reponse (success):

{

 "status": "0",

 "data":true,

   "message": "Success"

}

DELETE /fields/{id}/values

This method deletes a configured fields value. The user must have the administrator role.

Request attribute:

    • id [mandatory]: the Id of the field.

Request parameters:

    • company [mandatory]: the company name or id.
    • session [mandatory]: the Id of the active session.
    • module [mandatory]: indicates the module where the field you want to delete is located. 0: results, 1: autocontrol.

Response:

    • status: returns "0" on success, and an error code in any other case.
    • data: "Success" on success, and empty in case of error.
    • message: "Success" or a descriptive information of the error in any other case.

Content-Type: application/json

Request:/fields/values?company=edinn&session=0PY4RhPbK7YW5sbRXiwASrA2HEeCP0eGFzunnfiEJYWrp4whnU11FLESeYpB&id=20200411155129ADQCENTRAL&mod=0

Reponse (success):

{

 "status": "0",

 "data":true,

 "message": "Success"

}