openapi: 3.0.4
info:
  title: WEDA API
  description: WEDA Core API documentation
  version: 0.1.0
tags:
  - name: ___swagger_1-iam_swagger_json_Identity & Access
    x-displayName: Identity & Access
  - name: ___swagger_2-device-management_swagger_json_Batch Tasks
    x-displayName: Batch Tasks
  - name: ___swagger_2-device-management_swagger_json_Devices
    x-displayName: Devices
  - name: ___swagger_3-container-management_swagger_json_Container Commands
    x-displayName: Container Commands
  - name: ___swagger_3-container-management_swagger_json_Container Deployments
    x-displayName: Container Deployments
  - name: ___swagger_3-container-management_swagger_json_Container Registries
    x-displayName: Container Registries
  - name: ___swagger_3-container-management_swagger_json_Container Stacks
    x-displayName: Container Stacks
  - name: ___swagger_4-datapoints_swagger_json_Data Objects
    x-displayName: Data Objects
paths:
  /platform/solutions/api/v1/auth/tokens:
    servers: []
    post:
      tags:
        - ___swagger_1-iam_swagger_json_Identity & Access
      summary: Create JWT access token
      description: >-
        Exchanges an existing authentication credential (header or token) for a
        JWT access token.


        * Use the Authorization Bearer header with a JWT token to perform the token exchange.

        * Use the request body with `token` (JWT token) to perform the token exchange.

        * Use the request body with `refreshToken` (JWT token) to obtain a new JWT.


        **Parameters**

        * `grant_type`: must be `refresh_token` when using a refresh token in the request body to obtain a new JWT. 

        * `refreshToken` (string, optional): required when grant_type is refresh_token. Provide a valid Refresh Token to obtain a new JWT. 

        * `token` (string, optional): provide a valid Token to exchange for a JWT.


        **Responses**

        * `201 Created`: successfully returns a new access_token  

        * `403	Forbidden` No valid credentials found


        **Security**

        * This API requires either a valid Authorization header or a valid Refresh Token.  

        * Applicable for both public and internal applications, but authentication is required. 
      parameters:
        - name: grant_type
          in: query
          description: "Mode: 'refresh_token' for refresh token"
          schema:
            type: string
            description: "Mode: 'refresh_token' for refresh token"
            nullable: true
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/TokenBodyDto"
            example:
              token: e2fbcf54b10b48128319c319c376efbc....
              refreshToken: e2fbcf54b10b48128319c319c376efbc
      responses:
        "201":
          description: Created
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/TokenResultDto"
              example:
                accessToken: eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCc8.eyJleHAiOjE3NjExODQ0NTgsXmlzcyI6IkVkZ2VTeW5jLkF1dGhTZXJ2ZXIiLCJhdWQiOiJFZGdlU3luYy5BUEkiLCJpZCI6IjNhMWMxNjVlLTg2YmUtZDY3Yy03ZjVlLTY1ZjljMGZhZTAxNCIsInN1YiI6ImJhNmRjNzUyLTgxMDgtNGVjNS1hM2NhLWFmMDFhYjY0ODlkNiIsInJvbGUiOiJhZG1pbiIsInJlYWxtX2FjY2VzcyI6eyJyb2xlcyI6WyJhZG1pbiJdfSwicHJlZmVycmVkX3VzZXJuYW1lIjoiYWRtaW5AYWR2YW50ZWNoLmNvbSIsImVtYWlsIjoiYWRtaW5AYWR2YW50ZWNoLmNvbSIsInJlc291cmNlX2FjY2VzcyI6eyIzYTFiMDA0NS0xYmRmLTI1YWQtMzg3Ny01ZTdlY2M5ZTBmM2EiOnsib3JnTmFtZSI6IlNlY29uZE9yZ18yMSIsIm9yZ1JvbGUiOiJhZG1pbiIsInJvbGVzIjpbXX0sIjNhMWIwMDNjLWE0MmMtZWU0ZS01ZDViLTcyNDlmYTljYWUzNCI6eyJvcmdOYW1lIjoiRmlyc3RPcmcyIiwib3JnUm9sZSI6ImFkbWluIiwicm9sZXMiOltdfSwiM2ExYjAwM2ItM2VjMS0xNzkyLTQ0NzYtMTI5N2VmMGMyOGE1Ijp7Im9yZ05hbWUiOiJSb290T3JnIiwib3JnUm9sZSI6ImFkbWluIiwicm9sZXMiOltdfSwiM2ExZDAyNDQtMGQyMy1kNjQ0LWRjOWUtNzEwZjRkOWI4MjFlIjp7Im9yZ05hbWUiOiJSb290Q2hpbGQwMSIsIm9yZ1JvbGUiOiJhZG1pbiIsInJvbGVzIjpbXX0sIjNhMWQwMjQ1LTA2NTUtNzI0Ny1jN2M2LWYyZDIyMWVkM2YzYSI6eyJvcmdOYW1lIjoiUm9vdENoaWxkMDIiLCJvcmdSb2xlIjoiYWRtaW4iLCJyb2xlcyI6W119fSwidGVuYW50SWQiOiJ5eWRzIiwic3JwX25hbWUiOiJlZGdlc3luYyJ9.XqET_6BoV8D1UXhgqQQro8AOG7faeS2loTgJMRRycuFtbrAHMgGBJecFKqRlVsSrouBZZp62mfbpC9dfQAGVddadvwKza3P6u26WwSvVUmj67rL8rJfhFNiB0bAsqxK6yNK50MIxBYtCM_KpdEeDG-1X04TNgsDYZ5nXlxGcUzzNVPceVocfmTa2I6sVEYJCxCFsZRNdz-pUpVT11J97gTIAO_lqAanVI9H8aKtEOkLF844sm8NAKynogJhySGjhM79dbcdClPICYJZ9IVo1IL6VlNhyui3PkZKD0h2DA32xCScOdZI7klSg1x5o1r1_oMV-b03cxtyTxjERCCxTDA
                refreshToken: d891ac59aef945a3b67dc2ef569b20aa
                expiresIn: 7200
                tokenType: Bearer
        "400":
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/RemoteServiceErrorResponse"
        "401":
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/RemoteServiceErrorResponse"
        "403":
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/RemoteServiceErrorResponse"
        "404":
          description: Not Found
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/RemoteServiceErrorResponse"
        "500":
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/RemoteServiceErrorResponse"
        "501":
          description: Not Implemented
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/RemoteServiceErrorResponse"
      security:
        - oidc: []
        - Bearer: []
  "/platform/solutions/api/v1/orgs/{orgId}":
    servers: []
    get:
      tags:
        - ___swagger_1-iam_swagger_json_Identity & Access
      summary: Get a specific organization by ID
      description: >-
        Retrieve detailed information of an organization by its unique
        identifier.


        **Parameters**


        * `orgId` (Guid, required): unique identifier of the organization.


        **Responses**


        * `200 OK`: returns the organization details.

        * `404 Not Found`: no organization found with the given ID.


        **Security**


        * This API requires authentication.
      parameters:
        - name: orgId
          in: path
          description: |-
            The ID of the organization.  
                    Example : 783707f1-0659-4892-a872-8f506d225d7b
          required: true
          schema:
            type: string
            description: |-
              The ID of the organization.  
                      Example : 783707f1-0659-4892-a872-8f506d225d7b
            format: uuid
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/OrgDto"
              example:
                name: OrgSample
                orgId: 70c00505-4678-4128-8eb5-88221ecccd75
                parentOrgId: 70c00505-4678-4128-8eb5-88221ecccd75
        "400":
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/RemoteServiceErrorResponse"
        "401":
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/RemoteServiceErrorResponse"
        "403":
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/RemoteServiceErrorResponse"
        "404":
          description: Not Found
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/RemoteServiceErrorResponse"
        "500":
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/RemoteServiceErrorResponse"
        "501":
          description: Not Implemented
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/RemoteServiceErrorResponse"
      security:
        - oidc: []
        - Bearer: []
    put:
      tags:
        - ___swagger_1-iam_swagger_json_Identity & Access
      summary: Update an existing organization
      description: >-
        Modify details of an existing organization identified by its ID.


        **Parameters**


        * `orgId` (Guid, required): ID of the organization.

        * Request body: `CreateUpdateOrgDto` with updated values.

        - `input` (CreateUpdateOrgDto, required): the organization definition, including:  
          - `Name` (string, required, max length 100): the name of the organization.  
          - `parentOrgId` (string, optional): the ID of the parent organization, if applicable.

        **Responses**


        * `200 OK`: organization updated successfully.

        * `404 Not Found`: organization not found.


        **Security**


        * This API requires authentication.
      parameters:
        - name: orgId
          in: path
          description: |-
            The ID of the organization.  
                        Example : 783707f1-0659-4892-a872-8f506d225d7b
          required: true
          schema:
            type: string
            description: |-
              The ID of the organization.  
                          Example : 783707f1-0659-4892-a872-8f506d225d7b
            format: uuid
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/CreateUpdateOrgDto"
            example:
              name: OrgSample
              parentOrgId: 70c00505-4678-4128-8eb5-88221ecccd75
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/OrgDto"
              example:
                name: OrgSample
                orgId: 70c00505-4678-4128-8eb5-88221ecccd75
                parentOrgId: 70c00505-4678-4128-8eb5-88221ecccd75
        "400":
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/RemoteServiceErrorResponse"
        "401":
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/RemoteServiceErrorResponse"
        "403":
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/RemoteServiceErrorResponse"
        "404":
          description: Not Found
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/RemoteServiceErrorResponse"
        "500":
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/RemoteServiceErrorResponse"
        "501":
          description: Not Implemented
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/RemoteServiceErrorResponse"
      security:
        - oidc: []
        - Bearer: []
    delete:
      tags:
        - ___swagger_1-iam_swagger_json_Identity & Access
      summary: Delete an organization
      description: |-
        Remove an organization by its ID.

        **Parameters**

        * `orgId` (Guid, required): ID of the organization.

        **Responses**

        * `204 No Content`: organization deleted successfully.
        * `404 Not Found`: organization not found.

        **Security**

        * This API requires authentication.
      parameters:
        - name: orgId
          in: path
          description: |-
            The ID of the organization.  
                        Example : 783707f1-0659-4892-a872-8f506d225d7b
          required: true
          schema:
            type: string
            description: |-
              The ID of the organization.  
                          Example : 783707f1-0659-4892-a872-8f506d225d7b
            format: uuid
      responses:
        "204":
          description: No Content
        "400":
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/RemoteServiceErrorResponse"
        "401":
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/RemoteServiceErrorResponse"
        "403":
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/RemoteServiceErrorResponse"
        "404":
          description: Not Found
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/RemoteServiceErrorResponse"
        "500":
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/RemoteServiceErrorResponse"
        "501":
          description: Not Implemented
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/RemoteServiceErrorResponse"
      security:
        - oidc: []
        - Bearer: []
  /platform/solutions/api/v1/orgs:
    servers: []
    get:
      tags:
        - ___swagger_1-iam_swagger_json_Identity & Access
      summary: Get organizations (root or sub-orgs)
      description: >-
        Retrieve organizations in multiple formats:

        * Paged results (`default`)

        * Flat list (`view=list`)

        * Hierarchical tree (`view=tree`)


        **Parameters**


        * `parentOrgId` (Guid, optional): retrieve sub-organizations under a specific parent.

        * `view` (string, optional): "list", "tree", or "page" (default).

        * `skipCount`, `maxResultCount`, `sorting`: standard paging/sorting fields.


        **Responses**


        * `200 OK`: returns paged data, list, or tree depending on `view`.


        **Security**


        * This API requires authentication.
      parameters:
        - name: parentOrgId
          in: query
          description: >-
            The parent organization ID. If specified, retrieves
            sub-organizations under this org. If omitted, retrieves root-level
            organizations.  
                        Example : 783707f1-0659-4892-a872-8f506d225d7b
          schema:
            type: string
            description: >-
              The parent organization ID. If specified, retrieves
              sub-organizations under this org. If omitted, retrieves root-level
              organizations.  
                          Example : 783707f1-0659-4892-a872-8f506d225d7b
            format: uuid
            nullable: true
        - name: view
          in: query
          description: >-
            View mode: 'list' for flat list, 'tree' for hierarchical tree view,
            default is 'page'.  
                        Example : page, list, tree
          schema:
            type: string
            description: >-
              View mode: 'list' for flat list, 'tree' for hierarchical tree
              view, default is 'page'.  
                          Example : page, list, tree
            nullable: true
        - name: skipCount
          in: query
          schema:
            type: integer
            format: int32
        - name: maxResultCount
          in: query
          description: Maximum number of records to return (1–1000).
          schema:
            maximum: 1000
            minimum: 0
            type: integer
            description: Maximum number of records to return (1–1000).
            format: int32
            nullable: true
        - name: sorting
          in: query
          schema:
            type: string
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/OrgDtoPagedResultDto"
              example:
                totalCount: 2
                items:
                  - name: Advantech HQ
                    orgId: 70c00505-4678-4128-8eb5-88221ecccd75
                    parentOrgId: null
                  - name: R&D Department
                    orgId: 8c77338d-0f1f-4ac8-97eb-0ef3a1b68e23
                    parentOrgId: 70c00505-4678-4128-8eb5-88221ecccd75
        "400":
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/RemoteServiceErrorResponse"
        "401":
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/RemoteServiceErrorResponse"
        "403":
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/RemoteServiceErrorResponse"
        "404":
          description: Not Found
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/RemoteServiceErrorResponse"
        "500":
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/RemoteServiceErrorResponse"
        "501":
          description: Not Implemented
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/RemoteServiceErrorResponse"
      security:
        - oidc: []
        - Bearer: []
    post:
      tags:
        - ___swagger_1-iam_swagger_json_Identity & Access
      summary: Create a new organization
      description: >-
        Add a new organization with the provided details.


        **Parameters**


        * Request body: `CreateUpdateOrgDto` with organization information.

        - `input` (CreateUpdateOrgDto, required): the organization definition, including:  
          - `Name` (string, required, max length 100): the name of the organization.  
          - `parentOrgId` (string, optional): the ID of the parent organization, if applicable.

        **Responses**


        * `201 Created`: new organization created successfully.


        **Security**


        * This API requires authentication.
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/CreateUpdateOrgDto"
            example:
              name: OrgSample
              parentOrgId: 70c00505-4678-4128-8eb5-88221ecccd75
      responses:
        "201":
          description: Created
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/OrgDto"
              example:
                name: OrgSample
                orgId: 70c00505-4678-4128-8eb5-88221ecccd75
                parentOrgId: 70c00505-4678-4128-8eb5-88221ecccd75
        "400":
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/RemoteServiceErrorResponse"
        "401":
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/RemoteServiceErrorResponse"
        "403":
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/RemoteServiceErrorResponse"
        "404":
          description: Not Found
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/RemoteServiceErrorResponse"
        "500":
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/RemoteServiceErrorResponse"
        "501":
          description: Not Implemented
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/RemoteServiceErrorResponse"
      security:
        - oidc: []
        - Bearer: []
  "/platform/solutions/api/v1/orgs/{orgId}/children":
    servers: []
    get:
      tags:
        - ___swagger_1-iam_swagger_json_Identity & Access
      summary: Get children organizations up to certain depth
      description: >-
        Retrieve child organizations under a given organization up to a
        specified depth.


        **Parameters**


        * `orgId` (Guid, required): ID of the parent organization.

        * `depth` (int, optional, default=1): Number of levels of children to retrieve.


        **Responses**


        * `200 OK`: returns children org tree.
      parameters:
        - name: orgId
          in: path
          description: |-
            The ID of the organization.  
                        Example : 783707f1-0659-4892-a872-8f506d225d7b
          required: true
          schema:
            type: string
            description: |-
              The ID of the organization.  
                          Example : 783707f1-0659-4892-a872-8f506d225d7b
            format: uuid
        - name: depth
          in: query
          description: |-
            Number of levels of children to retrieve.  
                        Example : 1, 2, 3
          schema:
            type: integer
            description: |-
              Number of levels of children to retrieve.  
                          Example : 1, 2, 3
            format: int32
            default: 1
            nullable: true
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/OrgTreeDto"
              example:
                orgId: 70c00505-4678-4128-8eb5-88221ecccd75
                name: Advantech HQ
                parentOrgId: null
                children:
                  - orgId: c6de8b2f-116a-4f89-b7c7-4aaf43c02c3e
                    name: R&D Division
                    parentOrgId: 70c00505-4678-4128-8eb5-88221ecccd75
                    children:
                      - orgId: d5b84af3-8b4b-4e71-8b32-c23d9dce7bb3
                        name: AI Department
                        parentOrgId: c6de8b2f-116a-4f89-b7c7-4aaf43c02c3e
                        children: []
                      - orgId: 77dcb763-3c46-49a8-92ab-451c7c6d47f2
                        name: IoT Department
                        parentOrgId: c6de8b2f-116a-4f89-b7c7-4aaf43c02c3e
                        children: []
                  - orgId: 8b3a0a7e-05a8-4a90-861a-5e015b0e9a47
                    name: Sales Division
                    parentOrgId: 70c00505-4678-4128-8eb5-88221ecccd75
                    children:
                      - orgId: 2e8708f4-9ad5-4bb9-b16c-53cb5f7c1f71
                        name: Asia Region
                        parentOrgId: 8b3a0a7e-05a8-4a90-861a-5e015b0e9a47
                        children: []
                      - orgId: 95b49b55-f021-4f70-92b3-256f4a7e20a6
                        name: Europe Region
                        parentOrgId: 8b3a0a7e-05a8-4a90-861a-5e015b0e9a47
                        children: []
        "400":
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/RemoteServiceErrorResponse"
        "401":
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/RemoteServiceErrorResponse"
        "403":
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/RemoteServiceErrorResponse"
        "404":
          description: Not Found
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/RemoteServiceErrorResponse"
        "500":
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/RemoteServiceErrorResponse"
        "501":
          description: Not Implemented
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/RemoteServiceErrorResponse"
      security:
        - oidc: []
        - Bearer: []
  "/platform/solutions/api/v1/orgs/{orgId}/parents":
    servers: []
    get:
      tags:
        - ___swagger_1-iam_swagger_json_Identity & Access
      summary: Get parent organizations up to certain depth
      description: >-
        Retrieve parent organizations of a given organization up to a specified
        depth.


        **Parameters**


        * `orgId` (Guid, required): ID of the child organization.

        * `depth` (int, optional, default=1): Number of parent levels to retrieve.


        **Responses**


        * `200 OK`: returns parent org tree.
      parameters:
        - name: orgId
          in: path
          description: |-
            The ID of the organization.  
                        Example : 783707f1-0659-4892-a872-8f506d225d7b
          required: true
          schema:
            type: string
            description: |-
              The ID of the organization.  
                          Example : 783707f1-0659-4892-a872-8f506d225d7b
            format: uuid
        - name: depth
          in: query
          description: "Depth of parent levels to retrieve. Example: 1, 2, 3"
          schema:
            type: integer
            description: "Depth of parent levels to retrieve. Example: 1, 2, 3"
            format: int32
            default: 1
            nullable: true
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/OrgTreeDto"
              example:
                orgId: 70c00505-4678-4128-8eb5-88221ecccd75
                name: Advantech HQ
                parentOrgId: null
                children:
                  - orgId: c6de8b2f-116a-4f89-b7c7-4aaf43c02c3e
                    name: R&D Division
                    parentOrgId: 70c00505-4678-4128-8eb5-88221ecccd75
                    children:
                      - orgId: d5b84af3-8b4b-4e71-8b32-c23d9dce7bb3
                        name: AI Department
                        parentOrgId: c6de8b2f-116a-4f89-b7c7-4aaf43c02c3e
                        children: []
                      - orgId: 77dcb763-3c46-49a8-92ab-451c7c6d47f2
                        name: IoT Department
                        parentOrgId: c6de8b2f-116a-4f89-b7c7-4aaf43c02c3e
                        children: []
                  - orgId: 8b3a0a7e-05a8-4a90-861a-5e015b0e9a47
                    name: Sales Division
                    parentOrgId: 70c00505-4678-4128-8eb5-88221ecccd75
                    children:
                      - orgId: 2e8708f4-9ad5-4bb9-b16c-53cb5f7c1f71
                        name: Asia Region
                        parentOrgId: 8b3a0a7e-05a8-4a90-861a-5e015b0e9a47
                        children: []
                      - orgId: 95b49b55-f021-4f70-92b3-256f4a7e20a6
                        name: Europe Region
                        parentOrgId: 8b3a0a7e-05a8-4a90-861a-5e015b0e9a47
                        children: []
        "400":
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/RemoteServiceErrorResponse"
        "401":
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/RemoteServiceErrorResponse"
        "403":
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/RemoteServiceErrorResponse"
        "404":
          description: Not Found
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/RemoteServiceErrorResponse"
        "500":
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/RemoteServiceErrorResponse"
        "501":
          description: Not Implemented
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/RemoteServiceErrorResponse"
      security:
        - oidc: []
        - Bearer: []
  "/platform/solutions/api/v1/users/{userId}/orgs":
    servers: []
    get:
      tags:
        - ___swagger_1-iam_swagger_json_Identity & Access
      summary: Get user's roles across organizations
      description: |-
        Retrieve all organization roles linked to the specified user.

        **Parameters**

        * `userId` (string, required): ID of the user.

        **Responses**

        * `200 OK`: list of organizations with associated roles for the user.

        **Security**

        * This API requires authentication.
      parameters:
        - name: userId
          in: path
          description: |-
            The ID of the user.  
                        Example : 783707f1-0659-4892-a872-8f506d225d7b
          required: true
          schema:
            type: string
            description: |-
              The ID of the user.  
                          Example : 783707f1-0659-4892-a872-8f506d225d7b
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: "#/components/schemas/UserOrgWithRolesDto"
              example:
                - orgId: a1a2a3a4-a5a6-a7a8-a9a0-a1a2a3a4a5a6
                  orgName: Advantech HQ
                  orgRole: admin
                  serviceRoles:
                    - service: iam
                      serviceRole: admin
                    - service: datapoint
                      serviceRole: viewer
                - orgId: b1b2b3b4-b5b6-b7b8-b9b0-b1b2b3b4b5b6
                  orgName: Advantech Vietnam
                  orgRole: viewer
                  serviceRoles:
                    - service: container
                      serviceRole: viewer
        "400":
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/RemoteServiceErrorResponse"
        "401":
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/RemoteServiceErrorResponse"
        "403":
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/RemoteServiceErrorResponse"
        "404":
          description: Not Found
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/RemoteServiceErrorResponse"
        "500":
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/RemoteServiceErrorResponse"
        "501":
          description: Not Implemented
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/RemoteServiceErrorResponse"
      security:
        - oidc: []
        - Bearer: []
  "/platform/solutions/api/v1/orgs/{orgId}/users":
    servers: []
    get:
      tags:
        - ___swagger_1-iam_swagger_json_Identity & Access
      summary: Get users by organization ID
      description: >-
        Retrieve a paginated list of users belonging to a specific
        organization.  


        **Usage**  

        `GET /orgs/{orgId}/users?skipCount=0&maxResultCount=10&sorting=Name`  


        **Parameters**  

        - `orgId` (Guid, required): the ID of the organization.  

        - `skipCount` (int, optional): number of records to skip.  

        - `maxResultCount` (int, optional, range 1–1000): maximum number of records to return.  

        - `sorting` (string, optional): sorting expression, e.g. `Name asc`.  


        **Responses**  

        - `200 OK`: paginated list of users in the organization.  

        - `404 Not Found`: organization not found.  


        **Security**  

        This API requires authentication.
      parameters:
        - name: orgId
          in: path
          description: "The ID of the organization. Example :
            783707f1-0659-4892-a872-8f506d225d7b"
          required: true
          schema:
            type: string
            description: "The ID of the organization. Example :
              783707f1-0659-4892-a872-8f506d225d7b"
            format: uuid
        - name: skipCount
          in: query
          schema:
            type: integer
            format: int32
        - name: maxResultCount
          in: query
          description: Maximum number of records to return (1–1000).
          schema:
            maximum: 1000
            minimum: 0
            type: integer
            description: Maximum number of records to return (1–1000).
            format: int32
            nullable: true
        - name: sorting
          in: query
          schema:
            type: string
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/OrgUserDeskDtoPagedResultDto"
              example:
                totalCount: 2
                items:
                  - userId: user-12345
                    orgRole: admin
                    name: Ken Huang
                    email: ken.huang@advantech.com
                    role: admin
                    orgId: 70c00505-4678-4128-8eb5-88221ecccd75
                  - userId: user-67890
                    orgRole: admin
                    name: An Nguyen
                    email: an.nguyen@advantech.vn
                    role: viewer
                    orgId: 70c00505-4678-4128-8eb5-88221ecccd75
        "400":
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/RemoteServiceErrorResponse"
        "401":
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/RemoteServiceErrorResponse"
        "403":
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/RemoteServiceErrorResponse"
        "404":
          description: Not Found
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/RemoteServiceErrorResponse"
        "500":
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/RemoteServiceErrorResponse"
        "501":
          description: Not Implemented
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/RemoteServiceErrorResponse"
      security:
        - oidc: []
        - Bearer: []
    post:
      tags:
        - ___swagger_1-iam_swagger_json_Identity & Access
      summary: Add an existing user to an organization
      description: >-
        Associates an existing user with an existing organization, assigning the
        specified roles or permissions.  


        **Usage**  

        `POST /orgs/{orgId}/users`  


        **Parameters**  

        - `orgId` (Guid, required): the ID of the organization.  

        - Request body: 
            - `input` (CreateUpdateOrgUserDtoNoOrg, required): the user information, including:  
                - `userId` (string, required): the ID of the user to be added to the organization.  
                - `orgRole` (string, required, max length 50): the role assigned to the user within the organization. (`admin`, `operator`, `viewer`)  

        **Responses**  

        - `201 Created`: user successfully added to organization.  

        - `400 Bad Request`: invalid input.  


        **Security**  

        This API requires authentication.
      parameters:
        - name: orgId
          in: path
          description: "The ID of the organization. Example :
            783707f1-0659-4892-a872-8f506d225d7b"
          required: true
          schema:
            type: string
            description: "The ID of the organization. Example :
              783707f1-0659-4892-a872-8f506d225d7b"
            format: uuid
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/CreateUpdateOrgUserDtoNoOrg"
            example:
              userId: 70c00505-4678-4128-8eb5-88221ecccd75
              orgRole: admin
      responses:
        "201":
          description: Created
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/OrgUserDeskDto"
              example:
                userId: 70c00505-4678-4128-8eb5-88221ecccd75
                orgRole: admin
                name: Ken Huang
                email: ken.huang@advantech.com
                role: SystemAdmin
                orgId: 70c00505-4678-4128-8eb5-88221ecccd75
        "400":
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/RemoteServiceErrorResponse"
        "401":
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/RemoteServiceErrorResponse"
        "403":
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/RemoteServiceErrorResponse"
        "404":
          description: Not Found
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/RemoteServiceErrorResponse"
        "500":
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/RemoteServiceErrorResponse"
        "501":
          description: Not Implemented
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/RemoteServiceErrorResponse"
      security:
        - oidc: []
        - Bearer: []
  "/platform/solutions/api/v1/orgs/{orgId}/users/{userId}":
    servers: []
    get:
      tags:
        - ___swagger_1-iam_swagger_json_Identity & Access
      summary: Get organization user by composite key
      description: >-
        Retrieve detailed information about an organization user by specifying
        both **OrgId** and **UserId**.  


        **Usage**  

        `GET /orgs/{orgId}/users/{userId}`  


        **Parameters**  

        - `orgId` (Guid, required): the ID of the organization.  

        - `userId` (string, required): the ID of the user within the organization.  


        **Responses**  

        - `200 OK`: detailed information of the organization user.  

        - `404 Not Found`: organization or user not found.  


        **Security**  

        This API requires authentication.
      parameters:
        - name: orgId
          in: path
          description: "The ID of the organization. Example :
            783707f1-0659-4892-a872-8f506d225d7b"
          required: true
          schema:
            type: string
            description: "The ID of the organization. Example :
              783707f1-0659-4892-a872-8f506d225d7b"
            format: uuid
        - name: userId
          in: path
          description: "The ID of the user to be added to the organization. Example :
            783707f1-0659-4892-a872-8f506d225d7b"
          required: true
          schema:
            type: string
            description: "The ID of the user to be added to the organization. Example :
              783707f1-0659-4892-a872-8f506d225d7b"
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/OrgUserDeskDto"
              example:
                userId: 70c00505-4678-4128-8eb5-88221ecccd75
                orgRole: admin
                name: Ken Huang
                email: ken.huang@advantech.com
                role: SystemAdmin
                orgId: 70c00505-4678-4128-8eb5-88221ecccd75
        "400":
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/RemoteServiceErrorResponse"
        "401":
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/RemoteServiceErrorResponse"
        "403":
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/RemoteServiceErrorResponse"
        "404":
          description: Not Found
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/RemoteServiceErrorResponse"
        "500":
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/RemoteServiceErrorResponse"
        "501":
          description: Not Implemented
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/RemoteServiceErrorResponse"
      security:
        - oidc: []
        - Bearer: []
    patch:
      tags:
        - ___swagger_1-iam_swagger_json_Identity & Access
      summary: Update organization user by composite key
      description: >-
        Update the details of an organization user by specifying both OrgId and
        UserId.  


        **Usage**  

        `Patch /orgs/{orgId}/users/{userId}`  


        **Parameters**  

        - `orgId` (Guid, required): the ID of the organization.  

        - `userId` (string, required): the ID of the user within the organization.  

        - Request body:  
            - `input` (UpdateOrgUserByKeyDtoNoId, required): the user information, including:  
                - `orgRole` (string, required): the role assigned to the user within the organization. (`admin`, `operator`, `viewer`)  

        **Responses**  

        - `200 OK`: updated organization user details.  

        - `404 Not Found`: organization or user not found.  


        **Security**  

        This API requires authentication.
      parameters:
        - name: orgId
          in: path
          description: "The ID of the organization. Example :
            783707f1-0659-4892-a872-8f506d225d7b"
          required: true
          schema:
            type: string
            description: "The ID of the organization. Example :
              783707f1-0659-4892-a872-8f506d225d7b"
            format: uuid
        - name: userId
          in: path
          description: "The ID of the user to be added to the organization. Example :
            783707f1-0659-4892-a872-8f506d225d7b"
          required: true
          schema:
            type: string
            description: "The ID of the user to be added to the organization. Example :
              783707f1-0659-4892-a872-8f506d225d7b"
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/UpdateOrgUserByKeyDtoNoId"
            example:
              orgRole: admin
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/OrgUserDeskDto"
              example:
                userId: 70c00505-4678-4128-8eb5-88221ecccd75
                orgRole: admin
                name: Ken Huang
                email: ken.huang@advantech.com
                role: SystemAdmin
                orgId: 70c00505-4678-4128-8eb5-88221ecccd75
        "400":
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/RemoteServiceErrorResponse"
        "401":
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/RemoteServiceErrorResponse"
        "403":
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/RemoteServiceErrorResponse"
        "404":
          description: Not Found
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/RemoteServiceErrorResponse"
        "500":
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/RemoteServiceErrorResponse"
        "501":
          description: Not Implemented
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/RemoteServiceErrorResponse"
      security:
        - oidc: []
        - Bearer: []
    delete:
      tags:
        - ___swagger_1-iam_swagger_json_Identity & Access
      summary: Delete organization user by composite key
      description: >-
        Delete an organization user by specifying both OrgId and UserId.  


        **Usage**  

        `DELETE /orgs/{orgId}/users/{userId}`  


        **Parameters**  

        - `orgId` (Guid, required): the ID of the organization.  

        - `userId` (string, required): the ID of the user within the organization.  


        **Responses**  

        - `204 No Content`: user successfully removed from organization.  

        - `404 Not Found`: organization or user not found.  


        **Security**  

        This API requires authentication.
      parameters:
        - name: orgId
          in: path
          description: "The ID of the organization. Example :
            783707f1-0659-4892-a872-8f506d225d7b"
          required: true
          schema:
            type: string
            description: "The ID of the organization. Example :
              783707f1-0659-4892-a872-8f506d225d7b"
            format: uuid
        - name: userId
          in: path
          description: "The ID of the user to be added to the organization. Example :
            783707f1-0659-4892-a872-8f506d225d7b"
          required: true
          schema:
            type: string
            description: "The ID of the user to be added to the organization. Example :
              783707f1-0659-4892-a872-8f506d225d7b"
      responses:
        "204":
          description: No Content
        "400":
          description: Bad Request
          content:
            text/plain:
              schema:
                $ref: "#/components/schemas/RemoteServiceErrorResponse"
            application/json:
              schema:
                $ref: "#/components/schemas/RemoteServiceErrorResponse"
            text/json:
              schema:
                $ref: "#/components/schemas/RemoteServiceErrorResponse"
        "401":
          description: Unauthorized
          content:
            text/plain:
              schema:
                $ref: "#/components/schemas/RemoteServiceErrorResponse"
            application/json:
              schema:
                $ref: "#/components/schemas/RemoteServiceErrorResponse"
            text/json:
              schema:
                $ref: "#/components/schemas/RemoteServiceErrorResponse"
        "403":
          description: Forbidden
          content:
            text/plain:
              schema:
                $ref: "#/components/schemas/RemoteServiceErrorResponse"
            application/json:
              schema:
                $ref: "#/components/schemas/RemoteServiceErrorResponse"
            text/json:
              schema:
                $ref: "#/components/schemas/RemoteServiceErrorResponse"
        "404":
          description: Not Found
          content:
            text/plain:
              schema:
                $ref: "#/components/schemas/RemoteServiceErrorResponse"
            application/json:
              schema:
                $ref: "#/components/schemas/RemoteServiceErrorResponse"
            text/json:
              schema:
                $ref: "#/components/schemas/RemoteServiceErrorResponse"
        "500":
          description: Internal Server Error
          content:
            text/plain:
              schema:
                $ref: "#/components/schemas/RemoteServiceErrorResponse"
            application/json:
              schema:
                $ref: "#/components/schemas/RemoteServiceErrorResponse"
            text/json:
              schema:
                $ref: "#/components/schemas/RemoteServiceErrorResponse"
        "501":
          description: Not Implemented
          content:
            text/plain:
              schema:
                $ref: "#/components/schemas/RemoteServiceErrorResponse"
            application/json:
              schema:
                $ref: "#/components/schemas/RemoteServiceErrorResponse"
            text/json:
              schema:
                $ref: "#/components/schemas/RemoteServiceErrorResponse"
      security:
        - oidc: []
        - Bearer: []
  /platform/solutions/api/v1/users:
    servers: []
    get:
      tags:
        - ___swagger_1-iam_swagger_json_Identity & Access
      summary: Get a paginated list of users
      description: >-
        
        Retrieve a paginated and sorted list of application users.  


        **Usage**

        - Provide pagination parameters (`skipCount`, `maxResultCount`) to control result size.  

        - Provide sorting parameters (`sorting`) to order results.  


        **Parameters**

        - `skipCount` (int, optional): number of records to skip before starting to collect results.  

        - `maxResultCount` (int, optional): maximum number of records to return (1–1000).  

        - `sorting` (string, optional): field and direction to sort the results (e.g., "name asc", "email desc").  


        **Responses**

        - `200 OK`: successfully returns a paginated list of users.  

        - `401 Unauthorized`: caller does not have permission.  

        - `403 Forbidden`: caller does not have permission to list users.  


        **Security**

        - This API requires authentication.  

        - Available to users with appropriate roles.
      parameters:
        - name: skipCount
          in: query
          schema:
            type: integer
            format: int32
        - name: maxResultCount
          in: query
          description: Maximum number of records to return (1–1000).
          schema:
            maximum: 1000
            minimum: 0
            type: integer
            description: Maximum number of records to return (1–1000).
            format: int32
            nullable: true
        - name: sorting
          in: query
          schema:
            type: string
        - name: filter
          in: query
          description: Fuzzy search keywords
          schema:
            type: string
            description: Fuzzy search keywords
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/AppUserDisplayDtoPagedResultDto"
        "400":
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/RemoteServiceErrorResponse"
        "401":
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/RemoteServiceErrorResponse"
        "403":
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/RemoteServiceErrorResponse"
        "404":
          description: Not Found
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/RemoteServiceErrorResponse"
        "500":
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/RemoteServiceErrorResponse"
        "501":
          description: Not Implemented
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/RemoteServiceErrorResponse"
      security:
        - oidc: []
        - Bearer: []
  "/platform/solutions/api/v1/users/{userId}":
    servers: []
    get:
      tags:
        - ___swagger_1-iam_swagger_json_Identity & Access
      summary: Get an user by ID
      description: >-
        
        Retrieve details of a single application user by their unique ID.  


        **Usage**

        - Provide the `userId` of the target user to fetch detailed information.


        **Parameters**

        - `userId` (Guid, required): the unique identifier of the user to retrieve.


        **Responses**

        - `200 OK`: successfully returns the user details.  

        - `403 Forbidden`: caller does not have permission to view this user.  

        - `404 Not Found`: the user with the specified ID does not exist.


        **Security**

        - This API requires authentication.  

        - Accessible only to users with appropriate roles.
      parameters:
        - name: userId
          in: path
          description: |-
            The ID of the user.  
                        Example : 783707f1-0659-4892-a872-8f506d225d7b
          required: true
          schema:
            type: string
            description: |-
              The ID of the user.  
                          Example : 783707f1-0659-4892-a872-8f506d225d7b
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/AppUserDto"
        "400":
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/RemoteServiceErrorResponse"
        "401":
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/RemoteServiceErrorResponse"
        "403":
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/RemoteServiceErrorResponse"
        "404":
          description: Not Found
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/RemoteServiceErrorResponse"
        "500":
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/RemoteServiceErrorResponse"
        "501":
          description: Not Implemented
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/RemoteServiceErrorResponse"
      security:
        - oidc: []
        - Bearer: []
  "/platform/solutions/api/v1/orgs/{orgId}/tasks/{taskId}":
    servers: []
    delete:
      tags:
        - ___swagger_2-device-management_swagger_json_Batch Tasks
      summary: Delete a task
      description: |-
        Delete a task by its unique identifier.  
        The task can only be deleted if it is **not linked** to any batch.  

        **Usage**  
        `DELETE orgs/{orgId}/tasks/{taskId}`  

        **Parameters**  
        - `orgId` (string, required): the ID of the organization.  
        - `taskId` (Guid, required): the unique ID of the task.  

        **Responses**  
        - `204 No Content`: task deleted successfully.  
        - `404 Not Found`: task not found.  
        - `409 Conflict`: task is linked to a batch and cannot be deleted.  

        **Security**  
        This API requires authentication.
      parameters:
        - name: orgId
          in: path
          required: true
          schema:
            type: string
          example: 783707f1-0659-4892-a872-8f506d225d7b
        - name: taskId
          in: path
          required: true
          schema:
            type: string
            format: uuid
          example: 783707f1-0659-4892-a872-8f506d225d7b
      responses:
        "204":
          description: No Content
        "404":
          description: Not Found
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ProblemDetails"
        "409":
          description: Conflict
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ProblemDetails"
      security:
        - oidc: []
        - Bearer: []
    get:
      tags:
        - ___swagger_2-device-management_swagger_json_Batch Tasks
      summary: Get a task by ID
      description: >-
        Retrieve detailed information about a device task by its unique
        identifier.  


        **Usage**  

        `GET orgs/{orgId}/tasks/{taskId}`  


        **Parameters**  

        - `OrgId` (string, required): the ID of the organization the task belongs to.  

        - `taskId` (Guid, required): the unique ID of the task.  


        **Responses**  

        - `200 OK`: returns the task as `DeviceTaskDto`.  

        - `404 Not Found`: task not found.  


        **Security**  

        This API requires authentication.
      parameters:
        - name: orgId
          in: path
          required: true
          schema:
            type: string
          example: 783707f1-0659-4892-a872-8f506d225d7b
        - name: taskId
          in: path
          required: true
          schema:
            type: string
            format: uuid
          example: 783707f1-0659-4892-a872-8f506d225d7b
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/DeviceTaskDto"
              example:
                taskId: d3f9a8b1-5c6e-4aef-9f3b-123456789abc
                name: Temperature Read Task
                orgId: 3a1b003b-3ec1-1792-4476-1297ef0c28a5
                cmd: ReadTemperature
                payload: '{"interval": 60, "unit": "Celsius"}'
      security:
        - oidc: []
        - Bearer: []
    put:
      tags:
        - ___swagger_2-device-management_swagger_json_Batch Tasks
      summary: Update a task
      description: >-
        Update an existing device task by its unique identifier.  


        **Usage**  

        `PUT orgs/{orgId}/tasks/{taskId}`  


        **Parameters**  

        - `OrgId` (string, required): the ID of the organization the task belongs to.  

        - `taskId` (Guid, required): the unique ID of the task to update.  

        - `input` (CreateUpdateDeviceTaskDto, required): the task definition including the following properties:  
          - `Name` (string, required, max 100): Task name.  
          - `Cmd` (string, optional): the command that will be executed.  
          - `Payload` (string, optional): variables in the payload.  

        **Responses**  

        - `200 OK`: task updated successfully, returns the updated `DeviceTaskDto`.  

        - `404 Not Found`: task not found.  

        - `400 Bad Request`: invalid input data.  


        **Security**  

        This API requires authentication.
      parameters:
        - name: orgId
          in: path
          required: true
          schema:
            type: string
          example: 783707f1-0659-4892-a872-8f506d225d7b
        - name: taskId
          in: path
          required: true
          schema:
            type: string
            format: uuid
          example: 783707f1-0659-4892-a872-8f506d225d7b
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/CreateUpdateDeviceTaskByOrgIdDto"
            example:
              name: Set upload interval to 2000 milliseconds
              cmd: TelemetryConfiguration
              payload: '{"allInterval":200,"sensors":[{"resourceId":"783707f1-0659-4892-a872-8f506d225d7b","enabled":true,"interval":null}]}'
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/DeviceTaskDto"
              example:
                taskId: d3f9a8b1-5c6e-4aef-9f3b-123456789abc
                name: Temperature Read Task
                orgId: 3a1b003b-3ec1-1792-4476-1297ef0c28a5
                cmd: ReadTemperature
                payload: '{"interval": 60, "unit": "Celsius"}'
      security:
        - oidc: []
        - Bearer: []
  "/platform/solutions/api/v1/orgs/{orgId}/tasks":
    servers: []
    post:
      tags:
        - ___swagger_2-device-management_swagger_json_Batch Tasks
      summary: Create a new task under an organization
      description: >-
        Create a new device task scoped to the specified organization.  


        **Usage**  

        `POST /orgs/{orgId}/tasks`  


        **Parameters**  

        - `orgId` (string, required): the ID of the organization.  

        - `input` (CreateUpdateDeviceTaskByOrgIdDto, required): the task definition, including:  
          - `Name` (string, required): the name of the task.  
          - `Cmd` (string, optional): the command to be executed.  
          - `Payload` (string, optional): variables or payload for the task execution.  

        **Responses**  

        - `201 Created`: task created successfully, returns `DeviceTaskDto`.  

        - `400 Bad Request`: invalid input.  

        - `404 Not Found`: organization not found.  

        - `409 Conflict`: task name already exists under this org.


        **Security**  

        This API requires authentication.
      parameters:
        - name: orgId
          in: path
          required: true
          schema:
            type: string
          example: 783707f1-0659-4892-a872-8f506d225d7b
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/CreateUpdateDeviceTaskByOrgIdDto"
            example:
              name: Set upload interval to 2000 milliseconds
              cmd: TelemetryConfiguration
              payload: '{"allInterval":200,"sensors":[{"resourceId":"783707f1-0659-4892-a872-8f506d225d7b","enabled":true,"interval":null}]}'
      responses:
        "201":
          description: Created
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/DeviceTaskDto"
              example:
                taskId: d3f9a8b1-5c6e-4aef-9f3b-123456789abc
                name: Temperature Read Task
                orgId: 3a1b003b-3ec1-1792-4476-1297ef0c28a5
                cmd: ReadTemperature
                payload: '{"interval": 60, "unit": "Celsius"}'
        "400":
          description: Invalid input
        "404":
          description: Organization not found
        "409":
          description: Task name already exists
      security:
        - oidc: []
        - Bearer: []
    get:
      tags:
        - ___swagger_2-device-management_swagger_json_Batch Tasks
      summary: Get a paginated list of tasks by organization
      description: >-
        Retrieve a paginated list of tasks under a specific organization.  


        **Usage**  

        `GET /orgs/{orgId}/tasks?SkipCount=0&MaxResultCount=10&Sorting=Name`  


        **Parameters**  

        - `orgId` (string, required): the ID of the organization.  

        - `SkipCount` (int, optional): number of records to skip.  

        - `MaxResultCount` (int, optional): maximum number of records to return.  

        - `Sorting` (string, optional): sorting expression.  


        **Responses**  

        - `200 OK`: returns a paginated list of `DeviceTaskDto`.  

        - `404 Not Found`: organization not found.  


        **Security**  

        This API requires authentication.
      parameters:
        - name: orgId
          in: path
          required: true
          schema:
            type: string
          example: 783707f1-0659-4892-a872-8f506d225d7b
        - name: skipCount
          in: query
          schema:
            type: integer
            format: int32
        - name: maxResultCount
          in: query
          schema:
            maximum: 1000
            minimum: 1
            type: integer
            format: int32
        - name: sorting
          in: query
          schema:
            type: string
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/DeviceTaskDtoPagedResultDto"
              example:
                totalCount: 2
                items:
                  - taskId: d3f9a8b1-5c6e-4aef-9f3b-123456789abc
                    name: Temperature Read Task
                    orgId: org-default
                    cmd: ReadTemperature
                    payload: '{"interval": 60, "unit": "Celsius"}'
                  - taskId: e4a8b7c2-6f7e-4bfe-9d2b-987654321def
                    name: Humidity Check Task
                    orgId: org-default
                    cmd: CheckHumidity
                    payload: '{"interval": 120, "unit": "%"}'
      security:
        - oidc: []
        - Bearer: []
  "/platform/solutions/api/v1/orgs/{orgId}/batches/{batchId}/results":
    servers: []
    get:
      tags:
        - ___swagger_2-device-management_swagger_json_Batch Tasks
      summary: Get results of a batch
      description: >-
        Retrieve execution results for a batch.  


        **Usage**  

        `GET orgs/{orgId}/batches/{batchId}/results`  


        **Parameters**  

        - `batchId` (Guid, required): the ID of the batch.  

        - `triggeredBy` (enum, optional): filter by trigger type (Manual, Scheduler).  

        - `triggerId` (Guid, optional): filter by trigger ID.  

        - `groupBy` (enum, optional): set to `trigger` to group results by trigger.  


        **Responses**  

        - `200 OK`: returns a list of `BatchActionLogDto` or grouped results (`Dictionary<Guid, List<BatchActionLogDto>>`).  

        - `400 Bad Request`: invalid query parameter (e.g. unsupported triggeredBy).  

        - `404 Not Found`: batch not found.  


        **Security**  

        This API requires authentication.
      parameters:
        - name: orgId
          in: path
          required: true
          schema:
            type: string
          example: 783707f1-0659-4892-a872-8f506d225d7b
        - name: batchId
          in: path
          required: true
          schema:
            type: string
            format: uuid
          example: 783707f1-0659-4892-a872-8f506d225d7b
        - name: triggeredBy
          in: query
          schema:
            $ref: "#/components/schemas/TriggeredByType"
          example: Manual
        - name: triggerId
          in: query
          schema:
            type: string
            format: uuid
          example: 783707f1-0659-4892-a872-8f506d225d7b
        - name: groupBy
          in: query
          schema:
            $ref: "#/components/schemas/BatchResultGroupby"
          example: trigger
        - name: skipCount
          in: query
          schema:
            type: integer
            format: int32
        - name: maxResultCount
          in: query
          schema:
            maximum: 1000
            minimum: 1
            type: integer
            format: int32
        - name: sorting
          in: query
          schema:
            type: string
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                type: object
                additionalProperties:
                  type: array
                  items:
                    $ref: "#/components/schemas/BatchActionLogDto"
              example:
                totalCount: 2
                items:
                  - batchId: d3f9a8b1-5c6e-4aef-9f3b-123456789abc
                    taskId: a1f9a8b1-5c6e-4aef-9f3b-987654321def
                    deviceId: 74fe488d5d35
                    sendTime: 2025-10-23T10:00:00Z
                    sendSuccess: true
                    sendResultMessage: Command executed successfully.
                    executionResultId: 0e2c4b3a-5d6f-4a8b-b9c2-1234567890ab
                    triggerId: b4e7a1c2-2d4f-4a8c-b6d2-123456789def
                    triggeredBy: Manual
                  - batchId: d3f9a8b1-5c6e-4aef-9f3b-123456789abc
                    taskId: b7d2a9b2-7e5f-4b9c-9a8c-321654987abc
                    deviceId: 94aa218d6f72
                    sendTime: 2025-10-23T10:02:00Z
                    sendSuccess: false
                    sendResultMessage: Device unreachable.
                    executionResultId: 5e6d8c4a-7f8e-4b1a-b3c2-abcdef123456
                    triggerId: b4e7a1c2-2d4f-4a8c-b6d2-123456789def
                    triggeredBy: Manual
        "400":
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ProblemDetails"
        "404":
          description: Not Found
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ProblemDetails"
      security:
        - oidc: []
        - Bearer: []
  "/platform/solutions/api/v1/orgs/{orgId}/batches/{batchId}":
    servers: []
    delete:
      tags:
        - ___swagger_2-device-management_swagger_json_Batch Tasks
      summary: Delete a batch safely
      description: |-
        Delete a batch by ID.  

        Only batches with `IsEnabled = false` can be deleted.  

        **Usage**  
        `DELETE orgs/{orgId}/batches/{batchId}`  

        **Parameters**  
        - `batchId` (Guid, required): the ID of the batch.  

        **Responses**  
        - `204 No Content`: batch successfully deleted.  
        - `400 Bad Request`: batch is enabled and cannot be deleted.  
        - `403 Forbidden`: user not allowed to delete the batch.  
        - `404 Not Found`: batch not found.  

        **Security**  
        This API requires authentication.
      parameters:
        - name: orgId
          in: path
          required: true
          schema:
            type: string
          example: 783707f1-0659-4892-a872-8f506d225d7b
        - name: batchId
          in: path
          required: true
          schema:
            type: string
            format: uuid
          example: 783707f1-0659-4892-a872-8f506d225d7b
      responses:
        "204":
          description: Batch successfully deleted
        "400":
          description: Batch is enabled or request invalid
        "403":
          description: Forbidden to delete this batch
        "404":
          description: Batch not found
      security:
        - oidc: []
        - Bearer: []
    get:
      tags:
        - ___swagger_2-device-management_swagger_json_Batch Tasks
      summary: Get a batch by ID
      description: >-
        Retrieve a batch by its ID.  


        **Usage**  

        `GET /orgs/{orgId}/batches/{batchId}`  


        **Parameters**  

        - `orgId` (string, required): the ID of the organization.  

        - `batchId` (Guid, required): the ID of the batch.  


        **Responses**  

        - `200 OK`: returns the `BatchDto`.  

        - `400 Bad Request`: invalid request (missing or malformed parameters).  

        - `404 Not Found`: batch not found.  


        **Security**  

        This API requires authentication.
      parameters:
        - name: orgId
          in: path
          required: true
          schema:
            type: string
          example: 783707f1-0659-4892-a872-8f506d225d7b
        - name: batchId
          in: path
          required: true
          schema:
            type: string
            format: uuid
          example: 783707f1-0659-4892-a872-8f506d225d7b
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/BatchDto"
              example:
                batchId: b9b8c9d7-8a3f-4a62-b90e-2b1dce52a7b1
                name: Daily Temperature Sync
                orgId: 3a1b003b-3ec1-1792-4476-1297ef0c28a5
                cronExpression: 0/15 * * * * ?*
                isEnabled: true
                runOnStartup: false
                actions:
                  - deviceId: Device-001
                    taskId: e4b7f0c4-2a6b-4b0a-9a3c-bb5f2a8b1110
                  - deviceId: Device-002
                    taskId: e4b7f0c4-2a6b-4b0a-9a3c-bb5f2a8b2222
      security:
        - oidc: []
        - Bearer: []
    put:
      tags:
        - ___swagger_2-device-management_swagger_json_Batch Tasks
      summary: Update an existing batch
      description: >-
        Update an existing batch by ID.  


        **Usage**  

        `PUT orgs/{orgId}/batches/{batchId}`  


        **Parameters**  

        - `orgId` (string, required): the ID of the organization.  

        - `batchId` (Guid, required): the ID of the batch.  


        **Request body**  

        - `input` (CreateUpdateBatchDto, required): the batch definition, including name, organization, schedule, and actions.  
            - Name (string, required): the name of the batch, maximum 100 characters.  
            - OrgId (string, required): the ID of the organization the batch belongs to.  
            - CronExpression (string, required): Quartz cron expression (e.g. '0/15 * * * * ?'). 
            - IsEnabled (bool, required): whether the batch is enabled, default is true.  
            - RunOnStartup (bool, optional): whether to run the batch on application startup, default is false.  
            - Actions (List<CreateBatchActionDto>, optional): the list of actions within the batch.  
                - DeviceId (string, required): the ID of the device.  
                - TaskId (Guid, required): the ID of the task.  
                - Parameters (string, optional): the parameters for the task, default is an empty string. 

        **Responses**  

        - `200 OK`: returns the updated `BatchDto`.

        - `400 Bad Request`: validation error.

        - `404 Not Found`: batch not found.

        - `409 Conflict`: batch name already exists.


        **Security**  

        This API requires authentication.
      parameters:
        - name: orgId
          in: path
          required: true
          schema:
            type: string
          example: 783707f1-0659-4892-a872-8f506d225d7b
        - name: batchId
          in: path
          required: true
          schema:
            type: string
            format: uuid
          example: 783707f1-0659-4892-a872-8f506d225d7b
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/CreateUpdateBatchByOrgIdDto"
            example:
              name: Example
              cronExpression: 0 0/5 * * * ?
              isEnabled: true
              runOnStartup: true
              actions:
                - deviceId: 74fe488d5d35
                  taskId: 783707f1-0659-4892-a872-8f506d225d7b
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/BatchDto"
              example:
                batchId: b9b8c9d7-8a3f-4a62-b90e-2b1dce52a7b1
                name: Daily Temperature Sync
                orgId: 3a1b003b-3ec1-1792-4476-1297ef0c28a5
                cronExpression: 0/15 * * * * ?*
                isEnabled: true
                runOnStartup: false
                actions:
                  - deviceId: Device-001
                    taskId: e4b7f0c4-2a6b-4b0a-9a3c-bb5f2a8b1110
                  - deviceId: Device-002
                    taskId: e4b7f0c4-2a6b-4b0a-9a3c-bb5f2a8b2222
      security:
        - oidc: []
        - Bearer: []
    patch:
      tags:
        - ___swagger_2-device-management_swagger_json_Batch Tasks
      summary: Update only actions of a batch
      description: >-
        Update the actions of an existing batch without changing its other
        properties.  


        **Usage**  

        `PATCH /orgs/{orgId}/batches/{batchId}`  


        **Parameters**  

        - `orgId` (string, required): the ID of the organization.  

        - `batchId` (Guid, required): the ID of the batch.  


        **Request body**  

        - `input` (UpdateBatchActionsDto, required): the new actions for the batch.  
            - Actions (List<CreateBatchActionDto>, required): the list of actions to set.  
                - DeviceId (string, required): the ID of the device.  
                - TaskId (Guid, required): the ID of the task.  
                - Parameters (string, optional): the parameters for the task, default is an empty string.  

        **Responses**  

        - `201 Created`: returns the updated `BatchDto` after successful actions update.  

        - `404 Not Found`: batch not found.  

        - `400 Bad Request`: invalid request format or validation failure.  


        **Security**  

        This API requires authentication.
      parameters:
        - name: orgId
          in: path
          required: true
          schema:
            type: string
          example: 783707f1-0659-4892-a872-8f506d225d7b
        - name: batchId
          in: path
          required: true
          schema:
            type: string
            format: uuid
          example: 783707f1-0659-4892-a872-8f506d225d7b
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/UpdateBatchActionsDto"
            example:
              actions:
                - deviceId: 74fe488d5d35
                  taskId: 783707f1-0659-4892-a872-8f506d225d7b
                - deviceId: 84aa1234ccff
                  taskId: 883707f1-0659-4892-a872-8f506d225d7b
      responses:
        "201":
          description: Created
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/BatchDto"
              example:
                batchId: b9b8c9d7-8a3f-4a62-b90e-2b1dce52a7b1
                name: Daily Temperature Sync
                orgId: 3a1b003b-3ec1-1792-4476-1297ef0c28a5
                cronExpression: 0/15 * * * * ?*
                isEnabled: true
                runOnStartup: false
                actions:
                  - deviceId: Device-001
                    taskId: e4b7f0c4-2a6b-4b0a-9a3c-bb5f2a8b1110
                  - deviceId: Device-002
                    taskId: e4b7f0c4-2a6b-4b0a-9a3c-bb5f2a8b2222
        "400":
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ProblemDetails"
        "404":
          description: Not Found
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ProblemDetails"
      security:
        - oidc: []
        - Bearer: []
  "/platform/solutions/api/v1/orgs/{orgId}/batches":
    servers: []
    get:
      tags:
        - ___swagger_2-device-management_swagger_json_Batch Tasks
      summary: Get batch list of an Org
      description: >-
        Retrieve a paginated list of batches under a specific organization.  


        **Usage**  

        `GET /orgs/{orgId}/batches`  


        **Parameters**  

        - `orgId` (string, required): the ID of the organization.  

        - `taskId` (Guid, optional): filter batches by a specific task ID.  


        **Query parameters**  

        - `SkipCount` (int, optional): number of records to skip.  

        - `MaxResultCount` (int, optional): maximum number of records to return.  

        - `Sorting` (string, optional): sort order.  


        **Responses**  

        - `200 OK`: returns a paginated list of `BatchDto`.  

        - `400 Bad Request`: invalid parameters or validation errors.  

        - `401 Unauthorized`: authentication is required.  

        - `403 Forbidden`: insufficient permissions to access this org.  

        - `404 Not Found`: the specified org or related data not found.  


        **Security**  

        This API requires authentication.
      parameters:
        - name: orgId
          in: path
          required: true
          schema:
            type: string
          example: 783707f1-0659-4892-a872-8f506d225d7b
        - name: taskId
          in: query
          schema:
            type: string
            format: uuid
          example: 783707f1-0659-4892-a872-8f506d225d7b
        - name: skipCount
          in: query
          schema:
            type: integer
            format: int32
        - name: maxResultCount
          in: query
          schema:
            maximum: 1000
            minimum: 1
            type: integer
            format: int32
        - name: sorting
          in: query
          schema:
            type: string
      responses:
        "200":
          description: Success
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/BatchDtoPagedResultDto"
              example:
                totalCount: 2
                items:
                  - batchId: a1f5f5d0-7b44-4c26-a38e-3b33b422b111
                    name: Daily Report Batch
                    orgId: 3a1b003b-3ec1-1792-4476-1297ef0c28a5
                    cronExpression: 0/15 * * * * ?*
                    isEnabled: true
                    runOnStartup: false
                    actions:
                      - deviceId: Device-A001
                        taskId: d6c54a02-3e14-4d3a-8b83-4b4a3b8c1001
                  - batchId: b2e7e8f3-9d45-4b47-bbb3-4a88e8b56662
                    name: Weekly Backup
                    orgId: 3a1b003b-3ec1-1792-4476-1297ef0c28a5
                    cronExpression: 0/15 * * * * ?*
                    isEnabled: true
                    runOnStartup: true
                    actions:
                      - deviceId: Server-Backup-01
                        taskId: c7a8f4d2-6b55-4f88-9a9e-2a2b7b3c4002
        "400":
          description: Invalid request parameters
        "401":
          description: Authentication is required
        "403":
          description: User does not have access to this organization
        "404":
          description: Organization or related data not found
      security:
        - oidc: []
        - Bearer: []
    post:
      tags:
        - ___swagger_2-device-management_swagger_json_Batch Tasks
      summary: Create a new batch under org
      description: >-
        Create a new batch for a specific organization.  


        **Usage**  

        `POST /orgs/{orgId}/batches`  


        **Parameters**  

        - `orgId` (string, required): the ID of the organization.  


        **Request body**  

        - `input` (CreateUpdateBatchByOrgIdDto, required): the batch definition, including name, schedule, and actions.  
          - `orgId` (string, required): Organization ID.
          - `Name` (string, required): Batch name (max 100 characters).
          - `CronExpression` (string, required): Quartz cron expression (e.g. '0/15 * * * * ?').
          - `IsEnabled` (bool, required): Whether the batch is enabled.
          - `RunOnStartup` (bool, required): Whether to run batch on startup.
          - `Actions` (list, optional): Batch actions.

        **Responses**  

        - `201 Created`: returns the created `BatchDto`.  

        - `400 Bad Request`: invalid request (missing or invalid fields).  

        - `404 Not Found`: org not found.  

        - `409 Conflict`: batch name already exists.  


        **Security**  

        This API requires authentication.
      parameters:
        - name: orgId
          in: path
          required: true
          schema:
            type: string
          example: 783707f1-0659-4892-a872-8f506d225d7b
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/CreateUpdateBatchByOrgIdDto"
            example:
              name: Example
              cronExpression: 0 0/5 * * * ?
              isEnabled: true
              runOnStartup: true
              actions:
                - deviceId: 74fe488d5d35
                  taskId: 783707f1-0659-4892-a872-8f506d225d7b
      responses:
        "201":
          description: Returns the created BatchDto
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/BatchDto"
              example:
                batchId: b9b8c9d7-8a3f-4a62-b90e-2b1dce52a7b1
                name: Daily Temperature Sync
                orgId: 3a1b003b-3ec1-1792-4476-1297ef0c28a5
                cronExpression: 0/15 * * * * ?*
                isEnabled: true
                runOnStartup: false
                actions:
                  - deviceId: Device-001
                    taskId: e4b7f0c4-2a6b-4b0a-9a3c-bb5f2a8b1110
                  - deviceId: Device-002
                    taskId: e4b7f0c4-2a6b-4b0a-9a3c-bb5f2a8b2222
        "400":
          description: Invalid input (missing/invalid fields)
        "404":
          description: Org not found
        "409":
          description: Batch name already exists
      security:
        - oidc: []
        - Bearer: []
  "/platform/solutions/api/v1/orgs/{orgId}/batches/{batchId}:start":
    servers: []
    post:
      tags:
        - ___swagger_2-device-management_swagger_json_Batch Tasks
      summary: Trigger a batch execution
      description: |-
        Trigger execution of a batch by its ID.  

        **Usage**  
        `POST orgs/{orgId}/batches/{batchId}:start`  

        **Parameters**  
        - `orgId` (string, required): the ID of the organization.  
        - `batchId` (Guid, required): the ID of the batch to trigger.  

        **Responses**  
        - `200 OK`: returns a `BatchTriggerDto` with trigger details.  
        - `404 Not Found`: batch not found.  

        **Security**  
        This API requires authentication.
      parameters:
        - name: orgId
          in: path
          required: true
          schema:
            type: string
          example: 783707f1-0659-4892-a872-8f506d225d7b
        - name: batchId
          in: path
          required: true
          schema:
            type: string
            format: uuid
          example: 783707f1-0659-4892-a872-8f506d225d7b
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/BatchTriggerDto"
              example:
                triggerId: 9b5d9b7e-6a45-4f8a-9e62-d3f27cbb12a1
        "404":
          description: Not Found
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ProblemDetails"
      security:
        - oidc: []
        - Bearer: []
  "/platform/solutions/api/v1/orgs/{orgId}/batches/{batchId}/action-logs":
    servers: []
    get:
      tags:
        - ___swagger_2-device-management_swagger_json_Batch Tasks
      summary: Get trigger list for a batch
      description: >-
        Retrieve the list of batch trigger IDs for a specific batch.  


        **Usage**  

        `GET orgs/{orgId}/batches/{batchId}/action-logs`  


        **Parameters**  

        - `batchId` (Guid, required): the ID of the batch.  


        **Responses**  

        - `200 OK`: returns a list of trigger IDs in `{ triggerIds: [] }` format. 

        - `404 Not Found`: batch not found.  


        **Security**  

        This API requires authentication.
      parameters:
        - name: orgId
          in: path
          required: true
          schema:
            type: string
          example: 783707f1-0659-4892-a872-8f506d225d7b
        - name: batchId
          in: path
          required: true
          schema:
            type: string
            format: uuid
          example: 783707f1-0659-4892-a872-8f506d225d7b
      responses:
        "200":
          description: Returns the list of trigger IDs
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/BatchTriggerListResponseDto"
              example:
                triggerIds:
                  - a01d243d-9bdc-4264-9a78-b56b4f0a8e8a
                  - 4a7dd323-2d6b-49ce-b35e-cb9e89735ef3
        "404":
          description: Batch not found
      security:
        - oidc: []
        - Bearer: []
  "/platform/solutions/api/v1/orgs/{orgId}/batches/{batchId}/status":
    servers: []
    put:
      tags:
        - ___swagger_2-device-management_swagger_json_Batch Tasks
      summary: Enable or disable an existing batch
      description: >-
        Enable or disable a batch by its ID.  


        **Usage**  

        `PUT orgs/{orgId}/batches/{batchId}/status`  


        **Parameters**  

        - `batchId` (Guid, required): the ID of the batch.  


        **Request body**  

        - `input` (UpdateBatchIsEnabledDto, required): specifies the `IsEnabled` status.  


        **Responses**  

        - `200 OK`: returns the updated `BatchDto`.  

        - `400 Bad Request`: invalid request (missing or invalid `isEnabled`).  

        - `403 Forbidden`: org not allowed.  

        - `404 Not Found`: batch not found.  


        **Security**  

        This API requires authentication.
      parameters:
        - name: orgId
          in: path
          required: true
          schema:
            type: string
          example: 783707f1-0659-4892-a872-8f506d225d7b
        - name: batchId
          in: path
          required: true
          schema:
            type: string
            format: uuid
          example: 783707f1-0659-4892-a872-8f506d225d7b
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/UpdateBatchIsEnabledDto"
            example:
              isEnabled: false
      responses:
        "200":
          description: Returns the updated BatchDto
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/BatchDto"
              example:
                batchId: b9b8c9d7-8a3f-4a62-b90e-2b1dce52a7b1
                name: Daily Temperature Sync
                orgId: 3a1b003b-3ec1-1792-4476-1297ef0c28a5
                cronExpression: 0/15 * * * * ?*
                isEnabled: true
                runOnStartup: false
                actions:
                  - deviceId: Device-001
                    taskId: e4b7f0c4-2a6b-4b0a-9a3c-bb5f2a8b1110
                  - deviceId: Device-002
                    taskId: e4b7f0c4-2a6b-4b0a-9a3c-bb5f2a8b2222
        "400":
          description: Invalid input or missing isEnabled
        "403":
          description: Forbidden
        "404":
          description: Batch not found
      security:
        - oidc: []
        - Bearer: []
  "/platform/solutions/api/v1/orgs/{orgId}/batches/{batchId}/devices":
    servers: []
    get:
      tags:
        - ___swagger_2-device-management_swagger_json_Batch Tasks
      summary: Get devices associated with a batch
      description: |-
        Retrieve the list of device IDs associated with a specific batch.  

        **Usage**  
        `GET /batches/{batchId}/devices`  

        **Parameters**  
        - `batchId` (Guid, required): the ID of the batch.  

        **Responses**  
        - `200 OK`: returns a list of device IDs (`List<string>`).  
        - `404 Not Found`: batch not found.  

        **Security**  
        This API requires authentication.
      parameters:
        - name: orgId
          in: path
          required: true
          schema:
            type: string
          example: 783707f1-0659-4892-a872-8f506d225d7b
        - name: batchId
          in: path
          required: true
          schema:
            type: string
            format: uuid
          example: 783707f1-0659-4892-a872-8f506d225d7b
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: "#/components/schemas/BatchDevicesDto"
              example:
                deviceIds:
                  - Device-001
                  - Device-002
                  - Device-003
      security:
        - oidc: []
        - Bearer: []
  "/platform/solutions/api/v1/orgs/{orgId}/devices":
    servers: []
    post:
      tags:
        - ___swagger_2-device-management_swagger_json_Devices
      summary: Link or create one device to one organization.
      description: Link one existed device to one organization. Or create a device
        which is associated with the organization.
      parameters:
        - name: orgId
          in: path
          required: true
          schema:
            type: string
          example: 5bd0c9f4-3b8f-4f24-b4f5-923f5c9eda50
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/EdgeSyncDeviceCreateDto"
            example:
              deviceId: 74fe488d5d54
              hwModel: EPC-R7300
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/EdgeSyncDeviceDto"
              example:
                deviceId: 74fe488d5d54
                hwModel: EPC-R7300
                orgId: 5de4bd4f-bbb1-4653-95b8-239584600203
                status: Activated
        "400":
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/RemoteServiceErrorResponse"
              example:
                error:
                  code: Device.NotFound
                  message: The specified device does not exist.
                  details: "DeviceId: 74fe488d-5d35-4c00-a3b9-3c2b92e4b27a"
                  data:
                    timestamp: 2025-11-26T07:37:38.6511873Z
                    requestId: 03dcef55-1eea-46e0-afb8-9ba45f85519f
                  validationErrors:
                    - message: DeviceId cannot be empty.
                      members:
                        - DeviceId
        "401":
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/RemoteServiceErrorResponse"
              example:
                error:
                  code: Device.NotFound
                  message: The specified device does not exist.
                  details: "DeviceId: 74fe488d-5d35-4c00-a3b9-3c2b92e4b27a"
                  data:
                    timestamp: 2025-11-26T07:37:38.6509061Z
                    requestId: a273c5b8-f725-41ff-9450-7e78eccb9a9a
                  validationErrors:
                    - message: DeviceId cannot be empty.
                      members:
                        - DeviceId
        "403":
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/RemoteServiceErrorResponse"
              example:
                error:
                  code: Device.NotFound
                  message: The specified device does not exist.
                  details: "DeviceId: 74fe488d-5d35-4c00-a3b9-3c2b92e4b27a"
                  data:
                    timestamp: 2025-11-26T07:37:38.6415452Z
                    requestId: 574bcdfe-1a8f-41c4-a550-3728545f5cfb
                  validationErrors:
                    - message: DeviceId cannot be empty.
                      members:
                        - DeviceId
        "404":
          description: Not Found
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/RemoteServiceErrorResponse"
              example:
                error:
                  code: Device.NotFound
                  message: The specified device does not exist.
                  details: "DeviceId: 74fe488d-5d35-4c00-a3b9-3c2b92e4b27a"
                  data:
                    timestamp: 2025-11-26T07:37:38.6514385Z
                    requestId: f477a787-0dff-40b8-af9e-8810975c6b45
                  validationErrors:
                    - message: DeviceId cannot be empty.
                      members:
                        - DeviceId
        "500":
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/RemoteServiceErrorResponse"
              example:
                error:
                  code: Device.NotFound
                  message: The specified device does not exist.
                  details: "DeviceId: 74fe488d-5d35-4c00-a3b9-3c2b92e4b27a"
                  data:
                    timestamp: 2025-11-26T07:37:38.6519373Z
                    requestId: f08913a5-7cda-4215-bb23-57579e3284bb
                  validationErrors:
                    - message: DeviceId cannot be empty.
                      members:
                        - DeviceId
        "501":
          description: Not Implemented
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/RemoteServiceErrorResponse"
              example:
                error:
                  code: Device.NotFound
                  message: The specified device does not exist.
                  details: "DeviceId: 74fe488d-5d35-4c00-a3b9-3c2b92e4b27a"
                  data:
                    timestamp: 2025-11-26T07:37:38.651651Z
                    requestId: 3e06a9ec-802e-4bd3-9911-36d0c4a36269
                  validationErrors:
                    - message: DeviceId cannot be empty.
                      members:
                        - DeviceId
      security:
        - oidc: []
        - Bearer: []
    get:
      tags:
        - ___swagger_2-device-management_swagger_json_Devices
      summary: Get devices of one organization
      description: This api will response paginated list of devices belonging to a
        specific organization ID.
      parameters:
        - name: orgId
          in: path
          required: true
          schema:
            type: string
            format: uuid
          example: 77ffccee-4f7a-46cd-a000-8a2c254edb53
        - name: sorting
          in: query
          schema:
            type: string
          example: deviceId asc
        - name: skipCount
          in: query
          schema:
            type: integer
            format: int32
          example: 0
        - name: maxResultCount
          in: query
          schema:
            type: integer
            format: int32
          example: 100
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/EdgeSyncDeviceGetResponseDtoPagedResultDto"
              example:
                totalCount: 1
                items:
                  - deviceId: 74fe488d5d54
                    hwModel: EPC-R7300
                    orgId: 5de4bd4f-bbb1-4653-95b8-239584600203
                    status: Activated
        "400":
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/RemoteServiceErrorResponse"
              example:
                error:
                  code: Device.NotFound
                  message: The specified device does not exist.
                  details: "DeviceId: 74fe488d-5d35-4c00-a3b9-3c2b92e4b27a"
                  data:
                    timestamp: 2025-11-26T07:37:38.6665927Z
                    requestId: 4000b8e3-e724-4194-91e0-5e4ff6e5c9ce
                  validationErrors:
                    - message: DeviceId cannot be empty.
                      members:
                        - DeviceId
        "401":
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/RemoteServiceErrorResponse"
              example:
                error:
                  code: Device.NotFound
                  message: The specified device does not exist.
                  details: "DeviceId: 74fe488d-5d35-4c00-a3b9-3c2b92e4b27a"
                  data:
                    timestamp: 2025-11-26T07:37:38.6663788Z
                    requestId: ae4ad183-8f2d-4a19-86f6-06d1b98cc676
                  validationErrors:
                    - message: DeviceId cannot be empty.
                      members:
                        - DeviceId
        "403":
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/RemoteServiceErrorResponse"
              example:
                error:
                  code: Device.NotFound
                  message: The specified device does not exist.
                  details: "DeviceId: 74fe488d-5d35-4c00-a3b9-3c2b92e4b27a"
                  data:
                    timestamp: 2025-11-26T07:37:38.6661367Z
                    requestId: c77087a2-37f1-4eb8-a019-794c8b4c6cab
                  validationErrors:
                    - message: DeviceId cannot be empty.
                      members:
                        - DeviceId
        "404":
          description: Not Found
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/RemoteServiceErrorResponse"
              example:
                error:
                  code: Device.NotFound
                  message: The specified device does not exist.
                  details: "DeviceId: 74fe488d-5d35-4c00-a3b9-3c2b92e4b27a"
                  data:
                    timestamp: 2025-11-26T07:37:38.6667573Z
                    requestId: 8310a5ec-bcda-4d21-90de-2cf04798086c
                  validationErrors:
                    - message: DeviceId cannot be empty.
                      members:
                        - DeviceId
        "500":
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/RemoteServiceErrorResponse"
              example:
                error:
                  code: Device.NotFound
                  message: The specified device does not exist.
                  details: "DeviceId: 74fe488d-5d35-4c00-a3b9-3c2b92e4b27a"
                  data:
                    timestamp: 2025-11-26T07:37:38.6671437Z
                    requestId: c00c8113-e5cd-4ec7-9d8b-549aa7b69f37
                  validationErrors:
                    - message: DeviceId cannot be empty.
                      members:
                        - DeviceId
        "501":
          description: Not Implemented
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/RemoteServiceErrorResponse"
              example:
                error:
                  code: Device.NotFound
                  message: The specified device does not exist.
                  details: "DeviceId: 74fe488d-5d35-4c00-a3b9-3c2b92e4b27a"
                  data:
                    timestamp: 2025-11-26T07:37:38.6669852Z
                    requestId: 57e246ca-1547-4d0a-9ea3-da8c679fea09
                  validationErrors:
                    - message: DeviceId cannot be empty.
                      members:
                        - DeviceId
      security:
        - oidc: []
        - Bearer: []
  "/platform/solutions/api/v1/orgs/{orgId}/devices/{deviceId}":
    servers: []
    delete:
      tags:
        - ___swagger_2-device-management_swagger_json_Devices
      summary: Remove linkage between device and organization
      description: Remove linkage between device and organization. Target device will
        no longer belongs to any organization. Only system administrator can
        link target device to other organization.
      parameters:
        - name: orgId
          in: path
          required: true
          schema:
            type: string
            format: uuid
          example: 77ffccee-4f7a-46cd-a000-8a2c254edb53
        - name: deviceId
          in: path
          required: true
          schema:
            type: string
          example: 74fe488d5d54
      responses:
        "204":
          description: No Content
        "400":
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/RemoteServiceErrorResponse"
              example:
                error:
                  code: Device.NotFound
                  message: The specified device does not exist.
                  details: "DeviceId: 74fe488d-5d35-4c00-a3b9-3c2b92e4b27a"
                  data:
                    timestamp: 2025-11-26T07:37:38.6738725Z
                    requestId: f976ec22-cd19-4191-a9f2-ddf510d956a0
                  validationErrors:
                    - message: DeviceId cannot be empty.
                      members:
                        - DeviceId
        "401":
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/RemoteServiceErrorResponse"
              example:
                error:
                  code: Device.NotFound
                  message: The specified device does not exist.
                  details: "DeviceId: 74fe488d-5d35-4c00-a3b9-3c2b92e4b27a"
                  data:
                    timestamp: 2025-11-26T07:37:38.673643Z
                    requestId: d47e4909-2ba9-4d69-bb5f-866c9e42c0e7
                  validationErrors:
                    - message: DeviceId cannot be empty.
                      members:
                        - DeviceId
        "403":
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ProblemDetails"
        "404":
          description: Not Found
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ProblemDetails"
        "500":
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/RemoteServiceErrorResponse"
              example:
                error:
                  code: Device.NotFound
                  message: The specified device does not exist.
                  details: "DeviceId: 74fe488d-5d35-4c00-a3b9-3c2b92e4b27a"
                  data:
                    timestamp: 2025-11-26T07:37:38.6741943Z
                    requestId: 51db3405-1786-44e1-be1b-ad032e513820
                  validationErrors:
                    - message: DeviceId cannot be empty.
                      members:
                        - DeviceId
        "501":
          description: Not Implemented
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/RemoteServiceErrorResponse"
              example:
                error:
                  code: Device.NotFound
                  message: The specified device does not exist.
                  details: "DeviceId: 74fe488d-5d35-4c00-a3b9-3c2b92e4b27a"
                  data:
                    timestamp: 2025-11-26T07:37:38.6740345Z
                    requestId: f4484de8-6e2d-4508-b9bf-5e14734d73f6
                  validationErrors:
                    - message: DeviceId cannot be empty.
                      members:
                        - DeviceId
      security:
        - oidc: []
        - Bearer: []
  "/platform/solutions/api/v1/devices/{deviceId}/telemetry-configs":
    servers: []
    get:
      tags:
        - ___swagger_2-device-management_swagger_json_Devices
      summary: Get Config
      description: Get DM Telemetry Config of a device
      parameters:
        - name: deviceId
          in: path
          description: Device id
          required: true
          schema:
            type: string
            description: Device id
          example: 74fe488d5d35
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/SystemConfig"
              example:
                id: docker-daemon-config
                path: /etc/docker/daemon.json
                action: create
                format: json
                preCmd: cp /etc/docker/daemon.json /etc/docker/daemon.json.bak
                postCmd: /usr/bin/find  /etc/docker/ -name daemon.json.* -type f -mtime +5 -exec
                  /usr/bin/rm {};
                version: 6
                applyCmd: /usr/bin/systemctl restart docker
                contentJson:
                  allInterval: 1000
                  sensors:
                    - resourceId: 4ae451bf-8827-5bf3-ba01-80f785e62cfc
                      enabled: false
                      interval: 2000
      security:
        - oidc: []
        - Bearer: []
  "/platform/solutions/api/v1/devices/{deviceId}/telemetry-configs/desired":
    servers: []
    patch:
      tags:
        - ___swagger_2-device-management_swagger_json_Devices
      summary: Update config
      description: Update DM Telemetry Config of a device
      parameters:
        - name: deviceId
          in: path
          description: Device id
          required: true
          schema:
            type: string
            description: Device id
          example: 74fe488d5d35
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/CapabilityUpdateDtoContentJson"
            example:
              allInterval: 2000
              sensors:
                - resourceId: 783707f1-0659-4892-a872-8f506d225d7b
                  enabled: true
                  interval: 500
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/CapabilityUpdateDtoContentJson"
              example:
                allInterval: 2000
                sensors:
                  - resourceId: 783707f1-0659-4892-a872-8f506d225d7b
                    enabled: true
                    interval: 500
        "403":
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ProblemDetails"
              example:
                error:
                  code: Device.NotFound
                  message: The specified device does not exist.
                  details: "DeviceId: 74fe488d-5d35-4c00-a3b9-3c2b92e4b27a"
                  data:
                    timestamp: 2025-11-26T07:37:38.7053996Z
                    requestId: 1a759c29-913c-4eb3-b2a9-f35161b75dac
                  validationErrors:
                    - message: DeviceId cannot be empty.
                      members:
                        - DeviceId
      security:
        - oidc: []
        - Bearer: []
  "/platform/solutions/api/v1/devices/{deviceId}/telemetry-configs/reported":
    servers: []
    get:
      tags:
        - ___swagger_2-device-management_swagger_json_Devices
      summary: Get state
      description: Get reported states of the shadow.
      parameters:
        - name: deviceId
          in: path
          description: Device id
          required: true
          schema:
            type: string
            description: Device id
          example: 74fe488d5d35
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/CapabilityUpdateDtoContentJson"
              example:
                allInterval: 2000
                sensors:
                  - resourceId: 783707f1-0659-4892-a872-8f506d225d7b
                    enabled: true
                    interval: 500
        "403":
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ProblemDetails"
              example:
                error:
                  code: Device.NotFound
                  message: The specified device does not exist.
                  details: "DeviceId: 74fe488d-5d35-4c00-a3b9-3c2b92e4b27a"
                  data:
                    timestamp: 2025-11-26T07:37:38.7099747Z
                    requestId: e1c0b5fb-dfa6-42c9-991a-c801a961b034
                  validationErrors:
                    - message: DeviceId cannot be empty.
                      members:
                        - DeviceId
      security:
        - oidc: []
        - Bearer: []
  "/platform/solutions/api/v1/devices/{deviceId}/auth":
    servers: []
    get:
      tags:
        - ___swagger_2-device-management_swagger_json_Devices
      summary: Get device auth info
      description: Get all auth infos of a device with downloadable encrypted file
      parameters:
        - name: deviceId
          in: path
          description: Device mac
          required: true
          schema:
            type: string
            description: Device mac
          example: 74fe488d5d35
        - name: type
          in: query
          schema:
            $ref: "#/components/schemas/AuthInfoType"
          example: 0
        - name: enc
          in: query
          description: Encrypt or not
          schema:
            type: boolean
            description: Encrypt or not
          example: true
      responses:
        "200":
          description: OK
      security:
        - oidc: []
        - Bearer: []
  "/platform/solutions/api/v1/devices/{deviceId}":
    servers: []
    get:
      tags:
        - ___swagger_2-device-management_swagger_json_Devices
      summary: Get devices
      description: Get a device detail.
      parameters:
        - name: deviceId
          in: path
          description: Device id
          required: true
          schema:
            type: string
            description: Device id
          example: 74fe488d5d35
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/EdgeSyncDeviceGetResponseDto"
              example:
                deviceId: 74fe488d5d54
                hwModel: EPC-R7300
                orgId: 5de4bd4f-bbb1-4653-95b8-239584600203
                status: Activated
      security:
        - oidc: []
        - Bearer: []
    delete:
      tags:
        - ___swagger_2-device-management_swagger_json_Devices
      summary: Delete device
      description: Permanently delete device by given deviceId.
      parameters:
        - name: deviceId
          in: path
          description: Device mac
          required: true
          schema:
            type: string
            description: Device mac
          example: 74fe488d5d35
      responses:
        "204":
          description: No Content
        "403":
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ProblemDetails"
              example:
                error:
                  code: Device.NotFound
                  message: The specified device does not exist.
                  details: "DeviceId: 74fe488d-5d35-4c00-a3b9-3c2b92e4b27a"
                  data:
                    timestamp: 2025-11-26T07:37:38.7243732Z
                    requestId: 893e2ddb-6c69-42ea-bdb5-8077aa98423d
                  validationErrors:
                    - message: DeviceId cannot be empty.
                      members:
                        - DeviceId
        "404":
          description: Not Found
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ProblemDetails"
              example:
                error:
                  code: Device.NotFound
                  message: The specified device does not exist.
                  details: "DeviceId: 74fe488d-5d35-4c00-a3b9-3c2b92e4b27a"
                  data:
                    timestamp: 2025-11-26T07:37:38.724605Z
                    requestId: 2b2721b0-8a09-4da6-97f6-14859d08ea7d
                  validationErrors:
                    - message: DeviceId cannot be empty.
                      members:
                        - DeviceId
      security:
        - oidc: []
        - Bearer: []
    patch:
      tags:
        - ___swagger_2-device-management_swagger_json_Devices
      summary: Update device
      description: Update device by given deviceId.
      parameters:
        - name: deviceId
          in: path
          description: Device id
          required: true
          schema:
            type: string
            description: Device id
          example: 74fe488d5d35
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/EdgeSyncDeviceUpdateRequestDto"
            example:
              hwModel: EPC-R7300
              orgId: 783707f1-0659-4892-a872-8f506d225d7b
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/EdgeSyncDeviceUpdateResponseDto"
              example:
                deviceId: 74fe488d5d54
                orgId: 5de4bd4f-bbb1-4653-95b8-239584600203
                hwModel: EPC-R7300
                status: Active
      security:
        - oidc: []
        - Bearer: []
  /platform/solutions/api/v1/devices:
    servers: []
    post:
      tags:
        - ___swagger_2-device-management_swagger_json_Devices
      summary: Create device
      description: Create a new device without specific organization.
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/EdgeSyncDeviceCreateRequestDto"
            example:
              deviceId: 74fe488d5d35
              hwModel: EPC-R7300
              orgId: 5bd0c9f4-3b8f-4f24-b4f5-923f5c9eda50
      responses:
        "201":
          description: Created
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/EdgeSyncDeviceDto"
              example:
                deviceId: 74fe488d5d54
                hwModel: EPC-R7300
                orgId: 5de4bd4f-bbb1-4653-95b8-239584600203
                status: Activated
        "403":
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ProblemDetails"
              example:
                error:
                  code: Device.NotFound
                  message: The specified device does not exist.
                  details: "DeviceId: 74fe488d-5d35-4c00-a3b9-3c2b92e4b27a"
                  data:
                    timestamp: 2025-11-26T07:37:38.7481992Z
                    requestId: 41a8e976-09ed-4d51-a7bf-d18e1b3f2ec5
                  validationErrors:
                    - message: DeviceId cannot be empty.
                      members:
                        - DeviceId
        "409":
          description: Conflict
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ProblemDetails"
              example:
                error:
                  code: Device.NotFound
                  message: The specified device does not exist.
                  details: "DeviceId: 74fe488d-5d35-4c00-a3b9-3c2b92e4b27a"
                  data:
                    timestamp: 2025-11-26T07:37:38.7484238Z
                    requestId: 17a9030d-46d1-49cf-a628-88c73385f4be
                  validationErrors:
                    - message: DeviceId cannot be empty.
                      members:
                        - DeviceId
      security:
        - oidc: []
        - Bearer: []
    get:
      tags:
        - ___swagger_2-device-management_swagger_json_Devices
      summary: Get paginated of all devices
      description: This api provides paginated list devices. Including all devices
        belong or not belong to any organization.
      parameters:
        - name: filter
          in: query
          schema:
            $ref: "#/components/schemas/GroupCondition"
          example: miscellaneous
        - name: sorting
          in: query
          schema:
            type: string
          example: deviceId asc
        - name: skipCount
          in: query
          schema:
            type: integer
            format: int32
          example: 0
        - name: maxResultCount
          in: query
          schema:
            type: integer
            format: int32
          example: 100
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/EdgeSyncDeviceGetResponseDtoPagedResultDto"
              example:
                deviceId: 74fe488d5d54
                hwModel: EPC-R7300
                orgId: 5de4bd4f-bbb1-4653-95b8-239584600203
                status: Activated
      security:
        - oidc: []
        - Bearer: []
  "/platform/solutions/api/v1/devices/{deviceId}/status":
    servers: []
    put:
      tags:
        - ___swagger_2-device-management_swagger_json_Devices
      summary: Activate device
      description: Deactivate or reactivate a device.
      parameters:
        - name: deviceId
          in: path
          description: Device id
          required: true
          schema:
            type: string
            description: Device id
          example: 74fe488d5d35
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/EdgeSyncDeviceUpdateStatusRequestDto"
            example:
              status: Active
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/EdgeSyncDeviceGetResponseDto"
              example:
                deviceId: 74fe488d5d54
                hwModel: EPC-R7300
                orgId: 5de4bd4f-bbb1-4653-95b8-239584600203
                status: Activated
      security:
        - oidc: []
        - Bearer: []
  "/platform/solutions/api/v1/devices/{deviceId}/capabilities":
    servers: []
    get:
      tags:
        - ___swagger_2-device-management_swagger_json_Devices
      summary: List device capabilities.
      description: Get device capabilities for DTDL.
      parameters:
        - name: deviceId
          in: path
          description: Device id
          required: true
          schema:
            type: string
            description: Device id
          example: 74fe488d5d35
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: "#/components/schemas/CapabilityDto"
              example:
                - dtmi: dtmi:advantech:EdgeSync:CPUInfo:cpuUsage;1"
                  name: cpuUsage
                  resourceId: 0b997565-294b-42aa-b4c4-92063607d84c
                  resourceShortId: 7d84c
                  deviceResourceId: 9fc84ec2-95c2-432b-8036-417bdfdba5ef
                  enabled: false
                  interval: 3400
      security:
        - oidc: []
        - Bearer: []
  "/platform/solutions/api/v1/devices/{deviceId}/custom-info":
    servers: []
    get:
      tags:
        - ___swagger_2-device-management_swagger_json_Devices
      summary: Get custom info of a device
      description: >-
        Retrieve all custom info entries of the specified device in JSON
        key/value format.  

        Each key represents a custom property of the device.  


        **Usage**  

        `GET /devices/{deviceId}/custom-info`  


        **Parameters**  

        - `deviceId` (string, required): the ID of the device.  


        **Responses**  

        - `200 OK`: returns a dictionary of key/value pairs.  

        - `404 Not Found`: device not found.  


        **Security**  

        This API requires authentication.
      parameters:
        - name: deviceId
          in: path
          description: The ID of the device
          required: true
          schema:
            type: string
            description: The ID of the device
          example: 74fe488d5d35
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
              example:
                deviceName: Temperature Sensor A1
                firmwareVersion: v1.2.3
        "403":
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/RemoteServiceErrorResponse"
              example:
                error:
                  code: Device.NotFound
                  message: The specified device does not exist.
                  details: "DeviceId: 74fe488d-5d35-4c00-a3b9-3c2b92e4b27a"
                  data:
                    timestamp: 2025-11-26T07:37:38.7834999Z
                    requestId: f9a13d59-71bd-4a8f-a0bb-bac25976c3c1
                  validationErrors:
                    - message: DeviceId cannot be empty.
                      members:
                        - DeviceId
      security:
        - oidc: []
        - Bearer: []
    put:
      tags:
        - ___swagger_2-device-management_swagger_json_Devices
      summary: Add or update multiple custom info entries
      description: >-
        Insert or update multiple custom info key/value pairs for the specified
        device.  

        New keys will be created, and existing keys will be updated with the new values.  


        **Usage**  

        `PUT /devices/{deviceId}/custom-info`  


        **Parameters**  

        - `deviceId` (string, required): the ID of the device.  

        - `input` (Dictionary<string, string?>, required): JSON object containing key/value pairs.  


        **Responses**  

        - `204 No Content`: update successful.  

        - `404 Not Found`: device not found.  


        **Security**  

        This API requires authentication.
      parameters:
        - name: deviceId
          in: path
          description: The ID of the device
          required: true
          schema:
            type: string
            description: The ID of the device
          example: 74fe488d5d35
      requestBody:
        content:
          application/json:
            schema:
              type: object
              additionalProperties:
                type: string
            example:
              owner: ac714309-2f6c-4d1c-965a-878a8cac751a
      responses:
        "204":
          description: NoContent
        "403":
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/RemoteServiceErrorResponse"
              example:
                error:
                  code: Device.NotFound
                  message: The specified device does not exist.
                  details: "DeviceId: 74fe488d-5d35-4c00-a3b9-3c2b92e4b27a"
                  data:
                    timestamp: 2025-11-26T07:37:38.7900938Z
                    requestId: 3dce0382-48f8-4124-b44d-413193f522aa
                  validationErrors:
                    - message: DeviceId cannot be empty.
                      members:
                        - DeviceId
      security:
        - oidc: []
        - Bearer: []
    delete:
      tags:
        - ___swagger_2-device-management_swagger_json_Devices
      summary: Delete all custom info of a device
      description: |-
        Remove all custom info entries associated with the specified device.  
        After deletion, the device will have no custom info data.  

        **Usage**  
        `DELETE /devices/{deviceId}/custom-info`  

        **Parameters**  
        - `deviceId` (string, required): the ID of the device.  

        **Responses**  
        - `204 No Content`: all custom info deleted.  
        - `404 Not Found`: device not found.  

        **Security**  
        This API requires authentication.
      parameters:
        - name: deviceId
          in: path
          description: The ID of the device
          required: true
          schema:
            type: string
            description: The ID of the device
          example: 74fe488d5d35
      responses:
        "204":
          description: NoContent
        "403":
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/RemoteServiceErrorResponse"
              example:
                error:
                  code: Device.NotFound
                  message: The specified device does not exist.
                  details: "DeviceId: 74fe488d-5d35-4c00-a3b9-3c2b92e4b27a"
                  data:
                    timestamp: 2025-11-26T07:37:38.7952489Z
                    requestId: 91274cc5-73a3-4115-8c05-6c654e364ba7
                  validationErrors:
                    - message: DeviceId cannot be empty.
                      members:
                        - DeviceId
      security:
        - oidc: []
        - Bearer: []
  "/platform/solutions/api/v1/devices/{deviceId}/custom-info/{key}":
    servers: []
    patch:
      tags:
        - ___swagger_2-device-management_swagger_json_Devices
      summary: Update a single custom info entry
      description: >-
        Update the value of a specific custom info key for the specified
        device.  

        If the key does not exist, a `404 Not Found` will be returned.  


        **Usage**  

        `PATCH /devices/{deviceId}/custom-info/{key}`  


        **Parameters**  

        - `deviceId` (string, required): the ID of the device.  

        - `key` (string, required): the key of the custom info entry.  

        - `input` (DeviceCustomInfoPatchDto, required): JSON object containing the new value.  


        **Responses**  

        - `204 No Content`: update successful.  

        - `404 Not Found`: key not found.  


        **Security**  

        This API requires authentication.
      parameters:
        - name: deviceId
          in: path
          description: The ID of the device
          required: true
          schema:
            type: string
            description: The ID of the device
          example: 74fe488d5d35
        - name: key
          in: path
          description: The key of the custom info entry
          required: true
          schema:
            type: string
            description: The key of the custom info entry
          example: owner
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/DeviceCustomInfoPatchDto"
            example:
              value: unknown
      responses:
        "204":
          description: Updated
        "403":
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/RemoteServiceErrorResponse"
              example:
                error:
                  code: Device.NotFound
                  message: The specified device does not exist.
                  details: "DeviceId: 74fe488d-5d35-4c00-a3b9-3c2b92e4b27a"
                  data:
                    timestamp: 2025-11-26T07:37:38.800945Z
                    requestId: 82523da2-14df-4191-9b06-f80b7b75fe02
                  validationErrors:
                    - message: DeviceId cannot be empty.
                      members:
                        - DeviceId
      security:
        - oidc: []
        - Bearer: []
    delete:
      tags:
        - ___swagger_2-device-management_swagger_json_Devices
      summary: Delete a single custom info entry
      description: >-
        Remove a specific custom info entry identified by its key for the
        specified device.  

        If the key does not exist, a `404 Not Found` will be returned.  


        **Usage**  

        `DELETE /devices/{deviceId}/custom-info/{key}`  


        **Parameters**  

        - `deviceId` (string, required): the ID of the device.  

        - `key` (string, required): the key of the custom info entry.  


        **Responses**  

        - `204 No Content`: key deleted successfully.  

        - `404 Not Found`: key not found.  


        **Security**  

        This API requires authentication.
      parameters:
        - name: deviceId
          in: path
          description: The ID of the device
          required: true
          schema:
            type: string
            description: The ID of the device
          example: 74fe488d5d35
        - name: key
          in: path
          description: The key of the custom info entry
          required: true
          schema:
            type: string
            description: The key of the custom info entry
          example: owner
      responses:
        "204":
          description: NoContent
        "403":
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/RemoteServiceErrorResponse"
              example:
                error:
                  code: Device.NotFound
                  message: The specified device does not exist.
                  details: "DeviceId: 74fe488d-5d35-4c00-a3b9-3c2b92e4b27a"
                  data:
                    timestamp: 2025-11-26T07:37:38.8077202Z
                    requestId: 051b93a9-a6e1-43fd-83f1-ff090c34e2fb
                  validationErrors:
                    - message: DeviceId cannot be empty.
                      members:
                        - DeviceId
      security:
        - oidc: []
        - Bearer: []
  "/platform/solutions/api/v1/devices/{deviceId}/docker/stacks/commands:{action}":
    servers: []
    post:
      tags:
        - ___swagger_3-container-management_swagger_json_Container Commands
      summary: Execute device command
      description: |-
        
        Overview: Requests a command to be executed on a device.

        • Valid actions: start, stop, resume, restart, and pause

        • Real-time execution: Sends command via NATS and waits for response

        • Command logging: Tracks command execution for audit purposes
      parameters:
        - name: deviceId
          in: path
          description: Id of the device
          required: true
          schema:
            type: string
        - name: action
          in: path
          description: "The action to perform on the container stack.Supported values:
            start, stop, pause, resume, restart"
          required: true
          schema:
            $ref: "#/components/schemas/EdgeSync.ContainerMgmt.SystemCommands.StackAction"
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/EdgeSync.ContainerMgmt.SystemCommands.Dtos.CommandR\
                equest"
            example:
              stackConfigId: c1bf5c78-b855-41ca-a00d-fcf930104218
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/EdgeSync.ContainerMgmt.Stacks.Dtos.CreateContainerS\
                  tackDto"
              example:
                groupId: yyds
                deviceId: 74fe488d5d54
                seqId: 1
                reqSeqId: c7bcb475-6204-440e-a585-3a2bc5ad337d
                rspSeqId: 0fc48696-51d1-485d-90f7-711ae573f627
                cmd: deviceCmd
                status: 0
                message: "Stack command: stack.pause sent successfully"
        "400":
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
              example:
                error:
                  code: ValidationError
                  message: Bad Request - Invalid request parameters
                  details: null
                  data: null
                  validationErrors:
                    - message: The field Action is invalid.
                      members:
                        - Action
        "500":
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
              example:
                error:
                  code: null
                  message: An internal error occurred during your request!
                  details: null
                  data: null
                  validationErrors: null
      security:
        - oidc: []
  "/platform/solutions/api/v1/devices/{deviceId}/docker/stacks/commands/results":
    servers: []
    get:
      tags:
        - ___swagger_3-container-management_swagger_json_Container Commands
      summary: Query command execution results for the stack on the device.
      description: >-
        
        Overview: Retrieves paginated command execution results for a specific device and stack.


        • Latest mode: When range is set to "latest", only the most recent command result is returned


        • Pagination support: Supports skip and take for result pagination


        • Sorting support: Supports sorting by ExecutedAt field (ascending or descending)


        • Cache-based: Results are cached in memory for 1 hour
      parameters:
        - name: deviceId
          in: path
          description: The unique identifier of the device.
          required: true
          schema:
            type: string
        - name: stackConfigId
          in: query
          description: An unique ID for the stack configuration.
          required: true
          schema:
            type: string
            format: uuid
        - name: range
          in: query
          description: >-
            Specifies the log range to query. If set to "latest", only the most
            recent command result is returned.

            Valid values: "all" (default) or "latest"
          schema:
            type: string
            default: all
        - name: maxResultCount
          in: query
          description: Maximum number of results to return. Must be between 1 and 1000.
          schema:
            maximum: 1000
            minimum: 1
            type: integer
            format: int32
        - name: skipCount
          in: query
          description: Number of results to skip for pagination.
          schema:
            type: integer
            format: int32
        - name: sorting
          in: query
          description: |-
            Sorting expression for the results
            Default is "ExecutedAt desc".
          schema:
            type: string
            default: executedAt desc
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Volo.Abp.Application.Dtos.PagedResultDto`1[[EdgeSyn\
                  c.ContainerMgmt.SystemCommands.Dtos.CommandExecutionResultCac\
                  heDto, EdgeSync.ContainerMgmt.Application.Contracts,
                  Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]]"
              example:
                totalCount: 1
                items:
                  - deviceId: 74fe488d5d54
                    seqId: 1
                    reqSeqId: ed871788-04b7-4076-affd-20a5c806655b
                    rspSeqId: 2d800d45-8c90-4520-bbc4-fa2836444f5d
                    cmd: deviceCmd
                    data:
                      deviceCmd: stack.start
                      status: 0
                      message: stack command received
                      resultData:
                        stackId: 9580f177-a0cd-466f-bf63-eba225abdcf8
                      executedAt: 1758080931858
                      completedAt: 1758080931858
      security:
        - oidc: []
  "/platform/solutions/api/v1/orgs/{orgId}/docker-settings/stack-configs/deployments":
    servers: []
    get:
      tags:
        - ___swagger_3-container-management_swagger_json_Container Deployments
      summary: Get stack deployments
      description: >-
        
        Overview: Retrieves paginated list of all active stack deployments in the system.


        • System-wide view: Returns deployments across all devices and stacks


        • Active only: Excludes deleted or inactive deployments


        • Administrative use: Primarily for system administrators to monitor all deployments


        • Sorting support: Supports sorting by any field, default is descending by creation time


        • Page size limit: Maximum 1000 records per page


        • Valid sorting properties are: CreationTime, DeviceId, StackName
      parameters:
        - name: orgId
          in: path
          description: Identity for user's organization.
          required: true
          schema:
            type: string
            format: uuid
        - name: stackRevisionId
          in: query
          description: Query the deployment results by specific revision ids of container
            stack.
          schema:
            type: array
            items:
              type: string
              format: uuid
        - name: stackNames
          in: query
          description: Query the deployment results by the specific stack names.
          schema:
            type: array
            items:
              type: string
        - name: deviceIds
          in: query
          description: Query the deployment results by the targeted device ids.
          schema:
            type: array
            items:
              type: string
        - name: maxResultCount
          in: query
          description: Maximum number of results to return. Must be between 1 and 1000.
          schema:
            maximum: 1000
            minimum: 1
            type: integer
            format: int32
        - name: skipCount
          in: query
          description: Number of results to skip for pagination.
          schema:
            type: integer
            format: int32
        - name: sorting
          in: query
          description: |-
            Sorting expression for the results
            Default is "CreationTime desc".
          schema:
            type: string
            default: creationTime desc
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/EdgeSync.ContainerMgmt.Stacks.Dtos.CreateContainerS\
                  tackDto"
              example:
                totalCount: 1
                items:
                  - stackRevisionId: 2fadf006-364b-459c-9395-358eec3e479a
                    deploymentId: dc357a68-3c2b-4395-9267-1eb78e74ef67
                    taskId: 41032282-e72c-45d6-8f93-e03aef3403a5
                    stackName: test-name
                    deviceId: 74fe488d5d54
                    status: running(1)
                    containers: []
                    error: null
                    active: true
                    creationTime: 0001-01-01T00:00:00
        "400":
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
              example:
                error:
                  code: ValidationError
                  message: Bad Request - Invalid request parameters
                  details: null
                  data: null
                  validationErrors:
                    - message: The value 'a' is not valid.
                      members:
                        - StackDeploymentIds
        "403":
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
              example:
                error:
                  code: InvalidSortDirectionError
                  message: "Invalid sort direction: 'besc'. Use 'asc' or 'desc'"
                  details: null
                  data: null
                  validationErrors: null
        "500":
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
              example:
                error:
                  code: null
                  message: An internal error occurred during your request!
                  details: null
                  data: null
                  validationErrors: null
      security:
        - oidc: []
  "/platform/solutions/api/v1/devices/{deviceId}/docker/stacks":
    servers: []
    get:
      tags:
        - ___swagger_3-container-management_swagger_json_Container Deployments
      summary: Get the stacks in the device
      parameters:
        - name: deviceId
          in: path
          description: ID of the device
          required: true
          schema:
            type: string
        - name: stackConfigId
          in: query
          description: An unique ID for the stack configuration.If not provided, all
            stacks on the device will be return.
          schema:
            type: string
            format: uuid
        - name: maxResultCount
          in: query
          description: Maximum number of results to return. Must be between 1 and 1000.
          schema:
            maximum: 1000
            minimum: 1
            type: integer
            format: int32
        - name: skipCount
          in: query
          description: Number of results to skip for pagination.
          schema:
            type: integer
            format: int32
        - name: sorting
          in: query
          description: |-
            Sorting expression for the results
            Default is "CreationTime desc".
          schema:
            type: string
            default: creationTime desc
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/EdgeSync.ContainerMgmt.Deployments.Dtos.StackDeploy\
                  mentDto"
              example:
                stackRevisionId: 070c30a7-b568-44f3-8017-2fd36d011003
                deploymentId: b58b979d-1207-4225-9ed4-59145175afb3
                taskId: ad781650-3571-49b3-892c-91ea4eb3bc92
                stackName: test-name
                deviceId: 74fe488d5d54
                status: running(1)
                containers: []
                error: null
                active: true
                creationTime: 0001-01-01T00:00:00
        "404":
          description: Not Found
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
              example:
                error:
                  code: InvalidSortDirectionError
                  message: "Invalid sort direction: 'besc'. Use 'asc' or 'desc'"
                  details: null
                  data: null
                  validationErrors: null
        "500":
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
              example:
                error:
                  code: null
                  message: An internal error occurred during your request!
                  details: null
                  data: null
                  validationErrors: null
      security:
        - oidc: []
    delete:
      tags:
        - ___swagger_3-container-management_swagger_json_Container Deployments
      summary: Undeploy stack from device
      description: >-
        
        Overview: Undeploy a specific stack deployment from a single device.


        • Single stack removal: Removes only the specified stack from the device


        • Preserve other stacks: All other stacks on the device remain unchanged


        • Active deployment only: Only removes currently active deployments


        • NATS notification: Sends updated configuration to the device


        • Database cleanup: Removes the deployment record from the database


        • Complete configuration: Device receives its complete remaining stack configuration
      parameters:
        - name: deviceId
          in: path
          description: ID of the device to undeploy from
          required: true
          schema:
            type: string
        - name: stackConfigId
          in: query
          description: An unique ID for the stack configuration. If not provided, all
            stacks on the device will be undeployed.
          schema:
            type: string
            format: uuid
      responses:
        "204":
          description: No Content
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/EdgeSync.ContainerMgmt.Deployments.ExampleDtos.Unpl\
                  oyDeploymentsSuccessReponseExample"
        "404":
          description: Not Found
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
              example:
                error:
                  code: ResourceNotFound
                  message: "Resource Not Found. input: "
                  details: null
                  data: null
                  validationErrors: null
        "500":
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
              example:
                error:
                  code: null
                  message: An internal error occurred during your request!
                  details: null
                  data: null
                  validationErrors: null
      security:
        - oidc: []
  "/platform/solutions/api/v1/orgs/{orgId}/docker-settings/stack-configs/{stackConfigId}/revisions/{stackRevisionId}:deploy":
    servers: []
    post:
      tags:
        - ___swagger_3-container-management_swagger_json_Container Deployments
      summary: Deploys container stack
      description: >-
        
        Overview: Deploys a container stack to multiple devices simultaneously with intelligent conflict resolution.


        • Intelligent conflict resolution: Automatically determines action for each device:


        -- Skip: Device already has the exact same stack version deployed


        -- Update: Device has a different version of the same stack (old version is removed)


        -- Add: Device doesn't have this stack deployed


        • Batch processing: All devices are processed in parallel for optimal performance


        • Maximum count: Limited to 128 devices per batch deployment


        • Detailed reporting: Returns comprehensive statistics including total, skipped, and newly deployed device counts


        • Device action tracking: DeviceActions dictionary maps each device ID to its action (skip/update/add)


        • Order preservation: Results maintain the same order as input DeviceIds


        • Error handling: If any device deployment fails, the entire operation fails with detailed error message
      parameters:
        - name: stackConfigId
          in: path
          description: An unique ID for the stack configuration.
          required: true
          schema:
            type: string
            format: uuid
        - name: stackRevisionId
          in: path
          description: Revision ID for the specified version of stack configuration.
          required: true
          schema:
            type: string
            format: uuid
        - name: orgId
          in: path
          description: Identity for user's organization.
          required: true
          schema:
            type: string
            format: uuid
      requestBody:
        description: Batch deployment configuration containing stack configuration ID
          and list of device IDs
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/EdgeSync.ContainerMgmt.Deployments.Dtos.CreateUpdat\
                eStackDeploymentsDto"
            example:
              deviceIds:
                - 74fe488d5d54
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/EdgeSync.ContainerMgmt.Deployments.Dtos.StackDeploy\
                  mentsDto"
              example:
                stackDeployments:
                  - stackRevisionId: 5027ea37-bf47-49bb-915e-2f925d6132fc
                    deploymentId: ad1e0faf-2a4f-425e-8775-9010f58ca661
                    taskId: c1295dd6-a8ba-4d22-9dc5-5f033958f22c
                    stackName: test-name
                    deviceId: 74fe488d5d54
                    status: deploying
                    containers: []
                    error: null
                    active: true
                    creationTime: 0001-01-01T00:00:00
                totalDevices: 1
                skippedDevices: 0
                newlyDeployedDevices: 1
                deviceActions:
                  74fe488d5d54: add
        "400":
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
              example:
                error:
                  code: ValidationError
                  message: Bad Request - Invalid request parameters
                  details: null
                  data: null
                  validationErrors:
                    - message: The field Action is invalid.
                      members:
                        - DeviceIds
        "404":
          description: Not Found
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
              example:
                error:
                  code: ResourceNotFound
                  message: "Resource Not Found. input: 3fa85f64-5717-4562-b3fc-2c963f66afa6"
                  details: null
                  data: null
                  validationErrors: null
        "500":
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
              example:
                error:
                  code: null
                  message: An internal error occurred during your request!
                  details: null
                  data: null
                  validationErrors: null
      security:
        - oidc: []
  "/platform/solutions/api/v1/orgs/{orgId}/docker-settings/registries":
    servers: []
    get:
      tags:
        - ___swagger_3-container-management_swagger_json_Container Registries
      summary: Get registries
      description: >-
        
        Overview: Retrieves a paginated list of all configured registries.


        • Sorting support: Supports sorting by any field, default is descending by creation time


        • Page size limit: Maximum 1000 records per page


        • Valid sorting properties are: CreationTime, RegistryName, RegistryUrl
      parameters:
        - name: maxResultCount
          in: query
          description: Maximum number of results to return. Must be between 1 and 1000.
          schema:
            maximum: 1000
            minimum: 1
            type: integer
            format: int32
        - name: skipCount
          in: query
          description: Number of results to skip for pagination.
          schema:
            type: integer
            format: int32
        - name: sorting
          in: query
          description: |-
            Sorting expression for the results
            Default is "CreationTime desc".
          schema:
            type: string
            default: creationTime desc
        - name: orgId
          in: path
          description: Identity for user's organization.
          required: true
          schema:
            type: string
            format: uuid
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Volo.Abp.Application.Dtos.PagedResultDto`1[[EdgeSyn\
                  c.ContainerMgmt.Registries.Dtos.RegistryDto,
                  EdgeSync.ContainerMgmt.Application.Contracts, Version=1.0.0.0,
                  Culture=neutral, PublicKeyToken=null]]"
              example:
                totalCount: 2
                items:
                  - registryId: f5604859-9020-4bca-9022-3af1b6b40672
                    registryName: harbor-ecr-sync
                    registryUrl: https://registry.dev.company.com
                    creationTime: 2025-12-03T00:36:07.6107007+00:00
                    registryEncryptedCredentials:
                      registryType: AwsECR
                      encryptedAccessKey: AKIA2V7EXAMPLE123456
                      encryptedAccessSecretKey: 8xJalrXUtnFEMI/K7MDENG/bPxRfiCYzEXAMPLE7
                      region: ap-southeast-1
                  - registryId: 7dbe74aa-eaf1-495a-88ee-f8c53268d791
                    registryName: harbor-ecr-sync
                    registryUrl: https://registry.dev.company.com
                    creationTime: 2025-12-03T00:36:07.6112007+00:00
                    registryEncryptedCredentials:
                      registryType: AwsECR
                      encryptedAccessKey: AKIA2V7EXAMPLE123456
                      encryptedAccessSecretKey: 8xJalrXUtnFEMI/K7MDENG/bPxRfiCYzEXAMPLE7
                      region: ap-southeast-1
        "403":
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
              example:
                error:
                  code: InvalidSortDirectionError
                  message: "Invalid sort direction: 'a'. Use 'asc' or 'desc"
                  details: null
                  data: null
                  validationErrors: null
        "500":
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
              example:
                error:
                  code: null
                  message: An internal error occurred during your request!
                  details: null
                  data: null
                  validationErrors: null
      security:
        - oidc: []
    post:
      tags:
        - ___swagger_3-container-management_swagger_json_Container Registries
      summary: Create registry
      description: >-
        
        Overview: Creates a new registry configuration with validation and encryption.


        • Registry name uniqueness: Throws exception if registry name already exists in the deployment


        • Registry type validation: Validates registry type and requires access key and secret key


        • Registry type: One of Custom, DockerHub, AzureACR and AwsECR


        • Encryption: Encrypts sensitive data (password, access key, access secret key)


        • Region: Specifies the region for the registry
      parameters:
        - name: orgId
          in: path
          description: Identity for user's organization.
          required: true
          schema:
            type: string
            format: uuid
      requestBody:
        description: Registry creation configuration
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/EdgeSync.ContainerMgmt.Registries.Dtos.CreateRegist\
                ryDto"
            example:
              registryName: harbor-ecr-sync
              registryUrl: https://registry.dev.company.com
              registryCredentials:
                registryType: AwsECR
                accessKey: AKIA2V7EXAMPLE123456
                accessSecretKey: 8xJalrXUtnFEMI/K7MDENG/bPxRfiCYzEXAMPLE7
                region: ap-southeast-1
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/EdgeSync.ContainerMgmt.Registries.Dtos.RegistryDto"
              example:
                registryId: 3220eddb-52b8-49a7-bc1e-e538dfdb7562
                registryName: harbor-ecr-sync
                registryUrl: https://registry.dev.company.com
                creationTime: 2025-12-03T00:36:07.6400622+00:00
                registryEncryptedCredentials:
                  registryType: AwsECR
                  encryptedAccessKey: AKIA2V7EXAMPLE123456
                  encryptedAccessSecretKey: 8xJalrXUtnFEMI/K7MDENG/bPxRfiCYzEXAMPLE7
                  region: ap-southeast-1
        "400":
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
              example:
                error:
                  code: ValidationError
                  message: Bad Request - Invalid request parameters
                  details: null
                  data: null
                  validationErrors:
                    - message: The RegistryName field is required.
                      members:
                        - RegistryName
        "500":
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
              example:
                error:
                  code: null
                  message: An internal error occurred during your request!
                  details: null
                  data: null
                  validationErrors: null
      security:
        - oidc: []
  "/platform/solutions/api/v1/orgs/{orgId}/docker-settings/registries/{registryId}":
    servers: []
    put:
      tags:
        - ___swagger_3-container-management_swagger_json_Container Registries
      summary: Updates a registry
      description: >-
        
        • Registry name uniqueness: Throws exception if registry name already exists in the deployment (excluding current registry)


        • Registry type validation: Validates registry type and requires access key and secret key


        • Registry type: One of Custom, DockerHub, AzureACR and AwsECR


        • Encryption: Encrypts sensitive data (password, access key, access secret key)


        • Region: Specifies the region for the registry
      parameters:
        - name: registryId
          in: path
          description: Registry ID
          required: true
          schema:
            type: string
            format: uuid
        - name: orgId
          in: path
          required: true
          schema:
            type: string
      requestBody:
        description: Registry update configuration
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/EdgeSync.ContainerMgmt.Registries.Dtos.UpdateRegist\
                ryDto"
            example:
              registryName: harbor-ecr-sync
              registryUrl: https://registry.dev.company.com
              registryCredentials:
                registryType: AwsECR
                accessKey: AKIA2V7EXAMPLE123456
                accessSecretKey: 8xJalrXUtnFEMI/K7MDENG/bPxRfiCYzEXAMPLE7
                region: ap-southeast-1
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/EdgeSync.ContainerMgmt.Registries.Dtos.RegistryDto"
              example:
                registryId: f9dbc3b1-f666-4b61-866e-20deb7f89efb
                registryName: harbor-ecr-sync
                registryUrl: https://registry.dev.company.com
                creationTime: 2025-12-03T00:36:07.6546472+00:00
                registryEncryptedCredentials:
                  registryType: AwsECR
                  encryptedAccessKey: AKIA2V7EXAMPLE123456
                  encryptedAccessSecretKey: 8xJalrXUtnFEMI/K7MDENG/bPxRfiCYzEXAMPLE7
                  region: ap-southeast-1
        "400":
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
              example:
                error:
                  code: ValidationError
                  message: Bad Request - Invalid request parameters
                  details: null
                  data: null
                  validationErrors:
                    - message: The RegistryUserPassword field is required.
                      members:
                        - RegistryUserPassword
        "403":
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
              example:
                error:
                  code: ContainerMgmt:Registry:DuplicateName
                  message: Registry with name 'harbor-ecr-sync' already exists in the deployment.
                  details: Cannot rename registry to 'harbor-ecr-sync' because another registry
                    with this name already exists. Please choose a different
                    name.
                  data: null
                  validationErrors: null
        "500":
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
              example:
                error:
                  code: null
                  message: An internal error occurred during your request!
                  details: null
                  data: null
                  validationErrors: null
      security:
        - oidc: []
    delete:
      tags:
        - ___swagger_3-container-management_swagger_json_Container Registries
      summary: Delete a registry
      parameters:
        - name: registryId
          in: path
          description: Registry ID
          required: true
          schema:
            type: string
            format: uuid
        - name: orgId
          in: path
          required: true
          schema:
            type: string
      responses:
        "204":
          description: No Content
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/EdgeSync.ContainerMgmt.Registries.Example.DeleteReg\
                  istrySuccessReponseExample"
        "404":
          description: Not Found
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
              example:
                error:
                  code: ResourceNotFound
                  message: "Resource Not Found. input: b34deae8-08a5-4357-b0b4-172303c3fe51"
                  details: null
                  data: null
                  validationErrors: null
        "500":
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
              example:
                error:
                  code: null
                  message: An internal error occurred during your request!
                  details: null
                  data: null
                  validationErrors: null
      security:
        - oidc: []
    get:
      tags:
        - ___swagger_3-container-management_swagger_json_Container Registries
      summary: Get a registry by id
      description: >-
        
        Overview: Retrieves a specific registry configuration by its ID.


        • Exact match: Returns the registry with the exact ID


        • Sensitive data: Password and keys are encrypted and not included in the response
      parameters:
        - name: registryId
          in: path
          description: Registry unique id
          required: true
          schema:
            type: string
            format: uuid
        - name: orgId
          in: path
          required: true
          schema:
            type: string
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/EdgeSync.ContainerMgmt.Registries.Dtos.RegistryDto"
              example:
                registryId: 9067597e-6f85-4954-9f83-46c775c05110
                registryName: harbor-ecr-sync
                registryUrl: https://registry.dev.company.com
                creationTime: 2025-12-03T00:36:07.6703989+00:00
                registryEncryptedCredentials:
                  registryType: AwsECR
                  encryptedAccessKey: AKIA2V7EXAMPLE123456
                  encryptedAccessSecretKey: 8xJalrXUtnFEMI/K7MDENG/bPxRfiCYzEXAMPLE7
                  region: ap-southeast-1
        "404":
          description: Not Found
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
              example:
                error:
                  code: ResourceNotFound
                  message: "Resource Not Found. input: b34deae8-08a5-4357-b0b4-172303c3fe51"
                  details: null
                  data: null
                  validationErrors: null
        "500":
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
              example:
                error:
                  code: null
                  message: An internal error occurred during your request!
                  details: null
                  data: null
                  validationErrors: null
      security:
        - oidc: []
  "/platform/solutions/api/v1/orgs/{orgId}/docker-settings/stack-configs":
    servers: []
    get:
      tags:
        - ___swagger_3-container-management_swagger_json_Container Stacks
      summary: Get container stack configurations
      description: >-
        
        Overview: Retrieves a paginated list of container stack configurations with optional filtering and sorting.


        • Flexible filtering: Supports filtering by stackName, version, and type


        • Stack name filtering: When stackName is provided, filters stacks by exact name match


        • Version filtering: When both stackName and version are provided, returns specific version


        • Type filtering: When type is provided, filters stacks by exact type match


        • Combined filtering: All filters can be combined for precise queries


        • Results ordering: Results are returned in descending order by creation time by default


        • Sorting support: Supports sorting by any field, default is descending by creation time


        • Page size limit: Maximum 1000 records per page


        • Valid sorting properties are: CreationTime, StackConfigId, StackName, Version
      parameters:
        - name: stackName
          in: query
          description: Optional stack name filter
          schema:
            type: string
        - name: type
          in: query
          description: |-
            Optional type filter
            value : compose
          schema:
            type: string
            default: compose
        - name: maxResultCount
          in: query
          description: Maximum number of results to return. Must be between 1 and 1000.
          schema:
            maximum: 1000
            minimum: 1
            type: integer
            format: int32
        - name: skipCount
          in: query
          description: Number of results to skip for pagination.
          schema:
            type: integer
            format: int32
        - name: sorting
          in: query
          description: |-
            Sorting expression for the results
            Default is "CreationTime desc".
          schema:
            type: string
            default: creationTime desc
        - name: orgId
          in: path
          description: Identity for user's organization.
          required: true
          schema:
            type: string
            format: uuid
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Volo.Abp.Application.Dtos.PagedResultDto`1[[EdgeSyn\
                  c.ContainerMgmt.Stacks.Dtos.ContainerStackDto,
                  EdgeSync.ContainerMgmt.Application.Contracts, Version=1.0.0.0,
                  Culture=neutral, PublicKeyToken=null]]"
              example:
                totalCount: 1
                items:
                  - stackConfigId: 4fe3637a-21bf-46de-b295-e6527c2d6f29
                    stackRevisionId: 74b3622e-9975-4aa8-97e9-b0f0006a6453
                    stackName: no-duplicate-stack-name
                    type: compose
                    composeFileContent: dmVyc2lvbjogIjMuOCIKc2VydmljZXM6CiAgbmdpbng6CiAgICBpbWFnZTogbmdpbng6bGF0ZXN0CiAgICBwb3J0czoKICAgICAgLSAiODA6ODAiCiAgICB2b2x1bWVzOgogICAgICAtIC4vaHRtbDovdXNyL3NoYXJlL25naW54L2h0bWw
                    environment: {}
                    description: this is description
                    creationTime: 2025-12-03T00:36:07.681441+00:00
        "500":
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
              example:
                error:
                  code: null
                  message: An internal error occurred during your request!
                  details: null
                  data: null
                  validationErrors: null
      security:
        - oidc: []
    post:
      tags:
        - ___swagger_3-container-management_swagger_json_Container Stacks
      summary: Create container stack configuration
      description: >-
        
        Overview: Creates a new container stack configuration with automatic version assignment.


        • No duplicate stack names allowed: Stack name must be unique across all versions


        • Auto-versioning: Version is automatically assigned starting from 1


        • ComposeFileContent: Must be valid Base64 encoded Docker Compose content


        • Environment: Optional key-value pairs for environment variables


        • Stack Naming Rules: Must follow Docker container naming rules:


        1. Stack name may contain lowercase letters, digits and hyphen (-)


        2. Stack name may not start or end with a hyphen (-)


        3. Stack name cannot contain consecutive hyphens (-)


        4. Maximum length of 63 characters
      parameters:
        - name: orgId
          in: path
          description: Identity for user's organization.
          required: true
          schema:
            type: string
            format: uuid
      requestBody:
        description: Container stack creation data
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/EdgeSync.ContainerMgmt.Stacks.Dtos.CreateContainerS\
                tackDto"
            example:
              stackName: no-duplicate-stack-name
              type: compose
              composeFileContent: dmVyc2lvbjogIjMuOCIKc2VydmljZXM6CiAgbmdpbng6CiAgICBpbWFnZTogbmdpbng6bGF0ZXN0CiAgICBwb3J0czoKICAgICAgLSAiODA6ODAiCiAgICB2b2x1bWVzOgogICAgICAtIC4vaHR0bWw6L3Vzci9zaGFyZS9uZ2lueC9odG1s
              environment: {}
              description: this is description
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/EdgeSync.ContainerMgmt.Stacks.Dtos.ContainerStackDt\
                  o"
              example:
                stackConfigId: f1ef0c26-9fc4-4313-8c91-12b75c9bde55
                stackRevisionId: 2cd2d2c6-9a39-4601-90bf-1e5fc1b55f9a
                stackName: no-duplicate-stack-name
                type: compose
                composeFileContent: dmVyc2lvbjogIjMuOCIKc2VydmljZXM6CiAgbmdpbng6CiAgICBpbWFnZTogbmdpbng6bGF0ZXN0CiAgICBwb3J0czoKICAgICAgLSAiODA6ODAiCiAgICB2b2x1bWVzOgogICAgICAtIC4vaHRtbDovdXNyL3NoYXJlL25naW54L2h0bWw
                environment: {}
                description: this is description
                creationTime: 2025-12-03T00:36:07.6992801+00:00
        "403":
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
              example:
                error:
                  code: InvalidYamlContent
                  message: composeFileContent must contain valid base64 encoded YAML content
                  details: null
                  data: null
                  validationErrors: null
        "500":
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
              example:
                error:
                  code: null
                  message: An internal error occurred during your request!
                  details: null
                  data: null
                  validationErrors: null
      security:
        - oidc: []
  "/platform/solutions/api/v1/orgs/{orgId}/docker-settings/stack-configs/{stackConfigId}/revisions/{stackRevisionId}":
    servers: []
    delete:
      tags:
        - ___swagger_3-container-management_swagger_json_Container Stacks
      summary: Delete specified container stack configuration revision
      description: >-
        
        Overview: Deletes a specific container stack configuration revision if it has no active deployments.


        • Deployment check: Cannot delete stacks that have any associated deployments


        • Safety first: Must undeploy all revisions before deletion is allowed


        • Referential integrity: Prevents orphaned deployment records


        • Business exception: Throws BusinessException with stack revisionId if deployments associated
      parameters:
        - name: stackConfigId
          in: path
          description: An unique ID for the stack configuration.
          required: true
          schema:
            type: string
            format: uuid
        - name: stackRevisionId
          in: path
          description: Revision ID for the specified version of stack configuration.
          required: true
          schema:
            type: string
            format: uuid
        - name: orgId
          in: path
          description: Identity for user's organization.
          required: true
          schema:
            type: string
            format: uuid
      responses:
        "204":
          description: No Content
        "403":
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
              example:
                error:
                  code: DeleteFail
                  message: Cannot delete stack with ID bccbcc2a-7101-499a-8a43-7ffda211c9e0
                    because it has associated deployments.
                  details: null
                  data: null
                  validationErrors: null
        "404":
          description: Not Found
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
              example:
                error:
                  code: ResourceNotFound
                  message: "Resource Not Found. input: 3fa85f64-5717-4562-b3fc-2c963f66afa6"
                  details: null
                  data: null
                  validationErrors: null
        "500":
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
              example:
                error:
                  code: null
                  message: An internal error occurred during your request!
                  details: null
                  data: null
                  validationErrors: null
      security:
        - oidc: []
    get:
      tags:
        - ___swagger_3-container-management_swagger_json_Container Stacks
      summary: Get specified container stack configuration revision
      description: >-
        
        Overview: Retrieves a specific container stack configuration revision by ID.


        • Exact match: Returns the stack with the exact ID
      parameters:
        - name: stackConfigId
          in: path
          description: An unique ID for the stack configuration.
          required: true
          schema:
            type: string
            format: uuid
        - name: stackRevisionId
          in: path
          description: Revision ID for the specified version of stack configuration.
          required: true
          schema:
            type: string
            format: uuid
        - name: orgId
          in: path
          description: Identity for user's organization.
          required: true
          schema:
            type: string
            format: uuid
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/EdgeSync.ContainerMgmt.Stacks.Dtos.ContainerStackDt\
                  o"
              example:
                stackConfigId: 3633836a-43fb-442e-ab91-42c2a7f5c42b
                stackRevisionId: 30bc9b79-4bb4-4aa1-b47f-a7e4dd33eed6
                stackName: no-duplicate-stack-name
                type: compose
                composeFileContent: dmVyc2lvbjogIjMuOCIKc2VydmljZXM6CiAgbmdpbng6CiAgICBpbWFnZTogbmdpbng6bGF0ZXN0CiAgICBwb3J0czoKICAgICAgLSAiODA6ODAiCiAgICB2b2x1bWVzOgogICAgICAtIC4vaHRtbDovdXNyL3NoYXJlL25naW54L2h0bWw
                environment: {}
                description: this is description
                creationTime: 2025-12-03T00:36:07.7163199+00:00
        "500":
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
              example:
                error:
                  code: null
                  message: An internal error occurred during your request!
                  details: null
                  data: null
                  validationErrors: null
      security:
        - oidc: []
  "/platform/solutions/api/v1/orgs/{orgId}/docker-settings/stack-configs/revisions/diff":
    servers: []
    get:
      tags:
        - ___swagger_3-container-management_swagger_json_Container Stacks
      summary: Compare specified container stack configuration revisions
      description: >-
        
        Overview: Compare two container stack configurations and return their differences.


        • Git-like diff: Provides comprehensive comparison similar to git diff


        • Field-level analysis: Compares all stack properties including metadata


        • Environment variables: Detailed comparison of environment configurations


        • Compose content: Compares Docker Compose file content (Base64 decoded)
      parameters:
        - name: sourceStackRevisionId
          in: query
          description: ID of the source container stack configuration to compare from
          required: true
          schema:
            type: string
            format: uuid
        - name: targetStackRevisionId
          in: query
          description: ID of the target container stack configuration to compare to
          required: true
          schema:
            type: string
            format: uuid
        - name: orgId
          in: path
          description: Identity for user's organization.
          required: true
          schema:
            type: string
            format: uuid
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/EdgeSync.ContainerMgmt.Stacks.Dtos.ContainerStackDt\
                  o"
              example:
                sourceStack:
                  stackConfigId: b9c0a9d9-1279-4977-b1d1-e91c544e98b6
                  stackRevisionId: c42352cb-9837-4d86-b85e-cf9f8d3949ed
                  stackName: no-duplicate-stack-name
                  type: compose
                  composeFileContent: dmVyc2lvbjogIjMuOCIKc2VydmljZXM6CiAgbmdpbng6CiAgICBpbWFnZTogbmdpbng6bGF0ZXN0CiAgICBwb3J0czoKICAgICAgLSAiODA6ODAiCiAgICB2b2x1bWVzOgogICAgICAtIC4vaHRtbDovdXNyL3NoYXJlL25naW54L2h0bWw
                  environment: {}
                  description: this is description
                  creationTime: 2025-12-03T00:36:07.7221604+00:00
                targetStack:
                  stackConfigId: 161f88fb-a2b1-4540-abba-04cf404e11b4
                  stackRevisionId: 7668255e-f3b6-4be8-9244-78525494d74f
                  stackName: no-duplicate-stack-name
                  type: compose
                  composeFileContent: dmVyc2lvbjogIjMuOCIKc2VydmljZXM6CiAgbmdpbng6CiAgICBpbWFnZTogbmdpbng6bGF0ZXN0CiAgICBwb3J0czoKICAgICAgLSAiODA6ODAiCiAgICB2b2x1bWVzOgogICAgICAtIC4vaHRtbDovdXNyL3NoYXJlL25naW54L2h0bWw
                  environment: {}
                  description: this is description 2
                  creationTime: 2025-12-03T00:36:07.7222289+00:00
                fieldDifferences:
                  - fieldName: Version
                    sourceValue: 1
                    targetValue: 2
                    changeType: modified
                  - fieldName: Description
                    sourceValue: this is description
                    targetValue: this is description 2
                    changeType: modified
                environmentDiff:
                  addedVariables: {}
                  removedVariables: {}
                  changedVariables: {}
                yamlDiff:
                  addedFields: []
                  removedFields: []
                  modifiedFields: []
                  errors: []
                  hasChanges: false
                  summary: No changes in YAML content
                areIdentical: false
                summary: 2 field(s) modified
        "500":
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
              example:
                error:
                  code: null
                  message: An internal error occurred during your request!
                  details: null
                  data: null
                  validationErrors: null
      security:
        - oidc: []
  "/platform/solutions/api/v1/orgs/{orgId}/docker-settings/stack-configs/{stackConfigId}":
    servers: []
    get:
      tags:
        - ___swagger_3-container-management_swagger_json_Container Stacks
      summary: Get latest container stack configuration
      description: >-
        
        Overview: Retrieves the latest revision of a specific container stack configuration.


        • Exact match: Returns the stack with the exact stack config Id


        • Latest revision: Returns the latest revision of the stack
      parameters:
        - name: stackConfigId
          in: path
          description: An unique ID for the stack configuration.
          required: true
          schema:
            type: string
            format: uuid
        - name: orgId
          in: path
          description: Identity for user's organization.
          required: true
          schema:
            type: string
            format: uuid
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/EdgeSync.ContainerMgmt.Stacks.Dtos.ContainerStackDt\
                  o"
              example:
                stackConfigId: 37007e53-3daa-461e-acdc-8ef98ea202f0
                stackRevisionId: 33eb440e-4108-4da9-bc13-3cbeaaeab6d1
                stackName: no-duplicate-stack-name
                type: compose
                composeFileContent: dmVyc2lvbjogIjMuOCIKc2VydmljZXM6CiAgbmdpbng6CiAgICBpbWFnZTogbmdpbng6bGF0ZXN0CiAgICBwb3J0czoKICAgICAgLSAiODA6ODAiCiAgICB2b2x1bWVzOgogICAgICAtIC4vaHRtbDovdXNyL3NoYXJlL25naW54L2h0bWw
                environment: {}
                description: this is description
                creationTime: 2025-12-03T00:36:07.752983+00:00
        "500":
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
              example:
                error:
                  code: null
                  message: An internal error occurred during your request!
                  details: null
                  data: null
                  validationErrors: null
      security:
        - oidc: []
    delete:
      tags:
        - ___swagger_3-container-management_swagger_json_Container Stacks
      summary: Delete container stack configuration
      description: >-
        
        Overview: Deletes a container stack configuration and all its revisions if they have no active deployments.


        • Deployment check: Cannot delete stacks that have any associated deployments
      parameters:
        - name: stackConfigId
          in: path
          description: An unique ID for the stack configuration.
          required: true
          schema:
            type: string
            format: uuid
        - name: orgId
          in: path
          description: Identity for user's organization.
          required: true
          schema:
            type: string
            format: uuid
      responses:
        "204":
          description: No Content
        "403":
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
              example:
                error:
                  code: DeleteFail
                  message: Cannot delete stack with ID 5f04cfd6-5796-412b-8ab9-08218ed0854b
                    because it has associated deployments.
                  details: null
                  data: null
                  validationErrors: null
        "404":
          description: Not Found
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
              example:
                error:
                  code: ResourceNotFound
                  message: "Resource Not Found. input: 3fa85f64-5717-4562-b3fc-2c963f66afa6"
                  details: null
                  data: null
                  validationErrors: null
        "500":
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
              example:
                error:
                  code: null
                  message: An internal error occurred during your request!
                  details: null
                  data: null
                  validationErrors: null
      security:
        - oidc: []
    patch:
      tags:
        - ___swagger_3-container-management_swagger_json_Container Stacks
      summary: Update latest revision of container stack configuration
      description: >-
        
        Overview: Updates an existing container stack configuration by creating a new revision.


        • Active deployments: Existing deployments will NOT be affected by the update.


        • Partial update: Only fields with non-null values will be updated. Fields that are not included or explicitly set to null will be ignored.
      parameters:
        - name: stackConfigId
          in: path
          description: An unique ID for the stack configuration.
          required: true
          schema:
            type: string
            format: uuid
        - name: orgId
          in: path
          description: Identity for user's organization.
          required: true
          schema:
            type: string
            format: uuid
      requestBody:
        description: Updated container stack configuration data
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/EdgeSync.ContainerMgmt.Stacks.Dtos.UpdateStackDto"
            example:
              composeFileContent: null
              environment: {}
              description: this is description
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/EdgeSync.ContainerMgmt.Stacks.Dtos.ContainerStackDt\
                  o"
              example:
                stackConfigId: a142fc12-273b-4dad-976f-610c3b82d4d1
                stackRevisionId: e6a903eb-591d-4b5b-b72d-3a0959b7ea83
                stackName: no-duplicate-stack-name
                type: compose
                composeFileContent: dmVyc2lvbjogIjMuOCIKc2VydmljZXM6CiAgbmdpbng6CiAgICBpbWFnZTogbmdpbng6bGF0ZXN0CiAgICBwb3J0czoKICAgICAgLSAiODA6ODAiCiAgICB2b2x1bWVzOgogICAgICAtIC4vaHRtbDovdXNyL3NoYXJlL25naW54L2h0bWw
                environment: {}
                description: this is description
                creationTime: 2025-12-03T00:36:07.7680102+00:00
        "403":
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
              example:
                code: InvalidYamlContent
                message: composeFileContent must contain valid base64 encoded YAML content
                details: null
                data: null
                validationErrors: null
        "500":
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
              example:
                error:
                  code: null
                  message: An internal error occurred during your request!
                  details: null
                  data: null
                  validationErrors: null
      security:
        - oidc: []
  "/platform/solutions/api/v1/orgs/{orgId}/docker-settings/stack-configs/{stackConfigId}/revisions":
    servers: []
    get:
      tags:
        - ___swagger_3-container-management_swagger_json_Container Stacks
      summary: Get all revisions of container stack configuration
      description: >-
        
        Overview: Retrieves all revisions of a specific container stack configuration.


        • Exact match: Returns the stack with the exact stack config Id
      parameters:
        - name: stackConfigId
          in: path
          description: An unique ID for the stack configuration.
          required: true
          schema:
            type: string
            format: uuid
        - name: maxResultCount
          in: query
          description: Maximum number of results to return. Must be between 1 and 1000.
          schema:
            maximum: 1000
            minimum: 1
            type: integer
            format: int32
        - name: skipCount
          in: query
          description: Number of results to skip for pagination.
          schema:
            type: integer
            format: int32
        - name: sorting
          in: query
          description: |-
            Sorting expression for the results
            Default is "CreationTime desc".
          schema:
            type: string
            default: creationTime desc
        - name: orgId
          in: path
          description: Identity for user's organization.
          required: true
          schema:
            type: string
            format: uuid
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/EdgeSync.ContainerMgmt.Stacks.Dtos.ContainerStackDt\
                  o"
              example:
                stackConfigId: a2555937-30c8-47e3-9080-3c79e461393d
                stackRevisionId: 29a23ee7-01ad-4744-a7a6-40b5c5df685b
                stackName: no-duplicate-stack-name
                type: compose
                composeFileContent: dmVyc2lvbjogIjMuOCIKc2VydmljZXM6CiAgbmdpbng6CiAgICBpbWFnZTogbmdpbng6bGF0ZXN0CiAgICBwb3J0czoKICAgICAgLSAiODA6ODAiCiAgICB2b2x1bWVzOgogICAgICAtIC4vaHRtbDovdXNyL3NoYXJlL25naW54L2h0bWw
                environment: {}
                description: this is description
                creationTime: 2025-12-03T00:36:07.7733984+00:00
        "500":
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
              example:
                error:
                  code: null
                  message: An internal error occurred during your request!
                  details: null
                  data: null
                  validationErrors: null
      security:
        - oidc: []
  "/platform/solutions/api/v1/devices/{deviceId}/inputs/data-objects/alert-rules":
    servers: []
    post:
      tags:
        - ___swagger_4-datapoints_swagger_json_Data Objects
      summary: Create alert rule
      description: "Create a new alert rule with defined conditions and actions.\r

        \r

        **Parameters**\r

        \r

        * `request` (body, required): The request payload that defines
        the rule conditions, thresholds, and actions.\r

        \r

        **Responses**\r

        \r

        * `201 Created`: returns the created alert rule.\r

        \r

        **Security**\r

        \r

        * This API requires authentication."
      parameters:
        - name: deviceId
          in: path
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/RuleEngineCreateWithoutDeviceIdRequest"
            example:
              ruleName: High CPU Usage Alert
              dataObjectName: cpuUsage
              alertLevel: ">=70"
              alertResetLevel: <70
              delay: 5
      responses:
        "201":
          description: Created
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/RuleEngineDto"
      security:
        - oidc: []
        - Bearer: []
    get:
      tags:
        - ___swagger_4-datapoints_swagger_json_Data Objects
      summary: Get alert rules with pagination
      description: "Retrieve a paginated list of alert rules.\r

        \r

        **Parameters**\r

        \r

        * Query parameters for filtering and pagination.\r

        \r

        **Responses**\r

        \r

        * `200 OK`: returns a paged list of alert rules.\r

        \r

        **Security**\r

        \r

        * This API requires authentication."
      parameters:
        - name: deviceId
          in: path
          required: true
          schema:
            type: string
        - name: keyword
          in: query
          description: Query keyword, include DeviceId, RuleName, Channel
          schema:
            type: string
            description: Query keyword, include DeviceId, RuleName, Channel
        - name: sorting
          in: query
          schema:
            type: string
        - name: skipCount
          in: query
          schema:
            maximum: 2147483647
            minimum: 0
            type: integer
            format: int32
        - name: maxResultCount
          in: query
          schema:
            maximum: 2147483647
            minimum: 1
            type: integer
            format: int32
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/RuleEngineDtoPagedResultDto"
      security:
        - oidc: []
        - Bearer: []
  "/platform/solutions/api/v1/devices/{deviceId}/inputs/data-objects/alert-rules/{ruleId}":
    servers: []
    get:
      tags:
        - ___swagger_4-datapoints_swagger_json_Data Objects
      summary: Get alert rule by ID
      description: "Retrieve detailed information of a specific alert rule.\r

        \r

        **Parameters**\r

        \r

        * `ruleId` (Guid, required): Unique identifier of the alert
        rule. Example: `3f2504e0-4f89-11d3-9a0c-0305e82c3301`\r

        \r

        **Responses**\r

        \r

        * `200 OK`: returns the specified alert rule.\r

        \r

        **Security**\r

        \r

        * This API requires authentication."
      parameters:
        - name: deviceId
          in: path
          description: "Define which device's rule will be query. Example: 9F75ABDA56C3"
          required: true
          schema:
            type: string
        - name: ruleId
          in: path
          description: "Alert rule unique identifier. Example:
            3f2504e0-4f89-11d3-9a0c-0305e82c3301"
          required: true
          schema:
            type: string
            format: uuid
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/RuleEngineDto"
      security:
        - oidc: []
        - Bearer: []
    patch:
      tags:
        - ___swagger_4-datapoints_swagger_json_Data Objects
      summary: Update alert rule
      description: "Update an existing alert rule.\r

        \r

        **Parameters**\r

        \r

        * `ruleId` (Guid, required): Unique identifier of the alert
        rule. Example: `3f2504e0-4f89-11d3-9a0c-0305e82c3301`  \r

        * `request` (body, required): The request payload containing
        updated rule details.\r

        \r

        **Responses**\r

        \r

        * `200 OK`: returns the updated alert rule.\r

        \r

        **Security**\r

        \r

        * This API requires authentication."
      parameters:
        - name: deviceId
          in: path
          description: "Define which device's rule to be update. Example: 9F75ABDA56C3"
          required: true
          schema:
            type: string
        - name: ruleId
          in: path
          description: "Alert rule unique identifier. Example:
            3f2504e0-4f89-11d3-9a0c-0305e82c3301"
          required: true
          schema:
            type: string
            format: uuid
      requestBody:
        description: Alert rule update request
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/RuleEngineReplaceRequest"
            example:
              alertLevel: ">=70"
              alertResetLevel: <=50
              delay: 5
          text/json:
            schema:
              $ref: "#/components/schemas/RuleEngineReplaceRequest"
            example:
              alertLevel: ">=70"
              alertResetLevel: <=50
              delay: 5
          application/*+json:
            schema:
              $ref: "#/components/schemas/RuleEngineReplaceRequest"
            example:
              alertLevel: ">=70"
              alertResetLevel: <=50
              delay: 5
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/RuleEngineDto"
      security:
        - oidc: []
        - Bearer: []
    delete:
      tags:
        - ___swagger_4-datapoints_swagger_json_Data Objects
      summary: Delete alert rule
      description: "Delete an alert rule by its ID.\r

        \r

        **Parameters**\r

        \r

        * `ruleId` (Guid, required): Unique identifier of the alert
        rule. Example: `3f2504e0-4f89-11d3-9a0c-0305e82c3301`\r

        \r

        **Responses**\r

        \r

        * `204 No Content`: indicates the rule was successfully
        deleted.\r

        \r

        **Security**\r

        \r

        * This API requires authentication."
      parameters:
        - name: deviceId
          in: path
          description: "Define which device's rule will be update. Example: 9F75ABDA56C3"
          required: true
          schema:
            type: string
        - name: ruleId
          in: path
          description: "Alert rule unique identifier. Example:
            `3f2504e0-4f89-11d3-9a0c-0305e82c3301"
          required: true
          schema:
            type: string
            format: uuid
      responses:
        "204":
          description: No Content
      security:
        - oidc: []
        - Bearer: []
  "/platform/solutions/api/v1/devices/{deviceId}/inputs/data-objects/alert-rules/{ruleId}/status":
    servers: []
    put:
      tags:
        - ___swagger_4-datapoints_swagger_json_Data Objects
      summary: Update alert rule status
      description: "Enable or disable an existing alert rule.\r

        \r

        **Parameters**\r

        \r

        * `ruleId` (Guid, required): Unique identifier of the alert
        rule. Example: `3f2504e0-4f89-11d3-9a0c-0305e82c3301`  \r

        * `request` (body, required): The request payload to update the
        rule status.\r

        \r

        **Responses**\r

        \r

        * `200 OK`: returns the alert rule with updated status.\r

        \r

        **Security**\r

        \r

        * This API requires authentication."
      parameters:
        - name: deviceId
          in: path
          description: "Define which device's rule will be update. Example: 9F75ABDA56C3"
          required: true
          schema:
            type: string
        - name: ruleId
          in: path
          description: "Alert rule unique identifier. Example:
            3f2504e0-4f89-11d3-9a0c-0305e82c3301"
          required: true
          schema:
            type: string
            format: uuid
      requestBody:
        description: Alert rule status update request
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/RuleEngineReplaceStatusRequest"
          text/json:
            schema:
              $ref: "#/components/schemas/RuleEngineReplaceStatusRequest"
          application/*+json:
            schema:
              $ref: "#/components/schemas/RuleEngineReplaceStatusRequest"
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/RuleEngineDto"
      security:
        - oidc: []
        - Bearer: []
  "/platform/solutions/api/v1/devices/{deviceId}/inputs/data-objects":
    servers: []
    get:
      tags:
        - ___swagger_4-datapoints_swagger_json_Data Objects
      summary: Get paginated telemetry results of time range
      description: "Retrieve telemetry records for a device within a specific time
        range, returned in paginated format.\r

        \r

        **Parameters**\r

        \r

        * `deviceId` (string, required): MAC address of the device.
        Example: `74fe488d5d35`  \r

        * `start` (DateTime, required): Start datetime of the query
        range. Example: `2025-09-01T00:00:00Z`  \r

        * `end` (DateTime, required): End datetime of the query range.
        Example: `2025-09-02T00:00:00Z`  \r

        * `pagedResult` (PagedResultRequestDto, optional): Pagination
        info (skipCount, maxResultCount)\r

        \r

        **Responses**\r

        \r

        * `200 OK`: returns a paginated list of telemetry records.\r

        \r

        **Security**\r

        \r

        * This API requires authentication."
      parameters:
        - name: deviceId
          in: path
          description: "Device mac  \r

            \        Example : 74fe488d5d35"
          required: true
          schema:
            type: string
        - name: start
          in: query
          description: "Start datetime of the query range. Example: 2025-09-01T00:00:00Z"
          required: true
          schema:
            type: string
            format: date-time
        - name: end
          in: query
          description: "End datetime of the query range. Example: 2025-09-02T00:00:00Z"
          required: true
          schema:
            type: string
            format: date-time
        - name: skipCount
          in: query
          schema:
            maximum: 2147483647
            minimum: 0
            type: integer
            format: int32
        - name: maxResultCount
          in: query
          schema:
            maximum: 2147483647
            minimum: 1
            type: integer
            format: int32
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/TelemetryResponseDtoDataObjectsPagedResultDto"
      security:
        - oidc: []
        - Bearer: []
  "/platform/solutions/api/v1/devices/{deviceId}/inputs/data-objects/{dataObjectName}":
    servers: []
    get:
      tags:
        - ___swagger_4-datapoints_swagger_json_Data Objects
      summary: Get paginated dataObject channel results of time range
      description: "Retrieve telemetry records of a specific dataObject channel for a
        device, returned in paginated format.\r

        \r

        **Parameters**\r

        \r

        * `deviceId` (string, required): MAC address of the device.
        Example: `74fe488d5d35`  \r

        * `dataObjectName` (string, required): dataObject channel name.
        Example: `voltage`  \r

        * `start` (DateTime, required): Start datetime of the query
        range. Example: `2025-09-01T00:00:00Z`  \r

        * `end` (DateTime, required): End datetime of the query range.
        Example: `2025-09-02T00:00:00Z`  \r

        * `pagedResult` (PagedResultRequestDto, optional): Pagination
        info\r

        \r

        **Responses**\r

        \r

        * `200 OK`: returns a paginated list of telemetry records for
        the channel.\r

        \r

        **Security**\r

        \r

        * This API requires authentication."
      parameters:
        - name: deviceId
          in: path
          description: "Device mac  \r

            \        Example : 74fe488d5d35"
          required: true
          schema:
            type: string
        - name: dataObjectName
          in: path
          description: "dataObject channel name. Example: voltage"
          required: true
          schema:
            type: string
        - name: start
          in: query
          description: "Start datetime of the query range. Example: 2025-09-01T00:00:00Z"
          required: true
          schema:
            type: string
            format: date-time
        - name: end
          in: query
          description: "End datetime of the query range. Example: 2025-09-02T00:00:00Z"
          required: true
          schema:
            type: string
            format: date-time
        - name: skipCount
          in: query
          schema:
            maximum: 2147483647
            minimum: 0
            type: integer
            format: int32
        - name: maxResultCount
          in: query
          schema:
            maximum: 2147483647
            minimum: 1
            type: integer
            format: int32
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/TelemetryResponseDtoDataObjectsPagedResultDto"
      security:
        - oidc: []
        - Bearer: []
  "/platform/solutions/api/v1/devices/{deviceId}/inputs/data-objects/latest":
    servers: []
    get:
      tags:
        - ___swagger_4-datapoints_swagger_json_Data Objects
      summary: Get device latest telemetry snapshot
      description: "Retrieve the latest snapshot of all telemetry data of a device,
        including online status and last dataObject values.\r

        \r

        **Parameters**\r

        \r

        * `deviceId` (string, required): MAC address of the device.
        Example: `74fe488d5d35`  \r

        * `dataObjectName` (string, optional): Filter by dataObject
        channel name. Example: `temperature`\r

        \r

        **Responses**\r

        \r

        * `200 OK`: returns the latest snapshot of all telemetry
        records.\r

        \r

        **Security**\r

        \r

        * This API requires authentication."
      parameters:
        - name: deviceId
          in: path
          description: "Device mac  \r

            \        Example : 74fe488d5d35"
          required: true
          schema:
            type: string
        - name: channel
          in: query
          description: "dataObject name. Example : temperature"
          schema:
            type: string
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/TelemetryResponseDtoDataObjects"
        "204":
          description: No Content
      security:
        - oidc: []
        - Bearer: []
components:
  schemas:
    AppUserDisplayDto:
      type: object
      properties:
        userId:
          type: string
          description: User's id
          nullable: true
        name:
          type: string
          description: User's name
          nullable: true
        email:
          type: string
          description: User's email address
          nullable: true
        role:
          type: string
          description: User role in the current system
          nullable: true
      additionalProperties: false
    AppUserDisplayDtoPagedResultDto:
      type: object
      properties:
        items:
          type: array
          items:
            $ref: "#/components/schemas/AppUserDisplayDto"
          nullable: true
        totalCount:
          type: integer
          format: int64
      additionalProperties: false
    AppUserDto:
      type: object
      properties:
        id:
          type: string
          format: uuid
        name:
          type: string
          description: User's name
          nullable: true
        email:
          type: string
          description: User's email address
          nullable: true
        authUserId:
          type: string
          description: External authentication service user ID
          nullable: true
        authRole:
          type: string
          description: External authentication service role
          nullable: true
        role:
          type: string
          description: User role in the current system
          nullable: true
      additionalProperties: false
    CreateUpdateOrgDto:
      required:
        - name
      type: object
      properties:
        name:
          maxLength: 100
          minLength: 0
          type: string
          description: |-
            Organization's name.  
                    Example : MainOrg
        parentOrgId:
          type: string
          description: |-2
            
                    Parent organization ID, if applicable  
                    Example : 783707f1-0659-4892-a872-8f506d225d7b
          nullable: true
      additionalProperties: false
    CreateUpdateOrgUserDtoNoOrg:
      required:
        - orgRole
        - userId
      type: object
      properties:
        userId:
          minLength: 1
          type: string
          description: "The ID of the user to be added to the organization. Example :
            783707f1-0659-4892-a872-8f506d225d7b"
        orgRole:
          $ref: "#/components/schemas/OrgUserRole"
      additionalProperties: false
    OrgDto:
      type: object
      properties:
        name:
          type: string
          description: Organization's name
          nullable: true
        orgId:
          type: string
          description: Organization's unique identifier
          format: uuid
        parentOrgId:
          type: string
          description: Parent organization ID, if applicable
          format: uuid
          nullable: true
      additionalProperties: false
    OrgDtoPagedResultDto:
      type: object
      properties:
        items:
          type: array
          items:
            $ref: "#/components/schemas/OrgDto"
          nullable: true
        totalCount:
          type: integer
          format: int64
      additionalProperties: false
    OrgTreeDto:
      type: object
      properties:
        orgId:
          type: string
          description: Organization's unique identifier
          format: uuid
        name:
          type: string
          description: Organization's name
          nullable: true
        parentOrgId:
          type: string
          description: Parent organization ID, if applicable
          format: uuid
          nullable: true
        children:
          type: array
          items:
            $ref: "#/components/schemas/OrgTreeDto"
          description: Child organizations under this organization
          nullable: true
      additionalProperties: false
    OrgUserDeskDto:
      required:
        - orgId
        - userId
      type: object
      properties:
        userId:
          type: string
          description: The ID of the user to be added to the organization
          nullable: true
        orgRole:
          $ref: "#/components/schemas/OrgUserRole"
        name:
          type: string
          description: User's name
          nullable: true
        email:
          type: string
          description: User's email address
          nullable: true
        role:
          type: string
          description: User's role
          nullable: true
        orgId:
          type: string
          description: The ID of the organization
          nullable: true
      additionalProperties: false
    OrgUserDeskDtoPagedResultDto:
      type: object
      properties:
        items:
          type: array
          items:
            $ref: "#/components/schemas/OrgUserDeskDto"
          nullable: true
        totalCount:
          type: integer
          format: int64
      additionalProperties: false
    OrgUserRole:
      enum:
        - super_admin
        - admin
        - operator_
        - viewer
      type: string
    RemoteServiceErrorInfo:
      type: object
      properties:
        code:
          type: string
          nullable: true
        message:
          type: string
          nullable: true
        details:
          type: string
          nullable: true
        data:
          type: object
          additionalProperties: {}
          nullable: true
        validationErrors:
          type: array
          items:
            $ref: "#/components/schemas/RemoteServiceValidationErrorInfo"
          nullable: true
      additionalProperties: false
    RemoteServiceErrorResponse:
      type: object
      properties:
        error:
          $ref: "#/components/schemas/RemoteServiceErrorInfo"
      additionalProperties: false
    RemoteServiceValidationErrorInfo:
      type: object
      properties:
        message:
          type: string
          nullable: true
        members:
          type: array
          items:
            type: string
          nullable: true
      additionalProperties: false
    ServiceRoleDto:
      type: object
      properties:
        service:
          type: string
          description: The name of the service
          nullable: true
        serviceRole:
          type: string
          description: The user's role within the service
          nullable: true
      additionalProperties: false
    TokenBodyDto:
      type: object
      properties:
        token:
          type: string
          nullable: true
        refreshToken:
          type: string
          nullable: true
      additionalProperties: false
    TokenResultDto:
      type: object
      properties:
        accessToken:
          type: string
          nullable: true
        refreshToken:
          type: string
          nullable: true
        expiresIn:
          type: integer
          format: int32
        tokenType:
          type: string
          nullable: true
      additionalProperties: false
    UpdateOrgUserByKeyDtoNoId:
      required:
        - orgRole
      type: object
      properties:
        orgRole:
          $ref: "#/components/schemas/OrgUserRole"
      additionalProperties: false
    UserOrgWithRolesDto:
      type: object
      properties:
        orgId:
          type: string
          description: The ID of the organization
          format: uuid
        orgName:
          type: string
          description: Organization's name
          nullable: true
        orgRole:
          $ref: "#/components/schemas/OrgUserRole"
        serviceRoles:
          type: array
          items:
            $ref: "#/components/schemas/ServiceRoleDto"
          description: List of service roles assigned to the user in this organization
          nullable: true
      additionalProperties: false
    AuthInfoType:
      enum:
        - NATS
      type: string
    BatchActionDto:
      required:
        - deviceId
        - taskId
      type: object
      properties:
        deviceId:
          minLength: 1
          type: string
        taskId:
          type: string
          format: uuid
      additionalProperties: false
    BatchActionLogDto:
      type: object
      properties:
        batchId:
          type: string
          description: Batch configuration id
          format: uuid
        taskId:
          type: string
          description: Task configuration id
          format: uuid
        deviceId:
          type: string
          description: Batch related device mac
          nullable: true
        sendTime:
          type: string
          description: Batch action send time
          format: date-time
        sendSuccess:
          type: boolean
          description: Batch execute result success or failed
        sendResultMessage:
          type: string
          description: Batch execute result message
          nullable: true
        executionResultId:
          type: string
          description: Batch execute result id
          nullable: true
        triggerId:
          type: string
          format: uuid
          nullable: true
        triggeredBy:
          type: string
          nullable: true
      additionalProperties: false
      description: Batch log data transfer object
    BatchDevicesDto:
      type: object
      properties:
        deviceIds:
          type: array
          items:
            type: string
          nullable: true
      additionalProperties: false
    BatchDto:
      required:
        - cronExpression
      type: object
      properties:
        batchId:
          type: string
          format: uuid
        name:
          type: string
          description: Batch name
          nullable: true
        orgId:
          type: string
          nullable: true
        cronExpression:
          type: string
          description: Batch executed cron expression
          nullable: true
        isEnabled:
          type: boolean
          description: Batch enabled
        runOnStartup:
          type: boolean
          description: Batch run on service startup
        actions:
          type: array
          items:
            $ref: "#/components/schemas/BatchActionDto"
          description: Batch execute actions
          nullable: true
      additionalProperties: false
      description: Batch configuration
    BatchDtoPagedResultDto:
      type: object
      properties:
        items:
          type: array
          items:
            $ref: "#/components/schemas/BatchDto"
          nullable: true
        totalCount:
          type: integer
          format: int64
      additionalProperties: false
    BatchResultGroupby:
      enum:
        - Trigger
      type: string
    BatchTriggerDto:
      type: object
      properties:
        triggerId:
          type: string
          format: uuid
          nullable: true
      additionalProperties: false
    BatchTriggerListResponseDto:
      type: object
      properties:
        triggerIds:
          type: array
          items:
            type: string
            format: uuid
          description: List of trigger IDs for the batch
          nullable: true
      additionalProperties: false
    CapabilityDto:
      type: object
      properties:
        dtmi:
          type: string
          nullable: true
        name:
          type: string
          nullable: true
        resourceId:
          type: string
          nullable: true
        resourceShortId:
          type: string
          nullable: true
        deviceResourceId:
          type: string
          nullable: true
        enabled:
          type: boolean
        interval:
          type: integer
          format: int64
      additionalProperties: false
    CapabilityUpdateDto:
      required:
        - enabled
        - resourceId
      type: object
      properties:
        resourceId:
          type: string
          description: Telemetry resource id
          nullable: true
        enabled:
          type: boolean
          description: Telemetry switch on/off
        interval:
          type: integer
          description: Sensors' realtime reporting period from Device to Backend service.
            in milliseconds
          format: int64
          nullable: true
      additionalProperties: false
    CapabilityUpdateDtoContentJson:
      type: object
      properties:
        allInterval:
          type: integer
          description: All telemetry upload interval(milliseconds) setting
          format: int64
          nullable: true
        sensors:
          type: array
          items:
            $ref: "#/components/schemas/CapabilityUpdateDto"
          description: Telemetries settings
          nullable: true
      additionalProperties: false
    CapabilityUpdateDtoContentJsonErrorOr:
      $ref: "#/components/schemas/CapabilityUpdateDtoContentJson"
    CreateBatchActionDto:
      required:
        - deviceId
        - taskId
      type: object
      properties:
        deviceId:
          minLength: 1
          type: string
        taskId:
          type: string
          format: uuid
      additionalProperties: false
    CreateUpdateBatchByOrgIdDto:
      required:
        - cronExpression
        - isEnabled
        - name
      type: object
      properties:
        name:
          maxLength: 100
          minLength: 1
          type: string
        cronExpression:
          minLength: 1
          type: string
        isEnabled:
          type: boolean
        runOnStartup:
          type: boolean
          nullable: true
        actions:
          type: array
          items:
            $ref: "#/components/schemas/CreateBatchActionDto"
          nullable: true
      additionalProperties: false
    CreateUpdateDeviceTaskByOrgIdDto:
      required:
        - name
      type: object
      properties:
        name:
          maxLength: 100
          minLength: 1
          type: string
        cmd:
          type: string
          description: Command will be executed
          nullable: true
        payload:
          type: string
          description: Variables in payload
          nullable: true
      additionalProperties: false
    DeviceCustomInfoPatchDto:
      type: object
      properties:
        value:
          type: string
          nullable: true
      additionalProperties: false
    DeviceTaskDto:
      type: object
      properties:
        taskId:
          type: string
          description: ID
          format: uuid
        name:
          type: string
          description: Task name
          nullable: true
        orgId:
          type: string
          nullable: true
        cmd:
          type: string
          description: Command will be executed
          nullable: true
        payload:
          type: string
          description: Variables in payload
          nullable: true
      additionalProperties: false
      description: Task setting
    DeviceTaskDtoPagedResultDto:
      type: object
      properties:
        items:
          type: array
          items:
            $ref: "#/components/schemas/DeviceTaskDto"
          nullable: true
        totalCount:
          type: integer
          format: int64
      additionalProperties: false
    EdgeSyncDeviceCreateDto:
      required:
        - deviceId
        - hwModel
      type: object
      properties:
        deviceId:
          type: string
          description: Device UID
          nullable: true
        hwModel:
          type: string
          description: Device hardware model
          nullable: true
      additionalProperties: false
      description: Device data transfer object
    EdgeSyncDeviceCreateRequestDto:
      required:
        - deviceId
        - hwModel
      type: object
      properties:
        deviceId:
          minLength: 1
          type: string
          description: Device mac
        hwModel:
          minLength: 1
          type: string
          description: Device hardware model
        orgId:
          type: string
          description: Device belongs to which organization ID
          nullable: true
      additionalProperties: false
      description: Create device payload
    EdgeSyncDeviceDto:
      required:
        - deviceId
        - hwModel
        - orgId
      type: object
      properties:
        deviceId:
          type: string
          description: Device id
          nullable: true
        hwModel:
          type: string
          description: Device hardware model
          nullable: true
        orgId:
          type: string
          description: Organization id
          nullable: true
        status:
          type: string
          description: Device current status.
          nullable: true
      additionalProperties: false
      description: Device data transfer object
    EdgeSyncDeviceGetResponseDto:
      required:
        - deviceId
        - hwModel
      type: object
      properties:
        deviceId:
          type: string
          description: Device id
          nullable: true
        hwModel:
          type: string
          description: Device hardware model
          nullable: true
        orgId:
          type: string
          description: Org id
          nullable: true
        status:
          type: string
          description: Device current status.
          nullable: true
      additionalProperties: false
      description: Device data transfer object
    EdgeSyncDeviceGetResponseDtoPagedResultDto:
      type: object
      properties:
        items:
          type: array
          items:
            $ref: "#/components/schemas/EdgeSyncDeviceGetResponseDto"
          nullable: true
        totalCount:
          type: integer
          format: int64
      additionalProperties: false
    EdgeSyncDeviceUpdateRequestDto:
      type: object
      additionalProperties: {}
      description: Payload to update device
    EdgeSyncDeviceUpdateResponseDto:
      required:
        - hwModel
      type: object
      properties:
        deviceId:
          type: string
          description: Device id
          nullable: true
        orgId:
          type: string
          description: Org id
          nullable: true
        hwModel:
          type: string
          description: Device hardware model
          nullable: true
        status:
          type: string
          description: Device current status.
          nullable: true
      additionalProperties: false
      description: Device data transfer object
    EdgeSyncDeviceUpdateResponseDtoErrorOr:
      $ref: "#/components/schemas/EdgeSyncDeviceUpdateResponseDto"
    EdgeSyncDeviceUpdateStatusRequestDto:
      required:
        - status
      type: object
      properties:
        status:
          type: string
          nullable: true
      additionalProperties: false
      description: Payload to update device
    Error:
      type: object
      properties:
        code:
          type: string
          nullable: true
          readOnly: true
        description:
          type: string
          nullable: true
          readOnly: true
        type:
          $ref: "#/components/schemas/ErrorType"
        numericType:
          type: integer
          format: int32
          readOnly: true
        metadata:
          type: object
          additionalProperties: {}
          nullable: true
          readOnly: true
      additionalProperties: false
    ErrorType:
      enum:
        - Failure
        - Unexpected
        - Validation
        - Conflict
        - NotFound
        - Unauthorized
        - Forbidden
      type: string
    GroupCondition:
      enum:
        - Miscellaneous
      type: string
    IRemoteStreamContentErrorOr:
      type: string
      additionalProperties: false
      format: binary
    ProblemDetails:
      type: object
      properties:
        type:
          type: string
          nullable: true
        title:
          type: string
          nullable: true
        status:
          type: integer
          format: int32
          nullable: true
        detail:
          type: string
          nullable: true
        instance:
          type: string
          nullable: true
      additionalProperties: {}
    SystemConfig:
      type: object
      properties:
        id:
          type: string
          nullable: true
        path:
          type: string
          nullable: true
        action:
          type: string
          nullable: true
        format:
          type: string
          nullable: true
        preCmd:
          type: string
          nullable: true
        postCmd:
          type: string
          nullable: true
        version:
          type: integer
          format: int32
          nullable: true
        applyCmd:
          type: string
          nullable: true
        contentJson:
          $ref: "#/components/schemas/CapabilityUpdateDtoContentJson"
      additionalProperties: false
    SystemConfigErrorOr:
      $ref: "#/components/schemas/SystemConfig"
    TriggeredByType:
      enum:
        - Manual
        - Scheduler
      type: string
    UpdateBatchActionsDto:
      required:
        - actions
      type: object
      properties:
        actions:
          type: array
          items:
            $ref: "#/components/schemas/CreateBatchActionDto"
      additionalProperties: false
    UpdateBatchIsEnabledDto:
      type: object
      properties:
        isEnabled:
          type: boolean
          nullable: true
      additionalProperties: false
    EdgeSync.ContainerMgmt.Deployments.Dtos.CreateUpdateStackDeploymentsDto:
      required:
        - deviceIds
      type: object
      properties:
        deviceIds:
          maxItems: 128
          minItems: 1
          type: array
          items:
            type: string
          description: List of device identifiers to deploy the stack to.
      additionalProperties: false
      description: Data transfer object for deploying a container stack to multiple
        devices simultaneously.
    EdgeSync.ContainerMgmt.Deployments.Dtos.StackDeploymentDto:
      type: object
      properties:
        stackRevisionId:
          type: string
          description: Gets or sets the unique identifier for the deployment revision.
          format: uuid
        deploymentId:
          type: string
          description: Gets or sets the unique identifier for the deployment.
          format: uuid
        taskId:
          type: string
          description: Gets or sets the unique identifier for the deployment task.
          format: uuid
        stackName:
          type: string
          description: Gets or sets the name of the stack being deployed.
          nullable: true
        deviceId:
          type: string
          description: Gets or sets the identifier of the target device for deployment.
          nullable: true
        status:
          type: string
          description: Gets or sets the current deployment status. Default value is
            "deploying".
          nullable: true
        containers:
          type: array
          items:
            $ref: "#/components/schemas/EdgeSync.ContainerMgmt.Stacks.Dtos.ContainerDto"
          description: Gets or sets the collection of containers that are part of this
            stack deployment.
          nullable: true
        error:
          type: object
          additionalProperties: {}
          description: >-
            Gets or sets the error information if the deployment encountered any
            issues.

            Contains key-value pairs with error details.
          nullable: true
        active:
          type: boolean
          description: Gets or sets a value indicating whether this deployment is
            currently active.
        creationTime:
          type: string
          format: date-time
      additionalProperties: false
      description: Data Transfer Object representing a stack deployment with its
        associated containers, status, and metadata.
    EdgeSync.ContainerMgmt.Deployments.Dtos.StackDeploymentsDto:
      type: object
      properties:
        stackDeployments:
          type: array
          items:
            $ref: "#/components/schemas/EdgeSync.ContainerMgmt.Deployments.Dtos.StackDeploy\
              mentDto"
          description: The list of individual stack deployments.
          nullable: true
        totalDevices:
          type: integer
          description: The total number of devices involved in the deployment process.
          format: int32
        skippedDevices:
          type: integer
          description: The number of devices that were skipped during deployment.
          format: int32
        newlyDeployedDevices:
          type: integer
          description: The number of devices that received new deployments.
          format: int32
        deviceActions:
          type: object
          additionalProperties:
            type: string
          description: >-
            A dictionary that maps each device ID to its corresponding action
            (skip/update/add).

            The key is the device ID and the value is the action performed on that device.
          nullable: true
      additionalProperties: false
      description: >-
        Data Transfer Object representing a collection of stack deployments with
        deployment statistics and device action mappings.

        Provides an overview of multiple stack deployments across different devices.
    EdgeSync.ContainerMgmt.Deployments.ExampleDtos.UnployDeploymentsSuccessReponseExample:
      type: object
      additionalProperties: false
    EdgeSync.ContainerMgmt.Registries.Dtos.AWSECRCredentials:
      type: object
      properties:
        accessKey:
          type: string
          description: AWS ECR access key.
          nullable: true
        accessSecretKey:
          type: string
          description: AWS ECR access secret key.
          nullable: true
        region:
          type: string
          description: AWS ECR region.
          nullable: true
      additionalProperties: false
    EdgeSync.ContainerMgmt.Registries.Dtos.AWSECREncryptedCredentials:
      type: object
      properties:
        registryType:
          type: string
          description: Type of the registry.
          nullable: true
        encryptedAccessKey:
          type: string
          description: Encrypted AWS ECR access key.
          nullable: true
        encryptedAccessSecretKey:
          type: string
          description: Encrypted AWS ECR access secret key.
          nullable: true
        region:
          type: string
          description: Encrypted AWS ECR region.
          nullable: true
      additionalProperties: false
    EdgeSync.ContainerMgmt.Registries.Dtos.AzureACRCredentials:
      required:
        - username
        - userPassword
      type: object
      properties:
        username:
          minLength: 1
          type: string
          description: Azure ACR username.
          default: ""
        userPassword:
          minLength: 1
          type: string
          description: Azure ACR password.
          default: ""
      additionalProperties: false
    EdgeSync.ContainerMgmt.Registries.Dtos.AzureACREncryptedCredentials:
      type: object
      properties:
        registryType:
          type: string
          description: Type of the registry.
          nullable: true
        username:
          type: string
          description: Azure ACR username.
          nullable: true
        encryptedUserPassword:
          type: string
          description: Encrypted Azure ACR password.
          nullable: true
      additionalProperties: false
    EdgeSync.ContainerMgmt.Registries.Dtos.CreateRegistryDto:
      required:
        - registryCredentials
        - registryName
        - registryUrl
      type: object
      properties:
        registryName:
          maxLength: 32
          minLength: 0
          type: string
          description: Name of the registry. Must be unique within the organization.
          default: harbor-ecr-sync
        registryUrl:
          minLength: 1
          type: string
          description: URL of the container registry.
          format: uri
          default: https://registry.dev.company.com
        registryCredentials:
          $ref: "#/components/schemas/EdgeSync.ContainerMgmt.Registries.Dtos.RegistryCred\
            entials"
      additionalProperties: false
      description: Data transfer object for creating a new container registry configuration.
    EdgeSync.ContainerMgmt.Registries.Dtos.CustomCredentials:
      required:
        - username
        - userPassword
      type: object
      properties:
        username:
          minLength: 1
          type: string
          description: Username.
          default: ""
        userPassword:
          minLength: 1
          type: string
          description: Password.
          default: ""
      additionalProperties: false
    EdgeSync.ContainerMgmt.Registries.Dtos.CustomEncryptedCredentials:
      type: object
      properties:
        registryType:
          type: string
          description: Type of the registry.
          nullable: true
        username:
          type: string
          description: Username.
          default: ""
          nullable: true
        encryptedUserPassword:
          type: string
          description: Encrypted Password.
          nullable: true
      additionalProperties: false
    EdgeSync.ContainerMgmt.Registries.Dtos.DockerHubCredentials:
      required:
        - accessToken
        - username
      type: object
      properties:
        username:
          minLength: 1
          type: string
          description: DockerHub username.
          default: ""
        accessToken:
          minLength: 1
          type: string
          description: DockerHub access token.
          default: ""
      additionalProperties: false
    EdgeSync.ContainerMgmt.Registries.Dtos.DockerHubEncryptedCredentials:
      type: object
      properties:
        registryType:
          type: string
          description: Type of the registry.
          nullable: true
        username:
          type: string
          description: DockerHub username.
          nullable: true
        encryptedAccessToken:
          type: string
          description: Encrypted DockerHub access token.
          nullable: true
      additionalProperties: false
    EdgeSync.ContainerMgmt.Registries.Dtos.EncryptedCredentials:
      oneOf:
        - $ref: "#/components/schemas/EdgeSync.ContainerMgmt.Registries.Dtos.DockerHubEnc\
            ryptedCredentials"
        - $ref: "#/components/schemas/EdgeSync.ContainerMgmt.Registries.Dtos.AWSECREncryp\
            tedCredentials"
        - $ref: "#/components/schemas/EdgeSync.ContainerMgmt.Registries.Dtos.AzureACREncr\
            yptedCredentials"
        - $ref: "#/components/schemas/EdgeSync.ContainerMgmt.Registries.Dtos.CustomEncryp\
            tedCredentials"
      additionalProperties: false
    EdgeSync.ContainerMgmt.Registries.Dtos.RegistryCredentials:
      oneOf:
        - $ref: "#/components/schemas/EdgeSync.ContainerMgmt.Registries.Dtos.DockerHubCre\
            dentials"
        - $ref: "#/components/schemas/EdgeSync.ContainerMgmt.Registries.Dtos.AWSECRCreden\
            tials"
        - $ref: "#/components/schemas/EdgeSync.ContainerMgmt.Registries.Dtos.AzureACRCred\
            entials"
        - $ref: "#/components/schemas/EdgeSync.ContainerMgmt.Registries.Dtos.CustomCreden\
            tials"
      additionalProperties: false
    EdgeSync.ContainerMgmt.Registries.Dtos.RegistryDto:
      type: object
      properties:
        registryId:
          type: string
          description: Identifier of the registry.
          format: uuid
        registryName:
          type: string
          description: Name of the registry. Must be unique within the organization.
          nullable: true
        registryUrl:
          type: string
          description: URL of the container registry.
          nullable: true
        creationTime:
          type: string
          description: The creation time of the registry.
          format: date-time
        registryEncryptedCredentials:
          $ref: "#/components/schemas/EdgeSync.ContainerMgmt.Registries.Dtos.EncryptedCre\
            dentials"
      additionalProperties: false
      description: Data transfer object representing a container registry configuration.
    EdgeSync.ContainerMgmt.Registries.Dtos.UpdateRegistryDto:
      required:
        - registryName
        - registryUrl
      type: object
      properties:
        registryName:
          maxLength: 32
          minLength: 0
          type: string
          description: Name of the registry. Must be unique within the organization.
        registryUrl:
          minLength: 1
          type: string
          description: URL of the container registry.
          format: uri
        registryCredentials:
          $ref: "#/components/schemas/EdgeSync.ContainerMgmt.Registries.Dtos.RegistryCred\
            entials"
      additionalProperties: false
      description: Data transfer object for updating an existing container registry
        configuration.
    EdgeSync.ContainerMgmt.Registries.Example.DeleteRegistrySuccessReponseExample:
      type: object
      additionalProperties: false
    EdgeSync.ContainerMgmt.Stacks.Dtos.ContainerDto:
      type: object
      properties:
        id:
          type: string
          description: Unique identifier for the container, typically the Docker container
            ID.
          nullable: true
        name:
          type: string
          description: Name of the container as defined in the Docker Compose file.
          nullable: true
        state:
          type: string
          description: Current state of the container (e.g., "running", "stopped", "error").
          nullable: true
        restartCount:
          type: integer
          description: Number of times the container has been restarted.
          format: int32
        created:
          type: integer
          description: Unix timestamp when the container was created.
          format: int64
        errors:
          type: array
          items:
            $ref: "#/components/schemas/EdgeSync.ContainerMgmt.Stacks.Dtos.ContainerErrorDt\
              o"
          description: Error information if the container is in an error state.
          nullable: true
      additionalProperties: false
      description: >-
        Data transfer object representing a single container within a stack.

        Contains runtime information about a deployed container's current state and configuration.
    EdgeSync.ContainerMgmt.Stacks.Dtos.ContainerErrorDto:
      type: object
      properties:
        code:
          type: string
          description: Error code identifying the type of error.
          nullable: true
        message:
          type: string
          description: Human-readable error message describing the issue.
          nullable: true
        timestamp:
          type: integer
          description: ISO 8601 timestamp when the error occurred.
          format: int64
        details:
          type: object
          additionalProperties: {}
          description: Additional error details and context information.
          nullable: true
      additionalProperties: false
      description: >-
        Data transfer object representing error information for a container.

        Provides structured error details to help with troubleshooting and monitoring container issues.
    EdgeSync.ContainerMgmt.Stacks.Dtos.ContainerStackDto:
      type: object
      properties:
        stackConfigId:
          type: string
          description: An unique ID for the stack configuration.
          format: uuid
        stackRevisionId:
          type: string
          description: Unique identifier for this specific stack version.
          format: uuid
        stackName:
          type: string
          description: Name of the container stack. Must be unique across all versions.
          nullable: true
        type:
          type: string
          description: Type of the container stack (e.g., "compose" for Docker Compose).
          nullable: true
        composeFileContent:
          type: string
          description: Base64 encoded Docker Compose file content.
          nullable: true
        environment:
          type: object
          additionalProperties: {}
          description: Environment variables and configuration parameters for the stack.
          nullable: true
        description:
          type: string
          description: Description of the container stack.
          nullable: true
        creationTime:
          type: string
          description: The creation time of the container stack.
          format: date-time
      additionalProperties: false
      description: >-
        Data transfer object representing a container stack with its
        configuration and runtime information.

        Used for transferring stack data between API endpoints and client applications.
    EdgeSync.ContainerMgmt.Stacks.Dtos.CreateContainerStackDto:
      required:
        - composeFileContent
        - stackName
        - type
      type: object
      properties:
        stackName:
          maxLength: 63
          minLength: 1
          type: string
          description: Name of the container stack to create.
          default: my-first-stack
        type:
          minLength: 1
          type: string
          description: |-
            Type of the container stack deployment.
            value : compose
          default: compose
        composeFileContent:
          minLength: 1
          type: string
          description: Base64 encoded Docker Compose file content.
          default: dmVyc2lvbjogIjMuOCIKc2VydmljZXM6CiAgbmdpbng6CiAgICBpbWFnZTogbmdpbng6bGF0ZXN0CiAgICBwb3J0czoKICAgICAgLSAiODA6ODAiCiAgICB2b2x1bWVzOgogICAgICAtIC4vaHRtbDovdXNyL3NoYXJlL25naW54L2h0bWw=
        environment:
          type: object
          additionalProperties: {}
          description: Environment variables and configuration parameters for the stack.
          nullable: true
        description:
          type: string
          description: Description of the container stack.
          nullable: true
      additionalProperties: false
      description: Data transfer object for creating a new container stack.
    EdgeSync.ContainerMgmt.Stacks.Dtos.UpdateStackDto:
      type: object
      properties:
        composeFileContent:
          type: string
          description: Base64 encoded Docker Compose file content for the new version.
          default: c2VydmljZXM6CiAgdGVzdDoKICAgIGltYWdlOiB0ZXN0
          nullable: true
        environment:
          type: object
          additionalProperties: {}
          description: Environment variables and configuration parameters for the new
            stack version.
          nullable: true
        description:
          type: string
          description: Description of the container stack.
          nullable: true
      additionalProperties: false
      description: Data transfer object for updating an existing container stack by
        creating a new version.
    EdgeSync.ContainerMgmt.SystemCommands.Dtos.CommandExecutionResultCacheDto:
      type: object
      properties:
        deviceId:
          type: string
          description: The unique identifier of the device that executed the command.
          nullable: true
        seqId:
          type: integer
          description: Sequential identifier of the original command request that was
            executed.
          format: int64
        reqSeqId:
          type: string
          description: Unique request sequence identifier from the original command for
            correlation.
          nullable: true
        rspSeqId:
          type: string
          description: Unique response sequence identifier generated by the device for
            this execution result.
          nullable: true
        cmd:
          type: string
          description: The command type identifier. Default value is "deviceCmd" for
            device commands.
          nullable: true
        data:
          $ref: "#/components/schemas/EdgeSync.ContainerMgmt.SystemCommands.Dtos.CommandE\
            xecutionResultDataCacheDto"
      additionalProperties: false
      description: >-
        Data transfer object representing the cached result of a command
        execution on an edge device.

        Contains both the command metadata and execution result data for tracking and correlation purposes.
    EdgeSync.ContainerMgmt.SystemCommands.Dtos.CommandExecutionResultDataCacheDto:
      type: object
      properties:
        deviceCmd:
          type: string
          description: >-
            The specific device command that was executed.

            Possible values include: stack, stack.start, stack.stop, stack.restart, stack.pause, stack.resume
          nullable: true
        status:
          type: integer
          description: >-
            The execution status code indicating success or failure.

            Typically follows HTTP status code conventions (e.g., 200 for success, 400+ for errors).
          format: int32
        message:
          type: string
          description: Human-readable message describing the execution result, error
            details, or status information.
          nullable: true
        resultData:
          type: object
          additionalProperties: {}
          description: >-
            Additional result data produced by the command execution, such as
            container states,

            stack information, or error details in key-value format.
          nullable: true
        executedAt:
          type: integer
          description: Unix timestamp in milliseconds indicating when the command
            execution began on the device.
          format: int64
        completedAt:
          type: integer
          description: Unix timestamp in milliseconds indicating when the command
            execution completed on the device.
          format: int64
      additionalProperties: false
      description: >-
        Contains the detailed execution result data for a device command,
        including status,

        timing information, and any result data produced during execution.
    EdgeSync.ContainerMgmt.SystemCommands.Dtos.CommandRequest:
      type: object
      properties:
        stackConfigId:
          type: string
          description: An unique ID for the stack configuration.
          format: uuid
      additionalProperties: false
      description: Represents a command request for container stack operations on edge
        devices.
    EdgeSync.ContainerMgmt.SystemCommands.StackAction:
      enum:
        - start
        - stop
        - pause
        - resume
        - restart
      type: string
    Microsoft.AspNetCore.Mvc.ProblemDetails:
      type: object
      properties:
        type:
          type: string
          nullable: true
        title:
          type: string
          nullable: true
        status:
          type: integer
          format: int32
          nullable: true
        detail:
          type: string
          nullable: true
        instance:
          type: string
          nullable: true
      additionalProperties: {}
    "Volo.Abp.Application.Dtos.PagedResultDto`1[[EdgeSync.ContainerMgmt.Registries.Dtos.RegistryDto, EdgeSync.ContainerMgmt.Application.Contracts, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]]":
      type: object
      properties:
        items:
          type: array
          items:
            $ref: "#/components/schemas/EdgeSync.ContainerMgmt.Registries.Dtos.RegistryDto"
          nullable: true
        totalCount:
          type: integer
          format: int64
      additionalProperties: false
    "Volo.Abp.Application.Dtos.PagedResultDto`1[[EdgeSync.ContainerMgmt.Stacks.Dtos.ContainerStackDto, EdgeSync.ContainerMgmt.Application.Contracts, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]]":
      type: object
      properties:
        items:
          type: array
          items:
            $ref: "#/components/schemas/EdgeSync.ContainerMgmt.Stacks.Dtos.ContainerStackDt\
              o"
          nullable: true
        totalCount:
          type: integer
          format: int64
      additionalProperties: false
    "Volo.Abp.Application.Dtos.PagedResultDto`1[[EdgeSync.ContainerMgmt.SystemCommands.Dtos.CommandExecutionResultCacheDto, EdgeSync.ContainerMgmt.Application.Contracts, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]]":
      type: object
      properties:
        items:
          type: array
          items:
            $ref: "#/components/schemas/EdgeSync.ContainerMgmt.SystemCommands.Dtos.CommandE\
              xecutionResultCacheDto"
          nullable: true
        totalCount:
          type: integer
          format: int64
      additionalProperties: false
    EnabledStatus:
      enum:
        - Enabled
        - Disabled
      type: string
    RuleEngineCreateWithoutDeviceIdRequest:
      required:
        - alertLevel
        - alertResetLevel
        - dataObjectName
        - ruleName
      type: object
      properties:
        ruleName:
          type: string
          description: "Rule name. Ex: First rule"
          nullable: true
        dataObjectName:
          type: string
          description: "Target channel name. Ex: cpuUsage"
          nullable: true
        alertLevel:
          type: string
          description: "Alert event threshold level. Ex: >=70"
          nullable: true
        alertResetLevel:
          type: string
          description: "Alert event reset threshold level. Ex: <70"
          nullable: true
        delay:
          type: integer
          description: "Seconds to delay publish event. Ex: 5"
          format: int64
      additionalProperties: false
      description: Create rule payload
    RuleEngineDto:
      required:
        - alertLevel
        - alertResetLevel
        - dataObjectName
        - ruleName
      type: object
      properties:
        alertRuleId:
          type: string
          description: Rule ID
          format: uuid
        creationTime:
          type: string
          format: date-time
        creatorId:
          type: string
          format: uuid
          nullable: true
        lastModificationTime:
          type: string
          format: date-time
          nullable: true
        lastModifierId:
          type: string
          format: uuid
          nullable: true
        ruleName:
          type: string
          description: Rule name
          nullable: true
        isEnabled:
          type: boolean
          description: Rule enabled/disabled status
        dataObjectName:
          type: string
          description: "Target data object name. Ex: cpuUsage"
          nullable: true
        alertLevel:
          type: string
          description: "Alert event threshold level. Ex: 70"
          nullable: true
        alertResetLevel:
          type: string
          description: "Alert event reset threshold level. Ex: 50"
          nullable: true
        delay:
          type: integer
          description: "Seconds to delay publish event. Ex: 5"
          format: int64
      additionalProperties: false
      description: Rule engine data transfer object
    RuleEngineDtoPagedResultDto:
      type: object
      properties:
        items:
          type: array
          items:
            $ref: "#/components/schemas/RuleEngineDto"
          nullable: true
        totalCount:
          type: integer
          format: int64
      additionalProperties: false
    RuleEngineReplaceRequest:
      type: object
      properties:
        alertLevel:
          type: string
          description: "Alert event threshold level. Ex: >=70"
          nullable: true
        alertResetLevel:
          type: string
          description: "Alert event reset threshold level. Ex: <=50"
          nullable: true
        delay:
          type: integer
          description: "Seconds to delay publish event. Ex: 5"
          format: int64
      additionalProperties: false
      description: Update rule engine payload
    RuleEngineReplaceStatusRequest:
      type: object
      properties:
        isEnabled:
          $ref: "#/components/schemas/EnabledStatus"
      additionalProperties: false
      description: Update rule engine status payload
    TelemetryResponseDtoDataObjects:
      type: object
      properties:
        deviceId:
          type: string
          description: Device ID
          nullable: true
        time:
          type: string
          description: DataObjects timestamp
          format: date-time
        dataObjects:
          type: object
          additionalProperties: {}
          description: DataObjects names and values
          nullable: true
        dataTypes:
          type: array
          items:
            type: string
          description: DataObjects data types
          nullable: true
      additionalProperties: false
      description: Telemetry data.
    TelemetryResponseDtoDataObjectsPagedResultDto:
      type: object
      properties:
        items:
          type: array
          items:
            $ref: "#/components/schemas/TelemetryResponseDtoDataObjects"
          nullable: true
        totalCount:
          type: integer
          format: int64
      additionalProperties: false
  securitySchemes:
    oidc:
      type: openIdConnect
      openIdConnectUrl: http://localhost:44368/.well-known/openid-configuration
    Bearer:
      type: apiKey
      description: "手動輸入 JWT Token，格式: Bearer {your token}"
      name: Authorization
      in: header
x-tagGroups:
  - name: Public APIs
    tags:
      - ___swagger_1-iam_swagger_json_Identity & Access
      - ___swagger_2-device-management_swagger_json_Batch Tasks
      - ___swagger_2-device-management_swagger_json_Devices
      - ___swagger_3-container-management_swagger_json_Container Commands
      - ___swagger_3-container-management_swagger_json_Container Deployments
      - ___swagger_3-container-management_swagger_json_Container Registries
      - ___swagger_3-container-management_swagger_json_Container Stacks
      - ___swagger_4-datapoints_swagger_json_Data Objects
