-
Notifications
You must be signed in to change notification settings - Fork 9
architecture
Note: All endpoints are prefixed by https://interview-evaluations.revaturelabs.com/api/v1/
JSON Object Format:
{
"id": 0,
"name": "string",
"persons": [
{
"firstName": "string",
"id": 0,
"lastName": "string",
"personRole": {
"id": 0,
"title": "string"
}
}
]
}
Endpoint:
batches
Method: POST
Path Variables:
none
JSON Input:
{
"name": "string"
}
OR
{
"name": "string",
"persons": [
{
"id": integer
},
{
"id": integer
}
]
}
Endpoint:
batches/{batchId}/members
Method: POST
Path Variables:
batchId: integer (required - batch must exist)
JSON Input:
[
integer,
integer,
...
]
Endpoint:
batches
Method: GET
Path Variables:
none
Endpoint:
batches/{batchId}/week/{weekNum}
Method: GET
Path Variables:
batchId: integer (required - batch must exist)
weekNum: integer (required - week must be valid)
Endpoint:
batches/{batchId}
Method: PUT
Path Variables:
batchId: integer (required - batch must exist)
JSON Input:
{
"name": "string"
}
OR
{
"name": "string",
"persons": [
{
"id": integer
},
{
"id": integer
}
]
}
Endpoint:
batches/{batchID}
Method: DELETE
Path Variables:
batchId: integer (required - batch must exist)
Endpoint:
batches/{batchId}/members
Method: DELETE
Path Variables:
batchId: Integer (required - batch must exist)
JSON Object Format:
{
"batch": {
"id": 0,
"name": "string"
},
"comments": [
{
"commentText": "string",
"id": 0
}
],
"date": "2017-03-09",
"evalType": {
"description": "string",
"id": 0
},
"id": 0,
"questions": [
{
"comments": [
{
"commentText": "string",
"id": 0
}
],
"communicationScore": 0,
"id": 0,
"knowledgeScore": 0,
"questionPool": {
"dateLastUsed": "2017-03-09",
"id": 0,
"maxCommunicationScore": 0,
"maxKnowledgeScore": 0,
"questionText": "string",
"subjectId": {
"id": 0,
"subject": "string"
},
"useCount": 0
}
}
],
"trainee": {
"firstName": "string",
"id": 0,
"lastName": "string",
"personRole": 0
},
"week": 0
}
Endpoint:
evaluations
Method: POST
PathVariables:
none
JSON Input:
{
"batch": {
"id": integer (required)
},
"evalType": {
"id": integer (required)
},
"trainee": {
"id": integer (required)
},
"week": integer (required)
}
Endpoint:
evaluations/{id}
Method: GET
Endpoint:
evaluations/trainees/{traineeId}
Method: GET
PathVariables:
traineeId: Integer (required - trainee must exist)
Endpoint:
evaluations/trainees/{traineeId}/week/{weekNumber}
Method: GET
PathVariables:
traineeId: Integer (required - trainee must exist)
weekNumber: Integer (required - eval for indicated week must exist)
Endpoint:
evaluations/{evalId}
Method: PUT
PathVariables:
evalId: Integer (required - eval must exist)
JSON Input:
{
"batch": {
"id": integer
}
"evalType": {
"id": integer
},
"trainee": {
"id": integer
},
"week": integer
}
Endpoint:
evaluations/{evalId}
Method: DELETE
PathVariables:
evalId: Integer (required - eval must exist)
JSON Object Format:
{
"id": integer,
"firstName": "string",
"lastName": "string",
"personRole": {
"id": integer,
"title": "string"
}
}
Endpoint:
persons
Method: POST
PathVariables:
none
JSON Input:
{
"firstName": "string", (required)
"lastName": "string", (required)
"personRole": {
"id": integer (required)
}
}
Endpoint:
persons/{personId}
Method: GET
PathVariables:
personId: Integer (required - person must exist)
Endpoint:
persons/
Method: GET
PathVariables:
none
Endpoints:
persons?firstname={firstname}
or
persons?lastname={lastname}
or
persons?firstname={firstname}&lastname={lastname}
Method: GET
PathVariables:
firstname: String (required - person must exist)
lastname: String (required - person must exist)
Endpoint:
persons?role={role}
Method: GET
PathVariables:
role: String (required - role must be trainee or trainer)
Endpoint:
persons/{personId}
Method: PUT
PathVariables:
personId: Integer (required - person must exist)
JSON Input:
{
"firstName": "string",
"lastName": "string",
"personRole": {
"id": integer
}
}
Endpoint:
persons/{personId}
Method: DELETE
PathVariables:
personId: Integer (required - person must exist)
JSON Object Format:
[
{
"dateLastUsed": "2017-03-07",
"id": 0,
"maxCommunicationScore": 0,
"maxKnowledgeScore": 0,
"questionText": "string",
"subjectId": {
"id": 0,
"subject": "string"
},
"useCount": 0
}
]
Endpoint:
questions
Method: POST
PathVariables:
none
JSON Input:
{
"maxCommunicationScore": 20, (required - must be positive)
"maxKnowledgeScore": 20, (required - must be positive)
"questionText": "What is....?", (required)
"subject": {"id": 1} (required - subject must exist)
}
Endpoint:
questions
Method: GET
Endpoints:
questions/search?searchText={question text}
or
questions/search?subject={subject name}
Method: GET
Endpoint:
questions/{questionId}
Method: PUT
PathVariables:
questionId: Integer (required - question must exist)
JSON Input:
{
"maxCommunicationScore": integer, (required - must be positive)
"maxKnowledgeScore": integer, (required - must be positive)
"questionText": "string", (required)
"subject": {
"id": integer (required - subject must exist)
}
}
Endpoint:
questions/{questionId}
Method: DELETE
PathVariables:
questionId: Integer (required - question must exist)
Endpoint:
evaluations/{evalId}/comments
Method: POST
PathVariables:
evalId: Integer (required - eval must exist)
JSON Input:
{
"commentText": "Eval Comment Text" (required)
}
Endpoint:
evaluations/{evalId}/comments/{commentId}
Method: PUT
PathVariables:
evalId: Integer (required - eval must exist)
commentId: Integer (required - comment must exist)
JSON Input:
{
"commentText": "Eval Comment Text" (required)
}
Endpoint:
evaluations/{evalId}/comments/{commentId}
Method: DELETE
PathVariables:
evalId: Integer (required - eval must exist)
commentId: Integer (required - comment must exist)
Endpoint:
evaluations/{evalId}/questions/{questionId}/comments
Method: POST
PathVariables:
evalId: Integer (currently ignored - included in url for consistency)
questionId: Integer (required - question eval must exist)
JSON Input:
{
"commentText": "Question Comment Text" (required)
}
Endpoint:
evaluations/{evalId}/questions/{questionId}/comments/{commentId}
Method: PUT
PathVariables:
evalId: Integer (currently ignored - included in url for consistency)
questionId: Integer (required - question eval must exist)
commentId: Integer (required - comment must exist)
JSON Input:
{
"commentText": "Question Comment Text" (required)
}
Endpoint:
evaluations/{evalId}/questions/{questionId}/comments/{commentId}
Method: DELETE
PathVariables:
evalId: Integer (currently ignored - included in url for consistency)
questionId: Integer (required - question eval must exist)
commentId: Integer (required - comment must exist)