---
updatedAt: 2026-06-29T11:56:28.000Z
agentTools:
  projectIndex: https://docs.biot-med.com/llms.txt
---

# Stop an existing Usage Session

Stop an existing Usage Session



Path Parameters:

| Parameter   |Type   | Mandatory| Description          | Example   |
|-------------|-------|----------|----------------------|-----------|
|deviceId|string|true|The device ID|device1|
|id|string|true|Usage Session ID|3fa85f64-5717-4562-b3fc-2c963f66afa6|


This API requires **PROTECTED_API** permission(s).



# OpenAPI definition

```json
{
  "openapi": "3.1.0",
  "info": {
    "title": "BioT Organization Service",
    "description": "APIs document (version: 10.12.1)",
    "version": "10.12.1"
  },
  "servers": [
    {
      "url": "/"
    }
  ],
  "paths": {
    "/device/v1/devices/{deviceId}/usage-sessions/{id}/remote-control/stop": {
      "post": {
        "tags": [
          "Usage Session Remote Control API"
        ],
        "summary": "Stop an existing Usage Session",
        "description": "Stop an existing Usage Session\n\n\n\nPath Parameters:\n\n| Parameter   |Type   | Mandatory| Description          | Example   |\n|-------------|-------|----------|----------------------|-----------|\n|deviceId|string|true|The device ID|device1|\n|id|string|true|Usage Session ID|3fa85f64-5717-4562-b3fc-2c963f66afa6|\n\n\nThis API requires **PROTECTED_API** permission(s).\n\n",
        "operationId": "stopSession",
        "parameters": [
          {
            "name": "deviceId",
            "in": "path",
            "description": "The device ID",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "device1"
          },
          {
            "name": "id",
            "in": "path",
            "description": "Usage Session ID",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "example": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
          }
        ],
        "responses": {
          "200": {
            "description": "The below table describes the response parameters:\n\n| Parameter   |Type   |Description          | Example   |\n|-------------|-------|---------------------|-----------|\n|&lt;customAttribute1&gt;|&lt;customAttribute1Type&gt;|Regular custom attribute 1 value||\n|&lt;customAttributeN&gt;|&lt;customAttributeNType&gt;|Regular custom attribute N value||\n|_caption|string|||\n|_configuration|object|An object that holds the entity configuration attributes||\n|_configuration.&lt;customAttribute1&gt;|&lt;customAttribute1Type&gt;|Configuration custom attribute 1 value||\n|_configuration.&lt;customAttributeN&gt;|&lt;customAttributeNType&gt;|Configuration custom attribute N value||\n|_creationTime|string|A UTC date-time in the ISO-8601 format|2007-12-20T10:15:30Z|\n|_device|object|||\n|_device.id|string|||\n|_device.name|string|The caption of the referenced entity||\n|_device.organizationId|string|The id of the organization of the referenced entity.|3fa85f64-5717-4562-b3fc-2c963f66afa6|\n|_device.parentEntityId|string|The id of the parent entity (appears only for child entities)||\n|_device.template|object|||\n|_device.template.displayName|string|The display name of the template||\n|_device.template.id|string|The id of the template||\n|_device.template.name|string|The name of the template||\n|_device.template.parentTemplate|object|||\n|_device.template.parentTemplate.displayName|string|||\n|_device.template.parentTemplate.id|string|||\n|_device.template.parentTemplate.name|string|||\n|_device.templateId|string|The id of a template that is configured in the settings service.|3fa85f64-5717-4562-b3fc-2c963f66afa6|\n|_device.templateName|string|The name of the referenced entity template||\n|_endTime|string|A UTC date-time in the ISO-8601 format|2007-12-20T10:15:30Z|\n|_id|string|Session ID|3fa85f64-5717-4562-b3fc-2c963f66afa6|\n|_initiator|string|What API initiated the session Values:REMOTE_CONTROL,EXTERNAL|EXTERNAL|\n|_lastModifiedTime|string|A UTC date-time in the ISO-8601 format|2007-12-20T10:15:30Z|\n|_name|string|The name of the session||\n|_ownerOrganization|object|||\n|_ownerOrganization.id|string|A UUID formatted string|3fa85f64-5717-4562-b3fc-2c963f66afa6|\n|_ownerOrganization.name|string|The caption of the referenced entity||\n|_ownerOrganization.organizationId|string|The id of the organization of the referenced entity.|3fa85f64-5717-4562-b3fc-2c963f66afa6|\n|_ownerOrganization.parentEntityId|string|The id of the parent entity (appears only for child entities)||\n|_ownerOrganization.template|object|||\n|_ownerOrganization.template.displayName|string|The display name of the template||\n|_ownerOrganization.template.id|string|The id of the template||\n|_ownerOrganization.template.name|string|The name of the template||\n|_ownerOrganization.template.parentTemplate|object|||\n|_ownerOrganization.template.parentTemplate.displayName|string|||\n|_ownerOrganization.template.parentTemplate.id|string|||\n|_ownerOrganization.template.parentTemplate.name|string|||\n|_ownerOrganization.templateId|string|The id of a template that is configured in the settings service.|3fa85f64-5717-4562-b3fc-2c963f66afa6|\n|_ownerOrganization.templateName|string|The name of the referenced entity template||\n|_patient|object|||\n|_patient.id|string|A UUID formatted string|3fa85f64-5717-4562-b3fc-2c963f66afa6|\n|_patient.name|string|The caption of the referenced entity||\n|_patient.organizationId|string|The id of the organization of the referenced entity.|3fa85f64-5717-4562-b3fc-2c963f66afa6|\n|_patient.parentEntityId|string|The id of the parent entity (appears only for child entities)||\n|_patient.template|object|||\n|_patient.template.displayName|string|The display name of the template||\n|_patient.template.id|string|The id of the template||\n|_patient.template.name|string|The name of the template||\n|_patient.template.parentTemplate|object|||\n|_patient.template.parentTemplate.displayName|string|||\n|_patient.template.parentTemplate.id|string|||\n|_patient.template.parentTemplate.name|string|||\n|_patient.templateId|string|The id of a template that is configured in the settings service.|3fa85f64-5717-4562-b3fc-2c963f66afa6|\n|_patient.templateName|string|The name of the referenced entity template||\n|_referencers|object|An object that contains all the referencers of this entity. Each referencer is the RSAN and it's an object that contains the count of the referrers, and information of the referrer (in case count = 1)||\n|_requiredMeasurementIntervalMilliseconds|integer|The interval between measurements in milliseconds|1000|\n|_sessionContext|string|The context that is linked to the current session and should be sent in a measurement message||\n|_startTime|string|A UTC date-time in the ISO-8601 format|2007-12-20T10:15:30Z|\n|_state|string|The Sessions state Values:ACTIVE,DONE,PAUSED,ACTIVATING,PAUSING,RESUMING,STOPPING|ACTIVE|\n|_summary|object|||\n|_summary.&lt;customAttribute1&gt;|&lt;customAttribute1Type&gt;|Summary custom attribute 1 value||\n|_summary.&lt;customAttributeN&gt;|&lt;customAttributeNType&gt;|Summary custom attribute N value||\n|_summary._stopReason|string|The reason the session was stopped|Manual Stop|\n|_summary._stopReasonCode|string|The code of the stop reason Values:COMPLETION,GENERAL_DEVICE_ERROR,TIMEOUT|COMPLETION|\n|_template|object|||\n|_template.displayName|string|The display name of the template||\n|_template.id|string|The id of the template||\n|_template.name|string|The name of the template||\n|_template.parentTemplate|object|||\n|_template.parentTemplate.displayName|string|||\n|_template.parentTemplate.id|string|||\n|_template.parentTemplate.name|string|||\n",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SessionResponseV2"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Code : TOKEN_NOT_VALID, Details: []",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Code : SESSION_INITIATOR_MISMATCH, Details: [originalInitiator, currentInitiator]\n\nCode : ACCESS_DENIED, Details: []",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Code : SESSION_NOT_FOUND, Details: [id]",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "Code : SESSION_WRONG_DEVICE_ID, Details: [id, deviceId]\n\nCode : SESSION_STATE_CHANGE_INVALID, Details: [currentState, targetState]",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Code : INTERNAL_SERVER_ERROR, Details: []",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "504": {
            "description": "Code : GATEWAY_TIMEOUT, Details: []",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    }
  },
  "components": {
    "schemas": {
      "ErrorResponse": {
        "type": "object",
        "properties": {
          "code": {
            "type": "string",
            "example": "EXAMPLE_CODE_ENTITY_NOT_FOUND"
          },
          "message": {
            "type": "string",
            "example": "Entity with id [00000000-0000-0000-0000-000000000000] not found"
          },
          "serviceName": {
            "type": "string",
            "example": "Device Service"
          },
          "traceId": {
            "type": "string",
            "example": "a07a7e532f3541d8"
          },
          "environment": {
            "type": "string",
            "example": "develop"
          },
          "details": {
            "type": "object",
            "additionalProperties": {}
          }
        }
      },
      "BasicEntityData": {
        "type": "object",
        "description": "If count is 1 - holds the information about the single referencer. Null when count > 1.",
        "properties": {
          "id": {
            "type": "string",
            "description": "The id of the entity"
          },
          "name": {
            "type": "string",
            "description": "The name of the entity"
          },
          "parentEntityId": {
            "type": "string",
            "description": "The id of the parent entity (appears only for child entities)"
          }
        },
        "required": [
          "id",
          "name"
        ]
      },
      "BasicReferencedEntityDataUUIDId": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "A UUID formatted string",
            "example": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
          },
          "templateId": {
            "type": "string",
            "format": "uuid",
            "deprecated": true,
            "description": "The id of a template that is configured in the settings service.",
            "example": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
          },
          "parentEntityId": {
            "type": "string",
            "description": "The id of the parent entity (appears only for child entities)"
          },
          "templateName": {
            "type": "string",
            "deprecated": true,
            "description": "The name of the referenced entity template"
          },
          "template": {
            "$ref": "#/components/schemas/BasicTemplateData",
            "description": "The referenced entity template"
          },
          "organizationId": {
            "type": "string",
            "format": "uuid",
            "description": "The id of the organization of the referenced entity.",
            "example": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
          },
          "name": {
            "type": "string",
            "description": "The caption of the referenced entity"
          }
        }
      },
      "BasicTemplateData": {
        "type": "object",
        "description": "Template of the referencer",
        "properties": {
          "name": {
            "type": "string",
            "description": "The name of the template"
          },
          "displayName": {
            "type": "string",
            "description": "The display name of the template"
          },
          "parentTemplate": {
            "$ref": "#/components/schemas/ParentTemplateResponse",
            "description": "Base information about the template parent"
          },
          "id": {
            "type": "string",
            "description": "The id of the template"
          }
        }
      },
      "ParentTemplateResponse": {
        "type": "object",
        "description": "Base information about the template parent",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "displayName": {
            "type": "string"
          },
          "name": {
            "type": "string"
          }
        }
      },
      "ReferencedSideAttributeInformation": {
        "type": "object",
        "description": "Information about referencers from a specific template and attribute",
        "properties": {
          "name": {
            "type": "string",
            "description": "The reference side attribute name from the attribute reference configuration. Can be null when there are multiple referencers."
          },
          "displayName": {
            "type": "string",
            "description": "The reference side attribute display name from the attribute reference configuration. Can be null when there are multiple referencers."
          },
          "count": {
            "type": "integer",
            "format": "int64",
            "description": "Total count of all the referencers from this specific template and attribute"
          },
          "attributeId": {
            "type": "string",
            "format": "uuid",
            "description": "Attribute ID of the referencer"
          },
          "templateId": {
            "type": "string",
            "format": "uuid",
            "deprecated": true,
            "description": "Template ID of the referencer"
          },
          "template": {
            "$ref": "#/components/schemas/BasicTemplateData",
            "description": "Template of the referencer"
          },
          "referrer": {
            "$ref": "#/components/schemas/BasicEntityData",
            "description": "If count is 1 - holds the information about the single referencer. Null when count > 1."
          }
        },
        "required": [
          "attributeId",
          "count",
          "template",
          "templateId"
        ]
      },
      "SessionSummary": {
        "type": "object",
        "properties": {
          "_stopReason": {
            "type": "string",
            "description": "The reason the session was stopped",
            "example": "Manual Stop",
            "maxLength": 128,
            "minLength": 0
          },
          "_stopReasonCode": {
            "type": "string",
            "description": "The code of the stop reason",
            "enum": [
              "COMPLETION",
              "GENERAL_DEVICE_ERROR",
              "TIMEOUT"
            ],
            "example": "COMPLETION"
          }
        }
      },
      "BasicReferencedEntityDataStringId": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "templateId": {
            "type": "string",
            "format": "uuid",
            "deprecated": true,
            "description": "The id of a template that is configured in the settings service.",
            "example": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
          },
          "parentEntityId": {
            "type": "string",
            "description": "The id of the parent entity (appears only for child entities)"
          },
          "templateName": {
            "type": "string",
            "deprecated": true,
            "description": "The name of the referenced entity template"
          },
          "template": {
            "$ref": "#/components/schemas/BasicTemplateData",
            "description": "The referenced entity template"
          },
          "organizationId": {
            "type": "string",
            "format": "uuid",
            "description": "The id of the organization of the referenced entity.",
            "example": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
          },
          "name": {
            "type": "string",
            "description": "The caption of the referenced entity"
          }
        }
      },
      "SessionResponseV2": {
        "type": "object",
        "properties": {
          "_id": {
            "type": "string",
            "format": "uuid",
            "description": "Session ID",
            "example": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
          },
          "_patient": {
            "$ref": "#/components/schemas/BasicReferencedEntityDataUUIDId",
            "description": "Patient that is assigned to the session"
          },
          "_device": {
            "$ref": "#/components/schemas/BasicReferencedEntityDataStringId",
            "description": "Device that is assigned to the session"
          },
          "_ownerOrganization": {
            "$ref": "#/components/schemas/BasicReferencedEntityDataUUIDId",
            "description": "Owner organization"
          },
          "_startTime": {
            "type": "string",
            "format": "date-time",
            "description": "A UTC date-time in the ISO-8601 format",
            "example": "2007-12-20T10:15:30Z"
          },
          "_endTime": {
            "type": "string",
            "format": "date-time",
            "description": "A UTC date-time in the ISO-8601 format",
            "example": "2007-12-20T10:15:30Z"
          },
          "_state": {
            "type": "string",
            "description": "The Sessions state",
            "enum": [
              "ACTIVE",
              "DONE",
              "PAUSED",
              "ACTIVATING",
              "PAUSING",
              "RESUMING",
              "STOPPING"
            ],
            "example": "ACTIVE"
          },
          "_initiator": {
            "type": "string",
            "description": "What API initiated the session",
            "enum": [
              "REMOTE_CONTROL",
              "EXTERNAL"
            ],
            "example": "EXTERNAL"
          },
          "_requiredMeasurementIntervalMilliseconds": {
            "type": "integer",
            "format": "int32",
            "description": "The interval between measurements in milliseconds",
            "example": 1000
          },
          "_template": {
            "$ref": "#/components/schemas/BasicTemplateData",
            "description": "Template information"
          },
          "_referencers": {
            "type": "object",
            "additionalProperties": {
              "$ref": "#/components/schemas/ReferencedSideAttributeInformation"
            },
            "description": "An object that contains all the referencers of this entity. Each referencer is the RSAN and it's an object that contains the count of the referrers, and information of the referrer (in case count = 1)"
          },
          "_configuration": {
            "type": "object",
            "additionalProperties": {},
            "description": "An object that holds the entity configuration attributes"
          },
          "_summary": {
            "$ref": "#/components/schemas/SessionSummary"
          },
          "_lastModifiedTime": {
            "type": "string",
            "format": "date-time",
            "description": "A UTC date-time in the ISO-8601 format",
            "example": "2007-12-20T10:15:30Z"
          },
          "_creationTime": {
            "type": "string",
            "format": "date-time",
            "description": "A UTC date-time in the ISO-8601 format",
            "example": "2007-12-20T10:15:30Z"
          },
          "_name": {
            "type": "string",
            "description": "The name of the session",
            "maxLength": 64,
            "minLength": 1
          },
          "_sessionContext": {
            "type": "string",
            "description": "The context that is linked to the current session and should be sent in a measurement message"
          },
          "_caption": {
            "type": "string"
          }
        },
        "required": [
          "_creationTime",
          "_device",
          "_id",
          "_initiator",
          "_lastModifiedTime",
          "_ownerOrganization",
          "_patient",
          "_requiredMeasurementIntervalMilliseconds",
          "_sessionContext",
          "_startTime",
          "_state",
          "_summary"
        ]
      }
    },
    "securitySchemes": {
      "bearerAuth": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "JWT"
      }
    }
  }
}
```