Skip to main content
GET
/
rules
/
v2
/
bo
/
library
List rules for the given site Ids
curl --request GET \
  --url https://z52mnqg347.execute-api.eu-west-3.amazonaws.com/main/rules/v2/bo/library \
  --header 'Authorization: Bearer <token>' \
  --header 'x-session-token: <x-session-token>'
{
  "data": [
    {
      "id": 1,
      "name": "Annual Safety Check",
      "description": "This rule requires an annual safety check for all installations.",
      "type": 1,
      "sourceType": 1,
      "links": [
        {
          "name": "Rule Details",
          "url": "https://example.com/rule-details"
        }
      ],
      "rrule": "FREQ=YEARLY;BYMONTH=12;BYMONTHDAY=1",
      "rruleGap": 30,
      "workflowType": 1,
      "complianceType": 1,
      "siteScopes": [
        {
          "categories": [
            1
          ],
          "classifications": [
            "ERP"
          ],
          "types": [
            "J"
          ],
          "privateCapacity": 100,
          "privateCapacityOperator": ">="
        }
      ],
      "companyTypes": [
        1
      ],
      "archivedAt": "2024-12-10T10:00:00.000Z",
      "deletedAt": "2024-12-15T10:00:00.000Z",
      "updatedAt": "2024-12-09T14:23:00.000Z",
      "createdAt": "2024-01-15T08:45:00.000Z",
      "equipmentScopes": [
        {
          "id": 1,
          "name": "Example Name"
        }
      ],
      "userScopes": [
        {
          "id": 1,
          "professions": [
            {
              "id": 1,
              "name": "Urgent"
            }
          ],
          "diplomaTitles": [
            {
              "id": 1,
              "name": "Urgent"
            }
          ]
        }
      ],
      "technicalInstallations": [
        {
          "id": 1,
          "name": "establishment_informations.installation_ascenseurs",
          "presignedUrl": "https://example.com/presigned-url"
        }
      ],
      "actions": {
        "canBeUpdated": true,
        "canBeDeleted": true,
        "canBeRestored": 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"

x-sites
string

List of site IDs.

Example:

"['1', '2']"

Query Parameters

extend
enum<string>[]

Extend options:

  • "equipment-scopes": Get information about scopes linked to the rule

  • "user-scopes": Get information about scopes linked to the rule

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

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

Available options:
equipment-scopes,
user-scopes,
technical-installations,
actions-info
whereName
string

Filter by rule name

Example:

"string"

whereDescription
string

Filter by rule description

Example:

"string"

whereType
integer[]

Filter by rule type

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

Filter by rule link

Example:

"string"

whereRrule
string

Filter by rule recurrence rule

Example:

"string"

whereWorkflowType
integer[]

Filter by workflow type

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

Filter by compliance type

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

Filter by establishment categories

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

Filter by establishment classifications

Example:
["string1", "string2", "string3"]
whereEstablishmentTypes
string[]

Filter by establishment types

Example:
["string1", "string2", "string3"]
whereEstablishmentPrivateCapacity
integer

Filter by establishment private capacity

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

1

whereCompanyTypes
integer[]

Filter by company types

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

Filter by createdAt date

Example:

"2021-01-01T00:00:00.000Z"

whereUpdatedAt
string

Filter by updatedAt date

Example:

"2021-01-01T00:00:00.000Z"

whereIsArchived
boolean

Filter by isArchived flag

Example:

true

whereArchivedAt
string

Filter by archivedAt date

Example:

"2021-01-01T00:00:00.000Z"

whereIsDeleted
boolean

Filter by isDeleted flag

Example:

true

whereDeletedAt
string

Filter by deletedAt date

Example:

"2021-01-01T00:00:00.000Z"

whereTechnicalInstallationIds
integer[]

Filter by technical installation ids

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

Filter by scope ids

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

Filter by specification value ids

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

Filter by technical installation name

Example:

"string"

whereText
string

Filter by global text in report

Example:

"string"

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 rules

data
object[]
required
totalCount
integer

Total count of items.

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

100

pagination
object

Pagination information.