// Here are some examples for post requests
// creating a new user POST http://localhost:8764/api/user Authorization: Basic <put your token here> Content-Type: application/json
- {
- "email": "example", "password": "example", "isAdmin": 1, "isPlanner": 0, "isStatist": 0
}
### // logging in with registered user and getting token POST http://localhost:8764/api/user/login Content-Type: application/json
- {
- "email": "admin", "password": "admin"
}
### POST http://localhost:8764/api/subject Authorization: Basic <put your token here> Content-Type: application/json
- {
- "name": "Data structures", "groupSize": 25, "groupCount": 2, "sessionLength": "02:30:00", "sessionCount": 2, "area": 35, "programId": 3030, "programName": "Avoin Kampus", "spaceTypeId": 5002, "spaceTypeName": "Luentoluokka"
}
### POST http://localhost:8764/api/department Authorization: Basic <put your token here> Content-Type: application/json
- {
- "name": "IT", "description": "Information technology"
}
### POST http://localhost:8764/api/program Authorization: Basic <put your token here> Content-Type: application/json
- {
- "name": "Dance Dance and Dance", "departmentId": 124
}
### POST http://localhost:8764/api/space Authorization: Basic <put your token here> Content-Type: application/json
- {
- "name": "Meeting Room B", "area": 50.5, "info": "A spacious meeting room for team meetings.", "personLimit": 20, "buildingId": 401, "availableFrom": "08:00:00", "availableTo": "18:00:00", "classesFrom": "09:00:00", "classesTo": "17:00:00", "inUse": true, "spaceTypeId": 5001
}