Confluent REST Proxy API リファレンス¶
Confluent REST Proxy API を使用するチュートリアルについては、この ステップバイステップガイド を参照してください。
コンテンツタイプ¶
REST Proxy では、リクエストと応答の両方にコンテンツタイプを使用し、以下のデータプロパティを示します。
シリアル化のフォーマット:
json
API バージョン(例:
v2
またはv3
)組み込みフォーマット:
json
、binary
、avro
、protobuf
、jsonschema
重要
REST Proxy v2 以降では、
jsonschema
およびprotobuf
の組み込み型がサポートされています。
REST Proxy は、Avro®、 JSON スキーマ、および Protobuf シリアル化フォーマットをサポートしています。REST Proxy API のバージョンは v2
と v3
です。
組み込みフォーマットは、生成または消費するデータのフォーマットです。これらのフォーマットは、シリアル化フォーマットでリクエストまたは応答に組み込まれます。たとえば、json
でシリアル化されたリクエストに binary
データを指定できます。この場合、データは base64 エンコード文字列として指定します。
v2
の場合、コンテンツタイプはapplication/vnd.kafka.binary.v2+json
になります。v3
の場合、コンテンツタイプはapplication/json
になります。
データが JSON の場合、json
を組み込みフォーマットとして使用し、それを直接組み込むことができます。
v2
の場合、コンテンツタイプはapplication/vnd.kafka.json.v2+json
になります。v3
の場合、コンテンツタイプはapplication/json
になります。
avro
、protobuf
、および jsonschema
組み込み型を使用すると、JSON フォーマットのデータをスキーマ(またはスキーマ ID)とともにリクエストに直接組み込むことができます。これらの型は Schema Registry を使用し、データおよびペイロードに加えてスキーマの ID がシリアル化されます。
- Avro コンテンツタイプは
application/vnd.kafka.avro.v2+json
です。 - Protobuf コンテンツタイプは
application/vnd.kafka.protobuf.v2+json
です。 - JSON スキーマのコンテンツタイプは
application/vnd.kafka.jsonschema.v2+json
です。
コンテンツタイプのフォーマットは以下のとおりです。:
application/vnd.kafka[.embedded_format].[api_version]+[serialization_format]
詳細については、「Schema Registry API リファレンス」を参照してください。
メッセージが組み込まれていない場合、組み込みフォーマットを省略できます(つまり、メタデータのリクエストには application/vnd.kafka.v2+json
を使用できます)。v2
の場合に推奨されるコンテンツタイプは application/vnd.kafka.[embedded_format].v2+json
です。ただし、コンテンツタイプをより抽象的にして指定することもできます。たとえば、使用すべき API バージョン要件を指定せずに application/vnd.kafka+json
(最新の安定版が使用されます)としたり、application/json
や application/octet-stream
のようにしたりすることができます。後者の 2 つは、あくまで互換性と使用の容易性を意図してサポートされています。いずれの場合も、組み込みフォーマットを省略すると、binary
と見なされます。これらの抽象的な値の使用は許可されていますが、将来のバージョンとの互換性を確保するためには、推奨されるコンテンツタイプをリクエストに指定するとともに、応答のコンテンツタイプをチェックする "必要があります"。
実際のリクエストでは、フォーマットとバージョンの情報を HTTP の Accept
ヘッダーで、できるだけ具体的に指定する 必要があります。
v2
の場合は、フォーマットとバージョンを次のように指定できます。
Accept: application/vnd.kafka.v2+json
v3
の場合は、バージョンを指定しないでください。最新のバージョン(v3
)が使用されます。
Accept: application/json
サーバーでは、コンテンツネゴシエーションもサポートされるため、重み付けされた複数の優先度指定を含めることができます。:
Accept: application/vnd.kafka.v2+json; q=0.9, application/json; q=0.5
この方法は、新しいバージョンの API が推奨されるものの、そのバージョンの API が利用できるかどうかが定かでない場合などに活用できます。
参考
「REST API の使用例(curl)」では、curl を使用してコマンドラインから API をテストする方法について説明しています。
エラー¶
すべての API エンドポイントでは、エラーを表す HTTP ステータス(400 番台または 500 番台のステータス)がリクエストから返された場合、標準のエラーメッセージフォーマットが使用されます。たとえば、リクエストエンティティの必須フィールドに漏れがあると、次のような応答が生成されることがあります。
HTTP/1.1 422 Unprocessable Entity
Content-Type: application/vnd.kafka.v3+json
{
"error_code": 422,
"message": "records may not be empty"
}
ステータスコードをチェックすることをお勧めしますが、DELETE API 以外であれば、API 呼び出しのレスポンスを解析し、error_code
フィールドの存在をチェックすることによってエラーを検出してもかまいません。
一部のエラーコードは API 全体で頻繁に使用されるため、これらを処理する汎用コードが必要になる可能性が高くなりますが、その他のほとんどのエラーコードはリクエストごとに処理する必要があります。
-
ANY
/
¶ ステータスコード: - 401 Unauthorized --
- エラーコード 40101 -- Kafka 認証エラー。
- 403 Forbidden --
- エラーコード 40301 -- Kafka 認可エラー。
- 404 Not Found --
- エラーコード 40401 -- トピックが見つかりません。
- エラーコード 40402 -- パーティションが見つかりません。
- 422 Unprocessable Entity -- リクエストのペイロードが正しくフォーマットされていないか、セマンティクスエラーが含まれています
- 500 Internal Server Error --
- Error code 50001 -- Zookeeper error.
- Error code 50002 -- Kafka error.
- Error code 50003 -- Retriable Kafka error. Although the operation failed, it's possible that retrying the request will be successful.
- エラーコード 50101 -- 指定されたブローカーについてのみ SSL エンドポイントが見つかりましたが、呼び出された API については SSL はまだサポートされていません。
- 401 Unauthorized --
REST Proxy API v2¶
ちなみに
API エンドポイントをコマンドラインからテストする方法については、「REST API の使用例(curl)」を参照してください。
トピック¶
トピックリソースは、Kafka クラスターのトピックとその現在のステートに関する情報を提供します。また、特定のトピックに対して POST
リクエストを行うことでメッセージを生成することもできます。
-
GET
/topics
¶ Kafka のトピックのリストを取得します。
レスポンスの JSON オブジェクト: - topics (array) -- トピック名のリスト
リクエストの例 :
GET /topics HTTP/1.1 Host: kafkaproxy.example.com Accept: application/vnd.kafka.v2+json
応答の例 :
HTTP/1.1 200 OK Content-Type: application/vnd.kafka.v2+json ["topic1", "topic2"]
-
GET
/topics/
(string: topic_name)¶ 特定のトピックに関するメタデータを取得します。
パラメーター: - topic_name (string) -- メタデータを取得するトピックの名前
レスポンスの JSON オブジェクト: - name (string) -- トピックの名前
- configs (map) -- トピックごとの構成のオーバーライド
- partitions (array) -- このトピックのパーティションのリスト
- partitions[i].partition (int) -- このパーティションの ID
- partitions[i].leader (int) -- このパーティションのリーダーのブローカー ID
- partitions[i].replicas (array) -- リーダーを含むこのパーティションのレプリカのリスト
- partitions[i].replicas[j].broker (array) -- レプリカのブローカー ID
- partitions[i].replicas[j].leader (boolean) -- このレプリカがパーティションのリーダーである場合は true
- partitions[i].replicas[j].in_sync (boolean) -- このレプリカが現在リーダーと同期している場合は true
ステータスコード: - 404 Not Found --
- エラーコード 40401 -- トピックが見つかりません
リクエストの例 :
GET /topics/test HTTP/1.1 Accept: application/vnd.kafka.v2+json
応答の例 :
HTTP/1.1 200 OK Content-Type: application/vnd.kafka.v2+json { "name": "test", "configs": { "cleanup.policy": "compact" }, "partitions": [ { "partition": 1, "leader": 1, "replicas": [ { "broker": 1, "leader": true, "in_sync": true, }, { "broker": 2, "leader": false, "in_sync": true, } ] }, { "partition": 2, "leader": 2, "replicas": [ { "broker": 1, "leader": false, "in_sync": true, }, { "broker": 2, "leader": true, "in_sync": true, } ] } ] }
-
POST
/topics/
(string: topic_name)¶ 任意でメッセージのキーまたはパーティションを指定して、トピックにメッセージを生成します。パーティションが指定されていない場合は、キーのハッシュに基づいてパーティションが選択されます。キーが指定されていない場合、メッセージごとにラウンドロビン方式でパーティションが選択されます。
avro
、protobuf
、およびjsonschema
組み込みフォーマットの場合は、スキーマに関する情報を指定し、Schema Registry にアクセスする URL(schema.registry.url
)を使用して REST Proxy を構成する必要があります。スキーマは、文字列としてエンコードされた完全なスキーマとして指定できます。または、最初のリクエストの後に、最初の応答で返されたスキーマ ID として指定できます。パラメーター: - topic_name (string) -- メッセージを生成する先のトピックの名前
リクエストの JSON オブジェクト: - key_schema (string) -- 文字列としてエンコードされた完全なスキーマ(たとえば、Avro データ用にシリアル化された JSON)
- key_schema_id (int) -- 同じスキーマを使用する前のリクエストが返した ID。この ID は、レジストリ内のスキーマの ID に対応します。
- value_schema (string) -- 文字列としてエンコードされた完全なスキーマ(たとえば、Avro データ用にシリアル化された JSON)
- value_schema_id (int) -- 同じスキーマを使用する前のリクエストが返した ID。この ID は、レジストリ内のスキーマの ID に対応します。
リクエスト(オブジェクトの JSON 配列): - records -- トピックに対して生成するレコードのリスト
- records[i].key (object) -- 組み込みフォーマットに従ってフォーマットされたメッセージキー。キーを省略する場合は null(オプション)
- records[i].value (object) -- 組み込みフォーマットに従ってフォーマットされたメッセージ値
- records[i].partition (int) -- メッセージを保存するパーティション(オプション)
レスポンスの JSON オブジェクト: - key_schema_id (int) -- キーの生成に使用されるスキーマの ID。キーが使用されなかった場合は null
- value_schema_id (int) -- 値を生成するために使用されるスキーマの ID。
応答(オブジェクトの JSON 配列): - offsets (object) -- メッセージのパブリッシュ先のパーティションとオフセットのリスト
- offsets[i].partition (int) -- メッセージのパブリッシュ先のパーティション。メッセージのパブリッシュが失敗した場合は null
- offsets[i].offset (long) -- メッセージのオフセット。メッセージのパブリッシュが失敗した場合は null
- offsets[i].error_code (long) -- この操作が失敗した理由を分類するエラーコード。成功した場合は null。* 1 - 再試行不可な Kafka 例外 * 2 - 再試行可能な Kafka 例外。再試行すると、メッセージが正常に送信される場合があります
- offsets[i].error (string) -- 操作が失敗した理由を示すエラーメッセージ。成功した場合は null
ステータスコード: - 404 Not Found --
- エラーコード 40401 -- トピックが見つかりません
- 422 Unprocessable Entity --
- エラーコード 42201 -- リクエストにキーが含まれており、スキーマを必要とするフォーマットを使用していますが、
key_schema
またはkey_schema_id
フィールドが含まれていません - エラーコード 42202 -- リクエストに値が含まれており、スキーマを必要とするフォーマットを使用していますが、
value_schema
またはvalue_schema_id
フィールドが含まれていません - エラーコード 42205 -- リクエストに無効なスキーマが含まれています。
- エラーコード 42201 -- リクエストにキーが含まれており、スキーマを必要とするフォーマットを使用していますが、
- 408 Request Timeout --
- エラーコード 40801 -- スキーマの登録または検索に失敗しました。
バイナリリクエストの例:
POST /topics/test HTTP/1.1 Host: kafkaproxy.example.com Content-Type: application/vnd.kafka.binary.v2+json Accept: application/vnd.kafka.v2+json, application/vnd.kafka+json, application/json { "records": [ { "key": "a2V5", "value": "Y29uZmx1ZW50" }, { "value": "a2Fma2E=", "partition": 1 }, { "value": "bG9ncw==" } ] }
バイナリ応答の例 :
HTTP/1.1 200 OK Content-Type: application/vnd.kafka.v2+json { "key_schema_id": null, "value_schema_id": null, "offsets": [ { "partition": 2, "offset": 100 }, { "partition": 1, "offset": 101 }, { "partition": 2, "offset": 102 } ] }
Avro リクエストの例 :
POST /topics/test HTTP/1.1 Host: kafkaproxy.example.com Content-Type: application/vnd.kafka.avro.v2+json Accept: application/vnd.kafka.v2+json, application/vnd.kafka+json, application/json { "value_schema": "{\"name\":\"int\",\"type\": \"int\"}", "records": [ { "value": 12 }, { "value": 24, "partition": 1 } ] }
Avro 応答の例 :
HTTP/1.1 200 OK Content-Type: application/vnd.kafka.v2+json { "key_schema_id": null, "value_schema_id": 32, "offsets": [ { "partition": 2, "offset": 103 }, { "partition": 1, "offset": 104 } ] }
JSON リクエストの例 :
POST /topics/test HTTP/1.1 Host: kafkaproxy.example.com Content-Type: application/vnd.kafka.json.v2+json Accept: application/vnd.kafka.v2+json, application/vnd.kafka+json, application/json { "records": [ { "key": "somekey", "value": {"foo": "bar"} }, { "value": [ "foo", "bar" ], "partition": 1 }, { "value": 53.5 } ] }
JSON 応答の例 :
HTTP/1.1 200 OK Content-Type: application/vnd.kafka.v2+json { "key_schema_id": null, "value_schema_id": null, "offsets": [ { "partition": 2, "offset": 100 }, { "partition": 1, "offset": 101 }, { "partition": 2, "offset": 102 } ] }
パーティション¶
パーティションリソースは、現在のリーダーや各パーティションのレプリカなど、パーティションごとのメタデータを提供します。また、GET
リクエストと POST
リクエストを使用して、1 つのパーティションに対して、メッセージを消費したり生成したりすることもできます。
-
GET
/topics/
(string: topic_name)/partitions
¶ トピックのパーティションのリストを取得します。
パラメーター: - topic_name (string) -- トピックの名前
応答(オブジェクトの JSON 配列): - partition (int) -- パーティションの ID
- leader (int) -- このパーティションのリーダーのブローカー ID
- replicas (array) -- このパーティションのレプリカとして機能するブローカーのリスト
- replicas[i].broker (int) -- レプリカのブローカー ID
- replicas[i].leader (boolean) -- このブローカーがパーティションのリーダーである場合は true
- replicas[i].in_sync (boolean) -- このレプリカがリーダーと同期している場合は true
ステータスコード: - 404 Not Found --
- エラーコード 40401 -- トピックが見つかりません
リクエストの例 :
GET /topics/test/partitions HTTP/1.1 Host: kafkaproxy.example.com Accept: application/vnd.kafka.v2+json, application/vnd.kafka+json, application/json
応答の例 :
HTTP/1.1 200 OK Content-Type: application/vnd.kafka.v2+json [ { "partition": 1, "leader": 1, "replicas": [ { "broker": 1, "leader": true, "in_sync": true, }, { "broker": 2, "leader": false, "in_sync": true, }, { "broker": 3, "leader": false, "in_sync": false, } ] }, { "partition": 2, "leader": 2, "replicas": [ { "broker": 1, "leader": false, "in_sync": true, }, { "broker": 2, "leader": true, "in_sync": true, }, { "broker": 3, "leader": false, "in_sync": false, } ] } ]
-
GET
/topics/
(string: topic_name)/partitions/
(int: partition_id)¶ トピック内の 1 つのパーティションに関するメタデータを取得します。
パラメーター: - topic_name (string) -- トピックの名前
- partition_id (int) -- 検査するパーティションの ID
レスポンスの JSON オブジェクト: - partition (int) -- パーティションの ID
- leader (int) -- このパーティションのリーダーのブローカー ID
- replicas (array) -- このパーティションのレプリカとして機能するブローカーのリスト
- replicas[i].broker (int) -- レプリカのブローカー ID
- replicas[i].leader (boolean) -- このブローカーがパーティションのリーダーである場合は true
- replicas[i].in_sync (boolean) -- このレプリカがリーダーと同期している場合は true
ステータスコード: - 404 Not Found --
- エラーコード 40401 -- トピックが見つかりません
- エラーコード 40402 -- パーティションが見つかりません
リクエストの例 :
GET /topics/test/partitions/1 HTTP/1.1 Host: kafkaproxy.example.com Accept: application/vnd.kafka.v2+json, application/vnd.kafka+json, application/json
応答の例 :
HTTP/1.1 200 OK Content-Type: application/vnd.kafka.v2+json { "partition": 1, "leader": 1, "replicas": [ { "broker": 1, "leader": true, "in_sync": true, }, { "broker": 2, "leader": false, "in_sync": true, }, { "broker": 3, "leader": false, "in_sync": false, } ] }
-
GET
/topics/
(string: topic_name)/partitions/
(int: partition_id)/offsets
¶ このトピックのパーティションのオフセットのサマリーを取得します。
パラメーター: - topic_name (string) -- トピックの名前
- partition_id (int) -- 検査するパーティションの ID
レスポンスの JSON オブジェクト: - beginning_offset (int) -- このパーティションの最初のオフセット
- end_offset (int) -- このパーティションの最後のオフセット
ステータスコード: - 404 Not Found --
- エラーコード 40401 -- トピックが見つかりません
- エラーコード 40402 -- パーティションが見つかりません
リクエストの例 :
GET /topics/test/partitions/1/offsets HTTP/1.1 Host: kafkaproxy.example.com Accept: application/vnd.kafka.v2+json, application/vnd.kafka+json, application/json
応答の例 :
HTTP/1.1 200 OK Content-Type: application/vnd.kafka.v2+json { "beginning_offset": 10, "end_offset": 50, }
-
POST
/topics/
(string: topic_name)/partitions/
(int: partition_id)¶ トピックの 1 つのパーティションにメッセージを生成します。Avro、JSON スキーマ、および Protobuf 組み込みフォーマットの場合、スキーマに関する情報を指定する必要があります。このスキーマは、文字列としてエンコードされた完全なスキーマとして指定できます。または、最初のリクエストの後に、最初の応答で返されたスキーマ ID として指定できます。
パラメーター: - topic_name (string) -- メッセージを生成する先のトピック
- partition_id (int) -- メッセージを生成する先のパーティション
リクエストの JSON オブジェクト: - key_schema (string) -- 文字列としてエンコードされた完全なスキーマ(たとえば、Avro データ用にシリアル化された JSON)
- key_schema_id (int) -- 同じスキーマを使用する前のリクエストが返した ID。この ID は、レジストリ内のスキーマの ID に対応します。
- value_schema (string) -- 文字列としてエンコードされた完全なスキーマ(たとえば、Avro データ用にシリアル化された JSON)
- value_schema_id (int) -- 同じスキーマを使用する前のリクエストが返した ID。この ID は、レジストリ内のスキーマの ID に対応します。
- records -- パーティションに対して生成するレコードのリスト。
リクエスト(オブジェクトの JSON 配列): - records[i].key (object) -- 組み込みフォーマットに従ってフォーマットされたメッセージキー。キーを省略する場合は null(オプション)
- records[i].value (object) -- 組み込みフォーマットに従ってフォーマットされたメッセージ値
レスポンスの JSON オブジェクト: - key_schema_id (int) -- キーの生成に使用されるスキーマの ID。キーが使用されなかった場合は null
- value_schema_id (int) -- 値を生成するために使用されるスキーマの ID。
応答(オブジェクトの JSON 配列): - offsets (object) -- メッセージのパブリッシュ先のパーティションとオフセットのリスト
- offsets[i].partition (int) -- メッセージのパブリッシュ先のパーティション。これは
partition_id
パラメーターと同じで、トピックに対する生成からの応答との一貫性を維持するためだけに提供されます。 - offsets[i].offset (long) -- メッセージのオフセット
- offsets[i].error_code (long) -- この操作が失敗した理由を分類するエラーコード。成功した場合は null。* 1 - 再試行不可な Kafka 例外 * 2 - 再試行可能な Kafka 例外。再試行すると、メッセージが正常に送信される場合があります
- offsets[i].error (string) -- 操作が失敗した理由を示すエラーメッセージ。成功した場合は null
ステータスコード: - 404 Not Found --
- エラーコード 40401 -- トピックが見つかりません
- エラーコード 40402 -- パーティションが見つかりません
- 422 Unprocessable Entity --
- エラーコード 42201 -- リクエストにキーが含まれており、スキーマを必要とするフォーマットを使用していますが、
key_schema
またはkey_schema_id
フィールドが含まれていません - エラーコード 42202 -- リクエストに値が含まれており、スキーマを必要とするフォーマットを使用していますが、
value_schema
またはvalue_schema_id
フィールドが含まれていません - エラーコード 42205 -- リクエストに無効なスキーマが含まれています。
- エラーコード 42201 -- リクエストにキーが含まれており、スキーマを必要とするフォーマットを使用していますが、
バイナリリクエストの例:
POST /topics/test/partitions/1 HTTP/1.1 Host: kafkaproxy.example.com Content-Type: application/vnd.kafka.binary.v2+json Accept: application/vnd.kafka.v2+json, application/vnd.kafka+json, application/json { "records": [ { "key": "a2V5", "value": "Y29uZmx1ZW50" }, { "value": "a2Fma2E=" } ] }
バイナリ応答の例 :
HTTP/1.1 200 OK Content-Type: application/vnd.kafka.v2+json { "key_schema_id": null, "value_schema_id": null, "offsets": [ { "partition": 1, "offset": 100, }, { "partition": 1, "offset": 101, } ] }
Avro リクエストの例 :
POST /topics/test/partitions/1 HTTP/1.1 Host: kafkaproxy.example.com Content-Type: application/vnd.kafka.avro.v2+json Accept: application/vnd.kafka.v2+json, application/vnd.kafka+json, application/json { "value_schema": "{\"name\":\"int\",\"type\": \"int\"}" "records": [ { "value": 25 }, { "value": 26 } ] }
Avro 応答の例 :
HTTP/1.1 200 OK Content-Type: application/vnd.kafka.v2+json { "key_schema_id": null, "value_schema_id": 32, "offsets": [ { "partition": 1, "offset": 100, }, { "partition": 1, "offset": 101, } ] }
JSON リクエストの例 :
POST /topics/test/partitions/1 HTTP/1.1 Host: kafkaproxy.example.com Content-Type: application/vnd.kafka.json.v2+json Accept: application/vnd.kafka.v2+json, application/vnd.kafka+json, application/json { "records": [ { "key": "somekey", "value": {"foo": "bar"} }, { "value": 53.5 } ] }
JSON 応答の例 :
HTTP/1.1 200 OK Content-Type: application/vnd.kafka.v2+json { "key_schema_id": null, "value_schema_id": null, "offsets": [ { "partition": 1, "offset": 100, }, { "partition": 1, "offset": 101, } ] }
PROTOBUF リクエストの例 :
POST /topics/test/partitions/1 HTTP/1.1 Content-Type: application/vnd.kafka.protobuf.v2+json Accept: application/vnd.kafka.v2+json, application/json { "value_schema": "syntax=\"proto3\"; message Foo { string f1 = 1; }" "records": [{"value": {"f1": "foo"}}] }
PROTOBUF 応答の例 :
HTTP/1.1 200 OK Content-Type: application/vnd.kafka.v2+json { "key_schema_id": null, "value_schema_id": 32, "offsets": [ { "partition": 1, "offset": 100, }, { "partition": 1, "offset": 101, } ] }
JSONSCHEMA リクエストの例 :
POST /topics/test/partitions/1 HTTP/1.1 Content-Type: application/vnd.kafka.jsonschema.v2+json Accept: application/vnd.kafka.v2+json, application/json { "value_schema": "{\"type\":\"object\",\"properties\":{\"f1\":{\"type\":\"string\"}}}", "records": [{"value": {"f1": "bar"}}] }
JSONSCHEMA 応答の例 :
HTTP/1.1 200 OK Content-Type: application/vnd.kafka.v2+json { "key_schema_id": null, "value_schema_id": 32, "offsets": [ { "partition": 1, "offset": 100, }, { "partition": 1, "offset": 101, } ] }
コンシューマー¶
コンシューマーリソースによって、コンシューマーグループの現在のステートを確認できます。その結果、コンシューマグループにコンシューマーを作成したり、トピックおよびパーティションからメッセージを消費したりできます。REST Proxy は、Kafka にシリアル化されたフォーマットで保存されたデータを JSON 互換性のある組み込みフォーマットに変換することができます。以下のフォーマットがサポートされています。
- 未加工のバイナリデータは base64 文字列としてエンコードされる
- Avro データは組み込みデータに変換される
- JSON オブジェクト(JSON は直接組み込まれる)
- Protobuf
- JSON スキーマ
コンシューマーはステートフルであるため、REST API で作成されたコンシューマーインスタンスはすべて特定の REST Proxy インスタンスに関連付けられます。インスタンスが作成されるときに完全な URL が提供され、以降のリクエストの作成に使用されます。返された URL を以降のコンシューマーリクエストに使用していない場合、コンシューマーインスタンスが見つからないため、"404" エラーが発生します。REST Proxy インスタンスがシャットダウンする場合、インスタンスが終了する前にすべてのコンシューマーをクリーンに破棄しようとします。
-
POST
/consumers/
(string: group_name)¶ コンシューマーグループに新規コンシューマーインスタンスを作成します。
format
パラメーターは、Kafka からのデータの逆シリアル化と、このコンシューマーに対して実行される後続の読み取り API リクエストのAccept
ヘッダーで使用する "必須の" コンテンツタイプを制御します。たとえば、作成リクエストでフォーマットにavro
が指定されている場合、後続の読み取りリクエストではAccept: application/vnd.kafka.avro.v2+json
を使用する必要があります。コンシューマーはステートフルで、特定の REST Proxy インスタンスに関連付けられているため、応答にはホストを含む URL が含まれることに注意してください。このセクションの以降の例では、この特定の REST Proxy インスタンスに
Host
ヘッダーを使用します。パラメーター: - group_name (string) -- 結合するコンシューマーグループの名前
リクエストの JSON オブジェクト: - name (string) -- コンシューマーインスタンスの名前。コンシューマーの URL で使用されます。これは、少なくともリクエストを処理する REST Proxy プロセス内で一意である必要があります。省略すると、自動的に生成された ID が使用されます。ほとんどのユースケースでは、自動的に生成された名前を使用することが推奨されます。
- format (string) -- メッセージを JSON 互換性のある形式に変換するために使用される、消費されたメッセージのフォーマット。指定可能な値は、"binary"、"avro"、"json"、"jsonschema"、および
protobuf
です。指定しないと、デフォルトで "binary" になります。 - auto.offset.reset (string) -- コンシューマーの
auto.offset.reset
を設定します。 - auto.commit.enable (string) -- コンシューマーの
auto.commit.enable
を設定します。 - fetch.min.bytes (string) -- このコンシューマーに固有の
fetch.min.bytes
を設定します。 - consumer.request.timeout.ms (string) -- このコンシューマーに固有の
consumer.request.timeout.ms
を設定します。この設定は、最大リクエストサイズにまだ達していない場合に、リクエストのメッセージを待機する最大合計時間を制御します。コンシューマーからブローカーへの基礎的な接続には影響しません。デフォルト値は REST Proxy 構成ファイルから取得されます。
レスポンスの JSON オブジェクト: - instance_id (string) -- このグループ内のコンシューマーインスタンスの一意の ID。
- base_uri (string) -- このコンシューマーインスタンスに対する後続のリクエストの URI を構築するために使用されるベース URI。
http://hostname:port/consumers/consumer_group/instances/instance_id
という形式になります。
ステータスコード: - 409 Conflict --
- エラーコード 40902 -- 指定された名前のコンシューマーインスタンスが既に存在します。
- 422 Unprocessable Entity --
- エラーコード 42204 -- コンシューマー構成が無効です。リクエストに指定された設定の 1 つに無効な値が含まれています。
リクエストの例 :
POST /consumers/testgroup/ HTTP/1.1 Host: kafkaproxy.example.com Content-Type: application/vnd.kafka.v2+json { "name": "my_consumer", "format": "binary", "auto.offset.reset": "earliest", "auto.commit.enable": "false" }
応答の例 :
HTTP/1.1 200 OK Content-Type: application/vnd.kafka.v2+json { "instance_id": "my_consumer", "base_uri": "http://proxy-instance.kafkaproxy.example.com/consumers/testgroup/instances/my_consumer" }
PROTOBUF リクエストの例 :
POST /consumers/testgroup/ HTTP/1.1 Host: kafkaproxy.example.com Content-Type: application/vnd.kafka.protobuf.v2+json { "name": "my_consumer", "format": "protobuf", "auto.offset.reset": "earliest", "auto.commit.enable": "false" }
PROTOBUF 応答の例 :
HTTP/1.1 200 OK Content-Type: application/vnd.kafka.protobuf.v2+json { "instance_id": "my_consumer", "base_uri": "http://proxy-instance.kafkaproxy.example.com/consumers/my_protobuf_consumer" }
JSONSCHEMA リクエストの例 :
POST /consumers/testgroup/ HTTP/1.1 Host: kafkaproxy.example.com Content-Type: application/vnd.kafka.jsonschema.v2+json { "name": "my_consumer", "format": "jsonschema", "auto.offset.reset": "earliest", "auto.commit.enable": "false" }
JSONSCHEMA 応答の例 :
HTTP/1.1 200 OK Content-Type: application/vnd.kafka.jsonschema.v2+json { "instance_id": "my_consumer", "base_uri": "http://proxy-instance.kafkaproxy.example.com/consumers/my_jsonschema_consumer" }
-
DELETE
/consumers/
(string: group_name)/instances/
(string: instance)¶ コンシューマーインスタンスを破棄します。
コンシューマーインスタンスを保持する特定の REST Proxy インスタンスに対して "必ず" 行うリクエストです。
パラメーター: - group_name (string) -- コンシューマーグループの名前
- instance (string) -- コンシューマーインスタンスの ID
ステータスコード: - 404 Not Found --
- エラーコード 40403 -- コンシューマーインスタンスが見つかりません
リクエストの例 :
DELETE /consumers/testgroup/instances/my_consumer HTTP/1.1 Host: proxy-instance.kafkaproxy.example.com Content-Type: application/vnd.kafka.v2+json
応答の例 :
HTTP/1.1 204 No Content
-
POST
/consumers/
(string: group_name)/instances/
(string: instance)/offsets
¶ コンシューマーのオフセットのリストをコミットします。post の本文が空の場合、コンシューマーインスタンスによってフェッチされたすべてのレコードがコミットされます。
コンシューマーインスタンスを保持する特定の REST Proxy インスタンスに対して "必ず" 行うリクエストです。
パラメーター: - group_name (string) -- コンシューマーグループの名前
- instance (string) -- コンシューマーインスタンスの ID
リクエスト(オブジェクトの JSON 配列): - offsets -- パーティション用にコミットするオフセットのリスト
- offsets[i].topic (string) -- トピックの名前
- offsets[i].partition (int) -- パーティション ID
- offset -- コミットするオフセット
ステータスコード: - 404 Not Found --
- エラーコード 40403 -- コンシューマーインスタンスが見つかりません
リクエストの例 :
POST /consumers/testgroup/instances/my_consumer/offsets HTTP/1.1 Host: proxy-instance.kafkaproxy.example.com Content-Type: application/vnd.kafka.v2+json { "offsets": [ { "topic": "test", "partition": 0, "offset": 20 }, { "topic": "test", "partition": 1, "offset": 30 } ] }
-
GET
/consumers/
(string: group_name)/instances/
(string: instance)/offsets
¶ 指定したパーティションについて、最後にコミットされたオフセット(コミットがこの処理で発生したか別のプロセスで発生したか)を取得します。
コンシューマーインスタンスを保持する特定の REST Proxy インスタンスに対して "必ず" 行うリクエストです。
パラメーター: - group_name (string) -- コンシューマーグループの名前
- instance (string) -- コンシューマーインスタンスの ID
リクエスト(オブジェクトの JSON 配列): - partitions -- 最後にコミットされたオフセットを検索するパーティションのリスト
- partitions[i].topic (string) -- トピックの名前
- partitions[i].partition (int) -- パーティション ID
応答(オブジェクトの JSON 配列): - offsets -- コミットされたオフセットのリスト
- offsets[i].topic (string) -- オフセットがコミットされたトピックの名前
- offsets[i].partition (int) -- オフセットがコミットされたパーティション ID
- offsets[i].offset (int) -- コミットされたオフセット
- offsets[i].metadata (string) -- コミットされたオフセットのメタデータ
ステータスコード: - 404 Not Found --
- エラーコード 40402 -- パーティションが見つかりません
- エラーコード 40403 -- コンシューマーインスタンスが見つかりません
リクエストの例 :
GET /consumers/testgroup/instances/my_consumer/offsets HTTP/1.1 Host: proxy-instance.kafkaproxy.example.com Content-Type: application/vnd.kafka.v2+json, application/vnd.kafka+json, application/json { "partitions": [ { "topic": "test", "partition": 0 }, { "topic": "test", "partition": 1 } ] }
応答の例 :
HTTP/1.1 200 OK Content-Type: application/vnd.kafka.v2+json {"offsets": [ { "topic": "test", "partition": 0, "offset": 21, "metadata":"" }, { "topic": "test", "partition": 1, "offset": 31, "metadata":"" } ] }
-
POST
/consumers/
(string: group_name)/instances/
(string: instance)/subscription
¶ 指定したトピックのリストまたはトピックパターンをサブスクライブし、動的に割り当てられたパーティションを取得します。以前のサブスクリプションが存在する場合は、最新のサブスクリプションに置き換えられます。
パラメーター: - group_name (string) -- コンシューマーグループの名前
- instance (string) -- コンシューマーインスタンスの ID
リクエスト(オブジェクトの JSON 配列): - topics -- サブスクライブするトピックのリスト
- topics[i].topic (string) -- トピックの名前
リクエストの JSON オブジェクト: - topic_pattern (string) -- REGEX パターン。topics_pattern フィールドと topics フィールドは同時に使用できません。
ステータスコード: - 404 Not Found --
- エラーコード 40403 -- コンシューマーインスタンスが見つかりません
- 409 Conflict --
- エラーコード 40903 -- トピック、パーティション、およびパターンへのサブスクリプションは同時にできません。
リクエストの例 :
POST /consumers/testgroup/instances/my_consumer/subscription HTTP/1.1 Host: proxy-instance.kafkaproxy.example.com Content-Type: application/vnd.kafka.v2+json { "topics": [ "test1", "test2" ] }
応答の例 :
HTTP/1.1 204 No Content
リクエストの例 :
POST /consumers/testgroup/instances/my_consumer/subscription HTTP/1.1 Host: proxy-instance.kafkaproxy.example.com Content-Type: application/vnd.kafka.v2+json { "topic_pattern": "test.*" }
応答の例 :
HTTP/1.1 204 No Content
-
GET
/consumers/
(string: group_name)/instances/
(string: instance)/subscription
¶ 現在サブスクライブしているトピックのリストを取得します。
パラメーター: - group_name (string) -- コンシューマーグループの名前
- instance (string) -- コンシューマーインスタンスの ID
応答(オブジェクトの JSON 配列): - topics -- サブスクライブしているトピックのリスト
- topics[i] (string) -- トピックの名前
ステータスコード: - 404 Not Found --
- エラーコード 40403 -- コンシューマーインスタンスが見つかりません
リクエストの例 :
GET /consumers/testgroup/instances/my_consumer/subscription HTTP/1.1 Host: proxy-instance.kafkaproxy.example.com Accept: application/vnd.kafka.v2+json
HTTP/1.1 200 OK Content-Type: application/vnd.kafka.v2+json { "topics": [ "test1", "test2" ] }
-
DELETE
/consumers/
(string: group_name)/instances/
(string: instance)/subscription
¶ 現在サブスクライブしているトピックのサブスクライブを解除します。
コンシューマーインスタンスを保持する特定の REST Proxy インスタンスに対して "必ず" 行うリクエストです。
パラメーター: - group_name (string) -- コンシューマーグループの名前
- instance (string) -- コンシューマーインスタンスの ID
ステータスコード: - 404 Not Found --
- エラーコード 40403 -- コンシューマーインスタンスが見つかりません
リクエストの例 :
DELETE /consumers/testgroup/instances/my_consumer/subscription HTTP/1.1 Host: proxy-instance.kafkaproxy.example.com Accept: application/vnd.kafka.v2+json, application/vnd.kafka+json, application/json
応答の例 :
HTTP/1.1 204 No Content
-
POST
/consumers/
(string: group_name)/instances/
(string: instance)/assignments
¶ このコンシューマーにパーティションのリストを手動で割り当てます。
パラメーター: - group_name (string) -- コンシューマーグループの名前
- instance (string) -- コンシューマーインスタンスの ID
リクエスト(オブジェクトの JSON 配列): - partitions -- このコンシューマーに割り当てるパーティションのリスト
- partitions[i].topic (string) -- トピックの名前
- partitions[i].partition (int) -- パーティション ID
ステータスコード: - 404 Not Found --
- エラーコード 40403 -- コンシューマーインスタンスが見つかりません
- 409 Conflict --
- エラーコード 40903 -- トピック、パーティション、およびパターンへのサブスクリプションは同時にできません。
リクエストの例 :
POST /consumers/testgroup/instances/my_consumer/assignments HTTP/1.1 Host: proxy-instance.kafkaproxy.example.com Content-Type: application/vnd.kafka.v2+json { "partitions": [ { "topic": "test", "partition": 0 }, { "topic": "test", "partition": 1 } ] }
応答の例 :
HTTP/1.1 204 No Content
-
GET
/consumers/
(string: group_name)/instances/
(string: instance)/assignments
¶ このコンシューマーに現在手動で割り当てられているパーティションのリストを取得します。
パラメーター: - group_name (string) -- コンシューマーグループの名前
- instance (string) -- コンシューマーインスタンスの ID
応答(オブジェクトの JSON 配列): - partitions -- このコンシューマーに手動で割り当てられているパーティションのリスト
- partitions[i].topic (string) -- トピックの名前
- partitions[i].partition (int) -- パーティション ID
ステータスコード: - 404 Not Found --
- エラーコード 40403 -- コンシューマーインスタンスが見つかりません
リクエストの例 :
GET /consumers/testgroup/instances/my_consumer/assignments HTTP/1.1 Host: proxy-instance.kafkaproxy.example.com Accept: application/vnd.kafka.v2+json
HTTP/1.1 200 OK Content-Type: application/vnd.kafka.v2+json { "partitions": [ { "topic": "test", "partition": 0 }, { "topic": "test", "partition": 1 } ] }
-
POST
/consumers/
(string: group_name)/instances/
(string: instance)/positions
¶ コンシューマーが次にフェッチするレコードセットに使用するフェッチオフセットをオーバーライドします。
パラメーター: - group_name (string) -- コンシューマーグループの名前
- instance (string) -- コンシューマーインスタンスの ID
リクエスト(オブジェクトの JSON 配列): - offsets -- オフセットのリスト
- offsets[i].topic (string) -- オフセットがコミットされたトピックの名前
- offsets[i].partition (int) -- パーティション ID
- offsets[i].offset (int) -- 次にフェッチするレコードセットのオフセットをシークします。
ステータスコード: - 404 Not Found --
- エラーコード 40403 -- コンシューマーインスタンスが見つかりません
リクエストの例 :
POST /consumers/testgroup/instances/my_consumer/positions HTTP/1.1 Host: proxy-instance.kafkaproxy.example.com Content-Type: application/vnd.kafka.v2+json { "offsets": [ { "topic": "test", "partition": 0, "offset": 20 }, { "topic": "test", "partition": 1, "offset": 30 } ] }
応答の例 :
HTTP/1.1 204 No Content
-
POST
/consumers/
(string: group_name)/instances/
(string: instance)/positions/beginning
¶ 指定した各パーティションの最初のオフセットをシークします。
パラメーター: - group_name (string) -- コンシューマーグループの名前
- instance (string) -- コンシューマーインスタンスの ID
リクエスト(オブジェクトの JSON 配列): - partitions -- パーティションのリスト
- partitions[i].topic (string) -- トピックの名前
- partitions[i].partition (int) -- パーティション ID
ステータスコード: - 404 Not Found --
- エラーコード 40403 -- コンシューマーインスタンスが見つかりません
リクエストの例 :
POST /consumers/testgroup/instances/my_consumer/positions/beginning HTTP/1.1 Host: proxy-instance.kafkaproxy.example.com Content-Type: application/vnd.kafka.v2+json { "partitions": [ { "topic": "test", "partition": 0 }, { "topic": "test", "partition": 1 } ] }
応答の例 :
HTTP/1.1 204 No Content
-
POST
/consumers/
(string: group_name)/instances/
(string: instance)/positions/end
¶ 指定した各パーティションの最後のオフセットをシークします。
パラメーター: - group_name (string) -- コンシューマーグループの名前
- instance (string) -- コンシューマーインスタンスの ID
リクエスト(オブジェクトの JSON 配列): - partitions -- パーティションのリスト
- partitions[i].topic (string) -- トピックの名前
- partitions[i].partition (int) -- パーティション ID
ステータスコード: - 404 Not Found --
- エラーコード 40403 -- コンシューマーインスタンスが見つかりません
リクエストの例 :
POST /consumers/testgroup/instances/my_consumer/positions/end HTTP/1.1 Host: proxy-instance.kafkaproxy.example.com Content-Type: application/vnd.kafka.v2+json { "partitions": [ { "topic": "test", "partition": 0 }, { "topic": "test", "partition": 1 } ] }
応答の例 :
HTTP/1.1 204 No Content
-
GET
/consumers/
(string: group_name)/instances/
(string: instance)/records
¶ サブスクライブ API または割り当て API のいずれかを使用して指定されたトピックまたはパーティションのデータをフェッチします。
このリクエストによって返される組み込みデータのフォーマットは、最初のコンシューマーインスタンス作成リクエストで指定されたフォーマットによって決まり、
Accept
ヘッダーのフォーマットと一致する必要があります。一致しない場合、エラーコード40601
が発生します。コンシューマーインスタンスを保持する特定の REST Proxy インスタンスに対して "必ず" 行うリクエストです。
パラメーター: - group_name (string) -- コンシューマーグループの名前
- instance (string) -- コンシューマーインスタンスの ID
クエリのパラメーター: - timeout -- REST Proxy がレコードのフェッチに費やす最大時間(ミリ秒)。レコードのフェッチにかかった実際の時間を制御するその他のパラメーター : max_bytes および fetch.min.bytes。デフォルト値は未定義です。このパラメーターは、コンシューマーインスタンスの作成時または REST Proxy の構成ファイルのいずれかで定義された consumer.timeout.ms より小さい場合にのみ使用されます。
- max_bytes -- 応答に含まれるエンコードされていないキーと値の最大バイト数。これにより、応答のサイズと、デコードされた応答を保存するために必要なメモリーの量を大まかに制御できます。実際の制限は、この設定とサーバー側の構成
consumer.request.max.bytes
における最小値です。デフォルトは無制限です。
応答(オブジェクトの JSON 配列): - topic (string) -- トピック
- key (string) -- 組み込みフォーマットに従ってフォーマットされたメッセージキー
- value (string) -- 組み込みフォーマットに従ってフォーマットされたメッセージ値
- partition (int) -- メッセージのパーティション
- offset (long) -- メッセージのオフセット
ステータスコード: - 404 Not Found --
- エラーコード 40403 -- コンシューマーインスタンスが見つかりません
- 406 Not Acceptable --
- エラーコード 40601 -- コンシューマーフォーマットが
Accept
ヘッダーがリクエストした組み込みフォーマットと一致しません。
- エラーコード 40601 -- コンシューマーフォーマットが
バイナリリクエストの例:
GET /consumers/testgroup/instances/my_consumer/records?timeout=3000&max_bytes=300000 HTTP/1.1 Host: proxy-instance.kafkaproxy.example.com Accept: application/vnd.kafka.binary.v2+json
バイナリ応答の例 :
HTTP/1.1 200 OK Content-Type: application/vnd.kafka.binary.v2+json [ { "topic": "test", "key": "a2V5", "value": "Y29uZmx1ZW50", "partition": 1, "offset": 100, }, { "topic": "test", "key": "a2V5", "value": "a2Fma2E=", "partition": 2, "offset": 101, } ]
Avro リクエストの例 :
GET /consumers/avrogroup/instances/my_avro_consumer/records?timeout=3000&max_bytes=300000 HTTP/1.1 Host: proxy-instance.kafkaproxy.example.com Accept: application/vnd.kafka.avro.v2+json
Avro 応答の例 :
HTTP/1.1 200 OK Content-Type: application/vnd.kafka.avro.v2+json [ { "topic": "test", "key": 1, "value": { "id": 1, "name": "Bill" }, "partition": 1, "offset": 100, }, { "topic": "test", "key": 2, "value": { "id": 2, "name": "Melinda" }, "partition": 2, "offset": 101, } ]
JSON リクエストの例 :
GET /consumers/jsongroup/instances/my_json_consumer/records?timeout=3000&max_bytes=300000 HTTP/1.1 Host: proxy-instance.kafkaproxy.example.com Accept: application/vnd.kafka.json.v2+json
JSON 応答の例 :
HTTP/1.1 200 OK Content-Type: application/vnd.kafka.json.v2+json [ { "topic": "test", "key": "somekey", "value": {"foo":"bar"}, "partition": 1, "offset": 10, }, { "topic": "test", "key": "somekey", "value": ["foo", "bar"], "partition": 2, "offset": 11, } ]
ブローカー¶
ブローカーリソースによって、クラスター内の Kafka ブローカーの現在のステートを確認できます。
-
GET
/brokers
¶ ブローカーのリストを取得します。
レスポンスの JSON オブジェクト: - brokers (array) -- ブローカー ID のリスト
リクエストの例 :
GET /brokers HTTP/1.1 Host: kafkaproxy.example.com Accept: application/vnd.kafka.v2+json, application/vnd.kafka+json, application/json
応答の例 :
HTTP/1.1 200 OK Content-Type: application/vnd.kafka.v2+json { "brokers": [1, 2, 3] }
REST Proxy API v3¶
これらの API は、Confluent Server (Confluent Enterprise の一部として)と REST Proxy の両方で使用できます。Confluent Server で API を使用する場合、すべてのパスの先頭に /kafka
を付ける必要があります。たとえば、クラスターをリストするパスは以下のようになります。
- Confluent Server:
/kafka/v3/clusters
- REST Proxy:
/v3/clusters
Confluent Server は、v3 の管理用 API 用の Kafka ブローカーで、これらの API の組み込みインスタンスを提供します。組み込み API は、Confluent HTTP サービス confluent.http.server.listeners
で実行されます。このため、HTTP サーバーを実行している場合、REST Proxy v3 API は、ブローカーを通じて自動的に利用可能になります。Confluent HTTP サービス上では、追加の構成で使用できる別のエンドポイントとして、Metadata Server(MDS) も実行されています。
ちなみに
以下のセクションも参照してください。
- REST API の使用例(curl)。API エンドポイントをコマンドラインからテストする方法について説明しています。
- Admin REST APIs の構成オプション
- Kafka REST API 機能での管理操作
- Confluent Admin REST APIs demo
クラスター(v3)¶
-
GET
/clusters
¶ クラスターの一覧表示
既知の Kafka クラスターのリストを返します。現在、Kafka と Kafka REST Proxy はどちらも
bootstrap.servers
の構成が指す Kafka クラスターしか認識しません。したがって、1 つの Kafka クラスターのみ応答で返されます。リクエストの例:
GET /clusters HTTP/1.1 Host: example.com
ステータスコード: - 200 OK --
Kafka クラスターのリスト。
応答の例:
HTTP/1.1 200 OK Content-Type: application/json { "kind": "KafkaClusterList", "metadata": { "self": "https://pkc-00000.region.provider.confluent.cloud/kafka/v3/clusters", "next": null }, "data": [ { "kind": "KafkaCluster", "metadata": { "self": "https://pkc-00000.region.provider.confluent.cloud/kafka/v3/clusters/cluster-1", "resource_name": "crn:///kafka=cluster-1" }, "cluster_id": "cluster-1", "controller": { "related": "https://pkc-00000.region.provider.confluent.cloud/kafka/v3/clusters/cluster-1/brokers/1" }, "acls": { "related": "https://pkc-00000.region.provider.confluent.cloud/kafka/v3/clusters/cluster-1/acls" }, "brokers": { "related": "https://pkc-00000.region.provider.confluent.cloud/kafka/v3/clusters/cluster-1/brokers" }, "broker_configs": { "related": "https://pkc-00000.region.provider.confluent.cloud/kafka/v3/clusters/cluster-1/broker-configs" }, "consumer_groups": { "related": "https://pkc-00000.region.provider.confluent.cloud/kafka/v3/clusters/cluster-1/consumer-groups" }, "topics": { "related": "https://pkc-00000.region.provider.confluent.cloud/kafka/v3/clusters/cluster-1/topics" }, "partition_reassignments": { "related": "https://pkc-00000.region.provider.confluent.cloud/kafka/v3/clusters/cluster-1/topics/-/partitions/-/reassignment" } } ] }
- 400 Bad Request --
無効なリクエストエラーを示します。リクエスト本文の予期しないフォーマット、またはそれ以外のリクエスト検証の失敗が原因で発生した可能性があります。通常は application/json コンテンツになりますが、場合によっては単純な text/plain コンテンツが返されます。
create_topic_already_exists:
HTTP/1.1 400 Bad Request Content-Type: application/json { "error_code": 40002, "message": "Topic 'my-topic' already exists." }
produce_message_badly_escaped:
HTTP/1.1 400 Bad Request Content-Type: application/json { "error_code": 400, "message": "Unexpected character ('k' (code 107)): was expecting double-quote to start field name\n at [Source: (org.glassfish.jersey.message.internal.ReaderInterceptorExecutor$UnCloseableInputStream); line: 1, column: 3]" }
応答の例:
HTTP/1.1 400 Bad Request Content-Type: text/plain { "description": "Thrown when trying to create a topic and passing a string for the replication factor.", "value": "Cannot deserialize value of type `java.lang.Integer` from String \"all\": not a valid Integer value\\n at [Source: (org.glassfish.jersey.message.internal.ReaderInterceptorExecutor$UnCloseableInputStream); line: 1, column: 53] (through reference chain: io.confluent.kafkarest.entities.v3.CreateTopicRequest[\"partitions_count\"])" }
- 401 Unauthorized --
クライアント認証エラーを示します。Kafka の認証の失敗では、応答の本文にエラーコード 40101 が含まれます。
kafka_authentication_failed:
HTTP/1.1 401 Unauthorized Content-Type: application/json { "error_code": 40101, "message": "Authentication failed" }
- 429 Too Many Requests --
レート制限のしきい値に達したことを示します。クライアントは後で再試行する必要があります。
応答の例:
HTTP/1.1 429 Too Many Requests Content-Type: text/html { "description": "A sample response from Jetty's DoSFilter.", "value": "<html> <head> <meta http-equiv=\"Content-Type\" content=\"text/html;charset=utf-8\"/> <title>Error 429 Too Many Requests</title> </head> <body> <h2>HTTP ERROR 429 Too Many Requests</h2> <table> <tr> <th>URI:</th> <td>/v3/clusters/my-cluster</td> </tr> <tr> <th>STATUS:</th> <td>429</td> </tr> <tr> <th>MESSAGE:</th> <td>Too Many Requests</td> </tr> <tr> <th>SERVLET:</th> <td>default</td> </tr> </table> </body> </html>" }
- 5XX --
クライアント側から対処できない可能性がある、サーバー側の問題です。再試行可能な Kafka エラーでは、応答の本文にエラーコード 50003 が含まれます。
generic_internal_server_error:
HTTP/1.1 5XX - Content-Type: application/json { "error_code": 500, "message": "Internal Server Error" }
produce_v3_missing_schema:
HTTP/1.1 5XX - Content-Type: application/json { "error_code": 50002, "message": "Error when fetching latest schema version. subject = my-topic" }
- 200 OK --
-
GET
/clusters/{cluster_id}
¶ クラスターの取得
指定された
cluster_id
を持つ Kafka クラスターを返します。パラメーター: - cluster_id (string) -- Kafka クラスター ID。
リクエストの例:
GET /clusters/{cluster_id} HTTP/1.1 Host: example.com
ステータスコード: - 200 OK --
Kafka クラスター。
応答の例:
HTTP/1.1 200 OK Content-Type: application/json { "kind": "KafkaCluster", "metadata": { "self": "https://pkc-00000.region.provider.confluent.cloud/kafka/v3/clusters/cluster-1", "resource_name": "crn:///kafka=cluster-1" }, "cluster_id": "cluster-1", "controller": { "related": "https://pkc-00000.region.provider.confluent.cloud/kafka/v3/clusters/cluster-1/brokers/1" }, "acls": { "related": "https://pkc-00000.region.provider.confluent.cloud/kafka/v3/clusters/cluster-1/acls" }, "brokers": { "related": "https://pkc-00000.region.provider.confluent.cloud/kafka/v3/clusters/cluster-1/brokers" }, "broker_configs": { "related": "https://pkc-00000.region.provider.confluent.cloud/kafka/v3/clusters/cluster-1/broker-configs" }, "consumer_groups": { "related": "https://pkc-00000.region.provider.confluent.cloud/kafka/v3/clusters/cluster-1/consumer-groups" }, "topics": { "related": "https://pkc-00000.region.provider.confluent.cloud/kafka/v3/clusters/cluster-1/topics" }, "partition_reassignments": { "related": "https://pkc-00000.region.provider.confluent.cloud/kafka/v3/clusters/cluster-1/topics/-/partitions/-/reassignment" } }
- 400 Bad Request --
無効なリクエストエラーを示します。リクエスト本文の予期しないフォーマット、またはそれ以外のリクエスト検証の失敗が原因で発生した可能性があります。通常は application/json コンテンツになりますが、場合によっては単純な text/plain コンテンツが返されます。
create_topic_already_exists:
HTTP/1.1 400 Bad Request Content-Type: application/json { "error_code": 40002, "message": "Topic 'my-topic' already exists." }
produce_message_badly_escaped:
HTTP/1.1 400 Bad Request Content-Type: application/json { "error_code": 400, "message": "Unexpected character ('k' (code 107)): was expecting double-quote to start field name\n at [Source: (org.glassfish.jersey.message.internal.ReaderInterceptorExecutor$UnCloseableInputStream); line: 1, column: 3]" }
応答の例:
HTTP/1.1 400 Bad Request Content-Type: text/plain { "description": "Thrown when trying to create a topic and passing a string for the replication factor.", "value": "Cannot deserialize value of type `java.lang.Integer` from String \"all\": not a valid Integer value\\n at [Source: (org.glassfish.jersey.message.internal.ReaderInterceptorExecutor$UnCloseableInputStream); line: 1, column: 53] (through reference chain: io.confluent.kafkarest.entities.v3.CreateTopicRequest[\"partitions_count\"])" }
- 401 Unauthorized --
クライアント認証エラーを示します。Kafka の認証の失敗では、応答の本文にエラーコード 40101 が含まれます。
kafka_authentication_failed:
HTTP/1.1 401 Unauthorized Content-Type: application/json { "error_code": 40101, "message": "Authentication failed" }
- 429 Too Many Requests --
レート制限のしきい値に達したことを示します。クライアントは後で再試行する必要があります。
応答の例:
HTTP/1.1 429 Too Many Requests Content-Type: text/html { "description": "A sample response from Jetty's DoSFilter.", "value": "<html> <head> <meta http-equiv=\"Content-Type\" content=\"text/html;charset=utf-8\"/> <title>Error 429 Too Many Requests</title> </head> <body> <h2>HTTP ERROR 429 Too Many Requests</h2> <table> <tr> <th>URI:</th> <td>/v3/clusters/my-cluster</td> </tr> <tr> <th>STATUS:</th> <td>429</td> </tr> <tr> <th>MESSAGE:</th> <td>Too Many Requests</td> </tr> <tr> <th>SERVLET:</th> <td>default</td> </tr> </table> </body> </html>" }
- 5XX --
クライアント側から対処できない可能性がある、サーバー側の問題です。再試行可能な Kafka エラーでは、応答の本文にエラーコード 50003 が含まれます。
generic_internal_server_error:
HTTP/1.1 5XX - Content-Type: application/json { "error_code": 500, "message": "Internal Server Error" }
produce_v3_missing_schema:
HTTP/1.1 5XX - Content-Type: application/json { "error_code": 50002, "message": "Error when fetching latest schema version. subject = my-topic" }
構成(v3)¶
-
GET
/clusters/{cluster_id}/broker-configs
¶ クラスター構成の一覧表示
指定された Kafka クラスターの構成パラメーターのリストを返します。
パラメーター: - cluster_id (string) -- Kafka クラスター ID。
リクエストの例:
GET /clusters/{cluster_id}/broker-configs HTTP/1.1 Host: example.com
ステータスコード: - 200 OK --
クラスター構成のリスト。
応答の例:
HTTP/1.1 200 OK Content-Type: application/json { "kind": "KafkaClusterConfigList", "metadata": { "self": "https://pkc-00000.region.provider.confluent.cloud/kafka/v3/clusters/cluster-1/broker-configs", "next": null }, "data": [ { "kind": "KafkaClusterConfig", "metadata": { "self": "https://pkc-00000.region.provider.confluent.cloud/kafka/v3/clusters/cluster-1/broker-configs/max.connections", "resource_name": "crn:///kafka=cluster-1/broker-config=max.connections" }, "cluster_id": "cluster-1", "config_type": "BROKER", "name": "max.connections", "value": "1000", "is_default": false, "is_read_only": false, "is_sensitive": false, "source": "DYNAMIC_DEFAULT_BROKER_CONFIG", "synonyms": [ { "name": "max.connections", "value": "1000", "source": "DYNAMIC_DEFAULT_BROKER_CONFIG" }, { "name": "max.connections", "value": "2147483647", "source": "DEFAULT_CONFIG" } ] }, { "kind": "KafkaClusterConfig", "metadata": { "self": "https://pkc-00000.region.provider.confluent.cloud/kafka/v3/clusters/cluster-1/broker-configs/compression.type", "resource_name": "crn:///kafka=cluster-1/broker-config=compression.type" }, "cluster_id": "cluster-1", "config_type": "BROKER", "name": "compression.type", "value": "gzip", "is_default": false, "is_read_only": false, "is_sensitive": false, "source": "DYNAMIC_DEFAULT_BROKER_CONFIG", "synonyms": [ { "name": "compression.type", "value": "gzip", "source": "DYNAMIC_DEFAULT_BROKER_CONFIG" }, { "name": "compression.type", "value": "producer", "source": "DEFAULT_CONFIG" } ] } ] }
- 400 Bad Request --
無効なリクエストエラーを示します。リクエスト本文の予期しないフォーマット、またはそれ以外のリクエスト検証の失敗が原因で発生した可能性があります。通常は application/json コンテンツになりますが、場合によっては単純な text/plain コンテンツが返されます。
create_topic_already_exists:
HTTP/1.1 400 Bad Request Content-Type: application/json { "error_code": 40002, "message": "Topic 'my-topic' already exists." }
produce_message_badly_escaped:
HTTP/1.1 400 Bad Request Content-Type: application/json { "error_code": 400, "message": "Unexpected character ('k' (code 107)): was expecting double-quote to start field name\n at [Source: (org.glassfish.jersey.message.internal.ReaderInterceptorExecutor$UnCloseableInputStream); line: 1, column: 3]" }
応答の例:
HTTP/1.1 400 Bad Request Content-Type: text/plain { "description": "Thrown when trying to create a topic and passing a string for the replication factor.", "value": "Cannot deserialize value of type `java.lang.Integer` from String \"all\": not a valid Integer value\\n at [Source: (org.glassfish.jersey.message.internal.ReaderInterceptorExecutor$UnCloseableInputStream); line: 1, column: 53] (through reference chain: io.confluent.kafkarest.entities.v3.CreateTopicRequest[\"partitions_count\"])" }
- 401 Unauthorized --
クライアント認証エラーを示します。Kafka の認証の失敗では、応答の本文にエラーコード 40101 が含まれます。
kafka_authentication_failed:
HTTP/1.1 401 Unauthorized Content-Type: application/json { "error_code": 40101, "message": "Authentication failed" }
- 429 Too Many Requests --
レート制限のしきい値に達したことを示します。クライアントは後で再試行する必要があります。
応答の例:
HTTP/1.1 429 Too Many Requests Content-Type: text/html { "description": "A sample response from Jetty's DoSFilter.", "value": "<html> <head> <meta http-equiv=\"Content-Type\" content=\"text/html;charset=utf-8\"/> <title>Error 429 Too Many Requests</title> </head> <body> <h2>HTTP ERROR 429 Too Many Requests</h2> <table> <tr> <th>URI:</th> <td>/v3/clusters/my-cluster</td> </tr> <tr> <th>STATUS:</th> <td>429</td> </tr> <tr> <th>MESSAGE:</th> <td>Too Many Requests</td> </tr> <tr> <th>SERVLET:</th> <td>default</td> </tr> </table> </body> </html>" }
- 5XX --
クライアント側から対処できない可能性がある、サーバー側の問題です。再試行可能な Kafka エラーでは、応答の本文にエラーコード 50003 が含まれます。
generic_internal_server_error:
HTTP/1.1 5XX - Content-Type: application/json { "error_code": 500, "message": "Internal Server Error" }
produce_v3_missing_schema:
HTTP/1.1 5XX - Content-Type: application/json { "error_code": 50002, "message": "Error when fetching latest schema version. subject = my-topic" }
-
POST
/clusters/{cluster_id}/broker-configs:alter
¶ クラスター構成のバッチ変更
一連の Kafka クラスター構成パラメーターをアップデートまたは削除します。
パラメーター: - cluster_id (string) -- Kafka クラスター ID。
リクエストの例:
POST /clusters/{cluster_id}/broker-configs:alter HTTP/1.1 Host: example.com Content-Type: application/json { "data": [ { "name": "max.connections", "operation": "DELETE" }, { "name": "compression.type", "value": "gzip" } ] }
ステータスコード: - 204 No Content -- コンテンツなし
- 400 Bad Request --
無効なリクエストエラーを示します。リクエスト本文の予期しないフォーマット、またはそれ以外のリクエスト検証の失敗が原因で発生した可能性があります。通常は application/json コンテンツになりますが、場合によっては単純な text/plain コンテンツが返されます。
create_topic_already_exists:
HTTP/1.1 400 Bad Request Content-Type: application/json { "error_code": 40002, "message": "Topic 'my-topic' already exists." }
produce_message_badly_escaped:
HTTP/1.1 400 Bad Request Content-Type: application/json { "error_code": 400, "message": "Unexpected character ('k' (code 107)): was expecting double-quote to start field name\n at [Source: (org.glassfish.jersey.message.internal.ReaderInterceptorExecutor$UnCloseableInputStream); line: 1, column: 3]" }
応答の例:
HTTP/1.1 400 Bad Request Content-Type: text/plain { "description": "Thrown when trying to create a topic and passing a string for the replication factor.", "value": "Cannot deserialize value of type `java.lang.Integer` from String \"all\": not a valid Integer value\\n at [Source: (org.glassfish.jersey.message.internal.ReaderInterceptorExecutor$UnCloseableInputStream); line: 1, column: 53] (through reference chain: io.confluent.kafkarest.entities.v3.CreateTopicRequest[\"partitions_count\"])" }
- 401 Unauthorized --
クライアント認証エラーを示します。Kafka の認証の失敗では、応答の本文にエラーコード 40101 が含まれます。
kafka_authentication_failed:
HTTP/1.1 401 Unauthorized Content-Type: application/json { "error_code": 40101, "message": "Authentication failed" }
- 429 Too Many Requests --
レート制限のしきい値に達したことを示します。クライアントは後で再試行する必要があります。
応答の例:
HTTP/1.1 429 Too Many Requests Content-Type: text/html { "description": "A sample response from Jetty's DoSFilter.", "value": "<html> <head> <meta http-equiv=\"Content-Type\" content=\"text/html;charset=utf-8\"/> <title>Error 429 Too Many Requests</title> </head> <body> <h2>HTTP ERROR 429 Too Many Requests</h2> <table> <tr> <th>URI:</th> <td>/v3/clusters/my-cluster</td> </tr> <tr> <th>STATUS:</th> <td>429</td> </tr> <tr> <th>MESSAGE:</th> <td>Too Many Requests</td> </tr> <tr> <th>SERVLET:</th> <td>default</td> </tr> </table> </body> </html>" }
- 5XX --
クライアント側から対処できない可能性がある、サーバー側の問題です。再試行可能な Kafka エラーでは、応答の本文にエラーコード 50003 が含まれます。
generic_internal_server_error:
HTTP/1.1 5XX - Content-Type: application/json { "error_code": 500, "message": "Internal Server Error" }
produce_v3_missing_schema:
HTTP/1.1 5XX - Content-Type: application/json { "error_code": 50002, "message": "Error when fetching latest schema version. subject = my-topic" }
-
GET
/clusters/{cluster_id}/broker-configs/{name}
¶ クラスター構成の取得
name
で指定された構成パラメーターを返します。パラメーター: - cluster_id (string) -- Kafka クラスター ID。
- name (string) -- 構成パラメーター名。
リクエストの例:
GET /clusters/{cluster_id}/broker-configs/{name} HTTP/1.1 Host: example.com
ステータスコード: - 200 OK --
クラスターの構成パラメーター。
応答の例:
HTTP/1.1 200 OK Content-Type: application/json { "kind": "KafkaClusterConfig", "metadata": { "self": "https://pkc-00000.region.provider.confluent.cloud/kafka/v3/clusters/cluster-1/broker-configs/compression.type", "resource_name": "crn:///kafka=cluster-1/broker-config=compression.type" }, "cluster_id": "cluster-1", "config_type": "BROKER", "name": "compression.type", "value": "gzip", "is_default": false, "is_read_only": false, "is_sensitive": false, "source": "DYNAMIC_DEFAULT_BROKER_CONFIG", "synonyms": [ { "name": "compression.type", "value": "gzip", "source": "DYNAMIC_DEFAULT_BROKER_CONFIG" }, { "name": "compression.type", "value": "producer", "source": "DEFAULT_CONFIG" } ] }
- 400 Bad Request --
無効なリクエストエラーを示します。リクエスト本文の予期しないフォーマット、またはそれ以外のリクエスト検証の失敗が原因で発生した可能性があります。通常は application/json コンテンツになりますが、場合によっては単純な text/plain コンテンツが返されます。
create_topic_already_exists:
HTTP/1.1 400 Bad Request Content-Type: application/json { "error_code": 40002, "message": "Topic 'my-topic' already exists." }
produce_message_badly_escaped:
HTTP/1.1 400 Bad Request Content-Type: application/json { "error_code": 400, "message": "Unexpected character ('k' (code 107)): was expecting double-quote to start field name\n at [Source: (org.glassfish.jersey.message.internal.ReaderInterceptorExecutor$UnCloseableInputStream); line: 1, column: 3]" }
応答の例:
HTTP/1.1 400 Bad Request Content-Type: text/plain { "description": "Thrown when trying to create a topic and passing a string for the replication factor.", "value": "Cannot deserialize value of type `java.lang.Integer` from String \"all\": not a valid Integer value\\n at [Source: (org.glassfish.jersey.message.internal.ReaderInterceptorExecutor$UnCloseableInputStream); line: 1, column: 53] (through reference chain: io.confluent.kafkarest.entities.v3.CreateTopicRequest[\"partitions_count\"])" }
- 401 Unauthorized --
クライアント認証エラーを示します。Kafka の認証の失敗では、応答の本文にエラーコード 40101 が含まれます。
kafka_authentication_failed:
HTTP/1.1 401 Unauthorized Content-Type: application/json { "error_code": 40101, "message": "Authentication failed" }
- 429 Too Many Requests --
レート制限のしきい値に達したことを示します。クライアントは後で再試行する必要があります。
応答の例:
HTTP/1.1 429 Too Many Requests Content-Type: text/html { "description": "A sample response from Jetty's DoSFilter.", "value": "<html> <head> <meta http-equiv=\"Content-Type\" content=\"text/html;charset=utf-8\"/> <title>Error 429 Too Many Requests</title> </head> <body> <h2>HTTP ERROR 429 Too Many Requests</h2> <table> <tr> <th>URI:</th> <td>/v3/clusters/my-cluster</td> </tr> <tr> <th>STATUS:</th> <td>429</td> </tr> <tr> <th>MESSAGE:</th> <td>Too Many Requests</td> </tr> <tr> <th>SERVLET:</th> <td>default</td> </tr> </table> </body> </html>" }
- 5XX --
クライアント側から対処できない可能性がある、サーバー側の問題です。再試行可能な Kafka エラーでは、応答の本文にエラーコード 50003 が含まれます。
generic_internal_server_error:
HTTP/1.1 5XX - Content-Type: application/json { "error_code": 500, "message": "Internal Server Error" }
produce_v3_missing_schema:
HTTP/1.1 5XX - Content-Type: application/json { "error_code": 50002, "message": "Error when fetching latest schema version. subject = my-topic" }
-
PUT
/clusters/{cluster_id}/broker-configs/{name}
¶ クラスター構成のアップデート
name
で指定された構成パラメーターをアップデートします。パラメーター: - cluster_id (string) -- Kafka クラスター ID。
- name (string) -- 構成パラメーター名。
リクエストの例:
PUT /clusters/{cluster_id}/broker-configs/{name} HTTP/1.1 Host: example.com Content-Type: application/json { "value": "gzip" }
ステータスコード: - 204 No Content -- コンテンツなし
- 400 Bad Request --
無効なリクエストエラーを示します。リクエスト本文の予期しないフォーマット、またはそれ以外のリクエスト検証の失敗が原因で発生した可能性があります。通常は application/json コンテンツになりますが、場合によっては単純な text/plain コンテンツが返されます。
create_topic_already_exists:
HTTP/1.1 400 Bad Request Content-Type: application/json { "error_code": 40002, "message": "Topic 'my-topic' already exists." }
produce_message_badly_escaped:
HTTP/1.1 400 Bad Request Content-Type: application/json { "error_code": 400, "message": "Unexpected character ('k' (code 107)): was expecting double-quote to start field name\n at [Source: (org.glassfish.jersey.message.internal.ReaderInterceptorExecutor$UnCloseableInputStream); line: 1, column: 3]" }
応答の例:
HTTP/1.1 400 Bad Request Content-Type: text/plain { "description": "Thrown when trying to create a topic and passing a string for the replication factor.", "value": "Cannot deserialize value of type `java.lang.Integer` from String \"all\": not a valid Integer value\\n at [Source: (org.glassfish.jersey.message.internal.ReaderInterceptorExecutor$UnCloseableInputStream); line: 1, column: 53] (through reference chain: io.confluent.kafkarest.entities.v3.CreateTopicRequest[\"partitions_count\"])" }
- 401 Unauthorized --
クライアント認証エラーを示します。Kafka の認証の失敗では、応答の本文にエラーコード 40101 が含まれます。
kafka_authentication_failed:
HTTP/1.1 401 Unauthorized Content-Type: application/json { "error_code": 40101, "message": "Authentication failed" }
- 429 Too Many Requests --
レート制限のしきい値に達したことを示します。クライアントは後で再試行する必要があります。
応答の例:
HTTP/1.1 429 Too Many Requests Content-Type: text/html { "description": "A sample response from Jetty's DoSFilter.", "value": "<html> <head> <meta http-equiv=\"Content-Type\" content=\"text/html;charset=utf-8\"/> <title>Error 429 Too Many Requests</title> </head> <body> <h2>HTTP ERROR 429 Too Many Requests</h2> <table> <tr> <th>URI:</th> <td>/v3/clusters/my-cluster</td> </tr> <tr> <th>STATUS:</th> <td>429</td> </tr> <tr> <th>MESSAGE:</th> <td>Too Many Requests</td> </tr> <tr> <th>SERVLET:</th> <td>default</td> </tr> </table> </body> </html>" }
- 5XX --
クライアント側から対処できない可能性がある、サーバー側の問題です。再試行可能な Kafka エラーでは、応答の本文にエラーコード 50003 が含まれます。
generic_internal_server_error:
HTTP/1.1 5XX - Content-Type: application/json { "error_code": 500, "message": "Internal Server Error" }
produce_v3_missing_schema:
HTTP/1.1 5XX - Content-Type: application/json { "error_code": 50002, "message": "Error when fetching latest schema version. subject = my-topic" }
-
DELETE
/clusters/{cluster_id}/broker-configs/{name}
¶ クラスター構成のリセット
name
で指定された構成パラメーターをデフォルト値にリセットします。パラメーター: - cluster_id (string) -- Kafka クラスター ID。
- name (string) -- 構成パラメーター名。
ステータスコード: - 204 No Content -- コンテンツなし
- 400 Bad Request --
無効なリクエストエラーを示します。リクエスト本文の予期しないフォーマット、またはそれ以外のリクエスト検証の失敗が原因で発生した可能性があります。通常は application/json コンテンツになりますが、場合によっては単純な text/plain コンテンツが返されます。
create_topic_already_exists:
HTTP/1.1 400 Bad Request Content-Type: application/json { "error_code": 40002, "message": "Topic 'my-topic' already exists." }
produce_message_badly_escaped:
HTTP/1.1 400 Bad Request Content-Type: application/json { "error_code": 400, "message": "Unexpected character ('k' (code 107)): was expecting double-quote to start field name\n at [Source: (org.glassfish.jersey.message.internal.ReaderInterceptorExecutor$UnCloseableInputStream); line: 1, column: 3]" }
応答の例:
HTTP/1.1 400 Bad Request Content-Type: text/plain { "description": "Thrown when trying to create a topic and passing a string for the replication factor.", "value": "Cannot deserialize value of type `java.lang.Integer` from String \"all\": not a valid Integer value\\n at [Source: (org.glassfish.jersey.message.internal.ReaderInterceptorExecutor$UnCloseableInputStream); line: 1, column: 53] (through reference chain: io.confluent.kafkarest.entities.v3.CreateTopicRequest[\"partitions_count\"])" }
- 401 Unauthorized --
クライアント認証エラーを示します。Kafka の認証の失敗では、応答の本文にエラーコード 40101 が含まれます。
kafka_authentication_failed:
HTTP/1.1 401 Unauthorized Content-Type: application/json { "error_code": 40101, "message": "Authentication failed" }
- 429 Too Many Requests --
レート制限のしきい値に達したことを示します。クライアントは後で再試行する必要があります。
応答の例:
HTTP/1.1 429 Too Many Requests Content-Type: text/html { "description": "A sample response from Jetty's DoSFilter.", "value": "<html> <head> <meta http-equiv=\"Content-Type\" content=\"text/html;charset=utf-8\"/> <title>Error 429 Too Many Requests</title> </head> <body> <h2>HTTP ERROR 429 Too Many Requests</h2> <table> <tr> <th>URI:</th> <td>/v3/clusters/my-cluster</td> </tr> <tr> <th>STATUS:</th> <td>429</td> </tr> <tr> <th>MESSAGE:</th> <td>Too Many Requests</td> </tr> <tr> <th>SERVLET:</th> <td>default</td> </tr> </table> </body> </html>" }
- 5XX --
クライアント側から対処できない可能性がある、サーバー側の問題です。再試行可能な Kafka エラーでは、応答の本文にエラーコード 50003 が含まれます。
generic_internal_server_error:
HTTP/1.1 5XX - Content-Type: application/json { "error_code": 500, "message": "Internal Server Error" }
produce_v3_missing_schema:
HTTP/1.1 5XX - Content-Type: application/json { "error_code": 50002, "message": "Error when fetching latest schema version. subject = my-topic" }
-
GET
/clusters/{cluster_id}/brokers/-/configs
¶ すべてのブローカー構成のリストの表示
指定された Kafka クラスター内のすべてのブローカーの構成パラメーターのリストを返します。
パラメーター: - cluster_id (string) -- Kafka クラスター ID。
リクエストの例:
GET /clusters/{cluster_id}/brokers/-/configs HTTP/1.1 Host: example.com
ステータスコード: - 200 OK --
ブローカー構成のリスト。
応答の例:
HTTP/1.1 200 OK Content-Type: application/json { "kind": "KafkaBrokerConfigList", "metadata": { "self": "https://pkc-00000.region.provider.confluent.cloud/kafka/v3/clusters/cluster-1/brokers/1/configs", "next": null }, "data": [ { "kind": "KafkaBrokerConfig", "metadata": { "self": "https://pkc-00000.region.provider.confluent.cloud/kafka/v3/clusters/cluster-1/brokers/1/configs/max.connections", "resource_name": "crn:///kafka=cluster-1/broker=1/config=max.connections" }, "cluster_id": "cluster-1", "broker_id": 1, "name": "max.connections", "value": "1000", "is_default": false, "is_read_only": false, "is_sensitive": false, "source": "DYNAMIC_BROKER_CONFIG", "synonyms": [ { "name": "max.connections", "value": "1000", "source": "DYNAMIC_BROKER_CONFIG" }, { "name": "max.connections", "value": "2147483647", "source": "DEFAULT_CONFIG" } ] }, { "kind": "KafkaBrokerConfig", "metadata": { "self": "https://pkc-00000.region.provider.confluent.cloud/kafka/v3/clusters/cluster-1/brokers/1/configs/compression.type", "resource_name": "crn:///kafka=cluster-1/broker=1/config=compression.type" }, "cluster_id": "cluster-1", "broker_id": 1, "name": "compression.type", "value": "gzip", "is_default": false, "is_read_only": false, "is_sensitive": false, "source": "DYNAMIC_BROKER_CONFIG", "synonyms": [ { "name": "compression.type", "value": "gzip", "source": "DYNAMIC_BROKER_CONFIG" }, { "name": "compression.type", "value": "producer", "source": "DEFAULT_CONFIG" } ] } ] }
- 400 Bad Request --
無効なリクエストエラーを示します。リクエスト本文の予期しないフォーマット、またはそれ以外のリクエスト検証の失敗が原因で発生した可能性があります。通常は application/json コンテンツになりますが、場合によっては単純な text/plain コンテンツが返されます。
create_topic_already_exists:
HTTP/1.1 400 Bad Request Content-Type: application/json { "error_code": 40002, "message": "Topic 'my-topic' already exists." }
produce_message_badly_escaped:
HTTP/1.1 400 Bad Request Content-Type: application/json { "error_code": 400, "message": "Unexpected character ('k' (code 107)): was expecting double-quote to start field name\n at [Source: (org.glassfish.jersey.message.internal.ReaderInterceptorExecutor$UnCloseableInputStream); line: 1, column: 3]" }
応答の例:
HTTP/1.1 400 Bad Request Content-Type: text/plain { "description": "Thrown when trying to create a topic and passing a string for the replication factor.", "value": "Cannot deserialize value of type `java.lang.Integer` from String \"all\": not a valid Integer value\\n at [Source: (org.glassfish.jersey.message.internal.ReaderInterceptorExecutor$UnCloseableInputStream); line: 1, column: 53] (through reference chain: io.confluent.kafkarest.entities.v3.CreateTopicRequest[\"partitions_count\"])" }
- 401 Unauthorized --
クライアント認証エラーを示します。Kafka の認証の失敗では、応答の本文にエラーコード 40101 が含まれます。
kafka_authentication_failed:
HTTP/1.1 401 Unauthorized Content-Type: application/json { "error_code": 40101, "message": "Authentication failed" }
- 429 Too Many Requests --
レート制限のしきい値に達したことを示します。クライアントは後で再試行する必要があります。
応答の例:
HTTP/1.1 429 Too Many Requests Content-Type: text/html { "description": "A sample response from Jetty's DoSFilter.", "value": "<html> <head> <meta http-equiv=\"Content-Type\" content=\"text/html;charset=utf-8\"/> <title>Error 429 Too Many Requests</title> </head> <body> <h2>HTTP ERROR 429 Too Many Requests</h2> <table> <tr> <th>URI:</th> <td>/v3/clusters/my-cluster</td> </tr> <tr> <th>STATUS:</th> <td>429</td> </tr> <tr> <th>MESSAGE:</th> <td>Too Many Requests</td> </tr> <tr> <th>SERVLET:</th> <td>default</td> </tr> </table> </body> </html>" }
- 5XX --
クライアント側から対処できない可能性がある、サーバー側の問題です。再試行可能な Kafka エラーでは、応答の本文にエラーコード 50003 が含まれます。
generic_internal_server_error:
HTTP/1.1 5XX - Content-Type: application/json { "error_code": 500, "message": "Internal Server Error" }
produce_v3_missing_schema:
HTTP/1.1 5XX - Content-Type: application/json { "error_code": 50002, "message": "Error when fetching latest schema version. subject = my-topic" }
-
GET
/clusters/{cluster_id}/brokers/{broker_id}/configs
¶ ブローカー構成の一覧表示
指定された Kafka ブローカーに属する構成パラメーターのリストを返します。
パラメーター: - cluster_id (string) -- Kafka クラスター ID。
- broker_id (integer) -- Kafka ブローカー ID。
リクエストの例:
GET /clusters/{cluster_id}/brokers/{broker_id}/configs HTTP/1.1 Host: example.com
ステータスコード: - 200 OK --
ブローカー構成のリスト。
応答の例:
HTTP/1.1 200 OK Content-Type: application/json { "kind": "KafkaBrokerConfigList", "metadata": { "self": "https://pkc-00000.region.provider.confluent.cloud/kafka/v3/clusters/cluster-1/brokers/1/configs", "next": null }, "data": [ { "kind": "KafkaBrokerConfig", "metadata": { "self": "https://pkc-00000.region.provider.confluent.cloud/kafka/v3/clusters/cluster-1/brokers/1/configs/max.connections", "resource_name": "crn:///kafka=cluster-1/broker=1/config=max.connections" }, "cluster_id": "cluster-1", "broker_id": 1, "name": "max.connections", "value": "1000", "is_default": false, "is_read_only": false, "is_sensitive": false, "source": "DYNAMIC_BROKER_CONFIG", "synonyms": [ { "name": "max.connections", "value": "1000", "source": "DYNAMIC_BROKER_CONFIG" }, { "name": "max.connections", "value": "2147483647", "source": "DEFAULT_CONFIG" } ] }, { "kind": "KafkaBrokerConfig", "metadata": { "self": "https://pkc-00000.region.provider.confluent.cloud/kafka/v3/clusters/cluster-1/brokers/1/configs/compression.type", "resource_name": "crn:///kafka=cluster-1/broker=1/config=compression.type" }, "cluster_id": "cluster-1", "broker_id": 1, "name": "compression.type", "value": "gzip", "is_default": false, "is_read_only": false, "is_sensitive": false, "source": "DYNAMIC_BROKER_CONFIG", "synonyms": [ { "name": "compression.type", "value": "gzip", "source": "DYNAMIC_BROKER_CONFIG" }, { "name": "compression.type", "value": "producer", "source": "DEFAULT_CONFIG" } ] } ] }
- 400 Bad Request --
無効なリクエストエラーを示します。リクエスト本文の予期しないフォーマット、またはそれ以外のリクエスト検証の失敗が原因で発生した可能性があります。通常は application/json コンテンツになりますが、場合によっては単純な text/plain コンテンツが返されます。
create_topic_already_exists:
HTTP/1.1 400 Bad Request Content-Type: application/json { "error_code": 40002, "message": "Topic 'my-topic' already exists." }
produce_message_badly_escaped:
HTTP/1.1 400 Bad Request Content-Type: application/json { "error_code": 400, "message": "Unexpected character ('k' (code 107)): was expecting double-quote to start field name\n at [Source: (org.glassfish.jersey.message.internal.ReaderInterceptorExecutor$UnCloseableInputStream); line: 1, column: 3]" }
応答の例:
HTTP/1.1 400 Bad Request Content-Type: text/plain { "description": "Thrown when trying to create a topic and passing a string for the replication factor.", "value": "Cannot deserialize value of type `java.lang.Integer` from String \"all\": not a valid Integer value\\n at [Source: (org.glassfish.jersey.message.internal.ReaderInterceptorExecutor$UnCloseableInputStream); line: 1, column: 53] (through reference chain: io.confluent.kafkarest.entities.v3.CreateTopicRequest[\"partitions_count\"])" }
- 401 Unauthorized --
クライアント認証エラーを示します。Kafka の認証の失敗では、応答の本文にエラーコード 40101 が含まれます。
kafka_authentication_failed:
HTTP/1.1 401 Unauthorized Content-Type: application/json { "error_code": 40101, "message": "Authentication failed" }
- 429 Too Many Requests --
レート制限のしきい値に達したことを示します。クライアントは後で再試行する必要があります。
応答の例:
HTTP/1.1 429 Too Many Requests Content-Type: text/html { "description": "A sample response from Jetty's DoSFilter.", "value": "<html> <head> <meta http-equiv=\"Content-Type\" content=\"text/html;charset=utf-8\"/> <title>Error 429 Too Many Requests</title> </head> <body> <h2>HTTP ERROR 429 Too Many Requests</h2> <table> <tr> <th>URI:</th> <td>/v3/clusters/my-cluster</td> </tr> <tr> <th>STATUS:</th> <td>429</td> </tr> <tr> <th>MESSAGE:</th> <td>Too Many Requests</td> </tr> <tr> <th>SERVLET:</th> <td>default</td> </tr> </table> </body> </html>" }
- 5XX --
クライアント側から対処できない可能性がある、サーバー側の問題です。再試行可能な Kafka エラーでは、応答の本文にエラーコード 50003 が含まれます。
generic_internal_server_error:
HTTP/1.1 5XX - Content-Type: application/json { "error_code": 500, "message": "Internal Server Error" }
produce_v3_missing_schema:
HTTP/1.1 5XX - Content-Type: application/json { "error_code": 50002, "message": "Error when fetching latest schema version. subject = my-topic" }
-
POST
/clusters/{cluster_id}/brokers/{broker_id}/configs:alter
¶ ブローカー構成のバッチ変更
一連のブローカー構成パラメーターをアップデートまたは削除します。
パラメーター: - cluster_id (string) -- Kafka クラスター ID。
- broker_id (integer) -- Kafka ブローカー ID。
リクエストの例:
POST /clusters/{cluster_id}/brokers/{broker_id}/configs:alter HTTP/1.1 Host: example.com Content-Type: application/json { "data": [ { "name": "max.connections", "operation": "DELETE" }, { "name": "compression.type", "value": "gzip" } ] }
ステータスコード: - 204 No Content -- コンテンツなし
- 400 Bad Request --
無効なリクエストエラーを示します。リクエスト本文の予期しないフォーマット、またはそれ以外のリクエスト検証の失敗が原因で発生した可能性があります。通常は application/json コンテンツになりますが、場合によっては単純な text/plain コンテンツが返されます。
create_topic_already_exists:
HTTP/1.1 400 Bad Request Content-Type: application/json { "error_code": 40002, "message": "Topic 'my-topic' already exists." }
produce_message_badly_escaped:
HTTP/1.1 400 Bad Request Content-Type: application/json { "error_code": 400, "message": "Unexpected character ('k' (code 107)): was expecting double-quote to start field name\n at [Source: (org.glassfish.jersey.message.internal.ReaderInterceptorExecutor$UnCloseableInputStream); line: 1, column: 3]" }
応答の例:
HTTP/1.1 400 Bad Request Content-Type: text/plain { "description": "Thrown when trying to create a topic and passing a string for the replication factor.", "value": "Cannot deserialize value of type `java.lang.Integer` from String \"all\": not a valid Integer value\\n at [Source: (org.glassfish.jersey.message.internal.ReaderInterceptorExecutor$UnCloseableInputStream); line: 1, column: 53] (through reference chain: io.confluent.kafkarest.entities.v3.CreateTopicRequest[\"partitions_count\"])" }
- 401 Unauthorized --
クライアント認証エラーを示します。Kafka の認証の失敗では、応答の本文にエラーコード 40101 が含まれます。
kafka_authentication_failed:
HTTP/1.1 401 Unauthorized Content-Type: application/json { "error_code": 40101, "message": "Authentication failed" }
- 429 Too Many Requests --
レート制限のしきい値に達したことを示します。クライアントは後で再試行する必要があります。
応答の例:
HTTP/1.1 429 Too Many Requests Content-Type: text/html { "description": "A sample response from Jetty's DoSFilter.", "value": "<html> <head> <meta http-equiv=\"Content-Type\" content=\"text/html;charset=utf-8\"/> <title>Error 429 Too Many Requests</title> </head> <body> <h2>HTTP ERROR 429 Too Many Requests</h2> <table> <tr> <th>URI:</th> <td>/v3/clusters/my-cluster</td> </tr> <tr> <th>STATUS:</th> <td>429</td> </tr> <tr> <th>MESSAGE:</th> <td>Too Many Requests</td> </tr> <tr> <th>SERVLET:</th> <td>default</td> </tr> </table> </body> </html>" }
- 5XX --
クライアント側から対処できない可能性がある、サーバー側の問題です。再試行可能な Kafka エラーでは、応答の本文にエラーコード 50003 が含まれます。
generic_internal_server_error:
HTTP/1.1 5XX - Content-Type: application/json { "error_code": 500, "message": "Internal Server Error" }
produce_v3_missing_schema:
HTTP/1.1 5XX - Content-Type: application/json { "error_code": 50002, "message": "Error when fetching latest schema version. subject = my-topic" }
-
GET
/clusters/{cluster_id}/brokers/{broker_id}/configs/{name}
¶ ブローカー構成の取得
name
で指定された構成パラメーターを返します。パラメーター: - cluster_id (string) -- Kafka クラスター ID。
- broker_id (integer) -- Kafka ブローカー ID。
- name (string) -- 構成パラメーター名。
リクエストの例:
GET /clusters/{cluster_id}/brokers/{broker_id}/configs/{name} HTTP/1.1 Host: example.com
ステータスコード: - 200 OK --
ブローカーの構成パラメーター。
応答の例:
HTTP/1.1 200 OK Content-Type: application/json { "kind": "KafkaBrokerConfig", "metadata": { "self": "https://pkc-00000.region.provider.confluent.cloud/kafka/v3/clusters/cluster-1/brokers/1/configs/compression.type", "resource_name": "crn:///kafka=cluster-1/broker=1/config=compression.type" }, "cluster_id": "cluster-1", "broker_id": 1, "name": "compression.type", "value": "gzip", "is_default": false, "is_read_only": false, "is_sensitive": false, "source": "DYNAMIC_BROKER_CONFIG", "synonyms": [ { "name": "compression.type", "value": "gzip", "source": "DYNAMIC_BROKER_CONFIG" }, { "name": "compression.type", "value": "producer", "source": "DEFAULT_CONFIG" } ] }
- 400 Bad Request --
無効なリクエストエラーを示します。リクエスト本文の予期しないフォーマット、またはそれ以外のリクエスト検証の失敗が原因で発生した可能性があります。通常は application/json コンテンツになりますが、場合によっては単純な text/plain コンテンツが返されます。
create_topic_already_exists:
HTTP/1.1 400 Bad Request Content-Type: application/json { "error_code": 40002, "message": "Topic 'my-topic' already exists." }
produce_message_badly_escaped:
HTTP/1.1 400 Bad Request Content-Type: application/json { "error_code": 400, "message": "Unexpected character ('k' (code 107)): was expecting double-quote to start field name\n at [Source: (org.glassfish.jersey.message.internal.ReaderInterceptorExecutor$UnCloseableInputStream); line: 1, column: 3]" }
応答の例:
HTTP/1.1 400 Bad Request Content-Type: text/plain { "description": "Thrown when trying to create a topic and passing a string for the replication factor.", "value": "Cannot deserialize value of type `java.lang.Integer` from String \"all\": not a valid Integer value\\n at [Source: (org.glassfish.jersey.message.internal.ReaderInterceptorExecutor$UnCloseableInputStream); line: 1, column: 53] (through reference chain: io.confluent.kafkarest.entities.v3.CreateTopicRequest[\"partitions_count\"])" }
- 401 Unauthorized --
クライアント認証エラーを示します。Kafka の認証の失敗では、応答の本文にエラーコード 40101 が含まれます。
kafka_authentication_failed:
HTTP/1.1 401 Unauthorized Content-Type: application/json { "error_code": 40101, "message": "Authentication failed" }
- 429 Too Many Requests --
レート制限のしきい値に達したことを示します。クライアントは後で再試行する必要があります。
応答の例:
HTTP/1.1 429 Too Many Requests Content-Type: text/html { "description": "A sample response from Jetty's DoSFilter.", "value": "<html> <head> <meta http-equiv=\"Content-Type\" content=\"text/html;charset=utf-8\"/> <title>Error 429 Too Many Requests</title> </head> <body> <h2>HTTP ERROR 429 Too Many Requests</h2> <table> <tr> <th>URI:</th> <td>/v3/clusters/my-cluster</td> </tr> <tr> <th>STATUS:</th> <td>429</td> </tr> <tr> <th>MESSAGE:</th> <td>Too Many Requests</td> </tr> <tr> <th>SERVLET:</th> <td>default</td> </tr> </table> </body> </html>" }
- 5XX --
クライアント側から対処できない可能性がある、サーバー側の問題です。再試行可能な Kafka エラーでは、応答の本文にエラーコード 50003 が含まれます。
generic_internal_server_error:
HTTP/1.1 5XX - Content-Type: application/json { "error_code": 500, "message": "Internal Server Error" }
produce_v3_missing_schema:
HTTP/1.1 5XX - Content-Type: application/json { "error_code": 50002, "message": "Error when fetching latest schema version. subject = my-topic" }
-
PUT
/clusters/{cluster_id}/brokers/{broker_id}/configs/{name}
¶ ブローカー構成のアップデート
name
で指定された構成パラメーターをアップデートします。パラメーター: - cluster_id (string) -- Kafka クラスター ID。
- broker_id (integer) -- Kafka ブローカー ID。
- name (string) -- 構成パラメーター名。
リクエストの例:
PUT /clusters/{cluster_id}/brokers/{broker_id}/configs/{name} HTTP/1.1 Host: example.com Content-Type: application/json { "value": "gzip" }
ステータスコード: - 204 No Content -- コンテンツなし
- 400 Bad Request --
無効なリクエストエラーを示します。リクエスト本文の予期しないフォーマット、またはそれ以外のリクエスト検証の失敗が原因で発生した可能性があります。通常は application/json コンテンツになりますが、場合によっては単純な text/plain コンテンツが返されます。
create_topic_already_exists:
HTTP/1.1 400 Bad Request Content-Type: application/json { "error_code": 40002, "message": "Topic 'my-topic' already exists." }
produce_message_badly_escaped:
HTTP/1.1 400 Bad Request Content-Type: application/json { "error_code": 400, "message": "Unexpected character ('k' (code 107)): was expecting double-quote to start field name\n at [Source: (org.glassfish.jersey.message.internal.ReaderInterceptorExecutor$UnCloseableInputStream); line: 1, column: 3]" }
応答の例:
HTTP/1.1 400 Bad Request Content-Type: text/plain { "description": "Thrown when trying to create a topic and passing a string for the replication factor.", "value": "Cannot deserialize value of type `java.lang.Integer` from String \"all\": not a valid Integer value\\n at [Source: (org.glassfish.jersey.message.internal.ReaderInterceptorExecutor$UnCloseableInputStream); line: 1, column: 53] (through reference chain: io.confluent.kafkarest.entities.v3.CreateTopicRequest[\"partitions_count\"])" }
- 401 Unauthorized --
クライアント認証エラーを示します。Kafka の認証の失敗では、応答の本文にエラーコード 40101 が含まれます。
kafka_authentication_failed:
HTTP/1.1 401 Unauthorized Content-Type: application/json { "error_code": 40101, "message": "Authentication failed" }
- 429 Too Many Requests --
レート制限のしきい値に達したことを示します。クライアントは後で再試行する必要があります。
応答の例:
HTTP/1.1 429 Too Many Requests Content-Type: text/html { "description": "A sample response from Jetty's DoSFilter.", "value": "<html> <head> <meta http-equiv=\"Content-Type\" content=\"text/html;charset=utf-8\"/> <title>Error 429 Too Many Requests</title> </head> <body> <h2>HTTP ERROR 429 Too Many Requests</h2> <table> <tr> <th>URI:</th> <td>/v3/clusters/my-cluster</td> </tr> <tr> <th>STATUS:</th> <td>429</td> </tr> <tr> <th>MESSAGE:</th> <td>Too Many Requests</td> </tr> <tr> <th>SERVLET:</th> <td>default</td> </tr> </table> </body> </html>" }
- 5XX --
クライアント側から対処できない可能性がある、サーバー側の問題です。再試行可能な Kafka エラーでは、応答の本文にエラーコード 50003 が含まれます。
generic_internal_server_error:
HTTP/1.1 5XX - Content-Type: application/json { "error_code": 500, "message": "Internal Server Error" }
produce_v3_missing_schema:
HTTP/1.1 5XX - Content-Type: application/json { "error_code": 50002, "message": "Error when fetching latest schema version. subject = my-topic" }
-
DELETE
/clusters/{cluster_id}/brokers/{broker_id}/configs/{name}
¶ ブローカー構成のリセット
name
で指定された構成パラメーターをデフォルト値にリセットします。パラメーター: - cluster_id (string) -- Kafka クラスター ID。
- broker_id (integer) -- Kafka ブローカー ID。
- name (string) -- 構成パラメーター名。
ステータスコード: - 204 No Content -- コンテンツなし
- 400 Bad Request --
無効なリクエストエラーを示します。リクエスト本文の予期しないフォーマット、またはそれ以外のリクエスト検証の失敗が原因で発生した可能性があります。通常は application/json コンテンツになりますが、場合によっては単純な text/plain コンテンツが返されます。
create_topic_already_exists:
HTTP/1.1 400 Bad Request Content-Type: application/json { "error_code": 40002, "message": "Topic 'my-topic' already exists." }
produce_message_badly_escaped:
HTTP/1.1 400 Bad Request Content-Type: application/json { "error_code": 400, "message": "Unexpected character ('k' (code 107)): was expecting double-quote to start field name\n at [Source: (org.glassfish.jersey.message.internal.ReaderInterceptorExecutor$UnCloseableInputStream); line: 1, column: 3]" }
応答の例:
HTTP/1.1 400 Bad Request Content-Type: text/plain { "description": "Thrown when trying to create a topic and passing a string for the replication factor.", "value": "Cannot deserialize value of type `java.lang.Integer` from String \"all\": not a valid Integer value\\n at [Source: (org.glassfish.jersey.message.internal.ReaderInterceptorExecutor$UnCloseableInputStream); line: 1, column: 53] (through reference chain: io.confluent.kafkarest.entities.v3.CreateTopicRequest[\"partitions_count\"])" }
- 401 Unauthorized --
クライアント認証エラーを示します。Kafka の認証の失敗では、応答の本文にエラーコード 40101 が含まれます。
kafka_authentication_failed:
HTTP/1.1 401 Unauthorized Content-Type: application/json { "error_code": 40101, "message": "Authentication failed" }
- 429 Too Many Requests --
レート制限のしきい値に達したことを示します。クライアントは後で再試行する必要があります。
応答の例:
HTTP/1.1 429 Too Many Requests Content-Type: text/html { "description": "A sample response from Jetty's DoSFilter.", "value": "<html> <head> <meta http-equiv=\"Content-Type\" content=\"text/html;charset=utf-8\"/> <title>Error 429 Too Many Requests</title> </head> <body> <h2>HTTP ERROR 429 Too Many Requests</h2> <table> <tr> <th>URI:</th> <td>/v3/clusters/my-cluster</td> </tr> <tr> <th>STATUS:</th> <td>429</td> </tr> <tr> <th>MESSAGE:</th> <td>Too Many Requests</td> </tr> <tr> <th>SERVLET:</th> <td>default</td> </tr> </table> </body> </html>" }
- 5XX --
クライアント側から対処できない可能性がある、サーバー側の問題です。再試行可能な Kafka エラーでは、応答の本文にエラーコード 50003 が含まれます。
generic_internal_server_error:
HTTP/1.1 5XX - Content-Type: application/json { "error_code": 500, "message": "Internal Server Error" }
produce_v3_missing_schema:
HTTP/1.1 5XX - Content-Type: application/json { "error_code": 50002, "message": "Error when fetching latest schema version. subject = my-topic" }
-
GET
/clusters/{cluster_id}/topics/{topic_name}/configs
¶ トピック構成の一覧表示
指定されたトピックに属する構成のリストを返します。
パラメーター: - cluster_id (string) -- Kafka クラスター ID。
- topic_name (string) -- トピック名。
リクエストの例:
GET /clusters/{cluster_id}/topics/{topic_name}/configs HTTP/1.1 Host: example.com
ステータスコード: - 200 OK --
クラスター構成のリスト。
応答の例:
HTTP/1.1 200 OK Content-Type: application/json { "kind": "KafkaTopicConfigList", "metadata": { "self": "https://pkc-00000.region.provider.confluent.cloud/kafka/v3/clusters/cluster-1/topics/topic-1/configs", "next": null }, "data": [ { "kind": "KafkaTopicConfig", "metadata": { "self": "https://pkc-00000.region.provider.confluent.cloud/kafka/v3/clusters/cluster-1/topics/topic-1/configs/cleanup.policy", "resource_name": "crn:///kafka=cluster-1/topic=topic-1/config=cleanup.policy" }, "cluster_id": "cluster-1", "topic_name": "topic-1", "name": "cleanup.policy", "value": "compact", "is_default": false, "is_read_only": false, "is_sensitive": false, "source": "DYNAMIC_TOPIC_CONFIG", "synonyms": [ { "name": "cleanup.policy", "value": "compact", "source": "DYNAMIC_TOPIC_CONFIG" }, { "name": "cleanup.policy", "value": "delete", "source": "DEFAULT_CONFIG" } ] }, { "kind": "KafkaTopicConfig", "metadata": { "self": "https://pkc-00000.region.provider.confluent.cloud/kafka/v3/clusters/cluster-1/topics/topic-1/configs/compression.type", "resource_name": "crn:///kafka=cluster-1/topic=topic-1/config=compression.type" }, "cluster_id": "cluster-1", "topic_name": "topic-1", "name": "compression.type", "value": "gzip", "is_default": false, "is_read_only": false, "is_sensitive": false, "source": "DYNAMIC_TOPIC_CONFIG", "synonyms": [ { "name": "compression.type", "value": "gzip", "source": "DYNAMIC_TOPIC_CONFIG" }, { "name": "compression.type", "value": "producer", "source": "DEFAULT_CONFIG" } ] } ] }
- 400 Bad Request --
無効なリクエストエラーを示します。リクエスト本文の予期しないフォーマット、またはそれ以外のリクエスト検証の失敗が原因で発生した可能性があります。通常は application/json コンテンツになりますが、場合によっては単純な text/plain コンテンツが返されます。
create_topic_already_exists:
HTTP/1.1 400 Bad Request Content-Type: application/json { "error_code": 40002, "message": "Topic 'my-topic' already exists." }
produce_message_badly_escaped:
HTTP/1.1 400 Bad Request Content-Type: application/json { "error_code": 400, "message": "Unexpected character ('k' (code 107)): was expecting double-quote to start field name\n at [Source: (org.glassfish.jersey.message.internal.ReaderInterceptorExecutor$UnCloseableInputStream); line: 1, column: 3]" }
応答の例:
HTTP/1.1 400 Bad Request Content-Type: text/plain { "description": "Thrown when trying to create a topic and passing a string for the replication factor.", "value": "Cannot deserialize value of type `java.lang.Integer` from String \"all\": not a valid Integer value\\n at [Source: (org.glassfish.jersey.message.internal.ReaderInterceptorExecutor$UnCloseableInputStream); line: 1, column: 53] (through reference chain: io.confluent.kafkarest.entities.v3.CreateTopicRequest[\"partitions_count\"])" }
- 401 Unauthorized --
クライアント認証エラーを示します。Kafka の認証の失敗では、応答の本文にエラーコード 40101 が含まれます。
kafka_authentication_failed:
HTTP/1.1 401 Unauthorized Content-Type: application/json { "error_code": 40101, "message": "Authentication failed" }
- 404 Not Found --
不明なトピックまたはパーティションなど、到達できないか存在しないリソースにアクセスしようとしたことを示します。アクセスリストで許可されていないエンドポイントへの GET リクエストでも、この応答になります。
endpoint_not_found:
HTTP/1.1 404 Not Found Content-Type: application/json { "error_code": 404, "message": "HTTP 404 Not Found" }
cluster_not_found:
HTTP/1.1 404 Not Found Content-Type: application/json { "error_code": 404, "message": "Cluster my-cluster cannot be found." }
unknown_topic_or_partition:
HTTP/1.1 404 Not Found Content-Type: application/json { "error_code": 40403, "message": "This server does not host this topic-partition." }
- 429 Too Many Requests --
レート制限のしきい値に達したことを示します。クライアントは後で再試行する必要があります。
応答の例:
HTTP/1.1 429 Too Many Requests Content-Type: text/html { "description": "A sample response from Jetty's DoSFilter.", "value": "<html> <head> <meta http-equiv=\"Content-Type\" content=\"text/html;charset=utf-8\"/> <title>Error 429 Too Many Requests</title> </head> <body> <h2>HTTP ERROR 429 Too Many Requests</h2> <table> <tr> <th>URI:</th> <td>/v3/clusters/my-cluster</td> </tr> <tr> <th>STATUS:</th> <td>429</td> </tr> <tr> <th>MESSAGE:</th> <td>Too Many Requests</td> </tr> <tr> <th>SERVLET:</th> <td>default</td> </tr> </table> </body> </html>" }
- 5XX --
クライアント側から対処できない可能性がある、サーバー側の問題です。再試行可能な Kafka エラーでは、応答の本文にエラーコード 50003 が含まれます。
generic_internal_server_error:
HTTP/1.1 5XX - Content-Type: application/json { "error_code": 500, "message": "Internal Server Error" }
produce_v3_missing_schema:
HTTP/1.1 5XX - Content-Type: application/json { "error_code": 50002, "message": "Error when fetching latest schema version. subject = my-topic" }
-
POST
/clusters/{cluster_id}/topics/{topic_name}/configs:alter
¶ トピック構成のバッチ変更
一連のトピック構成をアップデートまたは削除します。
パラメーター: - cluster_id (string) -- Kafka クラスター ID。
- topic_name (string) -- トピック名。
リクエストの例:
POST /clusters/{cluster_id}/topics/{topic_name}/configs:alter HTTP/1.1 Host: example.com Content-Type: application/json { "data": [ { "name": "cleanup.policy", "operation": "DELETE" }, { "name": "compression.type", "value": "gzip" } ] }
ステータスコード: - 204 No Content -- コンテンツなし
- 400 Bad Request --
無効なリクエストエラーを示します。リクエスト本文の予期しないフォーマット、またはそれ以外のリクエスト検証の失敗が原因で発生した可能性があります。通常は application/json コンテンツになりますが、場合によっては単純な text/plain コンテンツが返されます。
create_topic_already_exists:
HTTP/1.1 400 Bad Request Content-Type: application/json { "error_code": 40002, "message": "Topic 'my-topic' already exists." }
produce_message_badly_escaped:
HTTP/1.1 400 Bad Request Content-Type: application/json { "error_code": 400, "message": "Unexpected character ('k' (code 107)): was expecting double-quote to start field name\n at [Source: (org.glassfish.jersey.message.internal.ReaderInterceptorExecutor$UnCloseableInputStream); line: 1, column: 3]" }
応答の例:
HTTP/1.1 400 Bad Request Content-Type: text/plain { "description": "Thrown when trying to create a topic and passing a string for the replication factor.", "value": "Cannot deserialize value of type `java.lang.Integer` from String \"all\": not a valid Integer value\\n at [Source: (org.glassfish.jersey.message.internal.ReaderInterceptorExecutor$UnCloseableInputStream); line: 1, column: 53] (through reference chain: io.confluent.kafkarest.entities.v3.CreateTopicRequest[\"partitions_count\"])" }
- 401 Unauthorized --
クライアント認証エラーを示します。Kafka の認証の失敗では、応答の本文にエラーコード 40101 が含まれます。
kafka_authentication_failed:
HTTP/1.1 401 Unauthorized Content-Type: application/json { "error_code": 40101, "message": "Authentication failed" }
- 404 Not Found --
不明なトピックまたはパーティションなど、到達できないか存在しないリソースにアクセスしようとしたことを示します。アクセスリストで許可されていないエンドポイントへの GET リクエストでも、この応答になります。
endpoint_not_found:
HTTP/1.1 404 Not Found Content-Type: application/json { "error_code": 404, "message": "HTTP 404 Not Found" }
cluster_not_found:
HTTP/1.1 404 Not Found Content-Type: application/json { "error_code": 404, "message": "Cluster my-cluster cannot be found." }
unknown_topic_or_partition:
HTTP/1.1 404 Not Found Content-Type: application/json { "error_code": 40403, "message": "This server does not host this topic-partition." }
- 429 Too Many Requests --
レート制限のしきい値に達したことを示します。クライアントは後で再試行する必要があります。
応答の例:
HTTP/1.1 429 Too Many Requests Content-Type: text/html { "description": "A sample response from Jetty's DoSFilter.", "value": "<html> <head> <meta http-equiv=\"Content-Type\" content=\"text/html;charset=utf-8\"/> <title>Error 429 Too Many Requests</title> </head> <body> <h2>HTTP ERROR 429 Too Many Requests</h2> <table> <tr> <th>URI:</th> <td>/v3/clusters/my-cluster</td> </tr> <tr> <th>STATUS:</th> <td>429</td> </tr> <tr> <th>MESSAGE:</th> <td>Too Many Requests</td> </tr> <tr> <th>SERVLET:</th> <td>default</td> </tr> </table> </body> </html>" }
- 5XX --
クライアント側から対処できない可能性がある、サーバー側の問題です。再試行可能な Kafka エラーでは、応答の本文にエラーコード 50003 が含まれます。
generic_internal_server_error:
HTTP/1.1 5XX - Content-Type: application/json { "error_code": 500, "message": "Internal Server Error" }
produce_v3_missing_schema:
HTTP/1.1 5XX - Content-Type: application/json { "error_code": 50002, "message": "Error when fetching latest schema version. subject = my-topic" }
-
GET
/clusters/{cluster_id}/topics/{topic_name}/configs/{name}
¶ トピック構成の取得
指定した
name
の構成を返します。パラメーター: - cluster_id (string) -- Kafka クラスター ID。
- topic_name (string) -- トピック名。
- name (string) -- 構成パラメーター名。
リクエストの例:
GET /clusters/{cluster_id}/topics/{topic_name}/configs/{name} HTTP/1.1 Host: example.com
ステータスコード: - 200 OK --
トピック構成パラメーター。
応答の例:
HTTP/1.1 200 OK Content-Type: application/json { "kind": "KafkaTopicConfig", "metadata": { "self": "https://pkc-00000.region.provider.confluent.cloud/kafka/v3/clusters/cluster-1/topics/topic-1/compression.type", "resource_name": "crn:///kafka=cluster-1/topic=topic-1/config=compression.type" }, "cluster_id": "cluster-1", "topic_name": "topic-1", "name": "compression.type", "value": "gzip", "is_default": false, "is_read_only": false, "is_sensitive": false, "source": "DYNAMIC_TOPIC_CONFIG", "synonyms": [ { "name": "compression.type", "value": "gzip", "source": "DYNAMIC_TOPIC_CONFIG" }, { "name": "compression.type", "value": "producer", "source": "DEFAULT_CONFIG" } ] }
- 400 Bad Request --
無効なリクエストエラーを示します。リクエスト本文の予期しないフォーマット、またはそれ以外のリクエスト検証の失敗が原因で発生した可能性があります。通常は application/json コンテンツになりますが、場合によっては単純な text/plain コンテンツが返されます。
create_topic_already_exists:
HTTP/1.1 400 Bad Request Content-Type: application/json { "error_code": 40002, "message": "Topic 'my-topic' already exists." }
produce_message_badly_escaped:
HTTP/1.1 400 Bad Request Content-Type: application/json { "error_code": 400, "message": "Unexpected character ('k' (code 107)): was expecting double-quote to start field name\n at [Source: (org.glassfish.jersey.message.internal.ReaderInterceptorExecutor$UnCloseableInputStream); line: 1, column: 3]" }
応答の例:
HTTP/1.1 400 Bad Request Content-Type: text/plain { "description": "Thrown when trying to create a topic and passing a string for the replication factor.", "value": "Cannot deserialize value of type `java.lang.Integer` from String \"all\": not a valid Integer value\\n at [Source: (org.glassfish.jersey.message.internal.ReaderInterceptorExecutor$UnCloseableInputStream); line: 1, column: 53] (through reference chain: io.confluent.kafkarest.entities.v3.CreateTopicRequest[\"partitions_count\"])" }
- 401 Unauthorized --
クライアント認証エラーを示します。Kafka の認証の失敗では、応答の本文にエラーコード 40101 が含まれます。
kafka_authentication_failed:
HTTP/1.1 401 Unauthorized Content-Type: application/json { "error_code": 40101, "message": "Authentication failed" }
- 404 Not Found --
不明なトピックまたはパーティションなど、到達できないか存在しないリソースにアクセスしようとしたことを示します。アクセスリストで許可されていないエンドポイントへの GET リクエストでも、この応答になります。
endpoint_not_found:
HTTP/1.1 404 Not Found Content-Type: application/json { "error_code": 404, "message": "HTTP 404 Not Found" }
cluster_not_found:
HTTP/1.1 404 Not Found Content-Type: application/json { "error_code": 404, "message": "Cluster my-cluster cannot be found." }
unknown_topic_or_partition:
HTTP/1.1 404 Not Found Content-Type: application/json { "error_code": 40403, "message": "This server does not host this topic-partition." }
- 429 Too Many Requests --
レート制限のしきい値に達したことを示します。クライアントは後で再試行する必要があります。
応答の例:
HTTP/1.1 429 Too Many Requests Content-Type: text/html { "description": "A sample response from Jetty's DoSFilter.", "value": "<html> <head> <meta http-equiv=\"Content-Type\" content=\"text/html;charset=utf-8\"/> <title>Error 429 Too Many Requests</title> </head> <body> <h2>HTTP ERROR 429 Too Many Requests</h2> <table> <tr> <th>URI:</th> <td>/v3/clusters/my-cluster</td> </tr> <tr> <th>STATUS:</th> <td>429</td> </tr> <tr> <th>MESSAGE:</th> <td>Too Many Requests</td> </tr> <tr> <th>SERVLET:</th> <td>default</td> </tr> </table> </body> </html>" }
- 5XX --
クライアント側から対処できない可能性がある、サーバー側の問題です。再試行可能な Kafka エラーでは、応答の本文にエラーコード 50003 が含まれます。
generic_internal_server_error:
HTTP/1.1 5XX - Content-Type: application/json { "error_code": 500, "message": "Internal Server Error" }
produce_v3_missing_schema:
HTTP/1.1 5XX - Content-Type: application/json { "error_code": 50002, "message": "Error when fetching latest schema version. subject = my-topic" }
-
PUT
/clusters/{cluster_id}/topics/{topic_name}/configs/{name}
¶ トピック構成のアップデート
指定した
name
の構成をアップデートします。パラメーター: - cluster_id (string) -- Kafka クラスター ID。
- topic_name (string) -- トピック名。
- name (string) -- 構成パラメーター名。
リクエストの例:
PUT /clusters/{cluster_id}/topics/{topic_name}/configs/{name} HTTP/1.1 Host: example.com Content-Type: application/json { "value": "gzip" }
ステータスコード: - 204 No Content -- コンテンツなし
- 400 Bad Request --
無効なリクエストエラーを示します。リクエスト本文の予期しないフォーマット、またはそれ以外のリクエスト検証の失敗が原因で発生した可能性があります。通常は application/json コンテンツになりますが、場合によっては単純な text/plain コンテンツが返されます。
create_topic_already_exists:
HTTP/1.1 400 Bad Request Content-Type: application/json { "error_code": 40002, "message": "Topic 'my-topic' already exists." }
produce_message_badly_escaped:
HTTP/1.1 400 Bad Request Content-Type: application/json { "error_code": 400, "message": "Unexpected character ('k' (code 107)): was expecting double-quote to start field name\n at [Source: (org.glassfish.jersey.message.internal.ReaderInterceptorExecutor$UnCloseableInputStream); line: 1, column: 3]" }
応答の例:
HTTP/1.1 400 Bad Request Content-Type: text/plain { "description": "Thrown when trying to create a topic and passing a string for the replication factor.", "value": "Cannot deserialize value of type `java.lang.Integer` from String \"all\": not a valid Integer value\\n at [Source: (org.glassfish.jersey.message.internal.ReaderInterceptorExecutor$UnCloseableInputStream); line: 1, column: 53] (through reference chain: io.confluent.kafkarest.entities.v3.CreateTopicRequest[\"partitions_count\"])" }
- 401 Unauthorized --
クライアント認証エラーを示します。Kafka の認証の失敗では、応答の本文にエラーコード 40101 が含まれます。
kafka_authentication_failed:
HTTP/1.1 401 Unauthorized Content-Type: application/json { "error_code": 40101, "message": "Authentication failed" }
- 404 Not Found --
不明なトピックまたはパーティションなど、到達できないか存在しないリソースにアクセスしようとしたことを示します。アクセスリストで許可されていないエンドポイントへの GET リクエストでも、この応答になります。
endpoint_not_found:
HTTP/1.1 404 Not Found Content-Type: application/json { "error_code": 404, "message": "HTTP 404 Not Found" }
cluster_not_found:
HTTP/1.1 404 Not Found Content-Type: application/json { "error_code": 404, "message": "Cluster my-cluster cannot be found." }
unknown_topic_or_partition:
HTTP/1.1 404 Not Found Content-Type: application/json { "error_code": 40403, "message": "This server does not host this topic-partition." }
- 429 Too Many Requests --
レート制限のしきい値に達したことを示します。クライアントは後で再試行する必要があります。
応答の例:
HTTP/1.1 429 Too Many Requests Content-Type: text/html { "description": "A sample response from Jetty's DoSFilter.", "value": "<html> <head> <meta http-equiv=\"Content-Type\" content=\"text/html;charset=utf-8\"/> <title>Error 429 Too Many Requests</title> </head> <body> <h2>HTTP ERROR 429 Too Many Requests</h2> <table> <tr> <th>URI:</th> <td>/v3/clusters/my-cluster</td> </tr> <tr> <th>STATUS:</th> <td>429</td> </tr> <tr> <th>MESSAGE:</th> <td>Too Many Requests</td> </tr> <tr> <th>SERVLET:</th> <td>default</td> </tr> </table> </body> </html>" }
- 5XX --
クライアント側から対処できない可能性がある、サーバー側の問題です。再試行可能な Kafka エラーでは、応答の本文にエラーコード 50003 が含まれます。
generic_internal_server_error:
HTTP/1.1 5XX - Content-Type: application/json { "error_code": 500, "message": "Internal Server Error" }
produce_v3_missing_schema:
HTTP/1.1 5XX - Content-Type: application/json { "error_code": 50002, "message": "Error when fetching latest schema version. subject = my-topic" }
-
DELETE
/clusters/{cluster_id}/topics/{topic_name}/configs/{name}
¶ トピック構成のリセット
指定した
name
の構成をデフォルト値にリセットします。パラメーター: - cluster_id (string) -- Kafka クラスター ID。
- topic_name (string) -- トピック名。
- name (string) -- 構成パラメーター名。
ステータスコード: - 204 No Content -- コンテンツなし
- 400 Bad Request --
無効なリクエストエラーを示します。リクエスト本文の予期しないフォーマット、またはそれ以外のリクエスト検証の失敗が原因で発生した可能性があります。通常は application/json コンテンツになりますが、場合によっては単純な text/plain コンテンツが返されます。
create_topic_already_exists:
HTTP/1.1 400 Bad Request Content-Type: application/json { "error_code": 40002, "message": "Topic 'my-topic' already exists." }
produce_message_badly_escaped:
HTTP/1.1 400 Bad Request Content-Type: application/json { "error_code": 400, "message": "Unexpected character ('k' (code 107)): was expecting double-quote to start field name\n at [Source: (org.glassfish.jersey.message.internal.ReaderInterceptorExecutor$UnCloseableInputStream); line: 1, column: 3]" }
応答の例:
HTTP/1.1 400 Bad Request Content-Type: text/plain { "description": "Thrown when trying to create a topic and passing a string for the replication factor.", "value": "Cannot deserialize value of type `java.lang.Integer` from String \"all\": not a valid Integer value\\n at [Source: (org.glassfish.jersey.message.internal.ReaderInterceptorExecutor$UnCloseableInputStream); line: 1, column: 53] (through reference chain: io.confluent.kafkarest.entities.v3.CreateTopicRequest[\"partitions_count\"])" }
- 401 Unauthorized --
クライアント認証エラーを示します。Kafka の認証の失敗では、応答の本文にエラーコード 40101 が含まれます。
kafka_authentication_failed:
HTTP/1.1 401 Unauthorized Content-Type: application/json { "error_code": 40101, "message": "Authentication failed" }
- 404 Not Found --
不明なトピックまたはパーティションなど、到達できないか存在しないリソースにアクセスしようとしたことを示します。アクセスリストで許可されていないエンドポイントへの GET リクエストでも、この応答になります。
endpoint_not_found:
HTTP/1.1 404 Not Found Content-Type: application/json { "error_code": 404, "message": "HTTP 404 Not Found" }
cluster_not_found:
HTTP/1.1 404 Not Found Content-Type: application/json { "error_code": 404, "message": "Cluster my-cluster cannot be found." }
unknown_topic_or_partition:
HTTP/1.1 404 Not Found Content-Type: application/json { "error_code": 40403, "message": "This server does not host this topic-partition." }
- 429 Too Many Requests --
レート制限のしきい値に達したことを示します。クライアントは後で再試行する必要があります。
応答の例:
HTTP/1.1 429 Too Many Requests Content-Type: text/html { "description": "A sample response from Jetty's DoSFilter.", "value": "<html> <head> <meta http-equiv=\"Content-Type\" content=\"text/html;charset=utf-8\"/> <title>Error 429 Too Many Requests</title> </head> <body> <h2>HTTP ERROR 429 Too Many Requests</h2> <table> <tr> <th>URI:</th> <td>/v3/clusters/my-cluster</td> </tr> <tr> <th>STATUS:</th> <td>429</td> </tr> <tr> <th>MESSAGE:</th> <td>Too Many Requests</td> </tr> <tr> <th>SERVLET:</th> <td>default</td> </tr> </table> </body> </html>" }
- 5XX --
クライアント側から対処できない可能性がある、サーバー側の問題です。再試行可能な Kafka エラーでは、応答の本文にエラーコード 50003 が含まれます。
generic_internal_server_error:
HTTP/1.1 5XX - Content-Type: application/json { "error_code": 500, "message": "Internal Server Error" }
produce_v3_missing_schema:
HTTP/1.1 5XX - Content-Type: application/json { "error_code": 50002, "message": "Error when fetching latest schema version. subject = my-topic" }
-
GET
/clusters/{cluster_id}/topics/-/configs
¶ すべてのトピック構成の取得
指定されたクラスターでホストされているトピックのすべてのトピック構成を返します。
パラメーター: - cluster_id (string) -- Kafka クラスター ID。
リクエストの例:
GET /clusters/{cluster_id}/topics/-/configs HTTP/1.1 Host: example.com
ステータスコード: - 200 OK --
クラスター構成のリスト。
応答の例:
HTTP/1.1 200 OK Content-Type: application/json { "kind": "KafkaTopicConfigList", "metadata": { "self": "https://pkc-00000.region.provider.confluent.cloud/kafka/v3/clusters/cluster-1/topics/topic-1/configs", "next": null }, "data": [ { "kind": "KafkaTopicConfig", "metadata": { "self": "https://pkc-00000.region.provider.confluent.cloud/kafka/v3/clusters/cluster-1/topics/topic-1/configs/cleanup.policy", "resource_name": "crn:///kafka=cluster-1/topic=topic-1/config=cleanup.policy" }, "cluster_id": "cluster-1", "topic_name": "topic-1", "name": "cleanup.policy", "value": "compact", "is_default": false, "is_read_only": false, "is_sensitive": false, "source": "DYNAMIC_TOPIC_CONFIG", "synonyms": [ { "name": "cleanup.policy", "value": "compact", "source": "DYNAMIC_TOPIC_CONFIG" }, { "name": "cleanup.policy", "value": "delete", "source": "DEFAULT_CONFIG" } ] }, { "kind": "KafkaTopicConfig", "metadata": { "self": "https://pkc-00000.region.provider.confluent.cloud/kafka/v3/clusters/cluster-1/topics/topic-1/configs/compression.type", "resource_name": "crn:///kafka=cluster-1/topic=topic-1/config=compression.type" }, "cluster_id": "cluster-1", "topic_name": "topic-1", "name": "compression.type", "value": "gzip", "is_default": false, "is_read_only": false, "is_sensitive": false, "source": "DYNAMIC_TOPIC_CONFIG", "synonyms": [ { "name": "compression.type", "value": "gzip", "source": "DYNAMIC_TOPIC_CONFIG" }, { "name": "compression.type", "value": "producer", "source": "DEFAULT_CONFIG" } ] } ] }
- 400 Bad Request --
無効なリクエストエラーを示します。リクエスト本文の予期しないフォーマット、またはそれ以外のリクエスト検証の失敗が原因で発生した可能性があります。通常は application/json コンテンツになりますが、場合によっては単純な text/plain コンテンツが返されます。
create_topic_already_exists:
HTTP/1.1 400 Bad Request Content-Type: application/json { "error_code": 40002, "message": "Topic 'my-topic' already exists." }
produce_message_badly_escaped:
HTTP/1.1 400 Bad Request Content-Type: application/json { "error_code": 400, "message": "Unexpected character ('k' (code 107)): was expecting double-quote to start field name\n at [Source: (org.glassfish.jersey.message.internal.ReaderInterceptorExecutor$UnCloseableInputStream); line: 1, column: 3]" }
応答の例:
HTTP/1.1 400 Bad Request Content-Type: text/plain { "description": "Thrown when trying to create a topic and passing a string for the replication factor.", "value": "Cannot deserialize value of type `java.lang.Integer` from String \"all\": not a valid Integer value\\n at [Source: (org.glassfish.jersey.message.internal.ReaderInterceptorExecutor$UnCloseableInputStream); line: 1, column: 53] (through reference chain: io.confluent.kafkarest.entities.v3.CreateTopicRequest[\"partitions_count\"])" }
- 401 Unauthorized --
クライアント認証エラーを示します。Kafka の認証の失敗では、応答の本文にエラーコード 40101 が含まれます。
kafka_authentication_failed:
HTTP/1.1 401 Unauthorized Content-Type: application/json { "error_code": 40101, "message": "Authentication failed" }
- 429 Too Many Requests --
レート制限のしきい値に達したことを示します。クライアントは後で再試行する必要があります。
応答の例:
HTTP/1.1 429 Too Many Requests Content-Type: text/html { "description": "A sample response from Jetty's DoSFilter.", "value": "<html> <head> <meta http-equiv=\"Content-Type\" content=\"text/html;charset=utf-8\"/> <title>Error 429 Too Many Requests</title> </head> <body> <h2>HTTP ERROR 429 Too Many Requests</h2> <table> <tr> <th>URI:</th> <td>/v3/clusters/my-cluster</td> </tr> <tr> <th>STATUS:</th> <td>429</td> </tr> <tr> <th>MESSAGE:</th> <td>Too Many Requests</td> </tr> <tr> <th>SERVLET:</th> <td>default</td> </tr> </table> </body> </html>" }
- 5XX --
クライアント側から対処できない可能性がある、サーバー側の問題です。再試行可能な Kafka エラーでは、応答の本文にエラーコード 50003 が含まれます。
generic_internal_server_error:
HTTP/1.1 5XX - Content-Type: application/json { "error_code": 500, "message": "Internal Server Error" }
produce_v3_missing_schema:
HTTP/1.1 5XX - Content-Type: application/json { "error_code": 50002, "message": "Error when fetching latest schema version. subject = my-topic" }
-
GET
/clusters/{cluster_id}/topics/{topic_name}/default-configs
¶ デフォルトトピックの構成の一覧表示
パラメーター: - cluster_id (string) -- Kafka クラスター ID。
- topic_name (string) -- トピック名。
リクエストの例:
GET /clusters/{cluster_id}/topics/{topic_name}/default-configs HTTP/1.1 Host: example.com
ステータスコード: - 200 OK --
クラスター構成のリスト。
応答の例:
HTTP/1.1 200 OK Content-Type: application/json { "kind": "KafkaTopicConfigList", "metadata": { "self": "https://pkc-00000.region.provider.confluent.cloud/kafka/v3/clusters/cluster-1/topics/topic-1/configs", "next": null }, "data": [ { "kind": "KafkaTopicConfig", "metadata": { "self": "https://pkc-00000.region.provider.confluent.cloud/kafka/v3/clusters/cluster-1/topics/topic-1/configs/cleanup.policy", "resource_name": "crn:///kafka=cluster-1/topic=topic-1/config=cleanup.policy" }, "cluster_id": "cluster-1", "topic_name": "topic-1", "name": "cleanup.policy", "value": "compact", "is_default": false, "is_read_only": false, "is_sensitive": false, "source": "DYNAMIC_TOPIC_CONFIG", "synonyms": [ { "name": "cleanup.policy", "value": "compact", "source": "DYNAMIC_TOPIC_CONFIG" }, { "name": "cleanup.policy", "value": "delete", "source": "DEFAULT_CONFIG" } ] }, { "kind": "KafkaTopicConfig", "metadata": { "self": "https://pkc-00000.region.provider.confluent.cloud/kafka/v3/clusters/cluster-1/topics/topic-1/configs/compression.type", "resource_name": "crn:///kafka=cluster-1/topic=topic-1/config=compression.type" }, "cluster_id": "cluster-1", "topic_name": "topic-1", "name": "compression.type", "value": "gzip", "is_default": false, "is_read_only": false, "is_sensitive": false, "source": "DYNAMIC_TOPIC_CONFIG", "synonyms": [ { "name": "compression.type", "value": "gzip", "source": "DYNAMIC_TOPIC_CONFIG" }, { "name": "compression.type", "value": "producer", "source": "DEFAULT_CONFIG" } ] } ] }
- 400 Bad Request --
無効なリクエストエラーを示します。リクエスト本文の予期しないフォーマット、またはそれ以外のリクエスト検証の失敗が原因で発生した可能性があります。通常は application/json コンテンツになりますが、場合によっては単純な text/plain コンテンツが返されます。
create_topic_already_exists:
HTTP/1.1 400 Bad Request Content-Type: application/json { "error_code": 40002, "message": "Topic 'my-topic' already exists." }
produce_message_badly_escaped:
HTTP/1.1 400 Bad Request Content-Type: application/json { "error_code": 400, "message": "Unexpected character ('k' (code 107)): was expecting double-quote to start field name\n at [Source: (org.glassfish.jersey.message.internal.ReaderInterceptorExecutor$UnCloseableInputStream); line: 1, column: 3]" }
応答の例:
HTTP/1.1 400 Bad Request Content-Type: text/plain { "description": "Thrown when trying to create a topic and passing a string for the replication factor.", "value": "Cannot deserialize value of type `java.lang.Integer` from String \"all\": not a valid Integer value\\n at [Source: (org.glassfish.jersey.message.internal.ReaderInterceptorExecutor$UnCloseableInputStream); line: 1, column: 53] (through reference chain: io.confluent.kafkarest.entities.v3.CreateTopicRequest[\"partitions_count\"])" }
- 401 Unauthorized --
クライアント認証エラーを示します。Kafka の認証の失敗では、応答の本文にエラーコード 40101 が含まれます。
kafka_authentication_failed:
HTTP/1.1 401 Unauthorized Content-Type: application/json { "error_code": 40101, "message": "Authentication failed" }
- 404 Not Found --
不明なトピックまたはパーティションなど、到達できないか存在しないリソースにアクセスしようとしたことを示します。アクセスリストで許可されていないエンドポイントへの GET リクエストでも、この応答になります。
endpoint_not_found:
HTTP/1.1 404 Not Found Content-Type: application/json { "error_code": 404, "message": "HTTP 404 Not Found" }
cluster_not_found:
HTTP/1.1 404 Not Found Content-Type: application/json { "error_code": 404, "message": "Cluster my-cluster cannot be found." }
unknown_topic_or_partition:
HTTP/1.1 404 Not Found Content-Type: application/json { "error_code": 40403, "message": "This server does not host this topic-partition." }
- 429 Too Many Requests --
レート制限のしきい値に達したことを示します。クライアントは後で再試行する必要があります。
応答の例:
HTTP/1.1 429 Too Many Requests Content-Type: text/html { "description": "A sample response from Jetty's DoSFilter.", "value": "<html> <head> <meta http-equiv=\"Content-Type\" content=\"text/html;charset=utf-8\"/> <title>Error 429 Too Many Requests</title> </head> <body> <h2>HTTP ERROR 429 Too Many Requests</h2> <table> <tr> <th>URI:</th> <td>/v3/clusters/my-cluster</td> </tr> <tr> <th>STATUS:</th> <td>429</td> </tr> <tr> <th>MESSAGE:</th> <td>Too Many Requests</td> </tr> <tr> <th>SERVLET:</th> <td>default</td> </tr> </table> </body> </html>" }
- 5XX --
クライアント側から対処できない可能性がある、サーバー側の問題です。再試行可能な Kafka エラーでは、応答の本文にエラーコード 50003 が含まれます。
generic_internal_server_error:
HTTP/1.1 5XX - Content-Type: application/json { "error_code": 500, "message": "Internal Server Error" }
produce_v3_missing_schema:
HTTP/1.1 5XX - Content-Type: application/json { "error_code": 50002, "message": "Error when fetching latest schema version. subject = my-topic" }
ACL(v3)¶
-
GET
/clusters/{cluster_id}/acls
¶ ACL の検索
Returns a list of ACLs that match the search criteria. These are Apache Kafka, ZooKeeper based ACLs, which differ from the Confluent Metadata Service (MDS) based, centralized ACLs created with the Confluent CLI. MDS has a separate API for ACLs.
パラメーター: - cluster_id (string) -- Kafka クラスター ID。
クエリのパラメーター: - resource_type (string) -- ACL リソースタイプ。
- resource_name (string) -- ACL リソース名。
- pattern_type (string) -- ACL パターンタイプ。
- principal (string) -- ACL プリンシパル。
- host (string) -- ACL ホスト。
- operation (string) -- ACL 操作。
- permission (string) -- ACL アクセス許可。
リクエストの例:
GET /clusters/{cluster_id}/acls HTTP/1.1 Host: example.com
ステータスコード: - 200 OK --
ACL のリスト。
応答の例:
HTTP/1.1 200 OK Content-Type: application/json { "kind": "KafkaAclList", "metadata": { "self": "https://pkc-00000.region.provider.confluent.cloud/kafka/v3/clusters/cluster-1/acls?principal=alice" }, "data": [ { "kind": "KafkaAcl", "metadata": { "self": "https://pkc-00000.region.provider.confluent.cloud/kafka/v3/clusters/cluster-1/acls?resource_type=TOPIC&resource_name=topic-&pattern_type=PREFIXED&principal=alice&host=*&operation=ALL&permission=ALLOW" }, "cluster_id": "cluster-1", "resource_type": "TOPIC", "resource_name": "topic-", "pattern_type": "PREFIXED", "principal": "alice", "host": "*", "operation": "ALL", "permission": "ALLOW" }, { "kind": "KafkaAcl", "metadata": { "self": "https://pkc-00000.region.provider.confluent.cloud/kafka/v3/clusters/cluster-1/acls?resource_type=CLUSTER&resource_name=cluster-1&pattern_type=LITERAL&principal=bob&host=*&operation=DESCRIBE&permission=DENY" }, "cluster_id": "cluster-1", "resource_type": "CLUSTER", "resource_name": "cluster-2", "pattern_type": "LITERAL", "principal": "alice", "host": "*", "operation": "DESCRIBE", "permission": "DENY" } ] }
- 400 Bad Request --
無効なリクエストエラーを示します。リクエスト本文の予期しないフォーマット、またはそれ以外のリクエスト検証の失敗が原因で発生した可能性があります。通常は application/json コンテンツになりますが、場合によっては単純な text/plain コンテンツが返されます。
create_topic_already_exists:
HTTP/1.1 400 Bad Request Content-Type: application/json { "error_code": 40002, "message": "Topic 'my-topic' already exists." }
produce_message_badly_escaped:
HTTP/1.1 400 Bad Request Content-Type: application/json { "error_code": 400, "message": "Unexpected character ('k' (code 107)): was expecting double-quote to start field name\n at [Source: (org.glassfish.jersey.message.internal.ReaderInterceptorExecutor$UnCloseableInputStream); line: 1, column: 3]" }
応答の例:
HTTP/1.1 400 Bad Request Content-Type: text/plain { "description": "Thrown when trying to create a topic and passing a string for the replication factor.", "value": "Cannot deserialize value of type `java.lang.Integer` from String \"all\": not a valid Integer value\\n at [Source: (org.glassfish.jersey.message.internal.ReaderInterceptorExecutor$UnCloseableInputStream); line: 1, column: 53] (through reference chain: io.confluent.kafkarest.entities.v3.CreateTopicRequest[\"partitions_count\"])" }
- 401 Unauthorized --
クライアント認証エラーを示します。Kafka の認証の失敗では、応答の本文にエラーコード 40101 が含まれます。
kafka_authentication_failed:
HTTP/1.1 401 Unauthorized Content-Type: application/json { "error_code": 40101, "message": "Authentication failed" }
- 429 Too Many Requests --
レート制限のしきい値に達したことを示します。クライアントは後で再試行する必要があります。
応答の例:
HTTP/1.1 429 Too Many Requests Content-Type: text/html { "description": "A sample response from Jetty's DoSFilter.", "value": "<html> <head> <meta http-equiv=\"Content-Type\" content=\"text/html;charset=utf-8\"/> <title>Error 429 Too Many Requests</title> </head> <body> <h2>HTTP ERROR 429 Too Many Requests</h2> <table> <tr> <th>URI:</th> <td>/v3/clusters/my-cluster</td> </tr> <tr> <th>STATUS:</th> <td>429</td> </tr> <tr> <th>MESSAGE:</th> <td>Too Many Requests</td> </tr> <tr> <th>SERVLET:</th> <td>default</td> </tr> </table> </body> </html>" }
- 5XX --
クライアント側から対処できない可能性がある、サーバー側の問題です。再試行可能な Kafka エラーでは、応答の本文にエラーコード 50003 が含まれます。
generic_internal_server_error:
HTTP/1.1 5XX - Content-Type: application/json { "error_code": 500, "message": "Internal Server Error" }
produce_v3_missing_schema:
HTTP/1.1 5XX - Content-Type: application/json { "error_code": 50002, "message": "Error when fetching latest schema version. subject = my-topic" }
-
POST
/clusters/{cluster_id}/acls
¶ ACL の作成
Creates an Apache Kafka, ZooKeeper based ACL.
パラメーター: - cluster_id (string) -- Kafka クラスター ID。
リクエストの例:
POST /clusters/{cluster_id}/acls HTTP/1.1 Host: example.com Content-Type: application/json { "resource_type": "CLUSTER", "resource_name": "kafka-cluster", "pattern_type": "LITERAL", "principal": "principalType:principalName", "host": "*", "operation": "DESCRIBE", "permission": "DENY" }
ステータスコード: - 201 Created -- コンテンツなし
- 400 Bad Request --
無効なリクエストエラーを示します。リクエスト本文の予期しないフォーマット、またはそれ以外のリクエスト検証の失敗が原因で発生した可能性があります。通常は application/json コンテンツになりますが、場合によっては単純な text/plain コンテンツが返されます。
create_topic_already_exists:
HTTP/1.1 400 Bad Request Content-Type: application/json { "error_code": 40002, "message": "Topic 'my-topic' already exists." }
produce_message_badly_escaped:
HTTP/1.1 400 Bad Request Content-Type: application/json { "error_code": 400, "message": "Unexpected character ('k' (code 107)): was expecting double-quote to start field name\n at [Source: (org.glassfish.jersey.message.internal.ReaderInterceptorExecutor$UnCloseableInputStream); line: 1, column: 3]" }
応答の例:
HTTP/1.1 400 Bad Request Content-Type: text/plain { "description": "Thrown when trying to create a topic and passing a string for the replication factor.", "value": "Cannot deserialize value of type `java.lang.Integer` from String \"all\": not a valid Integer value\\n at [Source: (org.glassfish.jersey.message.internal.ReaderInterceptorExecutor$UnCloseableInputStream); line: 1, column: 53] (through reference chain: io.confluent.kafkarest.entities.v3.CreateTopicRequest[\"partitions_count\"])" }
- 401 Unauthorized --
クライアント認証エラーを示します。Kafka の認証の失敗では、応答の本文にエラーコード 40101 が含まれます。
kafka_authentication_failed:
HTTP/1.1 401 Unauthorized Content-Type: application/json { "error_code": 40101, "message": "Authentication failed" }
- 429 Too Many Requests --
レート制限のしきい値に達したことを示します。クライアントは後で再試行する必要があります。
応答の例:
HTTP/1.1 429 Too Many Requests Content-Type: text/html { "description": "A sample response from Jetty's DoSFilter.", "value": "<html> <head> <meta http-equiv=\"Content-Type\" content=\"text/html;charset=utf-8\"/> <title>Error 429 Too Many Requests</title> </head> <body> <h2>HTTP ERROR 429 Too Many Requests</h2> <table> <tr> <th>URI:</th> <td>/v3/clusters/my-cluster</td> </tr> <tr> <th>STATUS:</th> <td>429</td> </tr> <tr> <th>MESSAGE:</th> <td>Too Many Requests</td> </tr> <tr> <th>SERVLET:</th> <td>default</td> </tr> </table> </body> </html>" }
- 5XX --
クライアント側から対処できない可能性がある、サーバー側の問題です。再試行可能な Kafka エラーでは、応答の本文にエラーコード 50003 が含まれます。
generic_internal_server_error:
HTTP/1.1 5XX - Content-Type: application/json { "error_code": 500, "message": "Internal Server Error" }
produce_v3_missing_schema:
HTTP/1.1 5XX - Content-Type: application/json { "error_code": 50002, "message": "Error when fetching latest schema version. subject = my-topic" }
-
DELETE
/clusters/{cluster_id}/acls
¶ ACL の削除
検索基準に一致する ACL のリストを削除します。
パラメーター: - cluster_id (string) -- Kafka クラスター ID。
クエリのパラメーター: - resource_type (string) -- ACL リソースタイプ。
- resource_name (string) -- ACL リソース名。
- pattern_type (string) -- ACL パターンタイプ。
- principal (string) -- ACL プリンシパル。
- host (string) -- ACL ホスト。
- operation (string) -- ACL 操作。
- permission (string) -- ACL アクセス許可。
ステータスコード: - 200 OK --
削除された ACL のリスト。
応答の例:
HTTP/1.1 200 OK Content-Type: application/json { "data": [ { "kind": "KafkaAcl", "metadata": { "self": "https://pkc-00000.region.provider.confluent.cloud/kafka/v3/clusters/cluster-1/acls?resource_type=TOPIC&resource_name=topic-&pattern_type=PREFIXED&principal=alice&host=*&operation=ALL&permission=ALLOW" }, "cluster_id": "cluster-1", "resource_type": "TOPIC", "resource_name": "topic-", "pattern_type": "PREFIXED", "principal": "alice", "host": "*", "operation": "ALL", "permission": "ALLOW" }, { "kind": "KafkaAcl", "metadata": { "self": "https://pkc-00000.region.provider.confluent.cloud/kafka/v3/clusters/cluster-1/acls?resource_type=CLUSTER&resource_name=cluster-1&pattern_type=LITERAL&principal=bob&host=*&operation=DESCRIBE&permission=DENY" }, "cluster_id": "cluster-1", "resource_type": "CLUSTER", "resource_name": "cluster-2", "pattern_type": "LITERAL", "principal": "alice", "host": "*", "operation": "DESCRIBE", "permission": "DENY" } ] }
- 400 Bad Request --
無効なリクエストエラーを示します。リクエスト本文の予期しないフォーマット、またはそれ以外のリクエスト検証の失敗が原因で発生した可能性があります。通常は application/json コンテンツになりますが、場合によっては単純な text/plain コンテンツが返されます。
create_topic_already_exists:
HTTP/1.1 400 Bad Request Content-Type: application/json { "error_code": 40002, "message": "Topic 'my-topic' already exists." }
produce_message_badly_escaped:
HTTP/1.1 400 Bad Request Content-Type: application/json { "error_code": 400, "message": "Unexpected character ('k' (code 107)): was expecting double-quote to start field name\n at [Source: (org.glassfish.jersey.message.internal.ReaderInterceptorExecutor$UnCloseableInputStream); line: 1, column: 3]" }
応答の例:
HTTP/1.1 400 Bad Request Content-Type: text/plain { "description": "Thrown when trying to create a topic and passing a string for the replication factor.", "value": "Cannot deserialize value of type `java.lang.Integer` from String \"all\": not a valid Integer value\\n at [Source: (org.glassfish.jersey.message.internal.ReaderInterceptorExecutor$UnCloseableInputStream); line: 1, column: 53] (through reference chain: io.confluent.kafkarest.entities.v3.CreateTopicRequest[\"partitions_count\"])" }
- 401 Unauthorized --
クライアント認証エラーを示します。Kafka の認証の失敗では、応答の本文にエラーコード 40101 が含まれます。
kafka_authentication_failed:
HTTP/1.1 401 Unauthorized Content-Type: application/json { "error_code": 40101, "message": "Authentication failed" }
- 429 Too Many Requests --
レート制限のしきい値に達したことを示します。クライアントは後で再試行する必要があります。
応答の例:
HTTP/1.1 429 Too Many Requests Content-Type: text/html { "description": "A sample response from Jetty's DoSFilter.", "value": "<html> <head> <meta http-equiv=\"Content-Type\" content=\"text/html;charset=utf-8\"/> <title>Error 429 Too Many Requests</title> </head> <body> <h2>HTTP ERROR 429 Too Many Requests</h2> <table> <tr> <th>URI:</th> <td>/v3/clusters/my-cluster</td> </tr> <tr> <th>STATUS:</th> <td>429</td> </tr> <tr> <th>MESSAGE:</th> <td>Too Many Requests</td> </tr> <tr> <th>SERVLET:</th> <td>default</td> </tr> </table> </body> </html>" }
- 5XX --
クライアント側から対処できない可能性がある、サーバー側の問題です。再試行可能な Kafka エラーでは、応答の本文にエラーコード 50003 が含まれます。
generic_internal_server_error:
HTTP/1.1 5XX - Content-Type: application/json { "error_code": 500, "message": "Internal Server Error" }
produce_v3_missing_schema:
HTTP/1.1 5XX - Content-Type: application/json { "error_code": 50002, "message": "Error when fetching latest schema version. subject = my-topic" }
コンシューマーグループ(v3)¶
-
GET
/clusters/{cluster_id}/consumer-groups
¶ コンシューマーグループの一覧表示
指定された Kafka クラスターに属するコンシューマーグループのリストを返します。
パラメーター: - cluster_id (string) -- Kafka クラスター ID。
リクエストの例:
GET /clusters/{cluster_id}/consumer-groups HTTP/1.1 Host: example.com
ステータスコード: - 200 OK --
コンシューマーグループのリスト。
応答の例:
HTTP/1.1 200 OK Content-Type: application/json { "kind": "KafkaConsumerGroupList", "metadata": { "self": "https://pkc-00000.region.provider.confluent.cloud/kafka/v3/clusters/cluster-1/consumer-groups", "next": null }, "data": [ { "kind": "KafkaConsumerGroup", "metadata": { "self": "https://pkc-00000.region.provider.confluent.cloud/kafka/v3/clusters/cluster-1/consumer-groups/consumer-group-1", "resource_name": "crn:///kafka=cluster-1/consumer-group=consumer-group-1" }, "cluster_id": "cluster-1", "consumer_group_id": "consumer-group-1", "is_simple": false, "partition_assignor": "org.apache.kafka.clients.consumer.RoundRobinAssignor", "state": "STABLE", "coordinator": { "related": "https://pkc-00000.region.provider.confluent.cloud/kafka/v3/clusters/cluster-1/brokers/1" }, "consumers": { "related": "https://pkc-00000.region.provider.confluent.cloud/kafka/v3/clusters/cluster-1/consumer-groups/consumer-group-1/consumers" }, "lag_summary": { "related": "https://pkc-00000.region.provider.confluent.cloud/kafka/v3/clusters/cluster-1/consumer-groups/consumer-group-1/lag-summary" } }, { "kind": "KafkaConsumerGroup", "metadata": { "self": "https://pkc-00000.region.provider.confluent.cloud/kafka/v3/clusters/cluster-1/consumer-groups/consumer-group-2", "resource_name": "crn:///kafka=cluster-1/consumer-group=consumer-group-2" }, "cluster_id": "cluster-1", "consumer_group_id": "consumer-group-2", "is_simple": false, "partition_assignor": "org.apache.kafka.clients.consumer.StickyAssignor", "state": "PREPARING_REBALANCE", "coordinator": { "related": "https://pkc-00000.region.provider.confluent.cloud/kafka/v3/clusters/cluster-1/brokers/2" }, "consumers": { "related": "https://pkc-00000.region.provider.confluent.cloud/kafka/v3/clusters/cluster-1/consumer-groups/consumer-group-2/consumers" }, "lag_summary": { "related": "https://pkc-00000.region.provider.confluent.cloud/kafka/v3/clusters/cluster-1/consumer-groups/consumer-group-2/lag-summary" } }, { "kind": "KafkaConsumerGroup", "metadata": { "self": "https://pkc-00000.region.provider.confluent.cloud/kafka/v3/clusters/cluster-1/consumer-groups/consumer-group-3", "resource_name": "crn:///kafka=cluster-1/consumer-group=consumer-group-3" }, "cluster_id": "cluster-1", "consumer_group_id": "consumer-group-3", "is_simple": false, "partition_assignor": "org.apache.kafka.clients.consumer.RangeAssignor", "state": "DEAD", "coordinator": { "related": "https://pkc-00000.region.provider.confluent.cloud/kafka/v3/clusters/cluster-1/brokers/3" }, "consumers": { "related": "https://pkc-00000.region.provider.confluent.cloud/kafka/v3/clusters/cluster-1/consumer-groups/consumer-group-3/consumers" }, "lag_summary": { "related": "https://pkc-00000.region.provider.confluent.cloud/kafka/v3/clusters/cluster-1/consumer-groups/consumer-group-3/lag-summary" } } ] }
- 400 Bad Request --
無効なリクエストエラーを示します。リクエスト本文の予期しないフォーマット、またはそれ以外のリクエスト検証の失敗が原因で発生した可能性があります。通常は application/json コンテンツになりますが、場合によっては単純な text/plain コンテンツが返されます。
create_topic_already_exists:
HTTP/1.1 400 Bad Request Content-Type: application/json { "error_code": 40002, "message": "Topic 'my-topic' already exists." }
produce_message_badly_escaped:
HTTP/1.1 400 Bad Request Content-Type: application/json { "error_code": 400, "message": "Unexpected character ('k' (code 107)): was expecting double-quote to start field name\n at [Source: (org.glassfish.jersey.message.internal.ReaderInterceptorExecutor$UnCloseableInputStream); line: 1, column: 3]" }
応答の例:
HTTP/1.1 400 Bad Request Content-Type: text/plain { "description": "Thrown when trying to create a topic and passing a string for the replication factor.", "value": "Cannot deserialize value of type `java.lang.Integer` from String \"all\": not a valid Integer value\\n at [Source: (org.glassfish.jersey.message.internal.ReaderInterceptorExecutor$UnCloseableInputStream); line: 1, column: 53] (through reference chain: io.confluent.kafkarest.entities.v3.CreateTopicRequest[\"partitions_count\"])" }
- 401 Unauthorized --
クライアント認証エラーを示します。Kafka の認証の失敗では、応答の本文にエラーコード 40101 が含まれます。
kafka_authentication_failed:
HTTP/1.1 401 Unauthorized Content-Type: application/json { "error_code": 40101, "message": "Authentication failed" }
- 429 Too Many Requests --
レート制限のしきい値に達したことを示します。クライアントは後で再試行する必要があります。
応答の例:
HTTP/1.1 429 Too Many Requests Content-Type: text/html { "description": "A sample response from Jetty's DoSFilter.", "value": "<html> <head> <meta http-equiv=\"Content-Type\" content=\"text/html;charset=utf-8\"/> <title>Error 429 Too Many Requests</title> </head> <body> <h2>HTTP ERROR 429 Too Many Requests</h2> <table> <tr> <th>URI:</th> <td>/v3/clusters/my-cluster</td> </tr> <tr> <th>STATUS:</th> <td>429</td> </tr> <tr> <th>MESSAGE:</th> <td>Too Many Requests</td> </tr> <tr> <th>SERVLET:</th> <td>default</td> </tr> </table> </body> </html>" }
- 5XX --
クライアント側から対処できない可能性がある、サーバー側の問題です。再試行可能な Kafka エラーでは、応答の本文にエラーコード 50003 が含まれます。
generic_internal_server_error:
HTTP/1.1 5XX - Content-Type: application/json { "error_code": 500, "message": "Internal Server Error" }
produce_v3_missing_schema:
HTTP/1.1 5XX - Content-Type: application/json { "error_code": 50002, "message": "Error when fetching latest schema version. subject = my-topic" }
-
GET
/clusters/{cluster_id}/consumer-groups/{consumer_group_id}
¶ コンシューマーグループの取得
consumer_group_id
で指定されたコンシューマーグループを返します。パラメーター: - cluster_id (string) -- Kafka クラスター ID。
- consumer_group_id (string) -- コンシューマーグループ ID。
リクエストの例:
GET /clusters/{cluster_id}/consumer-groups/{consumer_group_id} HTTP/1.1 Host: example.com
ステータスコード: - 200 OK --
コンシューマーグループ。
応答の例:
HTTP/1.1 200 OK Content-Type: application/json { "kind": "KafkaConsumerGroup", "metadata": { "self": "https://pkc-00000.region.provider.confluent.cloud/kafka/v3/clusters/cluster-1/consumer-groups/consumer-group-1", "resource_name": "crn:///kafka=cluster-1/consumer-group=consumer-group-1" }, "cluster_id": "cluster-1", "consumer_group_id": "consumer-group-1", "is_simple": false, "partition_assignor": "org.apache.kafka.clients.consumer.RoundRobinAssignor", "state": "STABLE", "coordinator": { "related": "https://pkc-00000.region.provider.confluent.cloud/kafka/v3/clusters/cluster-1/brokers/1" }, "consumers": { "related": "https://pkc-00000.region.provider.confluent.cloud/kafka/v3/clusters/cluster-1/consumer-groups/consumer-group-1/consumers" }, "lag_summary": { "related": "https://pkc-00000.region.provider.confluent.cloud/kafka/v3/clusters/cluster-1/consumer-groups/consumer-group-1/lag-summary" } }
- 400 Bad Request --
無効なリクエストエラーを示します。リクエスト本文の予期しないフォーマット、またはそれ以外のリクエスト検証の失敗が原因で発生した可能性があります。通常は application/json コンテンツになりますが、場合によっては単純な text/plain コンテンツが返されます。
create_topic_already_exists:
HTTP/1.1 400 Bad Request Content-Type: application/json { "error_code": 40002, "message": "Topic 'my-topic' already exists." }
produce_message_badly_escaped:
HTTP/1.1 400 Bad Request Content-Type: application/json { "error_code": 400, "message": "Unexpected character ('k' (code 107)): was expecting double-quote to start field name\n at [Source: (org.glassfish.jersey.message.internal.ReaderInterceptorExecutor$UnCloseableInputStream); line: 1, column: 3]" }
応答の例:
HTTP/1.1 400 Bad Request Content-Type: text/plain { "description": "Thrown when trying to create a topic and passing a string for the replication factor.", "value": "Cannot deserialize value of type `java.lang.Integer` from String \"all\": not a valid Integer value\\n at [Source: (org.glassfish.jersey.message.internal.ReaderInterceptorExecutor$UnCloseableInputStream); line: 1, column: 53] (through reference chain: io.confluent.kafkarest.entities.v3.CreateTopicRequest[\"partitions_count\"])" }
- 401 Unauthorized --
クライアント認証エラーを示します。Kafka の認証の失敗では、応答の本文にエラーコード 40101 が含まれます。
kafka_authentication_failed:
HTTP/1.1 401 Unauthorized Content-Type: application/json { "error_code": 40101, "message": "Authentication failed" }
- 429 Too Many Requests --
レート制限のしきい値に達したことを示します。クライアントは後で再試行する必要があります。
応答の例:
HTTP/1.1 429 Too Many Requests Content-Type: text/html { "description": "A sample response from Jetty's DoSFilter.", "value": "<html> <head> <meta http-equiv=\"Content-Type\" content=\"text/html;charset=utf-8\"/> <title>Error 429 Too Many Requests</title> </head> <body> <h2>HTTP ERROR 429 Too Many Requests</h2> <table> <tr> <th>URI:</th> <td>/v3/clusters/my-cluster</td> </tr> <tr> <th>STATUS:</th> <td>429</td> </tr> <tr> <th>MESSAGE:</th> <td>Too Many Requests</td> </tr> <tr> <th>SERVLET:</th> <td>default</td> </tr> </table> </body> </html>" }
- 5XX --
クライアント側から対処できない可能性がある、サーバー側の問題です。再試行可能な Kafka エラーでは、応答の本文にエラーコード 50003 が含まれます。
generic_internal_server_error:
HTTP/1.1 5XX - Content-Type: application/json { "error_code": 500, "message": "Internal Server Error" }
produce_v3_missing_schema:
HTTP/1.1 5XX - Content-Type: application/json { "error_code": 50002, "message": "Error when fetching latest schema version. subject = my-topic" }
-
GET
/clusters/{cluster_id}/consumer-groups/{consumer_group_id}/consumers
¶ コンシューマーの一覧表示
指定されたコンシューマーグループに属するコンシューマーのリストを返します。
パラメーター: - cluster_id (string) -- Kafka クラスター ID。
- consumer_group_id (string) -- コンシューマーグループ ID。
リクエストの例:
GET /clusters/{cluster_id}/consumer-groups/{consumer_group_id}/consumers HTTP/1.1 Host: example.com
ステータスコード: - 200 OK --
コンシューマーのリスト。
応答の例:
HTTP/1.1 200 OK Content-Type: application/json { "kind": "KafkaConsumerList", "metadata": { "self": "https://pkc-00000.region.provider.confluent.cloud/kafka/v3/clusters/cluster-1/consumer-groups/consumer-group-1/consumers", "next": null }, "data": [ { "kind": "KafkaConsumer", "metadata": { "self": "https://pkc-00000.region.provider.confluent.cloud/kafka/v3/clusters/cluster-1/consumer-groups/consumer-group-1/consumers/consumer-1", "resource_name": "crn:///kafka=cluster-1/consumer-group=consumer-group-1/consumer=consumer-1" }, "cluster_id": "cluster-1", "consumer_group_id": "consumer-group-1", "consumer_id": "consumer-1", "instance_id": "consumer-instance-1", "client_id": "client-1", "assignments": { "related": "https://pkc-00000.region.provider.confluent.cloud/kafka/v3/clusters/cluster-1/consumer-groups/consumer-group-1/consumers/consumer-1/assignments" } }, { "kind": "KafkaConsumer", "metadata": { "self": "https://pkc-00000.region.provider.confluent.cloud/kafka/v3/clusters/cluster-1/consumer-groups/consumer-group-1/consumers/consumer-2", "resource_name": "crn:///kafka=cluster-1/consumer-group=consumer-group-1/consumer=consumer-2" }, "cluster_id": "cluster-1", "consumer_group_id": "consumer-group-1", "consumer_id": "consumer-2", "instance_id": "consumer-instance-2", "client_id": "client-2", "assignments": { "related": "https://pkc-00000.region.provider.confluent.cloud/kafka/v3/clusters/cluster-1/consumer-groups/consumer-group-1/consumers/consumer-2/assignments" } }, { "kind": "KafkaConsumer", "metadata": { "self": "https://pkc-00000.region.provider.confluent.cloud/kafka/v3/clusters/cluster-1/consumer-groups/consumer-group-1/consumers/consumer-2", "resource_name": "crn:///kafka=cluster-1/consumer-group=consumer-group-1/consumer=consumer-2" }, "cluster_id": "cluster-1", "consumer_group_id": "consumer-group-1", "consumer_id": "consumer-2", "instance_id": "consumer-instance-2", "client_id": "client-2", "assignments": { "related": "https://pkc-00000.region.provider.confluent.cloud/kafka/v3/clusters/cluster-1/consumer-groups/consumer-group-1/consumers/consumer-2/assignments" } } ] }
- 400 Bad Request --
無効なリクエストエラーを示します。リクエスト本文の予期しないフォーマット、またはそれ以外のリクエスト検証の失敗が原因で発生した可能性があります。通常は application/json コンテンツになりますが、場合によっては単純な text/plain コンテンツが返されます。
create_topic_already_exists:
HTTP/1.1 400 Bad Request Content-Type: application/json { "error_code": 40002, "message": "Topic 'my-topic' already exists." }
produce_message_badly_escaped:
HTTP/1.1 400 Bad Request Content-Type: application/json { "error_code": 400, "message": "Unexpected character ('k' (code 107)): was expecting double-quote to start field name\n at [Source: (org.glassfish.jersey.message.internal.ReaderInterceptorExecutor$UnCloseableInputStream); line: 1, column: 3]" }
応答の例:
HTTP/1.1 400 Bad Request Content-Type: text/plain { "description": "Thrown when trying to create a topic and passing a string for the replication factor.", "value": "Cannot deserialize value of type `java.lang.Integer` from String \"all\": not a valid Integer value\\n at [Source: (org.glassfish.jersey.message.internal.ReaderInterceptorExecutor$UnCloseableInputStream); line: 1, column: 53] (through reference chain: io.confluent.kafkarest.entities.v3.CreateTopicRequest[\"partitions_count\"])" }
- 401 Unauthorized --
クライアント認証エラーを示します。Kafka の認証の失敗では、応答の本文にエラーコード 40101 が含まれます。
kafka_authentication_failed:
HTTP/1.1 401 Unauthorized Content-Type: application/json { "error_code": 40101, "message": "Authentication failed" }
- 429 Too Many Requests --
レート制限のしきい値に達したことを示します。クライアントは後で再試行する必要があります。
応答の例:
HTTP/1.1 429 Too Many Requests Content-Type: text/html { "description": "A sample response from Jetty's DoSFilter.", "value": "<html> <head> <meta http-equiv=\"Content-Type\" content=\"text/html;charset=utf-8\"/> <title>Error 429 Too Many Requests</title> </head> <body> <h2>HTTP ERROR 429 Too Many Requests</h2> <table> <tr> <th>URI:</th> <td>/v3/clusters/my-cluster</td> </tr> <tr> <th>STATUS:</th> <td>429</td> </tr> <tr> <th>MESSAGE:</th> <td>Too Many Requests</td> </tr> <tr> <th>SERVLET:</th> <td>default</td> </tr> </table> </body> </html>" }
- 5XX --
クライアント側から対処できない可能性がある、サーバー側の問題です。再試行可能な Kafka エラーでは、応答の本文にエラーコード 50003 が含まれます。
generic_internal_server_error:
HTTP/1.1 5XX - Content-Type: application/json { "error_code": 500, "message": "Internal Server Error" }
produce_v3_missing_schema:
HTTP/1.1 5XX - Content-Type: application/json { "error_code": 50002, "message": "Error when fetching latest schema version. subject = my-topic" }
-
GET
/clusters/{cluster_id}/consumer-groups/{consumer_group_id}/lag-summary
¶ コンシューマーグループラグの概要の取得
指定されたコンシューマーグループに属するコンシューマーの最大ラグと合計ラグを返します。
パラメーター: - cluster_id (string) -- Kafka クラスター ID。
- consumer_group_id (string) -- コンシューマーグループ ID。
リクエストの例:
GET /clusters/{cluster_id}/consumer-groups/{consumer_group_id}/lag-summary HTTP/1.1 Host: example.com
ステータスコード: - 200 OK --
単一コンシューマーグループ内の最大および合計コンシューマーラグ。
応答の例:
HTTP/1.1 200 OK Content-Type: application/json { "kind": "KafkaConsumerGroupLagSummary", "metadata": { "self": "https://pkc-00000.region.provider.confluent.cloud/kafka/v3/clusters/cluster-1/consumer-groups/consumer-group-1/lag-summary", "resource_name": "crn:///kafka=cluster-1/consumer-groups=consumer-group-1/lag-summary" }, "cluster_id": "cluster-1", "consumer_group_id": "consumer-group-1", "max_lag_consumer_id": "consumer-1", "max_lag_instance_id": "consumer-instance-1", "max_lag_client_id": "client-1", "max_lag_topic_name": "topic-1", "max_lag_partition_id": 1, "max_lag": 100, "total_lag": 110, "max_lag_consumer": { "related": "https://pkc-00000.region.provider.confluent.cloud/kafka/v3/clusters/cluster-1/consumer-groups/consumer-group-1/consumers/consumer-1" }, "max_lag_partition": { "related": "https://pkc-00000.region.provider.confluent.cloud/kafka/v3/clusters/cluster-1/topics/topic-1/partitions/1" } }
- 400 Bad Request --
無効なリクエストエラーを示します。リクエスト本文の予期しないフォーマット、またはそれ以外のリクエスト検証の失敗が原因で発生した可能性があります。通常は application/json コンテンツになりますが、場合によっては単純な text/plain コンテンツが返されます。
create_topic_already_exists:
HTTP/1.1 400 Bad Request Content-Type: application/json { "error_code": 40002, "message": "Topic 'my-topic' already exists." }
produce_message_badly_escaped:
HTTP/1.1 400 Bad Request Content-Type: application/json { "error_code": 400, "message": "Unexpected character ('k' (code 107)): was expecting double-quote to start field name\n at [Source: (org.glassfish.jersey.message.internal.ReaderInterceptorExecutor$UnCloseableInputStream); line: 1, column: 3]" }
応答の例:
HTTP/1.1 400 Bad Request Content-Type: text/plain { "description": "Thrown when trying to create a topic and passing a string for the replication factor.", "value": "Cannot deserialize value of type `java.lang.Integer` from String \"all\": not a valid Integer value\\n at [Source: (org.glassfish.jersey.message.internal.ReaderInterceptorExecutor$UnCloseableInputStream); line: 1, column: 53] (through reference chain: io.confluent.kafkarest.entities.v3.CreateTopicRequest[\"partitions_count\"])" }
- 401 Unauthorized --
クライアント認証エラーを示します。Kafka の認証の失敗では、応答の本文にエラーコード 40101 が含まれます。
kafka_authentication_failed:
HTTP/1.1 401 Unauthorized Content-Type: application/json { "error_code": 40101, "message": "Authentication failed" }
- 429 Too Many Requests --
レート制限のしきい値に達したことを示します。クライアントは後で再試行する必要があります。
応答の例:
HTTP/1.1 429 Too Many Requests Content-Type: text/html { "description": "A sample response from Jetty's DoSFilter.", "value": "<html> <head> <meta http-equiv=\"Content-Type\" content=\"text/html;charset=utf-8\"/> <title>Error 429 Too Many Requests</title> </head> <body> <h2>HTTP ERROR 429 Too Many Requests</h2> <table> <tr> <th>URI:</th> <td>/v3/clusters/my-cluster</td> </tr> <tr> <th>STATUS:</th> <td>429</td> </tr> <tr> <th>MESSAGE:</th> <td>Too Many Requests</td> </tr> <tr> <th>SERVLET:</th> <td>default</td> </tr> </table> </body> </html>" }
- 5XX --
クライアント側から対処できない可能性がある、サーバー側の問題です。再試行可能な Kafka エラーでは、応答の本文にエラーコード 50003 が含まれます。
generic_internal_server_error:
HTTP/1.1 5XX - Content-Type: application/json { "error_code": 500, "message": "Internal Server Error" }
produce_v3_missing_schema:
HTTP/1.1 5XX - Content-Type: application/json { "error_code": 50002, "message": "Error when fetching latest schema version. subject = my-topic" }
-
GET
/clusters/{cluster_id}/consumer-groups/{consumer_group_id}/lags
¶ コンシューマーラグの一覧表示
指定されたコンシューマーグループに属するコンシューマーについて、コンシューマーラグのリストを返します。
パラメーター: - cluster_id (string) -- Kafka クラスター ID。
- consumer_group_id (string) -- コンシューマーグループ ID。
リクエストの例:
GET /clusters/{cluster_id}/consumer-groups/{consumer_group_id}/lags HTTP/1.1 Host: example.com
ステータスコード: - 200 OK --
コンシューマーラグのリスト。
応答の例:
HTTP/1.1 200 OK Content-Type: application/json { "kind": "KafkaConsumerLagList", "metadata": { "self": "https://pkc-00000.region.provider.confluent.cloud/kafka/v3/clusters/cluster-1/consumer-groups/consumer-group-1/lags", "next": null }, "data": [ { "kind": "KafkaConsumerLag", "metadata": { "self": "https://pkc-00000.region.provider.confluent.cloud/kafka/v3/clusters/cluster-1/consumer-groups/consumer-group-1/lags/topic-1/partitions/1", "resource_name": "crn:///kafka=cluster-1/consumer-group=consumer-group-1/lag=topic-1/partition=1" }, "cluster_id": "cluster-1", "consumer_group_id": "consumer-group-1", "topic_name": "topic-1", "partition_id": 1, "consumer_id": "consumer-1", "instance_id": "consumer-instance-1", "client_id": "client-1", "current_offset": 1, "log_end_offset": 101, "lag": 100 }, { "kind": "KafkaConsumerLag", "metadata": { "self": "https://pkc-00000.region.provider.confluent.cloud/kafka/v3/clusters/cluster-1/consumer-groups/consumer-group-1/lags/topic-1/partitions/2", "resource_name": "crn:///kafka=cluster-1/consumer-group=consumer-group-1/lag=topic-1/partition=2" }, "cluster_id": "cluster-1", "consumer_group_id": "consumer-group-1", "topic_name": "topic-1", "partition_id": 2, "consumer_id": "consumer-2", "instance_id": "consumer-instance-2", "client_id": "client-2", "current_offset": 1, "log_end_offset": 11, "lag": 10 }, { "kind": "KafkaConsumerLag", "metadata": { "self": "https://pkc-00000.region.provider.confluent.cloud/kafka/v3/clusters/cluster-1/consumer-groups/consumer-group-1/lags/topic-1/partitions/3", "resource_name": "crn:///kafka=cluster-1/consumer-group=consumer-group-1/lag=topic-1/partition=3" }, "cluster_id": "cluster-1", "consumer_group_id": "consumer-group-1", "topic_name": "topic-1", "partition_id": 3, "consumer_id": "consumer-3", "instance_id": "consumer-instance-3", "client_id": "client-3", "current_offset": 1, "log_end_offset": 1, "lag": 0 } ] }
- 400 Bad Request --
無効なリクエストエラーを示します。リクエスト本文の予期しないフォーマット、またはそれ以外のリクエスト検証の失敗が原因で発生した可能性があります。通常は application/json コンテンツになりますが、場合によっては単純な text/plain コンテンツが返されます。
create_topic_already_exists:
HTTP/1.1 400 Bad Request Content-Type: application/json { "error_code": 40002, "message": "Topic 'my-topic' already exists." }
produce_message_badly_escaped:
HTTP/1.1 400 Bad Request Content-Type: application/json { "error_code": 400, "message": "Unexpected character ('k' (code 107)): was expecting double-quote to start field name\n at [Source: (org.glassfish.jersey.message.internal.ReaderInterceptorExecutor$UnCloseableInputStream); line: 1, column: 3]" }
応答の例:
HTTP/1.1 400 Bad Request Content-Type: text/plain { "description": "Thrown when trying to create a topic and passing a string for the replication factor.", "value": "Cannot deserialize value of type `java.lang.Integer` from String \"all\": not a valid Integer value\\n at [Source: (org.glassfish.jersey.message.internal.ReaderInterceptorExecutor$UnCloseableInputStream); line: 1, column: 53] (through reference chain: io.confluent.kafkarest.entities.v3.CreateTopicRequest[\"partitions_count\"])" }
- 401 Unauthorized --
クライアント認証エラーを示します。Kafka の認証の失敗では、応答の本文にエラーコード 40101 が含まれます。
kafka_authentication_failed:
HTTP/1.1 401 Unauthorized Content-Type: application/json { "error_code": 40101, "message": "Authentication failed" }
- 429 Too Many Requests --
レート制限のしきい値に達したことを示します。クライアントは後で再試行する必要があります。
応答の例:
HTTP/1.1 429 Too Many Requests Content-Type: text/html { "description": "A sample response from Jetty's DoSFilter.", "value": "<html> <head> <meta http-equiv=\"Content-Type\" content=\"text/html;charset=utf-8\"/> <title>Error 429 Too Many Requests</title> </head> <body> <h2>HTTP ERROR 429 Too Many Requests</h2> <table> <tr> <th>URI:</th> <td>/v3/clusters/my-cluster</td> </tr> <tr> <th>STATUS:</th> <td>429</td> </tr> <tr> <th>MESSAGE:</th> <td>Too Many Requests</td> </tr> <tr> <th>SERVLET:</th> <td>default</td> </tr> </table> </body> </html>" }
- 5XX --
クライアント側から対処できない可能性がある、サーバー側の問題です。再試行可能な Kafka エラーでは、応答の本文にエラーコード 50003 が含まれます。
generic_internal_server_error:
HTTP/1.1 5XX - Content-Type: application/json { "error_code": 500, "message": "Internal Server Error" }
produce_v3_missing_schema:
HTTP/1.1 5XX - Content-Type: application/json { "error_code": 50002, "message": "Error when fetching latest schema version. subject = my-topic" }
-
GET
/clusters/{cluster_id}/consumer-groups/{consumer_group_id}/consumers/{consumer_id}
¶ コンシューマーの取得
consumer_id
で指定されたコンシューマーを返します。パラメーター: - cluster_id (string) -- Kafka クラスター ID。
- consumer_group_id (string) -- コンシューマーグループ ID。
- consumer_id (string) -- コンシューマー ID。
リクエストの例:
GET /clusters/{cluster_id}/consumer-groups/{consumer_group_id}/consumers/{consumer_id} HTTP/1.1 Host: example.com
ステータスコード: - 200 OK --
コンシューマー。
応答の例:
HTTP/1.1 200 OK Content-Type: application/json { "kind": "KafkaConsumer", "metadata": { "self": "https://pkc-00000.region.provider.confluent.cloud/kafka/v3/clusters/cluster-1/consumer-groups/consumer-group-1/consumers/consumer-1", "resource_name": "crn:///kafka=cluster-1/consumer-group=consumer-group-1/consumer=consumer-1" }, "cluster_id": "cluster-1", "consumer_group_id": "consumer-group-1", "consumer_id": "consumer-1", "instance_id": "consumer-instance-1", "client_id": "client-1", "assignments": { "related": "https://pkc-00000.region.provider.confluent.cloud/kafka/v3/clusters/cluster-1/consumer-groups/consumer-group-1/consumers/consumer-1/assignments" } }
- 400 Bad Request --
無効なリクエストエラーを示します。リクエスト本文の予期しないフォーマット、またはそれ以外のリクエスト検証の失敗が原因で発生した可能性があります。通常は application/json コンテンツになりますが、場合によっては単純な text/plain コンテンツが返されます。
create_topic_already_exists:
HTTP/1.1 400 Bad Request Content-Type: application/json { "error_code": 40002, "message": "Topic 'my-topic' already exists." }
produce_message_badly_escaped:
HTTP/1.1 400 Bad Request Content-Type: application/json { "error_code": 400, "message": "Unexpected character ('k' (code 107)): was expecting double-quote to start field name\n at [Source: (org.glassfish.jersey.message.internal.ReaderInterceptorExecutor$UnCloseableInputStream); line: 1, column: 3]" }
応答の例:
HTTP/1.1 400 Bad Request Content-Type: text/plain { "description": "Thrown when trying to create a topic and passing a string for the replication factor.", "value": "Cannot deserialize value of type `java.lang.Integer` from String \"all\": not a valid Integer value\\n at [Source: (org.glassfish.jersey.message.internal.ReaderInterceptorExecutor$UnCloseableInputStream); line: 1, column: 53] (through reference chain: io.confluent.kafkarest.entities.v3.CreateTopicRequest[\"partitions_count\"])" }
- 401 Unauthorized --
クライアント認証エラーを示します。Kafka の認証の失敗では、応答の本文にエラーコード 40101 が含まれます。
kafka_authentication_failed:
HTTP/1.1 401 Unauthorized Content-Type: application/json { "error_code": 40101, "message": "Authentication failed" }
- 429 Too Many Requests --
レート制限のしきい値に達したことを示します。クライアントは後で再試行する必要があります。
応答の例:
HTTP/1.1 429 Too Many Requests Content-Type: text/html { "description": "A sample response from Jetty's DoSFilter.", "value": "<html> <head> <meta http-equiv=\"Content-Type\" content=\"text/html;charset=utf-8\"/> <title>Error 429 Too Many Requests</title> </head> <body> <h2>HTTP ERROR 429 Too Many Requests</h2> <table> <tr> <th>URI:</th> <td>/v3/clusters/my-cluster</td> </tr> <tr> <th>STATUS:</th> <td>429</td> </tr> <tr> <th>MESSAGE:</th> <td>Too Many Requests</td> </tr> <tr> <th>SERVLET:</th> <td>default</td> </tr> </table> </body> </html>" }
- 5XX --
クライアント側から対処できない可能性がある、サーバー側の問題です。再試行可能な Kafka エラーでは、応答の本文にエラーコード 50003 が含まれます。
generic_internal_server_error:
HTTP/1.1 5XX - Content-Type: application/json { "error_code": 500, "message": "Internal Server Error" }
produce_v3_missing_schema:
HTTP/1.1 5XX - Content-Type: application/json { "error_code": 50002, "message": "Error when fetching latest schema version. subject = my-topic" }
-
GET
/clusters/{cluster_id}/consumer-groups/{consumer_group_id}/consumers/{consumer_id}/assignments
¶ コンシューマー割り当ての一覧表示
指定されたコンシューマーのパーティション割り当てのリストを返します。
パラメーター: - cluster_id (string) -- Kafka クラスター ID。
- consumer_group_id (string) -- コンシューマーグループ ID。
- consumer_id (string) -- コンシューマー ID。
リクエストの例:
GET /clusters/{cluster_id}/consumer-groups/{consumer_group_id}/consumers/{consumer_id}/assignments HTTP/1.1 Host: example.com
ステータスコード: - 200 OK --
コンシューマーグループ割り当てのリスト。
応答の例:
HTTP/1.1 200 OK Content-Type: application/json { "kind": "KafkaConsumerAssignmentList", "metadata": { "self": "https://pkc-00000.region.provider.confluent.cloud/kafka/v3/clusters/cluster-1/consumer-groups/consumer-group-1/consumers/consumer-1/assignments", "next": null }, "data": [ { "kind": "KafkaConsumerAssignment", "metadata": { "self": "https://pkc-00000.region.provider.confluent.cloud/kafka/v3/clusters/cluster-1/consumer-groups/consumer-group-1/consumers/consumer-1/assignments/topic-1/partitions/1", "resource_name": "crn:///kafka=cluster-1/consumer-group=consumer-group-1/consumer=consumer-1/assignment=topic=1/partition=1" }, "cluster_id": "cluster-1", "consumer_group_id": "consumer-group-1", "consumer_id": "consumer-1", "topic_name": "topic-1", "partition_id": 1, "partition": { "related": "https://pkc-00000.region.provider.confluent.cloud/kafka/v3/clusters/cluster-1/topics/topic-1/partitions/1" }, "lag": { "related": "https://pkc-00000.region.provider.confluent.cloud/kafka/v3/clusters/cluster-1/consumer-groups/consumer-group-1/lags/topic-1/partitions/1" } }, { "kind": "KafkaConsumerAssignment", "metadata": { "self": "https://pkc-00000.region.provider.confluent.cloud/kafka/v3/clusters/cluster-1/consumer-groups/consumer-group-1/consumers/consumer-1/assignments/topic-2/partitions/2", "resource_name": "crn:///kafka=cluster-1/consumer-group=consumer-group-1/consumer=consumer-1/assignment=topic=2/partition=2" }, "cluster_id": "cluster-1", "consumer_group_id": "consumer-group-1", "consumer_id": "consumer-1", "topic_name": "topic-2", "partition_id": 2, "partition": { "related": "https://pkc-00000.region.provider.confluent.cloud/kafka/v3/clusters/cluster-1/topics/topic-2/partitions/2" }, "lag": { "related": "https://pkc-00000.region.provider.confluent.cloud/kafka/v3/clusters/cluster-1/consumer-groups/consumer-group-1/lags/topic-2/partitions/2" } }, { "kind": "KafkaConsumerAssignment", "metadata": { "self": "https://pkc-00000.region.provider.confluent.cloud/kafka/v3/clusters/cluster-1/consumer-groups/consumer-group-1/consumers/consumer-1/assignments/topic-3/partitions/3", "resource_name": "crn:///kafka=cluster-1/consumer-group=consumer-group-1/consumer=consumer-1/assignment=topic=3/partition=3" }, "cluster_id": "cluster-1", "consumer_group_id": "consumer-group-1", "consumer_id": "consumer-1", "topic_name": "topic-3", "partition_id": 3, "partition": { "related": "https://pkc-00000.region.provider.confluent.cloud/kafka/v3/clusters/cluster-1/topics/topic-3/partitions/3" }, "lag": { "related": "https://pkc-00000.region.provider.confluent.cloud/kafka/v3/clusters/cluster-1/consumer-groups/consumer-group-1/lags/topic-3/partitions/3" } } ] }
- 400 Bad Request --
無効なリクエストエラーを示します。リクエスト本文の予期しないフォーマット、またはそれ以外のリクエスト検証の失敗が原因で発生した可能性があります。通常は application/json コンテンツになりますが、場合によっては単純な text/plain コンテンツが返されます。
create_topic_already_exists:
HTTP/1.1 400 Bad Request Content-Type: application/json { "error_code": 40002, "message": "Topic 'my-topic' already exists." }
produce_message_badly_escaped:
HTTP/1.1 400 Bad Request Content-Type: application/json { "error_code": 400, "message": "Unexpected character ('k' (code 107)): was expecting double-quote to start field name\n at [Source: (org.glassfish.jersey.message.internal.ReaderInterceptorExecutor$UnCloseableInputStream); line: 1, column: 3]" }
応答の例:
HTTP/1.1 400 Bad Request Content-Type: text/plain { "description": "Thrown when trying to create a topic and passing a string for the replication factor.", "value": "Cannot deserialize value of type `java.lang.Integer` from String \"all\": not a valid Integer value\\n at [Source: (org.glassfish.jersey.message.internal.ReaderInterceptorExecutor$UnCloseableInputStream); line: 1, column: 53] (through reference chain: io.confluent.kafkarest.entities.v3.CreateTopicRequest[\"partitions_count\"])" }
- 401 Unauthorized --
クライアント認証エラーを示します。Kafka の認証の失敗では、応答の本文にエラーコード 40101 が含まれます。
kafka_authentication_failed:
HTTP/1.1 401 Unauthorized Content-Type: application/json { "error_code": 40101, "message": "Authentication failed" }
- 429 Too Many Requests --
レート制限のしきい値に達したことを示します。クライアントは後で再試行する必要があります。
応答の例:
HTTP/1.1 429 Too Many Requests Content-Type: text/html { "description": "A sample response from Jetty's DoSFilter.", "value": "<html> <head> <meta http-equiv=\"Content-Type\" content=\"text/html;charset=utf-8\"/> <title>Error 429 Too Many Requests</title> </head> <body> <h2>HTTP ERROR 429 Too Many Requests</h2> <table> <tr> <th>URI:</th> <td>/v3/clusters/my-cluster</td> </tr> <tr> <th>STATUS:</th> <td>429</td> </tr> <tr> <th>MESSAGE:</th> <td>Too Many Requests</td> </tr> <tr> <th>SERVLET:</th> <td>default</td> </tr> </table> </body> </html>" }
- 5XX --
クライアント側から対処できない可能性がある、サーバー側の問題です。再試行可能な Kafka エラーでは、応答の本文にエラーコード 50003 が含まれます。
generic_internal_server_error:
HTTP/1.1 5XX - Content-Type: application/json { "error_code": 500, "message": "Internal Server Error" }
produce_v3_missing_schema:
HTTP/1.1 5XX - Content-Type: application/json { "error_code": 50002, "message": "Error when fetching latest schema version. subject = my-topic" }
-
GET
/clusters/{cluster_id}/consumer-groups/{consumer_group_id}/consumers/{consumer_id}/assignments/{topic_name}/partitions/{partition_id}
¶ コンシューマー割り当ての取得
指定されたパーティションに対して指定したコンシューマー割り当てに関する情報を返します。
パラメーター: - cluster_id (string) -- Kafka クラスター ID。
- consumer_group_id (string) -- コンシューマーグループ ID。
- consumer_id (string) -- コンシューマー ID。
- topic_name (string) -- トピック名。
- partition_id (integer) -- パーティション ID。
リクエストの例:
GET /clusters/{cluster_id}/consumer-groups/{consumer_group_id}/consumers/{consumer_id}/assignments/{topic_name}/partitions/{partition_id} HTTP/1.1 Host: example.com
ステータスコード: - 200 OK --
コンシューマーグループの割り当て。
応答の例:
HTTP/1.1 200 OK Content-Type: application/json { "kind": "KafkaConsumerAssignment", "metadata": { "self": "https://pkc-00000.region.provider.confluent.cloud/kafka/v3/clusters/cluster-1/consumer-groups/consumer-group-1/consumers/consumer-1/assignments/topic-1/partitions/1", "resource_name": "crn:///kafka=cluster-1/consumer-group=consumer-group-1/consumer=consumer-1/assignment=topic=1/partition=1" }, "cluster_id": "cluster-1", "consumer_group_id": "consumer-group-1", "consumer_id": "consumer-1", "topic_name": "topic-1", "partition_id": 1, "partition": { "related": "https://pkc-00000.region.provider.confluent.cloud/kafka/v3/clusters/cluster-1/topics/topic-1/partitions/1" }, "lag": { "related": "https://pkc-00000.region.provider.confluent.cloud/kafka/v3/clusters/cluster-1/consumer-groups/consumer-group-1/lags/topic-1/partitions/1" } }
- 400 Bad Request --
無効なリクエストエラーを示します。リクエスト本文の予期しないフォーマット、またはそれ以外のリクエスト検証の失敗が原因で発生した可能性があります。通常は application/json コンテンツになりますが、場合によっては単純な text/plain コンテンツが返されます。
create_topic_already_exists:
HTTP/1.1 400 Bad Request Content-Type: application/json { "error_code": 40002, "message": "Topic 'my-topic' already exists." }
produce_message_badly_escaped:
HTTP/1.1 400 Bad Request Content-Type: application/json { "error_code": 400, "message": "Unexpected character ('k' (code 107)): was expecting double-quote to start field name\n at [Source: (org.glassfish.jersey.message.internal.ReaderInterceptorExecutor$UnCloseableInputStream); line: 1, column: 3]" }
応答の例:
HTTP/1.1 400 Bad Request Content-Type: text/plain { "description": "Thrown when trying to create a topic and passing a string for the replication factor.", "value": "Cannot deserialize value of type `java.lang.Integer` from String \"all\": not a valid Integer value\\n at [Source: (org.glassfish.jersey.message.internal.ReaderInterceptorExecutor$UnCloseableInputStream); line: 1, column: 53] (through reference chain: io.confluent.kafkarest.entities.v3.CreateTopicRequest[\"partitions_count\"])" }
- 401 Unauthorized --
クライアント認証エラーを示します。Kafka の認証の失敗では、応答の本文にエラーコード 40101 が含まれます。
kafka_authentication_failed:
HTTP/1.1 401 Unauthorized Content-Type: application/json { "error_code": 40101, "message": "Authentication failed" }
- 429 Too Many Requests --
レート制限のしきい値に達したことを示します。クライアントは後で再試行する必要があります。
応答の例:
HTTP/1.1 429 Too Many Requests Content-Type: text/html { "description": "A sample response from Jetty's DoSFilter.", "value": "<html> <head> <meta http-equiv=\"Content-Type\" content=\"text/html;charset=utf-8\"/> <title>Error 429 Too Many Requests</title> </head> <body> <h2>HTTP ERROR 429 Too Many Requests</h2> <table> <tr> <th>URI:</th> <td>/v3/clusters/my-cluster</td> </tr> <tr> <th>STATUS:</th> <td>429</td> </tr> <tr> <th>MESSAGE:</th> <td>Too Many Requests</td> </tr> <tr> <th>SERVLET:</th> <td>default</td> </tr> </table> </body> </html>" }
- 5XX --
クライアント側から対処できない可能性がある、サーバー側の問題です。再試行可能な Kafka エラーでは、応答の本文にエラーコード 50003 が含まれます。
generic_internal_server_error:
HTTP/1.1 5XX - Content-Type: application/json { "error_code": 500, "message": "Internal Server Error" }
produce_v3_missing_schema:
HTTP/1.1 5XX - Content-Type: application/json { "error_code": 50002, "message": "Error when fetching latest schema version. subject = my-topic" }
パーティション(v3)¶
-
GET
/clusters/{cluster_id}/consumer-groups/{consumer_group_id}/lags/{topic_name}/partitions/{partition_id}
¶ コンシューマーラグの取得
指定した
partition_id
を持つパーティション上のコンシューマーラグを返します。パラメーター: - cluster_id (string) -- Kafka クラスター ID。
- consumer_group_id (string) -- コンシューマーグループ ID。
- topic_name (string) -- トピック名。
- partition_id (integer) -- パーティション ID。
リクエストの例:
GET /clusters/{cluster_id}/consumer-groups/{consumer_group_id}/lags/{topic_name}/partitions/{partition_id} HTTP/1.1 Host: example.com
ステータスコード: - 200 OK --
コンシューマーラグ。
応答の例:
HTTP/1.1 200 OK Content-Type: application/json { "kind": "KafkaConsumerLag", "metadata": { "self": "https://pkc-00000.region.provider.confluent.cloud/kafka/v3/clusters/cluster-1/consumer-groups/consumer-group-1/lags/topic-1/partitions/1", "resource_name": "crn:///kafka=cluster-1/consumer-group=consumer-group-1/lag=topic-1/partition=1" }, "cluster_id": "cluster-1", "consumer_group_id": "consumer-group-1", "topic_name": "topic-1", "partition_id": 1, "consumer_id": "consumer-1", "instance_id": "consumer-instance-1", "client_id": "client-1", "current_offset": 1, "log_end_offset": 101, "lag": 100 }
- 400 Bad Request --
無効なリクエストエラーを示します。リクエスト本文の予期しないフォーマット、またはそれ以外のリクエスト検証の失敗が原因で発生した可能性があります。通常は application/json コンテンツになりますが、場合によっては単純な text/plain コンテンツが返されます。
create_topic_already_exists:
HTTP/1.1 400 Bad Request Content-Type: application/json { "error_code": 40002, "message": "Topic 'my-topic' already exists." }
produce_message_badly_escaped:
HTTP/1.1 400 Bad Request Content-Type: application/json { "error_code": 400, "message": "Unexpected character ('k' (code 107)): was expecting double-quote to start field name\n at [Source: (org.glassfish.jersey.message.internal.ReaderInterceptorExecutor$UnCloseableInputStream); line: 1, column: 3]" }
応答の例:
HTTP/1.1 400 Bad Request Content-Type: text/plain { "description": "Thrown when trying to create a topic and passing a string for the replication factor.", "value": "Cannot deserialize value of type `java.lang.Integer` from String \"all\": not a valid Integer value\\n at [Source: (org.glassfish.jersey.message.internal.ReaderInterceptorExecutor$UnCloseableInputStream); line: 1, column: 53] (through reference chain: io.confluent.kafkarest.entities.v3.CreateTopicRequest[\"partitions_count\"])" }
- 401 Unauthorized --
クライアント認証エラーを示します。Kafka の認証の失敗では、応答の本文にエラーコード 40101 が含まれます。
kafka_authentication_failed:
HTTP/1.1 401 Unauthorized Content-Type: application/json { "error_code": 40101, "message": "Authentication failed" }
- 429 Too Many Requests --
レート制限のしきい値に達したことを示します。クライアントは後で再試行する必要があります。
応答の例:
HTTP/1.1 429 Too Many Requests Content-Type: text/html { "description": "A sample response from Jetty's DoSFilter.", "value": "<html> <head> <meta http-equiv=\"Content-Type\" content=\"text/html;charset=utf-8\"/> <title>Error 429 Too Many Requests</title> </head> <body> <h2>HTTP ERROR 429 Too Many Requests</h2> <table> <tr> <th>URI:</th> <td>/v3/clusters/my-cluster</td> </tr> <tr> <th>STATUS:</th> <td>429</td> </tr> <tr> <th>MESSAGE:</th> <td>Too Many Requests</td> </tr> <tr> <th>SERVLET:</th> <td>default</td> </tr> </table> </body> </html>" }
- 5XX --
クライアント側から対処できない可能性がある、サーバー側の問題です。再試行可能な Kafka エラーでは、応答の本文にエラーコード 50003 が含まれます。
generic_internal_server_error:
HTTP/1.1 5XX - Content-Type: application/json { "error_code": 500, "message": "Internal Server Error" }
produce_v3_missing_schema:
HTTP/1.1 5XX - Content-Type: application/json { "error_code": 50002, "message": "Error when fetching latest schema version. subject = my-topic" }
-
GET
/clusters/{cluster_id}/topics/{topic_name}/partitions
¶ パーティションの一覧表示
指定されたトピックに属するパーティションのリストを返します。
パラメーター: - cluster_id (string) -- Kafka クラスター ID。
- topic_name (string) -- トピック名。
リクエストの例:
GET /clusters/{cluster_id}/topics/{topic_name}/partitions HTTP/1.1 Host: example.com
ステータスコード: - 200 OK --
パーティションのリスト。
応答の例:
HTTP/1.1 200 OK Content-Type: application/json { "kind": "KafkaPartitionList", "metadata": { "self": "https://pkc-00000.region.provider.confluent.cloud/kafka/v3/clusters/cluster-1/topics/topic-1/partitions", "next": null }, "data": [ { "kind": "KafkaPartition", "metadata": { "self": "https://pkc-00000.region.provider.confluent.cloud/kafka/v3/clusters/cluster-1/topics/topic-1/partitions/1", "resource_name": "crn:///kafka=cluster-1/topic=topic-1/partition=1" }, "cluster_id": "cluster-1", "topic_name": "topic-1", "partition_id": 1, "leader": { "related": "https://pkc-00000.region.provider.confluent.cloud/kafka/v3/clusters/cluster-1/topics/topic-1/partitions/1/replicas/1" }, "replicas": { "related": "https://pkc-00000.region.provider.confluent.cloud/kafka/v3/clusters/cluster-1/topics/topic-1/partitions/1/replicas" }, "reassignment": { "related": "https://pkc-00000.region.provider.confluent.cloud/kafka/v3/clusters/cluster-1/topics/topic-1/partitions/1/reassignment" } }, { "kind": "KafkaPartition", "metadata": { "self": "https://pkc-00000.region.provider.confluent.cloud/kafka/v3/clusters/cluster-1/topics/topic-1/partitions/2", "resource_name": "crn:///kafka=cluster-1/topic=topic-1/partition=2" }, "cluster_id": "cluster-1", "topic_name": "topic-1", "partition_id": 2, "leader": { "related": "https://pkc-00000.region.provider.confluent.cloud/kafka/v3/clusters/cluster-1/topics/topic-1/partitions/2/replicas/2" }, "replicas": { "related": "https://pkc-00000.region.provider.confluent.cloud/kafka/v3/clusters/cluster-1/topics/topic-1/partitions/2/replicas" }, "reassignment": { "related": "https://pkc-00000.region.provider.confluent.cloud/kafka/v3/clusters/cluster-1/topics/topic-1/partitions/2/reassignment" } }, { "kind": "KafkaPartition", "metadata": { "self": "https://pkc-00000.region.provider.confluent.cloud/kafka/v3/clusters/cluster-1/topics/topic-1/partitions/3", "resource_name": "crn:///kafka=cluster-1/topic=topic-1/partition=3" }, "cluster_id": "cluster-1", "topic_name": "topic-1", "partition_id": 3, "leader": { "related": "https://pkc-00000.region.provider.confluent.cloud/kafka/v3/clusters/cluster-1/topics/topic-1/partitions/3/replicas/3" }, "replicas": { "related": "https://pkc-00000.region.provider.confluent.cloud/kafka/v3/clusters/cluster-1/topics/topic-1/partitions/3/replicas" }, "reassignment": { "related": "https://pkc-00000.region.provider.confluent.cloud/kafka/v3/clusters/cluster-1/topics/topic-1/partitions/3/reassignment" } } ] }
- 400 Bad Request --
無効なリクエストエラーを示します。リクエスト本文の予期しないフォーマット、またはそれ以外のリクエスト検証の失敗が原因で発生した可能性があります。通常は application/json コンテンツになりますが、場合によっては単純な text/plain コンテンツが返されます。
create_topic_already_exists:
HTTP/1.1 400 Bad Request Content-Type: application/json { "error_code": 40002, "message": "Topic 'my-topic' already exists." }
produce_message_badly_escaped:
HTTP/1.1 400 Bad Request Content-Type: application/json { "error_code": 400, "message": "Unexpected character ('k' (code 107)): was expecting double-quote to start field name\n at [Source: (org.glassfish.jersey.message.internal.ReaderInterceptorExecutor$UnCloseableInputStream); line: 1, column: 3]" }
応答の例:
HTTP/1.1 400 Bad Request Content-Type: text/plain { "description": "Thrown when trying to create a topic and passing a string for the replication factor.", "value": "Cannot deserialize value of type `java.lang.Integer` from String \"all\": not a valid Integer value\\n at [Source: (org.glassfish.jersey.message.internal.ReaderInterceptorExecutor$UnCloseableInputStream); line: 1, column: 53] (through reference chain: io.confluent.kafkarest.entities.v3.CreateTopicRequest[\"partitions_count\"])" }
- 401 Unauthorized --
クライアント認証エラーを示します。Kafka の認証の失敗では、応答の本文にエラーコード 40101 が含まれます。
kafka_authentication_failed:
HTTP/1.1 401 Unauthorized Content-Type: application/json { "error_code": 40101, "message": "Authentication failed" }
- 404 Not Found --
不明なトピックまたはパーティションなど、到達できないか存在しないリソースにアクセスしようとしたことを示します。アクセスリストで許可されていないエンドポイントへの GET リクエストでも、この応答になります。
endpoint_not_found:
HTTP/1.1 404 Not Found Content-Type: application/json { "error_code": 404, "message": "HTTP 404 Not Found" }
cluster_not_found:
HTTP/1.1 404 Not Found Content-Type: application/json { "error_code": 404, "message": "Cluster my-cluster cannot be found." }
unknown_topic_or_partition:
HTTP/1.1 404 Not Found Content-Type: application/json { "error_code": 40403, "message": "This server does not host this topic-partition." }
- 429 Too Many Requests --
レート制限のしきい値に達したことを示します。クライアントは後で再試行する必要があります。
応答の例:
HTTP/1.1 429 Too Many Requests Content-Type: text/html { "description": "A sample response from Jetty's DoSFilter.", "value": "<html> <head> <meta http-equiv=\"Content-Type\" content=\"text/html;charset=utf-8\"/> <title>Error 429 Too Many Requests</title> </head> <body> <h2>HTTP ERROR 429 Too Many Requests</h2> <table> <tr> <th>URI:</th> <td>/v3/clusters/my-cluster</td> </tr> <tr> <th>STATUS:</th> <td>429</td> </tr> <tr> <th>MESSAGE:</th> <td>Too Many Requests</td> </tr> <tr> <th>SERVLET:</th> <td>default</td> </tr> </table> </body> </html>" }
- 5XX --
クライアント側から対処できない可能性がある、サーバー側の問題です。再試行可能な Kafka エラーでは、応答の本文にエラーコード 50003 が含まれます。
generic_internal_server_error:
HTTP/1.1 5XX - Content-Type: application/json { "error_code": 500, "message": "Internal Server Error" }
produce_v3_missing_schema:
HTTP/1.1 5XX - Content-Type: application/json { "error_code": 50002, "message": "Error when fetching latest schema version. subject = my-topic" }
-
GET
/clusters/{cluster_id}/topics/{topic_name}/partitions/{partition_id}
¶ パーティションの取得
指定した
partition_id
を持つパーティションを返します。パラメーター: - cluster_id (string) -- Kafka クラスター ID。
- topic_name (string) -- トピック名。
- partition_id (integer) -- パーティション ID。
リクエストの例:
GET /clusters/{cluster_id}/topics/{topic_name}/partitions/{partition_id} HTTP/1.1 Host: example.com
ステータスコード: - 200 OK --
パーティション
応答の例:
HTTP/1.1 200 OK Content-Type: application/json { "kind": "KafkaPartition", "metadata": { "self": "https://pkc-00000.region.provider.confluent.cloud/kafka/v3/clusters/cluster-1/topics/topic-1/partitions/1", "resource_name": "crn:///kafka=cluster-1/topic=topic-1/partition=1" }, "cluster_id": "cluster-1", "topic_name": "topic-1", "partition_id": 1, "leader": { "related": "https://pkc-00000.region.provider.confluent.cloud/kafka/v3/clusters/cluster-1/topics/topic-1/partitions/1/replicas/1" }, "replicas": { "related": "https://pkc-00000.region.provider.confluent.cloud/kafka/v3/clusters/cluster-1/topics/topic-1/partitions/1/replicas" }, "reassignment": { "related": "https://pkc-00000.region.provider.confluent.cloud/kafka/v3/clusters/cluster-1/topics/topic-1/partitions/1/reassignment" } }
- 400 Bad Request --
無効なリクエストエラーを示します。リクエスト本文の予期しないフォーマット、またはそれ以外のリクエスト検証の失敗が原因で発生した可能性があります。通常は application/json コンテンツになりますが、場合によっては単純な text/plain コンテンツが返されます。
create_topic_already_exists:
HTTP/1.1 400 Bad Request Content-Type: application/json { "error_code": 40002, "message": "Topic 'my-topic' already exists." }
produce_message_badly_escaped:
HTTP/1.1 400 Bad Request Content-Type: application/json { "error_code": 400, "message": "Unexpected character ('k' (code 107)): was expecting double-quote to start field name\n at [Source: (org.glassfish.jersey.message.internal.ReaderInterceptorExecutor$UnCloseableInputStream); line: 1, column: 3]" }
応答の例:
HTTP/1.1 400 Bad Request Content-Type: text/plain { "description": "Thrown when trying to create a topic and passing a string for the replication factor.", "value": "Cannot deserialize value of type `java.lang.Integer` from String \"all\": not a valid Integer value\\n at [Source: (org.glassfish.jersey.message.internal.ReaderInterceptorExecutor$UnCloseableInputStream); line: 1, column: 53] (through reference chain: io.confluent.kafkarest.entities.v3.CreateTopicRequest[\"partitions_count\"])" }
- 401 Unauthorized --
クライアント認証エラーを示します。Kafka の認証の失敗では、応答の本文にエラーコード 40101 が含まれます。
kafka_authentication_failed:
HTTP/1.1 401 Unauthorized Content-Type: application/json { "error_code": 40101, "message": "Authentication failed" }
- 404 Not Found --
不明なトピックまたはパーティションなど、到達できないか存在しないリソースにアクセスしようとしたことを示します。アクセスリストで許可されていないエンドポイントへの GET リクエストでも、この応答になります。
endpoint_not_found:
HTTP/1.1 404 Not Found Content-Type: application/json { "error_code": 404, "message": "HTTP 404 Not Found" }
cluster_not_found:
HTTP/1.1 404 Not Found Content-Type: application/json { "error_code": 404, "message": "Cluster my-cluster cannot be found." }
unknown_topic_or_partition:
HTTP/1.1 404 Not Found Content-Type: application/json { "error_code": 40403, "message": "This server does not host this topic-partition." }
- 429 Too Many Requests --
レート制限のしきい値に達したことを示します。クライアントは後で再試行する必要があります。
応答の例:
HTTP/1.1 429 Too Many Requests Content-Type: text/html { "description": "A sample response from Jetty's DoSFilter.", "value": "<html> <head> <meta http-equiv=\"Content-Type\" content=\"text/html;charset=utf-8\"/> <title>Error 429 Too Many Requests</title> </head> <body> <h2>HTTP ERROR 429 Too Many Requests</h2> <table> <tr> <th>URI:</th> <td>/v3/clusters/my-cluster</td> </tr> <tr> <th>STATUS:</th> <td>429</td> </tr> <tr> <th>MESSAGE:</th> <td>Too Many Requests</td> </tr> <tr> <th>SERVLET:</th> <td>default</td> </tr> </table> </body> </html>" }
- 5XX --
クライアント側から対処できない可能性がある、サーバー側の問題です。再試行可能な Kafka エラーでは、応答の本文にエラーコード 50003 が含まれます。
generic_internal_server_error:
HTTP/1.1 5XX - Content-Type: application/json { "error_code": 500, "message": "Internal Server Error" }
produce_v3_missing_schema:
HTTP/1.1 5XX - Content-Type: application/json { "error_code": 50002, "message": "Error when fetching latest schema version. subject = my-topic" }
トピック(v3)¶
-
GET
/clusters/{cluster_id}/topics
¶ トピックの一覧表示
指定された Kafka クラスターに属するトピックのリストを返します。
パラメーター: - cluster_id (string) -- Kafka クラスター ID。
リクエストの例:
GET /clusters/{cluster_id}/topics HTTP/1.1 Host: example.com
ステータスコード: - 200 OK --
トピックのリスト。
応答の例:
HTTP/1.1 200 OK Content-Type: application/json { "kind": "KafkaTopicList", "metadata": { "self": "https://pkc-00000.region.provider.confluent.cloud/kafka/v3/clusters/cluster-1/topics", "next": null }, "data": [ { "kind": "KafkaTopic", "metadata": { "self": "https://pkc-00000.region.provider.confluent.cloud/kafka/v3/clusters/cluster-1/topics/topic-1", "resource_name": "crn:///kafka=cluster-1/topic=topic-1" }, "cluster_id": "cluster-1", "topic_name": "topic-1", "is_internal": false, "replication_factor": 3, "partitions_count": 1, "partitions": { "related": "https://pkc-00000.region.provider.confluent.cloud/kafka/v3/clusters/cluster-1/topics/topic-1/partitions" }, "configs": { "related": "https://pkc-00000.region.provider.confluent.cloud/kafka/v3/clusters/cluster-1/topics/topic-1/configs" }, "partition_reassignments": { "related": "https://pkc-00000.region.provider.confluent.cloud/kafka/v3/clusters/cluster-1/topics/topic-1/partitions/-/reassignments" } }, { "kind": "KafkaTopic", "metadata": { "self": "https://pkc-00000.region.provider.confluent.cloud/kafka/v3/clusters/cluster-1/topics/topic-2", "resource_name": "crn:///kafka=cluster-1/topic=topic-2" }, "cluster_id": "cluster-1", "topic_name": "topic-2", "is_internal": true, "replication_factor": 4, "partitions_count": 1, "partitions": { "related": "https://pkc-00000.region.provider.confluent.cloud/kafka/v3/clusters/cluster-1/topics/topic-2/partitions" }, "configs": { "related": "https://pkc-00000.region.provider.confluent.cloud/kafka/v3/clusters/cluster-1/topics/topic-2/configs" }, "partition_reassignments": { "related": "https://pkc-00000.region.provider.confluent.cloud/kafka/v3/clusters/cluster-1/topics/topic-2/partitions/-/reassignments" } }, { "kind": "KafkaTopic", "metadata": { "self": "https://pkc-00000.region.provider.confluent.cloud/kafka/v3/clusters/cluster-1/topics/topic-3", "resource_name": "crn:///kafka=cluster-1/topic=topic-3" }, "cluster_id": "cluster-1", "topic_name": "topic-3", "is_internal": false, "replication_factor": 5, "partitions_count": 1, "partitions": { "related": "https://pkc-00000.region.provider.confluent.cloud/kafka/v3/clusters/cluster-1/topics/topic-3/partitions" }, "configs": { "related": "https://pkc-00000.region.provider.confluent.cloud/kafka/v3/clusters/cluster-1/topics/topic-3/configs" }, "partition_reassignments": { "related": "https://pkc-00000.region.provider.confluent.cloud/kafka/v3/clusters/cluster-1/topics/topic-3/partitions/-/reassignments" } } ] }
- 400 Bad Request --
無効なリクエストエラーを示します。リクエスト本文の予期しないフォーマット、またはそれ以外のリクエスト検証の失敗が原因で発生した可能性があります。通常は application/json コンテンツになりますが、場合によっては単純な text/plain コンテンツが返されます。
create_topic_already_exists:
HTTP/1.1 400 Bad Request Content-Type: application/json { "error_code": 40002, "message": "Topic 'my-topic' already exists." }
produce_message_badly_escaped:
HTTP/1.1 400 Bad Request Content-Type: application/json { "error_code": 400, "message": "Unexpected character ('k' (code 107)): was expecting double-quote to start field name\n at [Source: (org.glassfish.jersey.message.internal.ReaderInterceptorExecutor$UnCloseableInputStream); line: 1, column: 3]" }
応答の例:
HTTP/1.1 400 Bad Request Content-Type: text/plain { "description": "Thrown when trying to create a topic and passing a string for the replication factor.", "value": "Cannot deserialize value of type `java.lang.Integer` from String \"all\": not a valid Integer value\\n at [Source: (org.glassfish.jersey.message.internal.ReaderInterceptorExecutor$UnCloseableInputStream); line: 1, column: 53] (through reference chain: io.confluent.kafkarest.entities.v3.CreateTopicRequest[\"partitions_count\"])" }
- 401 Unauthorized --
クライアント認証エラーを示します。Kafka の認証の失敗では、応答の本文にエラーコード 40101 が含まれます。
kafka_authentication_failed:
HTTP/1.1 401 Unauthorized Content-Type: application/json { "error_code": 40101, "message": "Authentication failed" }
- 429 Too Many Requests --
レート制限のしきい値に達したことを示します。クライアントは後で再試行する必要があります。
応答の例:
HTTP/1.1 429 Too Many Requests Content-Type: text/html { "description": "A sample response from Jetty's DoSFilter.", "value": "<html> <head> <meta http-equiv=\"Content-Type\" content=\"text/html;charset=utf-8\"/> <title>Error 429 Too Many Requests</title> </head> <body> <h2>HTTP ERROR 429 Too Many Requests</h2> <table> <tr> <th>URI:</th> <td>/v3/clusters/my-cluster</td> </tr> <tr> <th>STATUS:</th> <td>429</td> </tr> <tr> <th>MESSAGE:</th> <td>Too Many Requests</td> </tr> <tr> <th>SERVLET:</th> <td>default</td> </tr> </table> </body> </html>" }
- 5XX --
クライアント側から対処できない可能性がある、サーバー側の問題です。再試行可能な Kafka エラーでは、応答の本文にエラーコード 50003 が含まれます。
generic_internal_server_error:
HTTP/1.1 5XX - Content-Type: application/json { "error_code": 500, "message": "Internal Server Error" }
produce_v3_missing_schema:
HTTP/1.1 5XX - Content-Type: application/json { "error_code": 50002, "message": "Error when fetching latest schema version. subject = my-topic" }
-
POST
/clusters/{cluster_id}/topics
¶ トピックの作成
トピックを作成します。
パラメーター: - cluster_id (string) -- Kafka クラスター ID。
uniform_replication:
POST /clusters/{cluster_id}/topics HTTP/1.1 Host: example.com Content-Type: application/json { "topic_name": "topic-X", "partitions_count": 64, "replication_factor": 3, "configs": [ { "name": "cleanup.policy", "value": "compact" }, { "name": "compression.type", "value": "gzip" } ] }
explicit_replicas_assignments:
POST /clusters/{cluster_id}/topics HTTP/1.1 Host: example.com Content-Type: application/json { "topic_name": "topic-Y", "replicas_assignments": [ { "partition_id": 0, "broker_ids": [ 1, 2 ] }, { "partition_id": 1, "broker_ids": [ 2, 3 ] }, { "partition_id": 2, "broker_ids": [ 3, 1 ] } ], "configs": [ { "name": "cleanup.policy", "value": "compact" }, { "name": "compression.type", "value": "gzip" } ] }
ステータスコード: - 201 Created --
作成されたトピック。
応答の例:
HTTP/1.1 201 Created Content-Type: application/json { "kind": "KafkaTopic", "metadata": { "self": "https://pkc-00000.region.provider.confluent.cloud/kafka/v3/clusters/cluster-1/topics/topic-X", "resource_name": "crn:///kafka=cluster-1/topic=topic-X" }, "cluster_id": "cluster-1", "topic_name": "topic-X", "is_internal": false, "replication_factor": 3, "partitions_count": 1, "partitions": { "related": "https://pkc-00000.region.provider.confluent.cloud/kafka/v3/clusters/cluster-1/topics/topic-X/partitions" }, "configs": { "related": "https://pkc-00000.region.provider.confluent.cloud/kafka/v3/clusters/cluster-1/topics/topic-X/configs" }, "partition_reassignments": { "related": "https://pkc-00000.region.provider.confluent.cloud/kafka/v3/clusters/cluster-1/topics/topic-X/partitions/-/reassignments" } }
- 400 Bad Request --
無効なリクエストエラーを示します。リクエスト本文の予期しないフォーマット、またはそれ以外のリクエスト検証の失敗が原因で発生した可能性があります。通常は application/json コンテンツになりますが、場合によっては単純な text/plain コンテンツが返されます。
create_topic_already_exists:
HTTP/1.1 400 Bad Request Content-Type: application/json { "error_code": 40002, "message": "Topic 'my-topic' already exists." }
produce_message_badly_escaped:
HTTP/1.1 400 Bad Request Content-Type: application/json { "error_code": 400, "message": "Unexpected character ('k' (code 107)): was expecting double-quote to start field name\n at [Source: (org.glassfish.jersey.message.internal.ReaderInterceptorExecutor$UnCloseableInputStream); line: 1, column: 3]" }
応答の例:
HTTP/1.1 400 Bad Request Content-Type: text/plain { "description": "Thrown when trying to create a topic and passing a string for the replication factor.", "value": "Cannot deserialize value of type `java.lang.Integer` from String \"all\": not a valid Integer value\\n at [Source: (org.glassfish.jersey.message.internal.ReaderInterceptorExecutor$UnCloseableInputStream); line: 1, column: 53] (through reference chain: io.confluent.kafkarest.entities.v3.CreateTopicRequest[\"partitions_count\"])" }
- 401 Unauthorized --
クライアント認証エラーを示します。Kafka の認証の失敗では、応答の本文にエラーコード 40101 が含まれます。
kafka_authentication_failed:
HTTP/1.1 401 Unauthorized Content-Type: application/json { "error_code": 40101, "message": "Authentication failed" }
- 429 Too Many Requests --
レート制限のしきい値に達したことを示します。クライアントは後で再試行する必要があります。
応答の例:
HTTP/1.1 429 Too Many Requests Content-Type: text/html { "description": "A sample response from Jetty's DoSFilter.", "value": "<html> <head> <meta http-equiv=\"Content-Type\" content=\"text/html;charset=utf-8\"/> <title>Error 429 Too Many Requests</title> </head> <body> <h2>HTTP ERROR 429 Too Many Requests</h2> <table> <tr> <th>URI:</th> <td>/v3/clusters/my-cluster</td> </tr> <tr> <th>STATUS:</th> <td>429</td> </tr> <tr> <th>MESSAGE:</th> <td>Too Many Requests</td> </tr> <tr> <th>SERVLET:</th> <td>default</td> </tr> </table> </body> </html>" }
- 5XX --
クライアント側から対処できない可能性がある、サーバー側の問題です。再試行可能な Kafka エラーでは、応答の本文にエラーコード 50003 が含まれます。
generic_internal_server_error:
HTTP/1.1 5XX - Content-Type: application/json { "error_code": 500, "message": "Internal Server Error" }
produce_v3_missing_schema:
HTTP/1.1 5XX - Content-Type: application/json { "error_code": 50002, "message": "Error when fetching latest schema version. subject = my-topic" }
-
GET
/clusters/{cluster_id}/topics/{topic_name}
¶ トピックの取得
指定した
topic_name
を持つトピックを返します。パラメーター: - cluster_id (string) -- Kafka クラスター ID。
- topic_name (string) -- トピック名。
リクエストの例:
GET /clusters/{cluster_id}/topics/{topic_name} HTTP/1.1 Host: example.com
ステータスコード: - 200 OK --
トピック。
応答の例:
HTTP/1.1 200 OK Content-Type: application/json { "kind": "KafkaTopic", "metadata": { "self": "https://pkc-00000.region.provider.confluent.cloud/kafka/v3/clusters/cluster-1/topics/topic-1", "resource_name": "crn:///kafka=cluster-1/topic=topic-1" }, "cluster_id": "cluster-1", "topic_name": "topic-1", "is_internal": false, "replication_factor": 3, "partitions_count": 1, "partitions": { "related": "https://pkc-00000.region.provider.confluent.cloud/kafka/v3/clusters/cluster-1/topics/topic-1/partitions" }, "configs": { "related": "https://pkc-00000.region.provider.confluent.cloud/kafka/v3/clusters/cluster-1/topics/topic-1/configs" }, "partition_reassignments": { "related": "https://pkc-00000.region.provider.confluent.cloud/kafka/v3/clusters/cluster-1/topics/topic-1/partitions/-/reassignments" } }
- 400 Bad Request --
無効なリクエストエラーを示します。リクエスト本文の予期しないフォーマット、またはそれ以外のリクエスト検証の失敗が原因で発生した可能性があります。通常は application/json コンテンツになりますが、場合によっては単純な text/plain コンテンツが返されます。
create_topic_already_exists:
HTTP/1.1 400 Bad Request Content-Type: application/json { "error_code": 40002, "message": "Topic 'my-topic' already exists." }
produce_message_badly_escaped:
HTTP/1.1 400 Bad Request Content-Type: application/json { "error_code": 400, "message": "Unexpected character ('k' (code 107)): was expecting double-quote to start field name\n at [Source: (org.glassfish.jersey.message.internal.ReaderInterceptorExecutor$UnCloseableInputStream); line: 1, column: 3]" }
応答の例:
HTTP/1.1 400 Bad Request Content-Type: text/plain { "description": "Thrown when trying to create a topic and passing a string for the replication factor.", "value": "Cannot deserialize value of type `java.lang.Integer` from String \"all\": not a valid Integer value\\n at [Source: (org.glassfish.jersey.message.internal.ReaderInterceptorExecutor$UnCloseableInputStream); line: 1, column: 53] (through reference chain: io.confluent.kafkarest.entities.v3.CreateTopicRequest[\"partitions_count\"])" }
- 401 Unauthorized --
クライアント認証エラーを示します。Kafka の認証の失敗では、応答の本文にエラーコード 40101 が含まれます。
kafka_authentication_failed:
HTTP/1.1 401 Unauthorized Content-Type: application/json { "error_code": 40101, "message": "Authentication failed" }
- 404 Not Found --
不明なトピックまたはパーティションなど、到達できないか存在しないリソースにアクセスしようとしたことを示します。アクセスリストで許可されていないエンドポイントへの GET リクエストでも、この応答になります。
endpoint_not_found:
HTTP/1.1 404 Not Found Content-Type: application/json { "error_code": 404, "message": "HTTP 404 Not Found" }
cluster_not_found:
HTTP/1.1 404 Not Found Content-Type: application/json { "error_code": 404, "message": "Cluster my-cluster cannot be found." }
unknown_topic_or_partition:
HTTP/1.1 404 Not Found Content-Type: application/json { "error_code": 40403, "message": "This server does not host this topic-partition." }
- 429 Too Many Requests --
レート制限のしきい値に達したことを示します。クライアントは後で再試行する必要があります。
応答の例:
HTTP/1.1 429 Too Many Requests Content-Type: text/html { "description": "A sample response from Jetty's DoSFilter.", "value": "<html> <head> <meta http-equiv=\"Content-Type\" content=\"text/html;charset=utf-8\"/> <title>Error 429 Too Many Requests</title> </head> <body> <h2>HTTP ERROR 429 Too Many Requests</h2> <table> <tr> <th>URI:</th> <td>/v3/clusters/my-cluster</td> </tr> <tr> <th>STATUS:</th> <td>429</td> </tr> <tr> <th>MESSAGE:</th> <td>Too Many Requests</td> </tr> <tr> <th>SERVLET:</th> <td>default</td> </tr> </table> </body> </html>" }
- 5XX --
クライアント側から対処できない可能性がある、サーバー側の問題です。再試行可能な Kafka エラーでは、応答の本文にエラーコード 50003 が含まれます。
generic_internal_server_error:
HTTP/1.1 5XX - Content-Type: application/json { "error_code": 500, "message": "Internal Server Error" }
produce_v3_missing_schema:
HTTP/1.1 5XX - Content-Type: application/json { "error_code": 50002, "message": "Error when fetching latest schema version. subject = my-topic" }
-
DELETE
/clusters/{cluster_id}/topics/{topic_name}
¶ トピックの削除
指定した
topic_name
を持つトピックを削除します。パラメーター: - cluster_id (string) -- Kafka クラスター ID。
- topic_name (string) -- トピック名。
ステータスコード: - 204 No Content -- コンテンツなし
- 400 Bad Request --
無効なリクエストエラーを示します。リクエスト本文の予期しないフォーマット、またはそれ以外のリクエスト検証の失敗が原因で発生した可能性があります。通常は application/json コンテンツになりますが、場合によっては単純な text/plain コンテンツが返されます。
create_topic_already_exists:
HTTP/1.1 400 Bad Request Content-Type: application/json { "error_code": 40002, "message": "Topic 'my-topic' already exists." }
produce_message_badly_escaped:
HTTP/1.1 400 Bad Request Content-Type: application/json { "error_code": 400, "message": "Unexpected character ('k' (code 107)): was expecting double-quote to start field name\n at [Source: (org.glassfish.jersey.message.internal.ReaderInterceptorExecutor$UnCloseableInputStream); line: 1, column: 3]" }
応答の例:
HTTP/1.1 400 Bad Request Content-Type: text/plain { "description": "Thrown when trying to create a topic and passing a string for the replication factor.", "value": "Cannot deserialize value of type `java.lang.Integer` from String \"all\": not a valid Integer value\\n at [Source: (org.glassfish.jersey.message.internal.ReaderInterceptorExecutor$UnCloseableInputStream); line: 1, column: 53] (through reference chain: io.confluent.kafkarest.entities.v3.CreateTopicRequest[\"partitions_count\"])" }
- 401 Unauthorized --
クライアント認証エラーを示します。Kafka の認証の失敗では、応答の本文にエラーコード 40101 が含まれます。
kafka_authentication_failed:
HTTP/1.1 401 Unauthorized Content-Type: application/json { "error_code": 40101, "message": "Authentication failed" }
- 404 Not Found --
不明なトピックまたはパーティションなど、到達できないか存在しないリソースにアクセスしようとしたことを示します。アクセスリストで許可されていないエンドポイントへの GET リクエストでも、この応答になります。
endpoint_not_found:
HTTP/1.1 404 Not Found Content-Type: application/json { "error_code": 404, "message": "HTTP 404 Not Found" }
cluster_not_found:
HTTP/1.1 404 Not Found Content-Type: application/json { "error_code": 404, "message": "Cluster my-cluster cannot be found." }
unknown_topic_or_partition:
HTTP/1.1 404 Not Found Content-Type: application/json { "error_code": 40403, "message": "This server does not host this topic-partition." }
- 429 Too Many Requests --
レート制限のしきい値に達したことを示します。クライアントは後で再試行する必要があります。
応答の例:
HTTP/1.1 429 Too Many Requests Content-Type: text/html { "description": "A sample response from Jetty's DoSFilter.", "value": "<html> <head> <meta http-equiv=\"Content-Type\" content=\"text/html;charset=utf-8\"/> <title>Error 429 Too Many Requests</title> </head> <body> <h2>HTTP ERROR 429 Too Many Requests</h2> <table> <tr> <th>URI:</th> <td>/v3/clusters/my-cluster</td> </tr> <tr> <th>STATUS:</th> <td>429</td> </tr> <tr> <th>MESSAGE:</th> <td>Too Many Requests</td> </tr> <tr> <th>SERVLET:</th> <td>default</td> </tr> </table> </body> </html>" }
- 5XX --
クライアント側から対処できない可能性がある、サーバー側の問題です。再試行可能な Kafka エラーでは、応答の本文にエラーコード 50003 が含まれます。
generic_internal_server_error:
HTTP/1.1 5XX - Content-Type: application/json { "error_code": 500, "message": "Internal Server Error" }
produce_v3_missing_schema:
HTTP/1.1 5XX - Content-Type: application/json { "error_code": 50002, "message": "Error when fetching latest schema version. subject = my-topic" }
Cluster Linking(v3)¶
-
GET
/clusters/{cluster_id}/links
¶ 送信先クラスター内のすべてのクラスターリンクの一覧表示
ListLinksResponseData
のlink_id
は非推奨であり、今後のリリースで削除される可能性があります。代わりに、新しいcluster_link_id
を使用してください。パラメーター: - cluster_id (string) -- Kafka クラスター ID。
リクエストの例:
GET /clusters/{cluster_id}/links HTTP/1.1 Host: example.com
ステータスコード: