Delete Single Session Data

특정 세션의 데이터를 삭제하고 싶을 때 사용합니다. 세션 데이터, 업로드한 오디오 데이터, 분석 데이터가 모두 삭제됩니다. 세션 데이터 삭제 요청에 따라 에이슬립 서버에서 해당 데이터가 삭제된 경우, 추후 과금 사용량 분석 시 삭제된 세션에 대한 구체적인 근거 제공이 어렵습니다.

1. Request

1.1 URL

DELETE https://api.asleep.ai/ai/v1/sessions/{session_id}

1.2 Header

FieldTypeRequiredDescription
x-api-keyStringOAPI Key
x-user-idStringO발급받은 user id

1.3 Path parameter

FieldTypeRequiredDescription
session_idStringO생성한 session id

Example

curl "https://api.asleep.ai/ai/v1/sessions/{session_id}" -XDELETE \
  -H "x-api-key: <YOUR_API_KEY>" \
  -H "x-user-id: <USER_ID>"

2. Response

2.1 204 No Content

  • 세션 삭제 성공 (No Response Body)

2.2 401 Unauthorized

  • x-user-id 헤더 값이 없거나 포맷이 맞지 않음
{
  "detail": "invalid user id"
}

2.3 404 Not Found

  • 사용자 없음
{
  "detail": "user not exist"
}
  • 세션 없음
{
  "detail": "session does not exist"
}