Skip to main content
GET
/
routines
/
v1
/
rs
List routines
curl --request GET \
  --url https://z52mnqg347.execute-api.eu-west-3.amazonaws.com/main/routines/v1/rs \
  --header 'Authorization: Bearer <token>' \
  --header 'content-type: <content-type>' \
  --header 'x-session-token: <x-session-token>'
{
  "data": [
    {
      "id": 1,
      "name": "Monthly Maintenance",
      "description": "This routine involves monthly maintenance checks for all equipment.",
      "type": 1,
      "autoCreateEnabled": true,
      "autoAttachEnabled": false,
      "contractId": 1,
      "assignedCompanyContactId": 1,
      "assignedUserId": 1,
      "archivedAt": "2024-12-01T12:34:56.000Z",
      "updatedAt": "2024-12-01T12:34:56.000Z",
      "createdAt": "2024-12-01T12:34:56.000Z",
      "rrule": "FREQ=MONTHLY;INTERVAL=1",
      "contract": {
        "id": 1,
        "name": "Service Agreement",
        "status": 1,
        "dueAt": "2025-01-15T09:30:00.000Z"
      },
      "assignedTo": {
        "type": 123,
        "id": 1,
        "name": "John Doe",
        "email": "test@mail.com"
      },
      "sites": [
        {
          "id": 1,
          "name": "Main site",
          "isEstablishment": true,
          "establishmentId": 10,
          "serialNumber": "123456",
          "archivedAt": "2024-12-10T10:00:00.000Z"
        }
      ],
      "siteIds": [
        123
      ],
      "establishmentCell": {
        "establishment": {
          "id": 1,
          "establishmentSiteId": 5,
          "name": "Main site",
          "count": 123
        },
        "cell": {
          "id": 1,
          "name": "Main site",
          "count": 123
        }
      },
      "rule": {
        "id": 1,
        "name": "Annual Safety Check",
        "type": 1,
        "rrule": "FREQ=YEARLY;BYMONTH=12;BYMONTHDAY=1",
        "workflowType": 1,
        "complianceType": 1,
        "sourceType": 1,
        "archivedAt": "2024-12-10T10:00:00.000Z"
      },
      "rulesCount": 123,
      "technicalInstallations": [
        {
          "id": 1,
          "name": "establishment_informations.installation_ascenseurs",
          "presignedUrl": "https://example.com/presigned-url"
        }
      ],
      "users": [
        {
          "id": 1,
          "firstName": "John",
          "lastName": "Doe",
          "email": "test@mail.com"
        }
      ],
      "lastIntervention": {
        "id": 1,
        "date": "2024-12-01T12:34:56.000Z"
      },
      "scheduleIntervention": {
        "id": 1,
        "date": "2024-12-01T12:34:56.000Z"
      },
      "siteRuleIds": [
        1
      ],
      "actions": {
        "canBeUpdated": true,
        "canBeDeleted": true
      }
    }
  ],
  "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

x-session-token
string
required

Session token used for authenticating the request.

Example:

"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOiIxMjM0NTY3ODkwIiwic2Vzc2lvbklkIjoiYWJjZGVmMTIzNDU2IiwiaWF0IjoxNjA1MDk3ODk5LCJleHAiOjE2MDUxODQyOTl9.4XRQ1iXDyvEj5LgPZHbmTmzOZs98M3YPOzgf3MhxjaI"

content-type
string
required

Content type, must be "application/json".

Allowed value: "application/json"
x-sites
string

List of site IDs.

Example:

"['1', '2']"

Query Parameters

extend
enum<string>[]

Extend options:

  • "contract": Get the routines with contract fields

  • "assigned-to": Get the routine details for a site rule

  • "sites": Get the site rules for the routines

  • "site-ids": Get the site ids for the routines

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

  • "rules": Get the rules for the routines

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

  • "users": Get the users for the routines

  • "interventions": Get the latest intervention date.

  • "site-rule-ids": Get information about the site rule IDs

  • "actions-info": Give information about actions that can be done on the routine

Available options:
contract,
assigned-to,
sites,
site-ids,
establishment-cell,
rules,
technical-installations,
users,
interventions,
site-rule-ids,
actions-info
whereName
string

Filter by name

Example:

"string"

whereDescription
string

Filter by description

Example:

"string"

whereType
integer[]

Filter by type

Required range: -9007199254740991 <= x <= 9007199254740991
Example:
[1, 2, 3]
whereCreateAutoEnabled
boolean

Filter by create auto enabled

Example:

true

whereRrule
string

Filter by rrule

Example:

"string"

whereSiteIds
integer[]

Filter by site ids

Required range: -9007199254740991 <= x <= 9007199254740991
Example:
[1, 2, 3]
whereSiteId
integer

Filter by site id

Required range: -9007199254740991 <= x <= 9007199254740991
Example:

1

whereSiteName
string

Filter by site name

Example:

"string"

whereRuleIds
integer[]

Filter by rule ids

Required range: -9007199254740991 <= x <= 9007199254740991
Example:
[1, 2, 3]
whereRuleId
integer

Filter by rule id

Required range: -9007199254740991 <= x <= 9007199254740991
Example:

1

whereRuleName
string

Filter by rule name

Example:

"string"

whereUserIds
integer[]

Filter by user ids

Required range: -9007199254740991 <= x <= 9007199254740991
Example:
[1, 2, 3]
whereAssignedCompanyContactIds
integer[]

Filter by assigned company contact ids

Required range: -9007199254740991 <= x <= 9007199254740991
Example:
[1, 2, 3]
whereCompanyId
integer[]

Filter by company id

Required range: -9007199254740991 <= x <= 9007199254740991
Example:
[1, 2, 3]
whereCompanyIds
integer[]

Filter by company ids

Required range: -9007199254740991 <= x <= 9007199254740991
Example:
[1, 2, 3]
whereCompanyName
string

Filter by company name

Example:

"string"

whereAssignedUserIds
integer[]

Filter by assigned user ids

Required range: -9007199254740991 <= x <= 9007199254740991
Example:
[1, 2, 3]
whereAssignedUserName
string

Filter by assigned user name

Example:

"string"

whereContractIds
integer[]

Filter by contract ids

Required range: -9007199254740991 <= x <= 9007199254740991
Example:
[1, 2, 3]
whereContractId
integer

Filter by contract id

Required range: -9007199254740991 <= x <= 9007199254740991
Example:

1

whereContractName
string

Filter by contract name

Example:

"string"

whereArchivedAt
object

Filter by archivedAt

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

Filter by isArchived

Example:

true

whereUpdatedAt
object

Filter by updatedAt

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

Filter by createdAt

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

Filter by text search in name and description

Example:

"string"

whereTechnicalInstallationIds
integer[]

Filter by technical installation ids

Required range: -9007199254740991 <= x <= 9007199254740991
Example:
[1, 2, 3]
orderBy
object[]
includeCount
boolean
default:false

Include total count in response.

Example:

true

page
integer
default:1

Page number.

Required range: -9007199254740991 <= x <= 9007199254740991
Example:

1

pageSize
integer
default:50

Page size.

Required range: -9007199254740991 <= x <= 9007199254740991
Example:

50

findId
integer

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

Required range: -9007199254740991 <= x <= 9007199254740991
Example:

1

subPageSize
integer
default:10

Sub page size for grouping items.

Required range: -9007199254740991 <= x <= 9007199254740991
Example:

10

Response

200 - application/json

List of routines

data
object[]
required
totalCount
integer

Total count of items.

Required range: -9007199254740991 <= x <= 9007199254740991
Example:

100

pagination
object

Pagination information.