账户会话

GET /core/v1/me/sessions

本人有效会话数量与当前会话到期时间

身份要求

账户会话. 会话/管理写操作不在公共 Playground 执行。

接口

curl --request GET 'https://api.oneaster.ai/core/v1/me/sessions' \
  --header 'Authorization: Bearer '"$ONEASTER_SESSION_TOKEN"

参数

—

响应

200

本人有效会话数量与当前会话到期时间

{
  "content": {
    "application/json": {
      "schema": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "success": {
            "const": true
          },
          "data": {
            "type": "object",
            "additionalProperties": false,
            "properties": {
              "active_session_count": {
                "type": "string",
                "pattern": "^[0-9]+$"
              },
              "other_session_count": {
                "type": "string",
                "pattern": "^[0-9]+$"
              },
              "current_session_expires_at": {
                "type": "string",
                "format": "date-time"
              }
            },
            "required": [
              "active_session_count",
              "other_session_count",
              "current_session_expires_at"
            ]
          }
        },
        "required": [
          "success",
          "data"
        ]
      }
    }
  },
  "headers": {}
}

default

错误代码见 core-api.md;供应商/数据库错误已隐藏。

{
  "content": {
    "application/json": {
      "schema": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "success": {
            "const": false
          },
          "error": {
            "type": "object",
            "additionalProperties": false,
            "properties": {
              "code": {
                "type": "string"
              },
              "message": {
                "type": "string"
              },
              "type": {
                "const": "oneaster_error"
              }
            },
            "required": [
              "code",
              "message",
              "type"
            ]
          },
          "data": {
            "type": "null"
          }
        },
        "required": [
          "success",
          "error",
          "data"
        ]
      }
    }
  },
  "headers": {}
}