Affinda Add x-hidden to endpoints API
Hidden endpoints not intended for public use. These endpoints include Splitting, Extractor, Organization, and Workspace Memberships & Usage functionality.
Hidden endpoints not intended for public use. These endpoints include Splitting, Extractor, Organization, and Workspace Memberships & Usage functionality.
openapi: 3.0.3
info:
title: Affinda Annotations Add x-hidden to endpoints API
version: 3.0.0
description: Affinda Annotations API — subset of the Affinda v3 Document Processing API.
servers:
- url: https://{region}.affinda.com
description: 'Select the correct server for your instance: api (AUS/Global), api.us1 (US), or api.eu1 (EU).'
variables:
region:
default: api
description: The instance region. Use 'api' for AUS/Global, 'api.us1' for US, or 'api.eu1' for EU. You can find your region in the Affinda web app URL.
enum:
- api
- api.eu1
- api.us1
x-ms-parameter-location: client
security:
- ApiKeyAuth: []
tags:
- name: Add x-hidden to endpoints
description: 'Hidden endpoints not intended for public use.
These endpoints include Splitting, Extractor, Organization, and Workspace Memberships & Usage functionality.
'
paths:
/v3/organizations:
post:
tags:
- Add x-hidden to endpoints
x-hidden: true
summary: Create a new organization
operationId: createOrganization
description: Create a new organization.
responses:
'201':
description: Returns the created organization.
content:
application/json:
schema:
$ref: '#/components/schemas/Organization'
'400':
$ref: '#/components/responses/400Error'
'401':
$ref: '#/components/responses/401Error'
default:
$ref: '#/components/responses/DefaultError'
requestBody:
description: Organization to create.
required: true
content:
multipart/form-data:
schema:
$ref: '#/components/schemas/OrganizationCreate'
/v3/organizations/{identifier}:
patch:
tags:
- Add x-hidden to endpoints
x-hidden: true
summary: Update an organization
operationId: updateOrganization
description: Update the detail of an organization.
parameters:
- in: path
required: true
name: identifier
description: Organization identifier.
schema:
$ref: '#/components/schemas/Organization_properties-identifier'
requestBody:
required: true
content:
multipart/form-data:
schema:
$ref: '#/components/schemas/OrganizationUpdate'
responses:
'200':
description: Successfully updated organization.
content:
application/json:
schema:
$ref: '#/components/schemas/Organization'
'400':
$ref: '#/components/responses/400Error'
'401':
$ref: '#/components/responses/401Error'
default:
$ref: '#/components/responses/DefaultError'
delete:
tags:
- Add x-hidden to endpoints
x-hidden: true
summary: Delete an organization
operationId: deleteOrganization
description: Delete the specified organization from the database.
parameters:
- in: path
required: true
name: identifier
description: Organization identifier.
schema:
$ref: '#/components/schemas/Organization_properties-identifier'
responses:
'204':
$ref: '#/components/responses/204NoContent'
'400':
$ref: '#/components/responses/400Error'
'401':
$ref: '#/components/responses/401Error'
default:
$ref: '#/components/responses/DefaultError'
/v3/organization_memberships:
get:
tags:
- Add x-hidden to endpoints
x-hidden: true
summary: Get list of all organization memberships
operationId: getAllOrganizationMemberships
description: Returns all the organization memberships
parameters:
- $ref: '#/components/parameters/offsetParam'
- $ref: '#/components/parameters/limitParam'
- in: query
name: organization
schema:
$ref: '#/components/schemas/Organization_properties-identifier'
description: Filter by organization.
- in: query
name: role
schema:
$ref: '#/components/schemas/OrganizationRole'
description: Filter by role.
responses:
'200':
description: Memberships of the organizations you created or joined.
content:
application/json:
schema:
type: object
required:
- results
- count
allOf:
- $ref: '#/components/schemas/PaginatedResponse'
- type: object
properties:
results:
type: array
items:
$ref: '#/components/schemas/OrganizationMembership'
'400':
$ref: '#/components/responses/400Error'
'401':
$ref: '#/components/responses/401Error'
default:
$ref: '#/components/responses/DefaultError'
/v3/organization_memberships/{identifier}:
get:
tags:
- Add x-hidden to endpoints
x-hidden: true
summary: Get detail of an organization membership
operationId: getOrganizationMembership
description: Get detail of an organization membership.
parameters:
- in: path
required: true
name: identifier
description: Membership identifier.
schema:
$ref: '#/components/schemas/Identifier'
responses:
'200':
description: Successfully retrieved organization membership.
content:
application/json:
schema:
$ref: '#/components/schemas/OrganizationMembership'
'400':
$ref: '#/components/responses/400Error'
'401':
$ref: '#/components/responses/401Error'
default:
$ref: '#/components/responses/DefaultError'
patch:
tags:
- Add x-hidden to endpoints
x-hidden: true
summary: Update an organization membership
description: The admin users can use this endpoint to update the role of the members within their organization.
operationId: updateOrganizationMembership
parameters:
- in: path
required: true
name: identifier
description: Membership identifier.
schema:
$ref: '#/components/schemas/Identifier'
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/OrganizationMembershipUpdate'
responses:
'200':
description: Successfully updated organization membership.
content:
application/json:
schema:
$ref: '#/components/schemas/OrganizationMembership'
'400':
$ref: '#/components/responses/400Error'
'401':
$ref: '#/components/responses/401Error'
default:
$ref: '#/components/responses/DefaultError'
delete:
tags:
- Add x-hidden to endpoints
x-hidden: true
summary: Delete an organization membership
operationId: deleteOrganizationMembership
description: The admin users can use this endpoint to remove member from their organization. Other users can also use this to leave their organization.
parameters:
- in: path
required: true
name: identifier
description: Membership identifier.
schema:
$ref: '#/components/schemas/Identifier'
responses:
'204':
$ref: '#/components/responses/204NoContent'
'400':
$ref: '#/components/responses/400Error'
'401':
$ref: '#/components/responses/401Error'
default:
$ref: '#/components/responses/DefaultError'
components:
schemas:
resthookSignatureKey:
type: string
nullable: true
description: Used to sign webhook payloads so you can verify their integrity.
example: 465c6598bd34c0558f0ce256c43209d49fa85b0ff3e4c18b24e408b7563143ad
Organization_properties-name:
type: string
example: Grove Street King
ThemeConfig:
type: object
properties:
palette:
type: object
properties:
mode:
type: string
enum:
- light
- dark
background:
oneOf:
- type: string
- type: object
properties:
default:
type: string
paper:
type: string
text:
type: object
properties:
primary:
type: string
secondary:
type: string
disabled:
type: string
divider:
type: string
primary:
$ref: '#/components/schemas/PaletteColorOptions'
secondary:
$ref: '#/components/schemas/PaletteColorOptions'
success:
$ref: '#/components/schemas/PaletteColorOptions'
annotation:
$ref: '#/components/schemas/PaletteColorOptions'
error:
$ref: '#/components/schemas/PaletteColorOptions'
info:
$ref: '#/components/schemas/PaletteColorOptions'
warning:
$ref: '#/components/schemas/PaletteColorOptions'
typography:
type: object
properties:
fontFamily:
type: string
fontSize:
oneOf:
- type: string
- type: number
fontWeightRegular:
type: string
fontWeightMedium:
type: string
fontWeightBold:
type: string
borderRadius:
type: number
fontUrl:
type: string
RequestError:
type: object
additionalProperties: false
required:
- type
- errors
properties:
type:
type: string
example: validation_error
errors:
type: array
items:
type: object
required:
- attr
- code
- detail
properties:
attr:
type: string
nullable: true
example: non_field_errors
code:
type: string
example: unique
detail:
type: string
example: This index name has already been used
avatar:
type: string
format: binary
description: Upload avatar for the organization.
Identifier:
type: string
description: A random string that uniquely identify the resource.
PaginatedResponse:
type: object
required:
- count
properties:
count:
type: integer
example: 10
description: Number of items in results.
minimum: 0
next:
type: string
nullable: true
description: URL to request next page of results.
previous:
type: string
nullable: true
description: URL to request previous page of results.
Organization_properties-identifier:
type: string
description: Uniquely identify an organization.
example: mEFayXdO
OrganizationCreate:
type: object
required:
- name
properties:
name:
$ref: '#/components/schemas/Organization_properties-name'
avatar:
type: string
format: binary
description: Upload avatar for the organization.
resthookSignatureKey:
$ref: '#/components/schemas/resthookSignatureKey'
OrganizationRole:
type: string
enum:
- admin
- member
example: admin
OrganizationMembershipUpdate:
type: object
properties:
role:
$ref: '#/components/schemas/OrganizationRole'
validationToolConfig:
type: object
nullable: true
description: Configuration of the embeddable validation tool.
properties:
theme:
$ref: '#/components/schemas/ThemeConfig'
hideActions:
type: boolean
description: Hide the confirm document button and other actions.
hideCollection:
type: boolean
description: Hide the collection selector.
hideEditPages:
type: boolean
description: Hide the edit pages button.
hideExport:
type: boolean
description: Hide the export menu.
hideFilename:
type: boolean
description: Hide the filename input.
hideShowRawValues:
type: boolean
description: Hide the toggle for showing raw annotation values.
hideReject:
type: boolean
description: Hide the reject document button.
hideReparse:
type: boolean
description: Hide the reparse button.
hideRunOcr:
type: boolean
description: Hide the run OCR button.
hideTags:
type: boolean
description: Hide the tags editor.
hideWarnings:
type: boolean
description: Hide the warnings panel.
restrictDocumentSplitting:
type: boolean
description: Disable the page editor after a document has been split once.
disableCurrencyFormatting:
type: boolean
description: Disable currency formatting of decimals values.
disableEditDocumentMetadata:
type: boolean
description: Disable editing document metadata. Makes the collection selector, filename input and tags editor read only.
disableManualAnnotationEditing:
type: boolean
description: Disable manual editing of annotation values via the validation popover.
hideDocumentStatus:
type: boolean
description: Hide the document status indicator in the toolbar.
User:
type: object
properties:
id:
type: integer
description: Uniquely identify a user.
example: 1
minimum: 1
name:
type: string
example: Carl Johnson
username:
type: string
example: carljohnson
email:
type: string
example: carljohnson@grove.street
avatar:
type: string
nullable: true
description: URL of the user's avatar.
example: https://affinda-api.s3.amazonaws.com/media/user-avatar.png?AWSAccessKeyId=KEY&Signature=SIG
OrganizationUpdate:
type: object
properties:
name:
$ref: '#/components/schemas/Organization_properties-name'
avatar:
$ref: '#/components/schemas/avatar'
resthookSignatureKey:
$ref: '#/components/schemas/resthookSignatureKey'
validationToolConfig:
$ref: '#/components/schemas/validationToolConfig'
Organization:
type: object
properties:
identifier:
type: string
description: Uniquely identify an organization.
example: mEFayXdO
name:
type: string
example: Grove Street King
userRole:
type: string
allOf:
- $ref: '#/components/schemas/OrganizationRole'
nullable: true
description: The role of the logged in user within the organization.
avatar:
type: string
nullable: true
description: URL of the organization's avatar.
example: https://affinda-api.s3.amazonaws.com/media/org-avatar.png?AWSAccessKeyId=KEY&Signature=SIG
resthookSignatureKey:
type: string
nullable: true
description: Used to sign webhook payloads so you can verify their integrity.
example: 465c6598bd34c0558f0ce256c43209d49fa85b0ff3e4c18b24e408b7563143ad
isTrial:
type: boolean
validationToolConfig:
type: object
nullable: true
description: Configuration of the embeddable validation tool.
properties:
theme:
$ref: '#/components/schemas/ThemeConfig'
hideActions:
type: boolean
description: Hide the confirm document button and other actions.
hideCollection:
type: boolean
description: Hide the collection selector.
hideEditPages:
type: boolean
description: Hide the edit pages button.
hideExport:
type: boolean
description: Hide the export menu.
hideFilename:
type: boolean
description: Hide the filename input.
hideShowRawValues:
type: boolean
description: Hide the toggle for showing raw annotation values.
hideReject:
type: boolean
description: Hide the reject document button.
hideReparse:
type: boolean
description: Hide the reparse button.
hideRunOcr:
type: boolean
description: Hide the run OCR button.
hideTags:
type: boolean
description: Hide the tags editor.
hideWarnings:
type: boolean
description: Hide the warnings panel.
restrictDocumentSplitting:
type: boolean
description: Disable the page editor after a document has been split once.
disableCurrencyFormatting:
type: boolean
description: Disable currency formatting of decimals values.
disableEditDocumentMetadata:
type: boolean
description: Disable editing document metadata. Makes the collection selector, filename input and tags editor read only.
disableManualAnnotationEditing:
type: boolean
description: Disable manual editing of annotation values via the validation popover.
hideDocumentStatus:
type: boolean
description: Hide the document status indicator in the toolbar.
showCustomFieldCreation:
type: boolean
description: Whether to show the custom field creation in the UI.
OrganizationMembership:
type: object
required:
- identifier
- organization
- user
- role
properties:
identifier:
$ref: '#/components/schemas/Identifier'
organization:
$ref: '#/components/schemas/Organization_properties-identifier'
user:
$ref: '#/components/schemas/User'
role:
$ref: '#/components/schemas/OrganizationRole'
PaletteColorOptions:
type: object
required:
- main
properties:
main:
type: string
light:
type: string
dark:
type: string
contrastText:
type: string
responses:
DefaultError:
description: UnexpectedError
content:
application/json:
schema:
$ref: '#/components/schemas/RequestError'
x-ms-error-response: true
400Error:
description: Bad request. If it is a validation error will contain a list of each invalid field
content:
application/json:
schema:
$ref: '#/components/schemas/RequestError'
x-ms-error-response: true
204NoContent:
description: Delete successful, no content returned
401Error:
description: Authorisation error
content:
application/json:
schema:
$ref: '#/components/schemas/RequestError'
x-ms-error-response: true
parameters:
limitParam:
in: query
name: limit
required: false
schema:
type: integer
minimum: 1
maximum: 100
example: 20
description: The numbers of results to return.
x-ms-parameter-location: method
offsetParam:
in: query
name: offset
required: false
schema:
type: integer
minimum: 0
example: 0
description: The number of documents to skip before starting to collect the result set.
x-ms-parameter-location: method
securitySchemes:
ApiKeyAuth:
type: http
scheme: bearer
description: 'Basic authentication using an API key, e.g. `{Authorization: Bearer aff_0bb4fbdf97b7e4111ff6c0015471094155f91}`.
You can find your API key within the Settings page of the [Affinda web app](https://app.affinda.com/). You can obtain an API key by [signing up for a free trial](https://app.affinda.com/auth/register).'