跳转至

POST /forgettech/{player_identifier}

端点: POST /v1/pdapi/forgettech/<player_identifier>

认证: Bearer 令牌

权限: REST.Techs.Forget

用途

Forgets one, many, or all technologies for a player.

路径参数

  • player_identifier: 目标玩家的 UserIdPlayerUID

查询参数

无。

请求体

Technology can be a single TechID, the string "All", or an array of TechID strings. Do not put "All" inside an array.

响应结构

200 response schema

Field Type Description
ForgottenCount integer Number of technologies removed from the player.
Forgotten string[] or string Removed technology IDs, or All when every unlocked technology was removed.
Skipped string[] Technology IDs skipped because they were not unlocked.

错误响应

错误响应使用以下格式:

{
    "Error": {
        "Code": "ERROR_CODE",
        "Message": "人类可读的消息",
        "详情": {}
    }
}
HTTP 错误代码 发生条件
401 INVALID_TOKEN Authorization 头缺失、格式错误,或与配置的 Bearer 令牌不匹配。
403 MISSING_PERMISSION 令牌有效,但不包含此端点权限。
400 INVALID_JSON 提供了请求体,但无法解析为 JSON。
400 REQUEST_FAILED 游戏线程回调抛出异常,或共享玩家/资源解析器失败。
500 REQUEST_TIMEOUT 内部游戏线程回调未在 5 秒内完成。
400 INVALID_REQUEST Technology is missing, or it is not a string/array in the expected format.
400 VALIDATION_FAILED The Technology array contains a non-string, All, or an invalid technology identifier.

示例

Forget one technology for a GDK player

POST /v1/pdapi/forgettech/gdk_2533274812345678
{
    "Technology": "Technology_ElecBaton"
}

Forget several technologies by PlayerUID

POST /v1/pdapi/forgettech/b7f4e91a-2c53-4d8f-a6e1-93c4bb62a7d1
{
    "Technology": [
        "Technology_ElecBaton",
        "Technology_GrapplingGun"
    ]
}

Forget all technologies for a Steam player

POST /v1/pdapi/forgettech/steam_76561198012345678
{
    "Technology": "All"
}

使用场景

  • Remove a technology granted by mistake.
  • Reset a test account with "All".
  • Confirm the current state with GET /techs before and after the request.