Skip to main content
GET
/
documents
/
v2
/
rs
List documents
curl --request GET \
  --url https://z52mnqg347.execute-api.eu-west-3.amazonaws.com/main/documents/v2/rs \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: <content-type>' \
  --header 'X-Session-Token: <x-session-token>'
{
  "data": [
    {
      "id": 1,
      "name": "Document Name",
      "origin": {
        "type": "PLAN",
        "id": 123
      },
      "updatedAt": "2024-12-09T14:23:00.000Z",
      "createdAt": "2024-01-15T08:45:00.000Z",
      "actions": {
        "canBeUpdated": true,
        "canBeDeleted": true
      },
      "uploadedBy": {
        "id": 1,
        "img": "https://www.example.com/image.jpg",
        "firstName": "John",
        "lastName": "Doe"
      },
      "label": {
        "id": 1,
        "name": "Urgent",
        "color": "#FF5733"
      },
      "presignedUrl": "https://bucket.s3.amazonaws.com/1",
      "technicalInstallations": [
        {
          "id": 1,
          "name": "establishment_informations.installation_ascenseurs",
          "presignedUrl": "https://example.com/presigned-url"
        }
      ],
      "establishmentCell": {
        "establishment": {
          "id": 1,
          "name": "Main site",
          "count": 123
        },
        "cell": {
          "id": 1,
          "name": "Main site",
          "count": 123
        }
      }
    }
  ],
  "totalCount": 100,
  "pagination": {
    "page": 1,
    "pageSize": 50
  }
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Headers

Content-Type
enum<string>
required

Content type, must be "application/json".

Available options:
application/json
X-Session-Token
string
required

Session token used for authenticating the request.

Example:

"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOiIxMjM0NTY3ODkwIiwic2Vzc2lvbklkIjoiYWJjZGVmMTIzNDU2IiwiaWF0IjoxNjA1MDk3ODk5LCJleHAiOjE2MDUxODQyOTl9.4XRQ1iXDyvEj5LgPZHbmTmzOZs98M3YPOzgf3MhxjaI"

Query Parameters

extend
enum<string>[]

Extend options:

  • "actions-info": Give information about the origin of the document

  • "created-by": Get created about the person who created the document

  • "label": Get label information

  • "presigned-url": Get presigned url of the documents

  • "technical-installations": Get information about the technical installations linked to the document

  • "establishment-cell": Get information about the establishment cell

Available options:
actions-info,
created-by,
label,
presigned-url,
technical-installations,
establishment-cell
whereName
string

Filter by document name (contains)

Example:

"string"

whereCreatedAt
object

Filter by creation date

Example:
{
"start": "2021-01-01T00:00:00.000Z",
"end": "2021-12-31T23:59:59.999Z"
}
whereUpdatedAt
object

Filter by update date

Example:
{
"start": "2021-01-01T00:00:00.000Z",
"end": "2021-12-31T23:59:59.999Z"
}
whereOriginType
string[]

Filter by document origin type

Example:
["A", "B", "C"]
whereOriginId
integer

Filter by document origin ID (requires whereOriginType)

Example:

1

whereTechnicalInstallationIds
integer[]

Filter by technical installation IDs

Example:
[1, 2, 3]
whereSiteIds
integer[]

Filter by site IDs

Example:
[1, 2, 3]
whereCreatedBy
integer

Filter by creator ID

Example:

1

whereLabel
integer[]

Filter by label ID

Example:
[1, 2, 3]
orderBy
object[]
includeCount
boolean
default:false

Include total count in response.

Example:

true

page
integer
default:1

Page number.

Example:

1

pageSize
integer
default:50

Page size.

Example:

50

findId
integer

Get the page where the item with this id is located.

Example:

1

subPageSize
integer
default:10

Sub page size for grouping items.

Example:

10

Response

200 - application/json

Documents retrieved successfully

data
object[]
required
totalCount
integer

Total count of items.

Example:

100

pagination
object

Pagination information.