openapi: 3.1.0
info:
  contact:
    email: dev@rudder.io
    name: Rudder developers
    url: https://www.rudder.io
  description: |2
      Download OpenAPI specification: [openapi.yml](openapi.yml)

    **Other documentation sources**:

    * [Main documentation](https://docs.rudder.io)
    * [Internal relay API](https://docs.rudder.io/api/relay/)

    # Introduction

    Rudder exposes a REST API, enabling the user to interact with Rudder without using the webapp, for example, in scripts or cron jobs.

    ## Authentication

    The Rudder REST API uses simple API keys for authentication.
    All requests must be authenticated (except from a generic status API).
    The tokens are 32-character strings, passed in a `X-API-Token` header, like in: 

    ```bash
    curl --header "X-API-Token: yourToken" https://rudder.example.com/rudder/api/latest/rules
    ```

    The tokens are the API equivalent of a password, and must
    be secured just like a password would be.

    ### API accounts

    The accounts are managed in the Web interface. There are three types of accounts:

    * **Global API accounts**: they are not linked to a Rudder user, and are managed by Rudder administrators in the _Administration -> API accounts_ page. You should define an expiration date whenever possible, and the most limited permissions.

    * **User tokens**: they are linked to a Rudder user, and give the same rights the user has. They are configured in the menu opened by clicking on the username in the main menu bar.
    There can be only one token by user. This feature is provided by the `api-authorizatons` plugin.

    * **System token**: it is a special token, not visible in the interface. Its value is postfixed with `-system`
    and is regenerated at each application restart. It is designed to allow running local calls to the API
    without having to configure an account. The token is written
    into `/var/rudder/run/api-token` and only readable by the `root` user. When using the token with `curl`, you should use the
    alternative form to prevent leaking the token in the process list:

    ```
    curl --header @/var/rudder/run/api-token-header
    ```

    When an action produces a change of configuration on the server, the API account that made it will
    be recorded in the event log, like for a Web interaction.

    ### Authorization

    When using Rudder without the `api-authorizatons` plugin, only global accounts are available, with
    two possible privilege levels, read-only or write.
    With the `api-authorizatons` plugin, you also get access to:

    * User tokens, which have the same permissions as the user, using the Rudder roles and permissions feature.
    * Custom ACLs on global API accounts. They provide fine-grained permissions on every endpoint.

    As a general principle,
    you should create dedicated tokens with the least privilege level for each different interaction you have with the
    API.
    This limits the risks of exploitation if a token is stolen, and allows tracking the activity
    of each token separately. Token renewal is also easier when they are only used for a limited purpose.

    ## Versioning

    Each time the API is extended with new features (new functions, new parameters, new responses, ...), it will be assigned a new version number. This will allow you
    to keep your existing scripts (based on previous behavior). Versions will always be integers (no 2.1 or 3.3, just 2, 3, 4, ...) or `latest`.

    You can change the version of the API used by setting it either within the url or in a header:

    * the URL: each URL is prefixed by its version id, like `/api/version/function`.

    ```bash
    # Version 10
    curl -X GET -H "X-API-Token: yourToken" https://rudder.example.com/rudder/api/10/rules
    # Latest
    curl -X GET -H "X-API-Token: yourToken" https://rudder.example.com/rudder/api/latest/rules
    # Wrong (not an integer) => 404 not found
    curl -X GET -H "X-API-Token: yourToken" https://rudder.example.com/rudder/api/3.14/rules
    ```

    * the HTTP headers. You can add the **X-API-Version** header to your request. The value needs to be an integer or `latest`.

    ```bash
    # Version 10
    curl -X GET -H "X-API-Token: yourToken" -H "X-API-Version: 10" https://rudder.example.com/rudder/api/rules
    # Wrong => Error response indicating which versions are available
    curl -X GET -H "X-API-Token: yourToken" -H "X-API-Version: 3.14" https://rudder.example.com/rudder/api/rules
    ```

    In the future, we may declare some versions as deprecated, in order to remove them in a later version of Rudder, but we will never remove any versions without warning, or without a safe
    period of time to allow migration from previous versions.


    <h4>Existing versions</h4>
    <table>
      <thead>
        <tr>
          <th style="width: 20%">Version</th>
          <th style="width: 20%">Rudder versions it appeared in</th>
          <th style="width: 70%">Description</th>
        </tr>
      </thead>
      <tbody>
        <tr>
          <td class="code">1</td>
          <td class="code">Never released (for internal use only)</td>
          <td>Experimental version</td>
        </tr>
        <tr>
          <td class="code">2 to 10 (deprecated)</td>
          <td class="code">4.3 and before</td>
          <td>These versions provided the core set of API features for rules, directives, nodes global parameters, change requests and compliance, rudder settings, and system API</td>
        </tr>
        <tr>
          <td class="code">11</td>
          <td class="code">5.0</td>
          <td>New system API (replacing old localhost v1 api): status, maintenance operations and server behavior</td>
        </tr>
        <tr>
          <td class="code">12</td>
          <td class="code">6.0 and 6.1</td>
          <td>Node key management</td>
        </tr>
        <tr>
          <td class="code">13</td>
          <td class="code">6.2</td>
          <td><ul>
            <li>Node status endpoint</li>
            <li>System health check</li>
            <li>System maintenance job to purge software [that endpoint was back-ported in 6.1]</li>
          </ul></td>
        </tr>
        <tr>
          <td class="code">14</td>
          <td class="code">7.0</td>
          <td><ul>
            <li>Secret management</li>
            <li>Directive tree</li>
            <li>Improve techniques management</li>
            <li>Demote a relay</li>
          </ul></td>
        </tr>
        <tr>
          <td class="code">15</td>
          <td class="code">7.1</td>
          <td><ul>
            <li>Package updates in nodes</li>
          </ul></td>
        </tr>
        <tr>
          <td class="code">16</td>
          <td class="code">7.2</td>
          <td><ul>
            <li>Create node API included from plugin</li>
            <li>Configuration archive import/export</li>
          </ul></td>
        </tr>
        <tr>
          <td class="code">17</td>
          <td class="code">7.3</td>
          <td><ul>
            <li>Compliance by directive</li>
            <li>Path campaigns API included</li>
          </ul></td>
        </tr>
        <tr>
          <td class="code">18</td>
          <td class="code">8.0</td>
          <td><ul>
            <li>Allowed network </li>
            <li>Improve the structure of `/settings/allowed_networks` output</li>
          </ul></td>
        </tr>
        <tr>
          <td class="code">19</td>
          <td class="code">8.1</td>
          <td><ul>
            <li>Multi-tenants</li>
            <li>Scores list</li>
          </ul></td>
        </tr>
        <tr>
          <td class="code">20</td>
          <td class="code">8.2</td>
          <td><ul>
            <li>More standard format for node details fields</li>
          </ul></td>
        </tr>
        <tr>
          <td class="code">21</td>
          <td class="code">8.3</td>
          <td><ul>
            <li>API account new format</li>
            <li>Info API format evolution</li>
          </ul></td>
        </tr>
        <tr>
          <td class="code">22</td>
          <td class="code">9.0</td>
          <td><ul>
            <li>Event campaign (format, history)</li>
          </ul></td>
        </tr>
        <tr>
          <td class="code">23</td>
          <td class="code">9.1</td>
          <td><ul>
            <li>Campaigns CSV</li>
            <li>excluded-packages in System/software update campaigns</li>
          </ul></td>
        </tr>
      </tbody>
    </table>


    ## Response format

    All responses from the API are in the JSON format.

    ```json
    {
      "action": "The name of the called function",
      "id": "The ID of the element you want, if relevant",
      "result": "The result of your action: success or error",
      "data": "Only present if this is a success and depends on the function, it's usually a JSON object",
      "errorDetails": "Only present if this is an error, it contains the error message"
    }
    ```


    * __Success__ responses are sent with the 200 HTTP (Success) code

    * __Error__ responses are sent with a HTTP error code (mostly 5xx...)


    ## HTTP method

    Rudder's REST API is based on the usage of [HTTP methods](http://www.w3.org/Protocols/rfc2616/rfc2616-sec9.html). We use them to indicate what action will be done by the request. Currently, we use four of them:


    * **GET**: search or retrieve information (get rule details, get a group, ...)

    * **PUT**: add new objects (create a directive, clone a Rule, ...)

    * **DELETE**: remove objects (delete a node, delete a parameter, ...)

    * **POST**: update existing objects (update a directive, reload a group, ...)


    ## Parameters

    ### General parameters

    Some parameters are available for almost all API functions. They will be described in this section.
    They must be part of the query and can't be submitted in a JSON form.

    #### Available for all requests

    <table>
      <thead>
        <tr>
          <th style="width: 30%">Field</th>
          <th style="width: 10%">Type</th>
          <th style="width: 70%">Description</th>
        </tr>
      </thead>
      <tbody>
        <tr>
          <td class="code">prettify</td>
          <td><b>boolean</b><br><i>optional</i></td>
          <td>
            Determine if the answer should be prettified (human friendly) or not. We recommend using this for debugging purposes, but not for general script usage as this does add some unnecessary load on the server side.
            <p class="default-value">Default value: <code>false</code></p>
          </td>
        </tr>
      </tbody>
    </table>


    #### Available for modification requests (PUT/POST/DELETE)

    <table>
      <thead>
        <tr>
          <th style="width: 25%">Field</th>
          <th style="width: 12%">Type</th>
          <th style="width: 70%">Description</th>
        </tr>
      </thead>
      <tbody>
        <tr>
          <td class="code">reason</td>
          <td><b>string</b><br><i>optional</i> or <i>required</i></td>
          <td>
            Set a message to explain the change. If you set the reason messages to be mandatory in the web interface, failing to supply this value will lead to an error.
            <p class="default-value">Default value: <code>""</code></p>
          </td>
        </tr>
        <tr>
          <td class="code">changeRequestName</td>
          <td><b>string</b><br><i>optional</i></td>
          <td>
            Set the change request name, is used only if workflows are enabled. The default value depends on the function called
            <p class="default-value">Default value: <code>A default string for each function</code></p>
          </td>
        </tr>
        <tr>
          <td class="code">changeRequestDescription</td>
          <td><b>string</b><br><i>optional</i></td>
          <td>
            Set the change request description, is used only if workflows are enabled.
            <p class="default-value">Default value: <code>""</code></p>
          </td>
        </tr>
      </tbody>
    </table>


    ### Passing parameters

    Parameters to the API can be sent:

    * As part of the URL for resource identification

    * As data for POST/PUT requests

      * Directly in JSON format

      * As request arguments

    #### As part of the URL for resource identification

    Parameters in URLs are used to indicate which resource you want to interact with. The function will not work if this resource is missing.

    ```bash
    # Get the Rule of ID "id"
    curl -H "X-API-Token: yourToken" https://rudder.example.com/rudder/api/latest/rules/id
    ```

    CAUTION: To avoid surprising behavior, do not put a '/' at the end of a URL: it would be interpreted as '/[empty string parameter]' and redirected to '/index', likely not what you wanted to do.


    #### Sending data for POST/PUT requests

    ##### Directly in JSON format

    JSON format is the preferred way to interact with Rudder API for creating or updating resources.
    You'll also have to set the *Content-Type* header to **application/json** (without it the JSON content would be ignored).
    In a `curl` `POST` request, that header can be provided with the `-H` parameter:

    ```bash
    curl -X POST -H "Content-Type: application/json" ...
    ```

    The supplied file must contain a valid JSON: strings need quotes, booleans and integers don't, etc.

    The (human-readable) format is:

    ```json
    {
      "key1": "value1",
      "key2": false,
      "key3": 42
    }
    ```

    Here is an example with inlined data:

    ```bash
    # Update the Rule 'id' with a new name, disabled, and setting it one directive
    curl -X POST -H "X-API-Token: yourToken" -H  "Content-Type: application/json"
    https://rudder.example.com/rudder/api/rules/latest/{id}
      -d '{ "displayName": "new name", "enabled": false, "directives": "directiveId"}'
    ```

    You can also pass a supply the JSON in a file:

    ```bash
    # Update the Rule 'id' with a new name, disabled, and setting it one directive
    curl -X POST -H "X-API-Token: yourToken" -H "Content-Type: application/json" https://rudder.example.com/rudder/api/rules/latest/{id} -d @jsonParam
    ```

    Note that the general parameters view in the previous chapter cannot be passed in a JSON, and you will need to pass them a URL parameters if you want them to be taken into account (you can't mix JSON and request parameters):

    ```bash
    # Update the Rule 'id' with a new name, disabled, and setting it one directive with reason message "Reason used"
    curl -X POST -H "X-API-Token: yourToken" -H "Content-Type: application/json" "https://rudder.example.com/rudder/api/rules/latest/{id}?reason=Reason used" -d @jsonParam -d "reason=Reason ignored"
    ```

    ##### Request parameters

    In some cases, when you have little, simple data to update, JSON can feel bloated. In such cases, you can use
    request parameters. You will need to pass one parameter for each data you want to change.

    Parameters follow the following schema:

    ```
    key=value
    ```

    You can pass parameters by two means:

    * As query parameters: At the end of your url, put a **?** then your first parameter and then a **&** before next parameters. In that case, parameters need to be https://en.wikipedia.org/wiki/Percent-encoding[URL encoded]

    ```bash
    # Update the Rule 'id' with a new name, disabled, and setting it one directive
    curl -X POST -H "X-API-Token: yourToken"  https://rudder.example.com/rudder/api/rules/latest/{id}?"displayName=my new name"&"enabled=false"&"directives=aDirectiveId"
    ```

    * As request data: You can pass those parameters in the request data, they won't figure in the URL, making it lighter to read, You can pass a file that contains data.

    ```bash
    # Update the Rule 'id' with a new name, disabled, and setting it one directive (in file directive-info.json)
    curl -X POST -H "X-API-Token: yourToken"
    https://rudder.example.com/rudder/api/rules/latest/{id} -d "displayName=my new name" -d "enabled=false" -d @directive-info.json
    ```
  license:
    name: CC-BY-SA 2.0
    url: https://spdx.org/licenses/CC-BY-SA-2.0.html
  title: Rudder API
  version: '23'
  x-logo:
    url: assets/rudder-logo-rect-black.svg
servers:
  - description: Rudder server
    url: https://{rudderServer}/rudder/api/latest
    variables:
      rudderServer:
        default: rudder.example.com
        description: Hostname of the Rudder server
security:
  - API-Tokens: []
tags:
  - description: Information about API endpoints and versions
    name: API Info
  - description: Is alive check
    name: Status
  - description: Access compliance data
    name: Compliance
  - description: Rules management
    name: Rules
  - description: Directives management
    name: Directives
  - description: Techniques management
    name: Techniques
  - description: Groups management
    name: Groups
  - description: Nodes management
    name: Nodes
  - description: Inventory processing service
    name: Inventories
  - description: Global properties
    name: Parameters
  - description: Campaigns
    name: Campaigns
  - description: Import and export zip of policies
    name: Archives
  - description: Server configuration
    name: Settings
  - description: Internal components and administration
    name: System
  - description: Manage user information and configuration file
    name: User management
  - description: Manage API accounts
    name: API account management
  - description: Information about installed plugins
    name: Plugins
  - description: |-
      **Requires that the `changes-validation` plugin is installed on the server.**

      Manage change requests.
    name: 🧩 Change requests
  - description: |-
      **Requires that the `cve` plugin is installed on the server.**

      Manage CVE plugins data and configuration.
    name: 🧩 CVE
  - description: |-
      **Requires that the `system update` plugin is installed on the server.**

      Fetch System update campaigns results.
    name: 🧩 System update campaigns
  - description: |-
      **Requires that the `datasources` plugin is installed on the server.**

      Data sources plugin configuration.
    name: 🧩 Data sources
  - description: |-
      **Requires that the `scale-out-relay` plugin is installed on the server.**

      Manage relays.
    name: 🧩 Scale out Relay
  - description: |-
      **Requires that the `branding` plugin is installed on the server.**

      Manage web interface customization.
    name: 🧩 Branding
  - description: |-
      **Requires that the `secret-management` plugin is installed on the server.**

      Manage secrets variables.
    name: 🧩 Secret management
  - description: |-
      **Requires that the `openscap` plugin is installed on the server.**

      Get OpenSCAP reports for nodes.
    name: 🧩 OpenSCAP
  - description: |-
      **Requires that the `multitenants` plugin is installed on the server.**

      Manage tenants and set them on nodes.
    name: 🧩 Multi-tenants
paths:
  /api/changeRequests:
    get:
      summary: List all change requests
      description: List all change requests
      operationId: listChangeRequests
      responses:
        '200':
          description: Change requests information
          content:
            application/json:
              schema:
                type: object
                required:
                  - result
                  - action
                  - data
                properties:
                  result:
                    type: string
                    description: Result of the request
                    enum:
                      - success
                      - error
                  action:
                    type: string
                    description: The id of the action
                    enum:
                      - listChangeRequests
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/change-request'
      tags:
        - 🧩 Change requests
      x-codeSamples:
        - lang: curl
          source: |
            curl --header "X-API-Token: yourToken" --request GET https://rudder.example.com/rudder/api/latest/changeRequests --data "status=open"
  /apiaccounts:
    get:
      summary: List all API accounts
      description: List all API accounts. No secret data are returned.
      operationId: getAllAccounts
      responses:
        '200':
          description: Directives information
          content:
            application/json:
              schema:
                type: object
                required:
                  - result
                  - action
                  - data
                properties:
                  result:
                    type: string
                    description: Result of the request
                    enum:
                      - success
                      - error
                  action:
                    type: string
                    description: The id of the action
                    enum:
                      - getAllAccounts
                  data:
                    type: object
                    required:
                      - accounts
                    properties:
                      accounts:
                        type: array
                        items:
                          $ref: '#/components/schemas/api-account'
      tags:
        - API account management
      x-codeSamples:
        - lang: curl
          source: |
            curl --header "X-API-Token: yourToken" --request GET https://rudder.example.com/rudder/api/latest/apiaccounts
    post:
      summary: Create an API account
      description: Create a new API account from provided parameters. If a token need to be generated, it will be presented only once in the answer.
      operationId: createAccount
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/api-account-new'
      responses:
        '200':
          description: Information about request
          content:
            application/json:
              schema:
                type: object
                required:
                  - result
                  - id
                  - action
                  - data
                properties:
                  result:
                    type: string
                    description: Result of the request
                    enum:
                      - success
                      - error
                  id:
                    description: ID of the created account
                    type: string
                    format: uuid
                  action:
                    type: string
                    description: The id of the action
                    enum:
                      - createAccount
                  data:
                    type: object
                    required:
                      - accounts
                    properties:
                      accounts:
                        type: array
                        items:
                          $ref: '#/components/schemas/api-account'
      tags:
        - API account management
      x-codeSamples:
        - lang: curl
          source: |+
            # account.json:
            #
            # {
            #   "name":"account 1",
            #   "description":"account 1 description",
            #   "expirationPolicy": "datetime",
            #   "status": "enabled",
            #   "generateToken":true,
            #   "tenants":"*",
            #   "authorizationType":"acl",
            #   "acl":[
            #     {
            #       "path":"rules/tree",
            #       "actions":["get","post"]
            #     },
            #     {
            #       "path":"rules/categories/*",
            #       "actions":["get"}
            #     },
            #     {
            #       "path":"compliance/*",
            #       "actions":["get"]
            #     }
            #   ]
            # }

            curl --header "X-API-Token: yourToken" --request POST https://rudder.example.com/rudder/api/latest/apiaccounts --header "Content-type: application/json" --data @account.json

  /apiaccounts/${apiAccountId}:
    get:
      summary: Get an API account details
      description: Get all information about an API account. The token secret won't be returned.
      operationId: getAccount
      parameters:
        - $ref: '#/components/parameters/api-account-id'
      responses:
        '200':
          description: API account information
          content:
            application/json:
              schema:
                type: object
                required:
                  - result
                  - id
                  - action
                  - data
                properties:
                  result:
                    type: string
                    description: Result of the request
                    enum:
                      - success
                      - error
                  id:
                    type: string
                    description: Id of the API account
                  action:
                    type: string
                    description: The id of the action
                    enum:
                      - getAccount
                  data:
                    type: object
                    required:
                      - accounts
                    properties:
                      accounts:
                        type: array
                        items:
                          $ref: '#/components/schemas/api-account'
      tags:
        - API account management
      x-codeSamples:
        - lang: curl
          source: |
            curl --header "X-API-Token: yourToken" --request GET https://rudder.example.com/rudder/api/latest/apiaccounts/1ebee8c7-c898-4ee5-9470-139bfd80c442
    delete:
      summary: Delete an API account
      description: Delete an API account
      operationId: deleteAccount
      parameters:
        - $ref: '#/components/parameters/api-account-id'
      responses:
        '200':
          description: API account information
          content:
            application/json:
              schema:
                type: object
                required:
                  - result
                  - action
                  - data
                properties:
                  result:
                    type: string
                    description: Result of the request
                    enum:
                      - success
                      - error
                  id:
                    type: string
                    description: Id of the API account
                  action:
                    type: string
                    description: The id of the action
                    enum:
                      - deleteAccount
                  data:
                    type: object
                    required:
                      - accounts
                    properties:
                      accounts:
                        type: array
                        items:
                          $ref: '#/components/schemas/api-account'
      tags:
        - API account management
      x-codeSamples:
        - lang: curl
          source: |
            curl --header "X-API-Token: yourToken" --request DELETE https://rudder.example.com/rudder/api/latest/apiaccounts/1ebee8c7-c898-4ee5-9470-139bfd80c442
    post:
      summary: Update an API account details
      description: Update an API account details
      operationId: updateAccount
      parameters:
        - $ref: '#/components/parameters/api-account-id'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/api-account-update'
      responses:
        '200':
          description: Directives information
          content:
            application/json:
              schema:
                type: object
                required:
                  - result
                  - action
                  - data
                properties:
                  result:
                    type: string
                    description: Result of the request
                    enum:
                      - success
                      - error
                  action:
                    type: string
                    description: The id of the action
                    enum:
                      - updateDirective
                  data:
                    type: object
                    required:
                      - accounts
                    properties:
                      accounts:
                        type: array
                        items:
                          $ref: '#/components/schemas/api-account'
      tags:
        - API account management
      x-codeSamples:
        - lang: curl
          source: |
            # account.json:
            #
            # {
            #   "name":"account updated",
            #   "status": "enabled"
            # }

            curl --header "X-API-Token: yourToken" --request POST https://rudder.example.com/rudder/api/latest/apiaccounts/1ebee8c7-c898-4ee5-9470-139bfd80c442 --header "Content-type: application/json" --data @account.json
  /apiaccounts/${apiAccountId}/regenerate:
    post:
      summary: Regenerate the token of an API account
      description: Create a new token and destroy the old one (if exists).
      operationId: regenerateToken
      parameters:
        - $ref: '#/components/parameters/api-account-id'
      responses:
        '200':
          description: API account information
          content:
            application/json:
              schema:
                type: object
                required:
                  - result
                  - id
                  - action
                  - data
                properties:
                  result:
                    type: string
                    description: Result of the request
                    enum:
                      - success
                      - error
                  id:
                    type: string
                    description: Id of the API account
                  action:
                    type: string
                    description: The id of the action
                    enum:
                      - updateDirective
                  data:
                    type: object
                    required:
                      - accounts
                    properties:
                      accounts:
                        type: array
                        items:
                          $ref: '#/components/schemas/api-account'
      tags:
        - API account management
      x-codeSamples:
        - lang: curl
          source: |
            curl --header "X-API-Token: yourToken" --request POST https://rudder.example.com/rudder/api/latest/apiaccounts/cf2a6c72-18ae-4f82-a12c-0b887792db41/regenerate
  /apiaccounts/token:
    get:
      summary: Get API account for the currently identified token
      description: Return the account as in the GET account endpoint for the authenticated token in X-API-TOKEN header
      operationId: getTokenAccount
      responses:
        '200':
          description: API account information
          content:
            application/json:
              schema:
                type: object
                required:
                  - result
                  - id
                  - action
                  - data
                properties:
                  result:
                    type: string
                    description: Result of the request
                    enum:
                      - success
                      - error
                  id:
                    type: string
                    description: Id of the API account
                  action:
                    type: string
                    description: The id of the action
                    enum:
                      - getTokenAccount
                  data:
                    type: object
                    required:
                      - accounts
                    properties:
                      accounts:
                        type: array
                        items:
                          $ref: '#/components/schemas/api-account'
      tags:
        - API account management
      x-codeSamples:
        - lang: curl
          source: |
            curl --header "X-API-Token: yourToken" --header "Content-Type: application/json" https://rudder.example.com/rudder/api/latest/apiaccounts/token
  /archives/export:
    get:
      summary: Get a ZIP archive of the requested items and their dependencies
      description: Get a ZIP archive or rules, directives, techniques and groups with optionally their dependencies
      operationId: export
      parameters:
        - in: query
          name: rules
          schema:
            type: array
            items:
              type: string
          description: IDs (optionally with revision, '+' need to be escaped as '%2B') of rules to include.  The special key-word 'all' can be use to mean "all non-system rules"
          style: form
          explode: false
          examples:
            oneId:
              summary: Example of a single ID
              value:
                - a0573b59-e5bd-441b-9031-f307aa21a61e
            multipleIds:
              summary: Example of multiple IDs, some with revisions
              value:
                - a0573b59-e5bd-441b-9031-f307aa21a61e
                - 4cba6eee-3a43-4e17-a608-a4941b6d984f%2B35177d0823791a374de9e16a6ab27e6466fbc8c2
        - in: query
          name: directives
          schema:
            type: array
            items:
              type: string
          description: IDs (optionally with revision, '+' need to be escaped as '%2B') of directives to include The special key-word 'all' can be use to mean "all non-system directives"
          style: form
          explode: false
          examples:
            oneId:
              summary: Example of a single ID
              value:
                - a0573b59-e5bd-441b-9031-f307aa21a61e
            multipleIds:
              summary: Example of multiple IDs, some with revisions
              value:
                - a0573b59-e5bd-441b-9031-f307aa21a61e
                - 4cba6eee-3a43-4e17-a608-a4941b6d984f%2B35177d0823791a374de9e16a6ab27e6466fbc8c2
        - in: query
          name: techniques
          schema:
            type: array
            items:
              type: string
          description: IDs, ie technique name/technique version (optionally with revision, '+' need to be escaped as '%2B') of techniques to include The special key-word 'all' can be use to mean "all non-system techniques"
          style: form
          explode: false
          examples:
            oneId:
              summary: Example of a single ID
              value:
                - fileContent/3.0
            multipleIds:
              summary: Example of multiple IDs, some with revisions
              value:
                - userManagement/6.3
                - fileContent/3.0%2B35177d0823791a374de9e16a6ab27e6466fbc8c2
        - in: query
          name: groups
          schema:
            type: array
            items:
              type: string
          description: IDs (optionally with revision, '+' need to be escaped as '%2B') of groups to include The special key-word 'all' can be use to mean "all non-system groups"
          style: form
          explode: false
          examples:
            oneId:
              summary: Example of a single ID
              value:
                - a0573b59-e5bd-441b-9031-f307aa21a61e
            multipleIds:
              summary: Example of multiple IDs, some with revisions
              value:
                - a0573b59-e5bd-441b-9031-f307aa21a61e
                - 4cba6eee-3a43-4e17-a608-a4941b6d984f%2B35177d0823791a374de9e16a6ab27e6466fbc8c2
        - in: query
          name: include
          schema:
            type: array
            items:
              type: string
              enum:
                - all (default)
                - none
                - directives
                - techniques
                - groups
          description: Scope of dependencies to include in archive, where rule as directives and groups dependencies, directives have techniques dependencies, and techniques and groups don't have dependencies. 'none' means no dependencies will be include, 'all' means that the whole tree will,  'directives' and 'groups' means to include them specifically, 'techniques' means to include both directives and techniques.
          style: form
          explode: false
          examples:
            none:
              summary: Do not include dependencies
              value:
                - none
            directivesAndGroups:
              summary: Include directives and groups, but no techniques
              value:
                - directives
                - groups
      responses:
        '200':
          description: A zip archive with the queried content.
          content:
            application/octet-stream:
              schema:
                type: string
                format: binary
      tags:
        - Archives
      x-codeSamples:
        - lang: curl
          source: |
            curl --header "X-API-Token: yourToken" 'https://rudder.example.com/rudder/api/latest/archives/export?rules=8e522a3e-aa45-43cd-bf33-4e8d04a566f6&include=directives,groups'
  /archives/import:
    post:
      summary: Import a ZIP archive of policies into Rudder
      description: Import a ZIP archive of techniques, directives, groups and rules in a saved in a normalized format into Rudder
      operationId: import
      requestBody:
        content:
          multipart/form-data:
            schema:
              type: object
              properties:
                archive:
                  type: string
                  format: binary
                  description: The ZIP archive file containing policies in a conventional layout and serialization format
                merge:
                  type: string
                  description: Optional merge algo of the import. Default `override-all` means what is in the archive is the new reality.  `keep-rule-targets` will keep existing target definition for existing rules (ignore archive value). `ignore-source-targets` is like `keep-rule-targets` but in addition sets an empty target for new rules.
                  enum:
                    - override-all
                    - keep-rule-targets
                    - ignore-source-targets
      responses:
        '200':
          description: Archive imported
          content:
            application/json:
              schema:
                type: object
                required:
                  - result
                  - action
                  - data
                properties:
                  result:
                    type: string
                    description: Result of the request
                    enum:
                      - success
                      - error
                  action:
                    type: string
                    description: The id of the action
                    enum:
                      - import
                  data:
                    type: object
                    description: Details about archive import process
                    properties:
                      archiveImported:
                        type: boolean
      tags:
        - Archives
      x-codeSamples:
        - lang: curl
          source: |
            curl --header "X-API-Token: yourToken" -X POST https://rudder.example.com/rudder/api/latest/archives/import --form "archive=@my-archive-file.zip" --form "merge=keep-rule-targets"
  /branding:
    get:
      summary: Get branding configuration
      description: Get all web interface customization parameters
      operationId: getBrandingConf
      responses:
        '200':
          description: Branding configuration
          content:
            application/json:
              schema:
                type: object
                required:
                  - result
                  - action
                  - data
                properties:
                  result:
                    type: string
                    description: Result of the request
                    enum:
                      - success
                      - error
                  action:
                    type: string
                    description: The id of the action
                    enum:
                      - getBrandingConf
                  data:
                    type: object
                    required:
                      - branding
                    properties:
                      branding:
                        $ref: '#/components/schemas/branding-conf'
      tags:
        - 🧩 Branding
      x-codeSamples:
        - lang: curl
          source: |
            curl --header "X-API-Token: yourToken" --request GET https://rudder.example.com/rudder/api/latest/branding
    post:
      summary: Update web interface customization
      description: change color, logo, label etc.
      operationId: updateBRandingConf
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/branding-conf'
      responses:
        '200':
          description: Updated
          content:
            application/json:
              schema:
                type: object
                required:
                  - result
                  - action
                  - data
                properties:
                  result:
                    type: string
                    description: Result of the request
                    enum:
                      - success
                      - error
                  action:
                    type: string
                    description: The id of the action
                    enum:
                      - updateBRandingConf
                  data:
                    type: object
                    required:
                      - branding
                    properties:
                      branding:
                        $ref: '#/components/schemas/branding-conf'
      tags:
        - 🧩 Branding
      x-codeSamples:
        - lang: curl
          source: "# update.json:\n#\n#{\n#\t\"displayBar\":true,\n#\t\"displayLabel\":false,\n#\t\"labelText\":\"Production\",\n#\t\"barColor\":{\n#\t\t\"red\":1,\n#\t\t\"blue\":1,\n#\t\t\"green\":1,\n#\t\t\"alpha\":1\n#\t},\n#\t\"labelColor\":{\n#\t\t\"red\":0,\n#\t\t\"blue\":0,\n#\t\t\"green\":0,\n#\t\t\"alpha\":1\n#\t},\n#\t\"wideLogo\":{\n#\t\t\"enable\":true\n#\t},\n#\t\"smallLogo\":{\n#\t\t\"enable\":true\n#\t},\n#\t\"displayBarLogin\":true,\n#\t\"displayMotd\":true,\n#\t\"motd\":\"Welcome, please sign in:\"\n#}\n\ncurl --header \"X-API-Token: yourToken\" --request POST https://rudder.example.com/rudder/api/latest/branding --header \"Content-type: application/json\" --data @update.json\n\n"
  /branding/reload:
    post:
      summary: Reload branding file
      description: Reload the configuration from file
      operationId: reloadBrandingConf
      responses:
        '200':
          description: Branding configuration
          content:
            application/json:
              schema:
                type: object
                required:
                  - result
                  - action
                  - data
                properties:
                  result:
                    type: string
                    description: Result of the request
                    enum:
                      - success
                      - error
                  action:
                    type: string
                    description: The id of the action
                    enum:
                      - getBrandingConf
                  data:
                    type: object
                    required:
                      - branding
                    properties:
                      branding:
                        $ref: '#/components/schemas/branding-conf'
      tags:
        - 🧩 Branding
      x-codeSamples:
        - lang: curl
          source: |
            curl --header "X-API-Token: yourToken" --request POST https://rudder.example.com/rudder/api/latest/branding/reload
  /campaigns:
    get:
      summary: Get all campaigns details
      description: Get all campaigns details
      operationId: allCampaigns
      parameters:
        - $ref: '#/components/parameters/campaign-type'
        - $ref: '#/components/parameters/campaign-status'
      responses:
        '200':
          description: Campaign details result
          content:
            application/json:
              schema:
                type: object
                required:
                  - result
                  - action
                  - data
                properties:
                  result:
                    type: string
                    description: Result of the request
                    enum:
                      - success
                      - error
                  action:
                    type: string
                    description: The id of the action
                    enum:
                      - allCampaigns
                  data:
                    type: object
                    required:
                      - campaigns
                    properties:
                      campaigns:
                        type: array
                        items:
                          $ref: '#/components/schemas/campaign-details'
      tags:
        - Campaigns
      x-codeSamples:
        - lang: curl
          source: |
            curl --header "X-API-Token: yourToken" --request GET 'https://rudder.example.com/rudder/api/latest/campaigns'
    post:
      summary: Save a campaign
      description: Save a campaign details
      operationId: saveCampaign
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/campaign-details'
      responses:
        '200':
          description: Campaign details result
          content:
            application/json:
              schema:
                type: object
                required:
                  - result
                  - action
                  - data
                properties:
                  result:
                    type: string
                    description: Result of the request
                    enum:
                      - success
                      - error
                  action:
                    type: string
                    description: The id of the action
                    enum:
                      - saveCampaign
                  data:
                    type: object
                    required:
                      - campaigns
                    properties:
                      campaigns:
                        type: array
                        items:
                          $ref: '#/components/schemas/campaign-details'
      tags:
        - Campaigns
      x-codeSamples:
        - lang: curl
          source: |
            curl --header "X-API-Token: yourToken" --request POST 'https://rudder.example.com/rudder/api/latest/campaigns'
  /campaigns/events:
    get:
      summary: Get all campaign events
      description: Get all campaign events
      operationId: getAllCampaignEvents
      parameters:
        - $ref: '#/components/parameters/campaign-type'
        - $ref: '#/components/parameters/campaign-event-status'
        - $ref: '#/components/parameters/campaign-id'
        - $ref: '#/components/parameters/limit'
        - $ref: '#/components/parameters/offset'
        - $ref: '#/components/parameters/before'
        - $ref: '#/components/parameters/after'
        - $ref: '#/components/parameters/order'
        - $ref: '#/components/parameters/asc'
      responses:
        '200':
          description: Campaign event details result
          content:
            application/json:
              schema:
                type: object
                required:
                  - result
                  - action
                  - data
                properties:
                  result:
                    type: string
                    description: Result of the request
                    enum:
                      - success
                      - error
                  action:
                    type: string
                    description: The id of the action
                    enum:
                      - getCampaignEvent
                  data:
                    type: object
                    required:
                      - campaignEvents
                    properties:
                      campaignEvents:
                        type: array
                        items:
                          $ref: '#/components/schemas/campaign-event-details'
      tags:
        - Campaigns
      x-codeSamples:
        - lang: curl
          source: |
            curl --header "X-API-Token: yourToken" --request GET 'https://rudder.example.com/rudder/api/latest/campaigns/events?campaignType=system-update&state=running&campaignId=0076a379-f32d-4732-9e91-33ab219d8fde&limit=1&order=start&asc=desc&before=2025-06-19T16:13:35%2B01:00'
  /campaigns/events/{id}:
    get:
      summary: Get a campaign event details
      description: Get a campaign event details
      operationId: getCampaignEvent
      parameters:
        - $ref: '#/components/parameters/campaign-event-id-path'
      responses:
        '200':
          description: Campaign details result
          content:
            application/json:
              schema:
                type: object
                required:
                  - result
                  - action
                  - data
                properties:
                  result:
                    type: string
                    description: Result of the request
                    enum:
                      - success
                      - error
                  action:
                    type: string
                    description: The id of the action
                    enum:
                      - getCampaignEvent
                  data:
                    type: object
                    required:
                      - campaignEvents
                    properties:
                      campaignEvents:
                        type: array
                        items:
                          $ref: '#/components/schemas/campaign-event-details'
      tags:
        - Campaigns
      x-codeSamples:
        - lang: curl
          source: |
            curl --header "X-API-Token: yourToken" --request GET 'https://rudder.example.com/rudder/api/latest/campaigns/events/0076a379-f32d-4732-9e91-33ab219d8fde'
    post:
      summary: Update an existing event
      description: Update an existing event
      operationId: saveCampaignEvent
      parameters:
        - $ref: '#/components/parameters/campaign-event-id-path'
      responses:
        '200':
          description: Campaign event details result
          content:
            application/json:
              schema:
                type: object
                required:
                  - result
                  - action
                  - data
                properties:
                  result:
                    type: string
                    description: Result of the request
                    enum:
                      - success
                      - error
                  action:
                    type: string
                    description: The id of the action
                    enum:
                      - saveCampaignEvent
                  data:
                    type: object
                    required:
                      - campaignEvents
                    properties:
                      campaignEvents:
                        type: array
                        items:
                          $ref: '#/components/schemas/campaign-event-details'
      tags:
        - Campaigns
      x-codeSamples:
        - lang: curl
          source: |
            curl --header "X-API-Token: yourToken" --request POST 'https://rudder.example.com/rudder/api/latest/campaigns/events/0076a379-f32d-4732-9e91-33ab219d8fde'
    delete:
      summary: Delete a campaign event details
      description: Delete a campaign event details
      operationId: deleteCampaignEvent
      parameters:
        - $ref: '#/components/parameters/campaign-event-id-path'
      responses:
        '200':
          description: Campaign event details result
          content:
            application/json:
              schema:
                type: object
                required:
                  - result
                  - action
                  - data
                properties:
                  result:
                    type: string
                    description: Result of the request
                    enum:
                      - success
                      - error
                  action:
                    type: string
                    description: The id of the action
                    enum:
                      - deleteCampaignEvent
                  data:
                    type: object
                    required:
                      - campaignEvents
                    properties:
                      campaignEvents:
                        type: array
                        items:
                          $ref: '#/components/schemas/campaign-event-details'
      tags:
        - Campaigns
      x-codeSamples:
        - lang: curl
          source: |
            curl --header "X-API-Token: yourToken" --request DELETE 'https://rudder.example.com/rudder/api/latest/campaigns/events/0076a379-f32d-4732-9e91-33ab219d8fde'
  /campaigns/{id}:
    get:
      summary: Get a campaign details
      description: Get a campaign details
      operationId: getCampaign
      parameters:
        - $ref: '#/components/parameters/campaign-id-path'
      responses:
        '200':
          description: Campaign details result
          content:
            application/json:
              schema:
                type: object
                required:
                  - result
                  - action
                  - data
                properties:
                  result:
                    type: string
                    description: Result of the request
                    enum:
                      - success
                      - error
                  action:
                    type: string
                    description: The id of the action
                    enum:
                      - getCampaign
                  data:
                    type: object
                    required:
                      - campaigns
                    properties:
                      campaigns:
                        type: array
                        items:
                          $ref: '#/components/schemas/campaign-details'
      tags:
        - Campaigns
      x-codeSamples:
        - lang: curl
          source: |
            curl --header "X-API-Token: yourToken" --request GET 'https://rudder.example.com/rudder/api/latest/campaigns/0076a379-f32d-4732-9e91-33ab219d8fde'
    delete:
      summary: Delete a campaign
      description: Delete a campaign
      operationId: deleteCampaign
      parameters:
        - $ref: '#/components/parameters/campaign-id-path'
      responses:
        '200':
          description: Campaign details result
          content:
            application/json:
              schema:
                type: object
                required:
                  - result
                  - action
                  - data
                properties:
                  result:
                    type: string
                    description: Result of the request
                    enum:
                      - success
                      - error
                  action:
                    type: string
                    description: The id of the action
                    enum:
                      - deleteCampaign
                  data:
                    type: object
                    required:
                      - campaigns
                    properties:
                      campaigns:
                        type: array
                        items:
                          $ref: '#/components/schemas/campaign-details'
      tags:
        - Campaigns
      x-codeSamples:
        - lang: curl
          source: |
            curl --header "X-API-Token: yourToken" --request DELETE 'https://rudder.example.com/rudder/api/latest/campaigns/0076a379-f32d-4732-9e91-33ab219d8fde'
  /campaigns/{id}/events:
    get:
      summary: Get campaign events for a campaign
      description: Get campaign events for a campaign
      operationId: getEventsCampaign
      parameters:
        - $ref: '#/components/parameters/campaign-id-path'
        - $ref: '#/components/parameters/campaign-type'
        - $ref: '#/components/parameters/campaign-event-status'
        - $ref: '#/components/parameters/limit'
        - $ref: '#/components/parameters/offset'
        - $ref: '#/components/parameters/before'
        - $ref: '#/components/parameters/after'
        - $ref: '#/components/parameters/order'
        - $ref: '#/components/parameters/asc'
      responses:
        '200':
          description: Campaign details result
          content:
            application/json:
              schema:
                type: object
                required:
                  - result
                  - action
                  - data
                properties:
                  result:
                    type: string
                    description: Result of the request
                    enum:
                      - success
                      - error
                  action:
                    type: string
                    description: The id of the action
                    enum:
                      - getEventsCampaign
                  data:
                    type: object
                    required:
                      - campaignEvents
                    properties:
                      campaignEvents:
                        type: array
                        items:
                          $ref: '#/components/schemas/campaign-event-details'
      tags:
        - Campaigns
      x-codeSamples:
        - lang: curl
          source: |
            curl --header "X-API-Token: yourToken" --request POST 'https://rudder.example.com/rudder/api/latest/campaigns/0076a379-f32d-4732-9e91-33ab219d8fde/events?campaignType=system-update&state=running&limit=1&order=start&asc=desc&before=2025-06-19T16:13:35%2B01:00'
  /campaigns/{id}/schedule:
    post:
      summary: Schedule a campaign event for a campaign
      description: Schedule a campaign event for a campaign
      operationId: scheduleCampaign
      parameters:
        - $ref: '#/components/parameters/campaign-id-path'
      responses:
        '200':
          description: Campaign events details result
          content:
            application/json:
              schema:
                type: object
                required:
                  - result
                  - action
                  - data
                properties:
                  result:
                    type: string
                    description: Result of the request
                    enum:
                      - success
                      - error
                  action:
                    type: string
                    description: The id of the action
                    enum:
                      - scheduleCampaign
                  data:
                    type: object
                    required:
                      - campaignEvents
                    properties:
                      campaignEvents:
                        type: array
                        items:
                          $ref: '#/components/schemas/campaign-event-details'
      tags:
        - Campaigns
      x-codeSamples:
        - lang: curl
          source: |
            curl --header "X-API-Token: yourToken" --request POST 'https://rudder.example.com/rudder/api/latest/campaigns/0076a379-f32d-4732-9e91-33ab219d8fde/schedule'
  /changeRequests/{changeRequestId}:
    get:
      summary: Get a change request details
      description: Get a change request details
      operationId: changeRequestDetails
      parameters:
        - $ref: '#/components/parameters/change-request-id'
      responses:
        '200':
          description: Change requests information
          content:
            application/json:
              schema:
                type: object
                required:
                  - result
                  - action
                  - data
                properties:
                  result:
                    type: string
                    description: Result of the request
                    enum:
                      - success
                      - error
                  action:
                    type: string
                    description: The id of the action
                    enum:
                      - changeRequestDetails
                  data:
                    type: object
                    required:
                      - changeRequests
                    properties:
                      changeRequests:
                        type: array
                        items:
                          $ref: '#/components/schemas/change-request'
      tags:
        - 🧩 Change requests
      x-codeSamples:
        - lang: curl
          source: |
            curl --header "X-API-Token: yourToken" --request GET https://rudder.example.com/rudder/api/latest/changeRequests --data "status=open"
    delete:
      summary: Decline a request details
      description: Refuse a change request
      operationId: declineChangeRequest
      parameters:
        - $ref: '#/components/parameters/change-request-id'
      responses:
        '200':
          description: Change requests information
          content:
            application/json:
              schema:
                type: object
                required:
                  - result
                  - action
                  - data
                properties:
                  result:
                    type: string
                    description: Result of the request
                    enum:
                      - success
                      - error
                  action:
                    type: string
                    description: The id of the action
                    enum:
                      - declineChangeRequest
                  data:
                    type: object
                    required:
                      - changeRequests
                    properties:
                      changeRequests:
                        type: array
                        items:
                          $ref: '#/components/schemas/change-request'
      tags:
        - 🧩 Change requests
      x-codeSamples:
        - lang: curl
          source: 'curl --header "X-API-Token: yourToken" --request DELETE https://rudder.example.com/rudder/api/latest/changeRequests/43'
    post:
      summary: Update a request details
      description: Update a change request
      operationId: updateChangeRequest
      parameters:
        - $ref: '#/components/parameters/change-request-id'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                  description: Change request name
                description:
                  type: string
                  description: Change request description
      responses:
        '200':
          description: Change requests information
          content:
            application/json:
              schema:
                type: object
                required:
                  - result
                  - action
                  - data
                properties:
                  result:
                    type: string
                    description: Result of the request
                    enum:
                      - success
                      - error
                  action:
                    type: string
                    description: The id of the action
                    enum:
                      - updateChangeRequest
                  data:
                    type: object
                    required:
                      - changeRequests
                    properties:
                      changeRequests:
                        type: array
                        items:
                          $ref: '#/components/schemas/change-request'
      tags:
        - 🧩 Change requests
      x-codeSamples:
        - lang: curl
          source: 'curl --header "X-API-Token: yourToken" --request POST https://rudder.example.com/rudder/api/latest/changeRequests/42  --data "name=new Name of change request" -d "description=add a new description"'
  /changeRequests/{changeRequestId}/accept:
    post:
      summary: Accept a request details
      description: Accept a change request
      operationId: acceptChangeRequest
      parameters:
        - $ref: '#/components/parameters/change-request-id'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                status:
                  type: string
                  description: New status of the change request
                  enum:
                    - pending deployment
                    - deployed
                  example: deployed
      responses:
        '200':
          description: Change requests information
          content:
            application/json:
              schema:
                type: object
                required:
                  - result
                  - action
                  - data
                properties:
                  result:
                    type: string
                    description: Result of the request
                    enum:
                      - success
                      - error
                  action:
                    type: string
                    description: The id of the action
                    enum:
                      - acceptChangeRequest
                  data:
                    type: object
                    required:
                      - changeRequests
                    properties:
                      changeRequests:
                        type: array
                        items:
                          $ref: '#/components/schemas/change-request'
      tags:
        - 🧩 Change requests
      x-codeSamples:
        - lang: curl
          source: 'curl --header "X-API-Token: yourToken" --request GET https://rudder.example.com/rudder/api/latest/changeRequests --data "status=open"'
  /compliance:
    get:
      summary: Global compliance
      description: Get current global compliance of a Rudder server
      operationId: getGlobalCompliance
      parameters:
        - $ref: '#/components/parameters/compliance-percent-precision'
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                required:
                  - result
                  - action
                  - data
                properties:
                  result:
                    type: string
                    description: Result of the request
                    enum:
                      - success
                      - error
                    example: success
                  action:
                    type: string
                    description: The id of the action
                    enum:
                      - getGlobalCompliance
                  data:
                    type: object
                    required:
                      - globalCompliance
                    properties:
                      globalCompliance:
                        type: object
                        required:
                          - compliance
                        properties:
                          compliance:
                            type: number
                            format: integer
                            description: Global compliance level (`-1` when no policies are defined)
                            example: 57
                          complianceDetails:
                            type: object
                            properties:
                              successAlreadyOK:
                                type: number
                                format: float
                                example: 48.68
                              noReport:
                                type: number
                                format: float
                                example: 36.18
                              successNotApplicable:
                                type: number
                                format: float
                                example: 5.92
                              unexpectedMissingComponent:
                                type: number
                                format: float
                                example: 2.63
                              error:
                                type: number
                                format: float
                                example: 1.32
                              unexpectedUnknownComponent:
                                type: number
                                format: float
                                example: 2.63
                              successRepaired:
                                type: number
                                format: float
                                example: 2.63
      tags:
        - Compliance
      x-codeSamples:
        - lang: curl
          source: 'curl --header "X-API-Token: yourToken" --request GET ''https://rudder.example.com/rudder/api/latest/compliance?prettify=true'''
  /compliance/directives:
    get:
      summary: Compliance details for all directives
      description: Get current compliance of all the nodes of a Rudder server
      operationId: getDirectivesCompliance
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                required:
                  - result
                  - action
                  - data
                properties:
                  result:
                    type: string
                    description: Result of the request
                    enum:
                      - success
                      - error
                    example: success
                  action:
                    type: string
                    description: The id of the action
                    enum:
                      - getDirectiveComplianceId
                  data:
                    type: object
                    required:
                      - directivesCompliance
                    properties:
                      directivesCompliance:
                        type: object
                        required:
                          - id
                          - name
                          - mode
                          - compliance
                          - complianceDetails
                          - rules
                          - nodes
                        properties:
                          id:
                            type: string
                            format: uuid
                            description: id of the directive
                            example: 9a1773c9-0889-40b6-be89-f6504443ac1b
                          name:
                            type: string
                            description: Name of the directive
                            example: test directive
                          mode:
                            type: string
                            enum:
                              - full-compliance
                              - changes-only
                              - reports-disabled
                          compliance:
                            type: number
                            format: float
                            description: Directive compliance level
                            example: 83.34
                          complianceDetails:
                            type: object
                            properties:
                              successAlreadyOK:
                                type: number
                                format: float
                                example: 66.68
                              noReport:
                                type: number
                                format: float
                                example: 7.45
                              successNotApplicable:
                                type: number
                                format: float
                                example: 16.66
                              unexpectedMissingComponent:
                                type: number
                                format: float
                                example: 2.63
                              error:
                                type: number
                                format: float
                                example: 1.32
                              unexpectedUnknownComponent:
                                type: number
                                format: float
                                example: 2.63
                              successRepaired:
                                type: number
                                format: float
                                example: 2.63
                          rules:
                            $ref: '#/components/schemas/directive-rule-compliance'
                          nodes:
                            $ref: '#/components/schemas/directive-node-compliance'
      tags:
        - Compliance
      x-codeSamples:
        - lang: curl
          source: 'curl --header "X-API-Token: yourToken" --request GET ''https://rudder.example.com/rudder/api/latest/compliance/directives'''
  /compliance/directives/{directiveId}:
    get:
      summary: Compliance details by directive
      description: Get current compliance of a directive of a Rudder server
      operationId: getDirectiveComplianceId
      parameters:
        - in: query
          name: format
          schema:
            type: string
            enum:
              - csv
              - json
            default: json
          description: format of export
          style: form
          explode: false
        - $ref: '#/components/parameters/directive-id'
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: '#/components/schemas/compliance-directive-id'
                  - $ref: '#/components/schemas/compliance-directive-id-csv'
      tags:
        - Compliance
      x-codeSamples:
        - lang: curl
          source: 'curl --header "X-API-Token: yourToken" --request GET ''https://rudder.example.com/rudder/api/latest/compliance/directives/704afe7b-1a65-4d2e-b4c9-54f4f548c316'''
  /compliance/groups/{targetOrNodeGroupId}:
    get:
      summary: Compliance details by group (global)
      description: Get compliance of a group with all rules that apply to a node within the group.
      operationId: getNodeGroupComplianceId
      parameters:
        - $ref: '#/components/parameters/compliance-level'
        - $ref: '#/components/parameters/compliance-percent-precision'
        - $ref: '#/components/parameters/target-or-node-group-id'
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                required:
                  - result
                  - action
                  - data
                properties:
                  result:
                    type: string
                    description: Result of the request
                    enum:
                      - success
                      - error
                    example: success
                  action:
                    type: string
                    description: The id of the action
                    enum:
                      - getNodeGroupComplianceId
                  data:
                    type: object
                    required:
                      - nodeGroups
                    properties:
                      nodeGroups:
                        type: array
                        items:
                          type: object
                          required:
                            - id
                            - mode
                            - compliance
                            - complianceDetails
                            - rules
                            - nodes
                          properties:
                            id:
                              type: string
                              format: uuid
                              description: id of the group
                              example: 47e3f2c0-0b1a-4b1a-9b0a-9e9e9e9e9e9e
                            mode:
                              type: string
                              enum:
                                - full-compliance
                                - changes-only
                                - reports-disabled
                            compliance:
                              type: number
                              format: float
                              description: Group compliance level
                              example: 57.43
                            complianceDetails:
                              type: object
                              properties:
                                successAlreadyOK:
                                  type: number
                                  format: float
                                  example: 48.68
                                noReport:
                                  type: number
                                  format: float
                                  example: 36.18
                                successNotApplicable:
                                  type: number
                                  format: float
                                  example: 5.92
                                unexpectedMissingComponent:
                                  type: number
                                  format: float
                                  example: 2.63
                                error:
                                  type: number
                                  format: float
                                  example: 1.32
                                unexpectedUnknownComponent:
                                  type: number
                                  format: float
                                  example: 2.63
                                successRepaired:
                                  type: number
                                  format: float
                                  example: 2.63
                            rules:
                              type: array
                              items:
                                $ref: '#/components/schemas/group-rule-compliance'
                            nodes:
                              type: array
                              items:
                                $ref: '#/components/schemas/group-node-compliance'
      tags:
        - Compliance
      x-codeSamples:
        - lang: curl
          source: 'curl --header "X-API-Token: yourToken" --request GET ''https://rudder.example.com/rudder/api/latest/compliance/groups/704afe7b-1a65-4d2e-b4c9-54f4f548c316'''
  /compliance/groups/{targetOrNodeGroupId}/target:
    get:
      summary: Compliance details by group (targeted)
      description: Get compliance of a group with only rules that explicitly include the group.
      operationId: getNodeGroupComplianceTargetId
      parameters:
        - $ref: '#/components/parameters/compliance-level'
        - $ref: '#/components/parameters/compliance-percent-precision'
        - $ref: '#/components/parameters/target-or-node-group-id'
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                required:
                  - result
                  - action
                  - data
                properties:
                  result:
                    type: string
                    description: Result of the request
                    enum:
                      - success
                      - error
                    example: success
                  action:
                    type: string
                    description: The id of the action
                    enum:
                      - getNodeGroupComplianceTargetId
                  data:
                    type: object
                    required:
                      - nodeGroups
                    properties:
                      nodeGroups:
                        type: array
                        items:
                          type: object
                          required:
                            - id
                            - mode
                            - compliance
                            - complianceDetails
                            - rules
                            - nodes
                          properties:
                            id:
                              type: string
                              format: uuid
                              description: id of the group
                              example: 47e3f2c0-0b1a-4b1a-9b0a-9e9e9e9e9e9e
                            mode:
                              type: string
                              enum:
                                - full-compliance
                                - changes-only
                                - reports-disabled
                            compliance:
                              type: number
                              format: float
                              description: Group compliance level
                              example: 57.43
                            complianceDetails:
                              type: object
                              properties:
                                successAlreadyOK:
                                  type: number
                                  format: float
                                  example: 48.68
                                noReport:
                                  type: number
                                  format: float
                                  example: 36.18
                                successNotApplicable:
                                  type: number
                                  format: float
                                  example: 5.92
                                unexpectedMissingComponent:
                                  type: number
                                  format: float
                                  example: 2.63
                                error:
                                  type: number
                                  format: float
                                  example: 1.32
                                unexpectedUnknownComponent:
                                  type: number
                                  format: float
                                  example: 2.63
                                successRepaired:
                                  type: number
                                  format: float
                                  example: 2.63
                            rules:
                              type: array
                              items:
                                $ref: '#/components/schemas/group-rule-compliance'
                            nodes:
                              type: array
                              items:
                                $ref: '#/components/schemas/group-node-compliance'
      tags:
        - Compliance
      x-codeSamples:
        - lang: curl
          source: 'curl --header "X-API-Token: yourToken" --request GET ''https://rudder.example.com/rudder/api/latest/compliance/groups/704afe7b-1a65-4d2e-b4c9-54f4f548c316/target'''
  /compliance/nodes:
    get:
      summary: Compliance details for all nodes
      description: Get current compliance of all the nodes of a Rudder server
      operationId: getNodesCompliance
      parameters:
        - $ref: '#/components/parameters/compliance-level'
        - $ref: '#/components/parameters/compliance-percent-precision'
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                required:
                  - result
                  - action
                  - data
                properties:
                  result:
                    type: string
                    description: Result of the request
                    enum:
                      - success
                      - error
                    example: success
                  action:
                    type: string
                    description: The id of the action
                    enum:
                      - getNodesCompliance
                  data:
                    type: object
                    required:
                      - nodes
                    properties:
                      nodes:
                        type: array
                        items:
                          type: object
                          required:
                            - id
                            - mode
                            - compliance
                            - complianceDetails
                          properties:
                            id:
                              type: string
                              format: uuid
                              description: id of the node
                              example: f37f4928-fcb5-4acf-a422-d40f123a9670
                            mode:
                              type: string
                              enum:
                                - full-compliance
                                - changes-only
                                - reports-disabled
                            compliance:
                              type: number
                              format: float
                              description: Rule compliance level
                              example: 57.43
                            complianceDetails:
                              type: object
                              properties:
                                successAlreadyOK:
                                  type: number
                                  format: float
                                  example: 48.68
                                noReport:
                                  type: number
                                  format: float
                                  example: 36.18
                                successNotApplicable:
                                  type: number
                                  format: float
                                  example: 5.92
                                unexpectedMissingComponent:
                                  type: number
                                  format: float
                                  example: 2.63
                                error:
                                  type: number
                                  format: float
                                  example: 1.32
                                unexpectedUnknownComponent:
                                  type: number
                                  format: float
                                  example: 2.63
                                successRepaired:
                                  type: number
                                  format: float
                                  example: 2.63
      tags:
        - Compliance
      x-codeSamples:
        - lang: curl
          source: |+
            # To get the compliance information of a specific node
            curl --header "X-API-Token: yourToken" --request GET 'https://rudder.example.com/rudder/api/compliance/nodes?level=2'

            # To get the list of nodes which have a compliance <100 for a given directive (c5881268-5612-48f2-8ef4-0ab8387fccd6) 
            curl -k -H "X-API-Token: yourToken" -X GET "https://rudder.example.com/rudder/api/latest/compliance/nodes?level=3" \
            | jq '[.data.nodes[] 
              | {
                  "nodeid":.id, 
                  "dirs": [.rules[].directives[]] 
                    | map(select(.id == "c5881268-5612-48f2-8ef4-0ab8387fccd6" and .compliance < 100)) 
                }
              ] 
            | map(select(.dirs | length != 0)) 
            | [.[] |
                {"nodeid":.nodeid, "comp":.dirs[0].complianceDetails}
              ]'

  /compliance/nodes/{nodeId}:
    get:
      summary: Compliance details by node
      description: Get current compliance of a node of a Rudder server
      operationId: getNodeCompliance
      parameters:
        - $ref: '#/components/parameters/compliance-level'
        - $ref: '#/components/parameters/compliance-percent-precision'
        - $ref: '#/components/parameters/node-id'
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                required:
                  - result
                  - action
                  - data
                properties:
                  result:
                    type: string
                    description: Result of the request
                    enum:
                      - success
                      - error
                    example: success
                  action:
                    type: string
                    description: The id of the action
                    enum:
                      - getNodeCompliance
                  data:
                    type: object
                    required:
                      - nodes
                    properties:
                      nodes:
                        type: array
                        items:
                          type: object
                          required:
                            - id
                            - mode
                            - compliance
                            - complianceDetails
                          properties:
                            id:
                              type: string
                              format: uuid
                              description: id of the node
                              example: f37f4928-fcb5-4acf-a422-d40f123a9670
                            mode:
                              type: string
                              enum:
                                - full-compliance
                                - changes-only
                                - reports-disabled
                            compliance:
                              type: number
                              format: float
                              description: Rule compliance level
                              example: 57.43
                            complianceDetails:
                              type: object
                              properties:
                                successAlreadyOK:
                                  type: number
                                  format: float
                                  example: 48.68
                                noReport:
                                  type: number
                                  format: float
                                  example: 36.18
                                successNotApplicable:
                                  type: number
                                  format: float
                                  example: 5.92
                                unexpectedMissingComponent:
                                  type: number
                                  format: float
                                  example: 2.63
                                error:
                                  type: number
                                  format: float
                                  example: 1.32
                                unexpectedUnknownComponent:
                                  type: number
                                  format: float
                                  example: 2.63
                                successRepaired:
                                  type: number
                                  format: float
                                  example: 2.63
      tags:
        - Compliance
      x-codeSamples:
        - lang: curl
          source: 'curl --header "X-API-Token: yourToken" --request GET ''https://rudder.example.com/rudder/api/compliance/nodes/root?level=1'''
  /compliance/rules:
    get:
      summary: Compliance details for all rules
      description: Get current compliance of all the rules of a Rudder server
      operationId: getRulesCompliance
      parameters:
        - $ref: '#/components/parameters/compliance-level'
        - $ref: '#/components/parameters/compliance-percent-precision'
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                required:
                  - result
                  - action
                  - data
                properties:
                  result:
                    type: string
                    description: Result of the request
                    enum:
                      - success
                      - error
                    example: success
                  action:
                    type: string
                    description: The id of the action
                    enum:
                      - getRulesCompliance
                  data:
                    type: object
                    required:
                      - rules
                    properties:
                      rules:
                        type: array
                        items:
                          type: object
                          required:
                            - id
                            - mode
                            - compliance
                            - complianceDetails
                          properties:
                            id:
                              type: string
                              format: uuid
                              description: id of the rule
                              example: f37f4928-fcb5-4acf-a422-d40f123a9670
                            mode:
                              type: string
                              enum:
                                - full-compliance
                                - changes-only
                                - reports-disabled
                            compliance:
                              type: number
                              format: float
                              description: Rule compliance level
                              example: 57.43
                            complianceDetails:
                              type: object
                              properties:
                                successAlreadyOK:
                                  type: number
                                  format: float
                                  example: 48.68
                                noReport:
                                  type: number
                                  format: float
                                  example: 36.18
                                successNotApplicable:
                                  type: number
                                  format: float
                                  example: 5.92
                                unexpectedMissingComponent:
                                  type: number
                                  format: float
                                  example: 2.63
                                error:
                                  type: number
                                  format: float
                                  example: 1.32
                                unexpectedUnknownComponent:
                                  type: number
                                  format: float
                                  example: 2.63
                                successRepaired:
                                  type: number
                                  format: float
                                  example: 2.63
      tags:
        - Compliance
      x-codeSamples:
        - lang: curl
          source: 'curl --header "X-API-Token: yourToken" --request GET ''https://rudder.example.com/rudder/api/latest/compliance/rules?level=2'''
  /compliance/rules/{ruleId}:
    get:
      summary: Compliance details by rule
      description: Get current compliance of a rule of a Rudder server
      operationId: getRuleCompliance
      parameters:
        - $ref: '#/components/parameters/compliance-level'
        - $ref: '#/components/parameters/compliance-percent-precision'
        - $ref: '#/components/parameters/rule-id'
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                required:
                  - result
                  - action
                  - data
                properties:
                  result:
                    type: string
                    description: Result of the request
                    enum:
                      - success
                      - error
                    example: success
                  action:
                    type: string
                    description: The id of the action
                    enum:
                      - getRuleCompliance
                  data:
                    type: object
                    required:
                      - rules
                    properties:
                      rules:
                        type: array
                        items:
                          type: object
                          required:
                            - id
                            - mode
                            - compliance
                            - complianceDetails
                          properties:
                            id:
                              type: string
                              format: uuid
                              description: id of the rule
                              example: f37f4928-fcb5-4acf-a422-d40f123a9670
                            mode:
                              type: string
                              enum:
                                - full-compliance
                                - changes-only
                                - reports-disabled
                            compliance:
                              type: number
                              format: float
                              description: Rule compliance level
                              example: 57.43
                            complianceDetails:
                              type: object
                              properties:
                                successAlreadyOK:
                                  type: number
                                  format: float
                                  example: 48.68
                                noReport:
                                  type: number
                                  format: float
                                  example: 36.18
                                successNotApplicable:
                                  type: number
                                  format: float
                                  example: 5.92
                                unexpectedMissingComponent:
                                  type: number
                                  format: float
                                  example: 2.63
                                error:
                                  type: number
                                  format: float
                                  example: 1.32
                                unexpectedUnknownComponent:
                                  type: number
                                  format: float
                                  example: 2.63
                                successRepaired:
                                  type: number
                                  format: float
                                  example: 2.63
      tags:
        - Compliance
      x-codeSamples:
        - lang: curl
          source: 'curl --header "X-API-Token: yourToken" --request GET ''https://rudder.example.com/rudder/api/latest/compliance/rules?level=2'''
  /cve:
    get:
      summary: Get all CVE details
      description: Get all CVE details
      operationId: getAllCve
      responses:
        '200':
          description: CVE details result
          content:
            application/json:
              schema:
                type: object
                required:
                  - result
                  - action
                  - data
                properties:
                  result:
                    type: string
                    description: Result of the request
                    enum:
                      - success
                      - error
                  action:
                    type: string
                    description: The id of the action
                    enum:
                      - getAllCve
                  data:
                    type: object
                    required:
                      - CVEs
                    properties:
                      CVEs:
                        type: array
                        items:
                          $ref: '#/components/schemas/cveDetails'
      tags:
        - 🧩 CVE
      x-codeSamples:
        - lang: curl
          source: |
            curl --header "X-API-Token: yourToken" --request GET 'https://rudder.example.com/rudder/api/latest/cve'
  /cve/check:
    post:
      summary: Trigger a CVE check
      description: Trigger a CVE check
      operationId: checkCVE
      responses:
        '200':
          description: CVE check result
          content:
            application/json:
              schema:
                type: object
                required:
                  - result
                  - action
                  - data
                properties:
                  result:
                    type: string
                    description: Result of the request
                    enum:
                      - success
                      - error
                  action:
                    type: string
                    description: The id of the action
                    enum:
                      - checkCVE
                  data:
                    type: object
                    required:
                      - cveChecks
                    properties:
                      cveChecks:
                        type: array
                        items:
                          $ref: '#/components/schemas/cveCheck'
      tags:
        - 🧩 CVE
      x-codeSamples:
        - lang: curl
          source: |
            curl --header "X-API-Token: yourToken" --request POST 'https://rudder.example.com/rudder/api/latest/cve/check'
  /cve/check/config:
    get:
      summary: Get CVE check config
      description: Get CVE check config
      operationId: getCVECheckConfiguration
      responses:
        '200':
          description: CVE check config
          content:
            application/json:
              schema:
                type: object
                required:
                  - result
                  - action
                  - data
                properties:
                  result:
                    type: string
                    description: Result of the request
                    enum:
                      - success
                      - error
                  action:
                    type: string
                    description: The id of the action
                    enum:
                      - getCVECheckConfiguration
                  data:
                    type: object
                    properties:
                      url:
                        type: string
                        description: Url used to check CVE
                        example: https://api.rudder.io/cve/v1/
                      apiKey:
                        type: string
                        description: Token used by to contact the API to check CVE
      tags:
        - 🧩 CVE
      x-codeSamples:
        - lang: curl
          source: |
            curl --header "X-API-Token: yourToken" --request GET 'https://rudder.example.com/rudder/api/latest/cve/check/config'
    post:
      summary: Update cve check config
      description: Update cve check config
      operationId: updateCVECheckConfiguration
      requestBody:
        content:
          application/json:
            schema:
              type: object
              description: CVE check config
              properties:
                url:
                  type: string
                  description: Url used to check CVE
                  example: https://api.rudder.io/cve/v1/
                apiKey:
                  type: string
                  description: Token used by to contact the API to check CVE
      responses:
        '200':
          description: new CVE check config
          content:
            application/json:
              schema:
                type: object
                required:
                  - result
                  - action
                  - data
                properties:
                  result:
                    type: string
                    description: Result of the request
                    enum:
                      - success
                      - error
                  action:
                    type: string
                    description: The id of the action
                    enum:
                      - updateCVECheckConfiguration
                  data:
                    type: object
                    properties:
                      url:
                        type: string
                        description: Url used to check CVE
                        example: https://api.rudder.io/cve/v1/
                      apiKey:
                        type: string
                        description: Token used by to contact the API to check CVE
      tags:
        - 🧩 CVE
      x-codeSamples:
        - lang: curl
          source: |
            curl --header "X-API-Token: yourToken" --request GET 'https://rudder.example.com/rudder/api/latest/cve/check/config'
  /cve/check/last:
    get:
      summary: Get last CVE check result
      description: Get last CVE check result
      operationId: getLastCVECheck
      parameters:
        - $ref: '#/components/parameters/cve-group-id'
        - $ref: '#/components/parameters/cve-node-id'
        - $ref: '#/components/parameters/cve-cve-id'
        - $ref: '#/components/parameters/cve-package'
        - $ref: '#/components/parameters/cve-severity'
      responses:
        '200':
          description: Last CVE check
          content:
            application/json:
              schema:
                type: object
                required:
                  - result
                  - action
                  - data
                properties:
                  result:
                    type: string
                    description: Result of the request
                    enum:
                      - success
                      - error
                  action:
                    type: string
                    description: The id of the action
                    enum:
                      - getLastCVECheck
                  data:
                    type: object
                    required:
                      - CVEChecks
                    properties:
                      CVEChecks:
                        type: array
                        items:
                          $ref: '#/components/schemas/cveCheck'
      tags:
        - 🧩 CVE
      x-codeSamples:
        - lang: curl
          source: |
            curl --header "X-API-Token: yourToken" --request GET 'https://rudder.example.com/rudder/api/latest/cve/check/last'
  /cve/list:
    post:
      summary: Get a list of CVE details
      description: Get CVE details, from a list passed as parameter
      operationId: getCVEList
      requestBody:
        content:
          application/json:
            schema:
              type: object
              description: List of CVE ids you want
              properties:
                cveIds:
                  type: array
                  items:
                    type: string
                    description: CVE id
                    example: CVE-2019-5953
                onlyScore:
                  type: boolean
                  default: false
                  example: true
                  description: Only send score of the cve, and not the whole detailed list
                minScore:
                  type: number
                  format: A score between 0 and 10 as a float
                  example: 7.5
                  description: Only send CVE with a score higher than the value
                maxScore:
                  type: number
                  format: A score between 0 and 10 as a float
                  example: 8.5
                  description: Only send CVE with a score lower than the value
                publishedDate:
                  type: string
                  format: date-time
                  description: Only send CVE with a publication date more recent than the value
      responses:
        '200':
          description: CVE list
          content:
            application/json:
              schema:
                type: object
                required:
                  - result
                  - action
                  - data
                properties:
                  result:
                    type: string
                    description: Result of the request
                    enum:
                      - success
                      - error
                  action:
                    type: string
                    description: The id of the action
                    enum:
                      - getCVEList
                  data:
                    type: object
                    required:
                      - CVEs
                    properties:
                      CVEs:
                        type: array
                        items:
                          $ref: '#/components/schemas/cveDetails'
      tags:
        - 🧩 CVE
      x-codeSamples:
        - lang: curl
          source: |
            curl --header "X-API-Token: yourToken" --request POST 'https://rudder.example.com/rudder/api/latest/cve/list'
  /cve/update:
    post:
      summary: Update CVE database from remote source
      description: Update CVE database from remote source
      operationId: updateCVE
      requestBody:
        content:
          application/json:
            schema:
              type: object
              description: CVE update config
              properties:
                url:
                  type: string
                  description: Url used to update CVE, will default to one set in config
                  example: https://nvd.nist.gov/feeds/json/cve/1.1
                years:
                  type: array
                  items:
                    type: string
                    description: Year of the CVE archive to download
                    example: '2019'
      responses:
        '200':
          description: updated CVE count
          content:
            application/json:
              schema:
                type: object
                required:
                  - result
                  - action
                  - data
                properties:
                  result:
                    type: string
                    description: Result of the request
                    enum:
                      - success
                      - error
                  action:
                    type: string
                    description: The id of the action
                    enum:
                      - updateCVE
                  data:
                    type: object
                    required:
                      - CVEs
                    properties:
                      CVEs:
                        type: integer
                        example: 12345
      tags:
        - 🧩 CVE
      x-codeSamples:
        - lang: curl
          source: |
            curl --header "X-API-Token: yourToken" --request POST 'https://rudder.example.com/rudder/api/latest/cve/update'
  /cve/update/fs:
    post:
      summary: Update CVE database from file system
      description: Update CVE database from file system
      operationId: readCVEfromFS
      responses:
        '200':
          description: updated CVE count
          content:
            application/json:
              schema:
                type: object
                required:
                  - result
                  - action
                  - data
                properties:
                  result:
                    type: string
                    description: Result of the request
                    enum:
                      - success
                      - error
                  action:
                    type: string
                    description: The id of the action
                    enum:
                      - readCVEfromFS
                  data:
                    type: object
                    required:
                      - CVEs
                    properties:
                      CVEs:
                        type: integer
                        example: 12345
      tags:
        - 🧩 CVE
      x-codeSamples:
        - lang: curl
          source: |
            curl --header "X-API-Token: yourToken" --request POST 'https://rudder.example.com/rudder/api/latest/cve/update/FS'
  /cve/{cveId}:
    get:
      summary: Get a CVE details
      description: Get a CVE details
      operationId: getCve
      parameters:
        - $ref: '#/components/parameters/cve-cve-id-path'
      responses:
        '200':
          description: CVE details result
          content:
            application/json:
              schema:
                type: object
                required:
                  - result
                  - action
                  - data
                properties:
                  result:
                    type: string
                    description: Result of the request
                    enum:
                      - success
                      - error
                  action:
                    type: string
                    description: The id of the action
                    enum:
                      - getCve
                  data:
                    type: object
                    required:
                      - CVEs
                    properties:
                      CVEs:
                        type: array
                        items:
                          $ref: '#/components/schemas/cveDetails'
      tags:
        - 🧩 CVE
      x-codeSamples:
        - lang: curl
          source: |
            curl --header "X-API-Token: yourToken" --request GET 'https://rudder.example.com/rudder/api/latest/cve/CVE-2019-5953'
  /datasources:
    get:
      summary: List all data sources
      description: Get the configuration of all present data sources
      operationId: getAllDataSources
      responses:
        '200':
          description: Data sources information
          content:
            application/json:
              schema:
                type: object
                required:
                  - result
                  - action
                  - data
                properties:
                  result:
                    type: string
                    description: Result of the request
                    enum:
                      - success
                      - error
                  action:
                    type: string
                    description: The id of the action
                    enum:
                      - getAllDataSources
                  data:
                    type: object
                    required:
                      - datasources
                    properties:
                      datasources:
                        type: array
                        items:
                          $ref: '#/components/schemas/datasource'
      tags:
        - 🧩 Data sources
      x-codeSamples:
        - lang: curl
          source: 'curl --header "X-API-Token: yourToken" --request GET ''https://rudder.example.com/rudder/api/latest/datasources'''
    put:
      summary: Create a data source
      description: Create a new data source
      operationId: createDataSource
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/datasource'
      responses:
        '200':
          description: Created
          content:
            application/json:
              schema:
                type: object
                required:
                  - result
                  - action
                  - data
                properties:
                  result:
                    type: string
                    description: Result of the request
                    enum:
                      - success
                      - error
                  action:
                    type: string
                    description: The id of the action
                    enum:
                      - createDataSource
                  data:
                    type: object
                    description: Information about the data sources
                    required:
                      - datasources
                    properties:
                      datasources:
                        type: array
                        items:
                          $ref: '#/components/schemas/datasource'
      tags:
        - 🧩 Data sources
      x-codeSamples:
        - lang: curl
          source: 'curl --header "X-API-Token: yourToken" --request PUT https://rudder.example.com/rudder/api/latest/datasources --header "Content-type: application/json" --data @datasources.json'
  /datasources/reload:
    post:
      summary: Update properties from data sources
      description: Update properties from all data source on all nodes. The call is asynchronous.
      operationId: ReloadAllDatasourcesAllNodes
      responses:
        '200':
          description: Data source reloaded
          content:
            application/json:
              schema:
                type: object
                required:
                  - result
                  - action
                  - data
                properties:
                  result:
                    type: string
                    description: Result of the request
                    enum:
                      - success
                      - error
                  action:
                    type: string
                    description: The id of the action
                    enum:
                      - ReloadAllDatasourcesAllNodes
                  data:
                    type: string
                    example: Data for all nodes, for all configured data sources are going to be updated
      tags:
        - 🧩 Data sources
      x-codeSamples:
        - lang: curl
          source: 'curl --header "X-API-Token: yourToken" --request POST https://rudder.example.com/rudder/api/latest/datasources/reload'
  /datasources/reload/{datasourceId}:
    post:
      summary: Update properties from data sources
      description: Update properties from all data source on all nodes. The call is asynchronous.
      operationId: ReloadOneDatasourceAllNodes
      parameters:
        - $ref: '#/components/parameters/datasource-id'
      responses:
        '200':
          description: Data source reloaded
          content:
            application/json:
              schema:
                type: object
                required:
                  - result
                  - action
                  - data
                properties:
                  result:
                    type: string
                    description: Result of the request
                    enum:
                      - success
                      - error
                  action:
                    type: string
                    description: The id of the action
                    enum:
                      - ReloadOneDatasourceAllNodes
                  data:
                    type: string
                    example: Data for all nodes, for the 'test-data-source' data source are going to be updated
      tags:
        - 🧩 Data sources
      x-codeSamples:
        - lang: curl
          source: 'curl --header "X-API-Token: yourToken" --request POST https://rudder.example.com/rudder/api/latest/datasources/reload/datasourceId'
  /datasources/{datasourceId}:
    get:
      summary: Get data source configuration
      description: Get the configuration of a data source
      operationId: getDataSource
      parameters:
        - $ref: '#/components/parameters/datasource-id'
      responses:
        '200':
          description: Data source information
          content:
            application/json:
              schema:
                type: object
                required:
                  - result
                  - action
                  - data
                properties:
                  result:
                    type: string
                    description: Result of the request
                    enum:
                      - success
                      - error
                  action:
                    type: string
                    description: The id of the action
                    enum:
                      - getDataSource
                  data:
                    type: object
                    required:
                      - datasources
                    properties:
                      datasources:
                        type: array
                        items:
                          $ref: '#/components/schemas/datasource'
      tags:
        - 🧩 Data sources
      x-codeSamples:
        - lang: curl
          source: 'curl --header "X-API-Token: yourToken" --request GET https://rudder.example.com/rudder/api/latest/datasources/my-data-source'
    post:
      summary: Update a data source configuration
      description: Update the configuration of a data source
      operationId: updateDataSource
      parameters:
        - $ref: '#/components/parameters/datasource-id'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/datasource'
      responses:
        '200':
          description: Data source information
          content:
            application/json:
              schema:
                type: object
                required:
                  - result
                  - action
                  - data
                properties:
                  result:
                    type: string
                    description: Result of the request
                    enum:
                      - success
                      - error
                  action:
                    type: string
                    description: The id of the action
                    enum:
                      - updateDataSource
                  data:
                    type: object
                    required:
                      - datasources
                    properties:
                      datasources:
                        type: array
                        items:
                          $ref: '#/components/schemas/datasource'
      tags:
        - 🧩 Data sources
      x-codeSamples:
        - lang: curl
          source: |-
            cat disable-datasource-1.json.json
            {
              "description": "This data source is temporary no more used and so disabled",
              "enabled": false
            }

            curl --header "X-API-Token: yourToken" --request POST https://rudder.example.com/rudder/api/latest/datasources/my-data-source --header "Content-type: application/json" --data @disable-datasource-1.json.json
    delete:
      summary: Delete a data source
      description: Delete a data source configuration
      operationId: deleteDataSource
      parameters:
        - $ref: '#/components/parameters/datasource-id'
      responses:
        '200':
          description: Data source information
          content:
            application/json:
              schema:
                type: object
                required:
                  - result
                  - action
                  - data
                properties:
                  result:
                    type: string
                    description: Result of the request
                    enum:
                      - success
                      - error
                  action:
                    type: string
                    description: The id of the action
                    enum:
                      - deleteDataSource
                  data:
                    type: object
                    required:
                      - datasources
                    properties:
                      datasources:
                        type: array
                        items:
                          $ref: '#/components/schemas/datasource'
      tags:
        - 🧩 Data sources
      x-codeSamples:
        - lang: curl
          source: 'curl --header "X-API-Token: yourToken" --request DELETE https://rudder.example.com/rudder/api/latest/datasources/my-data-source'
  /directives:
    get:
      summary: List all directives
      description: List all directives
      operationId: listDirectives
      responses:
        '200':
          description: Directives information
          content:
            application/json:
              schema:
                type: object
                required:
                  - result
                  - action
                  - data
                properties:
                  result:
                    type: string
                    description: Result of the request
                    enum:
                      - success
                      - error
                  action:
                    type: string
                    description: The id of the action
                    enum:
                      - listDirectives
                  data:
                    type: object
                    required:
                      - directives
                    properties:
                      directives:
                        type: array
                        items:
                          $ref: '#/components/schemas/directive'
      tags:
        - Directives
      x-codeSamples:
        - lang: curl
          source: 'curl --header "X-API-Token: yourToken" --request GET https://rudder.example.com/rudder/api/latest/directives'
    put:
      summary: Create a directive
      description: Create a new directive from provided parameters. You can specify a source directive to clone it.
      operationId: createDirective
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/directive-new'
      responses:
        '200':
          description: Directives information
          content:
            application/json:
              schema:
                type: object
                required:
                  - result
                  - action
                  - data
                properties:
                  result:
                    type: string
                    description: Result of the request
                    enum:
                      - success
                      - error
                  action:
                    type: string
                    description: The id of the action
                    enum:
                      - createDirective
                  data:
                    type: object
                    required:
                      - directives
                    properties:
                      directives:
                        type: array
                        items:
                          $ref: '#/components/schemas/directive'
      tags:
        - Directives
      x-codeSamples:
        - lang: curl
          source: |+
            # directives.json:
            #
            #{
            #  "id": "cf2a6c72-18ae-4f82-a12c-0b887792db41",
            #  "displayName": "Example Directive",
            #  "shortDescription": "This in an example Directive to use in Rudder api documentation",
            #  "longDescription": "",
            #  "techniqueName": "genericVariableDefinition",
            #  "techniqueVersion": "2.0",
            #  "tags": {
            #    "env" : "production",
            #    "country" : "FR"
            #  },
            #  "parameters": {
            #    "section": {
            #      "name": "sections",
            #      "sections": [
            #        {
            #          "section": {
            #            "name": "Variable definition",
            #            "vars": [
            #              {
            #                "var": {
            #                  "name": "GENERIC_VARIABLE_CONTENT",
            #                  "value": "new variable content"
            #                }
            #              },
            #              {
            #                "var": {
            #                  "name": "GENERIC_VARIABLE_NAME",
            #                  "value": "new_variable"
            #                }
            #              }
            #            ]
            #          }
            #        }
            #      ]
            #    }
            #  },
            #  "priority": 3,
            #  "enabled": true,
            #  "system": false,
            #  "policyMode": "default"
            #}

            curl --header "X-API-Token: yourToken" --request PUT https://rudder.example.com/rudder/api/latest/directives --header "Content-type: application/json" --data @directive.json

  /directives/tree:
    get:
      summary: Get directive tree
      description: Get all information about all directives in a tree like structure (with categories and techniques)
      operationId: directivesTree
      parameters:
        - name: includeSystem
          in: query
          required: false
          schema:
            type: boolean
            default: false
          example: true
          description: Should we include system techniques and categories in the tree or not.
      requestBody:
        required: false
        content:
          application/json:
            schema:
              type: object
              properties:
                includeSystem:
                  type: boolean
                  example: false
                  description: Should we include system techniques and categories in the tree or not.
      responses:
        '200':
          description: Directives tree
          content:
            application/json:
              schema:
                type: object
                required:
                  - result
                  - action
                  - data
                properties:
                  result:
                    type: string
                    description: Result of the request
                    enum:
                      - success
                      - error
                  action:
                    type: string
                    description: The id of the action
                    enum:
                      - directivesTree
                  data:
                    type: object
                    required:
                      - directives
                    properties:
                      directives:
                        type: array
                        items:
                          $ref: '#/components/schemas/directive-tree'
      tags:
        - Directives
      x-codeSamples:
        - lang: curl
          source: |
            curl --header "X-API-Token: yourToken" --request GET https://rudder.example.com/rudder/api/latest/directives/tree?includeSystem=false
  /directives/{directiveId}:
    get:
      summary: Get directive details
      description: Get all information about a given directive
      operationId: directiveDetails
      parameters:
        - $ref: '#/components/parameters/directive-id'
      responses:
        '200':
          description: Directives information
          content:
            application/json:
              schema:
                type: object
                required:
                  - result
                  - action
                  - data
                properties:
                  result:
                    type: string
                    description: Result of the request
                    enum:
                      - success
                      - error
                  action:
                    type: string
                    description: The id of the action
                    enum:
                      - directiveDetails
                  data:
                    type: object
                    required:
                      - directives
                    properties:
                      directives:
                        type: array
                        items:
                          $ref: '#/components/schemas/directive'
      tags:
        - Directives
      x-codeSamples:
        - lang: curl
          source: 'curl --header "X-API-Token: yourToken" --request GET https://rudder.example.com/rudder/api/latest/directives/17dadf50-6056-4c8b-a935-6b97d14b89a7'
    delete:
      summary: Delete a directive
      description: Delete a directive
      operationId: deleteDirective
      parameters:
        - $ref: '#/components/parameters/directive-id'
      responses:
        '200':
          description: Directives information
          content:
            application/json:
              schema:
                type: object
                required:
                  - result
                  - action
                  - data
                properties:
                  result:
                    type: string
                    description: Result of the request
                    enum:
                      - success
                      - error
                  action:
                    type: string
                    description: The id of the action
                    enum:
                      - deleteDirective
                  data:
                    type: object
                    required:
                      - directives
                    properties:
                      directives:
                        type: array
                        items:
                          $ref: '#/components/schemas/directive'
      tags:
        - Directives
      x-codeSamples:
        - lang: curl
          source: 'curl --header "X-API-Token: yourToken" --request DELETE https://rudder.example.com/rudder/api/latest/directives/17dadf50-6056-4c8b-a935-6b97d14b89a7'
    post:
      summary: Update a directive details
      description: Update directive information
      operationId: updateDirective
      parameters:
        - $ref: '#/components/parameters/directive-id'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/directive'
      responses:
        '200':
          description: Directives information
          content:
            application/json:
              schema:
                type: object
                required:
                  - result
                  - action
                  - data
                properties:
                  result:
                    type: string
                    description: Result of the request
                    enum:
                      - success
                      - error
                  action:
                    type: string
                    description: The id of the action
                    enum:
                      - updateDirective
                  data:
                    type: object
                    required:
                      - directives
                    properties:
                      directives:
                        type: array
                        items:
                          $ref: '#/components/schemas/directive'
      tags:
        - Directives
      x-codeSamples:
        - lang: curl
          source: |
            # directive.json:
            #
            #{
            #  "longDescription": "Add a loooooooooooong description",
            #  "parameters": {
            #    "section": {
            #      "name": "sections",
            #      "sections": [
            #        {
            #          "section": {
            #            "name": "Variable definition",
            #            "vars": [
            #              {
            #                "var": {
            #                  "name": "GENERIC_VARIABLE_CONTENT",
            #                  "value": "Change Variable Content"
            #                }
            #              },
            #              {
            #                "var": {
            #                  "name": "GENERIC_VARIABLE_NAME",
            #                  "value": "new_variable"
            #                }
            #              }
            #            ]
            #          }
            #        }
            #      ]
            #    }
            #  },
            #  "priority": 5
            #}

            curl --header "X-API-Token: yourToken" --request POST https://rudder.example.com/rudder/api/latest/directives/cf2a6c72-18ae-4f82-a12c-0b887792db41 --header "Content-type: application/json" --data @directive.json
  /directives/{directiveId}/check:
    post:
      summary: Check that update on a directive is valid
      description: Check that update on a directive is valid
      operationId: checkDirective
      parameters:
        - $ref: '#/components/parameters/directive-id'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/directive'
      responses:
        '200':
          description: Directives information
          content:
            application/json:
              schema:
                type: object
                required:
                  - result
                  - action
                  - data
                properties:
                  result:
                    type: string
                    description: Result of the request
                    enum:
                      - success
                      - error
                  action:
                    type: string
                    description: The id of the action
                    enum:
                      - checkDirective
                  data:
                    type: object
                    required:
                      - directives
                    properties:
                      directives:
                        type: array
                        items:
                          $ref: '#/components/schemas/directive'
      tags:
        - Directives
      x-codeSamples:
        - lang: curl
          source: 'curl --header "X-API-Token: yourToken" --request POST https://rudder.example.com/rudder/api/latest/directives/17dadf50-6056-4c8b-a935-6b97d14b89a7/check  --data "displayName=Name of new directive"'
  /groups:
    get:
      summary: List all groups
      description: List all groups
      operationId: listGroups
      responses:
        '200':
          description: Groups information
          content:
            application/json:
              schema:
                type: object
                required:
                  - result
                  - action
                  - data
                properties:
                  result:
                    type: string
                    description: Result of the request
                    enum:
                      - success
                      - error
                  action:
                    type: string
                    description: The id of the action
                    enum:
                      - listGroups
                  data:
                    type: object
                    required:
                      - groups
                    properties:
                      groups:
                        type: array
                        items:
                          $ref: '#/components/schemas/group'
      tags:
        - Groups
      x-codeSamples:
        - lang: curl
          source: 'curl --header "X-API-Token: yourToken" --request GET https://rudder.example.com/rudder/api/latest/groups'
    put:
      summary: Create a group
      description: Create a new group based in provided parameters
      operationId: createGroup
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/group-new'
      responses:
        '200':
          description: Group information
          content:
            application/json:
              schema:
                type: object
                required:
                  - result
                  - action
                  - data
                properties:
                  result:
                    type: string
                    description: Result of the request
                    enum:
                      - success
                      - error
                  action:
                    type: string
                    description: The id of the action
                    enum:
                      - createGroup
                  data:
                    type: object
                    required:
                      - groups
                    properties:
                      groups:
                        type: array
                        items:
                          $ref: '#/components/schemas/group'
      tags:
        - Groups
      x-codeSamples:
        - lang: curl
          source: |+
            # groups.json:
            #
            #{
            # "category": "c355f46e-11b0-4c7a-aedd-6a5f3b0303b6",
            # "displayName": "Example group",
            # "description": "This is an example Group to use in Rudder api documentation",
            # "query":
            #   {"select":"node","composition":"Or","where":
            #     [
            #       {"objectType":"node","attribute":"nodeId","comparator":"eq","value":"1ae6ccfe-00ba-44c0-b1aa-362d2f386032"},
            #       {"objectType":"node","attribute":"nodeId","comparator":"eq","value":"e4a80fd8-373e-45fc-ad94-2ae618be32e3"}
            #     ]
            #   },
            #  "dynamic": true,
            #  "enabled": true
            #}

            curl --header "X-API-Token: yourToken" --request PUT https://rudder.example.com/rudder/api/latest/groups --header "Content-Type: application/json" --data @group.json

  /groups/categories:
    put:
      summary: Create a group category
      description: Create a new group category
      operationId: CreateGroupCategory
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/group-category'
      responses:
        '200':
          description: Groups category information
          content:
            application/json:
              schema:
                type: object
                required:
                  - result
                  - action
                  - data
                properties:
                  result:
                    type: string
                    description: Result of the request
                    enum:
                      - success
                      - error
                  action:
                    type: string
                    description: The id of the action
                    enum:
                      - CreateGroupCategory
                  data:
                    type: object
                    required:
                      - groupCategories
                    properties:
                      groupCategories:
                        type: array
                        items:
                          $ref: '#/components/schemas/group-category'
      tags:
        - Groups
      x-codeSamples:
        - lang: curl
          source: |
            curl --header "X-API-Token: yourToken" --request PUT 'https://rudder.example.com/rudder/api/latest/groups/categories' --data "name=new category name" -d "parent=4306143d-eabf-4478-b7b1-1616f4aa02b5" -d "description=A new category created via API"
  /groups/categories/{groupCategoryId}:
    get:
      summary: Get group category details
      description: Get detailed information about a group category
      operationId: GetGroupCategoryDetails
      parameters:
        - $ref: '#/components/parameters/group-category-id'
      responses:
        '200':
          description: Groups category information
          content:
            application/json:
              schema:
                type: object
                required:
                  - result
                  - action
                  - data
                properties:
                  result:
                    type: string
                    description: Result of the request
                    enum:
                      - success
                      - error
                  action:
                    type: string
                    description: The id of the action
                    enum:
                      - GetGroupCategoryDetails
                  data:
                    type: object
                    required:
                      - groupCategories
                    properties:
                      groupCategories:
                        type: array
                        items:
                          $ref: '#/components/schemas/group-category'
      tags:
        - Groups
      x-codeSamples:
        - lang: curl
          source: 'curl --header "X-API-Token: yourToken" --request GET ''https://rudder.example.com/rudder/api/latest/groups/categories/4306143d-eabf-4478-b7b1-1616f4aa02b5'''
    delete:
      summary: Delete group category
      description: Delete a group category. It must have no child groups and no children categories.
      operationId: DeleteGroupCategory
      parameters:
        - $ref: '#/components/parameters/group-category-id'
      responses:
        '200':
          description: Groups category information
          content:
            application/json:
              schema:
                type: object
                required:
                  - result
                  - action
                  - data
                properties:
                  result:
                    type: string
                    description: Result of the request
                    enum:
                      - success
                      - error
                  action:
                    type: string
                    description: The id of the action
                    enum:
                      - DeleteGroupCategory
                  data:
                    type: object
                    required:
                      - groupCategories
                    properties:
                      groupCategories:
                        type: array
                        items:
                          $ref: '#/components/schemas/group-category'
      tags:
        - Groups
      x-codeSamples:
        - lang: curl
          source: 'curl --header "X-API-Token: yourToken" --request DELETE ''https://rudder.example.com/rudder/api/latest/groups/categories/4306143d-eabf-4478-b7b1-1616f4aa02b5'''
    post:
      summary: Update group category details
      description: Update detailed information about a group category
      operationId: UpdateGroupCategory
      parameters:
        - $ref: '#/components/parameters/group-category-id'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/group-category-update'
      responses:
        '200':
          description: Groups category information
          content:
            application/json:
              schema:
                type: object
                required:
                  - result
                  - action
                  - data
                properties:
                  result:
                    type: string
                    description: Result of the request
                    enum:
                      - success
                      - error
                  action:
                    type: string
                    description: The id of the action
                    enum:
                      - UpdateGroupCategory
                  data:
                    type: object
                    required:
                      - groupCategories
                    properties:
                      groupCategories:
                        type: array
                        items:
                          $ref: '#/components/schemas/group-category'
      tags:
        - Groups
      x-codeSamples:
        - lang: curl
          source: |
            curl --header "X-API-Token: yourToken" --request POST 'https://rudder.example.com/rudder/api/latest/groups/categories/4306143d-eabf-4478-b7b1-1616f4aa02b5' --data "name=new category name"
  /groups/tree:
    get:
      summary: Get groups tree
      description: Get all available groups and their categories in a tree
      operationId: GetGroupTree
      parameters:
        - name: includeSystem
          in: query
          required: false
          schema:
            type: boolean
            default: false
          example: true
          description: Whether to include system categories and groups in results.
      responses:
        '200':
          description: Groups information
          content:
            application/json:
              schema:
                type: object
                required:
                  - result
                  - action
                  - data
                properties:
                  result:
                    type: string
                    description: Result of the request
                    enum:
                      - success
                      - error
                  action:
                    type: string
                    description: The id of the action
                    enum:
                      - GetGroupTree
                  data:
                    type: object
                    required:
                      - groupCategories
                    properties:
                      groupCategories:
                        type: object
                        description: Group tree
                    example:
                      groupCategories:
                        id: GroupRoot
                        name: Root of the group and group categories
                        description: This is the root category for the groups (both dynamic and static) and group categories
                        parent: GroupRoot
                        categories:
                          - id: SystemGroups
                            name: System groups
                            description: That category holds all the system and special target
                            parent: GroupRoot
                            categories: []
                            groups:
                              - id: hasPolicyServer-root
                                displayName: All nodes managed by root policy server
                                description: All nodes known by Rudder directly connected to the root server
                                query:
                                  select: nodeAndPolicyServer
                                  composition: And
                                  where:
                                    - objectType: node
                                      attribute: policyServerId
                                      comparator: eq
                                      value: root
                                nodeIds:
                                  - dd404bda-2785-4959-abaa-8f37a0bbd85e
                                  - f6223b0e-e2aa-4d1f-b6d1-74de8ea8e513
                                  - root
                                dynamic: true
                                enabled: true
                                properties: []
                                target: group:hasPolicyServer-root
                                system: true
                          - id: 38dd2107-a73b-45fb-916d-e110312abb87
                            name: production groups
                            description: ''
                            parent: GroupRoot
                            categories: []
                            groups:
                              - id: 79d83ff9-24d8-4be6-b1f7-cbb1c173f7a5
                                displayName: Linux nodes
                                description: ''
                                query:
                                  select: node
                                  composition: And
                                  where:
                                    - objectType: node
                                      attribute: OS
                                      comparator: eq
                                      value: Linux
                                nodeIds: []
                                dynamic: false
                                enabled: true
                                target: group:79d83ff9-24d8-4be6-b1f7-cbb1c173f7a5
                                system: false
                        groups:
                          - id: af208515-c2f2-4577-bbf4-9fffebbe6629
                            displayName: Test Clients
                            description: ''
                            query:
                              select: node
                              composition: Or
                              where:
                                - objectType: node
                                  attribute: nodeHostname
                                  comparator: regex
                                  value: servername.*company.net
                                - objectType: node
                                  attribute: nodeHostname
                                  comparator: regex
                                  value: lt serverbla.*company.net
                            nodeIds: []
                            dynamic: true
                            enabled: true
                            target: group:af208515-c2f2-4577-bbf4-9fffebbe6629
                            system: false
                          - id: d7634b2d-7189-422b-9971-24c29b75da46
                            displayName: Test Clients
                            description: ''
                            query:
                              select: node
                              composition: Or
                              where:
                                - objectType: node
                                  attribute: nodeHostname
                                  comparator: regex
                                  value: servername.*company.net
                                - objectType: node
                                  attribute: nodeHostname
                                  comparator: regex
                                  value: lt serverbla.*company.net
                            nodeIds: []
                            dynamic: true
                            enabled: true
                            target: group:d7634b2d-7189-422b-9971-24c29b75da46
                            system: false
      tags:
        - Groups
      x-codeSamples:
        - lang: curl
          source: |
            curl --header "X-API-Token: yourToken" --request GET https://rudder.example.com/rudder/api/latest/groups/tree?includeSystem=true
  /groups/{groupId}:
    get:
      summary: Get group details
      description: Get detailed information about a group
      operationId: groupDetails
      parameters:
        - $ref: '#/components/parameters/group-id'
      responses:
        '200':
          description: Groups information
          content:
            application/json:
              schema:
                type: object
                required:
                  - result
                  - action
                  - data
                properties:
                  result:
                    type: string
                    description: Result of the request
                    enum:
                      - success
                      - error
                  action:
                    type: string
                    description: The id of the action
                    enum:
                      - groupDetails
                  data:
                    type: object
                    required:
                      - groups
                    properties:
                      groups:
                        type: array
                        items:
                          $ref: '#/components/schemas/group'
      tags:
        - Groups
      x-codeSamples:
        - lang: curl
          source: 'curl --header "X-API-Token: yourToken" --request GET ''https://rudder.example.com/rudder/api/latest/groups/17dadf50-6056-4c8b-a935-6b97d14b89a7'''
    post:
      summary: Update group details
      description: Update detailed information about a group
      operationId: updateGroup
      parameters:
        - $ref: '#/components/parameters/group-id'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/group-update'
      responses:
        '200':
          description: Groups information
          content:
            application/json:
              schema:
                type: object
                required:
                  - result
                  - action
                  - data
                properties:
                  result:
                    type: string
                    description: Result of the request
                    enum:
                      - success
                      - error
                  action:
                    type: string
                    description: The id of the action
                    enum:
                      - updateGroup
                  data:
                    type: object
                    required:
                      - groups
                    properties:
                      groups:
                        type: array
                        items:
                          $ref: '#/components/schemas/group'
      tags:
        - Groups
      x-codeSamples:
        - lang: curl
          source: 'curl --header "X-API-Token: yourToken" --request POST ''https://rudder.example.com/rudder/api/latest/groups/17dadf50-6056-4c8b-a935-6b97d14b89a7'' --data "displayName=New name of group"'
    delete:
      summary: Delete a group
      description: Update detailed information about a group
      operationId: deleteGroup
      parameters:
        - $ref: '#/components/parameters/group-id'
      responses:
        '200':
          description: Groups information
          content:
            application/json:
              schema:
                type: object
                required:
                  - result
                  - action
                  - data
                properties:
                  result:
                    type: string
                    description: Result of the request
                    enum:
                      - success
                      - error
                  action:
                    type: string
                    description: The id of the action
                    enum:
                      - deleteGroup
                  data:
                    type: object
                    required:
                      - groups
                    properties:
                      groups:
                        type: array
                        items:
                          $ref: '#/components/schemas/group'
      tags:
        - Groups
      x-codeSamples:
        - lang: curl
          source: 'curl --header "X-API-Token: yourToken" --request DELETE ''https://rudder.example.com/rudder/api/latest/groups/17dadf50-6056-4c8b-a935-6b97d14b89a7'''
  /groups/{groupId}/reload:
    post:
      summary: Reload a group
      description: Recompute the content of a group
      operationId: reloadGroup
      parameters:
        - $ref: '#/components/parameters/group-id'
      responses:
        '200':
          description: Groups information
          content:
            application/json:
              schema:
                type: object
                required:
                  - result
                  - action
                  - data
                properties:
                  result:
                    type: string
                    description: Result of the request
                    enum:
                      - success
                      - error
                  action:
                    type: string
                    description: The id of the action
                    enum:
                      - reloadGroup
                  data:
                    type: object
                    required:
                      - groups
                    properties:
                      groups:
                        type: array
                        items:
                          $ref: '#/components/schemas/group'
      tags:
        - Groups
      x-codeSamples:
        - lang: curl
          source: 'curl --header "X-API-Token: yourToken" --request POST ''https://rudder.example.com/rudder/api/latest/groups/17dadf50-6056-4c8b-a935-6b97d14b89a7/reload'''
  /info:
    get:
      summary: List all endpoints
      description: List all endpoints and their version
      operationId: apiGeneralInformations
      responses:
        '200':
          description: API endpoints
          content:
            application/json:
              schema:
                type: object
                required:
                  - result
                  - action
                  - data
                properties:
                  result:
                    type: string
                    description: Result of the request
                    enum:
                      - success
                      - error
                  action:
                    type: string
                    description: The id of the action
                    enum:
                      - apiGeneralInformations
                  data:
                    type: object
                    required:
                      - documentation
                      - availableVersions
                      - endpoints
                    properties:
                      documentation:
                        type: string
                        description: Link to Rudder API description
                      availableVersions:
                        type: array
                        items:
                          $ref: '#/components/schemas/api-versions'
                      endpoints:
                        type: array
                        items:
                          $ref: '#/components/schemas/api-endpoints'
      tags:
        - API Info
      x-codeSamples:
        - lang: curl
          source: |
            curl --header "X-API-Token: yourToken" --request GET https://rudder.example.com/rudder/api/latest/info
  /info/details/{endpointName}:
    get:
      summary: Get information about one API endpoint
      description: Get the description and the list of supported version for one API endpoint
      operationId: apiInformations
      parameters:
        - name: endpointName
          in: path
          required: true
          description: Name of the endpoint for which one wants information
          schema:
            type: string
            example: listAcceptedNodes
      responses:
        '200':
          description: API Endpoint information
          content:
            application/json:
              schema:
                type: object
                required:
                  - result
                  - action
                  - data
                properties:
                  result:
                    type: string
                    description: Result of the request
                    enum:
                      - success
                      - error
                  action:
                    type: string
                    description: The id of the action
                    enum:
                      - apiInformations
                  data:
                    type: object
                    required:
                      - documentation
                      - endpointName
                      - endpoints
                    properties:
                      documentation:
                        type: string
                        description: Link to Rudder API description
                      endpointName:
                        type: string
                        description: The endpoint name as key and the endpoint description as value
                      endpoints:
                        $ref: '#/components/schemas/api-endpoints'
      tags:
        - API Info
      x-codeSamples:
        - lang: curl
          source: |
            curl --header "X-API-Token: yourToken" --request GET https://rudder.example.com/rudder/api/latest/info/details/listAcceptedNodes
  /info/{sectionId}:
    get:
      summary: Get information on endpoint in a section
      description: Get all endpoints in the given section with their supported version.
      operationId: apiSubInformations
      parameters:
        - name: sectionId
          in: path
          required: true
          description: Id of the API section
          schema:
            type: string
            example: nodes
      responses:
        '200':
          description: Endpoint information
          content:
            application/json:
              schema:
                type: object
                required:
                  - result
                  - action
                  - data
                properties:
                  result:
                    type: string
                    description: Result of the request
                    enum:
                      - success
                      - error
                  action:
                    type: string
                    description: The id of the action
                    enum:
                      - apiSubInformations
                  data:
                    type: object
                    required:
                      - documentation
                      - availableVersions
                      - endpoints
                    properties:
                      documentation:
                        type: string
                        description: Link to Rudder API description
                      availableVersions:
                        type: array
                        items:
                          $ref: '#/components/schemas/api-versions'
                      endpoints:
                        type: array
                        items:
                          $ref: '#/components/schemas/api-endpoints'
      tags:
        - API Info
      x-codeSamples:
        - lang: curl
          source: |
            curl --header "X-API-Token: yourToken" --request GET https://rudder.example.com/rudder/api/latest/info/nodes
  /inventories/upload:
    post:
      summary: Upload an inventory for processing
      description: Upload an inventory to the web application
      operationId: uploadInventory
      requestBody:
        content:
          multipart/form-data:
            schema:
              type: object
              properties:
                file:
                  type: string
                  format: binary
                  description: The inventory file. The original file name is used to check extension, that should be .xml[.gz] or .ocs[.gz]
                signature:
                  type: string
                  format: binary
                  description: The signature file. The original file name is used to check extension, that should be ${originalInventoryFileName}.sign[.gz]
      responses:
        '200':
          description: Inventory uploaded
          content:
            application/json:
              schema:
                type: object
                required:
                  - result
                  - action
                  - data
                properties:
                  result:
                    type: string
                    description: Result of the request
                    enum:
                      - success
                      - error
                  action:
                    type: string
                    description: The id of the action
                    enum:
                      - uploadInventory
                  data:
                    type: string
                    example: Inventory 'file.xml' for Node 'c1bab9fc-bcf6-4d59-a397-84c8e2fc06c0' added to processing queue.
      tags:
        - Inventories
      x-codeSamples:
        - lang: curl
          source: 'curl --request POST --header "X-API-Token: yourToken" https://rudder.example.com/rudder/api/latest/inventories/upload -F "file=@inventory-file" -F "signature=@signature-file"'
  /inventories/watcher/restart:
    post:
      summary: Restart inventory watcher
      description: Restart the inventory watcher if necessary
      operationId: fileWatcherRestart
      responses:
        '200':
          description: Started
          content:
            application/json:
              schema:
                type: object
                required:
                  - result
                  - action
                  - data
                properties:
                  result:
                    type: string
                    description: Result of the request
                    enum:
                      - success
                      - error
                  action:
                    type: string
                    description: The id of the action
                    enum:
                      - fileWatcherRestart
                  data:
                    type: string
                    example: Incoming inventory watcher restarted
      tags:
        - Inventories
      x-codeSamples:
        - lang: curl
          source: 'curl --header "X-API-Token: yourToken" --request POST ''https://rudder.example.com/rudder/api/latest/inventories/watcher/restart'''
  /inventories/watcher/start:
    post:
      summary: Start inventory watcher
      description: Start the inventory watcher if necessary
      operationId: fileWatcherStart
      responses:
        '200':
          description: Started
          content:
            application/json:
              schema:
                type: object
                required:
                  - result
                  - action
                  - data
                properties:
                  result:
                    type: string
                    description: Result of the request
                    enum:
                      - success
                      - error
                  action:
                    type: string
                    description: The id of the action
                    enum:
                      - fileWatcherStart
                  data:
                    type: string
                    example: Incoming inventory watcher started
      tags:
        - Inventories
      x-codeSamples:
        - lang: curl
          source: 'curl --header "X-API-Token: yourToken" --request POST ''https://rudder.example.com/rudder/api/latest/inventories/watcher/start'''
  /inventories/watcher/stop:
    post:
      summary: Stop inventory watcher
      description: Stop the inventory watcher if necessary
      operationId: fileWatcherStop
      responses:
        '200':
          description: Stopped
          content:
            application/json:
              schema:
                type: object
                required:
                  - result
                  - action
                  - data
                properties:
                  result:
                    type: string
                    description: Result of the request
                    enum:
                      - success
                      - error
                  action:
                    type: string
                    description: The id of the action
                    enum:
                      - fileWatcherStop
                  data:
                    type: string
                    example: Incoming inventory watcher stopped
      tags:
        - Inventories
      x-codeSamples:
        - lang: curl
          source: 'curl --header "X-API-Token: yourToken" --request POST ''https://rudder.example.com/rudder/api/latest/inventories/watcher/stop'''
  /methods:
    get:
      summary: List methods
      description: Get all generic methods metadata
      operationId: methods
      responses:
        '200':
          description: Methods information
          content:
            application/json:
              schema:
                type: object
                required:
                  - result
                  - action
                  - data
                properties:
                  result:
                    type: string
                    description: Result of the request
                    enum:
                      - success
                      - error
                  action:
                    type: string
                    description: The id of the action
                    enum:
                      - listTechniques
                  data:
                    type: object
                    required:
                      - methods
                    properties:
                      methods:
                        $ref: '#/components/schemas/methods'
      tags:
        - Techniques
      x-codeSamples:
        - lang: curl
          source: 'curl --header "X-API-Token: yourToken" --request GET https://rudder.example.com/rudder/api/latest/methods'
  /methods/reload:
    post:
      summary: Reload methods
      description: Reload methods metadata from file system
      operationId: reloadMethods
      responses:
        '200':
          description: Methods information
          content:
            application/json:
              schema:
                type: object
                required:
                  - result
                  - action
                  - data
                properties:
                  result:
                    type: string
                    description: Result of the request
                    enum:
                      - success
                      - error
                  action:
                    type: string
                    description: The id of the action
                    enum:
                      - listTechniques
                  data:
                    type: object
                    required:
                      - methods
                    properties:
                      methods:
                        $ref: '#/components/schemas/methods'
      tags:
        - Techniques
      x-codeSamples:
        - lang: curl
          source: 'curl --header "X-API-Token: yourToken" --request POST https://rudder.example.com/rudder/api/latest/methods/reload'
  /nodes:
    get:
      summary: List managed nodes
      description: Get information about the nodes managed by the target server
      operationId: listAcceptedNodes
      parameters:
        - $ref: '#/components/parameters/include'
        - $ref: '#/components/parameters/node-query'
        - $ref: '#/components/parameters/node-where'
        - $ref: '#/components/parameters/node-composition'
        - $ref: '#/components/parameters/node-select'
      responses:
        '200':
          description: Nodes
          content:
            application/json:
              schema:
                type: object
                required:
                  - result
                  - action
                  - data
                properties:
                  result:
                    type: string
                    description: Result of the request
                    enum:
                      - success
                      - error
                  action:
                    type: string
                    description: The id of the action
                    enum:
                      - listAcceptedNodes
                  data:
                    type: object
                    description: Information about the nodes
                    required:
                      - nodes
                    properties:
                      nodes:
                        type: array
                        items:
                          $ref: '#/components/schemas/node-full'
      tags:
        - Nodes
      x-codeSamples:
        - lang: curl
          source: "# To get the Linux nodes with a hostname starting with \"node1\"\ncurl -g --header \"X-API-Token: yourToken\" 'https://rudder.example.com/rudder/api/latest/nodes?where=[{\"objectType\":\"node\",\"attribute\":\"OS\",\"comparator\":\"eq\",\"value\":\"Linux\"},{\"objectType\":\"node\",\"attribute\":\"nodeHostname\",\"comparator\":\"regex\",\"value\":\"node1.*\"}]&composition=And'\n\n# To get the list of nodes with their agent version\ncurl -k -H \"X-API-Token: yourToken\" -X GET \"https://rudder.example.com/rudder/api/latest/nodes?include=minimal,managementTechnology\" | jq '.data.nodes[] | {\"id\": .id, \"version\": .managementTechnology[].version}'\n\n# To get information about the eth0 interface of a specific node\ncurl -k -H \"X-API-Token: yourToken\" -H \"Content-Type: application/json\" -X GET 'https://rudder.example.com/rudder/api/latest/nodes/8b168194-c0b4-41ab-b2b5-9571a8906d59?include=networkInterfaces' | jq '.data.nodes[].networkInterfaces[] | select(.name == \"eth0\")'\n# It gives:\n#\n#{\n# \"name\": \"eth0\",\n# \"type\": \"ethernet\",\n# \"status\": \"Up\",\n# \"macAddress\": \"52:54:00:49:45:ac\",\n# \"ipAddresses\": [\n#   \"fe80:0:0:0:5054:ff:fe49:45ac\",\n#   \"192.168.110.21\"\n# ]\n#}\n\n# To get information about the nodes running a JVM process\n#\n# This gets information about nodes with processes matching the quesry, and then extract the flat list of matching processes\ncurl -g -s -H \"X-API-Token: yourToken\" 'https://rudder.example.com/rudder/api/latest/nodes?include=minimal,processes&where=[{\"objectType\":\"process\",\"attribute\":\"commandName\",\"comparator\":\"regex\",\"value\":\".*(java|jre|jdk).*\"}]' | jq -r '.data.nodes[] | [ { hostname } + .processes[] ][] | select( .name | test(\".*(java|jdk|jre).*\")) | [.hostname, .user, .name] | @tsv' | cut -c -120\n# It gives:\n#\n# node1.example.com\tjenkins\tjava -jar remoting.jar -workDir /home/jenkins -jar-cache /home/jenkins/rem\n# node2.example.com\ttomcat8\t/usr/lib/jvm/java-11-openjdk-amd64//bin/java -Djava.util.logging.config.fi\n"
        - lang: python
          source: |
            import json
            import requests

            # Get all nodes having a hostname starting with node1 and based on Linux and only display minimal information (id, hostname, status)
            url = "https://rudder.example.com/rudder/api/latest/nodes"
            linux = {"objectType": "node", "attribute": "OS",
                     "comparator": "eq", "value": "Linux"}
            node1 = {"objectType": "node", "attribute": "nodeHostname",
                     "comparator": "regex", "value": "node1.*"}
            where = [linux, node1]
            params = {"where": json.dumps(where), "include": "minimal"}
            headers = {"X-API-TOKEN": "yourToken"}
            requests.get(url, params=params, headers=headers, verify=False)
    put:
      summary: Create one or several new nodes
      description: Use the provided array of node information to create new nodes
      operationId: createNodes
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/node-add'
      responses:
        '200':
          description: Creation information
          content:
            application/json:
              schema:
                type: object
                required:
                  - result
                  - action
                  - data
                properties:
                  result:
                    type: string
                    description: Result of the request
                    enum:
                      - success
                      - error
                  action:
                    type: string
                    description: The id of the action
                    enum:
                      - createNode
                  data:
                    type: object
                    required:
                      - created
                      - failed
                    properties:
                      created:
                        type: array
                        items:
                          type: string
                          description: created nodes ID
                          example: 378740d3-c4a9-4474-8485-478e7e52db52
                      failed:
                        type: array
                        items:
                          type: string
                          description: failed nodes ID
      tags:
        - Nodes
      x-codeSamples:
        - lang: curl
          source: |+
            curl --header "X-API-Token: yourToken" --request PUT https://rudder.example.com/rudder/api/latest/nodes --header "Content-type: application/json" --data @nodes.json

  /nodes/applyPolicy:
    post:
      summary: Trigger an agent run on all nodes
      description: This API allows to trigger an agent run on all nodes. Response contains a json stating if agent could be started on each node, but not if the run went fine and do not display any output from it. You can see the result of the run in Rudder web interface or in the each agent logs.
      operationId: applyPolicyAllNodes
      responses:
        '200':
          description: Result
          content:
            application/json:
              schema:
                type: object
                required:
                  - result
                  - action
                  - data
                properties:
                  result:
                    type: string
                    description: Result of the request
                    enum:
                      - success
                      - error
                  action:
                    type: string
                    description: The id of the action
                    enum:
                      - applyPolicyAllNodes
                  data:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                          format: uuid (or "root")
                          example: 249e14ac-2418-457c-a27d-1650907b13c7
                          description: Rudder id of the node
                        hostname:
                          type: string
                          example: node.example.com
                          description: Node hostname
                        result:
                          type: string
                          description: Result or policy application trigger
                          example: Started
      tags:
        - Nodes
      x-codeSamples:
        - lang: curl
          source: 'curl --header "X-API-Token: yourToken" --request POST https://rudder.example.com/rudder/api/latest/nodes/applyPolicy'
  /nodes/pending:
    get:
      summary: List pending nodes
      description: Get information about the nodes pending acceptation
      operationId: listPendingNodes
      parameters:
        - $ref: '#/components/parameters/include'
        - $ref: '#/components/parameters/node-query'
        - $ref: '#/components/parameters/node-where'
        - $ref: '#/components/parameters/node-composition'
        - $ref: '#/components/parameters/node-select'
      responses:
        '200':
          description: Nodes
          content:
            application/json:
              schema:
                type: object
                required:
                  - result
                  - action
                  - data
                properties:
                  result:
                    type: string
                    description: Result of the request
                    enum:
                      - success
                      - error
                  action:
                    type: string
                    description: The id of the action
                    enum:
                      - listPendingNodes
                  data:
                    type: object
                    description: Information about the nodes
                    required:
                      - nodes
                    properties:
                      nodes:
                        type: array
                        items:
                          $ref: '#/components/schemas/node-full'
      tags:
        - Nodes
      x-codeSamples:
        - lang: curl
          source: |+
            # To get the list of pending nodes
            curl --header "X-API-Token: yourToken" 'https://rudder.example.com/rudder/api/latest/nodes/pending'

            # To get the pending Linux nodes with a hostname starting with "node1"
            curl --header "X-API-Token: yourToken" 'https://rudder.example.com/rudder/api/latest/nodes/pending?where=\[\{"objectType":"node","attribute":"OS","comparator":"eq","value":"Linux"\},\{"objectType":"node","attribute":"nodeHostname","comparator":"regex","value":"node1.*"\}\]'

            # To get the list of pending nodes with their agent version
            curl -k -H "X-API-Token: yourToken" -X GET "https://rudder.example.com/rudder/api/latest/nodes/pending?include=minimal,managementTechnology" | jq '.data.nodes[] | {"id": .id, "version": .managementTechnology[].version}'



    post:
      summary: Update pending nodes status
      description: Accept or refuse one or many pending nodes
      operationId: changePendingNodesStatus
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                nodeId:
                  type: array
                  description: List of nodes to change status
                  items:
                    type: string
                    format: uuid
                    example: 109142a2-40eb-4e6d-84b4-7ebe3670474c
                    description: ID of pending node
                status:
                  type: string
                  description: New status of the pending node
                  enum:
                    - accepted
                    - refused
                  example: accepted
      responses:
        '200':
          description: Nodes
          content:
            application/json:
              schema:
                type: object
                required:
                  - result
                  - action
                  - data
                properties:
                  result:
                    type: string
                    description: Result of the request
                    enum:
                      - success
                      - error
                  action:
                    type: string
                    description: The id of the action
                    enum:
                      - changePendingNodeStatus
                  data:
                    type: object
                    description: Information about the node
                    required:
                      - nodes
                    properties:
                      nodes:
                        type: array
                        items:
                          $ref: '#/components/schemas/node-pending-result'
      tags:
        - Nodes
      x-codeSamples:
        - lang: curl
          source: 'curl --header "X-API-Token: yourToken" --request POST https://rudder.example.com/rudder/api/latest/nodes/pending --data "status=accepted&nodeId=[node1]"'
  /nodes/pending/{nodeId}:
    post:
      summary: Update pending node status
      description: Accept or refuse a pending node
      operationId: changePendingNodeStatus
      parameters:
        - $ref: '#/components/parameters/node-id'
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                status:
                  type: string
                  description: New status of the pending node
                  enum:
                    - accepted
                    - refused
                  example: accepted
      responses:
        '200':
          description: Nodes
          content:
            application/json:
              schema:
                type: object
                required:
                  - result
                  - action
                  - data
                properties:
                  result:
                    type: string
                    description: Result of the request
                    enum:
                      - success
                      - error
                  action:
                    type: string
                    description: The id of the action
                    enum:
                      - changePendingNodeStatus
                  data:
                    type: object
                    description: Information about the node
                    required:
                      - nodes
                    properties:
                      nodes:
                        type: array
                        items:
                          $ref: '#/components/schemas/node-pending-result'
      tags:
        - Nodes
      x-codeSamples:
        - lang: curl
          source: 'curl --header "X-API-Token: yourToken" --request POST https://rudder.example.com/rudder/api/latest/nodes/pending/17dadf50-6056-4c8b-a935-6b97d14b89a7 --data "status=accepted"'
  /nodes/status:
    get:
      summary: Get nodes acceptation status
      description: Get acceptation status (pending, accepted, deleted, unknown) of a list of nodes
      operationId: getNodesStatus
      parameters:
        - $ref: '#/components/parameters/node-ids'
      responses:
        '200':
          description: nodes
          content:
            application/json:
              schema:
                type: object
                required:
                  - result
                  - action
                  - data
                properties:
                  result:
                    type: string
                    description: Result of the request
                    enum:
                      - success
                      - error
                  action:
                    type: string
                    description: The id of the action
                    enum:
                      - getNodesStatus
                  data:
                    type: object
                    description: List of nodeId and associated status
                    required:
                      - nodes
                    properties:
                      nodes:
                        type: array
                        description: List of nodeId and associated status
                        items:
                          type: object
                          required:
                            - id
                            - status
                          properties:
                            id:
                              type: string
                              description: Unique id of the node
                              format: uuid (or "root")
                              example: 9a1773c9-0889-40b6-be89-f6504443ac1b
                            status:
                              type: string
                              description: Status of the node
                              enum:
                                - pending
                                - accepted
                                - deleted
                                - unknown
      tags:
        - Nodes
      x-codeSamples:
        - lang: curl
          source: 'curl --header "X-API-Token: yourToken" https://rudder.example.com/rudder/api/latest/nodes/status?ids=17dadf50-6056-4c8b-a935-6b97d14b89a7,b9a71482-5030-4699-984d-b03d28bbbf36'
  /nodes/{nodeId}:
    get:
      summary: Get information about a node
      description: Get details about a given node
      operationId: nodeDetails
      parameters:
        - $ref: '#/components/parameters/node-id'
        - $ref: '#/components/parameters/include'
      responses:
        '200':
          description: Nodes
          content:
            application/json:
              schema:
                type: object
                required:
                  - result
                  - action
                  - data
                properties:
                  result:
                    type: string
                    description: Result of the request
                    enum:
                      - success
                      - error
                  action:
                    type: string
                    description: The id of the action
                    enum:
                      - nodeDetails
                  data:
                    type: object
                    description: Information about the node
                    required:
                      - nodes
                    properties:
                      nodes:
                        type: array
                        items:
                          $ref: '#/components/schemas/node-full'
      tags:
        - Nodes
      x-codeSamples:
        - lang: curl
          source: 'curl --header "X-API-Token: yourToken" https://rudder.example.com/rudder/api/latest/nodes/17dadf50-6056-4c8b-a935-6b97d14b89a7\?include=full'
    post:
      summary: Update node settings and properties
      description: Update node settings and properties
      operationId: updateNode
      parameters:
        - $ref: '#/components/parameters/node-id'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/node-settings'
      responses:
        '200':
          description: Nodes
          content:
            application/json:
              schema:
                type: object
                required:
                  - result
                  - action
                  - data
                properties:
                  result:
                    type: string
                    description: Result of the request
                    enum:
                      - success
                      - error
                  action:
                    type: string
                    description: The id of the action
                    enum:
                      - updateNode
                  data:
                    type: object
                    description: Information about the node
                    required:
                      - nodes
                    properties:
                      nodes:
                        type: array
                        items:
                          $ref: '#/components/schemas/node-full'
      tags:
        - Nodes
      x-codeSamples:
        - lang: curl
          source: |
            # Given the "data.json" JSON file with content:
            #
            #{
            #  "properties": [
            #    { "name": "env_type"    , "value": "production" },
            #    { "name": "shell"       , "value": "/bin/sh" },
            #    { "name": "utf-8 poetry", "value": "ᚠᛇᚻ᛫ᛒᛦᚦ᛫ᚠᚱᚩᚠᚢᚱ᛫ᚠᛁᚱᚪ᛫ᚷᛖᚻᚹᛦᛚᚳᚢᛗ" }
            #  ]
            #, "policyMode" : "audit"
            #}

            # Setting properties from "data.json" and policy mode to audit:
            curl --header "X-API-Token: yourToken" --request POST --header "Content-Type: application/json" https://rudder.example.com/rudder/api/latest/nodes/17dadf50-6056-4c8b-a935-6b97d14b89a7 --data @properties.json

            # Removing the key "utf-8 poetry" from the command line and updating the "env_type" one
            curl --header "X-API-Token: yourToken" --request POST --header "Content-Type: application/json" https://rudder.example.com/rudder/api/latest/nodes/17dadf50-6056-4c8b-a935-6b97d14b89a7 --data '{ "properties": [{ "name":"utf-8 poetry", "value":""}, {"name":"env_type", "value":"deprovisioned"}] }'

            # Removing the key "env_type" and changing "shell" and use default policy mode
            curl --header "X-API-Token: yourToken" --request POST https://rudder.example.com/rudder/api/latest/nodes/17dadf50-6056-4c8b-a935-6b97d14b89a7 --data "properties=shell=/bin/false" -d "properties=env_type=" -d "policyMode=default"

            # Reset the key status to accept next inventory with its new key
            curl --header "X-API-Token: yourToken" --request POST -H "Content-Type: application/json" 'https://rudder.example.com/rudder/api/latest/nodes/root' -d '{"agentKey":{"status":"undefined"}}'
    delete:
      summary: Delete a node
      description: Remove a node from the Rudder server. It won't be managed anymore.
      operationId: deleteNode
      parameters:
        - $ref: '#/components/parameters/node-id'
        - $ref: '#/components/parameters/node-delete-mode'
      responses:
        '200':
          description: Nodes
          content:
            application/json:
              schema:
                type: object
                required:
                  - result
                  - action
                  - data
                properties:
                  result:
                    type: string
                    description: Result of the request
                    enum:
                      - success
                      - error
                  action:
                    type: string
                    description: The id of the action
                    enum:
                      - deleteNode
                  data:
                    type: object
                    description: Information about the node
                    required:
                      - nodes
                    properties:
                      nodes:
                        type: array
                        items:
                          $ref: '#/components/schemas/node-full'
      tags:
        - Nodes
      x-codeSamples:
        - lang: curl
          source: |
            curl --header "X-API-Token: yourToken" --request DELETE https://rudder.example.com/rudder/api/latest/nodes/17dadf50-6056-4c8b-a935-6b97d14b89a7
  /nodes/{nodeId}/applyPolicy:
    post:
      summary: Trigger an agent run
      description: This API allows to trigger an agent run on the target node. Response is a stream of the actual agent run on the node.
      operationId: applyPolicy
      parameters:
        - $ref: '#/components/parameters/node-id'
      requestBody:
        description: Optional description in *Markdown*
        required: false
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/apply-policy-trigger-inventory'
      responses:
        '200':
          $ref: '#/components/responses/agent-output'
      tags:
        - Nodes
      x-codeSamples:
        - lang: curl
          source: 'curl --header "X-API-Token: yourToken" --request POST https://rudder.example.com/rudder/api/latest/nodes/root/applyPolicy'
        - lang: curl
          source: 'curl --header "X-API-Token: yourToken" --request POST --header "Content-Type: application/json"  https://rudder.example.com/rudder/api/latest/nodes/root/applyPolicy --data ''{"classes":["force_inventory"]}'''
  /nodes/{nodeId}/fetchData:
    post:
      summary: Update properties for one node from all data sources
      description: Update properties from all data sources on one nodes. The call is asynchronous.
      operationId: ReloadAllDatasourcesOneNode
      parameters:
        - $ref: '#/components/parameters/node-id'
      responses:
        '200':
          description: Data sources reloaded
          content:
            application/json:
              schema:
                type: object
                required:
                  - result
                  - action
                  - data
                properties:
                  result:
                    type: string
                    description: Result of the request
                    enum:
                      - success
                      - error
                  action:
                    type: string
                    description: The id of the action
                    enum:
                      - ReloadAllDatasourcesOneNode
                  data:
                    type: string
                    example: Data for node '4e3336f9-ace8-44d6-8d07-496ff1631b01', for all configured data sources, is going to be updated
      tags:
        - 🧩 Data sources
      x-codeSamples:
        - lang: curl
          source: 'curl --header "X-API-Token: yourToken" --request POST https://rudder.example.com/rudder/api/latest/nodes/17dadf50-6056-4c8b-a935-6b97d14b89a7/fetchData'
  /nodes/{nodeId}/fetchData/{datasourceId}:
    post:
      summary: Update properties for one node from a data source
      description: Update properties from a data source on one nodes. The call is asynchronous.
      operationId: ReloadOneDatasourceOneNode
      parameters:
        - $ref: '#/components/parameters/node-id'
        - $ref: '#/components/parameters/datasource-id'
      responses:
        '200':
          description: Data sources reloaded
          content:
            application/json:
              schema:
                type: object
                required:
                  - result
                  - action
                  - data
                properties:
                  result:
                    type: string
                    description: Result of the request
                    enum:
                      - success
                      - error
                  action:
                    type: string
                    description: The id of the action
                    enum:
                      - ReloadOneDatasourceOneNode
                  data:
                    type: string
                    example: Data for node '4e3336f9-ace8-44d6-8d07-496ff1631b01', for ' test-data-source' data source, is going to be updated
      tags:
        - 🧩 Data sources
      x-codeSamples:
        - lang: curl
          source: 'curl --header "X-API-Token: yourToken" --request POST https://rudder.example.com/rudder/api/latest/nodes/nodeId/fetchData/datasourceId'
  /nodes/{nodeId}/inheritedProperties:
    get:
      summary: Get inherited node properties for a node
      description: This API returns all node properties for a node, including group inherited ones.
      operationId: nodeInheritedProperties
      parameters:
        - $ref: '#/components/parameters/node-id'
      responses:
        '200':
          description: Node
          content:
            application/json:
              schema:
                type: object
                required:
                  - result
                  - action
                  - data
                properties:
                  result:
                    type: string
                    description: Result of the request
                    enum:
                      - success
                      - error
                  action:
                    type: string
                    description: The id of the action
                    enum:
                      - nodeInheritedProperties
                  data:
                    type: array
                    description: Information about the node inherited properties
                    items:
                      $ref: '#/components/schemas/node-inherited-properties'
      tags:
        - Nodes
      x-codeSamples:
        - lang: curl
          source: 'curl --header "X-API-Token: yourToken" https://rudder.example.com/rudder/api/latest/nodes/17dadf50-6056-4c8b-a935-6b97d14b89a7/inheritedProperties'
  /openscap/report/{nodeId}:
    get:
      summary: Get an OpenSCAP report
      description: Get latest OpenSCAP report for the given node
      operationId: openscapReport
      parameters:
        - $ref: '#/components/parameters/node-id'
      responses:
        '200':
          description: Promote response
          content:
            text/html:
              schema:
                type: string
                format: HTML
      tags:
        - 🧩 OpenSCAP
      x-codeSamples:
        - lang: curl
          source: |
            curl --header "X-API-Token: yourToken" 'https://rudder.example.com/rudder/api/latest/openscap/report/17dadf50-6056-4c8b-a935-6b97d14b89a7'
  /parameters:
    get:
      summary: List all global properties
      description: Get the current value of all the global properties (a.k.a. global parameters)
      operationId: listParameters
      responses:
        '200':
          description: Settings
          content:
            application/json:
              schema:
                type: object
                required:
                  - result
                  - action
                  - data
                properties:
                  result:
                    type: string
                    description: Result of the request
                    enum:
                      - success
                      - error
                  action:
                    type: string
                    description: The id of the action
                    enum:
                      - listParameters
                  data:
                    type: object
                    description: Parameters
                    required:
                      - parameters
                    properties:
                      parameters:
                        type: array
                        items:
                          $ref: '#/components/schemas/parameter'
      tags:
        - Parameters
      x-codeSamples:
        - lang: curl
          source: 'curl --header "X-API-Token: yourToken" https://rudder.example.com/rudder/api/latest/parameters'
    put:
      summary: Create a new property
      description: Create a new global property
      operationId: createParameter
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/parameter'
      responses:
        '200':
          description: Settings
          content:
            application/json:
              schema:
                type: object
                required:
                  - result
                  - action
                  - data
                  - id
                properties:
                  id:
                    type: string
                    description: Id of the property
                    example: rudder_file_edit_footer
                  result:
                    type: string
                    description: Result of the request
                    enum:
                      - success
                      - error
                  action:
                    type: string
                    description: The id of the action
                    enum:
                      - createParameter
                  data:
                    type: object
                    description: Parameters
                    required:
                      - parameters
                    properties:
                      parameters:
                        type: array
                        items:
                          $ref: '#/components/schemas/parameter'
      tags:
        - Parameters
      x-codeSamples:
        - lang: curl
          source: 'curl --header "X-API-Token: yourToken" --header "Content-Type: application/json" --request PUT https://rudder.example.com/rudder/api/latest/parameters --data @JSON-file-name'
  /parameters/{parameterId}:
    get:
      summary: Get the value of a global property
      description: Get the current value of a given global property (a.k.a. global parameter)
      operationId: parameterDetails
      parameters:
        - $ref: '#/components/parameters/parameter-id'
      responses:
        '200':
          description: Settings
          content:
            application/json:
              schema:
                type: object
                required:
                  - result
                  - action
                  - data
                  - id
                properties:
                  id:
                    type: string
                    description: Id of the property
                    example: rudder_file_edit_footer
                  result:
                    type: string
                    description: Result of the request
                    enum:
                      - success
                      - error
                  action:
                    type: string
                    description: The id of the action
                    enum:
                      - parameterDetails
                  data:
                    type: object
                    description: Parameters
                    required:
                      - parameters
                    properties:
                      parameters:
                        type: array
                        items:
                          $ref: '#/components/schemas/parameter'
      tags:
        - Parameters
      x-codeSamples:
        - lang: curl
          source: 'curl --header "X-API-Token: yourToken" https://rudder.example.com/rudder/api/latest/parameters/ParameterId'
    post:
      summary: Update a global property's value
      description: Update the details of a global property
      operationId: updateParameter
      parameters:
        - $ref: '#/components/parameters/parameter-id'
      responses:
        '200':
          description: Settings
          content:
            application/json:
              schema:
                type: object
                required:
                  - result
                  - action
                  - data
                  - id
                properties:
                  id:
                    type: string
                    description: Id of the global property
                    example: rudder_file_edit_footer
                  result:
                    type: string
                    description: Result of the request
                    enum:
                      - success
                      - error
                  action:
                    type: string
                    description: The id of the action
                    enum:
                      - updateParameter
                  data:
                    type: object
                    description: Parameters
                    required:
                      - parameters
                    properties:
                      parameters:
                        type: array
                        items:
                          $ref: '#/components/schemas/parameter'
      tags:
        - Parameters
      x-codeSamples:
        - lang: curl
          source: 'curl --header "X-API-Token: yourToken" --request POST https://rudder.example.com/rudder/api/latest/parameters/ParameterId --data "value=### Edited by Rudder ###"'
    delete:
      summary: Delete a global parameter
      description: Delete an existing global parameter
      operationId: deleteParameter
      parameters:
        - $ref: '#/components/parameters/parameter-id'
      responses:
        '200':
          description: Settings
          content:
            application/json:
              schema:
                type: object
                required:
                  - result
                  - action
                  - data
                  - id
                properties:
                  id:
                    type: string
                    description: Id of the global property
                    example: rudder_file_edit_footer
                  result:
                    type: string
                    description: Result of the request
                    enum:
                      - success
                      - error
                  action:
                    type: string
                    description: The id of the action
                    enum:
                      - deleteParameter
                  data:
                    type: object
                    description: Parameters
                    required:
                      - parameters
                    properties:
                      parameters:
                        type: array
                        items:
                          $ref: '#/components/schemas/parameter'
        '500':
          description: Non existing global property
          content:
            application/json:
              schema:
                type: object
                required:
                  - result
                  - action
                  - id
                properties:
                  id:
                    type: string
                    description: Id of the global property
                    example: rudder_file_edit_footer
                  result:
                    type: string
                    description: Result of the request
                    enum:
                      - error
                  action:
                    type: string
                    description: The id of the action
                    enum:
                      - deleteParameter
                  errorDetails:
                    type: string
                    example: 'Could not delete Parameter rudder_file_edit_footer cause is: Could not find Parameter rudder_file_edit_footer.'
      tags:
        - Parameters
      x-codeSamples:
        - lang: curl
          source: 'curl --header "X-API-Token: yourToken" --request DELETE https://rudder.example.com/rudder/api/latest/parameters/ParameterId'
  /plugins/info:
    get:
      summary: Information about installed plugins
      description: Get the list of plugin details and their licenses information
      operationId: getPluginsInfo
      responses:
        '200':
          description: Settings
          content:
            application/json:
              schema:
                type: object
                required:
                  - result
                  - action
                  - data
                properties:
                  result:
                    type: string
                    description: Result of the request
                    enum:
                      - success
                      - error
                  action:
                    type: string
                    description: The id of the action
                    enum:
                      - getPluginsInfo
                  data:
                    type: object
                    description: Plugins info
                    required:
                      - plugins
                    properties:
                      plugins:
                        type: array
                        items:
                          $ref: '#/components/schemas/plugins-info'
      tags:
        - Plugins
      x-codeSamples:
        - lang: curl
          source: |
            curl --header "X-API-Token: yourToken" https://rudder.example.com/rudder/api/latest/plugins/info
  /plugins/settings:
    get:
      summary: Get plugins repository settings
      description: Get plugins url and proxy settings
      operationId: pluginSettings
      responses:
        '200':
          description: Settings
          content:
            application/json:
              schema:
                type: object
                required:
                  - result
                  - action
                  - data
                properties:
                  result:
                    type: string
                    description: Result of the request
                    enum:
                      - success
                      - error
                  action:
                    type: string
                    description: The id of the action
                    enum:
                      - pluginSettings
                  data:
                    type: object
                    description: Settings
                    required:
                      - plugins
                    properties:
                      plugins:
                        type: array
                        items:
                          $ref: '#/components/schemas/plugins-settings'
      tags:
        - Plugins
      x-codeSamples:
        - lang: curl
          source: |
            curl --header "X-API-Token: yourToken" https://rudder.example.com/rudder/api/latest/plugins/settings
    post:
      summary: Update plugins settings
      description: Update plugins repository URL and proxy
      operationId: updateSettings
      responses:
        '200':
          description: Settings
          content:
            application/json:
              schema:
                type: object
                required:
                  - result
                  - action
                  - data
                properties:
                  result:
                    type: string
                    description: Result of the request
                    enum:
                      - success
                      - error
                  action:
                    type: string
                    description: The id of the action
                    enum:
                      - updateSettings
                  data:
                    type: object
                    description: Parameters
                    $ref: '#/components/schemas/plugins-settings'
      tags:
        - Plugins
      x-codeSamples:
        - lang: curl
          source: |
            # settings.json:
            #
            #{
            #  "username": "my-account-login",
            #  "password": "xxxxxxxxx",
            #  "url": "https://download.rudder.io/plugins",
            #  "proxyUrl": ""
            #  "proxyUser": ""
            #  "proxyPassword": ""
            #}
            curl --header "X-API-Token: yourToken" --request POST https://rudder.example.com/rudder/api/latest/plugins/settings --header "Content-type: application/json" --data @dsettings.json
  /rules:
    get:
      summary: List all rules
      description: List all rules
      operationId: listRules
      responses:
        '200':
          description: Rules information
          content:
            application/json:
              schema:
                type: object
                required:
                  - result
                  - action
                  - data
                properties:
                  result:
                    type: string
                    description: Result of the request
                    enum:
                      - success
                      - error
                  action:
                    type: string
                    description: The id of the action
                    enum:
                      - listRules
                  data:
                    type: object
                    required:
                      - rules
                    properties:
                      rules:
                        type: array
                        items:
                          $ref: '#/components/schemas/rule'
      tags:
        - Rules
      x-codeSamples:
        - lang: curl
          source: |
            curl --header "X-API-Token: yourToken" --request GET 'https://rudder.example.com/rudder/api/latest/rules'

            # To get information about the target (included/excluded) groups of the rules
            curl -H "X-API-Token: yourToken" -X GET 'https://rudder.example.com/rudder/api/latest/rules' | jq '.data.rules[] | {"d": .displayName, "id":.id, "inc": .targets[].include?.or, "exc":.targets[].exclude?.or}'
    put:
      summary: Create a rule
      description: Create a new rule. You can specify a source rule to clone it.
      operationId: createRule
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/rule-new'
      responses:
        '200':
          description: Rules information
          content:
            application/json:
              schema:
                type: object
                required:
                  - result
                  - action
                  - data
                properties:
                  result:
                    type: string
                    description: Result of the request
                    enum:
                      - success
                      - error
                  action:
                    type: string
                    description: The id of the action
                    enum:
                      - createRule
                  data:
                    type: object
                    required:
                      - rules
                    properties:
                      rules:
                        type: array
                        items:
                          $ref: '#/components/schemas/rule'
      tags:
        - Rules
      x-codeSamples:
        - lang: curl
          source: 'curl --header "X-API-Token: yourToken" --request PUT ''https://rudder.example.com/rudder/api/latest/rules'' --data "displayName=Name of New Rule"'
  /rules/categories:
    put:
      summary: Create a rule category
      description: Create a new rule category
      operationId: CreateRuleCategory
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/rule-category'
      responses:
        '200':
          description: Rules category information
          content:
            application/json:
              schema:
                type: object
                required:
                  - result
                  - action
                  - data
                properties:
                  result:
                    type: string
                    description: Result of the request
                    enum:
                      - success
                      - error
                  action:
                    type: string
                    description: The id of the action
                    enum:
                      - CreateRuleCategory
                  data:
                    type: object
                    required:
                      - ruleCategories
                    properties:
                      ruleCategories:
                        type: array
                        items:
                          $ref: '#/components/schemas/rule-category'
      tags:
        - Rules
      x-codeSamples:
        - lang: curl
          source: |
            curl --header "X-API-Token: yourToken" --request PUT 'https://rudder.example.com/rudder/api/latest/rules/categories' --data "name=new category" -d "parent=4306143d-eabf-4478-b7b1-1616f4aa02b5" -d "description=A new category created via API"
  /rules/categories/{ruleCategoryId}:
    get:
      summary: Get rule category details
      description: Get detailed information about a rule category
      operationId: GetRuleCategoryDetails
      parameters:
        - $ref: '#/components/parameters/rule-category-id'
      responses:
        '200':
          description: Rules category information
          content:
            application/json:
              schema:
                type: object
                required:
                  - result
                  - action
                  - data
                properties:
                  result:
                    type: string
                    description: Result of the request
                    enum:
                      - success
                      - error
                  action:
                    type: string
                    description: The id of the action
                    enum:
                      - GetRuleCategoryDetails
                  data:
                    type: object
                    required:
                      - rulesCategories
                    properties:
                      rulesCategories:
                        type: array
                        items:
                          $ref: '#/components/schemas/rule-category'
      tags:
        - Rules
      x-codeSamples:
        - lang: curl
          source: 'curl --header "X-API-Token: yourToken" --request GET ''https://rudder.example.com/rudder/api/latest/rules/categories/4306143d-eabf-4478-b7b1-1616f4aa02b5?prettify=true'''
    delete:
      summary: Delete group category
      description: Delete a group category. It must have no child groups and no children categories.
      operationId: DeleteRuleCategory
      parameters:
        - $ref: '#/components/parameters/rule-category-id'
      responses:
        '200':
          description: Groups category information
          content:
            application/json:
              schema:
                type: object
                required:
                  - result
                  - action
                  - data
                properties:
                  result:
                    type: string
                    description: Result of the request
                    enum:
                      - success
                      - error
                  action:
                    type: string
                    description: The id of the action
                    enum:
                      - DeleteRuleCategory
                  data:
                    type: object
                    required:
                      - groupCategories
                    properties:
                      groupCategories:
                        type: array
                        items:
                          $ref: '#/components/schemas/rule-category'
      tags:
        - Rules
      x-codeSamples:
        - lang: curl
          source: 'curl --header "X-API-Token: yourToken" --request DELETE ''https://rudder.example.com/rudder/api/latest/rules/categories/4306143d-eabf-4478-b7b1-1616f4aa02b5?prettify=true'''
    post:
      summary: Update rule category details
      description: Update detailed information about a rule category
      operationId: UpdateRuleCategory
      parameters:
        - $ref: '#/components/parameters/rule-category-id'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/rule-category-update'
      responses:
        '200':
          description: Rules category information
          content:
            application/json:
              schema:
                type: object
                required:
                  - result
                  - action
                  - data
                properties:
                  result:
                    type: string
                    description: Result of the request
                    enum:
                      - success
                      - error
                  action:
                    type: string
                    description: The id of the action
                    enum:
                      - UpdateRuleCategory
                  data:
                    type: object
                    required:
                      - ruleCategories
                    properties:
                      ruleCategories:
                        type: array
                        items:
                          $ref: '#/components/schemas/rule-category'
      tags:
        - Rules
      x-codeSamples:
        - lang: curl
          source: 'curl --header "X-API-Token: yourToken" --request POST ''https://rudder.example.com/rudder/api/latest/rules/categories/4306143d-eabf-4478-b7b1-1616f4aa02b5?prettify=true'' --data "name=new category name"'
  /rules/tree:
    get:
      summary: Get rules tree
      description: Get all available rules and their categories in a tree
      operationId: GetRuleTree
      responses:
        '200':
          description: Rules information
          content:
            application/json:
              schema:
                type: object
                required:
                  - result
                  - action
                  - data
                properties:
                  result:
                    type: string
                    description: Result of the request
                    enum:
                      - success
                      - error
                  action:
                    type: string
                    description: The id of the action
                    enum:
                      - GetRuleTree
                  data:
                    type: object
                    required:
                      - ruleCategories
                    properties:
                      ruleCategories:
                        type: object
                        description: Rule tree
                    example:
                      ruleCategories:
                        id: rootRuleCategory
                        name: Rules
                        description: This is the main category of Rules
                        parent: rootRuleCategory
                        categories:
                          - id: 4306143d-eabf-4478-b7b1-1616f4aa02b5
                            name: Dev category
                            description: ''
                            parent: rootRuleCategory
                            categories:
                              - id: f45ec2fd-69f4-4669-9c22-1af3abe2a107
                                name: Specific dev category
                                description: ''
                                parent: 4306143d-eabf-4478-b7b1-1616f4aa02b5
                                categories: []
                                rules:
                                  - id: b7fda4e7-3616-4e99-89b0-8ffadaf6b0f0
                                    displayName: my specific Rule
                                    shortDescription: ''
                                    longDescription: ''
                                    directives: []
                                    targets: []
                                    enabled: true
                                    system: false
                            rules:
                              - id: f2aa50a9-961c-4cce-a266-380cffcdce32
                                displayName: dev Rule
                                shortDescription: ''
                                longDescription: ''
                                directives: []
                                targets: []
                                enabled: true
                                system: false
                        rules:
                          - id: 43cde273-5bb0-466f-8850-7d3fdde03253
                            displayName: Global security policy
                            shortDescription: ''
                            longDescription: ''
                            directives: []
                            targets: []
                            enabled: true
                            system: false
                          - id: 32377fd7-02fd-43d0-aab7-28460a91347b
                            displayName: Global configuration for all nodes
                            shortDescription: ''
                            longDescription: This Rule was created automatically when Rudder was installed. It can be used to target Directives to all nodes (including the Rudder root server itself), or deleted if you would rather create your own set of Rules (it will never be created again).
                            directives:
                              - bff45fe2-8233-4d28-96aa-78b0390b548b
                            targets:
                              - include:
                                  or:
                                    - special:all
                                    - special:all_exceptPolicyServers
                                    - special:all_policyServers
                                exclude:
                                  or: []
                            enabled: false
                            system: false
      tags:
        - Rules
      x-codeSamples:
        - lang: curl
          source: 'curl --header "X-API-Token: yourToken" --request GET ''https://rudder.example.com/rudder/api/latest/rules/tree?prettify=true'''
  /rules/{ruleId}:
    get:
      summary: Get a rule details
      description: Get the details of a rule
      operationId: ruleDetails
      parameters:
        - $ref: '#/components/parameters/rule-id'
      responses:
        '200':
          description: Rules information
          content:
            application/json:
              schema:
                type: object
                required:
                  - result
                  - action
                  - data
                properties:
                  result:
                    type: string
                    description: Result of the request
                    enum:
                      - success
                      - error
                  action:
                    type: string
                    description: The id of the action
                    enum:
                      - ruleDetails
                  data:
                    type: object
                    required:
                      - rules
                    properties:
                      rules:
                        type: array
                        items:
                          $ref: '#/components/schemas/rule'
      tags:
        - Rules
      x-codeSamples:
        - lang: curl
          source: 'curl --header "X-API-Token: yourToken" --request GET ''https://rudder.example.com/rudder/api/latest/rules/06ba8940-ed6c-4102-ba46-93d640a64c36'''
    post:
      summary: Update a rule details
      description: Update the details of a rule
      operationId: updateRule
      parameters:
        - $ref: '#/components/parameters/rule-id'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/rule-with-category'
      responses:
        '200':
          description: Rules information
          content:
            application/json:
              schema:
                type: object
                required:
                  - result
                  - action
                  - data
                properties:
                  result:
                    type: string
                    description: Result of the request
                    enum:
                      - success
                      - error
                  action:
                    type: string
                    description: The id of the action
                    enum:
                      - updateRule
                  data:
                    type: object
                    required:
                      - rules
                    properties:
                      rules:
                        type: array
                        items:
                          $ref: '#/components/schemas/rule-with-category'
      tags:
        - Rules
      x-codeSamples:
        - lang: curl
          source: 'curl --header "X-API-Token: yourToken" --request POST ''https://rudder.example.com/rudder/api/latest/rules/17dadf50-6056-4c8b-a935-6b97d14b89a7'' --data "displayName=Name of rule"'
    delete:
      summary: Delete a rule
      description: Delete a rule.
      operationId: deleteRule
      parameters:
        - $ref: '#/components/parameters/rule-id'
      responses:
        '200':
          description: Rules information
          content:
            application/json:
              schema:
                type: object
                required:
                  - result
                  - action
                  - data
                properties:
                  result:
                    type: string
                    description: Result of the request
                    enum:
                      - success
                      - error
                  action:
                    type: string
                    description: The id of the action
                    enum:
                      - deleteRule
                  data:
                    type: object
                    required:
                      - rules
                    properties:
                      rules:
                        type: array
                        items:
                          $ref: '#/components/schemas/rule'
      tags:
        - Rules
      x-codeSamples:
        - lang: curl
          source: 'curl --header "X-API-Token: yourToken" --request DELETE ''https://rudder.example.com/rudder/api/latest/rules/176ad06b-ed02-4da3-8053-16225d217741'''
  /scaleoutrelay/demote/{nodeId}:
    post:
      summary: Demote a relay to simple node
      description: Demote a relay to a simple node.
      operationId: demoteToNode
      parameters:
        - $ref: '#/components/parameters/node-id'
      responses:
        '200':
          description: Demote to node response
          content:
            application/json:
              schema:
                type: object
                required:
                  - action
                  - result
                  - data
                properties:
                  action:
                    type: string
                    description: The id of the action
                    enum:
                      - demoteToNode
                  result:
                    type: string
                    description: Result of the request
                    enum:
                      - success
                      - error
                  data:
                    type: string
                    description: Success or error message
                    example: 17dadf50-6056-4c8b-a935-6b97d14b89a7
      tags:
        - 🧩 Scale out Relay
      x-codeSamples:
        - lang: curl
          source: |
            curl --header "X-API-Token: yourToken" --request POST --header "Content-Type: application/json" 'https://rudder.example.com/rudder/api/latest/scaleoutrelay/promote/17dadf50-6056-4c8b-a935-6b97d14b89a7?prettify=true'
  /scaleoutrelay/promote/{nodeId}:
    post:
      summary: Promote a node to relay
      description: Promote a node to relay
      operationId: promoteToRelay
      parameters:
        - $ref: '#/components/parameters/node-id'
      responses:
        '200':
          description: Promote response
          content:
            application/json:
              schema:
                type: object
                required:
                  - action
                  - result
                  - data
                properties:
                  action:
                    type: string
                    description: The id of the action
                    enum:
                      - promoteToRelay
                  result:
                    type: string
                    description: Result of the request
                    enum:
                      - success
                      - error
                  data:
                    type: string
                    description: Success or error message
                    example: 17dadf50-6056-4c8b-a935-6b97d14b89a7
      tags:
        - 🧩 Scale out Relay
      x-codeSamples:
        - lang: curl
          source: |
            curl --header "X-API-Token: yourToken" --request POST --header "Content-Type: application/json" 'https://rudder.example.com/rudder/api/latest/scaleoutrelay/promote/17dadf50-6056-4c8b-a935-6b97d14b89a7?prettify=true'
  /secret:
    get:
      summary: List all secrets
      description: Get the list of all secrets without their value
      operationId: getAllSecrets
      responses:
        '200':
          description: Secrets information
          content:
            application/json:
              schema:
                type: object
                required:
                  - result
                  - action
                  - data
                properties:
                  result:
                    type: string
                    description: Result of the request
                    enum:
                      - success
                      - error
                  action:
                    type: string
                    description: The id of the action
                    enum:
                      - getAllSecrets
                  data:
                    type: object
                    required:
                      - secrets
                    properties:
                      secrets:
                        type: array
                        description: List of API version and status
                        items:
                          type: object
                          required:
                            - name
                            - description
                          properties:
                            name:
                              type: string
                              description: The name of the secret used as a reference on the value
                              example: secret-password
                            description:
                              type: string
                              description: The description of the secret to identify it more easily
                              example: Password of my super secret user account
      tags:
        - 🧩 Secret management
      x-codeSamples:
        - lang: curl
          source: 'curl --header "X-API-Token: yourToken" --request GET ''https://rudder.example.com/rudder/api/latest/secret'''
    post:
      summary: Update a secret
      description: Update a secret and override the value, the name cannot be overridden
      operationId: updateSecret
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/secrets'
      responses:
        '200':
          description: Secrets information
          content:
            application/json:
              schema:
                type: object
                required:
                  - result
                  - action
                  - data
                properties:
                  result:
                    type: string
                    description: Result of the request
                    enum:
                      - success
                      - error
                  action:
                    type: string
                    description: The id of the action
                    enum:
                      - updateSecret
                  data:
                    type: object
                    required:
                      - secrets
                    properties:
                      secrets:
                        type: array
                        description: List of API version and status
                        items:
                          type: object
                          required:
                            - name
                            - description
                          properties:
                            name:
                              type: string
                              description: The name of the secret used as a reference on the value
                              example: secret-password
                            description:
                              type: string
                              description: The description of the secret to identify it more easily
                              example: Password of my super secret user account
      tags:
        - 🧩 Secret management
      x-codeSamples:
        - lang: curl
          source: "add.json:\n\n{\n\t\"name\" : \"secret-password\",\n\t\"description\" : \"Password of my super secret user account\",\n\t\"value\" : \"nj-k;EO32!kFWewn2Nk,u\",\n}\n\ncurl --header \"X-API-Token: yourToken\" --request POST https://rudder.example.com/rudder/api/latest/secret --header \"Content-type: application/json\" --data @add.json\n\n"
    put:
      summary: Create a secret
      description: Add a secret
      operationId: addSecret
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/secrets'
      responses:
        '200':
          description: Secrets information
          content:
            application/json:
              schema:
                type: object
                required:
                  - result
                  - action
                  - data
                properties:
                  result:
                    type: string
                    description: Result of the request
                    enum:
                      - success
                      - error
                  action:
                    type: string
                    description: The id of the action
                    enum:
                      - addSecret
                  data:
                    type: object
                    required:
                      - secrets
                    properties:
                      secrets:
                        type: array
                        description: List of API version and status
                        items:
                          type: object
                          required:
                            - name
                            - description
                          properties:
                            name:
                              type: string
                              description: The name of the secret used as a reference on the value
                              example: secret-password
                            description:
                              type: string
                              description: The description of the secret to identify it more easily
                              example: Password of my super secret user account
      tags:
        - 🧩 Secret management
      x-codeSamples:
        - lang: curl
          source: "add.json:\n\n{\n\t\"name\" : \"secret-password\",\n\t\"description\" : \"Password of my super secret user account\",\n\t\"value\" : \"nj-k;EO32!kFWewn2Nk,u\",\n}\n\ncurl --header \"X-API-Token: yourToken\" --request POST https://rudder.example.com/rudder/api/latest/secret --header \"Content-type: application/json\" --data @add.json\n\n"
  /secret/{name}:
    get:
      summary: Get one secret
      description: Get one secret by its unique name
      operationId: getSecret
      parameters:
        - $ref: '#/components/parameters/secret-name'
      responses:
        '200':
          description: Secret information
          content:
            application/json:
              schema:
                type: object
                required:
                  - result
                  - action
                  - data
                properties:
                  result:
                    type: string
                    description: Result of the request
                    enum:
                      - success
                      - error
                  action:
                    type: string
                    description: The id of the action
                    enum:
                      - getSecret
                  data:
                    type: object
                    required:
                      - secrets
                    properties:
                      secrets:
                        type: array
                        description: List of API version and status
                        items:
                          type: object
                          required:
                            - name
                            - description
                          properties:
                            name:
                              type: string
                              description: The name of the secret used as a reference on the value
                              example: secret-password
                            description:
                              type: string
                              description: The description of the secret to identify it more easily
                              example: Password of my super secret user account
      tags:
        - 🧩 Secret management
      x-codeSamples:
        - lang: curl
          source: 'curl --header "X-API-Token: yourToken" --request GET ''https://rudder.example.com/rudder/api/latest/secret-password'''
    delete:
      summary: Delete a secret
      description: Remove the secret by its unique name
      operationId: deleteSecret
      parameters:
        - $ref: '#/components/parameters/secret-name'
      responses:
        '200':
          description: Secret information
          content:
            application/json:
              schema:
                type: object
                required:
                  - result
                  - action
                  - data
                properties:
                  result:
                    type: string
                    description: Result of the request
                    enum:
                      - success
                      - error
                  action:
                    type: string
                    description: The id of the action
                    enum:
                      - deleteSecret
                  data:
                    type: object
                    required:
                      - secrets
                    properties:
                      secrets:
                        type: array
                        description: List of API version and status
                        items:
                          type: object
                          required:
                            - name
                            - description
                          properties:
                            name:
                              type: string
                              description: The name of the secret used as a reference on the value
                              example: secret-password
                            description:
                              type: string
                              description: The description of the secret to identify it more easily
                              example: Password of my super secret user account
      tags:
        - 🧩 Secret management
      x-codeSamples:
        - lang: curl
          source: 'curl --header "X-API-Token: yourToken" --request DELETE ''https://rudder.example.com/rudder/api/latest/secret/secret-password'''
  /securitytags/nodes:
    post:
      summary: Define a tenant on nodes
      description: Set given tenant to the list of nodes. You can give several (tenantId, nodes) in one go.
      operationId: setNodeSecurityTags
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: array
              items:
                type: object
                required:
                  - tenantId
                  - nodeIds
                properties:
                  tenantId:
                    type: string
                    description: the ID of the tenant to set on nodes
                  nodeIds:
                    type: array
                    items:
                      type: string
                      description: a node ID on which the tenant must be defined
      responses:
        '200':
          description: The list of nodes on which the tenant was changed (unchanged nodes are not included)
          content:
            application/json:
              schema:
                type: object
                required:
                  - result
                  - action
                  - data
                properties:
                  result:
                    type: string
                    description: Result of the request
                    enum:
                      - success
                      - error
                  action:
                    type: string
                    description: The id of the action
                    enum:
                      - setNodeSecurityTag
                  data:
                    type: object
                    required:
                      - securitytags
                    properties:
                      securitytags:
                        type: array
                        items:
                          type: object
                          required:
                            - tenantId
                            - nodeIds
                          properties:
                            tenantId:
                              type: string
                              description: the ID of the tenant set on nodes
                            nodeIds:
                              type: array
                              items:
                                type: string
                                description: a node ID on which the tenant was changed and set to input value
      tags:
        - 🧩 Multi-tenants
      x-codeSamples:
        - lang: curl
          source: |
            curl --header "X-API-Token: yourToken" --request POST --header "Content-Type: application/json" 'https://rudder.example.com/rudder/api/latest/securitytags/nodes' --data '[{"tenantId":"zone1","nodeIds":["node1","node2"]},{"tenantId":"zone2", "nodeIds":["node3"]}]'
    delete:
      summary: Remove tenant value on nodes
      description: Remove defined tenant on the list of nodes. Nodes without a tenant are not changed.
      operationId: deleteNodeSecurityTag
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: array
              items:
                type: string
                description: a node ID on which the tenant must be removed
      responses:
        '200':
          description: The list of tenants
          content:
            application/json:
              schema:
                type: object
                required:
                  - result
                  - action
                  - data
                properties:
                  result:
                    type: string
                    description: Result of the request
                    enum:
                      - success
                      - error
                  action:
                    type: string
                    description: The id of the action
                    enum:
                      - deleteNodeSecurityTag
                  data:
                    type: object
                    required:
                      - nodes
                    properties:
                      nodes:
                        type: array
                        items:
                          type: string
                          description: a node ID on which the tenant was removed
      tags:
        - 🧩 Multi-tenants
      x-codeSamples:
        - lang: curl
          source: |
            curl --header "X-API-Token: yourToken" --request DELETE --header "Content-Type: application/json" 'https://rudder.example.com/rudder/api/latest/securitytags/nodes' --data '["node1","node2"]'
  /settings:
    get:
      summary: List all settings
      description: Get the current value of all the settings
      operationId: getAllSettings
      responses:
        '200':
          description: Settings
          content:
            application/json:
              schema:
                type: object
                required:
                  - result
                  - action
                  - data
                properties:
                  result:
                    type: string
                    description: Result of the request
                    enum:
                      - success
                      - error
                  action:
                    type: string
                    description: The id of the action
                    enum:
                      - getAllSettings
                  data:
                    type: object
                    description: Information about the setting
                    required:
                      - settings
                    properties:
                      settings:
                        $ref: '#/components/schemas/settings'
      tags:
        - Settings
      x-codeSamples:
        - lang: curl
          source: 'curl --header "X-API-Token: yourToken" https://rudder.example.com/rudder/api/latest/settings'
  /settings/allowed_networks/{nodeId}:
    get:
      summary: Get allowed networks for a policy server
      description: Get the list of allowed networks for a policy server
      operationId: getAllowedNetworks
      parameters:
        - $ref: '#/components/parameters/setting-allowed-networks'
      responses:
        '200':
          description: Allowed networks
          content:
            application/json:
              schema:
                type: object
                required:
                  - result
                  - action
                  - id
                  - data
                properties:
                  id:
                    type: string
                    description: Target policy server ID
                    example: root
                  result:
                    type: string
                    description: Result of the request
                    enum:
                      - success
                      - error
                  action:
                    type: string
                    description: The id of the action
                    enum:
                      - getAllowedNetworks
                  data:
                    type: object
                    description: Information about the allowed_networks settings
                    required:
                      - allowed_network
                    properties:
                      allowed_network:
                        type: array
                        description: Array of allowed networks
                        items:
                          type: string
                        example:
                          - 162.168.1.0/24
                          - 192.168.2.0/24
      tags:
        - Settings
      x-codeSamples:
        - lang: curl
          source: 'curl --header "X-API-Token: yourToken" https://rudder.example.com/rudder/api/latest/settings/allowed_networks/root'
    post:
      summary: Set allowed networks for a policy server
      description: Set the list of allowed networks for a policy server
      operationId: setAllowedNetworks
      parameters:
        - $ref: '#/components/parameters/setting-allowed-networks'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                value:
                  description: New value of the allowed networks
                  type: array
                  items:
                    type: string
                  example:
                    - 192.168.2.0/24
                    - 192.168.0.0/16
      responses:
        '200':
          description: Allowed Networks
          content:
            application/json:
              schema:
                type: object
                required:
                  - result
                  - action
                  - data
                properties:
                  result:
                    type: string
                    description: Result of the request
                    enum:
                      - success
                      - error
                  action:
                    type: string
                    description: The id of the action
                    enum:
                      - modifyAllowedNetworks
                  id:
                    type: string
                    description: The id of the modified node
                  data:
                    type: object
                    description: Information about the allowed_networks settings
                    required:
                      - settings
                    properties:
                      settings:
                        type: array
                        items:
                          type: string
                        example:
                          - 162.168.1.0/24
                          - 192.168.2.0/24
                        description: Array of allowed networks
      tags:
        - Settings
      x-codeSamples:
        - lang: curl
          source: |
            curl --header "X-API-Token: yourToken" --header  "Content-Type: application/json" --request POST https://rudder.example.com/rudder/api/latest/settings/allowed_networks/root --data '{"allowed_networks": ["192.168.1.0/24", "192.168.2.0/24"]}'
  /settings/allowed_networks/{nodeId}/diff:
    post:
      summary: Modify allowed networks for a policy server
      description: Add or delete allowed networks for a policy server
      operationId: modifyAllowedNetworks
      parameters:
        - $ref: '#/components/parameters/setting-allowed-networks'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                allowed_networks:
                  type: object
                  properties:
                    add:
                      type: array
                      items:
                        type: string
                      description: List of networks to add to existing allowed networks for that server
                      example:
                        - 192.168.2.0/24
                        - 192.168.0.0/16
                    delete:
                      type: array
                      items:
                        type: string
                      description: List of networks to remove from existing allowed networks for that server
                      example:
                        - 162.168.1.0/24
      responses:
        '200':
          description: Allowed Networks
          content:
            application/json:
              schema:
                type: object
                required:
                  - result
                  - action
                  - data
                properties:
                  result:
                    type: string
                    description: Result of the request
                    enum:
                      - success
                      - error
                  action:
                    type: string
                    description: The id of the action
                    enum:
                      - modifyDiffAllowedNetworks
                  data:
                    type: object
                    description: Information about the allowed_networks settings
                    required:
                      - settings
                    properties:
                      settings:
                        type: array
                        items:
                          type: string
                        example:
                          - 192.168.2.0/24
                          - 192.168.0.0/16
                        description: Array of allowed networks
      tags:
        - Settings
      x-codeSamples:
        - lang: curl
          source: |
            curl --header "X-API-Token: yourToken" --request POST https://rudder.example.com/rudder/api/latest/settings/allowed_networks/root/diff --header 'Content-Type: application/json' --data '{"allowed_networks": { "delete": ["192.168.1.0/24"], "add": ["192.168.2.0/24"] } }'
  /settings/{settingId}:
    get:
      summary: Get the value of a setting
      description: Get the current value of a specific setting
      operationId: getSetting
      parameters:
        - $ref: '#/components/parameters/setting-id'
      responses:
        '200':
          description: Settings
          content:
            application/json:
              schema:
                type: object
                required:
                  - result
                  - action
                  - data
                  - id
                properties:
                  id:
                    type: string
                    description: Id of the setting
                    example: global_policy_mode
                  result:
                    type: string
                    description: Result of the request
                    enum:
                      - success
                      - error
                  action:
                    type: string
                    description: The id of the action
                    enum:
                      - getSetting
                  data:
                    type: object
                    description: Information about the setting
                    properties:
                      settingId:
                        type: string
                        example: allowed_networks
                        description: Id and value of the property
      tags:
        - Settings
      x-codeSamples:
        - lang: curl
          source: 'curl --header "X-API-Token: yourToken" https://rudder.example.com/rudder/api/latest/settings/run_frequency'
    post:
      summary: Set the value of a setting
      description: Set the current value of a specific setting
      operationId: modifySetting
      parameters:
        - $ref: '#/components/parameters/setting-id'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                value:
                  description: New value of the setting
                  type: string
                  example: enforce
      responses:
        '200':
          description: Settings
          content:
            application/json:
              schema:
                type: object
                required:
                  - result
                  - action
                  - data
                  - id
                properties:
                  id:
                    type: string
                    description: Id of the setting
                    example: global_policy_mode
                  result:
                    type: string
                    description: Result of the request
                    enum:
                      - success
                      - error
                  action:
                    type: string
                    description: The id of the action
                    enum:
                      - modifySetting
                  data:
                    type: object
                    description: Information about the setting
                    properties:
                      settingId:
                        type: string
                        example: allowed_networks
                        description: Id and value of the property
      tags:
        - Settings
      x-codeSamples:
        - lang: curl
          source: 'curl --header "X-API-Token: yourToken" --request POST https://rudder.example.com/rudder/api/latest/settings/global_policy_mode_overridable --data "value=true"'
  /status:
    get:
      security: []
      summary: Check if Rudder is alive
      description: |-
        An unauthenticated API to check if Rudder web application is up and running. Be careful: this API does not follow other Rudder's API convention: 
        - it is not versioned, so the path is just `/api/status`;
        - it returns a plain text message.
      operationId: none
      responses:
        '200':
          description: OK status message
          content:
            text/plain:
              schema:
                type: string
                example: OK\\n
      tags:
        - Status
      x-codeSamples:
        - lang: curl
          source: curl --request GET https://rudder.example.com/rudder/api/status
  /system/archives/{archiveKind}:
    get:
      summary: List archives
      description: List configuration archives
      operationId: listArchives
      parameters:
        - $ref: '#/components/parameters/archive-kind'
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                required:
                  - result
                  - action
                  - data
                properties:
                  result:
                    type: string
                    description: Result of the request
                    enum:
                      - success
                      - error
                  action:
                    type: string
                    description: The kind of the archive
                    enum:
                      - archiveFull
                      - archiveGroups
                      - archiveRules
                      - archiveDirectives
                      - archiveParameters
                    example: archiveFull
                  data:
                    type: object
                    required:
                      - full
                    properties:
                      full:
                        type: array
                        items:
                          type: object
                          required:
                            - commiter
                            - gitCommit
                            - id
                          properties:
                            commiter:
                              type: string
                              example: Rudder system account
                            gitCommit:
                              type: string
                              format: hash
                              example: 546de1b211ecc5b7ca295abac2191bc6bb05d44e
                            id:
                              type: string
                              example: 2019-09-17_16-06-15.255
      tags:
        - System
      x-codeSamples:
        - lang: curl
          source: 'curl --header "X-API-Token: yourToken" https://rudder.example.com/rudder/api/latest/system/archives/full'
    post:
      summary: Create an archive
      description: Create new archive of the given kind
      operationId: createArchive
      parameters:
        - $ref: '#/components/parameters/archive-kind'
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                required:
                  - result
                  - action
                  - data
                properties:
                  result:
                    type: string
                    description: Result of the request
                    enum:
                      - success
                      - error
                  action:
                    type: string
                    description: The kind of the archive
                    enum:
                      - archiveFull
                      - archiveGroups
                      - archiveRules
                      - archiveDirectives
                      - archiveParameters
                    example: archiveFull
                  data:
                    type: object
                    required:
                      - full
                    properties:
                      full:
                        type: object
                        required:
                          - commiter
                          - gitCommit
                          - id
                        properties:
                          commiter:
                            type: string
                            example: Rudder system account
                          gitCommit:
                            type: string
                            format: hash
                            example: 546de1b211ecc5b7ca295abac2191bc6bb05d44e
                          id:
                            type: string
                            example: 2019-09-17_16-06-15.255
      tags:
        - System
      x-codeSamples:
        - lang: curl
          source: 'curl --header "X-API-Token: yourToken" --request POST https://rudder.example.com/rudder/api/latest/system/archives/full'
  /system/archives/{archiveKind}/restore/{archiveRestoreKind}:
    post:
      summary: Restore an archive
      description: Restore an archive of the given kind for the given moment
      operationId: restoreArchive
      parameters:
        - $ref: '#/components/parameters/archive-kind'
        - name: archiveRestoreKind
          in: path
          required: true
          schema:
            type: string
            enum:
              - latestArchive
              - latestCommit
              - archive ID
            example: latestCommit
            description: What archive to restore (latest archive, latest commit in configuration repository, or archive with ID as given by listArchive)
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                required:
                  - result
                  - action
                  - data
                properties:
                  result:
                    type: string
                    description: Result of the request
                    enum:
                      - success
                      - error
                  action:
                    type: string
                    description: The kind of the archive
                    enum:
                      - restoreFullLatestArchive
                      - restoreGroupLatestArchive
                      - restoreRulesLatestArchive
                      - restoreDirectivesLatestArchive
                      - restoreParametersLatestArchive
                      - restoreFullLatestCommit
                      - restoreGroupLatestCommit
                      - restoreRulesLatestCommit
                      - restoreDirectivesLatestCommit
                      - restoreParametersLatestCommit
                      - archiveFullDateRestore
                      - archiveGroupDateRestore
                      - archiveRulesDateRestore
                      - archiveDirectivesDateRestore
                      - archiveParametersDateRestore
                    example: restoreFullLatestArchive
                  data:
                    type: object
                    properties:
                      full:
                        type: string
                        example: Started
                      groups:
                        type: string
                        example: Started
                      rules:
                        type: string
                        example: Started
                      directive:
                        type: string
                        example: Started
                      parameters:
                        type: string
                        example: Started
      tags:
        - System
      x-codeSamples:
        - lang: curl
          source: 'curl --header "X-API-Token: yourToken" --request POST https://rudder.example.com/rudder/api/latest/system/archives/full/restore/latestCommit'
  /system/archives/{archiveKind}/zip/{commitId}:
    get:
      summary: Get an archive as a ZIP
      description: Get an archive of the given kind as a zip
      operationId: getZipArchive
      parameters:
        - $ref: '#/components/parameters/archive-kind'
        - name: commitId
          in: path
          description: commit ID of the archive to get as a ZIP file
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Success
          content:
            application/octet-stream:
              schema:
                type: string
                format: binary
      tags:
        - System
      x-codeSamples:
        - lang: curl
          source: 'curl --header "X-API-Token: yourToken" --request GET https://rudder.example.com/rudder/api/latest/system/archives/full/zip/cad7d5f0729f06d22878b99869b8d43629e05a78 -o full-archive.zip'
  /system/healthcheck:
    get:
      summary: Get healthcheck
      description: Run and get the result of all checks
      operationId: getHealthcheckResult
      responses:
        '200':
          description: Healthcheck information
          content:
            application/json:
              schema:
                type: object
                required:
                  - result
                  - action
                  - data
                properties:
                  result:
                    type: string
                    description: Result of the request
                    enum:
                      - success
                      - error
                  action:
                    type: string
                    description: The id of the action
                    enum:
                      - getHealthcheckResult
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/check'
      tags:
        - System
      x-codeSamples:
        - lang: curl
          source: 'curl --header "X-API-Token: yourToken" --request GET ''https://rudder.example.com/rudder/api/latest/system/healthcheck?prettify=true'''
  /system/info:
    get:
      summary: Get server information
      description: Get information about the server version
      operationId: getSystemInfo
      responses:
        '200':
          description: Service information
          content:
            application/json:
              schema:
                type: object
                required:
                  - result
                  - action
                  - data
                properties:
                  result:
                    type: string
                    description: Result of the request
                    enum:
                      - success
                      - error
                  action:
                    type: string
                    description: The id of the action
                    enum:
                      - getSystemInfo
                  data:
                    type: object
                    description: Information about the service
                    required:
                      - rudder
                      - system
                      - nodes
                      - plugins
                    properties:
                      rudder:
                        required:
                          - version
                          - buildTime
                          - instanceId
                          - relays
                        properties:
                          version:
                            type: string
                            example: 8.3.4-SNAPSHOT
                            format: X.Y.Z
                          buildTime:
                            type: string
                            example: '2025-09-07T01:31:07Z'
                            format: date-time
                          instanceId:
                            type: string
                            example: 294e04bd-61cd-4b79-ac46-90c68cdb7983
                            format: uuid
                          relays:
                            type: array
                            items:
                              type: object
                              required:
                                - uuid
                                - hostname
                                - managedNodes
                              properties:
                                uuid:
                                  type: string
                                  example: 15b7cbec-f6c3-41e9-81bc-b99ae75c7a5f
                                  format: uuid
                                hostname:
                                  type: string
                                  example: normation.com
                                  format: hostname
                                managedNodes:
                                  type: number
                                  example: 32
                            example:
                              - uuid: d209c14f-318d-4d7f-85b2-61f125dc1803
                                hostname: relay1.example.com
                                managedNodes: 1
                              - uuid: bbec3115-e487-445e-91ab-2abb2676babf
                                hostname: relay2.example.com
                                managedNodes: 2
                      system:
                        required:
                          - os
                          - jvm
                        properties:
                          os:
                            type: object
                            required:
                              - name
                              - version
                            properties:
                              name:
                                type: string
                                example: linux
                                format: text
                              version:
                                type: string
                                example: '12'
                                format: X
                          jvm:
                            type: object
                            required:
                              - version
                              - cmd
                            properties:
                              version:
                                type: string
                                example: 17.0.14+7-Debian-1deb12u1
                                format: text
                              cmd:
                                type: string
                                format: java command with parameters
                                example: |
                                  "/usr/lib/jvm/java-17-openjdk-amd64/bin/java -Djava.io.tmpdir=/tmp -Djetty.home=/opt/rudder/jetty -Djetty.base=/opt/rudder/etc/rudder-jetty-base -server -Xms1024m -Xmx1024m -XX:+UseG1GC -XX:+UseStringDeduplication -XX:+AlwaysPreTouch -Xlog:gc=info,gc+cpu=info,gc+stringdedup=info:file=/var/log/rudder/webapp/jvm/jvm-gc.log:utctime,pid,level,tags:filecount=5,filesize=50M -XX:+CrashOnOutOfMemoryError -Dfile.encoding=UTF-8 -Drun.mode=production -Drudder.configFile=/opt/rudder/etc/rudder-web.properties -Drudder.authFile=/opt/rudder/etc/rudder-users.xml -Dlogback.configurationFile=/opt/rudder/etc/logback.xml..." 
                      nodes:
                        required:
                          - total
                          - audit
                          - enforce
                          - mixed
                          - enabled
                          - disabled
                        properties:
                          total:
                            type: number
                            example: 1
                          audit:
                            type: number
                            example: 0
                          enforce:
                            type: number
                            example: 0
                          mixed:
                            type: number
                            example: 0
                          enabled:
                            type: number
                            example: 1
                          disabled:
                            type: number
                            example: 0
                      plugins:
                        type: array
                        items:
                          type: object
                          required:
                            - id
                            - name
                            - version
                            - abiVersion
                          properties:
                            id:
                              type: string
                            name:
                              type: string
                            version:
                              type: string
                            abiVersion:
                              type: string
                            license:
                              type: object
                              required:
                                - licensee
                                - startDate
                                - endDate
                                - supportedVersions
                              properties:
                                licensee:
                                  type: string
                                startDate:
                                  type: string
                                  format: date-time
                                endDate:
                                  type: string
                                  format: date-time
                                allowedNodesNumber:
                                  type: number
                                supportedVersions:
                                  type: string
      tags:
        - System
      x-codeSamples:
        - lang: curl
          source: 'curl --header "X-API-Token: yourToken" https://rudder.example.com/rudder/api/latest/system/info'
  /system/maintenance/purgeSoftware:
    post:
      summary: Trigger batch for cleaning unreferenced software
      description: Start the software cleaning batch asynchronously.
      operationId: purgeSoftware
      responses:
        '200':
          description: Purge Software
          content:
            application/json:
              schema:
                type: object
                required:
                  - result
                  - action
                  - data
                properties:
                  result:
                    type: string
                    description: Result of the request
                    enum:
                      - success
                      - error
                  action:
                    type: string
                    description: The id of the action
                    enum:
                      - purgeSoftware
                  data:
                    type: array
                    items:
                      type: string
                      description: a success message.
      tags:
        - System
      x-codeSamples:
        - lang: curl
          source: |
            curl --header "X-API-Token: yourToken" --request POST 'https://rudder.example.com/rudder/api/latest/system/maintenance/purgeSoftware?prettify=true'
  /system/regenerate/policies:
    post:
      summary: Trigger a new policy generation
      description: Trigger a full policy generation
      operationId: regeneratePolicies
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                required:
                  - result
                  - action
                  - data
                properties:
                  result:
                    type: string
                    description: Result of the request
                    enum:
                      - success
                      - error
                  action:
                    type: string
                    description: The id of the action
                    enum:
                      - regeneratePolicies
                  data:
                    type: object
                    required:
                      - policies
                    properties:
                      policies:
                        type: string
                        enum:
                          - Started
      tags:
        - System
      x-codeSamples:
        - lang: curl
          source: 'curl --header "X-API-Token: yourToken" --request POST ''https://rudder.example.com/rudder/api/latest/system/regenerate/policies'''
  /system/reload:
    post:
      summary: Reload both techniques and dynamic groups
      description: Reload both techniques and dynamic groups
      operationId: reloadAll
      responses:
        '200':
          description: Service reload
          content:
            application/json:
              schema:
                type: object
                required:
                  - result
                  - action
                  - data
                properties:
                  result:
                    type: string
                    description: Result of the request
                    enum:
                      - success
                      - error
                  action:
                    type: string
                    description: The id of the action
                    enum:
                      - reloadAll
                  data:
                    type: object
                    required:
                      - groups
                      - techniques
                    properties:
                      groups:
                        type: string
                        enum:
                          - Started
                      techniques:
                        type: string
                        enum:
                          - Started
      tags:
        - System
      x-codeSamples:
        - lang: curl
          source: 'curl --header "X-API-Token: yourToken" --request POST ''https://rudder.example.com/rudder/api/latest/system/reload'''
  /system/reload/groups:
    post:
      summary: Reload dynamic groups
      description: Reload dynamic groups
      operationId: reloadGroups
      responses:
        '200':
          description: Service reload
          content:
            application/json:
              schema:
                type: object
                required:
                  - result
                  - action
                  - data
                properties:
                  result:
                    type: string
                    description: Result of the request
                    enum:
                      - success
                      - error
                  action:
                    type: string
                    description: The id of the action
                    enum:
                      - reloadGroups
                  data:
                    type: object
                    required:
                      - groups
                    properties:
                      groups:
                        type: string
                        enum:
                          - Started
      tags:
        - System
      x-codeSamples:
        - lang: curl
          source: |
            curl --header "X-API-Token: yourToken" --request POST 'https://rudder.example.com/rudder/api/latest/system/reload/groups'
  /system/reload/techniques:
    post:
      summary: Reload techniques
      description: Reload techniques from local technique library
      operationId: reloadTechniques
      responses:
        '200':
          description: Service reload
          content:
            application/json:
              schema:
                type: object
                required:
                  - result
                  - action
                  - data
                properties:
                  result:
                    type: string
                    description: Result of the request
                    enum:
                      - success
                      - error
                  action:
                    type: string
                    description: The id of the action
                    enum:
                      - reloadTechniques
                  data:
                    type: object
                    required:
                      - techniques
                    properties:
                      techniques:
                        type: string
                        enum:
                          - Started
      tags:
        - System
      x-codeSamples:
        - lang: curl
          source: |
            curl --header "X-API-Token: yourToken" --request POST 'https://rudder.example.com/rudder/api/latest/system/reload/techniques'
  /system/status:
    get:
      summary: Get server status
      description: Get information about current server status
      operationId: getStatus
      responses:
        '200':
          description: Service status
          content:
            application/json:
              schema:
                type: object
                required:
                  - result
                  - action
                  - data
                properties:
                  result:
                    type: string
                    description: Result of the request
                    enum:
                      - success
                      - error
                  action:
                    type: string
                    description: The id of the action
                    enum:
                      - getStatus
                  data:
                    type: object
                    description: Status of the service
                    properties:
                      global:
                        type: string
                        enum:
                          - OK
      tags:
        - System
      x-codeSamples:
        - lang: curl
          source: 'curl --header "X-API-Token: yourToken" https://rudder.example.com/rudder/api/latest/system/status'
  /system/update/policies:
    post:
      summary: Trigger update of policies
      description: Update configuration policies if needed
      operationId: updatePolicies
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                required:
                  - result
                  - action
                  - data
                properties:
                  result:
                    type: string
                    description: Result of the request
                    enum:
                      - success
                      - error
                  action:
                    type: string
                    description: The id of the action
                    enum:
                      - updatePolicies
                  data:
                    type: object
                    required:
                      - policies
                    properties:
                      policies:
                        type: string
                        enum:
                          - Started
      tags:
        - System
      x-codeSamples:
        - lang: curl
          source: 'curl --header "X-API-Token: yourToken" --request POST ''https://rudder.example.com/rudder/api/latest/system/update/policies'''
  /systemUpdate/campaign/{id}/history:
    get:
      summary: Get a campaign result history
      description: Get a campaign result history
      operationId: getCampaignResults
      parameters:
        - $ref: '#/components/parameters/campaign-id-path'
        - $ref: '#/components/parameters/limit'
        - $ref: '#/components/parameters/offset'
        - $ref: '#/components/parameters/before'
        - $ref: '#/components/parameters/after'
        - $ref: '#/components/parameters/order'
        - $ref: '#/components/parameters/asc'
      responses:
        '200':
          description: Campaign result history result
          content:
            application/json:
              schema:
                type: object
                required:
                  - result
                  - action
                  - data
                properties:
                  result:
                    type: string
                    description: Result of the request
                    enum:
                      - success
                      - error
                  action:
                    type: string
                    description: The id of the action
                    enum:
                      - getCampaignResults
                  data:
                    type: object
                    required:
                      - campaignHistory
                    properties:
                      campaignHistory:
                        type: array
                        items:
                          $ref: '#/components/schemas/campaign-event-result'
      tags:
        - 🧩 System update campaigns
      x-codeSamples:
        - lang: curl
          source: |
            curl --silent --header "X-API-Token: yourToken" --request GET 'https://rudder.example.com/rudder/api/latest/systemUpdate/campaign/0076a379-f32d-4732-9e91-33ab219d8fde/history?limit=1&order=start&asc=desc&before=2023-09-27T16:13:35%2B01:00'
  /systemUpdate/events/{id}/report:
    get:
      summary: Get report of campaign
      description: Get a detailed CSV report of a system update result
      operationId: getSystemUpdateResultReport
      parameters:
        - $ref: '#/components/parameters/campaign-event-id-path'
      responses:
        '200':
          description: CSV report for campaign detailed result
          content:
            text/plain:
              schema:
                type: string
              example: |
                "Node Name","Campaign Name","Campaign Result","Execution date","Updated package","Package update status","Previous version","Current version"
                "node1.localhost","campaign1","Success","2024-12-30T10:00:00.000Z","vim","Updated","9.1.0765","9.1.0787"
      tags:
        - 🧩 System update campaigns
      x-codeSamples:
        - lang: curl
          source: |
            curl --silent --header "X-API-Token: yourToken" --request GET 'https://rudder.example.com/rudder/api/latest/systemUpdate/events/0076a379-f32d-4732-9e91-33ab219d8fde/reports'
  /systemUpdate/events/{id}/result:
    get:
      summary: Get a campaign event result
      description: Get a campaign event result
      operationId: getCampaignEventResult
      parameters:
        - $ref: '#/components/parameters/campaign-event-id-path'
      responses:
        '200':
          description: Campaign result history result
          content:
            application/json:
              schema:
                type: object
                required:
                  - result
                  - action
                  - data
                properties:
                  result:
                    type: string
                    description: Result of the request
                    enum:
                      - success
                      - error
                  action:
                    type: string
                    description: The id of the action
                    enum:
                      - getCampaignEventResult
                  id:
                    type: string
                    description: Campaign event id
                    example: 0076a379-f32d-4732-9e91-33ab219d8fde
                    format: uuid
                  data:
                    type: object
                    required:
                      - eventResult
                    properties:
                      eventResult:
                        type: array
                        items:
                          $ref: '#/components/schemas/campaign-event-result'
      tags:
        - 🧩 System update campaigns
      x-codeSamples:
        - lang: curl
          source: |
            curl --silent --header "X-API-Token: yourToken" --request GET 'https://rudder.example.com/rudder/api/latest/systemUpdate/events/0076a379-f32d-4732-9e91-33ab219d8fde/result'
  /systemUpdate/events/{id}/result/{nodeId}:
    get:
      summary: Get detailed campaign event result for a Node
      description: Get detailed campaign event result for a Node
      operationId: getSystemUpdateResultForNode
      parameters:
        - $ref: '#/components/parameters/campaign-event-id-path'
        - $ref: '#/components/parameters/node-id'
      responses:
        '200':
          description: Campaign event result for a node
          content:
            application/json:
              schema:
                type: object
                required:
                  - result
                  - action
                  - data
                properties:
                  result:
                    type: string
                    description: Result of the request
                    enum:
                      - success
                      - error
                  action:
                    type: string
                    description: The id of the action
                    enum:
                      - getSystemUpdateResultForNode
                  id:
                    type: string
                    description: Campaign event id
                    example: 0076a379-f32d-4732-9e91-33ab219d8fde
                    format: uuid
                  data:
                    type: object
                    required:
                      - nodeResult
                    properties:
                      nodeResult:
                        type: array
                        items:
                          $ref: '#/components/schemas/campaign-event-node-result'
      tags:
        - 🧩 System update campaigns
      x-codeSamples:
        - lang: curl
          source: |
            curl --silent --header "X-API-Token: yourToken" --request GET 'https://rudder.example.com/rudder/api/latest/systemUpdate/events/0076a379-f32d-4732-9e91-33ab219d8fde/result/b81d08e8-03f8-46b7-9399-9bea54e41ec7'
  /systemUpdate/events/{id}/summaryReport:
    get:
      summary: Get summary report of campaign
      description: Get a summarized CSV report of a system update result
      operationId: getSystemUpdateSummaryReport
      parameters:
        - $ref: '#/components/parameters/campaign-event-id-path'
      responses:
        '200':
          description: CSV report for campaign result
          content:
            text/plain:
              schema:
                type: string
              example: |
                "Node Name","Campaign Name","Campaign Result","Operating system name","Operating system service pack","Execution date","Updated packages"
                "node1","campaign1","Success","Debian 12","None","2024-12-30T10:00:00.000Z","123"
      tags:
        - 🧩 System update campaigns
      x-codeSamples:
        - lang: curl
          source: |
            curl --silent --header "X-API-Token: yourToken" --request GET 'https://rudder.example.com/rudder/api/latest/systemUpdate/events/0076a379-f32d-4732-9e91-33ab219d8fde/summaryReport'
  /techniques:
    get:
      summary: List all techniques
      description: List all technique with their versions
      operationId: listTechniques
      responses:
        '200':
          description: Techniques information
          content:
            application/json:
              schema:
                type: object
                required:
                  - result
                  - action
                  - data
                properties:
                  result:
                    type: string
                    description: Result of the request
                    enum:
                      - success
                      - error
                  action:
                    type: string
                    description: The id of the action
                    enum:
                      - listTechniques
                  data:
                    type: object
                    required:
                      - techniques
                    properties:
                      techniques:
                        $ref: '#/components/schemas/techniques'
      tags:
        - Techniques
      x-codeSamples:
        - lang: curl
          source: 'curl --header "X-API-Token: yourToken" --request GET https://rudder.example.com/rudder/api/latest/techniques'
    put:
      summary: Create technique
      description: Create a new technique in Rudder from a technique in the technique editor
      operationId: CreateTechnique
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/techniques'
      responses:
        '200':
          description: Versions information
          content:
            application/json:
              schema:
                type: object
                required:
                  - result
                  - action
                  - data
                properties:
                  result:
                    type: string
                    description: Result of the request
                    enum:
                      - success
                      - error
                  action:
                    type: string
                    description: The id of the action
                    enum:
                      - listTechniques
                  data:
                    type: object
                    required:
                      - techniques
                    properties:
                      techniques:
                        type: object
                        required:
                          - technique
                        properties:
                          technique:
                            $ref: '#/components/schemas/editor-technique'
      tags:
        - Techniques
      x-codeSamples:
        - lang: curl
          source: 'curl --header "X-API-Token: yourToken" --request PUT https://rudder.example.com/rudder/api/latest/techniques'
  /techniques/categories:
    get:
      summary: List categories
      description: Get all technique categories
      operationId: techniqueCategories
      responses:
        '200':
          description: Categories information
          content:
            application/json:
              schema:
                type: object
                required:
                  - result
                  - action
                  - data
                properties:
                  result:
                    type: string
                    description: Result of the request
                    enum:
                      - success
                      - error
                  action:
                    type: string
                    description: The id of the action
                    enum:
                      - listTechniques
                  data:
                    type: object
                    required:
                      - techniqueCategories
                    properties:
                      techniqueCategories:
                        $ref: '#/components/schemas/categories-tree'
      tags:
        - Techniques
      x-codeSamples:
        - lang: curl
          source: 'curl --header "X-API-Token: yourToken" --request GET https://rudder.example.com/rudder/api/latest/techniques/categories'
  /techniques/reload:
    post:
      summary: Reload techniques
      description: Reload all techniques metadata from file system
      operationId: techniques
      responses:
        '200':
          description: Techniques information
          content:
            application/json:
              schema:
                type: object
                required:
                  - result
                  - action
                  - data
                properties:
                  result:
                    type: string
                    description: Result of the request
                    enum:
                      - success
                      - error
                  action:
                    type: string
                    description: The id of the action
                    enum:
                      - listTechniques
                  data:
                    type: object
                    required:
                      - techniques
                    properties:
                      techniques:
                        $ref: '#/components/schemas/techniques'
      tags:
        - Techniques
      x-codeSamples:
        - lang: curl
          source: 'curl --header "X-API-Token: yourToken" --request POST https://rudder.example.com/rudder/api/latest/techniques/reload'
  /techniques/versions:
    get:
      summary: List versions
      description: List all techniques version
      operationId: listTechniquesVersions
      responses:
        '200':
          description: Versions information
          content:
            application/json:
              schema:
                type: object
                required:
                  - result
                  - action
                  - data
                properties:
                  result:
                    type: string
                    description: Result of the request
                    enum:
                      - success
                      - error
                  action:
                    type: string
                    description: The id of the action
                    enum:
                      - listTechniques
                  data:
                    type: object
                    required:
                      - techniques
                    properties:
                      techniques:
                        $ref: '#/components/schemas/techniques-versions'
      tags:
        - Techniques
      x-codeSamples:
        - lang: curl
          source: 'curl --header "X-API-Token: yourToken" --request GET https://rudder.example.com/rudder/api/latest/techniques/versions'
  /techniques/{techniqueId}:
    get:
      summary: Technique metadata by ID
      description: Get each Technique's versions with their metadata by ID
      operationId: getTechniqueAllVersion
      parameters:
        - $ref: '#/components/parameters/technique-id'
      responses:
        '200':
          description: Techniques information
          content:
            application/json:
              schema:
                type: object
                required:
                  - result
                  - action
                  - data
                properties:
                  result:
                    type: string
                    description: Result of the request
                    enum:
                      - success
                      - error
                  action:
                    type: string
                    description: The id of the action
                    enum:
                      - listTechniques
                  data:
                    type: object
                    required:
                      - techniques
                    properties:
                      techniques:
                        type: array
                        items:
                          type: object
                          required:
                            - JREditorTechnique
                          properties:
                            JREditorTechnique:
                              $ref: '#/components/schemas/editor-technique'
      tags:
        - Techniques
      x-codeSamples:
        - lang: curl
          source: 'curl --header "X-API-Token: yourToken" --request GET https://rudder.example.com/rudder/api/latest/techniques/foo'
  /techniques/{techniqueId}/directives:
    get:
      summary: List all directives based on a technique
      description: List all directives based on all version of a technique
      operationId: listTechniquesDirectives
      parameters:
        - $ref: '#/components/parameters/technique-id'
      responses:
        '200':
          description: Techniques information
          content:
            application/json:
              schema:
                type: object
                required:
                  - result
                  - action
                  - data
                properties:
                  result:
                    type: string
                    description: Result of the request
                    enum:
                      - success
                      - error
                  action:
                    type: string
                    description: The id of the action
                    enum:
                      - listTechniquesDirectives
                  data:
                    type: object
                    required:
                      - directives
                    properties:
                      directives:
                        type: array
                        items:
                          $ref: '#/components/schemas/directive'
      tags:
        - Techniques
      x-codeSamples:
        - lang: curl
          source: 'curl --header "X-API-Token: yourToken" --request GET https://rudder.example.com/rudder/api/latest/techniques/checkGenericFileContent/directives'
  /techniques/{techniqueId}/{techniqueVersion}:
    post:
      summary: Update technique
      description: Update technique created with technique editor
      operationId: updateTechnique
      parameters:
        - $ref: '#/components/parameters/technique-id'
        - $ref: '#/components/parameters/technique-version'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/techniques'
      responses:
        '200':
          description: Versions information
          content:
            application/json:
              schema:
                type: object
                required:
                  - result
                  - action
                  - data
                properties:
                  result:
                    type: string
                    description: Result of the request
                    enum:
                      - success
                      - error
                  action:
                    type: string
                    description: The id of the action
                    enum:
                      - listTechniques
                  data:
                    type: object
                    required:
                      - techniques
                    properties:
                      techniques:
                        type: object
                        required:
                          - technique
                        properties:
                          technique:
                            $ref: '#/components/schemas/editor-technique'
      tags:
        - Techniques
      x-codeSamples:
        - lang: curl
          source: 'curl --header "X-API-Token: yourToken" --request POST https://rudder.example.com/rudder/api/latest/techniques/bar/1.0'
    delete:
      summary: Delete technique
      description: Delete a technique from technique editor
      operationId: deleteTechnique
      parameters:
        - $ref: '#/components/parameters/technique-id'
        - $ref: '#/components/parameters/technique-version'
      responses:
        '200':
          description: Deletion information
          content:
            application/json:
              schema:
                type: object
                required:
                  - result
                  - action
                  - data
                properties:
                  result:
                    type: string
                    description: Result of the request
                    enum:
                      - success
                      - error
                  action:
                    type: string
                    description: The id of the action
                    enum:
                      - listTechniques
                  data:
                    type: object
                    required:
                      - techniques
                    properties:
                      techniques:
                        type: array
                        items:
                          type: object
                          required:
                            - id
                            - version
                          properties:
                            id:
                              type: string
                              description: Deleted technique ID
                              example: foo
                            version:
                              type: string
                              description: Deleted technique version
                              example: '1.0'
      tags:
        - Techniques
      x-codeSamples:
        - lang: curl
          source: 'curl --header "X-API-Token: yourToken" --request DELETE https://rudder.example.com/rudder/api/latest/techniques/foo/1.0'
    get:
      summary: Technique metadata by version and ID
      description: Get Technique metadata
      operationId: getTechniqueAllVersionId
      parameters:
        - $ref: '#/components/parameters/technique-id'
        - $ref: '#/components/parameters/technique-version'
      responses:
        '200':
          description: Techniques information
          content:
            application/json:
              schema:
                type: object
                required:
                  - result
                  - action
                  - data
                properties:
                  result:
                    type: string
                    description: Result of the request
                    enum:
                      - success
                      - error
                  action:
                    type: string
                    description: The id of the action
                    enum:
                      - listTechniques
                  data:
                    type: object
                    required:
                      - techniques
                    properties:
                      techniques:
                        type: array
                        items:
                          type: object
                          required:
                            - JREditorTechnique
                          properties:
                            JREditorTechnique:
                              $ref: '#/components/schemas/editor-technique'
      tags:
        - Techniques
      x-codeSamples:
        - lang: curl
          source: 'curl --header "X-API-Token: yourToken" --request GET https://rudder.example.com/rudder/api/latest/techniques/foo/1.0'
  /techniques/{techniqueId}/{techniqueVersion}/directives:
    get:
      summary: List all directives based on a version of a technique
      description: List all directives based on a version of a technique
      operationId: listTechniqueVersionDirectives
      parameters:
        - $ref: '#/components/parameters/technique-id'
        - $ref: '#/components/parameters/technique-version'
      responses:
        '200':
          description: Techniques information
          content:
            application/json:
              schema:
                type: object
                required:
                  - result
                  - action
                  - data
                properties:
                  result:
                    type: string
                    description: Result of the request
                    enum:
                      - success
                      - error
                  action:
                    type: string
                    description: The id of the action
                    enum:
                      - listTechniqueDirectives
                  data:
                    type: object
                    required:
                      - directives
                    properties:
                      directives:
                        type: array
                        items:
                          $ref: '#/components/schemas/directive'
      tags:
        - Techniques
      x-codeSamples:
        - lang: curl
          source: 'curl --header "X-API-Token: yourToken" --request GET https://rudder.example.com/rudder/api/latest/techniques/checkGenericFileContent/6.0/directives'
  /techniques/{techniqueId}/{techniqueVersion}/resources:
    get:
      summary: Technique's resources
      description: Get currently deployed resources of a technique
      operationId: getTechniquesResources
      parameters:
        - $ref: '#/components/parameters/technique-id'
        - $ref: '#/components/parameters/technique-version'
      responses:
        '200':
          description: Resources information
          content:
            application/json:
              schema:
                type: object
                required:
                  - result
                  - action
                  - data
                properties:
                  result:
                    type: string
                    description: Result of the request
                    enum:
                      - success
                      - error
                  action:
                    type: string
                    description: The id of the action
                    enum:
                      - listTechniques
                  data:
                    type: object
                    required:
                      - resources
                    properties:
                      resources:
                        $ref: '#/components/schemas/techniques-resources'
      tags:
        - Techniques
      x-codeSamples:
        - lang: curl
          source: 'curl --header "X-API-Token: yourToken" --request GET https://rudder.example.com/rudder/api/latest/techniques/bar/1.0/resources'
  /techniques/{techniqueId}/{techniqueVersion}/revisions:
    get:
      summary: Technique's revisions
      description: Get revisions for given technique
      operationId: techniqueRevisions
      parameters:
        - $ref: '#/components/parameters/technique-id'
        - $ref: '#/components/parameters/technique-version'
      responses:
        '200':
          description: Versions information
          content:
            application/json:
              schema:
                type: object
                required:
                  - result
                  - action
                  - data
                properties:
                  result:
                    type: string
                    description: Result of the request
                    enum:
                      - success
                      - error
                  action:
                    type: string
                    description: The id of the action
                    enum:
                      - listTechniques
                  data:
                    type: object
                    required:
                      - techniques
                    properties:
                      techniques:
                        $ref: '#/components/schemas/techniques-revisions'
      tags:
        - Techniques
      x-codeSamples:
        - lang: curl
          source: 'curl --header "X-API-Token: yourToken" --request GET https://rudder.example.com/rudder/api/latest/techniques/foo/1.0/revisions'
  /tenants:
    get:
      summary: Get the list of all tenants.
      description: Get the list of tenants. The special '*' and '-' are not included in the returned values.
      operationId: getTenants
      responses:
        '200':
          description: The list of tenants with their documentation information
          content:
            application/json:
              schema:
                type: object
                required:
                  - result
                  - action
                  - data
                properties:
                  result:
                    type: string
                    description: Result of the request
                    enum:
                      - success
                      - error
                  action:
                    type: string
                    description: The id of the action
                    enum:
                      - getTenant
                  data:
                    type: object
                    required:
                      - tenants
                    properties:
                      tenants:
                        type: array
                        items:
                          $ref: '#/components/schemas/tenant'
      tags:
        - 🧩 Multi-tenants
      x-codeSamples:
        - lang: curl
          source: 'curl --header "X-API-Token: yourToken" --request GET https://rudder.example.com/rudder/api/latest/tenants'
    post:
      summary: Add one or more tenants
      description: Add one or more tenants to existing list. Already defined tenants (same id) are updated
      operationId: addTenants
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: array
              items:
                $ref: '#/components/schemas/tenant'
      responses:
        '200':
          description: List of actually added/updated tenants
          content:
            application/json:
              schema:
                type: object
                required:
                  - result
                  - action
                  - data
                properties:
                  result:
                    type: string
                    description: Result of the request
                    enum:
                      - success
                      - error
                  action:
                    type: string
                    description: The id of the action
                    enum:
                      - updateGroup
                  data:
                    type: object
                    required:
                      - tenants
                    properties:
                      tenants:
                        type: array
                        items:
                          $ref: '#/components/schemas/tenant'
      tags:
        - 🧩 Multi-tenants
      x-codeSamples:
        - lang: curl
          source: |
            curl --header "X-API-Token: yourToken" --request POST --header "Content-Type: application/json" 'https://rudder.example.com/rudder/api/latest/tenants' --data '[{"id":"zone1","name":"Zone One"}]'
    delete:
      summary: Delete a list of tenants
      description: Delete the list of tenants with given IDs
      operationId: deleteTenants
      responses:
        '200':
          description: The list of tenants actually deleted. Already missing tenants are ignored.
          content:
            application/json:
              schema:
                type: object
                required:
                  - result
                  - action
                  - data
                properties:
                  result:
                    type: string
                    description: Result of the request
                    enum:
                      - success
                      - error
                  action:
                    type: string
                    description: The id of the action
                    enum:
                      - deleteGroup
                  data:
                    type: object
                    required:
                      - tenants
                    properties:
                      tenants:
                        type: array
                        items:
                          type: string
                          description: The id of tenants really deleted
      tags:
        - 🧩 Multi-tenants
      x-codeSamples:
        - lang: curl
          source: |
            curl --header "X-API-Token: yourToken" --request DELETE --header "Content-Type: application/json" 'https://rudder.example.com/rudder/api/latest/tenants' --data '["zone1","zone2"]'
  /tenants/{id}:
    get:
      summary: Get tenant details
      description: Get detailed information about one tenant
      operationId: getTenant
      parameters:
        - $ref: '#/components/parameters/tenant-id'
      responses:
        '200':
          description: Tenant information
          content:
            application/json:
              schema:
                type: object
                required:
                  - result
                  - action
                  - data
                properties:
                  result:
                    type: string
                    description: Result of the request
                    enum:
                      - success
                      - error
                  action:
                    type: string
                    description: The id of the action
                    enum:
                      - getTenant
                  data:
                    type: object
                    required:
                      - tenants
                    properties:
                      tenants:
                        type: array
                        items:
                          $ref: '#/components/schemas/tenant'
      tags:
        - 🧩 Multi-tenants
      x-codeSamples:
        - lang: curl
          source: |
            curl --header "X-API-Token: yourToken" --request GET 'https://rudder.example.com/rudder/api/latest/tenants/17dadf50-6056-4c8b-a935-6b97d14b89a7'
  /usermanagement:
    post:
      summary: Add user
      description: Add a new user
      operationId: addUser
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/user-new'
      responses:
        '200':
          description: Updated
          content:
            application/json:
              schema:
                type: object
                required:
                  - result
                  - action
                  - data
                properties:
                  result:
                    type: string
                    description: Result of the request
                    enum:
                      - success
                      - error
                  action:
                    type: string
                    description: The id of the action
                    enum:
                      - addUser
                  data:
                    type: object
                    required:
                      - addedUser
                    properties:
                      addedUser:
                        type: object
                        required:
                          - username
                          - password
                          - permissions
                        properties:
                          username:
                            type: string
                            description: New username
                            example: johndoe
                          password:
                            type: string
                            description: New given password, hashed or not
                            example: secret_password
                          permissions:
                            type: array
                            description: Permissions of new user
                            items:
                              type: string
                              example: inventory
                          name:
                            type: string
                            example: John Doe
                          email:
                            type: string
                            example: john.doe@example.com
                          otherInfo:
                            type: object
                            additionalProperties:
                              type: string
                            example:
                              phone: '+1234'
      tags:
        - User management
      x-codeSamples:
        - lang: curl
          source: "curl --header \"X-API-Token: yourToken\" \\\n  --request POST https://rudder.example.com/rudder/api/latest/usermanagement \\\n  --header \"Content-type: application/json\" \\\n  --data @- <<EOF\n{\n\t\"isPreHashed\": false,\n\t\"username\"   : \"johndoe\",\n\t\"password\"   : \"secret_password\",\n\t\"permissions\": [\"user\"],\n\t\"name\"       : \"John Doe\",\n\t\"email\"      : \"john.doe@example.com\",\n\t\"otherInfo\"  : {\n\t\t\"phone\" : \"+1234\"\n\t}\n}\nEOF\n"
  /usermanagement/coverage/{username}:
    post:
      summary: Compute the role coverage
      description: Compute the role coverage of an user
      operationId: roleCoverage
      parameters:
        - $ref: '#/components/parameters/username'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - permissions
                - authz
              properties:
                permissions:
                  type: array
                  description: List of roles
                  items:
                    type: string
                authz:
                  type: array
                  description: List of authorizations
                  items:
                    type: string
      responses:
        '200':
          description: Roles coverage
          content:
            application/json:
              schema:
                type: object
                required:
                  - action
                  - result
                  - data
                properties:
                  action:
                    type: string
                    description: The id of the action
                    enum:
                      - roleCoverage
                  result:
                    type: string
                    description: Result of the request
                    enum:
                      - success
                  data:
                    type: object
                    required:
                      - coverage
                    properties:
                      coverage:
                        type: object
                        required:
                          - permissions
                          - custom
                        properties:
                          permissions:
                            type: array
                            description: List of roles
                            items:
                              type: string
                          custom:
                            type: array
                            description: List of custom rights
                            items:
                              type: string
      tags:
        - User management
      x-codeSamples:
        - lang: curl
          source: "curl --header \"X-API-Token: yourToken\" \\\n  --request POST https://rudder.example.com/rudder/api/latest/usermanagement/coverage/johndoe \\\n  --header \"Content-type: application/json\" \\\n  --data @- <<EOF\n{\n\t\"permissions\" : [\"user\", \"deployer\", \"inventory\"],\n\t\"authz\" : [\"node_read\",\"node_write\"]\n}\nEOF\n"
  /usermanagement/roles:
    get:
      summary: List all roles
      description: Get all available roles and their rights
      operationId: getRole
      responses:
        '200':
          description: Roles information
          content:
            application/json:
              schema:
                type: object
                required:
                  - result
                  - action
                  - data
                properties:
                  result:
                    type: string
                    description: Result of the request
                    enum:
                      - success
                      - error
                  action:
                    type: string
                    description: The id of the action
                    enum:
                      - getRole
                  data:
                    type: array
                    items:
                      type: object
                      required:
                        - id
                        - rights
                      properties:
                        id:
                          type: string
                          description: Name of the role
                          enum:
                            - inventory
                            - compliance
                            - administrator
                            - etc
                        rights:
                          type: array
                          description: Role's rights
                          items:
                            type: string
                            enum:
                              - node_read
                              - userAccount_all
      tags:
        - User management
      x-codeSamples:
        - lang: curl
          source: 'curl --header "X-API-Token: yourToken" --request GET ''https://rudder.example.com/rudder/api/latest/usermanagement/roles'''
  /usermanagement/status/activate/{username}:
    put:
      summary: Activate user
      description: Set user status to active
      operationId: activateUser
      parameters:
        - $ref: '#/components/parameters/username'
      responses:
        '200':
          description: User was activated
          content:
            application/json:
              schema:
                type: object
                required:
                  - action
                  - id
                  - result
                  - data
                properties:
                  action:
                    type: string
                    description: The id of the action
                    enum:
                      - activateUser
                  id:
                    type: string
                    description: The id of the updated user
                    example: johndoe
                  result:
                    type: string
                    description: Result of the request
                    enum:
                      - success
                  data:
                    type: object
                    required:
                      - status
                    properties:
                      status:
                        $ref: '#/components/schemas/user-status'
                        example: active
        '500':
          description: User activation was an error
          content:
            application/json:
              schema:
                type: object
                required:
                  - action
                  - result
                  - errorDetails
                properties:
                  action:
                    type: string
                    description: The id of the action
                    enum:
                      - activateUser
                  result:
                    type: string
                    description: Result of the request
                    enum:
                      - error
                  errorDetails:
                    type: string
                    description: Details of the error
                    example: 'Could not activate user ''johndoe''; cause was: Inconsistency: User ''johndoe'' does not exist therefore cannot be activated'
      tags:
        - User management
      x-codeSamples:
        - lang: curl
          source: |
            curl --header "X-API-Token: yourToken" \
              --request PUT https://rudder.example.com/rudder/api/latest/usermanagement/status/activate/johndoe
  /usermanagement/status/disable/{username}:
    put:
      summary: Disable user
      description: Set user status to disabled
      operationId: disableUser
      parameters:
        - $ref: '#/components/parameters/username'
      responses:
        '200':
          description: User was disabled
          content:
            application/json:
              schema:
                type: object
                required:
                  - action
                  - id
                  - result
                  - data
                properties:
                  action:
                    type: string
                    description: The id of the action
                    enum:
                      - disableUser
                  id:
                    type: string
                    description: The id of the updated user
                    example: johndoe
                  result:
                    type: string
                    description: Result of the request
                    enum:
                      - success
                  data:
                    type: object
                    required:
                      - status
                    properties:
                      status:
                        $ref: '#/components/schemas/user-status'
                        example: disabled
        '500':
          description: User disabling was an error
          content:
            application/json:
              schema:
                type: object
                required:
                  - action
                  - result
                  - errorDetails
                properties:
                  action:
                    type: string
                    description: The id of the action
                    enum:
                      - disableUser
                  result:
                    type: string
                    description: Result of the request
                    enum:
                      - error
                  errorDetails:
                    type: string
                    description: Details of the error
                    example: 'Could not disable user ''johndoe''; cause was: Inconsistency: User ''johndoe'' does not exist therefore cannot be disabled'
      tags:
        - User management
      x-codeSamples:
        - lang: curl
          source: |
            curl --header "X-API-Token: yourToken" \
              --request PUT https://rudder.example.com/rudder/api/latest/usermanagement/status/disable/johndoe
  /usermanagement/update/info/{username}:
    post:
      summary: Update user information
      description: Modify name and email of user, and add or remove custom additional string fields
      operationId: updateUserInfo
      parameters:
        - $ref: '#/components/parameters/username'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/user-info'
      responses:
        '200':
          description: Updated
          content:
            application/json:
              schema:
                type: object
                required:
                  - result
                  - action
                  - data
                properties:
                  result:
                    type: string
                    description: Result of the request
                    enum:
                      - success
                      - error
                  action:
                    type: string
                    description: The id of the action
                    enum:
                      - updateUser
                  data:
                    type: object
                    required:
                      - updatedUser
                    properties:
                      updatedUser:
                        type: object
                        properties:
                          name:
                            type: string
                            example: John Doe
                          email:
                            type: string
                            example: john.doe@example.com
                          otherInfo:
                            type: object
                            additionalProperties:
                              type: string
                            example:
                              phone: '+1234'
      tags:
        - User management
      x-codeSamples:
        - lang: curl
          source: "curl --header \"X-API-Token: yourToken\" \\\n  --request POST https://rudder.example.com/rudder/api/latest/usermanagement/update/info/johndoe \\\n  --header \"Content-type: application/json\" \\\n  --data @- <<EOF\n{\n\t\"name\"     : \"John Doe\",\n\t\"email\"    : \"john.doe@example.com\",\n\t\"otherInfo\": {\n\t\t\"phone\": \"+1234\"\n\t}\n}\nEOF\n"
  /usermanagement/update/{username}:
    post:
      summary: Update user access to Rudder
      description: Rename, change password (pre-hashed or not) and change permission of an user. If a parameter is empty, it will be ignored.
      operationId: updateUser
      parameters:
        - $ref: '#/components/parameters/username'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/user-file'
      responses:
        '200':
          description: Updated
          content:
            application/json:
              schema:
                type: object
                required:
                  - result
                  - action
                  - data
                properties:
                  result:
                    type: string
                    description: Result of the request
                    enum:
                      - success
                      - error
                  action:
                    type: string
                    description: The id of the action
                    enum:
                      - updateUser
                  data:
                    type: object
                    required:
                      - updatedUser
                    properties:
                      updatedUser:
                        type: object
                        required:
                          - username
                          - password
                          - permissions
                        properties:
                          username:
                            type: string
                            description: Given username
                            example: johndoe
                          password:
                            type: string
                            description: Given password, empty means no update was made
                            example: secret_password
                          permissions:
                            type: array
                            description: Given user permissions
                            items:
                              type: string
                              example: inventory
      tags:
        - User management
      x-codeSamples:
        - lang: curl
          source: "curl --header \"X-API-Token: yourToken\" \\\n  --request POST https://rudder.example.com/rudder/api/latest/usermanagement/update/johndoe \\\n  --header \"Content-type: application/json\" \\\n  --data @- <<EOF\n{\n\t\"isPreHashed\" : false,\n\t\"username\"    : \"\",\n\t\"password\"    : \"Safer password\",\n\t\"permissions\" : [\"user\", \"deployer\", \"inventory\"]\n}\nEOF\n"
  /usermanagement/users:
    get:
      summary: List all users
      description: Get the list of all present users and their permissions
      operationId: getUserInfo
      responses:
        '200':
          description: Users information
          content:
            application/json:
              schema:
                type: object
                required:
                  - result
                  - action
                  - data
                properties:
                  result:
                    type: string
                    description: Result of the request
                    enum:
                      - success
                      - error
                  action:
                    type: string
                    description: The id of the action
                    enum:
                      - getUserInfo
                  data:
                    type: object
                    required:
                      - roleListOverride
                      - authenticationBackends
                      - providerProperties
                      - users
                      - digest
                      - tenantsEnabled
                    properties:
                      roleListOverride:
                        $ref: '#/components/schemas/role-list-override'
                      authenticationBackends:
                        type: array
                        items:
                          type: string
                          enum:
                            - rootAdmin
                            - file
                            - ldap
                            - oidc
                            - oauth2
                      providerProperties:
                        type: object
                        additionalProperties:
                          type: object
                          properties:
                            roleListOverride:
                              $ref: '#/components/schemas/role-list-override'
                        example:
                          file:
                            roleListOverride: override
                      users:
                        type: array
                        items:
                          $ref: '#/components/schemas/user'
                      digest:
                        type: string
                        enum:
                          - BCRYPT
                        description: Default password hash algorithm
                      tenantsEnabled:
                        type: boolean
                        description: Whether the tenants plugin is enabled or not, indicating if users only belong to their assigned tenants
                        enum:
                          - false
                          - true
      tags:
        - User management
      x-codeSamples:
        - lang: curl
          source: 'curl --header "X-API-Token: yourToken" --request GET ''https://rudder.example.com/rudder/api/latest/usermanagement/users'''
  /usermanagement/users/reload:
    post:
      summary: Reload users
      description: Reload the users from the file system, in the configuration file
      operationId: reloadUserConf
      responses:
        '200':
          description: Reload information
          content:
            application/json:
              schema:
                type: object
                required:
                  - result
                  - action
                  - data
                properties:
                  result:
                    type: string
                    description: Result of the request
                    enum:
                      - success
                      - error
                  action:
                    type: string
                    description: The id of the action
                    enum:
                      - reloadUserConf
                  data:
                    type: object
                    required:
                      - reload
                    properties:
                      reload:
                        type: object
                        required:
                          - status
                        properties:
                          status:
                            type: string
                            example: Done
      tags:
        - User management
      x-codeSamples:
        - lang: curl
          source: 'curl --header "X-API-Token: yourToken" --request POST ''https://rudder.example.com/rudder/api/latest/usermanagement/users/reload'''
  /usermanagement/{username}:
    delete:
      summary: Delete an user
      description: Delete the user and their permissions
      operationId: deleteUser
      parameters:
        - $ref: '#/components/parameters/username'
      responses:
        '200':
          description: Deleted user
          content:
            application/json:
              schema:
                type: object
                required:
                  - result
                  - action
                  - data
                properties:
                  result:
                    type: string
                    description: Result of the request
                    enum:
                      - success
                      - error
                  action:
                    type: string
                    description: The id of the action
                    enum:
                      - deleteUser
                  data:
                    type: object
                    required:
                      - deletedUser
                    properties:
                      deletedUser:
                        type: object
                        required:
                          - username
                        properties:
                          username:
                            type: string
                            description: Username of the deleted user
                            example: Toto
      tags:
        - User management
      x-codeSamples:
        - lang: curl
          source: |
            curl --header "X-API-Token: yourToken" --request DELETE 'https://rudder.example.com/rudder/api/latest/usermanagement/johndoe'
  /users:
    get:
      summary: List user
      description: List all validated and unvalidated users
      operationId: listUsers
      responses:
        '200':
          description: List users
          content:
            application/json:
              schema:
                type: object
                required:
                  - result
                  - action
                  - data
                properties:
                  result:
                    type: string
                    description: Result of the request
                    enum:
                      - success
                      - error
                  action:
                    type: string
                    description: The id of the action
                    enum:
                      - listUsers
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/validated-user'
      tags:
        - 🧩 Change requests
      x-codeSamples:
        - lang: curl
          source: 'curl --header "X-API-Token: yourToken" --request GET https://rudder.example.com/rudder/api/latest/users'
  /validatedUsers:
    post:
      summary: Update validated user list
      description: Add and remove user from validated users
      operationId: saveWorkflowUser
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - validatedUsers
              properties:
                validatedUsers:
                  type: array
                  description: list of user to put in validated list
                  items:
                    type: string
                    example: John Do
      responses:
        '200':
          description: Updated
          content:
            application/json:
              schema:
                type: object
                required:
                  - result
                  - action
                  - data
                properties:
                  result:
                    type: string
                    description: Result of the request
                    enum:
                      - success
                      - error
                  action:
                    type: string
                    description: The id of the action
                    enum:
                      - addUser
                  data:
                    $ref: '#/components/schemas/validated-user'
      tags:
        - 🧩 Change requests
      x-codeSamples:
        - lang: curl
          source: "update.json:\n\n{\n\t\"validatedUsers\": [\"John Do\", \"Jane Doe\"]\n}\n\ncurl --header \"X-API-Token: yourToken\" --request POST https://rudder.example.com/rudder/api/latest/validatedUsers --header \"Content-type: application/json\" --data @update.json\n\n"
  /validatedUsers/{username}:
    delete:
      summary: Remove an user from validated user list
      description: The user is again subject to workflow validation
      operationId: removeValidatedUser
      parameters:
        - $ref: '#/components/parameters/username'
      responses:
        '200':
          description: Removed user
          content:
            application/json:
              schema:
                type: object
                required:
                  - result
                  - action
                  - data
                properties:
                  result:
                    type: string
                    description: Result of the request
                    enum:
                      - success
                      - error
                  action:
                    type: string
                    description: The id of the action
                    enum:
                      - listUsers
                  data:
                    type: string
                    description: the user removed from validated list
                    example: John Do
      tags:
        - 🧩 Change requests
      x-codeSamples:
        - lang: curl
          source: |
            curl --header "X-API-Token: yourToken" --request DELETE https://rudder.example.com/rudder/api/latest/validatedUsers/John Do
components:
  securitySchemes:
    API-Tokens:
      description: |
        This request must be authenticated with a valid API token passed in a `X-API-Token` header, like in:
        ```bash curl --header "X-API-Token: yourToken" https://rudder.example.com/rudder/api/latest/rules ```
        See the [authentication section](#section/Introduction/Authentication) for details.
      type: apiKey
      in: header
      name: X-API-Token
  schemas:
    change-request:
      type: object
      description: Content of the change request
      properties:
        id:
          type: integer
          example: 42
        name:
          type: string
          example: Remove unused security policy
        description:
          type: string
        status:
          type: string
          enum:
            - Deployed
            - Pending deployment
            - Cancelled
            - Pending validation
            - Open
        acceptable:
          type: boolean
          example: true
        created by:
          type: string
          example: Matthieu C.
        changes:
          type: object
          properties:
            rules:
              type: array
              items:
                type: object
                properties:
                  action:
                    type: string
                    example: modify Rule
    api-account:
      type: object
      properties:
        id:
          description: API account id
          type: string
          format: uuid
          example: 91252ea2-feb2-412d-8599-c6945fee02c4
        name:
          description: Human readable name of the API account
          type: string
          example: Audit directives
        description:
          description: One line API account description
          type: string
          example: Read-only account for directive audit
        status:
          description: Status of that API account
          type: string
          enum:
            - enabled
            - disabled
          example: enabled
        creationDate:
          description: Creation date of the API account
          type: string
          format: rfc3339
        expirationPolicy:
          description: Expiration policy of the API account (not the token)
          type: string
          enum:
            - never
            - datetime
          example: never
        expirationDate:
          description: Optional expiration date of the API account
          type: string
          format: rfc3339
          example: '2025-05-10T23:59:59Z'
        tokenState:
          description: State of the token for that account. An account with token state 'missing' means that there is no token for that account.
          type: string
          enum:
            - generated
            - missing
          example: missing
        token:
          description: The token secret. It will be returned only once when a new token is generated.
          type: string
          example: t1-ca5a50899d25cd3ff148350843a9d435
        tokenGenerationDate:
          description: Optional generation date for the token when tokenState is 'generated'
          type: string
          format: rfc3339
          example: '2025-02-12T10:55:00Z'
        lastAuthenticationDate:
          description: Optional date for the last successful authentication of the account
          type: string
          format: rfc3339
          example: '2025-02-12T11:59:00Z'
        tenants:
          description: a comma separated list of tenants allowed for that account. See tenant documentation for syntax.
          type: string
          example: '*'
        authorizationType:
          description: 'Authorization type for that account:  - ro: read-only (GET) access to all APIs - rw: read (GET) and write (other verbs) access to all APIs - acl: access control list based permission for API (need api-authorization plugin)'
          type: string
          enum:
            - rw
            - ro
            - acl
        acl:
          description: in case of ACL authorization type, the actual ACL
          type: array
          items:
            type: object
            properties:
              path:
                description: API path managed by that access control
                type: string
                example: directives/1ebee8c7-c898-4ee5-9470-139bfd80c442
              verb:
                description: HTTP verb allowed
                type: string
                example: get
    api-account-new:
      type: object
      properties:
        id:
          description: An optional ID for that account. It needs to match [a-zA-Z0-9_-]+
          type: string
          example: oidc-provided-opaque-id-5154cbb63a18
        name:
          description: Human readable name of the API account
          type: string
          example: Audit directives
        description:
          description: One line API account description
          type: string
          example: Read-only account for directive audit
        status:
          description: Status of that API account
          type: string
          enum:
            - enabled
            - disabled
          example: enabled
        generateToken:
          description: Optionally specify if the token need to be generated (default true)
          type: boolean
        expirationPolicy:
          description: 'Optionally specify the expiration policy of the API account. Default: never'
          type: string
          enum:
            - never
            - datetime
          example: never
        expirationDate:
          description: Optional expiration date of the API account
          type: string
          format: rfc3339
          example: '2025-05-10T23:59:59Z'
        tenants:
          description: a comma separated list of tenants allowed for that account. See tenant documentation for syntax.
          type: string
          example: '*'
        authorizationType:
          description: 'Authorization type for that account:  - ro: read-only (GET) access to all APIs - rw: read (GET) and write (other verbs) access to all APIs - acl: access control list based permission for API (need api-authorization plugin)'
          type: string
          enum:
            - rw
            - ro
            - acl
        acl:
          description: in case of ACL authorization type, the actual ACL
          type: array
          items:
            type: object
            properties:
              path:
                description: API path managed by that access control
                type: string
                example: directives/1ebee8c7-c898-4ee5-9470-139bfd80c442
              actions:
                description: List of HTTP verb allowed
                type: array
                items:
                  type: string
                  example: get
    api-account-update:
      type: object
      properties:
        name:
          description: Human readable name of the API account
          type: string
          example: Audit directives
        description:
          description: One line API account description
          type: string
          example: Read-only account for directive audit
        status:
          description: Status of that API account
          type: string
          enum:
            - enabled
            - disabled
          example: enabled
        expirationPolicy:
          description: 'Optionally specify the expiration policy of the API account. Default: never'
          type: string
          enum:
            - never
            - datetime
          example: never
        expirationDate:
          description: Optional expiration date of the API account
          type: string
          format: rfc3339
          example: '2025-05-10T23:59:59Z'
        tenants:
          description: a comma separated list of tenants allowed for that account. See tenant documentation for syntax.
          type: string
          example: '*'
        authorizationType:
          description: 'Authorization type for that account:  - ro: read-only (GET) access to all APIs - rw: read (GET) and write (other verbs) access to all APIs - acl: access control list based permission for API (need api-authorization plugin)'
          type: string
          enum:
            - rw
            - ro
            - acl
        acl:
          description: in case of ACL authorization type, the actual ACL
          type: array
          items:
            type: object
            properties:
              path:
                description: API path managed by that access control
                type: string
                example: directives/1ebee8c7-c898-4ee5-9470-139bfd80c442
              actions:
                description: List of HTTP verb allowed
                type: array
                items:
                  type: string
                  example: get
    color:
      type: object
      required:
        - red
        - blue
        - green
        - alpha
      properties:
        red:
          type: number
          description: percentage of red component
          minimum: 0
          maximum: 1
          example: 0.2
        blue:
          type: number
          description: percentage of blue component
          minimum: 0
          maximum: 1
          example: 0.235
        green:
          type: number
          description: percentage of green component
          minimum: 0
          maximum: 1
          example: 0.01
        alpha:
          type: number
          description: percentage of opacity
          minimum: 0
          maximum: 1
          example: 0.5
    logo:
      type: object
      required:
        - enable
      properties:
        enable:
          type: boolean
          description: Whether the wide logo is displayed or not
    branding-conf:
      type: object
      required:
        - displayBar
        - displayLabel
        - labelText
        - barColor
        - labelColor
        - wideLogo
        - smallLogo
        - displayBarLogin
        - displayMotd
        - motd
      properties:
        displayBar:
          type: boolean
          description: Whether header bar is displayed or not
        displayLabel:
          type: boolean
          description: Whether header bar's label is displayed or not
        labelText:
          type: string
          description: The header bar's label title
          example: Production
        barColor:
          $ref: '#/components/schemas/color'
        labelColor:
          $ref: '#/components/schemas/color'
        wideLogo:
          $ref: '#/components/schemas/logo'
        smallLogo:
          $ref: '#/components/schemas/logo'
        displayBarLogin:
          type: boolean
          description: Whether header bar is displayed in login page or not
        displayMotd:
          type: boolean
          description: Whether the message of the day is displayed in login page or not
        motd:
          type: string
          description: Message of the day in login page
          example: 'Welcome, please sign in:'
    campaign-status-enabled:
      type: object
      description: Campaign status
      properties:
        value:
          type: string
          format: enabled
    campaign-status-disabled:
      type: object
      description: Campaign status
      properties:
        value:
          type: string
          format: disabled
        reason:
          type: string
          description: Reason of to disable this campaign
    campaign-status-archived:
      type: object
      description: Campaign status
      properties:
        value:
          type: string
          format: archived
        reason:
          type: string
          description: Reason of to archive this campaign
        date:
          type: string
          format: rfc3339
          description: Date when the campaign was archived
    campaign-schedule-daily:
      type: object
      properties:
        start:
          type: object
          properties:
            hour:
              type: integer
              format: '[0-23]'
              description: Hour of the day the campaign should start
              example: 17
            minute:
              type: integer
              format: '[0-59]'
              description: Minute of the hour the campaign should start
              example: 22
          description: Date when the campaign should start
        end:
          type: object
          properties:
            hour:
              type: integer
              format: '[0-23]'
              description: Hour of the day the campaign should end
              example: 3
            minute:
              example: 42
              type: integer
              format: '[0-59]'
              description: Minute of the hour the campaign should end
          description: Date when the campaign should end
        tz:
          type: string
          description: IANA timezone ID associated with the start and end times of the campaign schedule
          example: Europe/Paris
        type:
          type: string
          format: daily
    campaign-schedule-weekly:
      type: object
      properties:
        start:
          type: object
          properties:
            day:
              type: integer
              format: '[1-7]'
              description: Day of the week the campaign should start
              example: 2
            hour:
              type: integer
              format: '[0-23]'
              description: Hour of the day the campaign should start
              example: 17
            minute:
              type: integer
              format: '[0-59]'
              description: Minute of the hour the campaign should start
              example: 22
          description: Date when the campaign should start
        end:
          type: object
          properties:
            day:
              type: integer
              format: '[1-7]'
              description: Day of the week the campaign should end
              example: 3
            hour:
              type: integer
              format: '[0-23]'
              description: Hour of the day the campaign should end
              example: 3
            minute:
              example: 42
              type: integer
              format: '[0-59]'
              description: Minute of the hour the campaign should end
          description: Date when the campaign should end
        tz:
          type: string
          description: IANA timezone ID associated with the start and end times of the campaign schedule
          example: Europe/Paris
        type:
          type: string
          format: weekly
    campaign-schedule-oneshot:
      type: object
      properties:
        start:
          type: string
          format: rfc3339
          description: Date when the campaign should start
        end:
          type: string
          format: rfc3339
          description: Date when the campaign should end
        type:
          type: string
          format: one-shot
    campaign-schedule-monthly:
      type: object
      properties:
        start:
          type: object
          properties:
            day:
              type: integer
              format: '[1-7]'
              description: Day of the week the campaign should start
            hour:
              type: integer
              format: '[0-23]'
              description: Hour of the day the campaign should start
            minute:
              type: integer
              format: '[0-59]'
              description: Minute of the hour the campaign should start
          description: Date when the campaign should start
        end:
          type: object
          properties:
            day:
              type: integer
              format: '[1-7]'
              description: Day of the week the campaign should end
            hour:
              type: integer
              format: '[0-23]'
              description: Hour of the day the campaign should end
            minute:
              type: integer
              format: '[0-59]'
              description: Minute of the hour the campaign should end
          description: Date when the campaign should end
        tz:
          type: string
          description: IANA timezone ID associated with the start and end times of the campaign schedule
          example: Europe/Paris
        position:
          type: integer
          format: '-2, -1, 1, 2, 3'
          description: Week during the month in which our campaign start, 1/2/3 means first/second/last, -1/-2 means Last/secondLast
        type:
          type: string
          format: monthly
    rule-target:
      type: string
      description: Node and special groups targeted by that rule
      examples:
        - special:all
        - special:all_exceptPolicyServers
        - special:all_policyServers
        - policyServer:${policyServerId}
        - group:${nodeGroupId}
    rule-targets:
      type: array
      description: Node and special groups targeted by that rule
      items:
        type: object
        example:
          include:
            or:
              - special:all
          exclude:
            or:
              - policyServer:root
              - group:cd377524-808b-4b42-8724-6ef308efeac7
        required:
          - include
          - exclude
        properties:
          include:
            type: object
            description: list of groups to include in rule application
            properties:
              or:
                type: array
                items:
                  $ref: '#/components/schemas/rule-target'
          exclude:
            type: object
            description: list of groups to exclude from rule application
            properties:
              or:
                type: array
                items:
                  $ref: '#/components/schemas/rule-target'
    package-spec:
      type: object
      description: System or software package specification
      properties:
        name:
          type: string
          description: Name of the package
          example: htop
        version:
          type: string
          description: Target version of the package
          example: '49.3'
        arch:
          type: string
          description: Architecture of the package
          example: x64
    campaign-system-update:
      type: object
      description: System update campaign details (type system-update, version 2)
      properties:
        reboot:
          type: string
          enum:
            - as-needed
            - disabled
            - always
            - services-only
          description: Define the behavior after update
        targets:
          type: array
          description: List of all  groups of node to target the campaign
          items:
            $ref: '#/components/schemas/rule-targets'
        excludedPackages:
          type: array
          description: List of system packages to omit from the update
          items:
            $ref: '#/components/schemas/package-spec'
    campaign-software-update:
      description: Software update campaign details (type software-update, version 1)
      properties:
        reboot:
          type: string
          enum:
            - as-needed
            - disabled
            - always
            - services-only
          description: Define the behavior after update
        targets:
          type: array
          description: List of all  groups of node to target the campaign
          items:
            $ref: '#/components/schemas/rule-targets'
        softwareUpdate:
          type: array
          description: List of all software packages to update
          items:
            $ref: '#/components/schemas/package-spec'
        excludedPackages:
          type: array
          description: List of software packages to omit from the update
          items:
            $ref: '#/components/schemas/package-spec'
    campaign-details:
      type: object
      properties:
        info:
          type: object
          description: common data about campaign
          properties:
            id:
              type: string
              description: Campaign id
              example: 0076a379-f32d-4732-9e91-33ab219d8fde
              format: uuid
            name:
              type: string
              description: Campaign name
              example: Update all systems
            description:
              type: string
              description: Campaign description
              example: ''
            status:
              oneOf:
                - $ref: '#/components/schemas/campaign-status-enabled'
                - $ref: '#/components/schemas/campaign-status-disabled'
                - $ref: '#/components/schemas/campaign-status-archived'
            schedule:
              oneOf:
                - $ref: '#/components/schemas/campaign-schedule-daily'
                - $ref: '#/components/schemas/campaign-schedule-weekly'
                - $ref: '#/components/schemas/campaign-schedule-oneshot'
                - $ref: '#/components/schemas/campaign-schedule-monthly'
        campaignType:
          type: string
          enum:
            - system-update
            - software-update
          description: Type of campaign (with version determine what kind of campaign you handle and the details object)
        version:
          type: integer
          example: 2
          description: Version of campaign (with type determine what kind of campaign you handle and the details object)
        details:
          oneOf:
            - $ref: '#/components/schemas/campaign-system-update'
            - $ref: '#/components/schemas/campaign-software-update'
    campaign-event-details:
      type: object
      properties:
        id:
          type: string
          description: Campaign event id
          example: 0076a379-f32d-4732-9e91-33ab219d8fde
          format: uuid
        name:
          type: string
          description: Campaign event name
          example: 'Update all systems #1'
        start:
          type: string
          description: Campaign event start date
          example: ''
        end:
          type: string
          description: Campaign event end date
          example: ''
        status:
          type: object
          properties:
            value:
              type: string
              enum:
                - scheduled
                - running
                - finished
                - skipped
            reason:
              type: string
              description: used only for skipped status
        campaignType:
          type: string
          enum:
            - system-update
            - software-update
          description: Type of campaign
        campaignId:
          type: string
          description: Id of the campaign for this event
    node-compliance-component:
      type: object
      required:
        - id
        - name
        - compliance
        - complianceDetails
        - values
      properties:
        id:
          type: string
          format: uuid
          description: id of the node
          example: 1c0957c1-9101-464e-b4cf-8983a5293a07
        name:
          type: string
          description: Name of the node
          example: server.rudder.local
        mode:
          type: string
          enum:
            - full-compliance
            - changes-only
            - reports-disabled
        compliance:
          type: number
          format: float
          description: Directive compliance level
          example: 83.34
        complianceDetails:
          type: object
          properties:
            successAlreadyOK:
              type: number
              format: float
              example: 100
            noReport:
              type: number
              format: float
              example: 0
            successNotApplicable:
              type: number
              format: float
              example: 0
            unexpectedMissingComponent:
              type: number
              format: float
              example: 0
            error:
              type: number
              format: float
              example: 0
            unexpectedUnknownComponent:
              type: number
              format: float
              example: 0
            successRepaired:
              type: number
              format: float
              example: 0
        values:
          type: array
          items:
            type: object
            required:
              - value
              - reports
            properties:
              value:
                type: string
                example: None
              reports:
                type: array
                items:
                  type: object
                  required:
                    - status
                    - message
                  properties:
                    status:
                      type: string
                      example: successAlreadyOK
                    message:
                      type: string
                      example: The MOTD file was correct
    directive-rule-compliance:
      type: object
      required:
        - id
        - name
        - compliance
        - complianceDetails
      properties:
        id:
          type: string
          format: uuid
          description: id of the rule
          example: 32377fd7-02fd-43d0-aab7-28460a91347b
        name:
          type: string
          description: Name of the rule
          example: Global configuration for all nodes
        mode:
          type: string
          enum:
            - full-compliance
            - changes-only
            - reports-disabled
        compliance:
          type: number
          format: float
          description: Directive compliance level
          example: 83.34
        complianceDetails:
          type: object
          properties:
            successAlreadyOK:
              type: number
              format: float
              example: 100
            noReport:
              type: number
              format: float
              example: 0
            successNotApplicable:
              type: number
              format: float
              example: 0
            unexpectedMissingComponent:
              type: number
              format: float
              example: 0
            error:
              type: number
              format: float
              example: 0
            unexpectedUnknownComponent:
              type: number
              format: float
              example: 0
            successRepaired:
              type: number
              format: float
              example: 0
        components:
          type: array
          items:
            type: object
            required:
              - name
              - compliance
              - complianceDetails
              - nodes
            properties:
              name:
                type: string
                description: Name of the component
                example: MOTD Configuration
              compliance:
                type: number
                format: float
                description: Directive compliance level
                example: 83.34
              complianceDetails:
                type: object
                properties:
                  successAlreadyOK:
                    type: number
                    format: float
                    example: 100
                  noReport:
                    type: number
                    format: float
                    example: 0
                  successNotApplicable:
                    type: number
                    format: float
                    example: 0
                  unexpectedMissingComponent:
                    type: number
                    format: float
                    example: 0
                  error:
                    type: number
                    format: float
                    example: 0
                  unexpectedUnknownComponent:
                    type: number
                    format: float
                    example: 0
                  successRepaired:
                    type: number
                    format: float
                    example: 0
              nodes:
                $ref: '#/components/schemas/node-compliance-component'
    rule-compliance-component:
      type: object
      required:
        - id
        - name
        - compliance
        - complianceDetails
        - components
      properties:
        id:
          type: string
          format: uuid
          description: id of the rule
          example: 835c068d-f01e-44c0-a0f4-7a436d46ad35
        name:
          type: string
          description: Name of the rule
          example: Test users
        compliance:
          type: number
          format: float
          description: Rule compliance level
          example: 100
        complianceDetails:
          type: object
          properties:
            successAlreadyOK:
              type: number
              format: float
              example: 66.67
            noReport:
              type: number
              format: float
              example: 0
            successNotApplicable:
              type: number
              format: float
              example: 33.33
            unexpectedMissingComponent:
              type: number
              format: float
              example: 0
            error:
              type: number
              format: float
              example: 0
            unexpectedUnknownComponent:
              type: number
              format: float
              example: 0
            successRepaired:
              type: number
              format: float
              example: 0
        components:
          type: array
          items:
            type: object
            required:
              - name
              - compliance
              - complianceDetails
              - values
            properties:
              name:
                type: string
                description: Name of the component
                example: test directive
              compliance:
                type: number
                format: float
                description: directive compliance level
                example: 100
              complianceDetails:
                type: object
                properties:
                  successAlreadyOK:
                    type: number
                    format: float
                    example: 66.67
                  noReport:
                    type: number
                    format: float
                    example: 0
                  successNotApplicable:
                    type: number
                    format: float
                    example: 33.33
                  unexpectedMissingComponent:
                    type: number
                    format: float
                    example: 0
                  error:
                    type: number
                    format: float
                    example: 0
                  unexpectedUnknownComponent:
                    type: number
                    format: float
                    example: 0
                  successRepaired:
                    type: number
                    format: float
                    example: 0
              values:
                type: array
                items:
                  type: object
                  required:
                    - value
                    - reports
                  properties:
                    value:
                      type: string
                      example: tutu
                    reports:
                      type: array
                      items:
                        type: object
                        required:
                          - status
                          - message
                        properties:
                          status:
                            type: string
                            example: successAlreadyOK
                          message:
                            type: string
                            example: The user tutu ( Without any defined full name ) is already present on the system
    directive-node-compliance:
      type: object
      required:
        - id
        - name
        - compliance
        - complianceDetails
        - rules
      properties:
        id:
          type: string
          format: uuid
          description: id of the node
          example: b6ded8e2-2709-4986-973d-8e5522d20718
        name:
          type: string
          description: Name of the node
          example: agent1.rudder.local
        compliance:
          type: number
          format: float
          description: Directive compliance level
          example: 83.34
        complianceDetails:
          type: object
          properties:
            successAlreadyOK:
              type: number
              format: float
              example: 100
            noReport:
              type: number
              format: float
              example: 0
            successNotApplicable:
              type: number
              format: float
              example: 0
            unexpectedMissingComponent:
              type: number
              format: float
              example: 0
            error:
              type: number
              format: float
              example: 0
            unexpectedUnknownComponent:
              type: number
              format: float
              example: 0
            successRepaired:
              type: number
              format: float
              example: 0
        rules:
          $ref: '#/components/schemas/rule-compliance-component'
    compliance-directive-id:
      type: object
      required:
        - result
        - action
        - data
      properties:
        result:
          type: string
          description: Result of the request
          enum:
            - success
            - error
          example: success
        action:
          type: string
          description: The id of the action
          enum:
            - getDirectiveComplianceId
        data:
          type: object
          required:
            - directiveCompliance
          properties:
            directiveCompliance:
              type: object
              required:
                - id
                - name
                - mode
                - compliance
                - complianceDetails
                - rules
                - nodes
              properties:
                id:
                  type: string
                  format: uuid
                  description: id of the directive
                  example: 9a1773c9-0889-40b6-be89-f6504443ac1b
                name:
                  type: string
                  description: Name of the directive
                  example: test directive
                mode:
                  type: string
                  enum:
                    - full-compliance
                    - changes-only
                    - reports-disabled
                compliance:
                  type: number
                  format: float
                  description: Directive compliance level
                  example: 83.34
                complianceDetails:
                  type: object
                  properties:
                    successAlreadyOK:
                      type: number
                      format: float
                      example: 66.68
                    noReport:
                      type: number
                      format: float
                      example: 7.45
                    successNotApplicable:
                      type: number
                      format: float
                      example: 16.66
                    unexpectedMissingComponent:
                      type: number
                      format: float
                      example: 2.63
                    error:
                      type: number
                      format: float
                      example: 1.32
                    unexpectedUnknownComponent:
                      type: number
                      format: float
                      example: 2.63
                    successRepaired:
                      type: number
                      format: float
                      example: 2.63
                rules:
                  $ref: '#/components/schemas/directive-rule-compliance'
                nodes:
                  $ref: '#/components/schemas/directive-node-compliance'
    compliance-directive-id-csv:
      type: string
      format: binary
      example: Rule, Component, Node, Value, Status, Message\n Global configuration for all nodes, MOTD Configuration, server.rudder.local, None, successAlreadyOK, The MOTD file was correct\n Global configuration for all nodes, MOTD Configuration, agent1.rudder.local, None, successAlreadyOK, The MOTD file was correct\n Test user, Users, server.rudder.local, toto, successAlreadyOK, The user toto ( Without any defined full name ) is already present on the system\n Test user, Password, server.rudder.local, toto, successAlreadyOK, The user toto ( Without any defined full name ) password change is not required\n Test user, Home directory, server.rudder.local, toto, successNotApplicable, The user toto doesn't need to have its home directory checked"\n
    group-rule-compliance-directives:
      type: object
      required:
        - id
        - name
        - policyMode
        - compliance
        - complianceDetails
        - components
      properties:
        id:
          type: string
          format: uuid
          description: id of the directive
          example: 9a1773c9-0889-40b6-be89-f6504443ac1b
        name:
          type: string
          description: Name of the directive
          example: test directive
        policyMode:
          type: string
          enum:
            - default
            - audit
            - enforce
          description: Policy mode of the rule
          example: audit
        compliance:
          type: number
          format: float
          description: Directive compliance level
          example: 83.34
        complianceDetails:
          type: object
          properties:
            successAlreadyOK:
              type: number
              format: float
              example: 66.68
            noReport:
              type: number
              format: float
              example: 7.45
            successNotApplicable:
              type: number
              format: float
              example: 16.66
            unexpectedMissingComponent:
              type: number
              format: float
              example: 2.63
            error:
              type: number
              format: float
              example: 1.32
            unexpectedUnknownComponent:
              type: number
              format: float
              example: 2.63
            successRepaired:
              type: number
              format: float
              example: 2.63
        components:
          type: array
          items:
            type: object
            required:
              - name
              - compliance
              - complianceDetails
              - nodes
            properties:
              name:
                type: string
                description: Name of the component
                example: Test users
              compliance:
                type: number
                format: float
                description: Component compliance level
                example: 100
              complianceDetails:
                type: object
                properties:
                  successAlreadyOK:
                    type: number
                    format: float
                    example: 66.67
                  noReport:
                    type: number
                    format: float
                    example: 0
                  successNotApplicable:
                    type: number
                    format: float
                    example: 33.33
                  unexpectedMissingComponent:
                    type: number
                    format: float
                    example: 0
                  error:
                    type: number
                    format: float
                    example: 0
                  unexpectedUnknownComponent:
                    type: number
                    format: float
                    example: 0
                  successRepaired:
                    type: number
                    format: float
                    example: 0
              nodes:
                type: array
                items:
                  $ref: '#/components/schemas/node-compliance-component'
    group-rule-compliance:
      type: object
      required:
        - id
        - name
        - compliance
        - complianceDetails
        - directives
      properties:
        id:
          type: string
          format: uuid
          description: id of the rule
          example: 32377fd7-02fd-43d0-aab7-28460a91347b
        name:
          type: string
          description: Name of the rule
          example: Global configuration for all nodes
        mode:
          type: string
          enum:
            - full-compliance
            - changes-only
            - reports-disabled
        policyMode:
          type: string
          enum:
            - default
            - audit
            - enforce
          description: Policy mode of the rule
          example: audit
        compliance:
          type: number
          format: float
          description: Directive compliance level
          example: 83.34
        complianceDetails:
          type: object
          properties:
            successAlreadyOK:
              type: number
              format: float
              example: 100
            noReport:
              type: number
              format: float
              example: 0
            successNotApplicable:
              type: number
              format: float
              example: 0
            unexpectedMissingComponent:
              type: number
              format: float
              example: 0
            error:
              type: number
              format: float
              example: 0
            unexpectedUnknownComponent:
              type: number
              format: float
              example: 0
            successRepaired:
              type: number
              format: float
              example: 0
        directives:
          type: array
          items:
            $ref: '#/components/schemas/group-rule-compliance-directives'
    group-node-compliance-rules:
      type: object
      required:
        - id
        - name
        - policyMode
        - compliance
        - complianceDetails
        - directives
      properties:
        id:
          type: string
          format: uuid
          description: id of the rule
          example: 835c068d-f01e-44c0-a0f4-7a436d46ad35
        name:
          type: string
          description: Name of the rule
          example: Test users
        policyMode:
          type: string
          enum:
            - default
            - audit
            - enforce
          description: Policy mode of the rule
          example: audit
        compliance:
          type: number
          format: float
          description: Rule compliance level
          example: 100
        complianceDetails:
          type: object
          properties:
            successAlreadyOK:
              type: number
              format: float
              example: 66.67
            noReport:
              type: number
              format: float
              example: 0
            successNotApplicable:
              type: number
              format: float
              example: 33.33
            unexpectedMissingComponent:
              type: number
              format: float
              example: 0
            error:
              type: number
              format: float
              example: 0
            unexpectedUnknownComponent:
              type: number
              format: float
              example: 0
            successRepaired:
              type: number
              format: float
              example: 0
        directives:
          type: array
          items:
            type: object
            required:
              - id
              - name
              - compliance
              - complianceDetails
              - components
            properties:
              id:
                type: string
                format: uuid
                description: id of the directive
                example: 835c068d-f01e-44c0-a0f4-7a436d46ad35
              name:
                type: string
                description: Name of the directive
                example: Test users
              policyMode:
                type: string
                enum:
                  - default
                  - audit
                  - enforce
                description: Policy mode of the directive
                example: audit
              compliance:
                type: number
                format: float
                description: Directive compliance level
                example: 100
              complianceDetails:
                type: object
                properties:
                  successAlreadyOK:
                    type: number
                    format: float
                    example: 66.67
                  noReport:
                    type: number
                    format: float
                    example: 0
                  successNotApplicable:
                    type: number
                    format: float
                    example: 33.33
                  unexpectedMissingComponent:
                    type: number
                    format: float
                    example: 0
                  error:
                    type: number
                    format: float
                    example: 0
                  unexpectedUnknownComponent:
                    type: number
                    format: float
                    example: 0
                  successRepaired:
                    type: number
                    format: float
                    example: 0
              components:
                type: array
                items:
                  type: object
                  required:
                    - name
                    - compliance
                    - complianceDetails
                    - values
                  properties:
                    name:
                      type: string
                      description: Name of the component
                      example: MOTD Configuration
                    compliance:
                      type: number
                      format: float
                      description: Directive compliance level
                      example: 100
                    complianceDetails:
                      type: object
                      properties:
                        successAlreadyOK:
                          type: number
                          format: float
                          example: 100
                        noReport:
                          type: number
                          format: float
                          example: 0
                        successNotApplicable:
                          type: number
                          format: float
                          example: 0
                        unexpectedMissingComponent:
                          type: number
                          format: float
                          example: 0
                        error:
                          type: number
                          format: float
                          example: 0
                        unexpectedUnknownComponent:
                          type: number
                          format: float
                          example: 0
                        successRepaired:
                          type: number
                          format: float
                          example: 0
                    values:
                      type: array
                      items:
                        type: object
                        required:
                          - value
                          - reports
                        properties:
                          value:
                            type: string
                            example: Hello John Doe
                          reports:
                            type: array
                            items:
                              type: object
                              required:
                                - status
                              properties:
                                status:
                                  type: string
                                  example: successAlreadyOK
                                message:
                                  type: string
                                  example: The MOTD is correctly configured with "Hello John Doe"
    group-node-compliance:
      type: object
      required:
        - id
        - name
        - policyMode
        - compliance
        - complianceDetails
        - rules
      properties:
        id:
          type: string
          format: uuid
          description: id of the node
          example: b6ded8e2-2709-4986-973d-8e5522d20718
        name:
          type: string
          description: Name of the node
          example: agent1.rudder.local
        policyMode:
          type: string
          enum:
            - default
            - audit
            - enforce
          description: Policy mode of the node
          example: audit
        compliance:
          type: number
          format: float
          description: Node compliance level
          example: 100
        complianceDetails:
          type: object
          properties:
            successAlreadyOK:
              type: number
              format: float
              example: 100
            noReport:
              type: number
              format: float
              example: 0
            successNotApplicable:
              type: number
              format: float
              example: 0
            unexpectedMissingComponent:
              type: number
              format: float
              example: 0
            error:
              type: number
              format: float
              example: 0
            unexpectedUnknownComponent:
              type: number
              format: float
              example: 0
            successRepaired:
              type: number
              format: float
              example: 0
        rules:
          type: array
          items:
            $ref: '#/components/schemas/group-node-compliance-rules'
    cveDetails:
      type: object
      properties:
        id:
          type: string
          description: CVE id
          example: CVE-2019-5953
          format: cve id
        publishedDate:
          type: string
          description: Date the CVE was published
          example: '2019-05-17 18:29:00+02'
          format: date-time
        lastModifiedDate:
          type: string
          description: last Date the CVE was modified
          example: '2019-07-03 01:15:00+02'
          format: date-time
        description:
          type: string
          description: CVE Description
          example: Buffer overflow in GNU Wget 1.20.1 and earlier allows remote attackers to cause a denial-of-service (DoS) or may execute an arbitrary code via unspecified vectors.
        cweIds:
          type: array
          description: List of CWE (Common Weakness Enumeration) of the CVE
          items:
            type: string
            example: CWE-119
            description: id of a CWE
        cvssv3:
          type: object
          description: CVSS V3 of the CVE
          properties:
            baseScore:
              type: number
              format: float (0 to 10)
              example: 9.8
              description: CVSS V3 base score
            vector:
              type: string
              example: CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
              description: CVSS V3 vector
            baseSeverity:
              type: string
              description: CVSS V3 Severity
              enum:
                - critical
                - high
                - medium
                - low
                - none
        cvssv2:
          type: object
          description: CVSS V2 of the CVE
          properties:
            baseScore:
              type: integer
              description: CVSS V2 base score
            vector:
              type: string
              description: CVSS V2 vector
    cveCheck:
      type: object
      properties:
        cveId:
          type: string
          description: CVE id
          example: CVE-2019-5953
          format: CVE id
        score:
          type: object
          description: CVE score
          properties:
            value:
              type: number
              example: 9.5
              format: A score between 0 and 10 as a float
            severity:
              type: string
              example: Critical
        nodes:
          type: array
          description: Id of Nodes affected by this CVE
          items:
            type: string
            description: Node id
        packages:
          type: array
          description: Packages affected by this CVE
          items:
            type: object
            description: Packages affected by this CVE
            properties:
              name:
                type: string
                description: Name of the package affected
                example: libssh2-1
              version:
                type: string
                description: Version of the package affected
                example: 1.7.0-1
    datasource:
      type: object
      properties:
        id:
          type: string
          description: Unique identifier of the data source to create.
          example: test-data-source
        name:
          type: string
          description: The human readable name of the data source to create.
          example: Test data source
        description:
          type: string
          description: Description of the goal of the data source to create.
          example: Synchronize example data from the CMDB
        enabled:
          type: boolean
          description: Enable or disable data source.
          example: true
        updateTimeout:
          type: integer
          description: Duration in seconds before aborting data source update. The main goal is to prevent never ending requests. If a periodicity if configured, you should set that timeout at a lower value.
          example: 30
        runParameters:
          type: object
          description: Parameters to configure when the data source is fetched to update node properties.
          properties:
            onGeneration:
              type: boolean
              example: true
              description: Trigger a fetch at the beginning of a policy generation
            onNewNode:
              type: boolean
              example: true
              description: Trigger a fetch when a new node is accepted, for that node
            schedule:
              type: object
              description: Configure if data source should be fetch periodically
              properties:
                type:
                  type: string
                  description: '`scheduled` enables periodic update, `notscheduled` disables them'
                  enum:
                    - scheduled
                    - notscheduled
                  example: scheduled
        type:
          type: object
          description: Define and configure data source type.
          properties:
            name:
              type: string
              description: Data source type name
              example: HTTP
              enum:
                - HTTP
            parameters:
              type: object
              description: You can use Rudder variable expansion (`${rudder.node`, `${node.properties...}`)
              properties:
                url:
                  type: string
                  description: URL to contact. Rudder expansion available.
                  example: http://jsonplaceholder.typicode.com/users/1
                requestMethod:
                  type: string
                  example: GET
                  enum:
                    - GET
                    - POST
                  description: HTTP method to use to contact the URL.
                headers:
                  type: array
                  description: Represent HTTP headers for the query. Rudder expansion available.
                  items:
                    type: object
                    properties:
                      name:
                        type: string
                        example: X-API-Key
                        description: Name of the header
                      value:
                        type: string
                        example: 05ce8e3d9df6
                        description: Value of the header
                path:
                  type: string
                  description: JSON path (as defined in [the specification](https://github.com/jayway/JsonPath/), without the leading `$.`) to find the interesting sub-json or string/number/boolean value in the answer. Let empty to use the whole answer as value.
                checkSsl:
                  type: boolean
                  example: true
                  description: Check SSL certificate validity for https. Must be set to false for self-signed certificate
                requestTimeout:
                  type: integer
                  example: 10
                  description: Timeout in seconds for each HTTP request
                requestMode:
                  type: object
                  description: Configure the strategy used to query the HTTP data source.
                  properties:
                    name:
                      type: string
                      description: Node by node strategy
                      enum:
                        - byNode
                      example: byNode
    directive:
      type: object
      properties:
        id:
          type: string
          format: uuid
          example: 91252ea2-feb2-412d-8599-c6945fee02c4
          description: Directive id
        displayName:
          type: string
          example: 91252ea2-feb2-412d-8599-c6945fee02c4
          description: Human readable name of the directive
        shortDescription:
          type: string
          example: 91252ea2-feb2-412d-8599-c6945fee02c4
          description: One line directive description
        longDescription:
          type: string
          format: markdown
          example: |-
            # Documentation
            * [Ticket link](https://tickets.example.com/issues/3456)
          description: Description of the technique (rendered as markdown)
        techniqueName:
          type: string
          example: userManagement
          description: Directive id
        techniqueVersion:
          type: string
          example: '8.0'
          description: Directive id
        priority:
          type: integer
          description: Directive priority. `0` has highest priority.
          example: 5
          minimum: 0
          maximum: 10
        enabled:
          type: boolean
          example: true
          description: Is the directive enabled
        system:
          type: boolean
          description: If true it is an internal Rudder directive
          example: false
        policyMode:
          type: string
          enum:
            - enforce
            - audit
          description: Policy mode of the directive
          example: audit
        tags:
          type: array
          items:
            type: object
            additionalProperties: true
            description: Key-value pairs
            example:
              customer: MyCompany
        parameters:
          type: object
          description: Directive parameters (depends on the source technique)
          example:
            name: sections
            sections:
              - section:
                  name: File to manage
                  vars:
                    - var:
                        name: FILE_AND_FOLDER_MANAGEMENT_ACTION
                        value: copy
                    - var:
                        name: FILE_AND_FOLDER_MANAGEMENT_SOURCE
                        value: /vagrant/node.sh
                    - var:
                        name: FILE_AND_FOLDER_MANAGEMENT_SYMLINK_ENFORCE
                        value: 'false'
                  sections:
                    - section:
                        name: File
                        vars:
                          - var:
                              name: FILE_AND_FOLDER_MANAGEMENT_PATH
                              value: /root/test
                    - section:
                        name: File cleaning options
                        vars:
                          - var:
                              name: FILE_AND_FOLDER_DELETION_DAYS
                              value: '0'
                          - var:
                              name: FILE_AND_FOLDER_DELETION_OPTION
                              value: none
                          - var:
                              name: FILE_AND_FOLDER_DELETION_PATTERN
                              value: .*
                    - section:
                        name: Permissions
                        vars:
                          - var:
                              name: FILE_AND_FOLDER_MANAGEMENT_CHECK_PERMISSIONS
                              value: 'false'
                          - var:
                              name: FILE_AND_FOLDER_MANAGEMENT_GROUP
                              value: ''
                          - var:
                              name: FILE_AND_FOLDER_MANAGEMENT_OWNER
                              value: ''
                          - var:
                              name: FILE_AND_FOLDER_MANAGEMENT_PERM
                              value: '000'
                          - var:
                              name: FILE_AND_FOLDER_MANAGEMENT_RECURSIVE
                              value: '1'
                    - section:
                        name: Post-modification hook
                        vars:
                          - var:
                              name: FILE_AND_FOLDER_MANAGEMENT_POST_HOOK_COMMAND
                              value: ''
                          - var:
                              name: FILE_AND_FOLDER_MANAGEMENT_POST_HOOK_RUN
                              value: 'false'
    directive-new:
      type: object
      properties:
        source:
          type: string
          format: uuid
          example: b9f6d98a-28bc-4d80-90f7-d2f14269e215
          description: The id of the directive the clone will be based onto. If this parameter if provided,  the new directive will be a clone of this source. Other value will override values from the source.
        id:
          type: string
          format: uuid
          example: 91252ea2-feb2-412d-8599-c6945fee02c4
          description: Directive id
        displayName:
          type: string
          example: 91252ea2-feb2-412d-8599-c6945fee02c4
          description: Human readable name of the directive
        shortDescription:
          type: string
          example: 91252ea2-feb2-412d-8599-c6945fee02c4
          description: One line directive description
        longDescription:
          type: string
          format: markdown
          example: |-
            # Documentation
            * [Ticket link](https://tickets.example.com/issues/3456)
          description: Description of the technique (rendered as markdown)
        techniqueName:
          type: string
          example: userManagement
          description: Directive id
        techniqueVersion:
          type: string
          example: '8.0'
          description: Directive id
        priority:
          type: integer
          description: Directive priority. `0` has highest priority.
          example: 5
          minimum: 0
          maximum: 10
        enabled:
          type: boolean
          example: true
          description: Is the directive enabled
        system:
          type: boolean
          description: If true it is an internal Rudder directive
          example: false
        tags:
          type: array
          items:
            type: object
            additionalProperties: true
            description: Key-value pairs
            example:
              customer: MyCompany
        parameters:
          type: object
          description: Directive parameters (depends on the source technique)
          example:
            name: sections
            sections:
              - section:
                  name: File to manage
                  vars:
                    - var:
                        name: FILE_AND_FOLDER_MANAGEMENT_ACTION
                        value: copy
                    - var:
                        name: FILE_AND_FOLDER_MANAGEMENT_SOURCE
                        value: /vagrant/node.sh
                    - var:
                        name: FILE_AND_FOLDER_MANAGEMENT_SYMLINK_ENFORCE
                        value: 'false'
                  sections:
                    - section:
                        name: File
                        vars:
                          - var:
                              name: FILE_AND_FOLDER_MANAGEMENT_PATH
                              value: /root/test
                    - section:
                        name: File cleaning options
                        vars:
                          - var:
                              name: FILE_AND_FOLDER_DELETION_DAYS
                              value: '0'
                          - var:
                              name: FILE_AND_FOLDER_DELETION_OPTION
                              value: none
                          - var:
                              name: FILE_AND_FOLDER_DELETION_PATTERN
                              value: .*
                    - section:
                        name: Permissions
                        vars:
                          - var:
                              name: FILE_AND_FOLDER_MANAGEMENT_CHECK_PERMISSIONS
                              value: 'false'
                          - var:
                              name: FILE_AND_FOLDER_MANAGEMENT_GROUP
                              value: ''
                          - var:
                              name: FILE_AND_FOLDER_MANAGEMENT_OWNER
                              value: ''
                          - var:
                              name: FILE_AND_FOLDER_MANAGEMENT_PERM
                              value: '000'
                          - var:
                              name: FILE_AND_FOLDER_MANAGEMENT_RECURSIVE
                              value: '1'
                    - section:
                        name: Post-modification hook
                        vars:
                          - var:
                              name: FILE_AND_FOLDER_MANAGEMENT_POST_HOOK_COMMAND
                              value: ''
                          - var:
                              name: FILE_AND_FOLDER_MANAGEMENT_POST_HOOK_RUN
                              value: 'false'
    directive-tree:
      type: object
      properties:
        name:
          type: string
          example: Application management
          description: Category name
        description:
          type: string
          example: This category contains Techniques designed to install, configure and manage applications
          description: Category description
        subCategories:
          description: Sub categories of the category
          type: array
          items:
            type: object
            properties:
              name:
                type: string
                description: Category name
              description:
                type: string
                description: Category description
              subCategories:
                type: array
                description: Sub categories of the sub category
              techniques:
                type: array
                description: Techniques of the sub category
        techniques:
          type: array
          items:
            type: object
            properties:
              name:
                type: string
                example: checkGenericFileContent
                description: technique name
              directives:
                type: array
                description: Directives of the techniques
                items:
                  $ref: '#/components/schemas/directive'
    group:
      type: object
      properties:
        id:
          type: string
          format: uuid
          description: Group id
          default: '{autogenerated}'
          example: 32d013f7-b6d8-46c8-99d3-016307fa66c0
        displayName:
          type: string
          description: Name of the group
          example: Ubuntu 18.04 nodes
        description:
          type: string
          description: Group description
          example: Documentation for the group
        query:
          type: object
          description: The criteria defining the group
          properties:
            select:
              description: What kind of data we want to include. Here we can get policy servers/relay by setting `nodeAndPolicyServer`. Only used if `where` is defined.
              type: string
              default: node
            composition:
              type: string
              enum:
                - and
                - or
              default: and
              description: Boolean operator to use between each  `where` criteria.
              example: and
            where:
              type: array
              description: List of criteria
              items:
                type: object
                properties:
                  objectType:
                    type: string
                    description: Type of the object
                    example: node
                  attribute:
                    description: Attribute to compare
                    example: OS
                    type: string
                  comparator:
                    description: Comparator to use
                    example: eq
                    type: string
                  value:
                    type: string
                    example: Linux
                    description: Value to compare against
        nodeIds:
          type: array
          description: List of nodes in the group
          items:
            type: string
            format: uuid (or "root")
            example: 109142a2-40eb-4e6d-84b4-7ebe3670474c
            description: Node in the group
        dynamic:
          type: boolean
          default: true
          description: Should the group be dynamically refreshed (if not, it is a static group)
        enabled:
          type: boolean
          default: true
          description: Enable or disable the group
        groupClass:
          type: array
          items:
            type: string
            format: condition
            example: group_ubuntu
            description: Conditions defined on nodes in the groups. There is one based on the group id, and one based on the group name.
        properties:
          type: array
          description: Group properties
          items:
            type: object
            required:
              - name
              - value
            properties:
              name:
                type: string
                description: Property name
                example: os
              value:
                format: string or JSON
                example: debian10
                description: Property value (can be a string or JSON object)
    group-new:
      type: object
      required:
        - displayName
        - category
      properties:
        source:
          type: string
          format: uuid
          example: b9f6d98a-28bc-4d80-90f7-d2f14269e215
          description: The id of the group the clone will be based onto. If this parameter if provided,  the new group will be a clone of this source. Other value will override values from the source.
        category:
          type: string
          format: uuid
          description: Id of the new group's category
          example: e17ecf6a-a9f2-44de-a97c-116d24d30ff4
        id:
          type: string
          format: uuid
          description: Group id, only provide it when needed.
          default: '{autogenerated}'
          example: 32d013f7-b6d8-46c8-99d3-016307fa66c0
        displayName:
          type: string
          description: Name of the group
          example: Ubuntu 18.04 nodes
        description:
          type: string
          description: Group description
          example: Documentation for the group
        query:
          type: object
          description: The criteria defining the group. If not provided, the group will be empty.
          properties:
            select:
              description: What kind of data we want to include. Here we can get policy servers/relay by setting `nodeAndPolicyServer`. Only used if `where` is defined.
              type: string
              default: node
            composition:
              type: string
              enum:
                - and
                - or
              default: and
              description: Boolean operator to use between each  `where` criteria.
              example: and
            where:
              type: array
              description: List of criteria
              items:
                type: object
                properties:
                  objectType:
                    type: string
                    description: Type of the object
                    example: node
                  attribute:
                    description: Attribute to compare
                    example: OS
                    type: string
                  comparator:
                    description: Comparator to use
                    example: eq
                    type: string
                  value:
                    type: string
                    example: Linux
                    description: Value to compare against
        dynamic:
          type: boolean
          default: true
          description: Should the group be dynamically refreshed (if not, it is a static group)
        enabled:
          type: boolean
          default: true
          description: Enable or disable the group
        properties:
          type: array
          description: Group properties
          items:
            type: object
            required:
              - name
              - value
            properties:
              name:
                type: string
                description: Property name
                example: os
              value:
                format: string or JSON
                example: debian10
                description: Property value (can be a string or JSON object)
    group-category:
      type: object
      required:
        - parent
        - name
      properties:
        parent:
          type: string
          format: uuid
          example: b9f6d98a-28bc-4d80-90f7-d2f14269e215
          description: The parent category of the groups
        id:
          type: string
          format: uuid
          description: Group category id, only provide it when needed.
          default: '{autogenerated}'
          example: 32d013f7-b6d8-46c8-99d3-016307fa66c0
        name:
          type: string
          description: Name of the group category
          example: Hardware groups
        description:
          type: string
          description: Group category description
          example: Nodes by hardware provider
    group-category-update:
      type: object
      required:
        - parent
        - name
      properties:
        parent:
          type: string
          format: uuid
          example: b9f6d98a-28bc-4d80-90f7-d2f14269e215
          description: The parent category of the groups
        name:
          type: string
          description: Name of the group category
          example: Hardware groups
        description:
          type: string
          description: Group category description
          example: Nodes by hardware provider
    group-update:
      type: object
      properties:
        category:
          type: string
          format: uuid
          description: Id of the new group's category
          example: e17ecf6a-a9f2-44de-a97c-116d24d30ff4
        displayName:
          type: string
          description: Name of the group
          example: Ubuntu 18.04 nodes
        description:
          type: string
          description: Group description
          example: Documentation for the group
        query:
          type: object
          description: The criteria defining the group. If not provided, the group will be empty.
          properties:
            select:
              description: What kind of data we want to include. Here we can get policy servers/relay by setting `nodeAndPolicyServer`. Only used if `where` is defined.
              type: string
              default: node
            composition:
              type: string
              enum:
                - and
                - or
              default: and
              description: Boolean operator to use between each  `where` criteria.
              example: and
            where:
              type: array
              description: List of criteria
              items:
                type: object
                properties:
                  objectType:
                    type: string
                    description: Type of the object
                    example: node
                  attribute:
                    description: Attribute to compare
                    example: OS
                    type: string
                  comparator:
                    description: Comparator to use
                    example: eq
                    type: string
                  value:
                    type: string
                    example: Linux
                    description: Value to compare against
        dynamic:
          type: boolean
          default: true
          description: Should the group be dynamically refreshed (if not, it is a static group)
        enabled:
          type: boolean
          default: true
          description: Enable or disable the group
    api-version:
      type: object
      properties:
        latest:
          type: integer
          description: Latest API version available
          example: 12
        all:
          type: array
          description: List of API version and status
          items:
            type: object
            required:
              - version
              - status
            properties:
              version:
                type: integer
                description: API Version
                example: 12
              status:
                format: string
                enum:
                  - maintained
                  - deprecated
                example: maintained
                description: Status of the API, either maintained or deprecated
    api-versions:
      type: object
      properties:
        latest:
          type: integer
          description: Latest API version available
          example: 12
        all:
          type: array
          description: List of API version and status
          items:
            $ref: '#/components/schemas/api-version'
    api-endpoints:
      type: array
      items:
        type: object
        additionalProperties: true
        description: Objects with two fields, the first one has the endpoint name as key and its description as value, the second one has HTTP verb to use (GET, POST PUT, DELETE) as key and the supported version an API path for value.
        example:
          listAcceptedNodes: List all accepted nodes with configurable details level
          GET: '[8,9,10,11,12,13] /nodes'
    method-parameter:
      type: object
      required:
        - name
        - description
        - constraints
        - type
      properties:
        name:
          type: string
          description: Parameter name
          example: package
        description:
          type: string
          description: Description of this parameter
          example: Name of a package to install
        constraints:
          type: object
          required:
            - allow_empty_string
            - allow_whitespace_string
            - max_length
            - min_length
            - regex
            - not_regex
            - select
          properties:
            allow_empty_string:
              type: boolean
              description: Can this parameter be empty?
              example: false
            allow_whitespace_string:
              type: boolean
              description: Can this parameter allow trailing/ending spaces, or even a full whitespace string ?
              example: true
            max_length:
              type: integer
              description: Maximum size of a parameter
              example: 250
            min_length:
              type: integer
              description: Minimal size of a parameter
              example: 5
            regex:
              type: string
              description: A regex to validate this parameter
              example: .*
            not_regex:
              type: string
              description: A regexp to invalidate this parameter
              example: ^c.*
            select:
              type: array
              description: List of items authorized for this parameter
              items:
                type: string
                example: '!='
        type:
          type: string
          description: Type of the parameter
          enum:
            - String
            - HereString
          default: String
    methods:
      type: object
      description: List of available generic methods
      required:
        - id
        - name
        - version
        - category
        - desc
        - documentation
        - parameters
        - agents
        - condition
        - deprecated
      properties:
        id:
          type: string
          description: Method id
          example: package_present
        name:
          type: string
          description: Method name
          example: Package present
        version:
          type: string
          description: Version of this technique
          example: '1.0'
        category:
          type: string
          description: Category of this technique
          example: user_techniques
        desc:
          type: string
          description: Description of this method
          example: Enforce the presence of a package
        documentation:
          type: string
          description: Full documentation of this method
          example: This methods allows...
        parameters:
          type: array
          description: Parameters for this technique
          items:
            $ref: '#/components/schemas/method-parameter'
        agents:
          type: array
          description: List of agents compatible with this method
          items:
            type: string
            description: Name of an agent
            example: dsc
        condition:
          type: object
          description: Conditions generated by this method
          properties:
            prefix:
              type: string
              description: Prefix used to generate condition
              example: package_present
            parameter:
              type: string
              description: Id of the parameter used to generate condition
              example: package
        deprecated:
          type: object
          description: Is this method deprecated?
          properties:
            info:
              type: string
              description: Information notice about the deprecation, especially how to replace it
              example: The method has been deprecated because of X
            replacedBy:
              type: string
              description: Id of the method replacing this method
              example: package_present
    node-full:
      type: object
      required:
        - id
        - hostname
        - status
        - ipAddresses
        - managementTechnology
        - policyServerId
        - properties
      properties:
        id:
          type: string
          description: Unique id of the node
          format: uuid (or "root")
          example: 9a1773c9-0889-40b6-be89-f6504443ac1b
        hostname:
          type: string
          description: Fully qualified name of the node
          example: node1.example.com
        status:
          type: string
          description: Status of the node
          enum:
            - pending
            - accepted
            - deleted
          example: accepted
        architectureDescription:
          type: string
          example: x86_64
          description: Information about CPU architecture (32/64 bits)
        description:
          type: string
          example: ''
          description: A human intended description of the node (not used)
        ipAddresses:
          type: array
          description: IP addresses of the node (IPv4 and IPv6)
          items:
            type: string
            example: 192.168.23.45
            description: IP of the node
        lastRunDate:
          type: string
          format: date-time
          example: '2020-02-29T14:48:28Z'
          description: 'Date and time of the latest run, if one is available (node time). Up to API v11, format was: "YYYY-MM-dd HH:mm"'
        acceptanceDate:
          type: string
          example: '2020-02-29T10:11:32Z'
          format: date-time
          description: Date and time of the acceptance of the node into Rudder.
        lastInventoryDate:
          type: string
          example: '2020-02-29T10:11:32Z'
          format: date-time
          description: 'Date and time of the latest generated inventory, if one is available (node time). Up to API v11, format was: "YYYY-MM-dd HH:mm"'
        machine:
          description: Information about the underlying machine
          type: object
          properties:
            id:
              type: string
              description: Rudder unique identifier for the machine
            type:
              type: string
              description: Type of the machine
              enum:
                - Physical
                - Virtual
              example: Virtual
            provider:
              type: string
              example: vbox
              description: In the case of VM, the VM technology
            manufacturer:
              type: string
              example: innotek GmbH
              description: Information about machine manufacturer
            serialNumber:
              type: string
              example: ece12459-2b90-49c9-ab1e-72e38f797421
              description: If available, a unique identifier provided by the machine
        os:
          type: object
          description: Information about the operating system
          required:
            - type
            - name
            - version
            - fullName
            - kernelVersion
          properties:
            type:
              type: string
              example: Linux
              description: Family of the OS
              enum:
                - Windows
                - Linux
            name:
              type: string
              description: Operating system name (distribution on Linux, etc.)
              example: Centos
            version:
              type: string
              description: OS version
              example: 7.6.1810
            fullName:
              type: string
              description: Full operating system name
              example: CentOS Linux release 7.6.1810 (Core)
            servicePack:
              type: string
              description: If relevant, the service pack of the OS
              example: '3'
            kernelVersion:
              type: string
              description: Version of the OS kernel
              example: 3.10.0-957.1.3.el7.x86_64
        managementTechnology:
          type: array
          description: Management agents running on the node
          items:
            type: object
            required:
              - name
              - capabilities
              - nodeKind
            properties:
              name:
                type: string
                description: Agent name
                example: Rudder
              version:
                type: string
                description: Agent version
                example: 6.0.3.release-1.EL.7
              capabilities:
                type: array
                description: List of agent capabilities
                items:
                  type: string
                  description: Special capacities of the agent, like parsing xml or yaml, support of advanced acl, etc.
                  example: xml
              nodeKind:
                type: string
                description: kind of node for the management engine, like `root`, `relay`, `node`, `root-component`
                example: node
              rootComponents:
                type: array
                description: Roles fulfilled by the agent
                items:
                  type: string
                  description: A role that node fulfills in management technology
                  example: rudder-db
        policyServerId:
          type: string
          format: uuid (or "root")
          example: root
          description: Rudder policy server managing the node
        properties:
          type: array
          description: Node properties (either set by user or filled by third party sources)
          items:
            type: object
            required:
              - name
              - value
            properties:
              name:
                type: string
                description: Property name
                example: datacenter
              value:
                format: string or JSON
                example: AMS2
                description: Property value (can be a string or JSON object)
        policyMode:
          type: string
          enum:
            - enforce
            - audit
            - default
          example: audit
          description: Rudder policy mode for the node (`default` follows the global configuration)
        ram:
          type: integer
          description: Size of RAM in bytes
          example: 8589934592
        timezone:
          type: object
          required:
            - name
            - offset
          properties:
            name:
              type: string
              description: Timezone name
              example: UTC
            offset:
              type: string
              format: +/-difference
              description: Timezone offset to UTC
              example: '+0000'
        accounts:
          description: User accounts declared in the node
          type: array
          items:
            type: string
            example: root
            description: User present on the system
        bios:
          type: object
          description: BIOS information
          properties:
            name:
              type: string
              description: BIOS name
              example: VirtualBox
            version:
              type: string
              description: BIOS version
              example: 1.2.3
            editor:
              type: string
              description: BIOS editor
              example: innotek GmbH
            quantity:
              type: integer
              description: Number of BIOS on the machine
              example: 1
            releaseDate:
              type: string
              description: Release date of the BIOS (with format `yyyy-MM-dd'T'HH:mm:ssZZ`)
              format: date-time
              example: '2006-12-01T00:00:00Z'
            description:
              type: string
              description: System provided description of the BIOS (long name)
              example: FIXME
        controllers:
          type: array
          description: Physical controller information
          items:
            type: object
            properties:
              name:
                type: string
                description: Controller name
              type:
                type: string
                description: Controller type
              quantity:
                type: integer
                description: Quantity of that controller
                example: 1
              description:
                type: string
                description: System provided description of the controller
              manufacturer:
                type: string
                description: Controller manufacturer
        environmentVariables:
          type: array
          description: Environment variables defined on the node in the context of the agent
          items:
            type: object
            properties:
              name:
                type: string
                description: Environment variable name
                example: LANG
              value:
                type: string
                description: Environment variable value
                example: en_US.UTF-8
        instanceId:
          type: string
          description: The Rudder instance unique identifier on which that node lives
        fileSystems:
          type: array
          description: File system declared on the node
          items:
            type: object
            properties:
              name:
                type: string
                description: Type of file system (`ext4`, `swap`, etc.)
                example: ext4
              mountPoint:
                type: string
                description: Mount point
                example: /srv
              description:
                type: string
                description: Description of the file system
              fileCount:
                type: integer
                description: Number of files
                example: 1456
              freeSpace:
                type: integer
                description: Free space remaining in bytes
                example: 1048576
              totalSpace:
                type: integer
                description: Total space in bytes
                example: 2097152
        managementTechnologyDetails:
          type: object
          description: Additional information about management technology
          properties:
            cfengineKeys:
              description: Certificates used by the agent
              type: array
              items:
                type: string
                format: PEM
                description: Certificate (or public key for <6.0 agents) used by the agent
                example: '-----BEGIN CERTIFICATE-----\nMIIFqDCC[...]3tALNn\n-----END CERTIFICATE-----'
            cfengineUser:
              type: string
              description: Local user account used by the agent
              example: root
            scheduleOverride:
              type: object
              description: Node agent run specific run schedule
              properties:
                runInterval:
                  type: string
                  description: duration of run interval, formatted with a time unit
                  example: 20 min
                firstRun:
                  type: string
                  description: time of the first run in HH:mm format
                  example: '00:11'
                splayTime:
                  type: string
                  description: duration of the configured splay time with a time unit
                  example: 7 min
        memories:
          type: array
          description: Memory slots
          items:
            type: object
            description: Memory slots
            properties:
              name:
                type: string
                description: Name of the memory slot or memory module
              speed:
                type: integer
                description: Memory speed (frequency)
                example: 1066
              type:
                type: string
                description: Memory slot type
              caption:
                type: string
                description: Manufacturer provided information about the module
              quantity:
                type: integer
                example: 1
                description: Number of modules in that slot
              capacity:
                type: integer
                example: 1073741824
                description: Size of modules in bytes
              slotNumber:
                type: integer
                example: 3
                description: Slot number
              description:
                type: string
                description: System provided description
              serialNumber:
                type: string
                description: Serial number of the module
        networkInterfaces:
          type: array
          description: Detailed information about registered network interfaces on the node
          items:
            type: object
            properties:
              name:
                type: string
                example: eth0
                description: Interface name (for ex "eth0")
              mask:
                type: array
                items:
                  type: string
                  format: CIDR
                  example: 255.255.255.0
                  description: Network interface mask
              type:
                type: string
                example: ethernet
                description: Information about the type of network interface
              speed:
                type: string
                example: '1000'
                description: Information about synchronization speed
              status:
                type: string
                example: Up
                description: network interface status (enabled or not, up or down)
              dhcpServer:
                type: string
                description: DHCP server managing that network interface
                example: 192.168.34.5
              macAddress:
                type: string
                description: MAC address of the network interface
                example: 08:00:27:6f:5c:14
              ipAddresses:
                type: array
                description: IP addresses of the network interface
                items:
                  type: string
                  description: IP address
                  example: 192.168.76.4
        ports:
          type: array
          description: Physical port information objects
          items:
            type: object
            properties:
              name:
                type: string
                description: Port name
              type:
                type: string
                description: Port type
              quantity:
                type: integer
                example: 1
                description: Quantity of similar ports
              description:
                type: string
                description: System provided description of the port
        processes:
          type: array
          description: Process running (at inventory time)
          items:
            type: object
            description: Process information
            properties:
              pid:
                type: integer
                example: 3576
                description: PID of the process
              tty:
                type: string
                example: '?'
                description: TTY to which the process is
              name:
                type: string
                example: /usr/sbin/httpd -DFOREGROUND
                description: Process name
              user:
                type: string
                description: User account who started the process
                example: apache
              started:
                type: string
                format: date-time (without tz)
                example: 2020-02-29 00:24
                description: Started date and time of the process
              memory:
                type: number
                format: float
                description: Memory allocated to the process (at inventory time)
                example: 0.4000000059604645
              virtualMemory:
                type: integer
                description: Virtual memory allocated to the process (at inventory time)
                example: 4380
              cpuUsage:
                type: integer
                description: CPU used by the process (at inventory time)
                example: 1
              description:
                type: string
                description: System provided description about the process
        processors:
          type: array
          description: CPU information
          items:
            type: object
            properties:
              name:
                type: string
                description: CPU name
                example: Intel(R) Core(TM) i7-7700HQ CPU @ 2.80GHz
              arch:
                type: string
                description: CPU architecture
                example: i386
              model:
                type: integer
                description: CPU model
                example: 158
              familyName:
                type: string
                description: CPU family
              core:
                type: integer
                description: Number of core for that CPU
                example: 1
              speed:
                type: integer
                description: Speed (frequency) of the CPU
                example: 2800
              thread:
                type: integer
                description: Number of thread by core for the CPU
                example: 1
              stepping:
                type: integer
                description: Stepping or power management information
                example: 9
              manufacturer:
                type: string
                description: CPU manufacturer
                example: Intel
              quantity:
                type: integer
                description: Number of CPU with these features
                example: 1
              cpuid:
                type: string
                description: Identifier of the CPU
              externalClock:
                description: External clock used by the CPU
                type: string
              description:
                type: string
                description: System provided description of the CPU
        slots:
          type: array
          description: Physical extension slot information
          items:
            type: object
            properties:
              name:
                type: string
                description: Slot name or identifier
              status:
                type: string
                description: Slot status (used, powered, etc)
              quantity:
                type: integer
                description: Quantity of similar slots
              description:
                type: string
                description: System provided description of the slots
        software:
          type: array
          description: Software installed on the node (can have thousands items)
          items:
            type: object
            properties:
              name:
                type: string
                description: Name of the software (as reported by the node)
                example: libcurl
              version:
                type: string
                description: Version of the software
                example: 7.29.0-54.el7_7.2
              editor:
                type: string
                description: Editor of the software
                example: CentOS
              description:
                type: string
                description: A description of the software
                example: A library for getting files from web servers
              releaseDate:
                type: string
                format: date-time
                description: Release date of the software
              license:
                type: object
                description: Information about the license
                properties:
                  oem:
                    type: string
                    description: Is this an OEM license (and information)
                  name:
                    type: string
                    description: License name
                  productId:
                    type: string
                    description: License product identifier
                  productKey:
                    type: string
                    description: License key
                  description:
                    type: string
                    description: License description
                  expirationDate:
                    format: date-time
                    type: string
                    description: License expiration date
        softwareUpdate:
          type: array
          description: Software that can be updated on that machine
          items:
            type: object
            properties:
              name:
                type: string
                description: name of software that can be updated
              version:
                type: string
                description: available version for software
              arch:
                type: string
                description: CPU architecture of the update
              from:
                type: string
                description: tool that discovered that update
              kind:
                type: string
                description: if available, kind of patch provided by that update, else none
                enum:
                  - none
                  - security
                  - defect
                  - enhancement
                  - other
              source:
                type: string
                description: information about the source providing that update
              description:
                type: string
                description: details about the content of the update, if available
              severity:
                type: string
                description: if available, the severity of the update
                enum:
                  - critical
                  - high
                  - moderate
                  - low
                  - other
              ids:
                type: array
                items:
                  type: string
                  description: Related identifiers, can be CVE number, vendor-specific advisory (RHSA, etc.)
        sound:
          type: array
          description: Sound card information
          items:
            type: object
            properties:
              name:
                type: string
                description: Sound card name
              quantity:
                type: integer
                description: Quantity of similar sound cards
                example: 1
              description:
                type: string
                description: System provided description of the sound card
        storage:
          type: array
          description: Storage (disks) information objects
          items:
            type: object
            properties:
              name:
                type: string
                description: Storage name
                example: sda
              type:
                type: string
                description: Storage type
                example: disk
              size:
                type: integer
                description: Storage size in bytes
                example: 10737418240
              model:
                type: string
                description: Storage model
                example: VBOXHARDDISK
              firmware:
                type: string
                description: Storage firmware information
                example: '10'
              quantity:
                type: integer
                description: Quantity of similar storage
                example: 1
              description:
                type: string
                description: System provided information about the storage
              manufacturer:
                type: string
                description: Storage manufacturer
              serialNumber:
                type: string
                description: Storage serial number
                example: 000a1954
        videos:
          type: array
          description: Video card information
          items:
            type: object
            properties:
              name:
                type: string
                description: Video card name
              memory:
                type: string
                description: Quantity of memory for that video card in bytes
              chipset:
                type: string
                description: information about video card chipset
              quantity:
                type: integer
                example: 1
                description: Quantity of similar video cards
              resolution:
                type: string
                description: Resolution used by that video card at inventory time
              description:
                type: string
                description: System provided description for that video card
        virtualMachines:
          type: array
          description: Hosted virtual machine information
          items:
            type: object
            properties:
              name:
                type: string
                description: Name of the hosted virtual machine
              type:
                type: string
                description: Type of the hosted virtual machine
              uuid:
                type: string
                description: Unique identifier of the hosted virtual machine
              vcpu:
                type: string
                description: Number of virtual CPU allocated to the hosted virtual machine
              owner:
                type: string
                description: Owner of the hosted virtual machine
              status:
                type: string
                description: Status (up, starting, etc) of the hosted virtual machine
              memory:
                type: string
                description: Memory allocated to the hosted virtual machine
              subsystem:
                type: string
                description: Technology of the hosted virtual machine
              description:
                type: string
                description: System provided description of the hosted virtual machine
    os:
      type: object
      required:
        - type
        - name
        - version
        - fullName
      properties:
        type:
          type: string
          enum:
            - linux
            - windows
            - unknown
        name:
          type: string
          description: For Linux, a distribution, for Windows, the commercial name
          enum:
            - debian
            - kali
            - ubuntu
            - redhat
            - centos
            - fedora
            - suse
            - oracle
            - scientific
            - slackware
            - xp
            - vista
            - seven
            - '10'
            - '2000'
            - '2003'
            - 2008 r2
            - '2012'
            - 2012 r2
            - '2016'
        version:
          type: string
          description: A string representation of the version
          example: '9.5'
        fullName:
          type: string
          description: The long description name of the os
          example: Debian GNU/Linux 9 (stretch)
        servicePack:
          type: string
          description: a service pack informationnal string
    agent-key:
      type: object
      required:
        - value
      description: Information about agent key or certificate
      properties:
        value:
          type: string
          format: PEM
          description: Certificate (or public key for <6.0 agents) used by the agent. Be careful write a "\n" after header line and before footer line, JSON does not keep formatting in string.
          example: |-
            -----BEGIN CERTIFICATE-----
            MIIFqDCC[...]3tALNn
            -----END CERTIFICATE-----
        status:
          type: string
          enum:
            - certified
            - undefined
          description: Certification status of the security token (reset to `undefined` to trust a new certificate). If `certified`, inventory signature check will be enforced
    timezone:
      type: object
      description: Timezone information of the node.
      required:
        - name
        - offset
      properties:
        name:
          type: string
          description: The standard name of the timezone
          example: CEST
        offset:
          type: string
          description: Timezone offset compared to UTC, in +/-HHMM format
          example: '+0200'
    node-add:
      type: array
      items:
        type: object
        required:
          - id
          - hostname
          - status
          - os
          - properties
          - ipAddresses
        properties:
          id:
            type: string
            description: The Rudder node unique identifier in /opt/rudder/etc/uuid.hive
            example: 378740d3-c4a9-4474-8485-478e7e52db52
          hostname:
            type: string
            description: The fully qualified name of the node
            example: my.node.hostname.local
          status:
            type: string
            description: Target status of the node
            enum:
              - accepted
              - pending
          os:
            $ref: '#/components/schemas/os'
          policyServerId:
            type: string
            description: The policy server ID for that node. By default, "root"
            example: root
          machineType:
            type: string
            description: The kind of machine for the node (use vm for a generic VM)
            enum:
              - physical
              - vm
              - hyperv
              - qemu
              - vbox
              - vmware
              - xen
          machine:
            type: object
            description: The kind of machine for the node (use vm for a generic VM)
            required:
              - type
            properties:
              type:
                type: string
                description: list of groups to include in rule application
                enum:
                  - Physical
                  - Virtual
              provider:
                type: string
                description: The kind of virtual machine for the node
                enum:
                  - hyperv
                  - qemu
                  - vbox
                  - vmware
                  - xen
              manufacturer:
                type: string
                description: Manufacturer of the machine
                example: corp inc.
              serialNumber:
                type: string
                description: Serial number of the machine
                example: ece12459-2b90-49c9-ab1e-72e38f797421
          state:
            type: string
            description: Node lifecycle state. Can only be specified when status=accepted. If not specified, enable is used
            enum:
              - enabled
              - ignored
              - empty-policies
              - initializing
              - preparing-eol
          policyMode:
            type: string
            description: The policy mode for the node. Can only be specified when status=accepted. If not specified, the default (global) mode will be used
            enum:
              - enforce
              - audit
          agentKey:
            $ref: '#/components/schemas/agent-key'
          properties:
            type: array
            description: Node properties (either set by user or filled by third party sources)
            items:
              type: object
              required:
                - name
                - value
              properties:
                name:
                  type: string
                  description: Property name
                  example: datacenter
                value:
                  format: string or JSON
                  example: AMS2
                  description: Property value (can be a string or JSON object)
          ipAddresses:
            type: array
            description: an array of IPs.
            items:
              type: string
              example: 192.168.180.90
          timezone:
            $ref: '#/components/schemas/timezone'
    node-pending-result:
      type: object
      required:
        - id
        - hostname
        - status
      properties:
        id:
          type: string
          description: Unique id of the node
          format: uuid (or "root")
          example: 9a1773c9-0889-40b6-be89-f6504443ac1b
        hostname:
          type: string
          description: Fully qualified name of the node
          example: node1.example.com
        status:
          type: string
          description: Status of the node
          enum:
            - pending
            - accepted
            - deleted
          example: accepted
        osName:
          type: string
          description: Operating system name (distribution on Linux, etc.)
          example: Centos
        osVersion:
          type: string
          description: OS version
          example: 7.6.1810
        machineType:
          type: string
          description: The kind of machine for the node (use vm for a generic VM)
          enum:
            - physical
            - vm
            - hyperv
            - qemu
            - vbox
            - vmware
            - xen
    node-settings:
      type: object
      properties:
        properties:
          type: array
          items:
            type: object
            required:
              - name
              - value
            properties:
              name:
                type: string
                description: Property name
                example: datacenter
              value:
                format: string or JSON
                example: AMS2
                description: Property value (can be a string or JSON object)
        policyMode:
          type: string
          description: In which mode the node will apply its configuration policy. Use `default` to use the global mode.
          enum:
            - audit
            - enforce
            - default
          example: audit
        state:
          type: string
          description: The node life cycle state. See [dedicated doc](https://docs.rudder.io/reference/current/usage/advanced_node_management.html#node-lifecycle) for more information.
          enum:
            - enabled
            - ignored
            - empty-policies
            - initializing
            - preparing-eol
          example: enabled
        agentKey:
          $ref: '#/components/schemas/agent-key'
    apply-policy-trigger-inventory:
      type: object
      properties:
        classes:
          type: array
          description: Parameter to trigger a specific run, like an inventory for instance.
          items:
            type: string
            description: A class name like force_inventory for instance.
            example: force_inventory
    node-inherited-properties:
      type: object
      required:
        - id
        - properties
      properties:
        id:
          type: string
          description: Unique id of the node
          format: uuid (or "root")
          example: 9a1773c9-0889-40b6-be89-f6504443ac1b
        properties:
          type: array
          description: Node properties (either set by user or filled by third party sources)
          items:
            type: object
            required:
              - name
              - value
            properties:
              name:
                type: string
                description: Property name
                example: datacenter
              value:
                format: string or JSON
                example: AMS2
                description: Resolved (ie, with inheritance and overriding done) property value (can be a string or JSON object)
              provider:
                type: string
                description: Property provider (if the property is not a simple node property)
                enum:
                  - inherited
                  - overridden
                  - plugin name like datasources
              hierarchy:
                type: array
                description: A description of the inheritance hierarchy for that property, with most direct parent at head and oldest one at tail
                items:
                  type: object
                  required:
                    - kind
                    - value
                  properties:
                    kind:
                      type: string
                      enum:
                        - global
                        - group
                      description: The kind of object from which the property's value is inherited
                      example: global
                    value:
                      type: string
                      description: a string representation of the value. If it was a json value, it will be escaped.
                      example: '{"array":[1,2],"object":{"parent":"value"},"string":"parent"}'
                    id:
                      type: string
                      description: in the case of a group, its identifier
                      example: 9180b869-08a3-4173-9dd4-ab68f227e76c
                    name:
                      type: string
                      description: in the case of a group, its name
                      example: all centos7
              origval:
                format: string or JSON
                example: AMS2
                description: The original value (ie, before overriding and inheritance resolution) for that node
    parameter:
      type: object
      required:
        - id
      properties:
        id:
          type: string
          description: Name of the parameter
          example: rudder_file_edit_footer
        value:
          format: string or JSON
          example: '### End of file managed by Rudder ###'
          description: Value of the parameter
        description:
          type: string
          example: Default inform message put in footer of managed files by Rudder
          description: Description of the parameter
        overridable:
          type: boolean
          description: Is the global parameter overridable by node
          example: false
    plugins-info:
      type: object
      required:
        - details
      properties:
        globalLimits:
          type: object
          description: Most restrictive limits computed from each plugin license limits
          properties:
            licensees:
              type: array
              description: list of licensees for these plugins
              items:
                type: string
                description: a licensee
                example: Customer Inc
            startDate:
              type: string
              description: the latest date of start of validity for plugins
              example: '2023-08-14T02:00:00+02:00'
            endDate:
              type: string
              description: the earliest date of end of validity for plugins
              example: '2023-08-14T02:00:00+02:00'
            maxNodes:
              type: integer
              description: the lowest limit on maximum number of nodes for plugins
              example: 5000
        details:
          type: array
          description: the list of details for each plugins
          items:
            type: object
            properties:
              id:
                type: string
                description: internal id of the plugin
                example: com.normation.plugins.authbackends.AuthBackendsPluginDef
              name:
                type: string
                description: fully qualified name of the plugin
                example: rudder-plugin-auth-backends
              shortName:
                type: string
                description: short name of the plugin
                example: auth-backends
              description:
                type: string
                description: description of the plugin
                example: <p>This plugin provides additional authentication backends for Rudder, like LDAP, OIDC, etc</p>
              version:
                type: string
                description: version of the plugin
                example: 7.3.12-2.1.0
              status:
                type: string
                description: status of the plugin, enabled or disabled
                example: enabled
                enum:
                  - enabled
                  - disabled
              statusMessage:
                type: string
                description: a message explaining the status when disabled
                example: this plugin is disabled because its end of validity date is in the past
              license:
                type: object
                description: information about the plugin
                properties:
                  licensee:
                    type: string
                    description: name of the licensee for that plugin
                    example: Customer Inc
                  softwareId:
                    type: string
                    description: the fully qualified name of the plugin for which that license was issued
                    example: rudder-plugin-auth-backends
                  minVersion:
                    type: string
                    description: lowest version of the software for which that license is valid
                    example: 0.0-0.0
                  maxVersion:
                    type: string
                    description: highest version of the software for which that license is valid
                    example: '2023-08-14T02:00:00+02:00'
                  startDate:
                    type: string
                    description: start of validity date
                    example: '2023-08-14T02:00:00+02:00'
                  endDate:
                    type: string
                    description: end of validity date
                    example: '2023-08-14T02:00:00+02:00'
                  maxNodes:
                    type: integer
                    description: maximum number of node in Rudder for that license
                  additionalInfo:
                    type: object
                    description: additional information provided by the license
    plugins-settings:
      type: object
      required:
        - username
        - password
      properties:
        username:
          type: string
          description: username to use for Rudder account
          example: Customer Inc
        password:
          type: string
          description: password to access Rudder account
          example: some password
        url:
          type: string
          description: URL for getting plugins
          example: https://download.rudder.io/plugins
        proxyUser:
          type: string
          description: if an authenticated proxy is necessary, username of proxy
          example: proxy_user
        proxyPassword:
          type: string
          description: if an authenticated proxy is necessary, password of the proxy
          example: some password
        proxyUrl:
          type: string
          description: proxy URL to use
          example: https://proxy.url
    rule:
      type: object
      properties:
        id:
          type: string
          description: Rule id
          example: 0c1713ae-cb9d-4f7b-abda-ca38c5d643ea
          format: uuid
        displayName:
          type: string
          example: Security policy
          description: Rule name
        shortDescription:
          type: string
          example: Baseline applying CIS guidelines
          description: One line rule description
        longDescription:
          type: string
          example: This rules should be applied to all Linux nodes required basic hardening
          description: Rule documentation
        directives:
          type: array
          description: Directives linked to the rule
          items:
            type: string
            description: Directive id
            example: ff3bf651-3fce-49bc-8bf3-85132fa9b875
        targets:
          $ref: '#/components/schemas/rule-targets'
        enabled:
          type: boolean
          description: Is the rule enabled
          example: true
        system:
          type: boolean
          description: If true it is an internal Rudder rule
          example: false
        tags:
          type: array
          items:
            type: object
            additionalProperties: true
            description: Key-value pairs
            example:
              customer: MyCompany
        policyMode:
          type: string
          example: mixed
        status:
          type: object
          properties:
            value:
              type: string
              example: Partially applied
            details:
              type: string
              example: Directive 'test parameter name' disabled
    rule-new:
      type: object
      properties:
        source:
          type: string
          format: uuid
          example: b9f6d98a-28bc-4d80-90f7-d2f14269e215
          description: The id of the rule the clone will be based onto. If this parameter if provided, the new rule will be a clone of this source. Other value will override values from the source.
        id:
          type: string
          description: Rule id
          example: 0c1713ae-cb9d-4f7b-abda-ca38c5d643ea
          format: uuid
        displayName:
          type: string
          example: Security policy
          description: Rule name
        shortDescription:
          type: string
          example: Baseline applying CIS guidelines
          description: One line rule description
        longDescription:
          type: string
          example: This rules should be applied to all Linux nodes required basic hardening
          description: Rule documentation
        category:
          type: string
          format: uuid
          example: 38e0c6ea-917f-47b8-82e0-e6a1d3dd62ca
          description: The parent category id. If provided, the new rule will be in this parent category
        directives:
          type: array
          description: Directives linked to the rule
          items:
            type: string
            description: Directive id
        targets:
          $ref: '#/components/schemas/rule-targets'
        enabled:
          type: boolean
          description: Is the rule enabled
          example: true
        system:
          type: boolean
          description: If true it is an internal Rudder rule
          example: false
        tags:
          type: array
          items:
            type: object
            additionalProperties: true
            description: Key-value pairs
            example:
              customer: MyCompany
    rule-category:
      type: object
      required:
        - parent
        - name
      properties:
        parent:
          type: string
          format: uuid
          example: b9f6d98a-28bc-4d80-90f7-d2f14269e215
          description: The parent category of the rules
        id:
          type: string
          format: uuid
          description: Rule category id, only provide it when needed.
          default: '{autogenerated}'
          example: 32d013f7-b6d8-46c8-99d3-016307fa66c0
        name:
          type: string
          description: Name of the rule category
          example: Security policies
        description:
          type: string
          description: Rules category description
          example: Baseline applying CIS guidelines
    rule-category-update:
      type: object
      required:
        - parent
        - name
      properties:
        parent:
          type: string
          format: uuid
          example: b9f6d98a-28bc-4d80-90f7-d2f14269e215
          description: The parent category of the rules
        name:
          type: string
          description: Name of the rule category
          example: Security policies
        description:
          type: string
          description: Rules category description
          example: Baseline applying CIS guidelines
    rule-with-category:
      type: object
      properties:
        id:
          type: string
          description: Rule id
          example: 0c1713ae-cb9d-4f7b-abda-ca38c5d643ea
          format: uuid
        displayName:
          type: string
          example: Security policy
          description: Rule name
        shortDescription:
          type: string
          example: Baseline applying CIS guidelines
          description: One line rule description
        longDescription:
          type: string
          example: This rules should be applied to all Linux nodes required basic hardening
          description: Rule documentation
        category:
          type: string
          format: uuid
          example: 38e0c6ea-917f-47b8-82e0-e6a1d3dd62ca
          description: The parent category id.
        directives:
          type: array
          description: Directives linked to the rule
          items:
            type: string
            description: Directive id
        targets:
          $ref: '#/components/schemas/rule-targets'
        enabled:
          type: boolean
          description: Is the rule enabled
          example: true
        system:
          type: boolean
          description: If true it is an internal Rudder rule
          example: false
        tags:
          type: array
          items:
            type: object
            additionalProperties: true
            description: Key-value pairs
            example:
              customer: MyCompany
    secrets:
      type: object
      properties:
        name:
          type: string
          description: The name of the secret used as a reference on the value
          example: secret-password
        description:
          type: string
          description: The description of the secret to identify it more easily
          example: Password of my super secret user account
        value:
          type: string
          description: The value of the secret it will not be exposed in the interface
          example: nj-k;EO32!kFWewn2Nk,u
    settings:
      type: object
      properties:
        allowed_networks:
          type: array
          description: List of allowed networks for each policy server (root and relays)
          items:
            type: object
            properties:
              id:
                type: string
                example: root
                description: Rudder id of the policy server
              allowed_networks:
                description: List of allowed networks
                type: array
                items:
                  description: Allowed network (`0.0.0.0/0` for no restriction `a.b.c.d/32` for one IP)
                  example: 192.168.40.0/24
                  type: string
                  format: CIDR network
        global_policy_mode:
          type: string
          description: Define the default setting for global policy mode
          enum:
            - enforce
            - audit
          example: enforce
        global_policy_mode_overridable:
          type: boolean
          description: Allow overrides on this default setting
          example: true
        run_frequency:
          description: Agent run schedule - time between agent runs (in minutes)
          type: integer
          example: 5
        first_run_hour:
          type: integer
          example: 0
          description: First agent run time - hour
        first_run_minute:
          type: integer
          example: 0
          description: First agent run time - minute
        splay_time:
          type: integer
          example: 5
          description: Maximum delay after scheduled run time (random interval)
        modified_file_ttl:
          type: integer
          example: 7
          description: Number of days to retain modified files
        output_file_ttl:
          type: integer
          example: 7
          description: Number of days to retain agent output files
        require_time_synchronization:
          type: boolean
          example: true
          description: Require time synchronization between nodes and policy server
        relay_server_synchronization_method:
          type: string
          enum:
            - classic
            - rsync
            - disabled
          example: classic
          description: Method used to synchronize data between server and relays, either "classic" (agent protocol, default), "rsync" (use rsync to synchronize, that you'll need to be manually set up), or "disabled" (use third party system to transmit data)
        relay_server_synchronize_policies:
          type: boolean
          example: true
          description: If **rsync** is set as a synchronization method, use rsync to synchronize policies between Rudder server and relays. If false, you'll have to synchronize policies yourself.
        relay_server_synchronize_shared_files:
          type: boolean
          description: If **rsync** is set as a synchronization method, use rsync to synchronize shared files between Rudder server and relays. If false, you'll have to synchronize shared files yourself.
        rudder_report_protocol_default:
          type: string
          enum:
            - HTTPS
            - SYSLOG
          example: HTTPS
          description: Default reporting protocol used
        reporting_mode:
          type: string
          enum:
            - full-compliance
            - changes-only
            - reports-disabled
          example: full-compliance
          description: Compliance reporting mode
        enable_change_message:
          type: boolean
          example: true
          description: Enable change audit logs
        mandatory_change_message:
          type: boolean
          example: false
          description: Make message mandatory
        change_message_prompt:
          type: string
          example: Please provide a reason for this change
          description: Explanation to display
        enable_change_request:
          type: boolean
          example: false
          description: Enable Change Requests
        enable_self_validation:
          type: boolean
          example: true
          description: Allow self validation
        enable_self_deployment:
          type: boolean
          example: true
          description: Allow self deployment
        display_recent_changes_graphs:
          type: boolean
          example: true
          description: Display changes graphs
        enable_javascript_directives:
          type: string
          example: enabled
          description: Enable script evaluation in Directives
        send_metrics:
          type: string
          example: not defined
          description: Send anonymous usage statistics
        node_accept_duplicated_hostname:
          type: boolean
          example: false
          description: Allow acceptation of a pending node when another one with the same hostname is already accepted
          default: false
        node_onaccept_default_state:
          type: string
          enum:
            - enabled
            - ignored
            - empty-policies
            - initializing
            - preparing-eol
          example: enabled
          description: Set default state for node when they are accepted within Rudder
        node_onaccept_default_policyMode:
          type: string
          enum:
            - default
            - enforce
            - audit
          example: default
          description: Default policy mode for accepted node
        unexpected_unbound_var_values:
          type: boolean
          description: Allows multiple reports for configuration based on a multivalued variable
          default: true
        rudder_compute_changes:
          type: boolean
          default: true
          description: Compute list of changes (repaired reports) per rule
        rudder_generation_compute_dyngroups:
          type: boolean
          default: true
          description: Recompute all dynamic groups at the start of policy generation
        rudder_compute_dyngroups_max_parallelism:
          type: string
          default: '1'
          description: Set the parallelism to compute dynamic group, as a number of thread (i.e. 4), or a multiplicative of the number of core (x0.5)
        rudder_generation_max_parallelism:
          type: string
          default: x0.5
          description: Set the policy generation parallelism, either as an number of thread (i.e. 4), or a multiplicative of the number of core (x0.5)
        rudder_generation_js_timeout:
          type: integer
          default: 30
          description: Policy generation JS evaluation of directive parameter timeout in seconds
        rudder_generation_continue_on_error:
          type: boolean
          default: false
          description: Policy generation continues on error during NodeConfiguration evaluation
        rudder_generation_delay:
          type: string
          default: 0 seconds
          description: Set a delay before starting policy generation, this will allow you to accumulate changes before they are deployed to Nodes, and can also lessen webapp resources needs. The value is a number followed by the time unit needed (seconds/s, minutes/m, hours/h ...), ie "5m" for 5 minutes
        rudder_generation_policy:
          type: string
          default: all
          description: Should policy generation be triggered automatically after a change (value 'all'), or should we wait until a manual launch (through api or UI, value 'onlyManual') or even no policy generation at all (value "none")
    check:
      type: object
      required:
        - name
        - msg
        - status
      properties:
        name:
          type: string
          description: Name of the check
          example: RAM available
        msg:
          type: string
          description: Message about the check
          example: Only 2GB of RAM left
        status:
          type: string
          description: The severity status of the check
          enum:
            - Critical
            - Warning
            - Ok
    campaign-event-result:
      type: object
      properties:
        id:
          type: string
          description: Campaign event id
          example: 0076a379-f32d-4732-9e91-33ab219d8fde
          format: uuid
        nodes:
          type: array
          description: Campaign result for all Nodes
          items:
            type: object
            description: Campaign result for a Node
            properties:
              nodeId:
                type: string
                description: Node id
                example: b81d08e8-03f8-46b7-9399-9bea54e41ec7
              status:
                type: string
                description: Campaign status
                enum:
                  - success
                  - error
                  - scheduled
                  - missing
              nbPackages:
                type: integer
                description: Number of software updated
                example: 42
              date:
                type: string
                format: date-time
                example: '2023-04-19T16:59:53Z'
    campaign-event-node-result:
      type: object
      properties:
        id:
          type: string
          description: Campaign event id
          example: 0076a379-f32d-4732-9e91-33ab219d8fde
          format: uuid
        nodes:
          type: array
          items:
            type: object
            properties:
              nodeId:
                type: string
                description: Node id
                example: b81d08e8-03f8-46b7-9399-9bea54e41ec7
              result:
                type: object
                properties:
                  status:
                    type: string
                    description: Campaign result
                    enum:
                      - success
                      - error
                      - scheduled
                      - missing
                  software-updated:
                    type: array
                    items:
                      type: object
                      properties:
                        name:
                          type: string
                          description: Name of the software updated
                        before:
                          type: string
                          description: Version of the software before update
                        after:
                          type: string
                          description: Version of the software after update
                    description: List of updated software
                  output:
                    type: string
                    description: campaign standard output
                  errors:
                    type: string
                    description: campaign standard errors
              date:
                type: string
                format: date-time
                example: '2023-04-19T16:59:53Z'
    technique-parameter:
      type: object
      properties:
        id:
          type: string
          description: parameter id
          example: 6a8de98f-7829-4c1b-b4e7-b9387f27f279
        name:
          type: string
          description: Parameter name
          example: Package to install
        description:
          type: string
          description: description of this parameter
          example: Name of a package to install
        mayBeEmpty:
          type: boolean
          description: May the value given when creating a directive be empty
          example: true
    technique-resource:
      type: object
      properties:
        name:
          type: string
          description: resource name. this is the relative path to the resource
          example: conf/my/app/new
        state:
          type: string
          description: State of the resource file. it can be a value between new, modified, deleted, untouched
          example: modified
    technique-method-call:
      type: object
      properties:
        id:
          type: string
          description: Method call id
          example: 6a8de98f-7829-4c1b-b4e7-b9387f27f279
        component:
          type: string
          description: Component is used in reporting to identify this method call. You can see it as a name
          example: Install apache2
        method:
          type: string
          description: Id of the method called
          example: package_present
        condition:
          type: string
          description: Condition to run this method.
          example: linux.package_present_vim_repaired
        disableReporting:
          type: boolean
          description: Should the reporting of this method be disabled
          example: true
        parameters:
          type: array
          description: Parameters for this method call
          items:
            type: object
            properties:
              name:
                type: string
                description: Parameter name
                example: package
              value:
                type: string
                description: Parameter value
                example: apache2
    technique-block:
      type: object
      properties:
        id:
          type: string
          description: Method call id
          example: 6a8de98f-7829-4c1b-b4e7-b9387f27f279
        component:
          type: string
          description: Component is used in reporting to identify this method call. You can see it as a name
          example: Install my app
        condition:
          type: string
          description: Condition to run this method.
          example: linux.package_present_vim_repaired
        calls:
          type: array
          description: Method and blocks contained by this block
          items:
            oneOf:
              - $ref: '#/components/schemas/technique-method-call'
              - $ref: '#/components/schemas/technique-block'
          example: []
        reportingLogic:
          type: object
          properties:
            type:
              type: string
              description: Kind of reporting logic
              example: worst
              enum:
                - worst
                - focus
                - worst-case-weighted-one
                - worst-case-weighted-sum
            value:
              type: string
              description: reporting value used for some reporting logic (i.e. focus)
              example: id/name of a component
    editor-technique:
      type: object
      properties:
        id:
          type: string
          description: Technique id
          example: security-policy
        name:
          type: string
          description: Technique name
          example: Security Policy
        version:
          type: string
          description: version of this technique
          example: '1.0'
        category:
          type: string
          description: category of this technique
          example: user_techniques
        description:
          type: string
          description: description of this technique
          example: This techniques apply generic security policies
        source:
          type: string
          description: Source of the technique, always editor here
          example: editor
        parameters:
          type: array
          description: Parameters for this technique
          items:
            $ref: '#/components/schemas/technique-parameter'
        resources:
          type: array
          description: Resources for this technique
          items:
            $ref: '#/components/schemas/technique-resource'
        calls:
          type: array
          description: Method and blocks contained by this technique
          items:
            oneOf:
              - $ref: '#/components/schemas/technique-method-call'
              - $ref: '#/components/schemas/technique-block'
    techniques:
      type: array
      items:
        $ref: '#/components/schemas/editor-technique'
    technique-category:
      type: object
      required:
        - name
        - path
        - id
        - subcategories
      properties:
        name:
          type: string
          description: Category's name
          example: User Techniques
        path:
          type: string
          description: Category's path
          example: systemSettings/systemManagement
        id:
          type: string
          description: Category ID
          example: systemManagement
        subcategories:
          type: array
          description: List of sub categories
          example: []
          items:
            $ref: '#/components/schemas/technique-category'
    categories-tree:
      type: object
      required:
        - name
        - path
        - id
        - subcategories
      properties:
        name:
          type: string
          description: Category's name
          example: /
        path:
          type: string
          description: Category's path
          example: ''
        id:
          type: string
          description: Category ID
          example: /
        subcategories:
          type: array
          description: List of sub categories
          items:
            $ref: '#/components/schemas/technique-category'
    techniques-versions:
      type: array
      items:
        type: object
        properties:
          name:
            type: string
            description: Technique name
          versions:
            type: array
            description: Available versions for this technique
            items:
              type: string
              description: Technique version
        example:
          name: userManagement
          versions:
            - '1.0'
            - '1.2'
            - '3.0'
    techniques-resources:
      type: array
      items:
        type: object
        properties:
          name:
            type: string
            description: Resource's name
            example: apply-policy.robot
          state:
            type: string
            description: State of the resource
            example: untouched
    techniques-revisions:
      type: array
      items:
        type: object
        required:
          - revision
          - date
          - author
          - message
        properties:
          revision:
            type: string
            description: Revision ID
            example: 6faf7e9c47f2c3a41784598b5acf2883bd4e1e08
          date:
            type: string
            description: Commit's date
            example: '2022-06-14T16:20:40+02:00'
          author:
            type: string
            description: Commit's author
            example: admin
          message:
            type: string
            description: Commit's message
            example: Committing technique bar
    tenant:
      type: object
      properties:
        id:
          type: string
          description: A unique identifier for a tenant, matching ^(\p{Alnum}[\p{Alnum}-_]*)$
          example: zone-1
        name:
          type: string
          description: A name for humans
          example: Zone 1
        description:
          type: string
          description: One line description of the tenant, typically used to get a glimpse of tenant goal.
          example: zone-1 tenants holds nodes for the European geo zone
        documentation:
          type: string
          description: A long form description of the tenant, accepting markdown
          example: 'zone-1 tenants holds nodes for the European geo zone. The region is split as: ... etc ...'
    user-new:
      type: object
      required:
        - username
        - password
        - permissions
        - isPreHashed
      properties:
        username:
          type: string
          description: A new username
          example: johndoe
        password:
          type: string
          description: This password will be hashed for you if the `isPreHashed` is set on false
          example: passwdWillBeStoredHashed
        permissions:
          type: array
          description: Roles or authorizations
          items:
            type: string
            example: admin
        isPreHashed:
          type: boolean
          description: If you want to provide hashed password set this property to `true` otherwise we will hash the plain password and store the hash
          enum:
            - false
            - true
        name:
          type: string
          example: John Doe
        email:
          type: string
          example: john.doe@example.com
        otherInfo:
          type: object
          additionalProperties:
            type: string
          example:
            phone: '+1234'
    user-status:
      type: string
      enum:
        - active
        - disabled
        - deleted
      description: User status
    user-info:
      type: object
      properties:
        name:
          type: string
          example: John Doe
        email:
          type: string
          example: john.doe@example.com
        otherInfo:
          type: object
          additionalProperties:
            type: string
          example:
            phone: '+1234'
    user-file:
      type: object
      required:
        - username
        - password
        - permissions
        - isPreHashed
      properties:
        username:
          type: string
          description: A new username or an empty string to ignore the update of username.
          example: johndoe
        password:
          type: string
          description: This password will be hashed for you if the `isPreHashed` is set on false. Empty string means that no update is requested.
          example: passwdWillBeStoredHashed
        permissions:
          type: array
          description: Roles or authorizations
          items:
            type: string
            example: admin
        isPreHashed:
          type: boolean
          description: If you want to provide hashed password set this property to `true` otherwise we will hash the plain password and store the hash
          enum:
            - false
            - true
    role-list-override:
      type: string
      enum:
        - override
        - no-override
        - none
    right:
      type: string
      pattern: ^(administration|compliance|configuration|deployer|deployment|directive|group|node|rule|parameter|technique|userAccount|validator)_(read|write|edit|all)$
    user:
      type: object
      required:
        - login
        - otherInfo
        - status
        - authz
        - permissions
        - rolesCoverage
        - customRights
        - providers
        - providersInfo
      properties:
        login:
          type: string
          example: johndoe
        name:
          type: string
          example: John Doe
        email:
          type: string
          example: john.doe@example.com
        otherInfo:
          type: object
          additionalProperties:
            type: string
          example:
            phone: '+12345'
        status:
          type: string
          enum:
            - active
            - deleted
            - disabled
        authz:
          type: array
          items:
            $ref: '#/components/schemas/right'
        permissions:
          type: array
          items:
            type: string
            example: inventory
        rolesCoverage:
          type: array
          items:
            type: string
            example: inventory
        customRights:
          type: array
          items:
            $ref: '#/components/schemas/right'
        providers:
          type: array
          items:
            type: string
            example: file
        providersInfo:
          type: object
          properties:
            provider:
              type: string
              example: file
            authz:
              type: array
              items:
                $ref: '#/components/schemas/right'
            roles:
              type: array
              items:
                type: string
                example: inventory
            customRights:
              type: array
              items:
                $ref: '#/components/schemas/right'
        tenants:
          type: string
          example: all
        lastLogin:
          type: string
          format: date-time
    validated-user:
      type: object
      description: list of users with their workflow settings
      required:
        - username
        - isValidated
        - userExists
      properties:
        username:
          type: string
          example: John Do
        isValidated:
          type: boolean
          description: whether the user's actions generate chanque-request or not
        userExists:
          type: boolean
          description: whether the user exists in file or not
  parameters:
    api-account-id:
      name: apiAccountId
      in: path
      required: true
      description: Id of the API account
      schema:
        type: string
        format: uuid
        example: 1ebee8c7-c898-4ee5-9470-139bfd80c442
    campaign-type:
      name: campaignType
      in: query
      required: false
      description: Type of the campaigns we want
      schema:
        type: string
        enum:
          - system-update
          - software-update
        example: system-update
    campaign-status:
      name: status
      in: query
      required: false
      description: Status of the campaigns we want
      schema:
        type: string
        enum:
          - enabled
          - disabled
          - archived
        example: enabled
    campaign-event-status:
      name: state
      in: query
      required: false
      description: Status of the campaign events we want
      schema:
        type: string
        enum:
          - scheduled
          - running
          - finished
          - skipped
        example: running
    campaign-id:
      name: campaignId
      in: query
      required: false
      description: id of a specific campaign
      schema:
        type: string
        example: 0076a379-f32d-4732-9e91-33ab219d8fde
    limit:
      name: limit
      in: query
      required: false
      schema:
        type: integer
      description: Max number of elements in response
    offset:
      name: offset
      in: query
      required: false
      schema:
        type: integer
      description: Offset of data in response (skip X elements)
    before:
      name: before
      in: query
      required: false
      schema:
        type: string
        format: date-time
    after:
      name: after
      in: query
      required: false
      schema:
        type: string
        format: date-time
    order:
      name: order
      in: query
      required: false
      schema:
        type: string
        enum:
          - start
          - startDate
          - end
          - endDate
        description: The start or end date column to sort (with 'asc' for the ascending or descending order)
        example: start
    asc:
      name: asc
      in: query
      required: false
      schema:
        type: string
        enum:
          - asc
          - desc
    campaign-event-id-path:
      name: id
      in: path
      required: true
      description: Id of the campaign event
      schema:
        type: string
        format: uuid
        example: 0076a379-f32d-4732-9e91-33ab219d8fde
    campaign-id-path:
      name: id
      in: path
      required: true
      description: Id of the campaign
      schema:
        type: string
        format: uuid
        example: 0076a379-f32d-4732-9e91-33ab219d8fde
    change-request-id:
      name: changeRequestId
      in: path
      required: true
      schema:
        type: integer
        description: Change request id
        example: 37
    compliance-percent-precision:
      name: precision
      in: query
      schema:
        type: integer
        example: 0
        default: 2
      description: Number of digits after comma in compliance percent figures
    directive-id:
      name: directiveId
      in: path
      required: true
      description: Id of the directive
      schema:
        type: string
        format: uuid
        example: 9a1773c9-0889-40b6-be89-f6504443ac1b
    compliance-level:
      name: level
      in: query
      schema:
        type: integer
        example: 4
        default: 10
      description: Number of depth level of compliance objects to display (1:rules, 2:directives, 3:components, 4:nodes, 5:values, 6:reports)
    target-or-node-group-id:
      name: targetOrNodeGroupId
      in: path
      required: true
      description: Id of the node group or rule target
      schema:
        oneOf:
          - type: string
            format: uuid or string
            example: 47e3f2c0-0b1a-4b1a-9b0a-9e9e9e9e9e9e
          - $ref: '#/components/schemas/rule-target'
    node-id:
      name: nodeId
      in: path
      required: true
      description: Id of the target node
      schema:
        type: string
        format: uuid (or "root")
        example: 9a1773c9-0889-40b6-be89-f6504443ac1b
    rule-id:
      name: ruleId
      in: path
      required: true
      description: Id of the target rule
      schema:
        type: string
        format: uuid
        example: 9a1773c9-0889-40b6-be89-f6504443ac1b
    cve-group-id:
      name: groupId
      in: query
      required: false
      schema:
        type: string
      description: Id of node groups you want to get from last CVE check
    cve-node-id:
      name: nodeId
      in: query
      required: false
      schema:
        type: string
      description: Id of nodes you want to get from last CVE check
    cve-cve-id:
      name: cveId
      in: query
      required: false
      schema:
        type: string
      description: Id of CVE you want to get from last CVE check
    cve-package:
      name: package
      in: query
      required: false
      schema:
        type: string
      description: Name of packages you want to get from last CVE check
    cve-severity:
      name: severity
      in: query
      required: false
      schema:
        type: string
        enum:
          - critical
          - high
          - medium
          - low
          - none
          - unknown
      description: Severity of the CVE you want to get from last CVE check
    cve-cve-id-path:
      name: cveId
      in: path
      required: true
      description: Id of the CVE
      schema:
        type: string
        format: CVE ID
        example: CVE-2022-25235
    datasource-id:
      name: datasourceId
      in: path
      required: true
      description: Id of the data source
      schema:
        type: string
        example: test-data-source
    group-category-id:
      name: groupCategoryId
      in: path
      required: true
      schema:
        type: string
        format: uuid
        description: Group category id
        example: e0a311fa-f7b2-4f9e-89a9-db517b9c6b90
    group-id:
      name: groupId
      in: path
      required: true
      description: Id of the group
      schema:
        type: string
        format: uuid
        example: 9a1773c9-0889-40b6-be89-f6504443ac1b
    include:
      name: include
      in: query
      description: |-
        Level of information to include from the node inventory. Some base levels are defined (**minimal**, **default**, **full**). You can add fields you want to a base level by adding them to the list, possible values are keys from json answer. If you don't provide a base level, they will be added to `default` level, so if you only want os details, use `minimal,os` as the value for this parameter.
        * **minimal** includes: `id`, `hostname` and `status`
        * **default** includes **minimal** plus `architectureDescription`, `description`, `ipAddresses`, `lastRunDate`, `lastInventoryDate`, `machine`, `os`, `managementTechnology`, `policyServerId`, `properties` (be careful! Only node own properties, if you also need inherited properties, look at the dedicated `/nodes/{id}/inheritedProperties` endpoint), `policyMode `, `ram` and `timezone`
        * **full** includes: **default** plus `accounts`, `bios`, `controllers`, `environmentVariables`, `fileSystems`, `instanceId`, `managementTechnologyDetails`, `memories`, `networkInterfaces`, `ports`, `processes`, `processors`, `slots`, `software`, `softwareUpdate`, `sound`, `storage`, `videos` and `virtualMachines`
      schema:
        type: string
        default: default
        format: comma-separated list
        example: minimal
    node-query:
      name: query
      in: query
      description: The criterion you want to find for your nodes. Replaces the `where`, `composition` and `select` parameters in a single parameter.
      content:
        application/json:
          schema:
            type: object
            properties:
              select:
                description: What kind of data we want to include. Here we can get policy servers/relay by setting `nodeAndPolicyServer`. Only used if `where` is defined.
                type: string
                default: node
              composition:
                type: string
                enum:
                  - and
                  - or
                default: and
                description: Boolean operator to use between each  `where` criteria.
                example: and
              where:
                type: array
                description: List of criteria
                items:
                  type: object
                  properties:
                    objectType:
                      type: string
                      description: Type of the object
                      example: node
                    attribute:
                      description: Attribute to compare
                      example: OS
                      type: string
                    comparator:
                      description: Comparator to use
                      example: eq
                      type: string
                    value:
                      type: string
                      example: Linux
                      description: Value to compare against
    node-where:
      name: where
      in: query
      description: The criterion you want to find for your nodes
      content:
        application/json:
          schema:
            type: array
            description: List of criteria
            items:
              type: object
              properties:
                objectType:
                  type: string
                  description: Type of the object
                  example: node
                attribute:
                  description: Attribute to compare
                  example: OS
                  type: string
                comparator:
                  description: Comparator to use
                  example: eq
                  type: string
                value:
                  type: string
                  example: Linux
                  description: Value to compare against
    node-composition:
      name: composition
      in: query
      description: Boolean operator to use between each  `where` criteria.
      schema:
        type: string
        enum:
          - and
          - or
        default: and
        example: and
    node-select:
      name: select
      in: query
      description: What kind of data we want to include. Here we can get policy servers/relay by setting `nodeAndPolicyServer`. Only used if `where` is defined.
      schema:
        type: string
        default: node
    node-ids:
      name: ids
      required: true
      in: query
      description: Comma separated list of node Ids
      schema:
        type: string
        default: default
        format: comma-separated list
        example: 8403353b-42c4-46f5-a08d-bc77a1a0bad9,root
    node-delete-mode:
      name: mode
      in: query
      required: false
      description: Deletion mode to use, either move to trash ('move', default) or erase ('erase')
      schema:
        default: move
        type: string
        enum:
          - move
          - erase
        example: move
    parameter-id:
      name: parameterId
      in: path
      required: true
      description: Id of the parameter to manage
      schema:
        type: string
        example: rudder_file_edit_header
    rule-category-id:
      name: ruleCategoryId
      in: path
      required: true
      schema:
        type: string
        format: uuid
        description: Rule category id
        example: e0a311fa-f7b2-4f9e-89a9-db517b9c6b90
    secret-name:
      name: name
      in: path
      required: true
      description: Unique name of the secret
      schema:
        type: string
    setting-allowed-networks:
      name: nodeId
      in: path
      required: true
      description: Policy server ID for which you want to manage allowed networks.
      schema:
        type: string
        format: uuid (or "root")
        example: 9a1773c9-0889-40b6-be89-f6504443ac1b
    setting-id:
      name: settingId
      in: path
      required: true
      description: Id of the setting to set
      schema:
        type: string
        example: global_policy_mode
    archive-kind:
      name: archiveKind
      in: path
      required: true
      schema:
        type: string
        enum:
          - full
          - groups
          - rules
          - directives
          - parameters
        example: full
      description: Type of archive to make
    technique-id:
      name: techniqueId
      in: path
      description: Technique ID
      required: true
      schema:
        type: string
        example: userManagement
        description: Technique ID
    technique-version:
      name: techniqueVersion
      in: path
      description: Technique version
      required: true
      schema:
        type: string
        example: '6.0'
        description: Technique version
    tenant-id:
      name: id
      in: path
      required: true
      description: Id of the tenant
      schema:
        type: string
        format: string matching ^(\p{Alnum}[\p{Alnum}-_]*)$
        example: zone-1
    username:
      name: username
      in: path
      required: true
      description: Username of an user (unique and must not contain whitespace)
      schema:
        type: string
        example: JaneDoe
  responses:
    agent-output:
      description: Agent output
      content:
        text/plain:
          schema:
            type: string
            example: |-
              Start execution with config [20200218-112602-11ce4f64]
              Hostname        M| State         Technique                 Component                 Key                Message 192.168.210.5   E| compliant     Common                    ncf Initialization                           Configuration library initialization was correct 192.168.210.5   E| compliant     Common                    Update                                       Policy and configuration library are already up to date. No action required. [...]
              ## Summary ##################################################################### 90 components verified in 15 directives
                => 62 components in Enforce mode
                    -> 48 compliant
                    -> 13 not-applicable
                    -> 1 error
                => 28 components in Audit mode
                    -> 15 compliant
                    -> 3 not-applicable
                    -> 10 non-compliant
              Execution time: 8.89s ################################################################################
