PeopleServiceImpl

This group contains the following resources:

/people

URI: /api/v1/people

GET

Search users. The user must have given the application the grant READ to use these operation.

Parameters

Name Description Type Default Value
q Search criteria.The format of the search criteria is a String with pairs of field=value delimited by a blank space. The search criteria is based on the following fields:
  • name: Name.
  • surname1: First surname.
  • surname2: Second surname.
  • login: Username.
  • currentTypeid: User's Type of the current profile.
  • currentSubtypeid: User's subtype of the current profile.
  • hobby: Hobbies.
  • homeTown: Town.
  • deliveryTown: Delivery Town (if different from town).
  • homeProvince: State
  • deliveryProvince: Delivery State (if different from state).
  • knows: Knowledge.
  • jobsite: Professional Data - Company's name.
  • homeCountry: Country.
  • deliveryCountry: Delivery Country (if different from country).
  • homeComarca: County (if person lives in Catalunya).
  • deliveryComarca: Delivery County (if it's in Catalunya and different from county).
  • jobTown: Professional Data - Company's town.
  • jobArea: Professional Data - Company's area.
  • jobProvince: Professional Data - Company's state.
  • jobActivity: Professional Data - Company's activity.
  • jobCountry: Professional Data - Company's country.
  • biography: Curriculum vitae.
  • email: Email address.
  • appId: Environment of the current profile.
  • ong: NGO.
  • languages: Languages.
  • alternativeEmail: Alternative email address.
  • blog: Personal blog.
  • homepage: Personal website.
  • jobTitle: Professional Data - Title.
  • jobHomepage: Professional Data - Company's website.
  • jobDimension: Professional Data - Company's size.
  • jobAddress: Professional Data - Company's address.
  • jobPostalCode: Professional Data - Company's zipcode.
query

Response Body

element: personList
PersonList object with the users that match the search criteria. Represents a list of people
Properties
Property Type Description
people array of (person) List of people

Status Codes - Errors

The HTTP call return a status code depending on the result of the operation. These codes are listed below
Code Description
200 Success Call
401 Not authorized. Maybe you have to authorize the user o the OAuth token has expired

Example

HTTP Call Example
GET http://denver.uoc.es:8080/webapps/uocapi/v1/people?q=name=Xavi%20surname1=Aracil
Response Example (XML)
<?xml version="1.0" encoding="UTF-8"?> <personList> <people> <id>130360</id> <username>xaracil</username> <name>Xavier</name> <surname1>Aracil</surname1> <surname2>Diaz</surname2> <email>noreply@uoc.edu</email> <profiles> <appId>UOC</appId> <app>UOC</app> <id>UOC-GESTIO-1-ca</id> <userSubtypeId>1</userSubtypeId> <userType>Gestió</userType> <usertypeId>GESTIO</usertypeId> <userSubtype>Gestió</userSubtype> <language>ca</language> </profiles> <profiles> <!--...--> </profiles> <!--...more "profiles" elements...--> <userNumber>411603</userNumber> <hobbies>hobbies introduits per l'usuari en el seu perfil</hobbies> <skills>competències introduits per l'usuari en el seu perfil</skills> <about>lorem ipsum ...</about> <NGOes>ONG's introduides per l'usuari en el seu perfil</NGOes> <languages>idiomes introduits per l'usuari en el seu perfil</languages> <secondaryEmail>noreply@gmail.com</secondaryEmail> <blog>http://informatica.blogs.uoc.edu/</blog> <personalSite>http://www.uoc.edu/portal/catala/estudis_arees/informatica_multimedia_telecomunicacio/index.html</personalSite> <lastUpdate>06 July 2012 10:48:00</lastUpdate> </people> <people> <!--...--> </people> <!--...more "people" elements...--> </personList>
Response Example (JSON)
{ "people" : [ { "id" : "130360", "username" : "xaracil", "name" : "Xavier", "surname1" : "Aracil", "surname2" : "Diaz", "email" : "noreply@uoc.edu", "profiles" : [ { "appId" : "UOC", "app" : "UOC", "id" : "UOC-GESTIO-1-ca", "userSubtypeId" : "1", "userType" : "Gestió", "usertypeId" : "GESTIO", "userSubtype" : "Gestió", "language" : "ca" }, ... ], "userNumber" : "411603", "hobbies" : "hobbies introduits per l'usuari en el seu perfil", "skills" : "competències introduits per l'usuari en el seu perfil", "about" : "lorem ipsum ...", "NGOes" : "ONG's introduides per l'usuari en el seu perfil", "languages" : "idiomes introduits per l'usuari en el seu perfil", "secondaryEmail" : "noreply@gmail.com", "blog" : "http://informatica.blogs.uoc.edu/", "personalSite" : "http://www.uoc.edu/portal/catala/estudis_arees/informatica_multimedia_telecomunicacio/index.html", "lastUpdate" : "06 July 2012 10:48:00" }, ... ] }

Links

iOS: https://github.com/UOC/openapidemos/tree/master/Exemple%20PeopleGet

/people/{id}

URI: /api/v1/people/{id}

GET

Get the public data of one person. The user must have given the application the grant READ to use these operation.

Parameters

Name Description Type Default Value
id Person identifier path

Response Body

element: person
Person object with the person Represents a person in the public directory
Properties
Property Type Description
id string Person's Identifier.
username string Person's username
name string Person's Name.
surname1 string Person's first surname.
surname2 string Person's last surname.
email string Person's email address.
profiles array of (profile) Person's profile list.
userNumber string Person's number inside Campus.
hobbies string Person's hobbies.
skills string Person's competences
about string Person's about text.
NGOes string NGO where person is involved.
languages string Person's speaking languages.
secondaryEmail string Person's alternative email address.
blog string Person's blog.
personalSite string Person's personal website.
lastUpdate dateTime Date when the public data of the person were last updated.

Status Codes - Errors

The HTTP call return a status code depending on the result of the operation. These codes are listed below
Code Description
200 Success Call
401 Not authorized. Maybe you have to authorize the user o the OAuth token has expired

Example

HTTP Call Example
GET http://denver.uoc.es:8080/webapps/uocapi/v1/people/130360
Response Example (XML)
<?xml version="1.0" encoding="UTF-8"?> <person> <id>130360</id> <username>xaracil</username> <name>Xavier</name> <surname1>Aracil</surname1> <surname2>Diaz</surname2> <email>noreply@uoc.edu</email> <profiles> <appId>UOC</appId> <app>UOC</app> <id>UOC-GESTIO-1-ca</id> <userSubtypeId>1</userSubtypeId> <userType>Gestió</userType> <usertypeId>GESTIO</usertypeId> <userSubtype>Gestió</userSubtype> <language>ca</language> </profiles> <profiles> <!--...--> </profiles> <!--...more "profiles" elements...--> <userNumber>411603</userNumber> <hobbies>hobbies introduits per l'usuari en el seu perfil</hobbies> <skills>competències introduits per l'usuari en el seu perfil</skills> <about>lorem ipsum ...</about> <NGOes>ONG's introduides per l'usuari en el seu perfil</NGOes> <languages>idiomes introduits per l'usuari en el seu perfil</languages> <secondaryEmail>noreply@gmail.com</secondaryEmail> <blog>http://informatica.blogs.uoc.edu/</blog> <personalSite>http://www.uoc.edu/portal/catala/estudis_arees/informatica_multimedia_telecomunicacio/index.html</personalSite> <lastUpdate>06 July 2012 10:48:00</lastUpdate> </person>
Response Example (JSON)
{ "id" : "130360", "username" : "xaracil", "name" : "Xavier", "surname1" : "Aracil", "surname2" : "Diaz", "email" : "noreply@uoc.edu", "profiles" : [ { "appId" : "UOC", "app" : "UOC", "id" : "UOC-GESTIO-1-ca", "userSubtypeId" : "1", "userType" : "Gestió", "usertypeId" : "GESTIO", "userSubtype" : "Gestió", "language" : "ca" }, ... ], "userNumber" : "411603", "hobbies" : "hobbies introduits per l'usuari en el seu perfil", "skills" : "competències introduits per l'usuari en el seu perfil", "about" : "lorem ipsum ...", "NGOes" : "ONG's introduides per l'usuari en el seu perfil", "languages" : "idiomes introduits per l'usuari en el seu perfil", "secondaryEmail" : "noreply@gmail.com", "blog" : "http://informatica.blogs.uoc.edu/", "personalSite" : "http://www.uoc.edu/portal/catala/estudis_arees/informatica_multimedia_telecomunicacio/index.html", "lastUpdate" : "06 July 2012 10:48:00" }

Links

iOS: https://github.com/UOC/openapidemos/tree/master/Exemple%20PeopleIdGet

/people/{id}/profiles

URI: /api/v1/people/{id}/profiles

GET

Get the profiles of the person. The user must have given the application the grant READ to use these operation.

Parameters

Name Description Type Default Value
id Person identifier path

Response Body

element: profileList
ProfileList object with the profiles of the person. Represents a profile list
Properties
Property Type Description
profiles array of (profile) Profile list.

Status Codes - Errors

The HTTP call return a status code depending on the result of the operation. These codes are listed below
Code Description
200 Success Call
401 Not authorized. Maybe you have to authorize the user o the OAuth token has expired

Example

HTTP Call Example
GET http://denver.uoc.es:8080/webapps/uocapi/v1/people/130360/profiles
Response Example (XML)
<?xml version="1.0" encoding="UTF-8"?> <profileList> <profiles> <appId>UOC</appId> <app>UOC</app> <id>UOC-GESTIO-1-ca</id> <userSubtypeId>1</userSubtypeId> <userType>Gestió</userType> <usertypeId>GESTIO</usertypeId> <userSubtype>Gestió</userSubtype> <language>ca</language> </profiles> <profiles> <!--...--> </profiles> <!--...more "profiles" elements...--> </profileList>
Response Example (JSON)
{ "profiles" : [ { "appId" : "UOC", "app" : "UOC", "id" : "UOC-GESTIO-1-ca", "userSubtypeId" : "1", "userType" : "Gestió", "usertypeId" : "GESTIO", "userSubtype" : "Gestió", "language" : "ca" }, ... ] }

Links

iOS: https://github.com/UOC/openapidemos/tree/master/Exemple%20PeopleIdProfilesGet

/people/{id}/tutors

URI: /api/v1/people/{id}/tutors

GET

Get the tutors of the person. There is a tutor for each degree the user is enrolled in. The user must have given the application the grant READ to use these operation.

Parameters

Name Description Type Default Value
id Person identifier path

Response Body

element: userList
UserList object with person's tutors. Represents a list of users
Properties
Property Type Description
users array of (user) User list.

Status Codes - Errors

The HTTP call return a status code depending on the result of the operation. These codes are listed below
Code Description
200 Success Call
401 Not authorized. Maybe you have to authorize the user o the OAuth token has expired

Example

HTTP Call Example
GET http://denver.uoc.es:8080/webapps/uocapi/v1/people/130360/tutors
Response Example (XML)
<?xml version="1.0" encoding="UTF-8"?> <userList> <users> <id>130360</id> <username>xaracil</username> <name>Xavi</name> <number>411603</number> <fullName>Xavi Aracil Diaz</fullName> <photoUrl>http://cv.uoc.edu/UOC/mc-icons/fotos/xaracil.jpg</photoUrl> <language>ca</language> <sessionId>283ac5c62977a38daef52b5a43ec5273f371af839246fdc4e4c71aaf367972b16721a00fb25ca8feeb3de5012435c42218d7ae60243c7b5c3a688eb593dfbad2</sessionId> <email>xaracil@uoc.edu</email> </users> <users> <!--...--> </users> <!--...more "users" elements...--> </userList>
Response Example (JSON)
{ "users" : [ { "id" : "130360", "username" : "xaracil", "name" : "Xavi", "number" : "411603", "fullName" : "Xavi Aracil Diaz", "photoUrl" : "http://cv.uoc.edu/UOC/mc-icons/fotos/xaracil.jpg", "language" : "ca", "sessionId" : "283ac5c62977a38daef52b5a43ec5273f371af839246fdc4e4c71aaf367972b16721a00fb25ca8feeb3de5012435c42218d7ae60243c7b5c3a688eb593dfbad2", "email" : "xaracil@uoc.edu" }, ... ] }

Links

iOS: https://github.com/UOC/openapidemos/tree/master/Exemple%20PeopleIdTutorsGet

/people/{id}/profiles/current

URI: /api/v1/people/{id}/profiles/current

GET

Get the current profile of the person The current profile is the profile the person is connected to the Virtual Campus with. That profile is key in:
  • Available settings.
  • Menu options in the homepage.
  • Available widgets in the home page.
  • Profile icon in webmail.
  • Secretary's Office.
The user must have given the application the grant READ to use these operation.

Parameters

Name Description Type Default Value
id Person identifier path

Response Body

element: profile
Profile object with the current profile of the person. A profile is a combination of APP-TYPE-SUBTYPE-LANG, where
  • APP is the environment of the profile (UOC, CV-UOC, GC-UOC, etc).
  • TYPE is the user type (ESTUDIANT, PROFESSOR, etc).
  • SUBTYPE is the user subtype, usually related to the studies.
  • LANG is the profile language in ISO format.
Contains identifiers for APP, TYPE & SUBTYPE as well as the description in the current language of the user inside the Virtual Campus
Properties
Property Type Description
appId string Environment identifier of the profile.
app string Profile environment in the current language of the user.
id string Profile identifier, has the following format: APP-USERTYPE-USERSUBTYPE-LANG.
userSubtypeId string Identifier of the User's subtype of the profile.
userType string User type of the profile (TYPE) in the current language of the user.
usertypeId string Identifier of the user type of the profile (TYPE).
userSubtype string User Subtype of the profile (SUBTYPE) in the current language of the user.
language string Language of the profile. Some environments have only one language o don't have the current language of the user. This field contains the language of the profile.

Status Codes - Errors

The HTTP call return a status code depending on the result of the operation. These codes are listed below
Code Description
200 Success Call
401 Not authorized. Maybe you have to authorize the user o the OAuth token has expired

Example

HTTP Call Example
GET http://denver.uoc.es:8080/webapps/uocapi/v1/people/130360/profiles/current
Response Example (XML)
<?xml version="1.0" encoding="UTF-8"?> <profile> <appId>UOC</appId> <app>UOC</app> <id>UOC-GESTIO-1-ca</id> <userSubtypeId>1</userSubtypeId> <userType>Gestió</userType> <usertypeId>GESTIO</usertypeId> <userSubtype>Gestió</userSubtype> <language>ca</language> </profile>
Response Example (JSON)
{ "appId" : "UOC", "app" : "UOC", "id" : "UOC-GESTIO-1-ca", "userSubtypeId" : "1", "userType" : "Gestió", "usertypeId" : "GESTIO", "userSubtype" : "Gestió", "language" : "ca" }

Links

iOS: https://github.com/UOC/openapidemos/tree/master/Exemple%20PeopleIdProfilesCurrentGet