List user's work experience
Endpoint: /api/v2/work-experiences
Method | Action | Parameters |
---|---|---|
GET | List a user's work experience |
|
An example of a return response for a url like /api/v2/work-experiences?&user=12345678
"data": [ // The returned work experience collection
{
"type": "work-experience",
"id": "123456",
"attributes": {
"title": "CTO",
"institution": "Intunex Oy",
"description": "Develop Skillhive.",
"start-year": "2010",
"end-year": null,
"is-current": true,
"linkedin-id": null,
"created-at": "Thu, 10 Aug 2017 11:15:31 +0300",
"updated-at": "Thu, 10 Aug 2017 11:15:31 +0300"
},
"relationships": {
"user": {
"data": {
"type": "users",
"id": "12345678"
}
}
}
},
... // More work experience itms.
],
"meta": {
"total-count": 7 // Total number of items for this user
}
Single work experience items
Endpoint: /api/work-experiences/:workexperience_id
Method | Action | Parameters |
---|---|---|
DELETE | Delete work experience identified by workexperience_id |
N/A |
Add new work experience
Endpoint: /api/v2/work-experiences
Method | Action | Parameters |
---|---|---|
POST | Add new work experience | N/A |
New work experience is added by issuing a POST
request to the api endpoint /api/v2/work-experiences
.
Here's an example request to post:
{
"data": {
"type": "work-experience",
"attributes": {
"title": "CTO",
"institution": "Intunex Oy",
"description": "Develop Skillhive.",
"start-year": "2010",
"end-year": null,
"is-current": true,
"linkedin-id": null,
"created-at": "Thu, 10 Aug 2017 11:15:31 +0300",
"updated-at": "Thu, 10 Aug 2017 11:15:31 +0300"
},
"relationships": {
"user": { // This defines the user whose work experience this is.
"data": {
"type": "users",
"id": "12345678"
}
}
}
}
}
The API endpoint will return a 201 Created
response with all the data for the newly created item.