Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- openapi: 3.0.3
- info:
- title: Paperless-ngx
- version: 1.0.0
- contact: {}
- servers:
- - url: ''
- paths:
- /api/storage_paths/:
- get:
- tags:
- - Storage paths
- summary: Get storage paths
- description: >-
- This endpoint retrieves storage paths via an HTTP GET request to the
- specified URL. The request includes query parameters "full_perms" set to
- true and "format" set to json.
- ### Request Body
- This request does not require a request body.
- ### Response Body
- The response will include the storage paths in JSON format.
- #### Response JSON Schema
- ``` json
- {
- "type": "object",
- "properties": {
- "storage_paths": {
- "type": "array",
- "items": {
- "type": "string"
- }
- }
- }
- }
- ```
- operationId: getStoragePaths
- parameters:
- - name: id__in
- in: query
- schema:
- type: string
- example: ''
- - name: name__istartswith
- in: query
- schema:
- type: string
- example: ''
- - name: name__iendswith
- in: query
- schema:
- type: string
- example: ''
- - name: name__icontains
- in: query
- schema:
- type: string
- example: ''
- - name: name__iexact
- in: query
- schema:
- type: string
- example: ''
- - name: path__istartswith
- in: query
- schema:
- type: string
- example: ''
- - name: path__iendswith
- in: query
- schema:
- type: string
- example: ''
- - name: path__icontains
- in: query
- schema:
- type: string
- example: ''
- - name: path__iexact
- in: query
- schema:
- type: string
- example: ''
- - name: id
- in: query
- schema:
- type: string
- example: ''
- - name: ordering
- in: query
- schema:
- type: string
- example: ''
- - name: full_perms
- in: query
- schema:
- type: string
- example: 'true'
- responses:
- '200':
- description: ''
- post:
- tags:
- - Storage paths
- summary: Add storage path
- description: >-
- The endpoint makes an HTTP POST request to create a new storage path
- with the option to grant full permissions. The request payload includes
- parameters such as slug, name, path, match, matching_algorithm,
- is_insensitive, document_count, owner, and set_permissions for view and
- change. The request body is in raw JSON format.
- ### Response
- The response of this request is a JSON schema representing the structure
- of the data returned upon successful creation of the storage path.
- operationId: addStoragePath
- requestBody:
- content:
- application/json:
- schema:
- type: object
- properties:
- document_count:
- type: number
- example: 0
- is_insensitive:
- type: boolean
- example: true
- match:
- type: string
- example: ''
- matching_algorithm:
- type: number
- example: 6
- name:
- type: string
- example: Prova
- owner:
- type: number
- example: 2
- path:
- type: string
- example: Prova
- set_permissions:
- type: object
- properties:
- change:
- type: object
- properties:
- groups:
- type: array
- items:
- type: number
- example: 2
- example:
- - 2
- users:
- type: array
- items:
- type: number
- example: 4
- example:
- - 4
- view:
- type: object
- properties:
- groups:
- type: array
- items:
- type: number
- example: 1
- example:
- - 1
- - 2
- users:
- type: array
- items:
- type: number
- example: 4
- example:
- - 4
- slug:
- type: string
- example: prova12
- example:
- document_count: 0
- is_insensitive: true
- match: ''
- matching_algorithm: 6
- name: Prova
- owner: 2
- path: Prova
- set_permissions:
- change:
- groups:
- - 2
- users:
- - 4
- view:
- groups:
- - 1
- - 2
- users:
- - 4
- slug: prova12
- responses:
- '200':
- description: ''
- /api/storage_paths/{pathId}/:
- put:
- tags:
- - Storage paths
- summary: Update storage path
- description: >-
- ### Update Storage Path
- This endpoint allows the client to update a specific storage path
- identified by `pathId`.
- #### Request Body
- - `slug` (string): A unique identifier for the storage path.
- - `name` (string): The name of the storage path.
- - `path` (string): The path of the storage location.
- #### Response
- The response will be a JSON object conforming to the following schema:
- ``` json
- {
- "type": "object",
- "properties": {
- "status": {
- "type": "string"
- },
- "message": {
- "type": "string"
- },
- "data": {
- "type": "object",
- "properties": {
- "id": {
- "type": "string"
- },
- "slug": {
- "type": "string"
- },
- "name": {
- "type": "string"
- },
- "path": {
- "type": "string"
- }
- }
- }
- }
- }
- ```
- operationId: updateStoragePath
- requestBody:
- content:
- application/json:
- schema:
- type: object
- properties:
- name:
- type: string
- example: ovako/line-production-billets
- path:
- type: string
- example: >-
- 99999998-0001-0000-0000-000000000000/4879a52a-9aa5-429c-9c68-fe4b11622f3f
- slug:
- type: string
- example: ovakolineproductionbillets
- example:
- name: ovako/line-production-billets
- path: >-
- 99999998-0001-0000-0000-000000000000/4879a52a-9aa5-429c-9c68-fe4b11622f3f
- slug: ovakolineproductionbillets
- responses:
- '200':
- description: ''
- delete:
- tags:
- - Storage paths
- summary: Delete storage path
- description: >-
- The API endpoint sends an HTTP DELETE request to the specified storage
- path identified by the pathId in the URL. Upon successful deletion, the
- response will conform to the following JSON schema:
- ``` json
- {
- "type": "object",
- "properties": {
- "message": {
- "type": "string"
- }
- }
- }
- ```
- The response will contain a message indicating the success of the
- deletion operation.
- operationId: deleteStoragePath
- responses:
- '200':
- description: ''
- parameters:
- - name: pathId
- in: path
- required: true
- schema:
- type: string
- /api/documents/{documentId}/preview/:
- get:
- tags:
- - Documents
- summary: Preview document
- description: >-
- # Get Document Preview
- This endpoint retrieves the preview of a specific document in JSON
- format.
- ## Request
- ### Path Parameters
- - `documentId` (string, required): The unique identifier of the
- document.
- ### Query Parameters
- - `format` (string, required): The format of the document preview. Set
- to "json" for JSON format.
- ## Response
- The response will be a JSON object representing the preview of the
- document. For documentation of the response schema, please refer to the
- provided JSON schema.
- operationId: previewDocument
- responses:
- '200':
- description: ''
- parameters:
- - name: documentId
- in: path
- required: true
- schema:
- type: string
- /api/documents/{documentId}/download/:
- get:
- tags:
- - Documents
- summary: Download document
- description: >-
- # Download Document
- This endpoint is used to download a specific document by providing the
- document ID in the URL.
- ### Request
- - Method: GET
- - URL: `/api/documents//download/`
- ### Response
- The response for this request follows the JSON schema below:
- ``` json
- {
- "type": "object",
- "properties": {
- "documentId": {
- "type": "string"
- },
- "documentName": {
- "type": "string"
- },
- "downloadLink": {
- "type": "string"
- }
- }
- }
- ```
- operationId: downloadDocument
- responses:
- '200':
- description: ''
- parameters:
- - name: documentId
- in: path
- required: true
- schema:
- type: string
- /api/documents/{documentId}/thumb/:
- get:
- tags:
- - Documents
- summary: Thumbnail document
- description: >-
- This endpoint retrieves the thumbnail of a specific document in JSON
- format.
- The response of this request can be documented as a JSON schema.
- operationId: thumbnailDocument
- responses:
- '200':
- description: ''
- parameters:
- - name: documentId
- in: path
- required: true
- schema:
- type: string
- /api/documents/:
- get:
- tags:
- - Documents
- summary: Get documents
- description: >-
- ### Get Documents
- This endpoint retrieves documents based on the specified page and full
- permissions.
- #### Request
- - Method: GET
- - URL: `/api/documents/?title__istartswith=horizon`
- - Query Parameters:
- - `title__istartswith` (string, required): Filter documents based on the starting of the title.
- #### Response
- The response for this request follows the JSON schema below:
- ``` json
- {
- "type": "object",
- "properties": {
- "count": {
- "type": "integer"
- },
- "next": {
- "type": "null"
- },
- "previous": {
- "type": "null"
- },
- "all": {
- "type": "array",
- "items": {
- "type": "integer"
- }
- },
- "results": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "id": {
- "type": "integer"
- },
- "correspondent": {
- "type": "integer"
- },
- "document_type": {
- "type": "null"
- },
- "storage_path": {
- "type": "integer"
- },
- "title": {
- "type": "string"
- },
- "content": {
- "type": "string"
- },
- "tags": {
- "type": "array",
- "items": {}
- },
- "created": {
- "type": "string"
- },
- "created_date": {
- "type": "string"
- },
- "modified": {
- "type": "string"
- },
- "added": {
- "type": "string"
- },
- "deleted_at": {
- "type": "null"
- },
- "archive_serial_number": {
- "type": "null"
- },
- "original_file_name": {
- "type": "string"
- },
- "archived_file_name": {
- "type": "string"
- },
- "owner": {
- "type": "null"
- },
- "user_can_change": {
- "type": "boolean"
- },
- "is_shared_by_requester": {
- "type": "boolean"
- },
- "notes": {
- "type": "array",
- "items": {}
- },
- "custom_fields": {
- "type": "array",
- "items": {}
- },
- "page_count": {
- "type": "null"
- }
- }
- }
- }
- }
- }
- ```
- operationId: getDocuments
- parameters:
- - name: id__in
- in: query
- schema:
- type: string
- example: ''
- - name: id
- in: query
- schema:
- type: string
- example: ''
- - name: title__istartswith
- in: query
- schema:
- type: string
- example: ''
- - name: title__iendswith
- in: query
- schema:
- type: string
- example: ''
- - name: title__icontains
- in: query
- schema:
- type: string
- example: ''
- - name: title__iexact
- in: query
- schema:
- type: string
- example: ''
- - name: content__istartswith
- in: query
- schema:
- type: string
- example: ''
- - name: content__iendswith
- in: query
- schema:
- type: string
- example: ''
- - name: content__icontains
- in: query
- schema:
- type: string
- example: ''
- - name: content__iexact
- in: query
- schema:
- type: string
- example: ''
- - name: archive_serial_number
- in: query
- schema:
- type: string
- example: ''
- - name: archive_serial_number__gt
- in: query
- schema:
- type: string
- example: ''
- - name: archive_serial_number__gte
- in: query
- schema:
- type: string
- example: ''
- - name: archive_serial_number__lt
- in: query
- schema:
- type: string
- example: ''
- - name: archive_serial_number__lte
- in: query
- schema:
- type: string
- example: ''
- - name: archive_serial_number__isnull
- in: query
- schema:
- type: string
- example: ''
- - name: created__year
- in: query
- schema:
- type: string
- example: ''
- - name: created__month
- in: query
- schema:
- type: string
- example: ''
- - name: created__day
- in: query
- schema:
- type: string
- example: ''
- - name: created__date__gt
- in: query
- schema:
- type: string
- example: ''
- - name: created__gt
- in: query
- schema:
- type: string
- example: ''
- - name: created__date__lt
- in: query
- schema:
- type: string
- example: ''
- - name: created__lt
- in: query
- schema:
- type: string
- example: ''
- - name: added__year
- in: query
- schema:
- type: string
- example: ''
- - name: added__month
- in: query
- schema:
- type: string
- example: ''
- - name: added__day
- in: query
- schema:
- type: string
- example: ''
- - name: added__date__gt
- in: query
- schema:
- type: string
- example: ''
- - name: added__gt
- in: query
- schema:
- type: string
- example: ''
- - name: added__date__lt
- in: query
- schema:
- type: string
- example: ''
- - name: added__lt
- in: query
- schema:
- type: string
- example: ''
- - name: modified__year
- in: query
- schema:
- type: string
- example: ''
- - name: modified__month
- in: query
- schema:
- type: string
- example: ''
- - name: modified__day
- in: query
- schema:
- type: string
- example: ''
- - name: modified__date__gt
- in: query
- schema:
- type: string
- example: ''
- - name: modified__gt
- in: query
- schema:
- type: string
- example: ''
- - name: modified__date__lt
- in: query
- schema:
- type: string
- example: ''
- - name: modified__lt
- in: query
- schema:
- type: string
- example: ''
- - name: original_filename__istartswith
- in: query
- schema:
- type: string
- example: ''
- - name: original_filename__iendswith
- in: query
- schema:
- type: string
- example: ''
- - name: original_filename__icontains
- in: query
- schema:
- type: string
- example: ''
- - name: original_filename__iexact
- in: query
- schema:
- type: string
- example: ''
- - name: checksum__istartswith
- in: query
- schema:
- type: string
- example: ''
- - name: checksum__iendswith
- in: query
- schema:
- type: string
- example: ''
- - name: checksum__icontains
- in: query
- schema:
- type: string
- example: ''
- - name: checksum__iexact
- in: query
- schema:
- type: string
- example: ''
- - name: correspondent__isnull
- in: query
- schema:
- type: string
- example: ''
- - name: correspondent__id__in
- in: query
- schema:
- type: string
- example: ''
- - name: correspondent__id
- in: query
- schema:
- type: string
- example: ''
- - name: correspondent__name__istartswith
- in: query
- schema:
- type: string
- example: ''
- - name: correspondent__name__iendswith
- in: query
- schema:
- type: string
- example: ''
- - name: correspondent__name__icontains
- in: query
- schema:
- type: string
- example: ''
- - name: correspondent__name__iexact
- in: query
- schema:
- type: string
- example: ''
- - name: tags__id__in
- in: query
- schema:
- type: string
- example: ''
- - name: tags__id
- in: query
- schema:
- type: string
- example: ''
- - name: tags__name__istartswith
- in: query
- schema:
- type: string
- example: ''
- - name: tags__name__iendswith
- in: query
- schema:
- type: string
- example: ''
- - name: tags__name__icontains
- in: query
- schema:
- type: string
- example: ''
- - name: tags__name__iexact
- in: query
- schema:
- type: string
- example: ''
- - name: document_type__isnull
- in: query
- schema:
- type: string
- example: ''
- - name: document_type__id__in
- in: query
- schema:
- type: string
- example: ''
- - name: document_type__id
- in: query
- schema:
- type: string
- example: ''
- - name: document_type__name__istartswith
- in: query
- schema:
- type: string
- example: ''
- - name: document_type__name__iendswith
- in: query
- schema:
- type: string
- example: ''
- - name: document_type__name__icontains
- in: query
- schema:
- type: string
- example: ''
- - name: document_type__name__iexact
- in: query
- schema:
- type: string
- example: ''
- - name: storage_path__isnull
- in: query
- schema:
- type: string
- example: ''
- - name: storage_path__id__in
- in: query
- schema:
- type: string
- example: ''
- - name: storage_path__id
- in: query
- schema:
- type: string
- example: ''
- - name: storage_path__name__istartswith
- in: query
- schema:
- type: string
- example: ''
- - name: storage_path__name__iendswith
- in: query
- schema:
- type: string
- example: ''
- - name: storage_path__name__icontains
- in: query
- schema:
- type: string
- example: ''
- - name: storage_path__name__iexact
- in: query
- schema:
- type: string
- example: ''
- - name: owner__isnull
- in: query
- schema:
- type: string
- example: ''
- - name: owner__id__in
- in: query
- schema:
- type: string
- example: ''
- - name: owner__id
- in: query
- schema:
- type: string
- example: ''
- - name: custom_fields__icontains
- in: query
- schema:
- type: string
- example: ''
- - name: is_tagged
- in: query
- schema:
- type: string
- example: ''
- - name: tags__id__all
- in: query
- schema:
- type: string
- example: ''
- - name: tags__id__none
- in: query
- schema:
- type: string
- example: ''
- - name: correspondent__id__none
- in: query
- schema:
- type: string
- example: ''
- - name: document_type__id__none
- in: query
- schema:
- type: string
- example: ''
- - name: storage_path__id__none
- in: query
- schema:
- type: string
- example: ''
- - name: is_in_inbox
- in: query
- schema:
- type: string
- example: ''
- - name: title_content
- in: query
- schema:
- type: string
- example: ''
- - name: owner__id__none
- in: query
- schema:
- type: string
- example: ''
- - name: custom_fields__id__all
- in: query
- schema:
- type: string
- example: ''
- - name: custom_fields__id__none
- in: query
- schema:
- type: string
- example: ''
- - name: custom_fields__id__in
- in: query
- schema:
- type: string
- example: ''
- - name: has_custom_fields
- in: query
- schema:
- type: string
- example: ''
- - name: custom_field_query
- in: query
- schema:
- type: string
- example: ''
- - name: shared_by__id
- in: query
- schema:
- type: string
- example: ''
- - name: search
- in: query
- schema:
- type: string
- - name: ordering
- in: query
- schema:
- type: string
- responses:
- '200':
- description: ''
- /api/documents/post_document/:
- post:
- tags:
- - Documents
- summary: Add document
- description: Add document
- operationId: addDocument
- requestBody:
- content:
- multipart/form-data:
- schema:
- type: object
- properties:
- archive_serial_number:
- type: string
- example: ''
- correspondent:
- type: string
- example: Claudio
- created:
- description: e.g. "2016-04-19" or "2016-04-19 06:15:00+02:00"
- type: string
- example: ''
- custom_fields:
- type: string
- example: ''
- document:
- type: string
- format: binary
- document_type:
- type: string
- example: ''
- storage_path:
- type: string
- example: ''
- tags:
- type: string
- example: ''
- title:
- type: string
- example: Document
- responses:
- '200':
- description: ''
- /api/custom_fields/:
- get:
- tags:
- - Custom fields
- summary: Get custom fields
- description: >-
- ### API Request Description
- This endpoint makes an HTTP GET request to retrieve custom fields in
- JSON format.
- ### Request Body
- This request does not require a request body.
- ### Response Body
- The response is a JSON object with the following schema:
- ``` json
- {
- "count": integer,
- "next": string or null,
- "previous": string or null,
- "all": array of integers,
- "results": [
- {
- "id": integer,
- "name": string,
- "data_type": string,
- "extra_data": {
- "select_options": array of strings or null,
- "default_currency": string or null
- },
- "document_count": integer
- }
- ]
- }
- ```
- The `count` field represents the total count of custom fields, `next`
- and `previous` are URLs for pagination, `all` contains all the custom
- field IDs, and `results` is an array of custom field objects containing
- their respective IDs, names, data types, extra data, and document
- counts.
- operationId: getCustomFields
- parameters:
- - name: id
- in: query
- schema:
- type: string
- example: ''
- - name: id__in
- in: query
- schema:
- type: string
- example: ''
- - name: name__istartswith
- in: query
- schema:
- type: string
- example: ''
- - name: name__iendswith
- in: query
- schema:
- type: string
- example: ''
- - name: name__icontains
- in: query
- schema:
- type: string
- example: ''
- - name: name__iexact
- in: query
- schema:
- type: string
- example: ''
- - name: page
- in: query
- schema:
- type: string
- example: ''
- - name: page_size
- in: query
- schema:
- type: string
- example: ''
- - name: ordering
- in: query
- schema:
- type: string
- responses:
- '200':
- description: ''
- post:
- tags:
- - Custom fields
- summary: Add custom field
- description: >-
- ### Create Custom Field
- This endpoint allows you to create a custom field with specified
- attributes.
- #### Request Body
- - `name` (string, required): The name of the custom field.
- - `data_type` (string, required): The data type of the custom field.
- - `extra_data` (object, optional): Additional data for the custom field.
- - `select_options` (array): Array of select options for the custom field.
- - `default_currency` (string): Default currency for monetary data type.
- #### Response
- The response for this request is a JSON schema representing the
- structure of the created custom field object.
- ``` json
- {
- "type": "object",
- "properties": {
- "id": {
- "type": "string"
- },
- "name": {
- "type": "string"
- },
- "data_type": {
- "type": "string"
- },
- "extra_data": {
- "type": "object",
- "properties": {
- "select_options": {
- "type": "array"
- },
- "default_currency": {
- "type": "string"
- }
- }
- }
- }
- }
- ```
- operationId: addCustomField
- requestBody:
- content:
- application/json:
- schema:
- type: object
- properties:
- data_type:
- type: string
- example: monetary
- extra_data:
- type: object
- properties:
- default_currency:
- nullable: true
- example: null
- select_options:
- type: array
- items:
- nullable: true
- example: null
- example:
- - null
- name:
- type: string
- example: Prova
- example:
- data_type: monetary
- extra_data:
- default_currency: null
- select_options:
- - null
- name: Prova
- responses:
- '200':
- description: ''
- /api/custom_fields/{customFieldId}/:
- put:
- tags:
- - Custom fields
- summary: Update custom field
- description: >-
- ### Update Custom Field
- This endpoint allows the user to update a specific custom field by
- making an HTTP PUT request to the specified URL.
- #### Request Body
- - `id` (number): The unique identifier of the custom field.
- - `name` (string): The name of the custom field.
- - `data_type` (string): The type of data the custom field holds (e.g.,
- monetary, text, date).
- - `extra_data` (object): Additional data related to the custom field,
- including select options and default currency.
- - `select_options` (array): An array of select options for the custom field.
- - `default_currency` (string): The default currency for the monetary field.
- - `document_count` (number): The count of documents associated with the
- custom field.
- - `permissions_form` (object): Permissions related to the custom field.
- #### Response
- The response of this request will be a JSON object conforming to the
- following schema:
- ``` json
- {
- "type": "object",
- "properties": {
- "status": {
- "type": "string"
- },
- "message": {
- "type": "string"
- },
- "updated_custom_field": {
- "type": "object",
- "properties": {
- "id": {
- "type": "number"
- },
- "name": {
- "type": "string"
- },
- "data_type": {
- "type": "string"
- },
- "extra_data": {
- "type": "object",
- "properties": {
- "select_options": {
- "type": "array"
- },
- "default_currency": {
- "type": "string"
- }
- }
- },
- "document_count": {
- "type": "number"
- },
- "permissions_form": {
- "type": "object"
- }
- }
- }
- }
- }
- ```
- operationId: updateCustomField
- requestBody:
- content:
- application/json:
- schema:
- type: object
- properties:
- data_type:
- type: string
- example: monetary
- document_count:
- type: number
- example: 0
- extra_data:
- type: object
- properties:
- default_currency:
- type: string
- example: EUR
- select_options:
- type: array
- items:
- nullable: true
- example: null
- example:
- - null
- id:
- type: number
- example: 1
- name:
- type: string
- example: Prova
- permissions_form:
- type: object
- properties: {}
- example:
- data_type: monetary
- document_count: 0
- extra_data:
- default_currency: EUR
- select_options:
- - null
- id: 1
- name: Prova
- permissions_form: {}
- responses:
- '200':
- description: ''
- delete:
- tags:
- - Custom fields
- summary: Delete custom field
- description: >-
- This endpoint sends an HTTP DELETE request to remove a specific custom
- field identified by the customFieldId parameter.
- ### Response
- The response of this request is a JSON schema describing the structure
- of the response data.
- operationId: deleteCustomField
- responses:
- '200':
- description: ''
- parameters:
- - name: customFieldId
- in: path
- required: true
- schema:
- type: string
- /api/groups/:
- get:
- tags:
- - Groups
- summary: Get groups
- description: >-
- This endpoint makes an HTTP GET request to retrieve a list of groups in
- JSON format. The request does not include any specific parameters in the
- URL.
- The response returns a status code of 200 and the content type is
- "application/json". The response body includes a "count" field
- indicating the total number of groups, "next" and "previous" fields for
- pagination, an "all" array, and a "results" array containing the list of
- groups. In the example response, the "count" is 0, "next" and "previous"
- are null, and both "all" and "results" arrays are empty.
- operationId: getGroups
- parameters:
- - name: name__istartswith
- in: query
- schema:
- type: string
- example: ''
- - name: name__iendswith
- in: query
- schema:
- type: string
- example: ''
- - name: name__icontains
- in: query
- schema:
- type: string
- example: ''
- - name: name__iexact
- in: query
- schema:
- type: string
- example: ''
- - name: ordering
- in: query
- schema:
- type: string
- example: name
- - name: full_perms
- in: query
- schema:
- type: string
- example: 'true'
- responses:
- '200':
- description: ''
- post:
- tags:
- - Groups
- summary: Add group
- description: >-
- ### Create a New Group
- This endpoint allows you to create a new group.
- #### Request Body
- - `name` (string, required): The name of the group.
- - `permissions` (array, required): An array of permissions for the
- group.
- Example:
- ``` json
- {
- "name": "group name",
- "permissions": ["view_document"]
- }
- ```
- #### Response
- The response will contain the details of the newly created group.
- operationId: addGroup
- requestBody:
- content:
- application/json:
- schema:
- type: object
- properties:
- name:
- type: string
- example: group name
- permissions:
- type: array
- items:
- type: string
- example: view_document
- example:
- - view_document
- - delete_document
- example:
- name: group name
- permissions:
- - view_document
- - delete_document
- responses:
- '200':
- description: ''
- /api/groups/{groupId}/:
- put:
- tags:
- - Groups
- summary: Update group
- description: >-
- This endpoint allows you to update a specific group by making an HTTP
- PUT request to the specified URL. The request should be in JSON format
- and include the ID of the group, its name, and the permissions
- associated with it. The request payload should include the following
- parameters:
- - id (number): The ID of the group to be updated.
- - name (string): The new name for the group.
- - permissions (array of strings): The updated permissions for the group.
- - set_permissions (array of strings): The updated set of permissions for
- the group.
- - permissions_form (object): An object containing the updated set of
- permissions for the group.
- Upon a successful update, the response will include the updated details
- of the group in JSON format.
- operationId: updateGroup
- requestBody:
- content:
- application/json:
- schema:
- type: object
- properties:
- id:
- type: number
- example: 1
- name:
- type: string
- example: readers
- permissions:
- type: array
- items:
- type: string
- example: view_document
- example:
- - view_document
- - view_tag
- permissions_form:
- type: object
- properties:
- set_permissions:
- type: array
- items:
- type: string
- example: view_document
- example:
- - view_document
- set_permissions:
- type: array
- items:
- type: string
- example: view_document
- example:
- - view_document
- example:
- id: 1
- name: readers
- permissions:
- - view_document
- - view_tag
- permissions_form:
- set_permissions:
- - view_document
- set_permissions:
- - view_document
- responses:
- '200':
- description: ''
- delete:
- tags:
- - Groups
- summary: Delete group
- description: >-
- ### Delete Group
- This endpoint is used to delete a specific group.
- #### Request Body
- This endpoint does not require a request body.
- #### Response
- The response for this request is a JSON object conforming to the
- following schema:
- ``` json
- {
- "type": "object",
- "properties": {
- "message": {
- "type": "string"
- }
- }
- }
- ```
- The response contains a `message` property indicating the result of the
- deletion operation.
- operationId: deleteGroup
- responses:
- '200':
- description: ''
- parameters:
- - name: groupId
- in: path
- required: true
- schema:
- type: string
- /api/users/:
- get:
- tags:
- - Users
- summary: Get users
- description: >-
- ### GET /api/users/?format=json
- This endpoint retrieves a list of users in JSON format.
- #### Request
- No request body is required for this endpoint.
- #### Response
- The response will be a JSON object with the following schema:
- ``` json
- {
- "count": integer,
- "next": string or null,
- "previous": string or null,
- "all": array of integers,
- "results": [
- {
- "id": integer,
- "username": string,
- "email": string,
- "password": string,
- "first_name": string,
- "last_name": string,
- "date_joined": string,
- "is_staff": boolean,
- "is_active": boolean,
- "is_superuser": boolean,
- "groups": array,
- "user_permissions": array,
- "inherited_permissions": array
- }
- ]
- }
- ```
- The `count` represents the total number of users, `next` and `previous`
- are URLs for pagination, `all` contains the total count, and `results`
- contain an array of user objects with their respective attributes.
- operationId: getUsers
- parameters:
- - name: username__istartswith
- in: query
- schema:
- type: string
- example: ''
- - name: username__iendswith
- in: query
- schema:
- type: string
- example: ''
- - name: username__icontains
- in: query
- schema:
- type: string
- example: ''
- - name: username__iexact
- in: query
- schema:
- type: string
- example: ''
- - name: ordering
- in: query
- schema:
- type: string
- example: username
- - name: full_perms
- in: query
- schema:
- type: string
- example: 'true'
- responses:
- '200':
- description: ''
- post:
- tags:
- - Users
- summary: Add user
- description: >-
- ### API Request Description
- This endpoint is used to create a new user. The request should be sent
- as an HTTP POST to the specified URL with the request body containing
- the user details in JSON format.
- #### Request Body
- - `username` (string, required): The username of the new user.
- - `email` (string, required): The email address of the new user.
- - `password` (string, required): The password for the new user.
- - `first_name` (string, required): The first name of the new user.
- - `last_name` (string, required): The last name of the new user.
- - `date_joined` (string, required): The date and time of the user's
- registration.
- - `is_staff` (boolean, required): Indicates if the user has staff
- permissions.
- - `is_active` (boolean, required): Indicates if the user account is
- active.
- - `is_superuser` (boolean, required): Indicates if the user has
- superuser permissions.
- - `groups` (array, required): An array of group IDs to which the user
- belongs.
- - `user_permissions` (array, required): An array of user permission IDs.
- - `inherited_permissions` (array, required): An array of inherited
- permissions for the user.
- ### API Response (JSON Schema)
- The response of this request follows the JSON schema below:
- ``` json
- {
- "type": "object",
- "properties": {
- "status": {
- "type": "string"
- },
- "message": {
- "type": "string"
- },
- "user_id": {
- "type": "integer"
- }
- }
- }
- ```
- The response includes:
- - `status` (string): Indicates the status of the request.
- - `message` (string): Provides a descriptive message about the request
- status.
- - `user_id` (integer): The unique identifier of the newly created user.
- operationId: addUser
- requestBody:
- content:
- application/json:
- schema:
- type: object
- properties:
- date_joined:
- type: string
- example: '2025-01-10T12:09:14.351711+01:00'
- email:
- type: string
- example: ''
- first_name:
- type: string
- example: ''
- groups:
- type: array
- items:
- type: number
- example: 1
- example:
- - 1
- inherited_permissions:
- type: array
- items:
- type: string
- example: documents.view_document
- example:
- - documents.view_document
- is_active:
- type: boolean
- example: true
- is_staff:
- type: boolean
- example: false
- is_superuser:
- type: boolean
- example: false
- last_name:
- type: string
- example: ''
- password:
- type: string
- example: '123456'
- user_permissions:
- type: array
- items: {}
- example: []
- username:
- type: string
- example: prova
- example:
- date_joined: '2025-01-10T12:09:14.351711+01:00'
- email: ''
- first_name: ''
- groups:
- - 1
- inherited_permissions:
- - documents.view_document
- is_active: true
- is_staff: false
- is_superuser: false
- last_name: ''
- password: '123456'
- user_permissions: []
- username: prova
- responses:
- '200':
- description: ''
- /api/users/{userId}/:
- put:
- tags:
- - Users
- summary: Update user
- description: >-
- ### Update User Details
- This endpoint allows updating the details of a specific user.
- #### Request Body
- - `id` (integer): The unique identifier for the user.
- - `username` (string): The username for the user.
- - `email` (string): The email address of the user.
- - `password` (string): The password for the user.
- - `first_name` (string): The first name of the user.
- - `last_name` (string): The last name of the user.
- - `date_joined` (string): The date and time when the user joined.
- - `is_staff` (boolean): Indicates if the user is a staff member.
- - `is_active` (boolean): Indicates if the user account is active.
- - `is_superuser` (boolean): Indicates if the user has superuser
- privileges.
- - `groups` (array): An array of groups the user belongs to.
- - `user_permissions` (array): An array of user permissions.
- - `inherited_permissions` (array): An array of inherited permissions for
- the user.
- - `permissions_form` (object): Permissions form for the user.
- #### Response (JSON Schema)
- ``` json
- {
- "type": "object",
- "properties": {
- "status": {
- "type": "string"
- },
- "message": {
- "type": "string"
- }
- }
- }
- ```
- operationId: updateUser
- requestBody:
- content:
- application/json:
- schema:
- type: object
- properties:
- date_joined:
- type: string
- example: '2025-01-10T11:46:11.193943+01:00'
- email:
- type: string
- example: simone.latino@teoresigroup.com
- first_name:
- type: string
- example: ''
- groups:
- type: array
- items: {}
- example: []
- id:
- type: number
- example: 3
- inherited_permissions:
- type: array
- items:
- type: string
- example: auth.change_group
- example:
- - auth.change_group
- - contenttypes.change_contenttype
- - documents.change_storagepath
- - documents.delete_tag
- - authtoken.delete_token
- - documents.change_customfieldinstance
- - admin.view_logentry
- - documents.change_tag
- - auditlog.delete_logentry
- - documents.add_uisettings
- - documents.view_storagepath
- - guardian.add_groupobjectpermission
- - documents.view_sharelink
- - authtoken.view_token
- - socialaccount.view_socialaccount
- - guardian.view_groupobjectpermission
- - documents.delete_storagepath
- - documents.add_document
- - socialaccount.add_socialtoken
- - admin.change_logentry
- - sessions.add_session
- - documents.delete_workflow
- - documents.add_customfield
- - socialaccount.delete_socialaccount
- - authtoken.delete_tokenproxy
- - socialaccount.view_socialapp
- - authtoken.add_token
- - auth.delete_group
- - documents.change_sharelink
- - documents.add_log
- - auth.delete_user
- - documents.view_note
- - documents.delete_workflowaction
- - auth.add_user
- - sessions.delete_session
- - auth.view_user
- - documents.add_storagepath
- - paperless_mail.view_processedmail
- - documents.add_note
- - socialaccount.change_socialaccount
- - django_celery_results.delete_taskresult
- - auth.view_group
- - account.change_emailaddress
- - paperless_mail.add_processedmail
- - documents.view_documenttype
- - account.view_emailaddress
- - documents.add_customfieldinstance
- - documents.delete_savedviewfilterrule
- - auth.change_user
- - documents.change_correspondent
- - authtoken.change_token
- - documents.delete_documenttype
- - documents.delete_customfield
- - documents.delete_paperlesstask
- - documents.view_workflow
- - paperless.delete_applicationconfiguration
- - django_celery_results.add_groupresult
- - documents.delete_note
- - paperless.view_applicationconfiguration
- - django_celery_results.view_taskresult
- - auditlog.change_logentry
- - documents.change_document
- - documents.change_paperlesstask
- - documents.delete_customfieldinstance
- - paperless_mail.delete_processedmail
- - contenttypes.delete_contenttype
- - django_celery_results.delete_chordcounter
- - account.add_emailaddress
- - contenttypes.view_contenttype
- - socialaccount.add_socialaccount
- - django_celery_results.change_groupresult
- - paperless.change_applicationconfiguration
- - documents.change_savedviewfilterrule
- - paperless_mail.delete_mailaccount
- - auditlog.view_logentry
- - account.delete_emailconfirmation
- - documents.view_workflowaction
- - authtoken.view_tokenproxy
- - auth.view_permission
- - guardian.change_userobjectpermission
- - account.add_emailconfirmation
- - admin.add_logentry
- - sessions.change_session
- - documents.add_paperlesstask
- - documents.delete_workflowtrigger
- - documents.add_documenttype
- - guardian.add_userobjectpermission
- - documents.change_log
- - documents.view_log
- - documents.add_savedviewfilterrule
- - documents.view_savedview
- - paperless_mail.add_mailrule
- - paperless_mail.view_mailaccount
- - paperless_mail.delete_mailrule
- - paperless_mail.view_mailrule
- - contenttypes.add_contenttype
- - guardian.change_groupobjectpermission
- - django_celery_results.delete_groupresult
- - django_celery_results.view_groupresult
- - paperless_mail.change_mailrule
- - django_celery_results.change_chordcounter
- - socialaccount.delete_socialapp
- - documents.delete_document
- - socialaccount.change_socialapp
- - auth.change_permission
- - authtoken.add_tokenproxy
- - django_celery_results.change_taskresult
- - paperless_mail.change_processedmail
- - django_celery_results.add_chordcounter
- - documents.change_documenttype
- - documents.change_customfield
- - documents.change_uisettings
- - documents.delete_log
- - documents.delete_sharelink
- - paperless.add_applicationconfiguration
- - documents.delete_savedview
- - django_celery_results.view_chordcounter
- - documents.view_paperlesstask
- - documents.view_customfieldinstance
- - guardian.view_userobjectpermission
- - account.view_emailconfirmation
- - paperless_mail.change_mailaccount
- - socialaccount.add_socialapp
- - socialaccount.change_socialtoken
- - socialaccount.delete_socialtoken
- - auth.delete_permission
- - admin.delete_logentry
- - sessions.view_session
- - documents.add_sharelink
- - documents.view_workflowtrigger
- - account.change_emailconfirmation
- - documents.view_tag
- - documents.add_workflowtrigger
- - documents.delete_correspondent
- - paperless_mail.add_mailaccount
- - auditlog.add_logentry
- - documents.view_correspondent
- - documents.add_savedview
- - documents.change_workflow
- - documents.change_workflowaction
- - socialaccount.view_socialtoken
- - django_celery_results.add_taskresult
- - documents.add_workflow
- - documents.change_workflowtrigger
- - documents.change_savedview
- - documents.view_savedviewfilterrule
- - documents.change_note
- - guardian.delete_userobjectpermission
- - documents.add_correspondent
- - documents.view_customfield
- - documents.add_workflowaction
- - documents.view_uisettings
- - auth.add_permission
- - account.delete_emailaddress
- - documents.add_tag
- - guardian.delete_groupobjectpermission
- - documents.view_document
- - auth.add_group
- - documents.delete_uisettings
- - authtoken.change_tokenproxy
- is_active:
- type: boolean
- example: true
- is_staff:
- type: boolean
- example: true
- is_superuser:
- type: boolean
- example: true
- last_name:
- type: string
- example: ''
- password:
- type: string
- example: '**********'
- permissions_form:
- type: object
- properties: {}
- user_permissions:
- type: array
- items: {}
- example: []
- username:
- type: string
- example: paperless
- example:
- date_joined: '2025-01-10T11:46:11.193943+01:00'
- email: simone.latino@teoresigroup.com
- first_name: ''
- groups: []
- id: 3
- inherited_permissions:
- - auth.change_group
- - contenttypes.change_contenttype
- - documents.change_storagepath
- - documents.delete_tag
- - authtoken.delete_token
- - documents.change_customfieldinstance
- - admin.view_logentry
- - documents.change_tag
- - auditlog.delete_logentry
- - documents.add_uisettings
- - documents.view_storagepath
- - guardian.add_groupobjectpermission
- - documents.view_sharelink
- - authtoken.view_token
- - socialaccount.view_socialaccount
- - guardian.view_groupobjectpermission
- - documents.delete_storagepath
- - documents.add_document
- - socialaccount.add_socialtoken
- - admin.change_logentry
- - sessions.add_session
- - documents.delete_workflow
- - documents.add_customfield
- - socialaccount.delete_socialaccount
- - authtoken.delete_tokenproxy
- - socialaccount.view_socialapp
- - authtoken.add_token
- - auth.delete_group
- - documents.change_sharelink
- - documents.add_log
- - auth.delete_user
- - documents.view_note
- - documents.delete_workflowaction
- - auth.add_user
- - sessions.delete_session
- - auth.view_user
- - documents.add_storagepath
- - paperless_mail.view_processedmail
- - documents.add_note
- - socialaccount.change_socialaccount
- - django_celery_results.delete_taskresult
- - auth.view_group
- - account.change_emailaddress
- - paperless_mail.add_processedmail
- - documents.view_documenttype
- - account.view_emailaddress
- - documents.add_customfieldinstance
- - documents.delete_savedviewfilterrule
- - auth.change_user
- - documents.change_correspondent
- - authtoken.change_token
- - documents.delete_documenttype
- - documents.delete_customfield
- - documents.delete_paperlesstask
- - documents.view_workflow
- - paperless.delete_applicationconfiguration
- - django_celery_results.add_groupresult
- - documents.delete_note
- - paperless.view_applicationconfiguration
- - django_celery_results.view_taskresult
- - auditlog.change_logentry
- - documents.change_document
- - documents.change_paperlesstask
- - documents.delete_customfieldinstance
- - paperless_mail.delete_processedmail
- - contenttypes.delete_contenttype
- - django_celery_results.delete_chordcounter
- - account.add_emailaddress
- - contenttypes.view_contenttype
- - socialaccount.add_socialaccount
- - django_celery_results.change_groupresult
- - paperless.change_applicationconfiguration
- - documents.change_savedviewfilterrule
- - paperless_mail.delete_mailaccount
- - auditlog.view_logentry
- - account.delete_emailconfirmation
- - documents.view_workflowaction
- - authtoken.view_tokenproxy
- - auth.view_permission
- - guardian.change_userobjectpermission
- - account.add_emailconfirmation
- - admin.add_logentry
- - sessions.change_session
- - documents.add_paperlesstask
- - documents.delete_workflowtrigger
- - documents.add_documenttype
- - guardian.add_userobjectpermission
- - documents.change_log
- - documents.view_log
- - documents.add_savedviewfilterrule
- - documents.view_savedview
- - paperless_mail.add_mailrule
- - paperless_mail.view_mailaccount
- - paperless_mail.delete_mailrule
- - paperless_mail.view_mailrule
- - contenttypes.add_contenttype
- - guardian.change_groupobjectpermission
- - django_celery_results.delete_groupresult
- - django_celery_results.view_groupresult
- - paperless_mail.change_mailrule
- - django_celery_results.change_chordcounter
- - socialaccount.delete_socialapp
- - documents.delete_document
- - socialaccount.change_socialapp
- - auth.change_permission
- - authtoken.add_tokenproxy
- - django_celery_results.change_taskresult
- - paperless_mail.change_processedmail
- - django_celery_results.add_chordcounter
- - documents.change_documenttype
- - documents.change_customfield
- - documents.change_uisettings
- - documents.delete_log
- - documents.delete_sharelink
- - paperless.add_applicationconfiguration
- - documents.delete_savedview
- - django_celery_results.view_chordcounter
- - documents.view_paperlesstask
- - documents.view_customfieldinstance
- - guardian.view_userobjectpermission
- - account.view_emailconfirmation
- - paperless_mail.change_mailaccount
- - socialaccount.add_socialapp
- - socialaccount.change_socialtoken
- - socialaccount.delete_socialtoken
- - auth.delete_permission
- - admin.delete_logentry
- - sessions.view_session
- - documents.add_sharelink
- - documents.view_workflowtrigger
- - account.change_emailconfirmation
- - documents.view_tag
- - documents.add_workflowtrigger
- - documents.delete_correspondent
- - paperless_mail.add_mailaccount
- - auditlog.add_logentry
- - documents.view_correspondent
- - documents.add_savedview
- - documents.change_workflow
- - documents.change_workflowaction
- - socialaccount.view_socialtoken
- - django_celery_results.add_taskresult
- - documents.add_workflow
- - documents.change_workflowtrigger
- - documents.change_savedview
- - documents.view_savedviewfilterrule
- - documents.change_note
- - guardian.delete_userobjectpermission
- - documents.add_correspondent
- - documents.view_customfield
- - documents.add_workflowaction
- - documents.view_uisettings
- - auth.add_permission
- - account.delete_emailaddress
- - documents.add_tag
- - guardian.delete_groupobjectpermission
- - documents.view_document
- - auth.add_group
- - documents.delete_uisettings
- - authtoken.change_tokenproxy
- is_active: true
- is_staff: true
- is_superuser: true
- last_name: ''
- password: '**********'
- permissions_form: {}
- user_permissions: []
- username: paperless
- responses:
- '200':
- description: ''
- delete:
- tags:
- - Users
- summary: Delete user
- description: >-
- ### Delete User
- This endpoint is used to delete a specific user by their unique user ID.
- #### Request
- - Method: DELETE
- - Endpoint: `/api/users/`
- #### Response
- The response for this request is a JSON schema describing the structure
- of the response body.
- operationId: deleteUser
- responses:
- '200':
- description: ''
- parameters:
- - name: userId
- in: path
- required: true
- schema:
- type: string
- /api/saved_views/:
- get:
- tags:
- - Views
- summary: Get views
- description: >-
- This endpoint makes an HTTP GET request to retrieve a list of saved
- views in JSON format. The request does not include a request body as it
- is a GET request. The response will contain a JSON object with the
- details of the saved views, including their names, IDs, and other
- relevant information.
- operationId: getViews
- responses:
- '200':
- description: ''
- post:
- tags:
- - Views
- summary: Add view
- description: >-
- This API endpoint allows you to create a new saved view by sending an
- HTTP POST request to the specified URL. The request should include the
- following parameters in the request body:
- - id (number): The unique identifier for the saved view.
- - name (string): The name of the saved view.
- - show_on_dashboard (boolean): Indicates whether the saved view should
- be displayed on the dashboard.
- - show_in_sidebar (boolean): Indicates whether the saved view should be
- displayed in the sidebar.
- - filter_rules (array): An array of filter rules for the saved view,
- where each rule includes:
- - rule_type (number): The type of the filter rule.
- - value (string): The value of the filter rule.
- - sort_field (string): The field used for sorting the saved view.
- - sort_reverse (boolean): Indicates whether the sorting order should be
- reversed.
- - display_mode (string): The display mode for the saved view.
- - display_fields (array): An array of fields to be displayed in the
- saved view.
- The response to this request will be a JSON object representing the
- created saved view, and you can document the response as a JSON schema.
- operationId: addView
- requestBody:
- content:
- application/json:
- schema:
- type: object
- properties:
- display_fields:
- type: array
- items:
- type: string
- example: title
- example:
- - title
- - created
- - tag
- - correspondent
- - documenttype
- - storagepath
- - note
- - owner
- - shared
- - asn
- - pagecount
- - custom_field_1
- - added
- display_mode:
- type: string
- example: smallCards
- filter_rules:
- type: array
- items:
- type: object
- properties:
- rule_type:
- type: number
- example: 30
- value:
- type: string
- example: '6'
- example:
- - rule_type: 30
- value: '6'
- name:
- type: string
- example: ppp
- show_in_sidebar:
- type: boolean
- example: true
- show_on_dashboard:
- type: boolean
- example: true
- sort_field:
- type: string
- example: created
- sort_reverse:
- type: boolean
- example: true
- example:
- display_fields:
- - title
- - created
- - tag
- - correspondent
- - documenttype
- - storagepath
- - note
- - owner
- - shared
- - asn
- - pagecount
- - custom_field_1
- - added
- display_mode: smallCards
- filter_rules:
- - rule_type: 30
- value: '6'
- name: ppp
- show_in_sidebar: true
- show_on_dashboard: true
- sort_field: created
- sort_reverse: true
- responses:
- '200':
- description: ''
- /api/saved_views/{viewId}/:
- put:
- tags:
- - Views
- summary: Update view
- description: >-
- ## Update Saved View
- This endpoint allows updating a specific saved view identified by the
- `viewId`.
- ### Request
- - Method: PUT
- - URL: `/api/saved_views//`
- #### Request Body
- - Type: JSON
- | Key | Type | Description |
- | --- | --- | --- |
- | id | | The ID of the view |
- | name | | The name of the view |
- | show_on_dashboard | | Indicates if the view should be shown on the
- dashboard |
- | show_in_sidebar | | Indicates if the view should be shown in the
- sidebar |
- | filter_rules | | An array of filter rules containing rule type and
- value |
- | sort_field | | The field to be used for sorting |
- | sort_reverse | | Indicates if the sorting should be in reverse order
- |
- | display_mode | | The display mode of the view |
- | owner | | The ID of the owner of the view |
- #### Example
- ``` json
- {
- "id": 1,
- "name": "sah-annahutte",
- "show_on_dashboard": true,
- "show_in_sidebar": true,
- "filter_rules": [
- {
- "rule_type": 30,
- "value": "5"
- }
- ],
- "sort_field": "created",
- "sort_reverse": true,
- "display_mode": "smallCards",
- "owner": 5
- }
- ### Response
- The response of this request is not provided.
- ```
- operationId: updateView
- requestBody:
- content:
- application/json:
- schema:
- type: object
- properties:
- display_mode:
- type: string
- example: smallCards
- filter_rules:
- type: array
- items:
- type: object
- properties:
- rule_type:
- type: number
- example: 30
- value:
- type: string
- example: '5'
- example:
- - rule_type: 30
- value: '5'
- id:
- type: number
- example: 1
- name:
- type: string
- example: sah-annahutte
- owner:
- type: number
- example: 5
- show_in_sidebar:
- type: boolean
- example: true
- show_on_dashboard:
- type: boolean
- example: true
- sort_field:
- type: string
- example: created
- sort_reverse:
- type: boolean
- example: true
- example:
- display_mode: smallCards
- filter_rules:
- - rule_type: 30
- value: '5'
- id: 1
- name: sah-annahutte
- owner: 5
- show_in_sidebar: true
- show_on_dashboard: true
- sort_field: created
- sort_reverse: true
- responses:
- '200':
- description: ''
- delete:
- tags:
- - Views
- summary: Delete view
- description: >-
- ## Delete Saved View
- This endpoint is used to delete a specific saved view identified by the
- `viewId`.
- ### Request
- - Method: DELETE
- - URL: `/api/saved_views//`
- ### Response
- Upon successful execution, this request returns a status code of 204 and
- the content type is `text/xml`.
- operationId: deleteView
- responses:
- '200':
- description: ''
- parameters:
- - name: viewId
- in: path
- required: true
- schema:
- type: string
- /api/correspondents/:
- get:
- tags:
- - Correspondents
- summary: Get correspondents
- description: >-
- ### API Request Description
- This endpoint is a GET request to retrieve correspondents. The request
- takes query parameters including the page number, the timestamp of the
- last correspondence, and a flag for full permissions.
- ### Request Body
- This request does not require a request body.
- ### Response Body
- The response is in JSON format and includes a "detail" field. Here is
- the JSON schema for the response:
- ``` json
- {
- "type": "object",
- "properties": {
- "detail": {
- "type": "string"
- }
- }
- }
- ```
- operationId: getCorrespondents
- parameters:
- - name: id__in
- in: query
- schema:
- type: string
- example: ''
- - name: id
- in: query
- schema:
- type: string
- example: ''
- - name: name__istartswith
- in: query
- schema:
- type: string
- example: ''
- - name: name__iendswith
- in: query
- schema:
- type: string
- example: ''
- - name: name__icontains
- in: query
- schema:
- type: string
- example: ''
- - name: name__iexact
- in: query
- schema:
- type: string
- example: ''
- - name: page
- in: query
- schema:
- type: string
- example: ''
- - name: last_correspondence
- in: query
- schema:
- type: string
- example: ''
- - name: full_perms
- in: query
- schema:
- type: string
- example: 'true'
- - name: ordering
- in: query
- schema:
- type: string
- responses:
- '200':
- description: ''
- post:
- tags:
- - Correspondents
- summary: Add correspondent
- description: >-
- ### Add Correspondent
- This endpoint allows the user to add a new correspondent.
- #### Request Body
- - name (string, required): The name of the correspondent.
- - matching_algorithm (integer, required): The matching algorithm to be
- used for this correspondent.
- - match (string, required): The match criteria for the correspondent.
- - is_insensitive (boolean, required): Indicates if the matching should
- be case insensitive.
- - owner (integer, required): The ID of the owner of the correspondent.
- - set_permissions (object, required): The permissions set for the
- correspondent.
- - view (object, required): The view permissions.
- - users (array): The list of user IDs with view permissions.
- - groups (array): The list of group IDs with view permissions.
- - change (object, required): The change permissions.
- - users (array): The list of user IDs with change permissions.
- - groups (array): The list of group IDs with change permissions.
- #### Response
- The response of this request is a JSON schema describing the structure
- of the correspondent object.
- operationId: addCorrespondent
- requestBody:
- content:
- application/json:
- schema:
- type: object
- properties:
- is_insensitive:
- type: boolean
- example: true
- match:
- type: string
- example: ''
- matching_algorithm:
- type: number
- example: 6
- name:
- type: string
- example: Prova
- owner:
- type: number
- example: 3
- set_permissions:
- type: object
- properties:
- change:
- type: object
- properties:
- groups:
- type: array
- items:
- type: number
- example: 3
- example:
- - 3
- users:
- type: array
- items:
- type: number
- example: 3
- example:
- - 3
- view:
- type: object
- properties:
- groups:
- type: array
- items:
- type: number
- example: 3
- example:
- - 3
- users:
- type: array
- items:
- type: number
- example: 4
- example:
- - 4
- example:
- is_insensitive: true
- match: ''
- matching_algorithm: 6
- name: Prova
- owner: 3
- set_permissions:
- change:
- groups:
- - 3
- users:
- - 3
- view:
- groups:
- - 3
- users:
- - 4
- responses:
- '200':
- description: ''
- /api/correspondents/{corrId}/:
- put:
- tags:
- - Correspondents
- summary: Update correspondent
- description: >-
- ### Update Correspondent Details
- This endpoint allows the client to update the details of a specific
- correspondent.
- #### Request Body
- - `id` (number): The unique identifier of the correspondent.
- - `slug` (string): The unique slug of the correspondent.
- - `name` (string): The name of the correspondent.
- - `match` (string): The match value.
- - `matching_algorithm` (number): The matching algorithm used.
- - `is_insensitive` (boolean): Indicates if the matching is
- case-insensitive.
- - `document_count` (number): The count of documents associated with the
- correspondent.
- - `last_correspondence` (null): The last correspondence details.
- - `owner` (number): The owner of the correspondent.
- - `permissions` (object): The permissions object containing view and
- change permissions for users and groups.
- - `view` (object): View permissions for users and groups.
- - `users` (array): Array of user IDs with view permissions.
- - `groups` (array): Array of group IDs with view permissions.
- - `change` (object): Change permissions for users and groups.
- - `users` (array): Array of user IDs with change permissions.
- - `groups` (array): Array of group IDs with change permissions.
- - `set_permissions` (object): The set permissions object containing view
- and change permissions for users and groups.
- - `view` (object): View permissions for users and groups.
- - `users` (array): Array of user IDs with view permissions.
- - `groups` (array): Array of group IDs with view permissions.
- - `change` (object): Change permissions for users and groups.
- - `users` (array): Array of user IDs with change permissions.
- - `groups` (array): Array of group IDs with change permissions.
- - `permissions_form` (object): The permissions form details.
- - `owner` (number): The owner of the correspondent.
- - `set_permissions` (object): The set permissions object containing view and change permissions for users and groups.
- - `view` (object): View permissions for users and groups.
- - `users` (array): Array of user IDs with view permissions.
- - `groups` (array): Array of group IDs with view permissions.
- - `change` (object): Change permissions for users and groups.
- - `users` (array): Array of user IDs with change permissions.
- - `groups` (array): Array of group IDs with change permissions.
- #### Response
- ``` json
- {
- "status": "success",
- "message": "Correspondent details updated successfully"
- }
- ```
- operationId: updateCorrespondent
- requestBody:
- content:
- application/json:
- schema:
- type: object
- properties:
- document_count:
- type: number
- example: 0
- id:
- type: number
- example: 1
- is_insensitive:
- type: boolean
- example: true
- last_correspondence:
- nullable: true
- example: null
- match:
- type: string
- example: ''
- matching_algorithm:
- type: number
- example: 2
- name:
- type: string
- example: Prova
- owner:
- type: number
- example: 3
- permissions:
- type: object
- properties:
- change:
- type: object
- properties:
- groups:
- type: array
- items:
- type: number
- example: 3
- example:
- - 3
- users:
- type: array
- items:
- type: number
- example: 4
- example:
- - 4
- view:
- type: object
- properties:
- groups:
- type: array
- items:
- type: number
- example: 3
- example:
- - 3
- users:
- type: array
- items:
- type: number
- example: 3
- example:
- - 3
- - 4
- permissions_form:
- type: object
- properties:
- owner:
- type: number
- example: 3
- set_permissions:
- type: object
- properties:
- change:
- type: object
- properties:
- groups:
- type: array
- items:
- type: number
- example: 3
- example:
- - 3
- users:
- type: array
- items:
- type: number
- example: 4
- example:
- - 4
- view:
- type: object
- properties:
- groups:
- type: array
- items:
- type: number
- example: 3
- example:
- - 3
- users:
- type: array
- items:
- type: number
- example: 3
- example:
- - 3
- - 4
- set_permissions:
- type: object
- properties:
- change:
- type: object
- properties:
- groups:
- type: array
- items:
- type: number
- example: 3
- example:
- - 3
- users:
- type: array
- items:
- type: number
- example: 4
- example:
- - 4
- view:
- type: object
- properties:
- groups:
- type: array
- items: {}
- example: []
- users:
- type: array
- items:
- type: number
- example: 3
- example:
- - 3
- - 4
- slug:
- type: string
- example: prova
- example:
- document_count: 0
- id: 1
- is_insensitive: true
- last_correspondence: null
- match: ''
- matching_algorithm: 2
- name: Prova
- owner: 3
- permissions:
- change:
- groups:
- - 3
- users:
- - 4
- view:
- groups:
- - 3
- users:
- - 3
- - 4
- permissions_form:
- owner: 3
- set_permissions:
- change:
- groups:
- - 3
- users:
- - 4
- view:
- groups:
- - 3
- users:
- - 3
- - 4
- set_permissions:
- change:
- groups:
- - 3
- users:
- - 4
- view:
- groups: []
- users:
- - 3
- - 4
- slug: prova
- responses:
- '200':
- description: ''
- delete:
- tags:
- - Correspondents
- summary: Delete correspondent
- description: >-
- ### Delete Correspondent
- This endpoint is used to delete a specific correspondent identified by
- the `corrId`.
- #### Request
- - Method: DELETE
- - URL: `/api/correspondents//`
- #### Request Body
- This request does not require a request body.
- #### Response
- The response for this request is a JSON schema with the following
- properties:
- - `message`: A string indicating the result of the deletion operation.
- operationId: deleteCorrespondent
- responses:
- '200':
- description: ''
- parameters:
- - name: corrId
- in: path
- required: true
- schema:
- type: string
- /api/tags/:
- get:
- tags:
- - Tags
- summary: Get tags
- description: >-
- # Get Tags
- This endpoint retrieves tags with optional pagination and permission
- filtering.
- ## Request
- ### Query Parameters
- - `page` (integer, required): The page number for paginated results.
- - `full_perms` (boolean, required): Indicates whether to include tags
- with full permissions.
- ## Response
- The response for this request is a JSON object conforming to the
- following schema:
- ``` json
- {
- "type": "object",
- "properties": {
- "tags": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "id": {
- "type": "string"
- },
- "name": {
- "type": "string"
- },
- "permissions": {
- "type": "object",
- "properties": {
- "read": {
- "type": "boolean"
- },
- "write": {
- "type": "boolean"
- }
- }
- }
- }
- }
- },
- "total": {
- "type": "integer"
- }
- }
- }
- ```
- operationId: getTags
- parameters:
- - name: id__in
- in: query
- schema:
- type: string
- example: ''
- - name: id
- in: query
- schema:
- type: string
- example: ''
- - name: name__istartswith
- in: query
- schema:
- type: string
- example: ''
- - name: name__iendswith
- in: query
- schema:
- type: string
- example: ''
- - name: name__icontains
- in: query
- schema:
- type: string
- example: ''
- - name: name__iexact
- in: query
- schema:
- type: string
- example: ''
- - name: full_perms
- in: query
- schema:
- type: string
- example: 'true'
- - name: ordering
- in: query
- schema:
- type: string
- responses:
- '200':
- description: ''
- post:
- tags:
- - Tags
- summary: Add tag
- description: >-
- ### Create a New Tag
- This endpoint allows you to create a new tag.
- #### Request Body
- - `name` (string, required): The name of the tag.
- - `color` (string, required): The color code of the tag.
- - `is_inbox_tag` (boolean, required): Indicates if the tag is an inbox
- tag.
- - `matching_algorithm` (integer, required): The matching algorithm for
- the tag.
- - `match` (string, required): The matching criteria for the tag.
- - `is_insensitive` (boolean, required): Indicates if the matching is
- case insensitive.
- - `owner` (integer, required): The owner of the tag.
- - `set_permissions` (object, required): The permissions set for the tag.
- - `view` (object, required): The view permissions for the tag.
- - `users` (array of integers, required): The users allowed to view the tag.
- - `groups` (array of integers, required): The groups allowed to view the tag.
- - `change` (object, required): The change permissions for the tag.
- - `users` (array of integers, required): The users allowed to change the tag.
- - `groups` (array of integers, required): The groups allowed to change the tag.
- #### Response (JSON Schema)
- ``` json
- {
- "type": "object",
- "properties": {
- "id": {
- "type": "integer"
- },
- "name": {
- "type": "string"
- },
- "color": {
- "type": "string"
- },
- "is_inbox_tag": {
- "type": "boolean"
- },
- "matching_algorithm": {
- "type": "integer"
- },
- "match": {
- "type": "string"
- },
- "is_insensitive": {
- "type": "boolean"
- },
- "owner": {
- "type": "integer"
- },
- "set_permissions": {
- "type": "object",
- "properties": {
- "view": {
- "type": "object",
- "properties": {
- "users": {
- "type": "array",
- "items": {
- "type": "integer"
- }
- },
- "groups": {
- "type": "array",
- "items": {
- "type": "integer"
- }
- }
- }
- },
- "change": {
- "type": "object",
- "properties": {
- "users": {
- "type": "array",
- "items": {
- "type": "integer"
- }
- },
- "groups": {
- "type": "array",
- "items": {
- "type": "integer"
- }
- }
- }
- }
- }
- }
- }
- }
- ```
- operationId: addTag
- requestBody:
- content:
- application/json:
- schema:
- type: object
- properties:
- color:
- type: string
- example: '#c180df'
- is_inbox_tag:
- type: boolean
- example: false
- is_insensitive:
- type: boolean
- example: true
- match:
- type: string
- example: ''
- matching_algorithm:
- type: number
- example: 6
- name:
- type: string
- example: tag
- owner:
- type: number
- example: 3
- set_permissions:
- type: object
- properties:
- change:
- type: object
- properties:
- groups:
- type: array
- items:
- type: number
- example: 3
- example:
- - 3
- users:
- type: array
- items:
- type: number
- example: 3
- example:
- - 3
- view:
- type: object
- properties:
- groups:
- type: array
- items:
- type: number
- example: 3
- example:
- - 3
- users:
- type: array
- items:
- type: number
- example: 4
- example:
- - 4
- example:
- color: '#c180df'
- is_inbox_tag: false
- is_insensitive: true
- match: ''
- matching_algorithm: 6
- name: tag
- owner: 3
- set_permissions:
- change:
- groups:
- - 3
- users:
- - 3
- view:
- groups:
- - 3
- users:
- - 4
- responses:
- '200':
- description: ''
- /api/tags/{tagId}/:
- put:
- tags:
- - Tags
- summary: Update tag
- description: >-
- ### Update Tag Details
- This endpoint allows the user to update the details of a specific tag.
- #### Request Body
- - `id` (integer): The unique identifier of the tag.
- - `slug` (string): The slug of the tag.
- - `name` (string): The name of the tag.
- - `color` (string): The color code associated with the tag.
- - `text_color` (string): The text color code for the tag.
- - `match` (string): The matching criteria for the tag.
- - `matching_algorithm` (integer): The matching algorithm used for the
- tag.
- - `is_insensitive` (boolean): Indicates if the tag matching is case
- insensitive.
- - `is_inbox_tag` (boolean): Indicates if the tag is an inbox tag.
- - `document_count` (integer): The count of documents associated with the
- tag.
- - `owner` (integer): The user ID of the tag owner.
- - `permissions` (object): The permissions for viewing and changing the
- tag, including users and groups.
- - `set_permissions` (object): The set permissions for viewing and
- changing the tag, including users and groups.
- - `permissions_form` (object): The permissions form for the tag,
- including owner and set permissions.
- #### Response
- The response will contain the updated details of the tag.
- operationId: updateTag
- requestBody:
- content:
- text/plain:
- example: "{\r\n \"id\": 1,\r\n \"slug\": \"tagprova\",\r\n \"name\": \"tagProva\",\r\n \"color\": \"#a6cee3\",\r\n \"text_color\": \"#000000\",\r\n \"match\": \"\",\r\n \"matching_algorithm\": 6,\r\n \"is_insensitive\": true,\r\n \"is_inbox_tag\": false,\r\n \"document_count\": 0,\r\n \"owner\": 3,\r\n //old permissions\r\n \"permissions\": {\r\n \"view\": {\r\n \"users\": [\r\n 3,\r\n 4\r\n ],\r\n \"groups\": [\r\n 3\r\n ]\r\n },\r\n \"change\": {\r\n \"users\": [\r\n 3\r\n ],\r\n \"groups\": [\r\n 3\r\n ]\r\n }\r\n },\r\n //new permissions\r\n \"set_permissions\": {\r\n \"view\": {\r\n \"users\": [\r\n 4,\r\n 3,\r\n 5\r\n ],\r\n \"groups\": [\r\n 3\r\n ]\r\n },\r\n \"change\": {\r\n \"users\": [],\r\n \"groups\": [\r\n 3\r\n ]\r\n }\r\n },\r\n \"permissions_form\": {\r\n \"owner\": 3,\r\n \"set_permissions\": {\r\n \"view\": {\r\n \"users\": [\r\n 3,\r\n 4\r\n ],\r\n \"groups\": [\r\n 3\r\n ]\r\n },\r\n \"change\": {\r\n \"users\": [\r\n 3\r\n ],\r\n \"groups\": [\r\n 3\r\n ]\r\n }\r\n }\r\n }\r\n}"
- responses:
- '200':
- description: ''
- delete:
- tags:
- - Tags
- summary: Delete tag
- description: >-
- This endpoint is used to delete a specific tag by its ID.
- ### Request
- - Method: `DELETE`
- - Endpoint: `/api/tags//`
- ### Response
- The response of this request is a JSON schema representing the deleted
- tag. The schema includes the properties related to the tag such as ID,
- name, description, and any other relevant details.
- Example JSON schema:
- ``` json
- {
- "type": "object",
- "properties": {
- "tagId": {
- "type": "string"
- },
- "name": {
- "type": "string"
- },
- "description": {
- "type": "string"
- },
- "createdAt": {
- "type": "string",
- "format": "date-time"
- },
- "updatedAt": {
- "type": "string",
- "format": "date-time"
- }
- }
- }
- ```
- operationId: deleteTag
- responses:
- '200':
- description: ''
- parameters:
- - name: tagId
- in: path
- required: true
- schema:
- type: string
- /api/document_types/:
- get:
- tags:
- - Document types
- summary: Get document types
- description: >-
- This endpoint makes an HTTP GET request to retrieve a list of document
- types. The request includes query parameters for page number and full
- permissions. The response will have a status code of 404 and a JSON
- content type. The response body will include a "detail" key with an
- empty string value.
- operationId: getDocumentTypes
- parameters:
- - name: page
- in: query
- schema:
- type: string
- example: ''
- - name: full_perms
- in: query
- schema:
- type: string
- example: 'true'
- - name: id__in
- in: query
- schema:
- type: string
- example: ''
- - name: id
- in: query
- schema:
- type: string
- example: ''
- - name: name__istartswith
- in: query
- schema:
- type: string
- example: ''
- - name: name__iendswith
- in: query
- schema:
- type: string
- example: ''
- - name: name__icontains
- in: query
- schema:
- type: string
- example: ''
- - name: name__iexact
- in: query
- schema:
- type: string
- example: ''
- - name: ordering
- in: query
- schema:
- type: string
- responses:
- '200':
- description: ''
- post:
- tags:
- - Document types
- summary: Add document type
- description: >-
- ### Add Document Type
- This endpoint allows you to add a new document type.
- #### Request Body
- - `name` (string, required): The name of the document type.
- - `matching_algorithm` (integer, required): The matching algorithm for
- the document type.
- - `match` (string, required): The match criteria for the document type.
- - `is_insensitive` (boolean, required): Indicates if the matching is
- case insensitive.
- - `owner` (integer, required): The owner of the document type.
- - `set_permissions` (object, required): The permissions set for the
- document type.
- - `view` (object, required): The view permissions for the document type.
- - `users` (array of integers, required): The users allowed to view the document type.
- - `groups` (array of integers, required): The groups allowed to view the document type.
- - `change` (object, required): The change permissions for the document type.
- - `users` (array of integers, required): The users allowed to change the document type.
- - `groups` (array of integers, required): The groups allowed to change the document type.
- #### Response
- The response will contain the details of the newly added document type.
- operationId: addDocumentType
- requestBody:
- content:
- application/json:
- schema:
- type: object
- properties:
- is_insensitive:
- type: boolean
- example: true
- match:
- type: string
- example: ''
- matching_algorithm:
- type: number
- example: 6
- name:
- type: string
- example: pdf
- owner:
- type: number
- example: 3
- set_permissions:
- type: object
- properties:
- change:
- type: object
- properties:
- groups:
- type: array
- items:
- type: number
- example: 3
- example:
- - 3
- users:
- type: array
- items:
- type: number
- example: 4
- example:
- - 4
- view:
- type: object
- properties:
- groups:
- type: array
- items:
- type: number
- example: 3
- example:
- - 3
- users:
- type: array
- items:
- type: number
- example: 3
- example:
- - 3
- example:
- is_insensitive: true
- match: ''
- matching_algorithm: 6
- name: pdf
- owner: 3
- set_permissions:
- change:
- groups:
- - 3
- users:
- - 4
- view:
- groups:
- - 3
- users:
- - 3
- responses:
- '200':
- description: ''
- /api/document_types/{typeId}/:
- put:
- tags:
- - Document types
- summary: Update document type
- description: >-
- ### Update Document Type
- This endpoint allows the user to update a specific document type.
- #### Request Body
- - `id` (number): The unique identifier of the document type.
- - `slug` (string): The slug of the document type.
- - `name` (string): The name of the document type.
- - `match` (string): The match criteria for the document type.
- - `matching_algorithm` (number): The matching algorithm used for the
- document type.
- - `is_insensitive` (boolean): Indicates if the matching is case
- insensitive.
- - `document_count` (number): The count of documents associated with the
- type.
- - `owner` (number): The user ID of the owner of the document type.
- - `permissions` (object): The permissions object for view and change
- actions.
- - `view` (object): The view permissions for users and groups.
- - `users` (array): The list of user IDs with view permissions.
- - `groups` (array): The list of group IDs with view permissions.
- - `change` (object): The change permissions for users and groups.
- - `users` (array): The list of user IDs with change permissions.
- - `groups` (array): The list of group IDs with change permissions.
- - `set_permissions` (object): The set permissions object for view and
- change actions.
- - `view` (object): The view permissions for users and groups.
- - `users` (array): The list of user IDs with view permissions.
- - `groups` (array): The list of group IDs with view permissions.
- - `change` (object): The change permissions for users and groups.
- - `users` (array): The list of user IDs with change permissions.
- - `groups` (array): The list of group IDs with change permissions.
- - `permissions_form` (object): The permissions form object containing
- owner and set_permissions.
- - `owner` (number): The user ID of the owner of the document type.
- - `set_permissions` (object): The set permissions object for view and change actions.
- - `view` (object): The view permissions for users and groups.
- - `users` (array): The list of user IDs with view permissions.
- - `groups` (array): The list of group IDs with view permissions.
- - `change` (object): The change permissions for users and groups.
- - `users` (array): The list of user IDs with change permissions.
- - `groups` (array): The list of group IDs with change permissions.
- #### Response
- The response of this request will be a JSON object conforming to the
- schema defined for the document type.
- operationId: updateDocumentType
- requestBody:
- content:
- text/plain:
- example: "{\r\n \"id\": 1,\r\n \"slug\": \"pdf\",\r\n \"name\": \"pdf\",\r\n \"match\": \"\",\r\n \"matching_algorithm\": 6,\r\n \"is_insensitive\": true,\r\n \"document_count\": 0,\r\n \"owner\": 3,\r\n // old permissions\r\n \"permissions\": {\r\n \"view\": {\r\n \"users\": [\r\n 3,\r\n 4\r\n ],\r\n \"groups\": [\r\n 3\r\n ]\r\n },\r\n \"change\": {\r\n \"users\": [\r\n 4\r\n ],\r\n \"groups\": [\r\n 3\r\n ]\r\n }\r\n },\r\n // new permissions\r\n \"set_permissions\": {\r\n \"view\": {\r\n \"users\": [\r\n 3\r\n ],\r\n \"groups\": [\r\n 3\r\n ]\r\n },\r\n \"change\": {\r\n \"users\": [],\r\n \"groups\": []\r\n }\r\n },\r\n \"permissions_form\": {\r\n \"owner\": 3,\r\n \"set_permissions\": {\r\n \"view\": {\r\n \"users\": [\r\n 3,\r\n 4\r\n ],\r\n \"groups\": [\r\n 3\r\n ]\r\n },\r\n \"change\": {\r\n \"users\": [\r\n 4\r\n ],\r\n \"groups\": [\r\n 3\r\n ]\r\n }\r\n }\r\n }\r\n}"
- responses:
- '200':
- description: ''
- delete:
- tags:
- - Document types
- summary: Delete document type
- description: >-
- The API endpoint sends a DELETE request to the specified document type
- using the unique typeId in the URL. Upon successful deletion, the
- endpoint returns a JSON response with the schema representing the
- response data.
- operationId: deleteDocumentType
- responses:
- '200':
- description: ''
- parameters:
- - name: typeId
- in: path
- required: true
- schema:
- type: string
- /api/search/:
- get:
- tags:
- - Search
- summary: Search
- description: >-
- This endpoint makes an HTTP GET request to retrieve search results based
- on the provided query parameter. The request should include the query
- parameter in the URL to specify the search term.
- ### Request Parameters
- - `query` (string, required): The search term to be used for retrieving
- the results.
- ### Response
- The response will include the search results based on the provided query
- parameter.
- operationId: search
- parameters:
- - name: query
- in: query
- schema:
- type: string
- example: ''
- responses:
- '200':
- description: ''
- tags:
- - name: Storage paths
- - name: Documents
- description: Endpoints for managing documents
- - name: Custom fields
- - name: Groups
- - name: Users
- - name: Views
- - name: Correspondents
- - name: Tags
- - name: Document types
- - name: Search
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement