Skip to end of metadata
Go to start of metadata

Gereserveeerd door HS Leiden (Mark/Jaqueline).  Icm "ingelogd gebruiker"

Opvragen van de telefoongids van een instelling. 

Authenticatie nodig: afhankelijk van policy instelling (?) ?(zijn er instellingen die deze informatie publiek willen hebben?) (Ja. Zo heeft Universiteit Leiden een optie voor zoeken op naam. Daarbij wordt van studenten de naam, e-mailadres en opleiding getoond aan publieke bezoekers van de site. ) Voorstel: listing is publiek toegankelijk. Details opvragen vereist een inlog.

 

Listing students or employees

Baseurl students

https://<domain>/<version>/students

Baseurl employees

https://<domain>/<version>/employees

HTTP methods

GET

Supported

PUT, POST, PATCH, DELETE

Not supported

Parameters

/<part-of-lastname>

text, required

searchcriterium, minimal 2 characters, only UTF-8 characters

?max=<num>

int, optional

max # results for paging

&offset=<num>

int, optional

start position for paging, 0-based

Errors/states

200

ok

request succeeded

400

bad request

generic error on client side

403

forbidden

no authorization has been done, or authorized user has no access

404

not found

 

no result found for param

 

500

internal server error

generic error on server side

Output

total

required

Total # results

listname

required

Name as used in lists, LastName, Initials, example: Doe, J

lastname

required

 

uri

required

Link to more details of this person. A random id is used as identifier. Example: https://apis.hsleiden.nl/v1/students/id/1

next

optional

Link for paging, only if max and offset parameters are provided, only provided if there are more results

previous

optional

Link for paging, only if max and offset parameters are provided, only provided if there are previous results

Example

GET /v1/students/du?max=1&offset=0
Host: devapi.hsleiden.nl
Accept: application/json
HTTP/1.1 200 OK
Content-Type:application/json
Transfer-Encoding:chunked
Date:Thu,01Aug201312:05:26GMT


{
    "next":"http://localhost:443/WebapisServices/v1/employees/du?max=1&offset=1",
    "employees":{
        "id":"1",
        "lastname":"Duck",
        "listname":"Duck,K",
        "uri":"http://localhost:443/WebapisServices/v1/employees/id/1"
    },
    "total":"3"
}

Details of student or employees

Baseurl students

https://<domain>/<version>/students 

Baseurl employees

https://<domain>/<version>/employees 

HTTP methods

GET

Supported

PUT, POST, PATCH, DELETE

Not supported

Parameters

/<id>

text, optional, one of parameters is required

a random id only used for this query. Requested trough https://<domain>/<version>/students/<part-of-lastname> or /employees/<part-of-lastname>

/@me

text, optional

indicator for logged in user asking his own details. SAML attributes uid and homeorganisation are used for identification

Errors/states

200

ok

request succeeded

400

bad request

generic error on client side

403

forbidden

no authorization has been done, or authorized user has no access

404

not found

no result found for param

500

internal server error

generic error on server side

 

 

 

Output

lastname

required

 

givenname

optional

 

listname

required

 

gender

optional

 

inserts

optional

 

organisation

optional

 

emailaddress

optional

employee only

phonenumberhl

optional

employee only

mobilehl

optional

employee only

location

optional

employee only

functiondescription

optional

employee only

employeenumber

optional

employee only

department

optional

employee only

studentnumber

optional

student only

cluster

optional

student only

education

optional

student only

klas

optional

student only

 

 

 

Example
GET /v1/students/id/1
Host: devapi.hsleiden.nl
Accept: application/json
HTTP/1.1 200 OK
Content-Type: application/json
Transfer-Encoding: chunked
Date: Thu, 01 Aug 2013 12:31:18 GMT

{
    "department":"Docenten ed.",
    "emailaddress":"duck.k@hsleiden.nl",
    "employeenumber":"12345",
    "functiondescription":"Docent",
    "gender":"v",
    "givenname":"Katrien",
    "lastname":"Duck",
    "listname":"Duck, K",
    "location":"kamer 10",
    "mobilehl":"1234",
    "organisation":"hsleiden.nl",
    "phonenumberhl":"1234"
}
Older

Voorstel: https://api.example.edu/v0/directory/people/search

De response is een json-object met daarin record van personen.  Attributen (naam, telefoon, etc) van de persoon worden uitgedrukt met hun LDAP-namen (RFC4519)

Voorbeeld:

GET https://api.example.edu/v0/directory/people/search?q=piet
200 OK
{
  "status": "ok",
  "numresults": 2,
  "results": [
    {
      "givenName": "Jan",
      "sn": "Pietersen",
      "telephoneNumber": "010-1234567"
    },
    {
      "givenName": "Kees",
      "sn": "Pietersen",
      "telephoneNumber": "010-7654321"
    }
  ]
}

Voorbeelden

Avans:

https://<endpoint>/<version>/phonedirectory/<search>/

Zoekt naar de (telefoongids-)gegevens van de persoon waarvan <search> voorkomt in:

  • inlognaam
  • voornaam
  • achternaam
  • afdeling
  • emailadres
  • telefoonnummer

De zoekopdracht is minimaal 4 karakters lang

Hogeschool Leiden:

Er is geen echte telefoongids, maar wel informatie die in een telefoonboek kan worden gebruikt.

Zoeken en opvragen detailgegevens voor studenten of medewerkers.

https://<endpoint>/apis/<version>/student/...

https://<endpoint>/apis/<version>/student/id/...

https://<endpoint>/apis/<version>/employee/...

https://<endpoint>/apis/<version>/employee/id/...

De zoekopdracht is minimaal 2 karakters lang.

Resultaatset geeft:

  • inlognaam
  • voornaam
  • achternaam
  • displayname
  • emailadres
  • opleiding (student)
  • afdeling of cluster (medewerker)
  • telefoonnummer (medewerker)
  • (verdere details van de betreffende persoon worden getoond indien de gegevens zijn vrijgegeven door de persoon zelf.)
  • No labels

1 Comment

  1. Om breder inzetbaar te zijn dient de baseurl te worden aangepast. Het voorstel is om de volgende baseurl's te gebruiken: