openapi: 3.0.1 info: license: name: Apache 2.0 url: http://www.apache.org/licenses/LICENSE-2.0.html title: Benchling AA Sequences Organizations API version: 2.0.0 description: 'AA Sequences are the working units of cells that make everything run (they help make structures, catalyze reactions and allow for signaling - a kind of internal cell communication). On Benchling, these are comprised of a string of amino acids and collections of other attributes, such as annotations. ' servers: - url: /api/v2 security: - oAuth: [] - basicApiKeyAuth: [] tags: - description: View organization objects. name: Organizations paths: /organizations: get: description: "Returns all organizations that the caller has permission to view. The following roles have view permission:\n - tenant admins\n - members of the organization\n" operationId: listOrganizations parameters: - description: 'Comma-separated list of ids. Matches all of the provided IDs, or returns a 400 error that includes a list of which IDs are invalid. ' in: query name: ids schema: example: ent_ZJy8RTbo,ent_8GVbVkPj,ent_qREJ33rn type: string - description: Name of an organization. Restricts results to those with the specified name. in: query name: name schema: type: string - description: Name substring of an organization. Restricts results to those with names that include the provided substring. in: query name: nameIncludes schema: type: string - description: 'Comma-separated list of names. Maximum of 100. Restricts results to those that match any of the specified names, case insensitive. Warning - this filter can be non-performant due to case insensitivity. ' in: query name: names.anyOf schema: example: MyName1,MyName2 type: string - description: 'Comma-separated list of names. Maximum of 100. Restricts results to those that match any of the specified names, case sensitive. ' in: query name: names.anyOf.caseSensitive schema: example: MyName1,MyName2 type: string - description: 'Datetime, in RFC 3339 format. Supports the > and < operators. Time zone defaults to UTC. Restricts results to those modified in the specified range. e.g. > 2017-04-30. Date ranges can be specified with the following nomenclature > YYYY-MM-DD AND 2022-03-01 AND < 2022-04-01' full-rfc-3339-format: summary: Filter for modified models using the full RFC 3339 format value: '> 2020-12-31T21:07:14-05:00' greater-than-example: summary: Filter for all models modified after a certain date value: '> 2022-03-01' in: query name: modifiedAt schema: type: string - description: Comma-separated list of user or Benchling app IDs. Restricts results to organizations that include all the given users/apps as members. in: query name: hasMembers schema: type: string - description: Comma-separated list of user or Benchling app IDs. Restricts results to organizations that include all the given users/apps as admins. in: query name: hasAdmins schema: type: string - in: query name: pageSize schema: default: 50 maximum: 100 minimum: 0 nullable: false type: integer - description: Token for pagination in: query name: nextToken schema: type: string - in: query name: sort schema: default: modifiedAt:desc description: 'Sets the sort-order of the response. Valid sorts are modifiedAt (modified time, most recent first) and name (organization name, alphabetical). Optionally add :asc or :desc to specify ascending or descending order. ' enum: - createdAt - createdAt:asc - createdAt:desc - modifiedAt - modifiedAt:asc - modifiedAt:desc - name - name:asc - name:desc nullable: false type: string responses: '200': content: application/json: schema: $ref: '#/components/schemas/OrganizationsPaginatedList' description: OK '400': content: application/json: schema: $ref: '#/components/schemas/BadRequestError' description: Bad Request summary: List organizations tags: - Organizations /organizations/{organization_id}: get: description: "Returns an organization by ID if the caller has permission to view. The following roles have view permission:\n - tenant admins\n - members of the organization\n" operationId: getOrganization parameters: - description: ID of organization to get in: path name: organization_id required: true schema: type: string responses: '200': content: application/json: schema: $ref: '#/components/schemas/Organization' description: OK '404': content: application/json: schema: $ref: '#/components/schemas/NotFoundError' description: Not Found summary: Get an organization by ID tags: - Organizations /organizations/{organization_id}/memberships: get: description: 'Returns all organization memberships in the given organization ' operationId: listOrganizationMemberships parameters: - description: Number of results to return. in: query name: pageSize schema: default: 50 maximum: 100 nullable: false type: integer - description: Token for pagination in: query name: nextToken schema: type: string - in: path name: organization_id required: true schema: type: string - in: query name: role required: false schema: example: ADMIN type: string responses: '200': content: application/json: schema: $ref: '#/components/schemas/MembershipsPaginatedList' description: OK '404': content: application/json: schema: $ref: '#/components/schemas/NotFoundError' description: Not Found summary: 'List organization memberships ' tags: - Organizations post: description: 'Create organization membership for the given user, role, and organization ' operationId: createOrganizationMembership parameters: - in: path name: organization_id required: true schema: type: string requestBody: content: application/json: schema: $ref: '#/components/schemas/MembershipCreate' responses: '201': content: application/json: schema: $ref: '#/components/schemas/Membership' description: Created '400': content: application/json: schema: $ref: '#/components/schemas/BadRequestError' description: Bad Request '403': content: application/json: schema: $ref: '#/components/schemas/ForbiddenError' description: Forbidden '404': content: application/json: schema: $ref: '#/components/schemas/NotFoundError' description: Not Found summary: 'Create organization membership ' tags: - Organizations /organizations/{organization_id}/memberships/{user_id}: delete: description: 'Delete a single organization membership ' operationId: deleteOrganizationMembership parameters: - in: path name: organization_id required: true schema: type: string - in: path name: user_id required: true schema: type: string responses: '204': description: No Content '403': content: application/json: schema: $ref: '#/components/schemas/ForbiddenError' description: Forbidden '404': content: application/json: schema: $ref: '#/components/schemas/NotFoundError' description: Not Found summary: 'Delete organization membership by user ID and organization ID ' tags: - Organizations get: description: 'Returns organization membership in the given organization for the given user ' operationId: getOrganizationMembership parameters: - in: path name: organization_id required: true schema: type: string - in: path name: user_id required: true schema: type: string responses: '200': content: application/json: schema: $ref: '#/components/schemas/Membership' description: OK '404': content: application/json: schema: $ref: '#/components/schemas/NotFoundError' description: Not Found summary: 'Get organization membership ' tags: - Organizations patch: description: 'Update a single organization membership ' operationId: updateOrganizationMembership parameters: - in: path name: organization_id required: true schema: type: string - in: path name: user_id required: true schema: type: string requestBody: content: application/json: schema: $ref: '#/components/schemas/MembershipUpdate' responses: '200': content: application/json: schema: $ref: '#/components/schemas/Membership' description: OK '400': content: application/json: schema: $ref: '#/components/schemas/BadRequestError' description: Bad Request '403': content: application/json: schema: $ref: '#/components/schemas/ForbiddenError' description: Forbidden '404': content: application/json: schema: $ref: '#/components/schemas/NotFoundError' description: Not Found summary: 'Update organization membership by user ID and organization ID ' tags: - Organizations components: schemas: UserSummary: allOf: - $ref: '#/components/schemas/PartySummary' - example: handle: lpasteur id: ent_a0SApq3z name: Louis Pasteur BadRequestError: properties: error: allOf: - $ref: '#/components/schemas/BaseError' - properties: type: enum: - invalid_request_error type: string type: object ForbiddenError: properties: error: properties: invalidId: type: string message: type: string type: type: string userMessage: type: string type: object type: object OrganizationsPaginatedList: allOf: - $ref: '#/components/schemas/Pagination' - properties: organizations: items: $ref: '#/components/schemas/Organization' type: array type: object NotFoundError: properties: error: allOf: - $ref: '#/components/schemas/BaseError' - properties: invalidId: type: string type: enum: - invalid_request_error type: string type: object Organization: properties: handle: type: string id: type: string name: type: string type: object PartySummary: properties: handle: type: string id: type: string name: type: string type: object BaseError: properties: message: type: string type: type: string userMessage: type: string type: object Pagination: properties: nextToken: type: string Membership: properties: role: enum: - ADMIN - MEMBER type: string user: $ref: '#/components/schemas/UserSummary' MembershipCreate: properties: role: enum: - ADMIN - MEMBER example: ADMIN type: string userId: example: ent_a0SApq3z type: string MembershipsPaginatedList: allOf: - $ref: '#/components/schemas/Pagination' - properties: memberships: items: $ref: '#/components/schemas/Membership' type: array MembershipUpdate: properties: role: enum: - ADMIN - MEMBER type: string securitySchemes: basicApiKeyAuth: description: Use issued API key for standard access to the API scheme: basic type: http basicClientIdSecretAuth: description: Auth used as part of client credentials OAuth flow prior to receiving a bearer token. scheme: basic type: http oAuth: description: OAuth2 Client Credentials flow intended for service access flows: clientCredentials: scopes: {} tokenUrl: /api/v2/token type: oauth2 externalDocs: description: Additional API Documentation url: https://docs.benchling.com