OrganizationApi
This class implements BaseApi
.
You need the organization:manage
scope to access this API.
This is a JavaScript implementation of the Organization API.
For ease of use we recommend using the User
object for interaction instead.
Interfaces
RoleReference
RoleReference
MembershipInfo
MembershipInfo
OrganizationCreateDetails
OrganizationCreateDetails
OrganizationUpdateDetails
OrganizationUpdateDetails
OrganizationInfo
OrganizationInfo
OrganizationMembershipReference
OrganizationMembershipReference
Methods
constructor(user, endpoint)
constructor(user, endpoint)
Create an Organization API object.
user
should be an instance of theUser
object.endpoint
should be the Vulos Identity endpoint.
async organizationList()
async organizationList()
Get a list of all the organizations that the user is in.
The result is an array of objects that implement the OrganizationMembershipReference
.
This method's response has the organization:list
cache prefix.
async organizationInfo(id)
async organizationInfo(id)
Get information of an organization by the organization's ID.
The result implements the OrganizationInfo
interface.
This method's response has the organization:info
cache prefix.
async organizationUpdate(id, details)
async organizationUpdate(id, details)
Update an organization's details.
The details
object implements the OrganizationUpdateDetails
interface.
The result implements the SuccessResponse
interface.
This method's response has the organization:update
cache prefix.
async organizationDelete(id)
async organizationDelete(id)
Delete an organization.
The result implements the SuccessResponse
interface.
This method's response has the organization:delete
cache prefix.
async organizationCreate(details)
async organizationCreate(details)
Create a new organization.
The details
object implements the OrganizationCreateDetails
interface.
The result implements the OrganizationMembershipReference
interface.
This method's response has the organization:create
cache prefix.
async memberInfo(id, member)
async memberInfo(id, member)
Get information about a specific member.
id
is the organization id;member
is the membership id;
The result implements the MembershipInfo
interface.
This method's response has the organization:member:info
cache prefix.
async memberDelete(id, member)
async memberDelete(id, member)
Remove a member from an organization.
The result implements the SuccessResponse
interface.
This method's response has the organization:member:delete
cache prefix.
async memberInvite(id, email)
async memberInvite(id, email)
Invite a user to an organization by email.
The result implements the SuccessResponse
interface.
This method's response has the organization:member:invite
cache prefix.
async roleList(id, member)
async roleList(id, member)
Get all the roles for a member.
The result is an array of objects that implement the RoleReference
interface.
This method's response has the organization:role:list
cache prefix.
async roleCreate(id, member, name)
async roleCreate(id, member, name)
Add a new role to a user.
The result implements the RoleReference
interface.
This method's response has the organization:role:create
cache prefix.
async roleDelete(id, member, role)
async roleDelete(id, member, role)
Remove a role from a member.
role
is the role id;
The result implements the SuccessResponse
interface.
This method's response has the organization:role:delete
cache prefix.
Last updated