API user - RapturePlatform/Rapture GitHub Wiki
The user API contains methods for users to query and manipulate their own accounts and sessions.
HttpUserApi userApi = new HttpUserApi(loginApi);
RaptureUser retVal = userApi.getWhoAmI();
retVal = baseAPI.doUser_GetWhoAmI();
Entitlement: /everyone
Returns account information for the current user.
This function takes no parameters.
Type | Description |
---|---|
RaptureUser |
Defines a user account for the Rapture system.
Field | Type |
---|---|
username | String |
userId | String |
emailAddress | String |
salt | String |
hashPassword | String |
description | String |
inactive | Boolean |
apiKey | Boolean |
hasRoot | Boolean |
passwordResetToken | String |
tokenExpirationTime | Long |
HttpUserApi userApi = new HttpUserApi(loginApi);
void retVal = userApi.logoutUser();
retVal = baseAPI.doUser_LogoutUser();
Entitlement: /everyone
Logs out the active user and terminates the current session.
This function takes no parameters.
Type | Description |
---|---|
void |
HttpUserApi userApi = new HttpUserApi(loginApi);
void retVal = userApi.storePreference(category, name, content);
retVal = baseAPI.doUser_StorePreference(category, name, content);
Entitlement: /user/preferences
Stores application preferences for the current user.
Parameter | Type | Description |
---|---|---|
category | String | |
name | String | |
content | String |
Type | Description |
---|---|
void |
HttpUserApi userApi = new HttpUserApi(loginApi);
String retVal = userApi.getPreference(category, name);
retVal = baseAPI.doUser_GetPreference(category, name);
Entitlement: /user/preferences
Retrieves application preferences for the current user.
Parameter | Type | Description |
---|---|---|
category | String | |
name | String |
Type | Description |
---|---|
String |
HttpUserApi userApi = new HttpUserApi(loginApi);
void retVal = userApi.removePreference(category, name);
retVal = baseAPI.doUser_RemovePreference(category, name);
Entitlement: /user/preferences
Removes a previously stored preference.
Parameter | Type | Description |
---|---|---|
category | String | |
name | String |
Type | Description |
---|---|
void |
HttpUserApi userApi = new HttpUserApi(loginApi);
List<String> retVal = userApi.getPreferenceCategories();
retVal = baseAPI.doUser_GetPreferenceCategories();
Entitlement: /user/preferences
This method will list the categories of preferences available for a user.
This function takes no parameters.
Type | Description |
---|---|
List |
HttpUserApi userApi = new HttpUserApi(loginApi);
List<String> retVal = userApi.getPreferencesInCategory(category);
retVal = baseAPI.doUser_GetPreferencesInCategory(category);
Entitlement: /user/preferences
This method will list the preference documents in a category.
Parameter | Type | Description |
---|---|---|
category | String |
Type | Description |
---|---|
List |
HttpUserApi userApi = new HttpUserApi(loginApi);
RaptureUser retVal = userApi.updateMyDescription(description);
retVal = baseAPI.doUser_UpdateMyDescription(description);
Entitlement: /everyone
Updates the description for the current user.
Parameter | Type | Description |
---|---|---|
description | String |
Type | Description |
---|---|
RaptureUser |
Defines a user account for the Rapture system.
Field | Type |
---|---|
username | String |
userId | String |
emailAddress | String |
salt | String |
hashPassword | String |
description | String |
inactive | Boolean |
apiKey | Boolean |
hasRoot | Boolean |
passwordResetToken | String |
tokenExpirationTime | Long |
HttpUserApi userApi = new HttpUserApi(loginApi);
RaptureUser retVal = userApi.changeMyPassword(oldHashPassword, newHashPassword);
retVal = baseAPI.doUser_ChangeMyPassword(oldHashPassword, newHashPassword);
Entitlement: /everyone
Changes the password for the current user.
Parameter | Type | Description |
---|---|---|
oldHashPassword | String | |
newHashPassword | String |
Type | Description |
---|---|
RaptureUser |
Defines a user account for the Rapture system.
Field | Type |
---|---|
username | String |
userId | String |
emailAddress | String |
salt | String |
hashPassword | String |
description | String |
inactive | Boolean |
apiKey | Boolean |
hasRoot | Boolean |
passwordResetToken | String |
tokenExpirationTime | Long |
HttpUserApi userApi = new HttpUserApi(loginApi);
RaptureUser retVal = userApi.changeMyEmail(newAddress);
retVal = baseAPI.doUser_ChangeMyEmail(newAddress);
Entitlement: /everyone
Changes the email for the current user.
Parameter | Type | Description |
---|---|---|
newAddress | String |
Type | Description |
---|---|
RaptureUser |
Defines a user account for the Rapture system.
Field | Type |
---|---|
username | String |
userId | String |
emailAddress | String |
salt | String |
hashPassword | String |
description | String |
inactive | Boolean |
apiKey | Boolean |
hasRoot | Boolean |
passwordResetToken | String |
tokenExpirationTime | Long |
HttpUserApi userApi = new HttpUserApi(loginApi);
ApiVersion retVal = userApi.getServerApiVersion();
retVal = baseAPI.doUser_GetServerApiVersion();
Entitlement: /everyone
Retrieves the API version currently in use.
This function takes no parameters.
Type | Description |
---|---|
ApiVersion |
The ApiVersion
Field | Type |
---|---|
major | String |
minor | String |
micro | String |
HttpUserApi userApi = new HttpUserApi(loginApi);
RaptureCubeResult retVal = userApi.runFilterCubeView(typeURI, scriptURI, filterParams, groupFields, columnFields);
retVal = baseAPI.doUser_RunFilterCubeView(typeURI, scriptURI, filterParams, groupFields, columnFields);
Entitlement: /user/read
Parameter | Type | Description |
---|---|---|
typeURI | String | |
scriptURI | String | |
filterParams | String | |
groupFields | String | |
columnFields | String |
Type | Description |
---|---|
RaptureCubeResult |
This is the result of a FilterCubeView.
Field | Type |
---|---|
groupNames | List |
columnNames | List |
rows | List |
HttpUserApi userApi = new HttpUserApi(loginApi);
RaptureQueryResult retVal = userApi.runNativeQuery(typeURI, repoType, queryParams);
retVal = baseAPI.doUser_RunNativeQuery(typeURI, repoType, queryParams);
Entitlement: /user/read
Parameter | Type | Description |
---|---|---|
typeURI | String | |
repoType | String | |
queryParams | List |
Type | Description |
---|---|
RaptureQueryResult |
A return value from a native query.
Field | Type |
---|---|
rows | List |
HttpUserApi userApi = new HttpUserApi(loginApi);
RaptureCubeResult retVal = userApi.runNativeFilterCubeView(typeURI, repoType, queryParams, groupFields, columnFields);
retVal = baseAPI.doUser_RunNativeFilterCubeView(typeURI, repoType, queryParams, groupFields, columnFields);
Entitlement: /user/read
Very much like a filter cube view, except that the initial content is taken from a native query executed against a REP repository instead of running through the viewsub system.
Parameter | Type | Description |
---|---|---|
typeURI | String | |
repoType | String | |
queryParams | List | |
groupFields | String | |
columnFields | String |
Type | Description |
---|---|
RaptureCubeResult |
This is the result of a FilterCubeView.
Field | Type |
---|---|
groupNames | List |
columnNames | List |
rows | List |
HttpUserApi userApi = new HttpUserApi(loginApi);
boolean retVal = userApi.isPermitted(apiCall, callParam);
retVal = baseAPI.doUser_IsPermitted(apiCall, callParam);
Entitlement: /everyone
A method to check whether the current user is allowed to make the API call. Useful for the UI so that it can determine whether or not to show a particular item.
Parameter | Type | Description |
---|---|---|
apiCall | String | |
callParam | String |
Type | Description |
---|---|
boolean |