Skip to content

Latest commit

 

History

History
2296 lines (1496 loc) · 35.8 KB

paths.adoc

File metadata and controls

2296 lines (1496 loc) · 35.8 KB

Resources

Collector-controller

Rest API for Collecting JMX Metric Data

Fetch all JMX metric data

GET /jmx/v1
Parameters
Type Name Description Schema

Query

jmxurl
optional

Parameter jmxurl should be a comma-separated list of {IP:Port} or set to 'default'

string

Responses
HTTP Code Description Schema

200

OK

< JMXMetricDataV1 > array

401

Unauthorized

No Content

403

Forbidden

No Content

404

Not Found

No Content

Consumes
  • application/json

Produces
  • /

Fetch JMX metric data with query filter. You can get the query filter template through the API /jmx/v2/filters.

POST /jmx/v2
Parameters
Type Name Description Schema

Query

jmxurl
optional

Parameter jmxurl should be a comma-separated list of {IP:Port} or set to 'default'

string

Body

jmxQuery
required

jmxQuery

JMXQuery

Responses
HTTP Code Description Schema

200

OK

< JMXMetricData > array

201

Created

No Content

401

Unauthorized

No Content

403

Forbidden

No Content

404

Not Found

No Content

Consumes
  • application/json

Produces
  • /

List the query filter templates with the filterKey. If filterKey is set to empty, it will return all the templates.

GET /jmx/v2/filters
Parameters
Type Name Description Schema

Query

filterKey
required

filterKey

string

Responses
HTTP Code Description Schema

200

OK

< string, object > map

401

Unauthorized

No Content

403

Forbidden

No Content

404

Not Found

No Content

Consumes
  • application/json

Produces
  • /

Kafka-controller

Kafka Controller

List brokers in this cluster

GET /kafka/brokers
Responses
HTTP Code Description Schema

200

OK

< BrokerInfo > array

401

Unauthorized

No Content

403

Forbidden

No Content

404

Not Found

No Content

Consumes
  • application/json

Produces
  • /

List log dirs by broker list

GET /kafka/brokers/logdirs
Parameters
Type Name Description Schema

Query

brokerList
optional

brokerList

< integer(int32) > array(multi)

Responses
HTTP Code Description Schema

200

OK

< string, < string > array > map

401

Unauthorized

No Content

403

Forbidden

No Content

404

Not Found

No Content

Consumes
  • application/json

Produces
  • /

Describe log dirs by broker list and topic list

POST /kafka/brokers/logdirs/detail
Parameters
Type Name Description Schema

Query

brokerList
optional

brokerList

< integer(int32) > array(multi)

Query

logDirList
optional

logDirList

< string > array(multi)

Body

topicPartitionMap
optional

topicPartitionMap

< string, < integer(int32) > array > map

Responses
HTTP Code Description Schema

200

OK

< string, < string, LogDirInfo > map > map

201

Created

No Content

401

Unauthorized

No Content

403

Forbidden

No Content

404

Not Found

No Content

Consumes
  • application/json

Produces
  • /

Describe replica log dir.

GET /kafka/brokers/replicalogdir/{brokerId}/{topic}/{partition}
Parameters
Type Name Description Schema

Path

brokerId
required

brokerId

integer(int32)

Path

partition
required

partition

integer(int32)

Path

topic
required

topic

string

Responses
HTTP Code Description Schema

200

OK

ReplicaLogDirInfo

401

Unauthorized

No Content

403

Forbidden

No Content

404

Not Found

No Content

Consumes
  • application/json

Produces
  • /

Get broker configs, including dynamic configs

GET /kafka/brokers/{brokerId}/conf
Parameters
Type Name Description Schema

Path

brokerId
required

brokerId

integer(int32)

Responses
HTTP Code Description Schema

200

OK

< CustomConfigEntry > array

401

Unauthorized

No Content

403

Forbidden

No Content

404

Not Found

No Content

Consumes
  • application/json

Produces
  • /

Get broker dynamic configs

GET /kafka/brokers/{brokerId}/dynconf
Parameters
Type Name Description Schema

Path

brokerId
required

brokerId

integer(int32)

Responses
HTTP Code Description Schema

200

OK

< string, object > map

401

Unauthorized

No Content

403

Forbidden

No Content

404

Not Found

No Content

Consumes
  • application/json

Produces
  • /

Update broker configs

PUT /kafka/brokers/{brokerId}/dynconf
Parameters
Type Name Description Schema

Path

brokerId
required

brokerId

integer(int32)

Body

props
required

props

< string, object > map

Responses
HTTP Code Description Schema

200

OK

< string, object > map

201

Created

No Content

401

Unauthorized

No Content

403

Forbidden

No Content

404

Not Found

No Content

Consumes
  • application/json

Produces
  • /

Remove broker dynamic configs

DELETE /kafka/brokers/{brokerId}/dynconf
Parameters
Type Name Description Schema

Path

brokerId
required

brokerId

integer(int32)

Query

configKeysToBeRemoved
required

configKeysToBeRemoved

< string > array(multi)

Responses
HTTP Code Description Schema

200

OK

No Content

204

No Content

No Content

401

Unauthorized

No Content

403

Forbidden

No Content

Consumes
  • application/json

Produces
  • /

Describe cluster, nodes, controller info.

GET /kafka/cluster
Responses
HTTP Code Description Schema

200

OK

ClusterInfo

401

Unauthorized

No Content

403

Forbidden

No Content

404

Not Found

No Content

Consumes
  • application/json

Produces
  • /

Get the message from the offset of the partition in the topic

GET /kafka/consumer/{topic}/{partition}/{offset}
Parameters
Type Name Description Schema Default

Path

offset
optional

[long/yyyy-MM-dd HH:mm:ss.SSS] can be supported.

string

Path

partition
required

partition

integer(int32)

Path

topic
required

topic

string

Query

avroSchema
optional

avroSchema

string

Query

fetchTimeoutMs
optional

fetchTimeoutMs

integer(int64)

"30000"

Query

keyDecoder
optional

keyDecoder

string

"StringDeserializer"

Query

maxRecords
optional

maxRecords

integer(int32)

"10"

Query

valueDecoder
optional

valueDecoder

string

"StringDeserializer"

Responses
HTTP Code Description Schema

200

OK

< Record > array

401

Unauthorized

No Content

403

Forbidden

No Content

404

Not Found

No Content

Consumes
  • application/json

Produces
  • /

Delete Consumer Group

DELETE /kafka/consumergroup/{consumergroup}/{type}
Parameters
Type Name Description Schema

Path

consumergroup
required

consumergroup

string

Path

type
required

type

enum (NEW, OLD)

Responses
HTTP Code Description Schema

200

OK

GeneralResponse

204

No Content

No Content

401

Unauthorized

No Content

403

Forbidden

No Content

Consumes
  • application/json

Produces
  • /

getLastCommitTimestamp

GET /kafka/consumergroup/{consumergroup}/{type}/topic/{topic}/lastcommittime
Parameters
Type Name Description Schema

Path

consumergroup
required

consumergroup

string

Path

topic
required

topic

string

Path

type
required

type

enum (NEW, OLD)

Responses
HTTP Code Description Schema

200

OK

< string, < string, integer(int64) > map > map

401

Unauthorized

No Content

403

Forbidden

No Content

404

Not Found

No Content

Consumes
  • application/json

Produces
  • /

Reset consumer group offset, earliest/latest can be used. Support reset by time for new consumer group, pass a parameter that satisfies yyyy-MM-dd HH:mm:ss.SSS to offset.

PUT /kafka/consumergroup/{consumergroup}/{type}/topic/{topic}/{partition}/{offset}
Parameters
Type Name Description Schema

Path

consumergroup
required

consumergroup

string

Path

offset
optional

[earliest/latest/{long}/yyyy-MM-dd HH:mm:ss.SSS] can be supported. The date type is only valid for new consumer group.

string

Path

partition
required

partition

integer(int32)

Path

topic
required

topic

string

Path

type
required

type

enum (NEW, OLD)

Responses
HTTP Code Description Schema

200

OK

GeneralResponse

201

Created

No Content

401

Unauthorized

No Content

403

Forbidden

No Content

404

Not Found

No Content

Consumes
  • application/json

Produces
  • /

List all consumer groups from zk and kafka

GET /kafka/consumergroups
Parameters
Type Name Description Schema

Query

topic
optional

topic

string

Query

type
optional

type

enum (NEW, OLD)

Responses
HTTP Code Description Schema

200

OK

< string, < string > array > map

401

Unauthorized

No Content

403

Forbidden

No Content

404

Not Found

No Content

Consumes
  • application/json

Produces
  • /

Get all the meta data of new consumer groups, including state, coordinator, assignmentStrategy, members

GET /kafka/consumergroups/meta
Responses
HTTP Code Description Schema

200

OK

< ConsumerGroupMeta > array

401

Unauthorized

No Content

403

Forbidden

No Content

404

Not Found

No Content

Consumes
  • application/json

Produces
  • /

Get the meta data of the specify new consumer group, including state, coordinator, assignmentStrategy, members

GET /kafka/consumergroups/{consumerGroup}/meta
Parameters
Type Name Description Schema

Path

consumerGroup
required

consumerGroup

string

Responses
HTTP Code Description Schema

200

OK

ConsumerGroupMeta

401

Unauthorized

No Content

403

Forbidden

No Content

404

Not Found

No Content

Consumes
  • application/json

Produces
  • /

Describe consumer group, showing lag and offset, may be slow if multi topics are listened

GET /kafka/consumergroups/{consumerGroup}/{type}
Parameters
Type Name Description Schema

Path

consumerGroup
required

consumerGroup

string

Path

type
required

type

enum (NEW, OLD)

Responses
HTTP Code Description Schema

200

OK

< string, < ConsumerGroupDesc > array > map

401

Unauthorized

No Content

403

Forbidden

No Content

404

Not Found

No Content

Consumes
  • application/json

Produces
  • /

Get the topics involved of the specify consumer group

GET /kafka/consumergroups/{consumerGroup}/{type}/topic
Parameters
Type Name Description Schema

Path

consumerGroup
required

consumerGroup

string

Path

type
required

type

enum (NEW, OLD)

Responses
HTTP Code Description Schema

200

OK

< string > array

401

Unauthorized

No Content

403

Forbidden

No Content

404

Not Found

No Content

Consumes
  • application/json

Produces
  • /

Describe consumer groups by topic, showing lag and offset

GET /kafka/consumergroups/{type}/topic/{topic}
Parameters
Type Name Description Schema

Path

topic
required

topic

string

Path

type
required

type

enum (NEW, OLD)

Query

consumerGroup
optional

consumerGroup

string

Responses
HTTP Code Description Schema

200

OK

< ConsumerGroupDesc > array

401

Unauthorized

No Content

403

Forbidden

No Content

404

Not Found

No Content

Consumes
  • application/json

Produces
  • /

Get controller in this cluster

GET /kafka/controller
Responses
HTTP Code Description Schema

200

OK

Node

401

Unauthorized

No Content

403

Forbidden

No Content

404

Not Found

No Content

Consumes
  • application/json

Produces
  • /

Check the cluster health.

GET /kafka/health
Responses
HTTP Code Description Schema

200

OK

HealthCheckResult

401

Unauthorized

No Content

403

Forbidden

No Content

404

Not Found

No Content

Consumes
  • application/json

Produces
  • /

Add partitions to the topics

POST /kafka/partitions/add
Parameters
Type Name Description Schema

Body

addPartitions
required

addPartitions

< AddPartition > array

Responses
HTTP Code Description Schema

200

OK

< string, GeneralResponse > map

201

Created

No Content

401

Unauthorized

No Content

403

Forbidden

No Content

404

Not Found

No Content

Consumes
  • application/json

Produces
  • /

Move partition leader to preferred replica.

PUT /kafka/partitions/preferredreplica/elect
Parameters
Type Name Description Schema

Body

partitionList
required

partitionList

< TopicPartition > array

Responses
HTTP Code Description Schema

-1

Other preferred replica elect is in progress

No Content

-2

Partition doesn’t exist

No Content

0

Successfully started preferred replica election

No Content

200

OK

< string, integer(int32) > map

201

Created

No Content

401

Unauthorized

No Content

403

Forbidden

No Content

404

Not Found

No Content

Consumes
  • application/json

Produces
  • /

Check the partition reassignment process

PUT /kafka/partitions/reassign/check
Parameters
Type Name Description Schema

Body

reassign
required

reassign

ReassignModel

Responses
HTTP Code Description Schema

-1

Reassignment Failed

No Content

0

Reassignment In Progress

No Content

1

Reassignment Completed

No Content

200

OK

ReassignStatus

201

Created

No Content

401

Unauthorized

No Content

403

Forbidden

No Content

404

Not Found

No Content

Consumes
  • application/json

Produces
  • /

Execute the partition reassignment

PUT /kafka/partitions/reassign/execute
Parameters
Type Name Description Schema Default

Query

interBrokerThrottle
optional

interBrokerThrottle

integer(int64)

"-1"

Query

replicaAlterLogDirsThrottle
optional

replicaAlterLogDirsThrottle

integer(int64)

"-1"

Query

timeoutMs
optional

timeoutMs

integer(int64)

"10000"

Body

reassign
required

reassign

ReassignModel

Responses
HTTP Code Description Schema

200

OK

ReassignStatus

201

Created

No Content

401

Unauthorized

No Content

403

Forbidden

No Content

404

Not Found

No Content

Consumes
  • application/json

Produces
  • /

Generate plan for the partition reassignment

POST /kafka/partitions/reassign/generate
Parameters
Type Name Description Schema

Body

reassignWrapper
required

reassignWrapper

ReassignWrapper

Responses
HTTP Code Description Schema

200

OK

< ReassignModel > array

201

Created

No Content

401

Unauthorized

No Content

403

Forbidden

No Content

404

Not Found

No Content

Consumes
  • application/json

Produces
  • /

Stop the partition reassignment process

PUT /kafka/partitions/reassign/stop
Responses
HTTP Code Description Schema

200

OK

GeneralResponse

201

Created

No Content

401

Unauthorized

No Content

403

Forbidden

No Content

404

Not Found

No Content

Consumes
  • application/json

Produces
  • /

List topics

GET /kafka/topics
Responses
HTTP Code Description Schema

200

OK

< string > array

401

Unauthorized

No Content

403

Forbidden

No Content

404

Not Found

No Content

Consumes
  • application/json

Produces
  • /

Delete a topic list (you should enable topic deletion

DELETE /kafka/topics
Parameters
Type Name Description Schema

Query

topicList
required

topicList

< string > array(multi)

Responses
HTTP Code Description Schema

200

OK

< string, GeneralResponse > map

204

No Content

No Content

401

Unauthorized

No Content

403

Forbidden

No Content

Consumes
  • application/json

Produces
  • /

Create topics

POST /kafka/topics/create
Parameters
Type Name Description Schema

Body

topicList
required

topicList

< TopicDetail > array

Responses
HTTP Code Description Schema

201

Created

< string, GeneralResponse > map

401

Unauthorized

No Content

403

Forbidden

No Content

404

Not Found

No Content

Consumes
  • application/json

Produces
  • /

Create topics check

POST /kafka/topics/create/check
Parameters
Type Name Description Schema

Body

topicList
required

topicList

< TopicDetail > array

Responses
HTTP Code Description Schema

200

OK

object

201

Created

No Content

401

Unauthorized

No Content

403

Forbidden

No Content

404

Not Found

No Content

Consumes
  • application/json

Produces
  • /

Describe a topic by fetching the metadata and config

GET /kafka/topics/{topic}
Parameters
Type Name Description Schema

Path

topic
required

topic

string

Responses
HTTP Code Description Schema

200

OK

TopicMeta

401

Unauthorized

No Content

403

Forbidden

No Content

404

Not Found

No Content

Consumes
  • application/json

Produces
  • /

Get topic configs

GET /kafka/topics/{topic}/conf
Parameters
Type Name Description Schema

Path

topic
required

topic

string

Responses
HTTP Code Description Schema

200

OK

< CustomConfigEntry > array

401

Unauthorized

No Content

403

Forbidden

No Content

404

Not Found

No Content

Consumes
  • application/json

Produces
  • /

Update topic configs

PUT /kafka/topics/{topic}/conf
Parameters
Type Name Description Schema

Path

topic
required

topic

string

Body

props
required

props

< string, object > map

Responses
HTTP Code Description Schema

200

OK

< CustomConfigEntry > array

201

Created

No Content

401

Unauthorized

No Content

403

Forbidden

No Content

404

Not Found

No Content

Consumes
  • application/json

Produces
  • /

Get topic config by key

GET /kafka/topics/{topic}/conf/{key}
Parameters
Type Name Description Schema

Path

key
required

key

string

Path

topic
required

topic

string

Responses
HTTP Code Description Schema

200

OK

< string, object > map

401

Unauthorized

No Content

403

Forbidden

No Content

404

Not Found

No Content

Consumes
  • application/json

Produces
  • /

Update a topic config by key

PUT /kafka/topics/{topic}/conf/{key}={value}
Parameters
Type Name Description Schema

Path

key
required

key

string

Path

topic
required

topic

string

Path

value
required

value

string

Responses
HTTP Code Description Schema

200

OK

< CustomConfigEntry > array

201

Created

No Content

401

Unauthorized

No Content

403

Forbidden

No Content

404

Not Found

No Content

Consumes
  • application/json

Produces
  • /

Get topic dyn configs

GET /kafka/topics/{topic}/dynconf
Parameters
Type Name Description Schema

Path

topic
required

topic

string

Responses
HTTP Code Description Schema

200

OK

< string, object > map

401

Unauthorized

No Content

403

Forbidden

No Content

404

Not Found

No Content

Consumes
  • application/json

Produces
  • /

Tell if a topic exists

GET /kafka/topics/{topic}/exist
Parameters
Type Name Description Schema

Path

topic
required

topic

string

Responses
HTTP Code Description Schema

200

OK

boolean

401

Unauthorized

No Content

403

Forbidden

No Content

404

Not Found

No Content

Consumes
  • application/json

Produces
  • /

List topics Brief

GET /kafka/topicsbrief
Responses
HTTP Code Description Schema

200

OK

< TopicBrief > array

401

Unauthorized

No Content

403

Forbidden

No Content

404

Not Found

No Content

Consumes
  • application/json

Produces
  • /

Schema-registry-controller

Schema Registry Controller

Get schema by id

GET /schemaregistry/schemas/ids/{schemaId}
Parameters
Type Name Description Schema

Path

schemaId
required

schemaId

integer(int32)

Responses
HTTP Code Description Schema

200

OK

SchemaRegistryMetadata

401

Unauthorized

No Content

403

Forbidden

No Content

404

Not Found

No Content

Consumes
  • application/json

Produces
  • /

List all subjects

GET /schemaregistry/subjects
Responses
HTTP Code Description Schema

200

OK

< SchemaRegistryMetadata > array

401

Unauthorized

No Content

403

Forbidden

No Content

404

Not Found

No Content

Consumes
  • application/json

Produces
  • /

Check if a schema has already been registered under the specified subject

POST /schemaregistry/subjects/{subject}
Parameters
Type Name Description Schema

Path

subject
required

subject

string

Query

schemaStr
required

schemaStr

string

Responses
HTTP Code Description Schema

200

OK

SchemaRegistryMetadata

201

Created

No Content

401

Unauthorized

No Content

403

Forbidden

No Content

404

Not Found

No Content

Consumes
  • application/json

Produces
  • /

Get latest schema by subject

GET /schemaregistry/subjects/{subject}
Parameters
Type Name Description Schema

Path

subject
required

subject

string

Responses
HTTP Code Description Schema

200

OK

SchemaMetadata

401

Unauthorized

No Content

403

Forbidden

No Content

404

Not Found

No Content

Consumes
  • application/json

Produces
  • /

Delete the specified subject and its associated compatibility level if registered.

DELETE /schemaregistry/subjects/{subject}
Parameters
Type Name Description Schema

Path

subject
required

subject

string

Responses
HTTP Code Description Schema

200

OK

< integer(int32) > array

204

No Content

No Content

401

Unauthorized

No Content

403

Forbidden

No Content

Consumes
  • application/json

Produces
  • /

Register schema by subject

POST /schemaregistry/subjects/{subject}/versions
Parameters
Type Name Description Schema

Path

subject
required

subject

string

Query

schemaStr
required

schemaStr

string

Responses
HTTP Code Description Schema

200

OK

integer(int32)

201

Created

No Content

401

Unauthorized

No Content

403

Forbidden

No Content

404

Not Found

No Content

Consumes
  • application/json

Produces
  • /

Get all versions for the specified subject

GET /schemaregistry/subjects/{subject}/versions
Parameters
Type Name Description Schema

Path

subject
required

subject

string

Responses
HTTP Code Description Schema

200

OK

< integer(int32) > array

401

Unauthorized

No Content

403

Forbidden

No Content

404

Not Found

No Content

Consumes
  • application/json

Produces
  • /

Get schema by subject and version

GET /schemaregistry/subjects/{subject}/versions/{versionId}
Parameters
Type Name Description Schema

Path

subject
required

subject

string

Path

versionId
required

versionId

integer(int32)

Responses
HTTP Code Description Schema

200

OK

SchemaMetadata

401

Unauthorized

No Content

403

Forbidden

No Content

404

Not Found

No Content

Consumes
  • application/json

Produces
  • /

User-controller

Security User Management Controller.

Add user.

POST /users
Parameters
Type Name Description Schema

Body

user
required

user

User

Responses
HTTP Code Description Schema

200

OK

GeneralResponse

201

Created

No Content

401

Unauthorized

No Content

403

Forbidden

No Content

404

Not Found

No Content

Consumes
  • application/json

Produces
  • /

Get user list.

GET /users
Responses
HTTP Code Description Schema

200

OK

< string > array

401

Unauthorized

No Content

403

Forbidden

No Content

404

Not Found

No Content

Consumes
  • application/json

Produces
  • /

Modify user information.

PUT /users
Parameters
Type Name Description Schema

Body

user
required

user

User

Responses
HTTP Code Description Schema

200

OK

GeneralResponse

201

Created

No Content

401

Unauthorized

No Content

403

Forbidden

No Content

404

Not Found

No Content

Consumes
  • application/json

Produces
  • /

Delete user.

DELETE /users/{username}
Parameters
Type Name Description Schema

Path

username
required

username

string

Responses
HTTP Code Description Schema

200

OK

GeneralResponse

204

No Content

No Content

401

Unauthorized

No Content

403

Forbidden

No Content

Consumes
  • application/json

Produces
  • /

Zookeeper-controller

Zookeeper Controller

Get the connection state of zookeeper

GET /zk/connstate
Responses
HTTP Code Description Schema

200

OK

string

401

Unauthorized

No Content

403

Forbidden

No Content

404

Not Found

No Content

Consumes
  • application/json

Produces
  • /

Get the environment information of zookeeper

GET /zk/env
Responses
HTTP Code Description Schema

200

OK

< string, ZkServerEnvironment > map

401

Unauthorized

No Content

403

Forbidden

No Content

404

Not Found

No Content

Consumes
  • application/json

Produces
  • /

Get data of a zookeeper path

GET /zk/get/path
Parameters
Type Name Description Schema

Query

path
required

path

string

Responses
HTTP Code Description Schema

200

OK

string

401

Unauthorized

No Content

403

Forbidden

No Content

404

Not Found

No Content

Consumes
  • application/json

Produces
  • /

List a zookeeper path

GET /zk/ls/path
Parameters
Type Name Description Schema

Query

path
required

path

string

Responses
HTTP Code Description Schema

200

OK

< string > array

401

Unauthorized

No Content

403

Forbidden

No Content

404

Not Found

No Content

Consumes
  • application/json

Produces
  • /

Get the service state of zookeeper

GET /zk/stat
Responses
HTTP Code Description Schema

200

OK

< string, ZkServerStat > map

401

Unauthorized

No Content

403

Forbidden

No Content

404

Not Found

No Content

Consumes
  • application/json

Produces
  • /