openapi: 3.0.4
info:
title: Bench AccountActivities Accounts API
description: "<h2>Versioning</h2>\n<p>\n The API is currently at version <code>1.0</code>. All API endpoints (other than\n authentication) require you to specify the API version as part of the path.\n</p>\n\n<h2>URL Paths</h2>\n<p>\n Authentication requests should be made to <code>/auth/signin</code>,\n as documented below. All other API requests should be made to\n sub-paths of <code>/rp/api/1.0/...</code>.\n</p>\n\n<h2>Authentication</h2>\n<p>\n API requests are authenticated using an OAuth Bearer token.\n You can get a token by authenticating your user by sending a\n POST request to <code>/auth/signin</code>, with \"username and \"password\"\n parameters form-encoded in the body of the request.\n\n POST /auth/signin HTTP/1.1\n Content-Type: application/x-www-form-urlencoded\n\n username=user@example.com&password=some-secret-password\n</p>\n<p>\n The response will be a JSON object including both\n <b>\"access_token\"</b> and <b>\"refresh_token\"</b> property.\n All other requests against the Bench API should include an\n authorization header: <code>Authorization: Bearer xxxYYYzzz</code>,\n where <b>xxxYYYzzz</b> is the value of <b>\"access_token\"</b> in the response.\n <br><br>\n For example:\n\n $ curl https://bench.gobridgit.com/auth/signin -H 'Content-Type: application/x-www-form-urlencoded' --data-urlencode 'username=someone@example.com' --data-urlencode 'password=[...snip...]'\n {\n \"access_token\": \"...snip...\",\n \"token_type\": \"Bearer\",\n \"refresh_token\": \"...snip...\"\n \"expiry\": \"2020-01-01T00:00:00.413440849Z\"\n }\n\n</p>\n\n<p>\n The refresh token can be used to generate new session by request with <code>/auth/token</code> endpoint:\n\n POST /auth/token HTTP/1.1\n Content-Type: application/x-www-form-urlencoded\n\n grant_type=refresh_token&refresh_token=tGzv3JOkF0XG5Qx2TlKWIA\n</p>\n<p>\n Note that once the refresh token is used, the previous access and refresh token is no longer valid.\n <br><br>\n For example:\n\n $ curl https://bench.gobridgit.com/auth/token -H 'Content-Type: application/x-www-form-urlencoded' --data-urlencode 'grant_type=refresh_token' --data-urlencode 'refresh_token=[...snip...]'\n {\n \"access_token\": \"...snip...\",\n \"token_type\": \"Bearer\",\n \"refresh_token\": \"...snip...\"\n \"expiry\": \"2020-01-01T00:00:00.413440849Z\"\n }\n</p>\n\n<h2>Pagination</h2>\n<p>\n Several of the API endpoints are paginated. These are denoted by\n including the <code>offset</code> (zero-based offset) and <code>limit</code> query\n parameters. For example, to request the <code>10</code> items,\n set the <code>offset=0</code> to <code>limit=10</code>.\n <br>\n NOTE: the result set contains items with index of 0-9\n <br>\n To request the next 10 items (starting at index 10),\n set the <code>offset=10</code> to <code>limit=10</code>\n</p>\n<p>\n Responses to paginated API endpoints return a JSON array of objects.\n If there are results beyond the page you have requested, the server\n will set a <code>query-has-more: true</code> header in the response.\n</p>\n\n<h2>Request Encoding</h2>\n<p>\n <code>GET</code> and <code>DELETE</code> requests should have parameters encoded as URL query\n parameters. Boolean values should be encoded as <code>true</code> and\n <code>false</code>, not as <code>1</code> and <code>0</code>.\n</p>\n\n<h2>Errors</h2>\n<p>\n Errors are returned for some response codes such as <code>400 Bad Request</code> in the\n following format:\n\n {\n \"errors\": [\n {\n \"errorType\": \"ValidationError\",\n \"description\": \"The value of Name must be a string with a minimum length of 1 and a maximum length of 8 and not whitespace.\",\n \"field\": \"Name\",\n \"values\": [\n null\n ]\n }\n ],\n \"title\": \"One or more validation errors occurred.\",\n \"status\": 400,\n \"instance\": \"api/v1/accounts/0/persons\",\n \"requestUid\": \"123e4567-e89b-12d3-a456-426614174000\"\n }\n</p>\n"
version: '1.0'
servers:
- url: https://bench.gobridgit.com
description: Bridgit Bench production
security:
- {}
tags:
- name: Accounts
paths:
/rp/api/v1/Accounts:
get:
tags:
- Accounts
summary: Get all accounts that the user has access to.
operationId: Accounts_Query
parameters:
- name: offset
in: query
description: Offset for pagination
schema:
maximum: 2147483647
minimum: 0
type: integer
format: int32
default: 0
- name: limit
in: query
description: Maximum number of results in this page
schema:
maximum: 2147483647
minimum: 1
type: integer
format: int32
default: 1000
responses:
'200':
description: 'Success: All account models the user has access to'
content:
text/plain:
schema:
type: array
items:
$ref: '#/components/schemas/AccountResponse'
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/AccountResponse'
text/json:
schema:
type: array
items:
$ref: '#/components/schemas/AccountResponse'
'401':
description: Unauthorized
'403':
description: Forbidden
/rp/api/v1/Accounts/_filter:
post:
tags:
- Accounts
summary: 'Get all accounts that the user has access to, filter by name (contains), account ids, organization ids, and/or account states (0 = Active, 1 = Deactivated, 2 = All).
Sort options include: name = 0, numProjects = 1, numPeople = 2, numMembers = 3 and organizationId = 4
Sort order options include: asc = 0, desc = 1'
description: <strong>NOTE:</strong> Paging limit defaults to 50, and is maximized at 100 items per request. If there are more accounts than were returned, there will be a "query-has-more" header that will be set to true.
operationId: Accounts_QueryFilter
requestBody:
content:
application/json-patch+json:
schema:
$ref: '#/components/schemas/AccountFilterPredicatesAccountSortSortedFilter'
application/json:
schema:
$ref: '#/components/schemas/AccountFilterPredicatesAccountSortSortedFilter'
text/json:
schema:
$ref: '#/components/schemas/AccountFilterPredicatesAccountSortSortedFilter'
application/*+json:
schema:
$ref: '#/components/schemas/AccountFilterPredicatesAccountSortSortedFilter'
required: true
responses:
'200':
description: 'Success: All account models the user has access to'
content:
text/plain:
schema:
type: array
items:
$ref: '#/components/schemas/AccountResponse'
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/AccountResponse'
text/json:
schema:
type: array
items:
$ref: '#/components/schemas/AccountResponse'
'401':
description: Unauthorized
'403':
description: Forbidden
/rp/api/v1/Accounts/{id}:
get:
tags:
- Accounts
summary: Gets details for the given account
description: '<br/><strong>Permissions</strong><br/>Account: Read'
operationId: Accounts_Get
parameters:
- name: id
in: path
description: The Account ID
required: true
schema:
type: integer
format: int32
responses:
'200':
description: 'Success: Account model'
content:
text/plain:
schema:
$ref: '#/components/schemas/AccountResponse'
application/json:
schema:
$ref: '#/components/schemas/AccountResponse'
text/json:
schema:
$ref: '#/components/schemas/AccountResponse'
'400':
description: Bad Request
'401':
description: Unauthorized
'403':
description: Forbidden
/rp/api/v1/Accounts/{id}/person-field-values:
get:
tags:
- Accounts
summary: Get all custom field values for all people for the given account
description: '<br/><strong>Permissions</strong><br/>HourlyProfile: Read<br/>Person: Read<br/>Private: Read<br/>Finance: Read'
operationId: Accounts_QueryProfiles
parameters:
- name: id
in: path
description: The Account ID
required: true
schema:
type: integer
format: int32
- name: includeEmpty
in: query
description: If true, the response will include all person field values, even if no value is set for a given field. If false, field values that are empty are not included in the response.
schema:
type: boolean
default: false
- name: state
in: query
description: 'If specified and non-zero, only include field vlaues for people matching the given state. The available values are defined as follows:
- active: include only Active people
- deactivated: include only Deactivated people
- all: include all people, regardless of state'
schema:
enum:
- Active
- Deactivated
- All
type: string
default: Active
- name: personIds
in: query
description: Optional paramater of comma delimited ids for filtering results based on the person IDs provided
schema:
type: array
items:
type: integer
format: int64
- name: offset
in: query
description: The offset of the result to begin with
schema:
maximum: 2147483647
minimum: 0
type: integer
format: int32
default: 0
- name: limit
in: query
description: Optional - The number of items return by result set. If no limit given, return all results
schema:
maximum: 2147483647
minimum: 1
type: integer
format: int32
default: 1000
- name: employeeId
in: query
description: Optional - for filtering result by system field "Employee ID"
schema:
type: string
responses:
'200':
description: 'Success: All person field values by person Id on the account'
content:
text/plain:
schema:
type: array
items:
$ref: '#/components/schemas/ProfileResponse'
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/ProfileResponse'
text/json:
schema:
type: array
items:
$ref: '#/components/schemas/ProfileResponse'
'400':
description: Bad Request
'401':
description: Unauthorized
'403':
description: Forbidden
/rp/api/v1/Accounts/{id}/project-field-values:
get:
tags:
- Accounts
summary: Get all custom field values for all projects for the given account
description: '<br/><strong>Permissions</strong><br/>Project: Read<br/>Private: Read<br/>Finance: Read'
operationId: Accounts_QueryProjectFieldValues
parameters:
- name: id
in: path
description: The Account ID
required: true
schema:
type: integer
format: int32
- name: includeEmpty
in: query
description: If true, the response will include all project field values, even if no value is set for a given field. If false, field values that are empty are not included in the response.
schema:
type: boolean
default: false
- name: projectIds
in: query
description: Optional paramater of comma delimited ids for filtering results based on the project IDs provided
schema:
type: array
items:
type: integer
format: int64
- name: offset
in: query
description: The offset of the result to begin with
schema:
maximum: 2147483647
minimum: 0
type: integer
format: int32
default: 0
- name: limit
in: query
description: Optional - The number of items return by result set. If no limit given, return all results
schema:
maximum: 2147483647
minimum: 1
type: integer
format: int32
default: 1000
- name: projectNumber
in: query
description: Optional - for filtering result by system field "Project Number"
schema:
type: string
- name: externalId
in: query
description: Optional - for filtering result by system field "External ID"
schema:
type: string
- name: classification
in: query
description: 'Optional - for filtering result by classification: All or Experience"'
schema:
enum:
- All
- Experience
type: string
default: All
responses:
'200':
description: 'Success: All project field values by person id on the account'
content:
text/plain:
schema:
type: array
items:
$ref: '#/components/schemas/ProjectFieldValuesResponse'
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/ProjectFieldValuesResponse'
text/json:
schema:
type: array
items:
$ref: '#/components/schemas/ProjectFieldValuesResponse'
'400':
description: Bad Request
'401':
description: Unauthorized
'403':
description: Forbidden
/rp/api/v1/Accounts/{id}/tasks:
get:
tags:
- Accounts
summary: Get all Tasks for all projects in the given account
description: '<br/><strong>Permissions</strong><br/>Project: Read<br/>Person: Read<br/>Role: Read<br/>Allocation: Read'
operationId: Accounts_QueryTasks
parameters:
- name: id
in: path
description: The Account ID
required: true
schema:
type: integer
format: int32
- name: relativeDate
in: query
description: Optional paramater used to calculate date based properties. If not provided, it is set to today's date in UTC.
schema:
type: string
format: date-time
example: '2021-01-01'
example: '2021-01-01'
- name: offset
in: query
description: Offset for pagination
schema:
maximum: 2147483647
minimum: 0
type: integer
format: int32
default: 0
- name: limit
in: query
description: Maximum number of results in this page
schema:
maximum: 2147483647
minimum: 1
type: integer
format: int32
default: 5000
- name: projectIds
in: query
description: (Optional) Filter task(s) to contain tasks that match the projectIds passed in.
schema:
type: array
items:
type: integer
format: int64
- name: projectState
in: query
description: (Optional) Filters the result by the state of the project the role is on
schema:
enum:
- Canceled
- Upcoming
- Active
- Complete
- Pursuit
- Lost
- All
type: string
default: All
- name: taskIds
in: query
description: (Optional) Filters the result to contain tasks that match the taskIds passed in. Works as an AND with filledState and roleNameIds
schema:
type: array
items:
type: string
format: uuid
- name: filledState
in: query
description: (Optional) Filters the result by the filled state of the roles
schema:
enum:
- 0
- 1
- 2
type: integer
format: int32
default: 2
- name: roleIds
in: query
description: (Optional) Filters the result to contain roles that match the ids passed in. Works as an AND with filledState and roleNameIds
schema:
type: array
items:
type: integer
format: int64
- name: roleNameIds
in: query
description: (Optional) Filters the result to contain roles that match the ids passed in. Works as an AND with filledState and roleIds
schema:
type: array
items:
type: integer
format: int64
- name: roleState
in: query
description: '(Optional) Filters the result by the state of the role dates: Current, Upcoming, Past, or All'
schema:
enum:
- Past
- Current
- Upcoming
- All
type: string
default: All
responses:
'200':
description: 'Success: All tasks on projects in the given account with some project information, role requirements and allocations'
content:
text/plain:
schema:
type: array
items:
$ref: '#/components/schemas/ProjectTaskDetail'
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/ProjectTaskDetail'
text/json:
schema:
type: array
items:
$ref: '#/components/schemas/ProjectTaskDetail'
'400':
description: Bad Request
'401':
description: Unauthorized
'403':
description: Forbidden
/rp/api/v1/Accounts/{id}/role-categories:
get:
tags:
- Accounts
summary: Get all categories for all projects in the given account
description: '<br/><strong>Permissions</strong><br/>Project: Read<br/>Role: Read<br/>HourlyRole: Read'
operationId: Accounts_QueryRoleCategories
parameters:
- name: id
in: path
description: The Account ID
required: true
schema:
type: integer
format: int32
- name: offset
in: query
description: Offset for pagination
schema:
maximum: 2147483647
minimum: 0
type: integer
format: int32
default: 0
- name: limit
in: query
description: Maximum number of results in this page
schema:
maximum: 2147483647
minimum: 1
type: integer
format: int32
default: 5000
responses:
'200':
description: 'Success: All categories on projects in the given account'
content:
text/plain:
schema:
type: array
items:
$ref: '#/components/schemas/AccountRoleCategoryResponse'
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/AccountRoleCategoryResponse'
text/json:
schema:
type: array
items:
$ref: '#/components/schemas/AccountRoleCategoryResponse'
'400':
description: Bad Request
'401':
description: Unauthorized
'403':
description: Forbidden
/rp/api/v1/Accounts/{id}/roles:
get:
tags:
- Accounts
summary: Get all Salaried roles for all projects in the given account
description: '<br/><strong>Permissions</strong><br/>Role: Read<br/>Finance: Read'
operationId: Accounts_QueryRoles
parameters:
- name: id
in: path
description: The Account ID
required: true
schema:
type: integer
format: int32
- name: relativeDate
in: query
description: Optional paramater used to calculate date based properties. If not provided, it is set to today's date in UTC.
schema:
type: string
format: date-time
example: '2021-01-01'
example: '2021-01-01'
- name: unfilled
in: query
description: If true, limits the results to include only roles that are unfilled; that is, they don't have any allocations. If false, the results include all roles in the account, both filled and unfilled.
schema:
type: boolean
default: false
- name: offset
in: query
description: Offset for pagination
schema:
maximum: 2147483647
minimum: 0
type: integer
format: int32
default: 0
- name: limit
in: query
description: Maximum number of results in this page
schema:
maximum: 2147483647
minimum: 1
type: integer
format: int32
default: 5000
- name: projectId
in: query
description: (Optional) Filter role(s) for specified project ID
schema:
type: integer
format: int64
- name: filledState
in: query
description: (Optional) Filters the result by the filled state of the roles
schema:
enum:
- 0
- 1
- 2
type: integer
format: int32
default: 2
- name: roleIds
in: query
description: (Optional) Filters the result to contain roles that match the ids passed in. Works as an AND with filledState and roleNameIds
schema:
type: array
items:
type: integer
format: int64
- name: roleNameIds
in: query
description: (Optional) Filters the result to contain roles that match the ids passed in. Works as an AND with filledState and roleIds
schema:
type: array
items:
type: integer
format: int64
- name: projectState
in: query
description: (Optional) Filters the result by the state of the project the role is on
schema:
enum:
- Canceled
- Upcoming
- Active
- Complete
- Pursuit
- Lost
- All
type: string
default: All
- name: roleState
in: query
description: '(Optional) Filters the result by the state of the role dates: Current, Upcoming, Past, or All'
schema:
enum:
- Past
- Current
- Upcoming
- All
type: string
default: All
- name: type
in: query
description: (Optional)Salaried role type to filter results by (Defaults to Operations)
schema:
enum:
- Operations
- Preconstruction
- All
type: string
default: Operations
responses:
'200':
description: 'Success: All roles on projects in the given account with some project information, role requirements and allocations'
content:
text/plain:
schema:
type: array
items:
$ref: '#/components/schemas/ProjectRoleDetail'
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/ProjectRoleDetail'
text/json:
schema:
type: array
items:
$ref: '#/components/schemas/ProjectRoleDetail'
'400':
description: Bad Request
'401':
description: Unauthorized
'403':
description: Forbidden
/rp/api/v1/Accounts/{id}/hourly-roles:
get:
tags:
- Accounts
summary: Get all Hourly roles for all projects in the given account
description: '<br/><strong>Permissions</strong><br/>HourlyRole: Read<br/>Finance: Read'
operationId: Accounts_QueryHourlyRoles
parameters:
- name: id
in: path
description: The Account ID
required: true
schema:
type: integer
format: int32
- name: relativeDate
in: query
description: Optional paramater used to calculate date based properties. If not provided, it is set to today's date in UTC.
schema:
type: string
format: date-time
example: '2021-01-01'
example: '2021-01-01'
- name: offset
in: query
description: Offset for pagination
schema:
maximum: 2147483647
minimum: 0
type: integer
format: int32
default: 0
- name: limit
in: query
description: Maximum number of results in this page
schema:
maximum: 2147483647
minimum: 1
type: integer
format: int32
default: 5000
- name: projectId
in: query
description: (Optional) Filter role(s) for specified project ID
schema:
type: integer
format: int64
- name: filledState
in: query
description: (Optional) Filters the result by the filled state of the roles
schema:
enum:
- 0
- 1
- 2
type: integer
format: int32
default: 2
- name: roleIds
in: query
description: (Optional) Filters the result to contain roles that match the ids passed in. Works as an AND with filledState and roleNameIds
schema:
type: array
items:
type: integer
format: int64
- name: roleNameIds
in: query
description: (Optional) Filters the result to contain roles that match the ids passed in. Works as an AND with filledState and roleIds
schema:
type: array
items:
type: integer
format: int64
- name: projectState
in: query
description: (Optional) Filters the result by the state of the project the role is on
schema:
enum:
- Canceled
- Upcoming
- Active
- Complete
- Pursuit
- Lost
- All
type: string
default: All
- name: roleState
in: query
description: '(Optional) Filters the result by the state of the role dates: Current, Upcoming, Past, or All'
schema:
enum:
- Past
- Current
- Upcoming
- All
type: string
default: All
responses:
'200':
description: 'Success: All roles on projects in the given account with some project information, role requirements and allocations'
content:
text/plain:
schema:
type: array
items:
$ref: '#/components/schemas/ProjectHourlyRoleDetail'
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/ProjectHourlyRoleDetail'
text/json:
schema:
type: array
items:
$ref: '#/components/schemas/ProjectHourlyRoleDetail'
'400':
description: Bad Request
'401':
description: Unauthorized
'403':
description: Forbidden
/rp/api/v1/Accounts/{id}/person-certifications:
get:
tags:
- Accounts
summary: Gets the persons certifications for the given account
description: '<br/><strong>Permissions</strong><br/>HourlyProfile: Read<br/>Person: Read<br/>Private: Read'
operationId: Accounts_QueryPersonCertifications
parameters:
- name: id
in: path
description: The Account ID
required: true
schema:
type: integer
format: int32
- name: personIds
in: query
description: Optional paramater of comma delimited ids for filtering results based on the person IDs provided
schema:
type: array
items:
type: integer
format: int64
- name: offset
in: query
description: Offset for pagination
schema:
maximum: 2147483647
minimum: 0
type: integer
format: int32
default: 0
- name: limit
in: query
description: Maximum number of results in this page
schema:
maximum: 2147483647
minimum: 1
type: integer
format: int32
default: 1000
responses:
'200':
description: 'Success: Lists of person certifications on the account grouped by person ID'
content:
application/json:
schema:
type: object
additionalProperties:
type: array
items:
$ref: '#/components/schemas/PersonCertificationResponse'
example:
'1':
- id: 123
name: Transportation of Dangerous Goods
abbreviation: TDG
expiryDate: '2020-01-23'
daysWarnBeforeExpire: 7
certificationDate: null
certificationDescription: null
hasAttachment: false
state: Expired
'2':
- id: 456
name: CPR Training
abbreviation: CPR
expiryDate: '2020-12-30'
daysWarnBeforeExpire: 9
certificationDate: null
certificationDescription: null
hasAttachment: false
state: Expired
'400':
description: Bad Request
'401':
description: Unauthorized
'403':
description: Forbidden
/rp/api/v1/Accounts/{id}/user-profiles:
get:
tags:
- Accounts
summary: Gets the user profiles for the given account
description: '<br/><strong>Permissions</strong><br/>Account: Read'
operationId: Accounts_QueryUserProfiles
parameters:
- name: id
in: path
description: The Account ID
required: true
schema:
type: integer
format: int32
- name: offset
in: query
description: Offset for pagination
schema:
maximum: 2147483647
minimum: 0
type: integer
format: int32
default: 0
- name: limit
in: query
description: Maximum number of results in this page
schema:
maximum: 2147483647
minimum: 1
type: integer
format: int32
default: 1000
- name: ids
in: query
description: (Optional) Filters the result to contain account users that match the ids passed in.
schema:
type: array
items:
type: integer
format: int32
responses:
'200':
description: 'Success: List of users on the account'
content:
text/plain:
schema:
type: array
items:
$ref: '#/components/schemas/U
# --- truncated at 32 KB (59 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/bridgit/refs/heads/main/openapi/bridgit-accounts-api-openapi.yml