logo
Development
検索
メタデータフィールドを削除する

メタデータフィールドを削除する

ID を指定してメタデータフィールドを一括削除します。システムのプリセットフィールドは削除できません。1 回のリクエストで最大 50 件のフィールドを削除できます。ids はリクエストボディではなく、カンマ区切りの URL クエリパラメータとして指定します。

リクエストメソッド

DELETE

エンドポイント

https://api-${endpoint}.gptbots.ai/v1/bot/doc/metadata/field/delete

認証

認証方法については、API 概要を参照してください。

リクエスト

リクエスト例

curl -X DELETE 'https://api-${endpoint}.gptbots.ai/v1/bot/doc/metadata/field/delete?ids=665f1c8a9b2e4d001a3f0001,665f1c8a9b2e4d001a3f0002' \ -H 'Authorization: Bearer ${API Key}'
                      
                      curl -X DELETE 'https://api-${endpoint}.gptbots.ai/v1/bot/doc/metadata/field/delete?ids=665f1c8a9b2e4d001a3f0001,665f1c8a9b2e4d001a3f0002' \
-H 'Authorization: Bearer ${API Key}'

                    
このコードブロックをポップアップで表示

リクエストヘッダー

フィールド 説明
Authorization Bearer ${API Key} Authorization: Bearer ${API Key} で認証します。API キーページで API Key を取得してください。

リクエストパラメータ

フィールド 必須 説明
ids String はい カンマ区切りフィールド ID、一度に最大 50 件。

レスポンス

レスポンス例

{ "success_count": 1, "failure_count": 2, "results": [ { "id": "665f1c8a9b2e4d001a3f0001", "success": true }, { "id": "665f1c8a9b2e4d001a3f0003", "success": false, "error_message": "field not found" }, { "id": "665f1c8a9b2e4d001a3f0004", "success": false, "error_message": "predefined field cannot be deleted" } ] }
                      
                      {
    "success_count": 1,
    "failure_count": 2,
    "results": [
        {
            "id": "665f1c8a9b2e4d001a3f0001",
            "success": true
        },
        {
            "id": "665f1c8a9b2e4d001a3f0003",
            "success": false,
            "error_message": "field not found"
        },
        {
            "id": "665f1c8a9b2e4d001a3f0004",
            "success": false,
            "error_message": "predefined field cannot be deleted"
        }
    ]
}

                    
このコードブロックをポップアップで表示

成功レスポンス

フィールド 説明
success_count Integer 正常に削除されたフィールドの数。
failure_count Integer 削除に失敗したフィールドの数。
results Array<Object> ID ごとの削除結果。
id String フィールド ID。
success Boolean 削除が成功したかどうか。
error_message String 失敗の理由: field not found (フィールドが存在しない) / predefined field cannot be deleted (プリセットフィールドは削除できません)。

エラーレスポンス

フィールド 説明
code Integer エラーコード。
message String エラーの詳細。