-
Notifications
You must be signed in to change notification settings - Fork 0
API's page
clasky edited this page Mar 31, 2015
·
16 revisions
- DESCRIPTION: Gets all tours for the current users company.
- URL: "api/tours"
- TYPE: "get"
- RESPONSE:
[
{
"id": 121,
"ownerId": 1,
"startDate": "2015-05-21",
"startTime": "14:30:00",
"tourTypeId": 3,
"statusId": 1,
"resources": [],
"tourGroups": []
},
{
"id": 123,
"ownerId": 1,
"startDate": "2015-05-21",
"startTime": "13:30:00",
"tourTypeId": 3,
"statusId": 1,
"resources": [
{
"id": 6,
"name": "Private Dining Room #4",
"startTime": "14:30:00",
"startDate": "2015-05-21",
"capacity": 24,
"ownerId": 1,
"tourId": 123,
"duration": 90,
"statusId": 1
}
],
"tourGroups": [
{
"id": 1174,
"portageId": 282,
"tourId": 123,
"groupSize": 12,
"settled": false
}
]
}
]- DESCRIPTION: Gets all portages.
- URL: "api/portages"
- TYPE: "get"
- RESPONSE:
[
{
"id": 534,
"cruiseShipId": 29,
"passengerCount": 2000,
"dock": 3,
"name": "Solstice",
"arrivalDate": "2015-05-03",
"arrivalTime": "07:00:00",
"departureDate": "2015-05-03",
"departureTime": "16:00:00",
"allAboard": "15:30:00",
"voyage": "",
"location": "Ketchikan"
},
{
"id": 535,
"cruiseShipId": 29,
"passengerCount": 2000,
"dock": 3,
"name": "Solstice",
"arrivalDate": "2015-05-10",
"arrivalTime": "07:00:00",
"departureDate": "2015-05-10",
"departureTime": "16:00:00",
"allAboard": "15:30:00",
"voyage": "",
"location": "Ketchikan"
}
]- DESCRIPTION: Gets all resources for the current users company.
- URL: "api/resources"
- TYPE: "get"
- RESPONSE:
[
{
"id": 1,
"name": "Miss Patricia",
"startTime": "09:30:00",
"startDate": "2015-05-01",
"capacity": 44,
"ownerId": 1,
"tourId": 3,
"duration": 90,
"statusId": 1
},
{
"id": 1,
"name": "Miss Patricia",
"startTime": "11:30:00",
"startDate": "2015-05-01",
"capacity": 44,
"ownerId": 1,
"tourId": 4,
"duration": 90,
"statusId": 1
}
]- DESCRIPTION: Gets resources for the current users company on a specific day.
- URL: "api/resources/2015-05-01"
- TYPE: "get"
- RESPONSE:
[
{
"id": 1,
"name": "Miss Patricia",
"startTime": "09:30:00",
"startDate": "2015-05-01",
"capacity": 44,
"ownerId": 1,
"tourId": 3,
"duration": 90,
"statusId": 1
},
{
"id": 1,
"name": "Miss Patricia",
"startTime": "11:30:00",
"startDate": "2015-05-01",
"capacity": 44,
"ownerId": 1,
"tourId": 4,
"duration": 90,
"statusId": 1
}
]- DESCRIPTION: User login.
- URL: "api/login"
- TYPE: "post"
- REQUEST BODY:
{
"username":"test@gmail.com",
"password":"8901",
"companyId": 1
}-
RESPONSE: X-AUTH-TOKEN in response header.
-
DESCRIPTION: Creates an user.
-
URL: "api/user"
-
TYPE: "post"
-
REQUEST BODY:
{
"username":"test@gmail.com",
"password":"8901",
"companyId": 1
}- RESPONSE:
{
"id": 45,
"companyId": 1,
"expires": 0,
"username": "test@gmail.com",
"password": "$2a$10$IvFAOSRK8dT23QTeea4C6OWJFMAIYFYTUQi323ueyY1gz5/2GI3hO",
"authorities": [
{
"user": null,
"authority": "user"
}
]
}