Module: team
Copyright 2020 Parsable, Inc
API address: /api/teams
Functionality for Team-level configuration.
Data structures
Struct: TeamConfig
Key | Field | Type | Description | Requiredness | Default value |
1 | requireReviewFlow | bool | if true, require use of the review flow rather than explicit publish() call for templates
| default | false |
2 | showStepHierarchyPos | bool | | optional | |
3 | defaultLocale | string | | optional | |
4 | requireTemplateSetReviewFlow | bool | if true, require use of the review flow rather than explicit publish() call for template sets
| default | false |
5 | backendPdfGen | bool | | default | true |
6 | useWebSocket | bool | | default | true |
7 | emailSenderOverride | string | | optional | |
8 | enableObserverRole | bool | Deprecated
| default | false |
9 | enableTemplateDiffs | bool | | optional | |
10 | enableTemplateViews | bool | | optional | |
11 | proxyRegion | string | | optional | |
12 | useParsableCamera | bool | | optional | |
13 | previewPdfUrl | string | | optional | |
Configuration parameters for a team
Struct: Team
Key | Field | Type | Description | Requiredness | Default value |
1 | id | string | | default | |
2 | name | string | | default | |
3 | subdomain | string | | default | |
4 | owner | user.User | | default | |
5 | config | TeamConfig | | default | |
6 | createdAt | i64 | | default | |
7 | updatedAt | i64 | | default | |
8 | regionId | string | | default | |
9 | isTrial | bool | | default | |
10 | isDisabled | bool | | default | |
11 | expireAt | i64 | | default | |
Information about a team
Struct: TeamModular
Key | Field | Type | Description | Requiredness | Default value |
1 | id | string | | default | |
2 | name | string | | default | |
3 | subdomain | string | | default | |
4 | createdAt | i64 | | default | |
5 | updatedAt | i64 | | default | |
6 | regionId | string | | default | |
101 | owner | user.User | | optional | |
102 | config | TeamConfig | | optional | |
Information about a team, modular
Struct: Region
Key | Field | Type | Description | Requiredness | Default value |
1 | id | string | A region code, such as "us-west-2" or "eu-west-1"
| default | |
2 | apiHost | string | The hostname part of the REST API. The API itself is located at
https://<apiHost>/api/
| default | |
3 | sigHost | string | Access to real-time updates are via this host, and the websocket protocol.
| default | |
4 | staticHost | string | | default | |
Structure used to indicate the correct hostnames to contact, for
customers with non-US deployments.
Struct: TeamStatusOptions
Key | Field | Type | Description | Requiredness | Default value |
1 | isTrial | bool | | optional | |
2 | isTest | bool | | optional | |
3 | isDisabled | bool | | optional | |
Services
Service: TeamService
Function: TeamService.listAllRegions
list<string
>
listAllRegions()
throws common.SystemException
Unauthenticated endpoint returning the list of available region ids
Function: TeamService.get
Team
get(string
teamId)
throws common.SystemException
Get information about a team by ID; user must belong to the team
Function: TeamService.index
list<Team
>
index()
throws common.SystemException
Returns the list of teams the current user belongs to
Function: TeamService.setTemplateApprovalWebhook
void
setTemplateApprovalWebhook(string
teamId,
string
webhookUrl)
throws common.SystemException
Sets the webhook to be used for template approval flow.
This webhook is invoked when a job template has been set to "Ready for approval" status. The
webhookURL
is called using POST, with JSON content like:
{
"templateId": "TEMPLATE_GUID",
"publicVersion": 3,
"submitterId": "USER_GUID"
}
Call with an empty string to clear any previously configured webhook.
Function: TeamService.setTemplateSetApprovalWebhook
void
setTemplateSetApprovalWebhook(string
teamId,
string
webhookUrl)
throws common.SystemException
Sets the webhook to be used for the template set approval flow.
This webhook is invoked when a template set has been set to "Ready for approval" status. The
webhookURL
is called using POST, with JSON content like:
{
"templateSetId": "TEMPLATE_GUID",
"publicVersion": 3,
"submitterId": "USER_GUID"
}
Call with an empty string to clear any previously configured webhook.