The method returns list of all action types with Id, Name, Colors (background and font) and Emergency flag.
200 - OK
curl -X GET "http://web.ws.int:8051/api/ActionTypes"
GET /api/ActionTypes HTTP/1.1
Host: web.ws.int:8051
Status | 200 OK |
---|---|
|
The method returns data about the Truck corresponding to a specific competitor.
Data about the Truck includes Id, Number, Type name, Vendor name, Model name, last data about location (latitude and longitude) and list of drivers. Data about the Driver includes Id, Full name, Date of birth, Phone and possible Medical health restrictions.
200 - OK
404 - No Truck found
curl -X GET "http://web.ws.int:8051/api/CurrentTruck?competitorId=1"
GET /api/CurrentTruck?competitorId=1 HTTP/1.1
Host: web.ws.int:8051
Status | 200 OK |
---|---|
|
Status | 404 Not Found |
---|
The method returns data about current transport task for the Truck, including Id, Created date and time, Deadline, information about Arrival and Destination Logistics Centers.
Data about each Logistics Center includes the Name of the center, text description of Address and its coordinates (latitude and longitude).
200 - OK
404 - No Transport task found
curl -X GET "http://web.ws.int:8051/api/CurrentTransportTask?truckNumber=C958HX13"
GET /api/CurrentTransportTask?truckNumber=C958HX13 HTTP/1.1
Host: web.ws.int:8051
Status | 200 OK |
---|---|
|
Status | 404 Not Found |
---|
The method returns list of road actions (ordered by start date time from oldest to newest) for last transport task of specific truck.
If current transport task doesn’t have any road actions yet, you need to create them using Timeline rules from Test Project Description and then this method will return new road actions.
Each road action contains Unique Id, Action type identifier, start date time, possible driver full name, possible comment, possible place description and coordinates (latitude and longitude).
If you need to remove all road actions for current task, you can use ClearTransportTask method described in postman collection.
200 - OK
404 - No Transport task found
curl -X GET "http://web.ws.int:8051/api/RoadActions?truckNumber=C958HX13"
GET /api/RoadActions?truckNumber=C958HX13 HTTP/1.1
Host: web.ws.int:8051
Status | 200 OK |
---|---|
|
Status | 404 Not Found |
---|
The method POSTs SOS road emergency action for specific truck with current coordinates (latitude and longitude).
The truck can send a SOS signal, only when executing a specific transport task.
The encouraging message with registered road action ID should be returned.
201 - Successfully created
400 - Invalid coordinates
400 - No actual Transport Task
curl -X POST "http://web.ws.int:8051/api/RoadActions/SOS?truckNumber=C958HX13&lat=54.66454&lng=45.77453"
POST /api/RoadActions/SOS?truckNumber=C958HX13&lat=54.66454&lng=45.77453 HTTP/1.1
Host: web.ws.int:8051
Status | 201 Created |
---|---|
|
Status | 400 Bad Request |
---|---|
|
Status | 400 Bad Request |
---|---|
|
The method POSTs road emergency action for specific truck for the current date and time.
Body json parameter should contain Road Action object with the following necessary data: emergency action type identifier and transport task identifier. The following data can be added optionally: place description (max 100 symbols), driver identifier, comment and location coordinates (necessary both latitude in range from -90 to 90 and longitude in range from -180 to 180).
The registered road action data should be returned which includes ID param.
201 - Successfully created
400 - No body road action
400 - Invalid Action type
400 - Invalid Transport Task
400 - Invalid Driver identifier
400 - Invalid coordinates
400 - Long place description
curl -X POST -d '{
"ActionTypeId": 4,
"PlaceDescription": "Near the tall tree in the forest",
"TransportTaskId": 6,
"DriverId": 33,
"Comment": "Replacing the right front wheel",
"PlaceLatitude": 14.66443,
"PlaceLongitude": 34.7757
}' "http://web.ws.int:8051/api/RoadActions"
POST /api/RoadActions HTTP/1.1
Host: web.ws.int:8051
{
"ActionTypeId": 4,
"PlaceDescription": "Near the tall tree in the forest",
"TransportTaskId": 6,
"DriverId": 33,
"Comment": "Replacing the right front wheel",
"PlaceLatitude": 14.66443,
"PlaceLongitude": 34.7757
}
Status | 201 Created |
---|---|
|
Status | 201 Created |
---|---|
|
Status | 400 Bad Request |
---|---|
|
Status | 400 Bad Request |
---|---|
|
Status | 400 Bad Request |
---|---|
|
Status | 400 Bad Request |
---|---|
|
Status | 400 Bad Request |
---|---|
|
Status | 400 Bad Request |
---|---|
|
The method POSTs photo, attached to the road action. The method contains path parameter - Identifier of the road action. /api/RoadActions/Photo/{Id}, where {Id} is “174”, for example.
Pay attention to request Content-Type and name of form-data param.
200 - OK
400 - Bad request (no file param)
409 - No RoadAction with this ID
curl -X POST "http://web.ws.int:8051/api/RoadActions/Photo/174"
POST /api/RoadActions/Photo/174 HTTP/1.1
Host: web.ws.int:8051
Status | 200 OK |
---|
Status | 400 Bad Request |
---|---|
|
Status | 409 Conflict |
---|
The method changes information about the Transport Task, clearing its all road actions data.
The method contains path parameter - Transport Task identifier. /api/ClearTransportTask/{id}, where {id} is “6”, for example.
Competitors can clear only actions, that refers to his specific truck and transport task. Access is verified with competitor’s password in query parameter.
204 - OK, no content
401 - Unauthorized
404 - No Transport task found
curl -X PUT "http://web.ws.int:8051/api/ClearTransportTask/6?password=competitor_password"
PUT /api/ClearTransportTask/6?password=competitor_password HTTP/1.1
Host: web.ws.int:8051
Status | 204 No Content |
---|
Status | 404 Not Found |
---|
Status | 401 Unauthorized |
---|