Module: user
Copyright 2020 Parsable, Inc
API address: /api/users
APIs to get information about a user.
Enumerations
Enumeration: TeamRole
The user's role(s) in a team
ADMIN1
AUTHOR2
JOBCREATOR3
EXECUTOR4
PARSABLE_ADMIN5
WORKFLOW_PLANNER6
ANALYTICS_EDITOR7
ANALYTICS_VIEWER8
IT_ADMIN9
PUBLISHER10
Enumeration: BulkUserUploadStatus
PARTIAL1
FAILURE2
SUCCESSFUL3
Data structures
Struct: User
Key Field Type Description Requiredness Default value
1 id stringdefault
2 email stringdefault
3 name stringdefault
4 validatedAt i64Not validated, if 0
default
5 isAutomaticallyProvisioned booloptional
6 regionId stringoptional
7 isSSOAuth booloptional
Information about the user
Union: UserKey
Key Field Type Description Requiredness Default value
1 id stringdefault
2 email stringdefault
Struct: TeamMembership
Key Field Type Description Requiredness Default value
1 addedAt i64default
2 updatedAt i64default
3 removedAt i64Not removed, if 0
default
4 roles list<TeamRole >default
Team membership information
Struct: UserStats
Key Field Type Description Requiredness Default value
1 completedJobs i32default
2 activeJobs i32default
Stats for user (per team)
Struct: UserModular
Key Field Type Description Requiredness Default value
1 id stringdefault
2 email stringdefault
3 name stringdefault
4 validatedAt i64Not validated, if 0
default
5 isAutomaticallyProvisioned booloptional
6 regionId stringoptional
7 isSSOAuth booloptional
101 teamIdToMembership map<string, TeamMembership >optional
102 teamIdToStats map<string, UserStats >optional
103 teamIdToAttributes map<string, list<abac.AbacAttribute >>optional
104 teamIdToMetadata map<string, map<string, metadata.MetadataEntry >>optional
Information about a user, modular
Struct: UserParams
Key Field Type Description Requiredness Default value
1 name stringoptional
Information about a new user
Struct: UserSelectOpts
Key Field Type Description Requiredness Default value
1 includeTeamMembership booldefault
2 includeStats booldefault
3 includeAttributes booldefault
4 includeMetadata booldefault
Struct: UserOrder
Key Field Type Description Requiredness Default value
1 field UserOrderBy default
2 asc booldefault true
Struct: UserTextSearch
Key Field Type Description Requiredness Default value
1 query stringdefault
Struct: UserWhereOpts
Options for choosing records
Union: UserFetchResult
Result from fetch APIs
Struct: BulkUserUploadSummary
Key Field Type Description Requiredness Default value
1 total i32default
2 added i32optional
3 caveats i32optional
4 errors i32optional
Struct: BulkUserUploadSummaryRequest
Key Field Type Description Requiredness Default value
1 fileName stringdefault
2 importStartTime i64default
3 importFinishTime i64default
4 contents stringdefault
5 status BulkUserUploadStatus default
6 uploadSummary BulkUserUploadSummary default
Struct: EmailExists
Key Field Type Description Requiredness Default value
1 exists booldefault
response from checkEmailExists
Services
Service: UserService
Function: UserService.fetch
map<string, UserFetchResult > fetch(list<string> userIds)
throws common.SystemException
Fetch a specific list of Team Users with no team-specific information; allowed for any users on a shared team (EXECUTION use case)
Function: UserService.fetchByTeam
map<string, UserFetchResult > fetchByTeam(UserSelectOpts selectOpts,
string teamId,
list<string> userIds)
throws common.SystemException
Fetch a specific list of Team Users for a team; allows getting additional team-specific data via SelectOpts (ADMIN use case, requires ADMIN or JOBCREATOR role)
Function: UserService.updateAttribute
list<abac.AbacAttribute > updateAttribute(common.UUID userId,
common.UUID teamId,
string attributeId,
list<abac.AbacAttributeValue > values,
abac.AbacUploadBehaviour behave)
throws common.SystemException
Update a single attribute on a user on a team
return value will always be a list with a single attribute determined by which attribute was updated
param userId: user to update
param teamId: team on which to update the users attributes
param attributeId: the AttributeId of the team level attribute to be updated
param values: the new AttributeValues to associated with Attribute attributeId on user userId
param behave: determine the behaviour of the endpoint, merge or clobber. Default: clobber