BLIP API-documentation

Within the Bolk we save all member information on a LDAP server. The Bolks Leden InformatiePunt (BLIP) offers an easy way to request and use information about the members for use within your application for the association. You can compare it with a Facade pattern.

About BLIP

Security

This is a OAuth2 resource server. The information is secured with OAuth2 via https://auth.debolk.nl/. You need a valid authentication token for every endpoint, you can supply it within a URI: /?access_token=1234. You can also supply it as a header: "Bearer: 1234".

Access

The API is accessible on https://people.i.bolkhuis.nl. It requires internal network access (BolkNet or VPN). https://people.debolk.nl/ is also available, but it has a lot less information accessible. This is mentioned explicitly at the endpoint itself.

Questions or Help?

Do you need help when using BLIP? Contact Jakob, Max or Melody. You can get our contact information from the board.

License

BLIP is available under the GPL3 License. You can find the code on GitHub.

Technical Information

Person

The Person is the basis of the API. You can read, update & create it through the API.

Some information may be non-readable depending on the user: this is personal information which the user opted not to share. However, for administrative reasons, this information is readable by those with the highest permission level.

Attribute Description Always readable Writeable
uidunique user idyesno
hrefURL of the Personyesno
initialsinitialsyesyes
firstnamefirst nameyesyes
surnamesurnameyesyes
nicknamenicknameyesyes
namefull name (incl nickname, if applicable)yesyes
dateofbirthdate of birth (YYYY-MM-DD)noyes
pronounspronouns (e.g.: he/him, she/her, they/them)noyes
emaile-mail addressnoyes
phonephone numbernoyes
phone_emergencyphone number in cases of emergencynoyes
addresshome addressnoyes
inauguration_datedate of inaugurationyesyes
resignation_letter_datedate of receiving letter of resignationyesyes
resignation_datedate of official resignationyesyes
programmestudy programme(s)noyes
institutioninstution(s) they study/ied atnoyes
membershipmembership statusyesyes
ivaif they are allowed to tend the bar by themselvesyesno
deadare they still alive?yesyes
photo_visibleif they would like to share their pictureyesno
avgif they accepted the privacy statementyesno
avg_addressif they allow sharing their addressyesno
avg_dobif they allow sharing their date of birthyesno
avg_institutionif they allow sharing the instution(s) they study atyesno
avg_programmeif they allow sharing their study programme(s)yesno
avg_emailif they allow sharing their e-mail addressyesno
avg_phoneif they allow sharing their phone numberyesno
avg_phone_emergencyif they allow sharing their emergency contactyesno
avg_pronounsif they allow sharing their pronounsyesno

Methods

All API methods only accept and return JSON.

Basic information: uid, href, name, membership, email, avg_email & photo_visible

GET /persons Basic information on all persons

Returns the all users' uid, URL, full name, email and if they allow sharing mail and profile picture.

This endpoint is also available externally: https://people.debolk.nl/persons

OAuth access level

Every user

Parameters

none

Example result

[..., {"uid": "peter", "href": "https://blip.i.bolkhuis.nl/persons/peter", "email": "peter@nieuwedelft.nl", "name": "Peter Dummy", "avg_email": "true": photo_visible: "false"}, ...]
GET /persons/all All information on all persons

Returns all the attributes of all Persons, without the data they specified not to be shared.

OAuth access level

Only members

Parameters

none

Example result

[..., { "uid": "pdummy", "initials": "P", "firstname": "Peter", "surname": "Dummy", "email": "pdummy@debolk.nl", "mobile": "06-123456789", "phone_emergency": "0031229218245", "pronouns": "she/they", "href": "https://people.i.bolkhuis.nl/persons/pdummy", "name": "Peter Dummy", "membership": "lid", "inauguration_date": "2064-09-11", "institution": "TU Delft & Leiden University", "iva": "false", "dead": "false", "photo_visible": "true", "avg": "true", "avg_address": "false", "avg_dob": "false", "avg_institution": "true", "avg_programme": "false", "avg_email": "true", "avg_phone": "true" "avg_phone_emergency": "true", "avg_pronouns": "true" }, ...]
GET /persons/photo Users' profile pictures

Returns the users' profile pictures. Note: to prevent crashing, the server stops processing after 164 pictures have been collected. Clients should implement a method to collect pictures after 164 pictures have been received.

This endpoint is also available externally: https://people.debolk.nl/persons/photo?users={uid1},{uid2},{uid3},...

OAuth access level

Every user

Parameters

users - included in the url

POST /person Create a new Person

Accepts JSON that describes a new user, creates it in the LDAP and returns the data if successful.

OAuth access level

Only the board & the IT team

Parameters

All writeable Person attributes

Example result

{ "uid": "pdummy", "initials": "P", "firstname": "Peter", "surname": "Dummy", "email": "pdummy@debolk.nl", "mobile": "06-123456789", "address": "Buitenwatersloot 1-3\r\n2613 TA, Delft" "phone_emergency": "0031229218245", "dateofbirth": "1960-10-27", "pronouns": "she/they", "href": "https://people.i.bolkhuis.nl/persons/pdummy", "name": "Peter Dummy", "membership": "lid", "inauguration_date": "2064-09-11", "institution": "TU Delft & Leiden University", "programme": "Life, Science & Technology", "iva": "false", "dead": "false", "photo_visible": "true", "avg": "true", "avg_address": "false", "avg_dob": "true", "avg_institution": "true", "avg_programme": "false", "avg_email": "true", "avg_phone": "true" "avg_phone_emergency": "true", "avg_pronouns": "true" }
GET /person/{uid} Basic information about a Person

Returns the basic information about the Person specified. Replace {uid} with their uid.

This endpoint is also available externally: https://people.debolk.nl/person/{uid}

OAuth access level

Every user

Parameters

user id

Example result

{ "uid": "peter", "initials": "P", "email": "pdummy@debol.nl", "href": "https://people.i.bolkhuis.nl/persons/pdummy", "name": "Peter Dummy", "avg_email": "true", "photo_visible": "false" }
DELETE /person/{uid} Delete a Person

Deletes the specified person from the LDAP.

OAuth access level

Only the board & the IT team

Parameters

user id

GET /person/{uid}/all All information about a Person

Returns all the information about a Person.

OAuth access level

Only members

Parameters

user id

Example result

{ "uid": "pdummy", "initials": "P", "firstname": "Peter", "surname": "Dummy", "email": "pdummy@debolk.nl", "mobile": "06-123456789", "address": "Buitenwatersloot 1-3\r\n2613 TA, Delft" "phone_emergency": "0031229218245", "dateofbirth": "1960-10-27", "pronouns": "she/they", "href": "https://people.i.bolkhuis.nl/persons/pdummy", "name": "Peter Dummy", "membership": "lid", "inauguration_date": "2064-09-11", "institution": "TU Delft & Leiden University", "programme": "Life, Science & Technology", "iva": "false", "dead": "false", "photo_visible": "true", "avg": "true", "avg_address": "false", "avg_dob": "true", "avg_institution": "true", "avg_programme": "false", "avg_email": "true", "avg_phone": "true" "avg_phone_emergency": "true", "avg_pronouns": "true" }
GET /person/{uid}/photo User's profile picture

Returns the user's profile picture.

This endpoint is also available externally: https://people.debolk.nl/person/{uid}/photo

OAuth access level

Every user

Parameters

user id

PATCH /person/{uid}/update Update a Person's information

Accepts a JSON that describes the user's new information. Not supplied parameters are ignored.

This endpoint returns the complete new information for the Person.

OAuth access level

Only the board & the IT team

Parameters

All writeable Person attributes

Example result

{ "uid": "pdummy", "initials": "P", "firstname": "Peter", "surname": "Dummy", "email": "pdummy@debolk.nl", "mobile": "06-123456789", "address": "Buitenwatersloot 1-3\r\n2613 TA, Delft" "phone_emergency": "0031229218245", "dateofbirth": "1960-10-27", "pronouns": "she/they", "href": "https://people.i.bolkhuis.nl/persons/pdummy", "name": "Peter Dummy", "membership": "oud lid", "inauguration_date": "2064-09-11", "resignation_letter_date": "2082-10-27", "resignation_date": "2082-11-01" "institution": "TU Delft & Leiden University", "programme": "Life, Science & Technology", "iva": "false", "dead": "false", "photo_visible": "true", "avg": "true", "avg_address": "false", "avg_dob": "true", "avg_institution": "true", "avg_programme": "false", "avg_email": "true", "avg_phone": "true" "avg_phone_emergency": "true", "avg_pronouns": "true" }
PATCH /person/{uid}/password Update a Person's password

Accepts a JSON that describes the user's new password.

OAuth access level

Every user, but only their own password.

Parameters

user id, old_password & new_password

Example result

200 - Successfully changed melody's password.
PATCH /person/{uid}/resetpassword Reset a Person's password

Resets a user's password in the same way as when the account is created.

OAuth access level

Only the Board & the IT team.

Parameters

none

Example result

200 - Successfully reset melody's password.
GET /members Basic information about all members; past & future

Returns the basic information on all Persons with one of the following membership stati: lid, kandidaatlid, oud lid, lid van verdienste, erelid

This endpoint is also available externally: https://people.debolk.nl/members

OAuth access level

Every user

Parameters

none

Example result

[..., { "uid": "peter", "href": "https://people.i.bolkhuis.nl/persons/pdummy", "name": "Peter Dummy", "avg_email": "false", "photo_visible", "true", "membership": "lid" }, ...]
GET /members/all All information on all current members

Returns all information on all Persons with one of the following membership stati: lid, kandidaatlid, oud lid, lid van verdienste, erelid

OAuth access level

Only members

Parameters

none

Example result

[..., { "uid": "pdummy", "initials": "P", "firstname": "Peter", "surname": "Dummy", "email": "pdummy@debolk.nl", "mobile": "06-123456789", "phone_emergency": "0031229218245", "pronouns": "she/they", "href": "https://people.i.bolkhuis.nl/persons/pdummy", "name": "Peter Dummy", "membership": "lid", "inauguration_date": "2064-09-11", "institution": "TU Delft & Leiden University", "iva": "false", "dead": "false", "photo_visible": "true", "avg": "true", "avg_address": "false", "avg_dob": "false", "avg_institution": "true", "avg_programme": "false", "avg_email": "true", "avg_phone": "true" "avg_phone_emergency": "true", "avg_pronouns": "true" }, ...]
GET /members/current Basic information on the current members

Returns the basic information about the current members (lid, kandidaatlid, lid van verdienste, erelid)

This endpoint is also available externally: https://people.debolk.nl/members/current

OAuth access level

Every user

Parameters

none

Example result

[..., { "uid": "peter", "href": "https://people.i.bolkhuis.nl/persons/pdummy", "name": "Peter Dummy", "avg_email": "false", "photo_visible", "true", "membership": "lid" }, ...]
GET /members/former Basic information about the former members

Returns basic information about the past members

OAuth access level

Only members

Parameters

none

Example result

[..., { "uid": "peter", "href": "https://people.i.bolkhuis.nl/persons/pdummy", "name": "Peter Dummy", "avg_email": "false", "photo_visible", "true", "membership": "oud lid" }, ...]
GET /members/candidate Basic information on the candidate members

Return the basic information about the candidate members.

This endpoint is also available externally: https://people.debolk.nl/members/candidate

OAuth access level

Alleen leden

Parameters

none

Example result

[..., { "uid": "peter", "href": "https://people.i.bolkhuis.nl/persons/pdummy", "name": "Peter Dummy", "avg_email": "false", "photo_visible", "true", "membership": "kandidaatlid" }, ...]