Process-Recourse handles the relation between processes and recourses.

GET /processes/{process}/recourses

This method returns the list of recurses related to a process.

Request attribute:

    • process [mandatory]: the id of the process whose related recourses you want to display.

Request parameters:

    • company [mandatory]: the company name or id.
    • session [mandatory]: the Id of the active session.

Response:

    • status: returns "0" on success, and an error code in any other case.
    • data: returns the list of recourses associated to the process.
    • message: "success" or a descriptive information of the error in any other case.

Example:

Request:

{"type":"get",

"url":"processes/7101/recourses",

"data":"company=demo04&session=QhuFhXB9MXprVKEfakhwaZxgA5osZg1o2NDaZeDunjRBX7cETnq6fehDH0K1"}


Reponse (success):

"status": "0",

"data": [

{

"recourse": "0701"

}

...

],

"message": "Success"}


Response (error):

{"status":"1007",

"data":"<a href='http:\/\/127.0.0.1:8080\/edinnM2\/help\/en\/API_Processes_Config.html'>for additional information follow this link<\/a>",

"message":"Session not stablished"}

POST /processes/recourses

This method creates a relation between a process and a recourse. The user must have the administrator role.

Request parameters (for additional information please review the recourses configuration):

    • company [mandatory]: the company name or id.
    • session [mandatory]: the Id of the active session.
    • process [mandatory]: the id of the process to who you want relate the recourse.
    • recourse [mandatory]: the Id of the recourse you want to relate with the process.

DELETE /processes/{process}/recourses/{recourse}

This method deletes a relation between a process and a recourse. The user must have the administrator role.

Request attribute:

    • process [mandatory]: the id of the process from who you want to remove the recourse.
    • recourse [mandatory]: the id of the recourse to delete.

Request parameters:

    • company [mandatory]: the company name or id.
    • session [mandatory]: the Id of the active session.

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.