Uploading Video Answer¶
After the candidate authenticates, he can start uploading video answer to his Project’s Questions.
In order to upload a video answer, the candidate must advance his status
into interviewing.
After advancing his status to interviewing, the candidate can use the questions details url
to publish the video answer.
These are the steps the candidate must take to upload a video answer:
- Login (and thus, obtain a token)
- Advance his status to
interviewing - Load the interview questions
- Upload the video answer to each question
The request to upload a video answer, a post request must be sent to each video answer endpoint of each question.
The video answer endpoint can be built from the question detail endpoint adding answervideos/ to
the end of the URL.
Example:¶
Note
The following example assumes the candidate already have status set to interviewing
Getting question list:
curl -X GET \
-H "Authorization: Token 1dc548e7f6d649fd51f39e16fc619e2f9c02ae05" \
'https://interview-suite.com/api/v3/companies/1/projects/13/questions/'
{
"meta": {
"total_count": 1,
"previous": null,
"next": null
},
"objects": [
{
"resource_uri": "https://interview-suite.com/api/v3/companies/1/projects/13/questions/22/",
"id": 22,
"text": "Tell us about you",
"backgroundtext": "",
"position": 1,
"preparationtime": "04:00:00",
"timelimit": "04:00:00",
"public": false,
"has_answer": false,
"criteria": [
],
"project": "https://interview-suite.com/api/v3/companies/1/projects/13/",
"last_modified": "2016-11-02T09:52:27Z"
}
]
}
Uploading a video (the candidate’s authorization token is used to identify to which candidate the video belongs):
curl -X POST \
-H "Authorization:Token 1dc548e7f6d649fd51f39e16fc619e2f9c02ae05" \
-H "Content-Type:multipart/form-data" \
-F "video=@video-file.mp4" \
'https://interview-suite.com/api/v3/companies/1/projects/13/questions/22/answervideos/'
{
"resource_uri": "https://interview-suite.com/api/v3/companies/1/projects/13/questions/22/answervideos/27/",
"filename": "answer-13-22-5f1d1daa0210309fd84ace545a0b7452.video",
"id": 27,
"candidate": "https://interview-suite.com/api/v3/companies/1/projects/13/candidates/64/",
"video_conversion_id": null,
"video_conversion_status": "converting",
"question": "https://interview-suite.com/api/v3/companies/1/projects/13/questions/22/",
"streams": {
"mp4": "https://interview-suite.com/api/v3/companies/1/projects/13/questions/22/answervideos/27/video/IjFkYzU0OGU3ZjZkNjQ5ZmQ1MWYzOWUxNmZjNjE5ZTJmOWMwMmFlMDUi.CxW0aw.b9kXaKroqkcBsylmcweHlWQtHiw.mp4",
"flv": "https://interview-suite.com/api/v3/companies/1/projects/13/questions/22/answervideos/27/video/IjFkYzU0OGU3ZjZkNjQ5ZmQ1MWYzOWUxNmZjNjE5ZTJmOWMwMmFlMDUi.CxW0aw.b9kXaKroqkcBsylmcweHlWQtHiw.flv"
},
"poster": "https://interview-suite.com/api/v3/companies/1/projects/13/questions/22/answervideos/27/poster/IjFkYzU0OGU3ZjZkNjQ5ZmQ1MWYzOWUxNmZjNjE5ZTJmOWMwMmFlMDUi.CxW0aw.b9kXaKroqkcBsylmcweHlWQtHiw",
"attempts": 1
}