| Code | Description |
|---|---|
| 403 | You are not authorized to access this page. |
{
'example_request_params': {
'nonce': '1527500365',
'timestamp': 1527500365052,
'signature': '8aac70c9906ad0812f4fbc34617322f985b4ac978cec861724f142cb572b88ff',
'page': 1
},
'example_response': {
'users': [
{
'id': 1,
'email': 'administrator@proctorexam.com',
'name': 'ProctorExam Administrator',
'role': 'administrator',
'logo_image': '/logo_images/original/missing.png',
'institute_name': 'ProctorExam',
'omniauth_config_id': null
},
{
'id': 2,
'email': 'teacher@proctorexam.com',
'name': 'ProctorExam Teacher',
'role': 'teacher',
'logo_image': '/logo_images/original/missing.png',
'institute_name': 'ProctorExam'
'omniauth_config_id': null
}
]
}
}
| Param name | Description |
|---|---|
|
institute_id required |
ID of the user’s institute. Validations:
|
|
page optional |
Page number, returns LIMIT items per page. The X-Pagination-* HTTP headers contain the information about the total number of items (X-Pagination-Item-Count), the total number of pages (X-Pagination-Page-Count), the current page number (X-Pagination-Page) and the number of items per page (X-Pagination-Limit). Validations:
|
|
limit optional |
Number of items returned per page. Default and maximum value is 300. Validations:
|
|
timestamp required |
Timestamp of the request in milliseconds. Validations:
|
|
nonce required |
Random number unique between the api calls made in the previous 24 hours. Validations:
|
|
signature required |
HMAC sha256 hex encoded hash, using the user secret_key as key, of the query string build with all the other parameters in the format ‘name=value’ joined by ‘?’ and ordered alphabethically by name. Do not use encoding scheme on the values you use to calculate the string Validations:
|
|
sort optional |
Sort by column(s). Stringified JSON constisting of an array of objects with column as key and sorting order as value. Example: sort=[{“column_name”: “asc”}, {“column_name”: “desc”}] Validations:
|
|
filter optional |
Filter by column(s). Stringified JSON consisting of an object with column as key and an object with operator as key and filtering value as value. Example: filter={“column_name”: {“operator”: “value”}} available operators: eq(equal to), gt(greater than), gte(greater than or equal to), lt(less than), lte(less than or equal to), ne(not equal to), in(in), nin(not in) Validations:
|
| Code | Description |
|---|---|
| 404 | Couldn't find User with 'id'=':id' |
| 403 | You are not authorized to access this page. |
{
'example_request_params': {
'nonce': '1527500365',
'timestamp': 1527500365052,
'signature': '8aac70c9906ad0812f4fbc34617322f985b4ac978cec861724f142cb572b88ff'
},
'example_response': {
'user': {
'id': 1,
'email': 'administrator@proctorexam.com',
'name': 'ProctorExam Administrator',
'role': 'administrator',
'logo_image': '/logo_images/original/missing.png',
'institute_name': 'ProctorExam'
}
}
}
| Param name | Description |
|---|---|
|
id required |
ID of the requested user. Validations:
|
|
institute_id required |
ID of the user’s institute. Validations:
|
|
timestamp required |
Timestamp of the request in milliseconds. Validations:
|
|
nonce required |
Random number unique between the api calls made in the previous 24 hours. Validations:
|
|
signature required |
HMAC sha256 hex encoded hash, using the user secret_key as key, of the query string build with all the other parameters in the format ‘name=value’ joined by ‘?’ and ordered alphabethically by name. Do not use encoding scheme on the values you use to calculate the string Validations:
|
| Code | Description |
|---|---|
| 403 | You are not authorized to access this page. |
| 422 | Param is missing or the value is empty: 'param' |
| 422 | 'email':['has already been taken'] |
{
'example_request_params': {
'email':'teacher@institute.com',
'name':'Teacher name',
'password': 'password1',
'password_confirmation': 'password1',
'role':'administrator',
'nonce': '1527500365',
'timestamp': 1527500365052,
'signature': '8aac70c9906ad0812f4fbc34617322f985b4ac978cec861724f142cb572b88ff',
'omniauth_config_id': '1',
},
'example_response': {
'user': {
'id': 7,
'institute_id': 1,
'email': 'teacher@institute.com',
'student_number': null,
'name': 'Teacher name',
'created_at': '2019-01-23T12:05:52.391+01:00',
'updated_at': '2019-01-23T12:05:52.391+01:00',
'role': 'teacher',
'invitation_token': null,
'invitation_created_at': null,
'invitation_sent_at': null,
'invitation_accepted_at': null,
'invitation_limit': null,
'invited_by_id': null,
'invited_by_type': null,
'api_token': 'jq560vN9KZdAdFtOYH5xXw',
'secret_key': 'NNAK4kQK3hveFpuuRMeC-DFRgn0nnUn4XpPSWofvXxY',
'receives_reports': false,
'report_frequency': 'week',
'first_visit_guide': true,
'global_proctor': true,
'global_reviewer': true,
'logo_image': '/logo_images/original/missing.png',
'institute_name': 'ProctorExam',
'omniauth_config_id': '1',
}
}
}
| Param name | Description |
|---|---|
|
email required |
Email of the user. Validations:
|
|
name required |
Name of the user. Validations:
|
|
institute_id required |
ID of the user’s institute. Validations:
|
|
password required |
Password of the user. Has to be at least 8 characters long, contain one lowercase and one uppercase letter, one number, one special character Validations:
|
|
password_confirmation required |
Confirmation of the password. Validations:
|
|
role required |
Role of the user. It can be Proctor, Reviewer, Teacher, Administration or Superuser. Validations:
|
|
omniauth_config_id optional |
ID of the identity provider which can be obtained through identity providers api, leave empty for password authentication. Validations:
|
|
timestamp required |
Timestamp of the request in milliseconds. Validations:
|
|
nonce required |
Random number unique between the api calls made in the previous 24 hours. Validations:
|
|
signature required |
HMAC sha256 hex encoded hash, using the user secret_key as key, of the query string build with all the other parameters in the format ‘name=value’ joined by ‘?’ and ordered alphabethically by name. Do not use encoding scheme on the values you use to calculate the string Validations:
|
| Code | Description |
|---|---|
| 403 | You are not authorized to access this page. |
| 422 | Param is missing or the value is empty: 'param' |
{
'example_request_params': {
'receives_reports':true,
'report_frequency':'week',
'nonce': '1527500365',
'timestamp': 1527500365052,
'signature': '8aac70c9906ad0812f4fbc34617322f985b4ac978cec861724f142cb572b88ff'
},
'example_response': {
'user': {
'id': 7,
'institute_id': 1,
'email': 'teacher@institute.com',
'student_number': null,
'name': 'Teacher name',
'created_at': '2019-01-23T12:05:52.391+01:00',
'updated_at': '2019-01-23T12:05:52.391+01:00',
'role': 'teacher',
'invitation_token': null,
'invitation_created_at': null,
'invitation_sent_at': null,
'invitation_accepted_at': null,
'invitation_limit': null,
'invited_by_id': null,
'invited_by_type': null,
'api_token': 'jq560vN9KZdAdFtOYH5xXw',
'secret_key': 'NNAK4kQK3hveFpuuRMeC-DFRgn0nnUn4XpPSWofvXxY',
'receives_reports': true,
'report_frequency': 'week',
'first_visit_guide': true,
'global_proctor': true,
'global_reviewer': true,
'logo_image': '/logo_images/original/missing.png',
'institute_name': 'ProctorExam',
'omniauth_config_id': null,
}
}
}
| Param name | Description |
|---|---|
|
id required |
ID of the requested user. Validations:
|
|
institute_id required |
ID of the user’s institute. Validations:
|
|
receives_reports optional |
Boolean that defines if the user requires reports. Validations:
|
|
report_frequency optional |
Refers to the user’s desired report frequency. It can be day, week, month. Validations:
|
|
omniauth_config_id optional |
ID of the identity provider which can be obtained through identity providers api, leave empty for password authentication. Validations:
|
|
timestamp required |
Timestamp of the request in milliseconds. Validations:
|
|
nonce required |
Random number unique between the api calls made in the previous 24 hours. Validations:
|
|
signature required |
HMAC sha256 hex encoded hash, using the user secret_key as key, of the query string build with all the other parameters in the format ‘name=value’ joined by ‘?’ and ordered alphabethically by name. Do not use encoding scheme on the values you use to calculate the string Validations:
|
| Code | Description |
|---|---|
| 404 | Couldn't find User with 'id'=':id' |
| 403 | You are not authorized to access this page. |
{
'example_request_params': {
'nonce': '1527500365',
'timestamp': 1527500365052,
'signature': '8aac70c9906ad0812f4fbc34617322f985b4ac978cec861724f142cb572b88ff'
},
'example_response': {}
}
| Param name | Description |
|---|---|
|
id required |
ID of the requested user. Validations:
|
|
institute_id required |
ID of the user’s institute. Validations:
|
|
timestamp required |
Timestamp of the request in milliseconds. Validations:
|
|
nonce required |
Random number unique between the api calls made in the previous 24 hours. Validations:
|
|
signature required |
HMAC sha256 hex encoded hash, using the user secret_key as key, of the query string build with all the other parameters in the format ‘name=value’ joined by ‘?’ and ordered alphabethically by name. Do not use encoding scheme on the values you use to calculate the string Validations:
|