Step | Action | Expected system response | Comment |
| Note: Remember to generate token for authentication using some rest client. | | Copy the token from response (e.g. {"access_token":"121d02ed-b6b4-4233-9566-cac2b8a3aec9"...). The token will expire after 1 hour. Then, it's necessary to generate the new one. |
1 |
Create geographicZone URL: http://localhost:8080/api/geographicZones/?access_token=68be1238-021f-4126-a676-8fdb7dca0d6d Method: POST Example body: { "code": "zonecode", "name": "zonename", "level": "http://localhost:8080/api/geographicLevels/37bf6690-9fdd-4b90-bb51-1d9e83d1d0b2" } | | |
2 | Create geographicLevel URL: http://localhost:8080/api/geographicLevels/?access_token=68be1238-021f-4126-a676-8fdb7dca0d6d Method: POST Example body: { "code": "levelcode", "name": "levelname", "levelNumber": "2" } | status: 201 created is returned, id: "http://localhost:8080/api/geographicLevels/37bf6690-9fdd-4b90-bb51-1d9e83d1d0b2"
| |
3 | Create facilityType URL: http://localhost:8080/api/facilityTypes/?access_token=68be1238-021f-4126-a676-8fdb7dca0d6d Method: POST Example body: { "code": "codefac", "name": "namefac", "description": "abc" } | | |
4 | Create Schedule URL: http://localhost:8080/api/schedules/?access_token=68be1238-021f-4126-a676-8fdb7dca0d6d Method: POST Example body: { "code": "schedulecode", "description": "desccode", "name": "schedulename" } | | |
5 | Create Period URL: http://localhost:8080/api/periods/?access_token=68be1238-021f-4126-a676-8fdb7dca0d6d Method: POST Example body: { "processingSchedule": { "id": "136e5c30-8bf0-437c-b8b2-7485fbd966c4", "code": "schedulecode", "description": "desccode", "name": "schedulename" }, "name": "periodname", "description": "descperiod", "startDate": "2016-08-10", "endDate": "2016-08-12" } | | |
6 | Create program URL: http://localhost:8080/api/programs/?access_token=68be1238-021f-4126-a676-8fdb7dca0d6d Method: POST Example body:
{ "code": "programcode", "name": "programname", "periodsSkippable": "true" } | | |
7 | Create facility URL: http://localhost:8080/api/facilities/?access_token=68be1238-021f-4126-a676-8fdb7dca0d6d Method: POST Example body: { "code": "facilitycode", "name": "facilityname", "descirption": "abc", "geographicZone": "http://localhost:8080/api/geographicZones/e39d79d7-6c65-47ac-9be5-c4090b40753c", "type": "http://localhost:8080/api/facilityTypes/9ee2532c-3cea-4fbc-8e80-e18548a2365b", "active": "true", "enabled": "true" } | | |
8 | SupervisoryNode. URL: http://localhost:8080/api/supervisoryNodes/?access_token=68be1238-021f-4126-a676-8fdb7dca0d6d Method: POST Example body: { "code": "nodecode", "name": "nodename", "facility": "http://localhost:8080/api/facilities/314e7992-c717-4ae1-89fa-821c15bc2c37" } | | |
9 | Create supplyLine. URL: http://localhost:8080/api/supplyLines/?access_token=68be1238-021f-4126-a676-8fdb7dca0d6d Method: POST Example body: { "supervisoryNode": "http://localhost:8080/api/supervisoryNodes/2e7cce9d-dabd-43ae-9283-05be2471ad21", "program":"http://localhost:8080/api/programs/25946e13-b09e-4417-a074-c61df0834886", "supplyingFacility": "http://localhost:8080/api/facilities/314e7992-c717-4ae1-89fa-821c15bc2c37" } | |