-
Notifications
You must be signed in to change notification settings - Fork 10
Programs
Iván Uresti edited this page Aug 11, 2019
·
1 revision
With the API it is possible create, read, update and delete programs.
To delete a program it must not have batches associated to it.
- Method: POST
- Roles allowed: ADMINISTRATOR
- URL: https://{{TECHNOVATIONSLP_URL}}/api/program
- Headers:
- Authorization. access_token (Bearer)
- Body: content-type=application/json
{
"name": "<A name for the program>",
"description": "<A description for the program>",
"responsible": "Free fields intended to store names of people in charge"
}
Program created including new id:
{
"id":"2f07f87e-9572-4c5b-89ca-b6a812888e23",
"name": "<A name for the program>",
"description": "<A description for the program>",
"responsible": "Free fields intended to store names of people in charge"
}
- Method: GET
- Roles allowed: *
- URL: https://{{TECHNOVATIONSLP_URL}}/api/program
- Headers:
- Authorization. access_token (Bearer)
List of programs with below structure:
[
{
"id":"2f07f87e-9572-4c5b-89ca-b6a812888e23",
"name": "<A name for the program>",
"description": "<A description for the program>",
"responsible": "Free fields intended to store names of people in charge"
}
]
- Method: GET
- Roles allowed: *
- URL: https://{{TECHNOVATIONSLP_URL}}/api/program/
- Headers:
- Authorization. access_token (Bearer)
Program or 404(not found):
{
"id":"2f07f87e-9572-4c5b-89ca-b6a812888e23",
"name": "<A name for the program>",
"description": "<A description for the program>",
"responsible": "Free fields intended to store names of people in charge"
}
- Method: PUT
- Roles allowed: ADMINISTRATOR
- URL: https://{{TECHNOVATIONSLP_URL}}/api/program
- Headers:
- Authorization. access_token (Bearer)
- Body: content-type=application/json
{
"id":"2f07f87e-9572-4c5b-89ca-b6a812888e23",
"name": "<A name for the program>",
"description": "<A description for the program>",
"responsible": "Free fields intended to store names of people in charge"
}
Program updated:
{
"id":"2f07f87e-9572-4c5b-89ca-b6a812888e23",
"name": "<A name for the program>",
"description": "<A description for the program>",
"responsible": "Free fields intended to store names of people in charge"
}
- Method: DELETE
- Roles allowed: ADMINISTRATOR
- URL: https://{{TECHNOVATIONSLP_URL}}/api/program/
- Headers:
- Authorization. access_token (Bearer)
200 (no body) or 404(not found):