Umapi API documentation version v1
https://kosapi.fit.cvut.cz/usermap/v1
People
Get a paged collection of people. Note: More metadata about the collection (total number of entries etc.) will be added in v2.
get /people
Get a paged collection of people. Note: More metadata about the collection (total number of entries etc.) will be added in v2.
Query Parameters
- query: (string)
A RSQL query. See RSQL documentation for more information.
Example:
lastName==Flyn*;roles=in=(B-18000-ZAMESTNANEC,B-13000-ZAMESTNANEC)
- orderBy: (string)
A comma-separated list of the fields to order by, optionally prefixed with
-
for a descending order (default is ascending).Example:
name,-year
- limit: (integer - default: 10 - minimum: 1)
The maximal number of entries in collection to return.
- offset: (integer - default: 0 - minimum: 0)
Offset of the first entry in collection.
- allOfRoles: (string)
A comma-separated list of the roles that people MUST have.
DEPRECATED: Use
query
parameter instead, e.g.query=roles=all=(B-18000-ZAMESTNANEC,B-18000-STUDENT)
. - anyOfRoles: (string)
A comma-separated list of the roles that people MAY have (i.e. at least one of the roles).
DEPRECATED: Use
query
parameter instead, e.g.query=roles=any=(B-18000-ZAMESTNANEC,B-18000-STUDENT)
. - noneOfRoles: (string)
A comma-separated list of the roles that people MUST NOT have.
DEPRECATED: Use
query
parameter instead, e.g.query=roles=out=(B-18000-ZAMESTNANEC,B-18000-STUDENT)
. - name: (string)
Search people by name, ignores case and diacritic. This feature is designed to be used for an autocomplete.
DEPRECATED: Use
query
parameter instead, e.g.query=name=='flyn ke'
Example:
flyn ke
HTTP status code 200
Body
Type: application/json
Example:
[
{
"username": "flynn",
"personalNumber": 123456,
"firstName": "Kevin",
"lastName": "Flynn",
"fullName": "Ing. Kevin Flynn, CSc.",
"emails": [
"flynn@fit.cvut.cz",
"kevin.flynn@fit.cvut.cz"
],
"preferredEmail": "kevin.flynn@fit.cvut.cz",
"departments": [
{
"code": 18927,
"nameCs": "Oddělení pro rozvoj",
"nameEn": "Office of Development"
}
],
"rooms": [
"TH:A-1324"
],
"phones": [
"420224355555"
],
"roles": [
"B-00000-ZAMESTNANEC-HPP",
"B-00000-ZAMESTNANEC-NEAKADEMICKY",
"B-00000-ZAMESTNANEC",
"B-18000-ZAMESTNANEC-HPP",
"B-18000-ZAMESTNANEC-NEAKADEMICKY",
"B-18000-ZAMESTNANEC",
"B-18927-ZAMESTNANEC-HPP-NEAKADEMICKY"
]
}
]
Secured by oauth_2_0
Headers
- Authorization: ()
Used to send a valid OAuth 2 access token. Do not use with the "access_token" query string parameter.
HTTP status code 401
Bad or expired token. This can happen if the user or OAAS revoked or expired an access token. To fix, you should request a new token.
HTTP status code 403
Bad OAuth request (wrong consumer key, bad nonce, expired timestamp...).
get /people/{username}
URI Parameters
- username: required (string)
Username of the person.
HTTP status code 200
Body
Type: application/json
Example:
{
"username": "flynn",
"personalNumber": 123456,
"firstName": "Kevin",
"lastName": "Flynn",
"fullName": "Ing. Kevin Flynn, CSc.",
"emails": [
"flynn@fit.cvut.cz",
"kevin.flynn@fit.cvut.cz"
],
"preferredEmail": "kevin.flynn@fit.cvut.cz",
"departments": [
{
"code": 18927,
"nameCs": "Oddělení pro rozvoj",
"nameEn": "Office of Development"
}
],
"rooms": [
"TH:A-1324"
],
"phones": [
"420224355555"
],
"roles": [
"B-00000-ZAMESTNANEC-HPP",
"B-00000-ZAMESTNANEC-NEAKADEMICKY",
"B-00000-ZAMESTNANEC",
"B-18000-ZAMESTNANEC-HPP",
"B-18000-ZAMESTNANEC-NEAKADEMICKY",
"B-18000-ZAMESTNANEC",
"B-18927-ZAMESTNANEC-HPP-NEAKADEMICKY"
]
}
Secured by oauth_2_0
Headers
- Authorization: ()
Used to send a valid OAuth 2 access token. Do not use with the "access_token" query string parameter.
HTTP status code 401
Bad or expired token. This can happen if the user or OAAS revoked or expired an access token. To fix, you should request a new token.
HTTP status code 403
Bad OAuth request (wrong consumer key, bad nonce, expired timestamp...).
This resource is intended for a quick check whether the person has or has not certain roles. When the specified condition (see query parameters) is true, then it returns status 200, otherwise 404.
head /people/{username}/roles
This resource is intended for a quick check whether the person has or has not certain roles. When the specified condition (see query parameters) is true, then it returns status 200, otherwise 404.
URI Parameters
- username: required (string)
Username of the person.
Query Parameters
- all: (string)
A comma-separated list of the roles that person must have.
Example:
B-18000-STUDENT,B-00000-ZAMESTNANEC
- any: (string)
A comma-separated list of the roles from which the person must have at least one.
Example:
B-18000-STUDENT,B-00000-ZAMESTNANEC
- none: (string)
A comma-separated list of the roles that person must not have.
Example:
B-18000-STUDENT,B-00000-ZAMESTNANEC
Secured by oauth_2_0
Headers
- Authorization: ()
Used to send a valid OAuth 2 access token. Do not use with the "access_token" query string parameter.
HTTP status code 401
Bad or expired token. This can happen if the user or OAAS revoked or expired an access token. To fix, you should request a new token.
HTTP status code 403
Bad OAuth request (wrong consumer key, bad nonce, expired timestamp...).
Get an official photo of the person. API currently provides only public photos of employees (i.e. person explicitly set his photo in Usermap as public).
get /people/{username}/photo
Get an official photo of the person. API currently provides only public photos of employees (i.e. person explicitly set his photo in Usermap as public).
URI Parameters
- username: required (string)
Username of the person.
Secured by oauth_2_0
Headers
- Authorization: ()
Used to send a valid OAuth 2 access token. Do not use with the "access_token" query string parameter.
HTTP status code 401
Bad or expired token. This can happen if the user or OAAS revoked or expired an access token. To fix, you should request a new token.
HTTP status code 403
Bad OAuth request (wrong consumer key, bad nonce, expired timestamp...).
Roles
Get a paged collection of business and technical roles. For more information about role see this page (in Czech). Note: More metadata about the collection (total number of entries etc.) will be added in v2.
get /roles
Get a paged collection of business and technical roles. For more information about role see this page (in Czech). Note: More metadata about the collection (total number of entries etc.) will be added in v2.
Query Parameters
- limit: (integer - default: 10 - minimum: 1)
The maximal number of entries in collection to return.
- offset: (integer - default: 0 - minimum: 0)
Offset of the first entry in collection.
HTTP status code 200
Body
Type: application/json
Example:
[
{
"code": "B-00000-ZAMESTNANEC",
"descriptionCs": "zaměstnanec",
"descriptionEn": "employee",
"orgUnit": 0,
"type": "BUSINESS"
}, {
"code": "B-18927-ZAMESTNANEC-HPP-NEAKADEMICKY",
"descriptionCs": "neakademický zaměstnanec HPP / Oddělení pro rozvoj / FIT",
"descriptionEn": "Non-academic employee with employment contract / Office of Development / FIT",
"orgUnit": 18927,
"type": "BUSINESS"
}
]
Secured by oauth_2_0
Headers
- Authorization: ()
Used to send a valid OAuth 2 access token. Do not use with the "access_token" query string parameter.
HTTP status code 401
Bad or expired token. This can happen if the user or OAAS revoked or expired an access token. To fix, you should request a new token.
HTTP status code 403
Bad OAuth request (wrong consumer key, bad nonce, expired timestamp...).
get /roles/{code}
URI Parameters
- code: required (string)
Code of the role.
Example:
B-18000-ZAMESTNANEC
HTTP status code 200
Body
Type: application/json
Example:
{
"code": "B-18927-ZAMESTNANEC-HPP-NEAKADEMICKY",
"descriptionCs": "neakademický zaměstnanec HPP / Oddělení pro rozvoj / FIT",
"descriptionEn": "Non-academic employee with employment contract / Office of Development / FIT",
"orgUnit": 18927,
"type": "BUSINESS"
}
Secured by oauth_2_0
Headers
- Authorization: ()
Used to send a valid OAuth 2 access token. Do not use with the "access_token" query string parameter.
HTTP status code 401
Bad or expired token. This can happen if the user or OAAS revoked or expired an access token. To fix, you should request a new token.
HTTP status code 403
Bad OAuth request (wrong consumer key, bad nonce, expired timestamp...).
List all members of the role (their usernames).
get /roles/{code}/members
List all members of the role (their usernames).
URI Parameters
- code: required (string)
Code of the role.
Example:
B-18000-ZAMESTNANEC
HTTP status code 200
Body
Type: application/json
Example:
{
members: [
"flynn",
"jirutjak",
"kordikp"
]
}
Secured by oauth_2_0
Headers
- Authorization: ()
Used to send a valid OAuth 2 access token. Do not use with the "access_token" query string parameter.
HTTP status code 401
Bad or expired token. This can happen if the user or OAAS revoked or expired an access token. To fix, you should request a new token.
HTTP status code 403
Bad OAuth request (wrong consumer key, bad nonce, expired timestamp...).