Candidates can upload their own files. At the moment these are limited to images to be attached to resumes (photo and portfolio). On the main site, this service can be found in the settings, "images" section
After that, these images can be used in the interface for creating/editing a resume.
- Get artifacts
- Uploading an artifact
- Conditions for uploading artifacts
- Editing an artifact
- Deleting an artifact
- Attaching a photo/portfolio to a resume
GET /artifacts/photo
GET /artifacts/portfolio
Successful server response is returned with 200 OK
code and contains:
{
"items": [
{
"id": "92278992",
"state": {
"id": "ok",
"name": "ok"
},
"small": "http://...",
"medium": "http://...",
"description": "..."
}
],
"found": 1,
"pages": 1,
"page": 0,
"per_page": 1
}
where for each 'items' element:
Name | Type | Description |
---|---|---|
id | string | unique image ID |
state | object | current image status |
state.id | string | current image status ID |
state.name | string | name of the current image status |
small | string или null | the url for a cropped image or null if the image is not ready yet |
medium | string или null | the url for an average-sized image or null if the image is not ready yet |
description | string | description, currently only for portfolio |
Image statuses:
processing
— in processfailed
— error, probably format not supportedok
— finished, can be used in the resume
403 Forbidden
– current user is not a applicant
POST /artifacts
To upload a file, send a request multipart/form-data
with the following parameters:
Name | Required | Description |
---|---|---|
type | yes | type of artifact: photo or portfolio |
description | no | text description, makes sense for portfolio |
file | yes | file |
Restrictions on file types and size can be found in conditions for uploading artifacts.
Successful response is returned with 201 Created
code and contains:
{
"id": "123456",
"medium": null,
"small": null,
"state": {
"id": "processing",
"name": "in process"
}
}
Response fields are the same as for element fields in the artifacts list.
403 Forbidden
– current user is not a applicant400 Bad Request
– error in request parameters or adding an image impossible413 Request Entity Too Large
– image too large
In addition to the HTTP code, the server can return a description of the error reason.
Artifacts uploading conditions are different for each type.
GET /artifacts/photo/conditions
GET /artifacts/portfolio/conditions
Successful response is returned with 200 OK
code and body:
{
"fields": {
"description": {
"max_length": 255,
"min_length": 0,
"required": false
},
"file": {
"max_size": 6291456,
"mime_type": [
"image/jpeg",
"image/png",
"image/psd"
],
"required": true
},
"type": {
"required": true
}
},
"counters": {
"max": 20,
"uploaded": 2
}
}
Name | Type | Description |
---|---|---|
description | object | conditions for description field |
description.required | boolean | is description field required |
description.max_length | number | max size of description text field |
description.min_length | number | min size of description text field |
file | object | conditions for file field |
file.max_size | number | max file size |
file.mime_type | array | list of allowed files MIME-types |
file.required | boolean | is file field required |
type | object | conditions for type field |
type.required | boolean | is type field required |
Name | Type | Description |
---|---|---|
max | number | maximum number of artifacts of this type |
uploaded | number | number of uploaded artifatcs of this type |
403 Forbidden
– current user is not a applicant
PUT /artifacts/{id}
where id
is the artifact ID.
Accepted parameters:
description
- text description of the image
A successful response contains a code 204 No Content
and is body-less.
403 Forbidden
– current user is not a applicant404 Not Found
– artifact does not exist or does not belong to the current user пользователю400 Bad Request
– error in request parameters or adding an image impossible
DELETE /artifacts/{id}
where id
is the artifact ID.
A successful response contains a code 204 No Content
and is body-less.
403 Forbidden
– current user is not a applicant404 Not Found
– artifact does not exist or does not belong to the current user
To attach uploaded photos to the resume, send the artifact id
to the corresponding resume field.
To delete it from the resume indicate null
.