Introduction

This API is responsible for storing WorldSkills people. A person can have multiple positions.

Authentication

If the resource requires authorization, a Bearer access token needs to be sent with the Authorization header. The token can be obtained through the authentication process.

GET /people HTTP/1.1
Authorization: Bearer ABCD-EFGH-1234-5678

Uploading Person Image

First upload the image to the Images API:

curl -X POST \
  "https://api.worldskills.org/images" \
  -H "Authorization: Bearer ABCD-EFGH-1234-5678"
  -H "Accept: application/json"
  -H 'Content-Type: multipart/form-data; charset=utf-8; boundary=__BOUNDARY__' \
  -F "file=@photo.jpg"

This will return the image ID and its thumbnail hash which will be used later.

{
  "id": 98765,
  "filename": "photo.jpg",
  "width": 600,
  "height": 800,
  "size": 20000,
  "thumbnail_hash": "9d7e4d20-3dad-4a07-8a18-ac5a2044474d",
  "type": "image/jpeg"
}

Then find the person ID by searching with their email address:

curl "https://people/person/autocomplete?e=clark.kent%40example.org" \
  -H "Authorization: Bearer ABCD-EFGH-1234-5678" \
  -H "Accept: application/json"

The response contains the Person ID which can be used in the following requests.

{
  "people": [
    {
      "id": 123456,
      "first_name": "Clark",
      "last_name": "Vogler",
      "email": "clark.kent@example.org",
      "gender": null,
      "date_of_birth": null
    }
  ]
}

Finally assign the uploaded image to the person with the image type TEAM:

curl -X POST \
  "https://api.worldskills.org/people/person/123456/image" \
  -H "Authorization: Bearer ABCD-EFGH-1234-5678" \
  -H "Accept: application/json" \
  -H 'Content-Type: application/json' \
  -d '{"image_id": 98765, "thumbnail_hash": "9d7e4d20-3dad-4a07-8a18-ac5a2044474d","type":"TEAM"}'

Loading API reference…