Skip to content

services userProfileRouteService

Baasic edited this page Jan 18, 2017 · 5 revisions

baasicUserProfileRouteService

Baasic User Profile Route Service provides Baasic route templates which can be expanded to Baasic REST URIs. Various services can use Baasic User Profile Route Service to obtain needed routes while other routes will be obtained through HAL. By convention, all route services use the same function names as their corresponding services.


baasicUserProfileRouteService.find()

Parses find user profile route which can be expanded with additional options. Supported items are:

  • searchQuery - A string value used to identify user profile resources using the phrase search.
  • page - A value used to set the page number, i.e. to retrieve certain user profile subset from the storage.
  • rpp - A value used to limit the size of result set per page.
  • sort - A string used to set the user profile property to sort the result collection by.
  • embed - Comma separated list of resources to be contained within the current representation.

Example:

baasicUserProfileRouteService.find.expand({searchQuery: '<search-phrase>'});               

baasicUserProfileRouteService.get()

Parses get route; this route doesn't expose any properties.

Example:

baasicUserProfileRouteService.get.expand({});               

baasicUserProfileRouteService.create()

Parses create user profile route; this URI template does not expose any additional options.

Example:

baasicUserProfileRouteService.create.expand({});              

baasicUserProfileRouteService.parse()

Parses and expands URI templates based on RFC6570 specifications. For more information please visit the project GitHub page.

Example:

baasicUserProfileRouteService.parse('<route>/{?embed,fields,options}').expand({embed: '<embedded-resource>'});

baasicUserProfileRouteService.acl.get()

Parses get user profile acl route; this URI template should be expanded with the Id of the user profile resource.

Example:

baasicUserProfileRouteService.acl.get.expand(
	{id: '<profile-id>'}
);

baasicUserProfileRouteService.acl.update()

Parses update user profile acl route; this URI template should be expanded with the Id of the user profile.

Example:

baasicUserProfileRouteService.acl.update.expand(
	{id: '<profile-id>'}
);

baasicUserProfileRouteService.acl.deleteByUser()

Parses deleteByUser user profile acl route which can be expanded with additional options. Supported items are:

  • id - Id of the user profile resource.
  • accessAction - Action abbreviation which identifies ACL policy assigned to the specified user and user profile resource.
  • user - A value which uniquely identifies user for which ACL policy needs to be removed.

Example:

baasicUserProfileRouteService.acl.deleteByUser.expand({
    id: '<profile-id>', 
    accessAction: '<access-action>', 
    user: '<username>'
});

baasicUserProfileRouteService.acl.deleteByRole()

Parses deleteByUser user profile acl route which can be expanded with additional options. Supported items are:

  • id - Id of the user profile.
  • accessAction - Action abbreviation which identifies ACL policy assigned to the specified role and user profile resource.
  • role - A value which uniquely identifies role for which ACL policy needs to be removed.

Example:

baasicUserProfileRouteService.acl.deleteByRole.expand({
    id: '<profile-id>', 
    accessAction: '<access-action>', 
    role: '<role-name>'
});

Notes:

  • Refer to the Baasic REST API for detailed information about available Baasic REST API end-points.
  • URI Template syntax enables expanding the Baasic route templates to Baasic REST URIs providing it with an object that contains URI parameters.
  • All end-point objects are transformed by the associated route service.

(c) 2017 Mono Ltd

Author: Mono Ltd

License: MIT

Clone this wiki locally