All URIs are relative to https://uclapi.com
Method | HTTP request | Description |
---|---|---|
searchPeopleGet | GET /search/people | Returns matching people and information about them. |
InlineResponse20010 searchPeopleGet(query)
Returns matching people and information about them.
Note that this endpoint only returns a maximum of 20 matches. Following a change to UCL's systems in 2019, this endpoint only returns staff; students will not be returned through this API.
import uclapi from '@uclapi/sdk';
let defaultClient = uclapi.ApiClient.instance;
// Configure OAuth2 access token for authorization: OAuthSecurity
let OAuthSecurity = defaultClient.authentications['OAuthSecurity'];
OAuthSecurity.accessToken = 'YOUR ACCESS TOKEN';
// Configure API key authorization: OAuthToken
let OAuthToken = defaultClient.authentications['OAuthToken'];
OAuthToken.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//OAuthToken.apiKeyPrefix = 'Token';
let apiInstance = new uclapi.SearchApi();
let query = "query_example"; // String | Name of the person you are searching for.
apiInstance.searchPeopleGet(query, (error, data, response) => {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
});
Name | Type | Description | Notes |
---|---|---|---|
query | String | Name of the person you are searching for. |
- Content-Type: Not defined
- Accept: application/json