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
ADMIN
1
AUTHOR
2
JOBCREATOR
3
EXECUTOR
4
PARSABLE_ADMIN
5
WORKFLOW_PLANNER
6
ANALYTICS_EDITOR
7
ANALYTICS_VIEWER
8
IT_ADMIN
9
PUBLISHER
10
Enumeration: BulkUserUploadStatus
PARTIAL
1
FAILURE
2
SUCCESSFUL
3
Data structures
Struct: User
Key Field Type Description Requiredness Default value
1 id string
default
2 email string
default
3 name string
default
4 validatedAt i64
Not validated, if 0
default
5 isAutomaticallyProvisioned bool
optional
6 regionId string
optional
7 isSSOAuth bool
optional
Information about the user
Union: UserKey
Key Field Type Description Requiredness Default value
1 id string
default
2 email string
default
Struct: TeamMembership
Key Field Type Description Requiredness Default value
1 addedAt i64
default
2 updatedAt i64
default
3 removedAt i64
Not removed, if 0
default
4 roles list<TeamRole
>
default
Team membership information
Struct: UserStats
Key Field Type Description Requiredness Default value
1 completedJobs i32
default
2 activeJobs i32
default
Stats for user (per team)
Struct: UserModular
Key Field Type Description Requiredness Default value
1 id string
default
2 email string
default
3 name string
default
4 validatedAt i64
Not validated, if 0
default
5 isAutomaticallyProvisioned bool
optional
6 regionId string
optional
7 isSSOAuth bool
optional
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 string
optional
Information about a new user
Struct: UserSelectOpts
Key Field Type Description Requiredness Default value
1 includeTeamMembership bool
default
2 includeStats bool
default
3 includeAttributes bool
default
4 includeMetadata bool
default
Struct: UserOrder
Key Field Type Description Requiredness Default value
1 field UserOrderBy
default
2 asc bool
default true
Struct: UserTextSearch
Key Field Type Description Requiredness Default value
1 query string
default
Struct: UserWhereOpts
Options for choosing records
Union: UserFetchResult
Result from fetch APIs
Struct: BulkUserUploadSummary
Key Field Type Description Requiredness Default value
1 total i32
default
2 added i32
optional
3 caveats i32
optional
4 errors i32
optional
Struct: BulkUserUploadSummaryRequest
Key Field Type Description Requiredness Default value
1 fileName string
default
2 importStartTime i64
default
3 importFinishTime i64
default
4 contents string
default
5 status BulkUserUploadStatus
default
6 uploadSummary BulkUserUploadSummary
default
Struct: EmailExists
Key Field Type Description Requiredness Default value
1 exists bool
default
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