MarkGaox / Dune

All-in-one data management platform that allows you to govern your data infrastructures more easily.
0 stars 1 forks source link

Confluent Cloud API (Topic) #3

Closed MarkGaox closed 2 years ago

MarkGaox commented 2 years ago

https://docs.confluent.io/cloud/current/api.html#operation/listKafkaV3Topics

MarkGaox commented 2 years ago

xiaxuangao@Xiaxuans-MBP finalProject % curl -H "Authorization: Basic M0RNUFY0UTRBUk5FRkxJNDpLNkdQNThNTlFPYlh5TXVQdVZ3eHN1aUdiTld4aDdGaWRuWmU0WUx3K2pvVW1xQXZXcHZkbm11K3h4TnNIdEcvCg==" --request GET --url 'https://pkc-lzvrd.us-west4.gcp.confluent.cloud:443/kafka/v3/clusters/lkc-6p088/topics'

{"kind":"KafkaTopicList","metadata":{"self":"https://pkc-lzvrd.us-west4.gcp.confluent.cloud/kafka/v3/clusters/lkc-6p088/topics","next":null},"data":[]}%

MarkGaox commented 2 years ago

Task list

{ "TaskList" : ["Product:kafka:topic:Operations:GET_ALL", "Product:kafka:topic:Operations:POST topic_name:t1", "Product:kafka:topic:Operations:GET_ALL"] }

Result

[ "{\"kind\":\"KafkaTopicList\",\"metadata\":{\"self\":\"http://pkc-lzvrd.us-west4.gcp.confluent.cloud/kafka/v3/clusters/lkc-6p088/topics\",\"next\":null},\"data\":[]}", "{\"kind\":\"KafkaTopic\",\"metadata\":{\"self\":\"http://pkc-lzvrd.us-west4.gcp.confluent.cloud/kafka/v3/clusters/lkc-6p088/topics/t1\",\"resource_name\":\"crn:///kafka=lkc-6p088/topic=t1\"},\"cluster_id\":\"lkc-6p088\",\"topic_name\":\"t1\",\"is_internal\":false,\"replication_factor\":0,\"partitions_count\":0,\"partitions\":{\"related\":\"http://pkc-lzvrd.us-west4.gcp.confluent.cloud/kafka/v3/clusters/lkc-6p088/topics/t1/partitions\"},\"configs\":{\"related\":\"http://pkc-lzvrd.us-west4.gcp.confluent.cloud/kafka/v3/clusters/lkc-6p088/topics/t1/configs\"},\"partition_reassignments\":{\"related\":\"http://pkc-lzvrd.us-west4.gcp.confluent.cloud/kafka/v3/clusters/lkc-6p088/topics/t1/partitions/-/reassignment\"}}", "{\"kind\":\"KafkaTopicList\",\"metadata\":{\"self\":\"http://pkc-lzvrd.us-west4.gcp.confluent.cloud/kafka/v3/clusters/lkc-6p088/topics\",\"next\":null},\"data\":[{\"kind\":\"KafkaTopic\",\"metadata\":{\"self\":\"http://pkc-lzvrd.us-west4.gcp.confluent.cloud/kafka/v3/clusters/lkc-6p088/topics/t1\",\"resource_name\":\"crn:///kafka=lkc-6p088/topic=t1\"},\"cluster_id\":\"lkc-6p088\",\"topic_name\":\"t1\",\"is_internal\":false,\"replication_factor\":3,\"partitions_count\":6,\"partitions\":{\"related\":\"http://pkc-lzvrd.us-west4.gcp.confluent.cloud/kafka/v3/clusters/lkc-6p088/topics/t1/partitions\"},\"configs\":{\"related\":\"http://pkc-lzvrd.us-west4.gcp.confluent.cloud/kafka/v3/clusters/lkc-6p088/topics/t1/configs\"},\"partition_reassignments\":{\"related\":\"http://pkc-lzvrd.us-west4.gcp.confluent.cloud/kafka/v3/clusters/lkc-6p088/topics/t1/partitions/-/reassignment\"}}]}" ]

MarkGaox commented 2 years ago

Task List

{ "TaskList" : ["Product:kafka:topic:Operations:GET_ALL", "Product:kafka:topic:Operations:DELETE topic_name:t1", "Product:kafka:topic:Operations:GET_ALL"] }

Result

[ "{\"kind\":\"KafkaTopicList\",\"metadata\":{\"self\":\"http://pkc-lzvrd.us-west4.gcp.confluent.cloud/kafka/v3/clusters/lkc-6p088/topics\",\"next\":null},\"data\":[{\"kind\":\"KafkaTopic\",\"metadata\":{\"self\":\"http://pkc-lzvrd.us-west4.gcp.confluent.cloud/kafka/v3/clusters/lkc-6p088/topics/t1\",\"resource_name\":\"crn:///kafka=lkc-6p088/topic=t1\"},\"cluster_id\":\"lkc-6p088\",\"topic_name\":\"t1\",\"is_internal\":false,\"replication_factor\":3,\"partitions_count\":6,\"partitions\":{\"related\":\"http://pkc-lzvrd.us-west4.gcp.confluent.cloud/kafka/v3/clusters/lkc-6p088/topics/t1/partitions\"},\"configs\":{\"related\":\"http://pkc-lzvrd.us-west4.gcp.confluent.cloud/kafka/v3/clusters/lkc-6p088/topics/t1/configs\"},\"partition_reassignments\":{\"related\":\"http://pkc-lzvrd.us-west4.gcp.confluent.cloud/kafka/v3/clusters/lkc-6p088/topics/t1/partitions/-/reassignment\"}}]}", "", "{\"kind\":\"KafkaTopicList\",\"metadata\":{\"self\":\"http://pkc-lzvrd.us-west4.gcp.confluent.cloud/kafka/v3/clusters/lkc-6p088/topics\",\"next\":null},\"data\":[]}" ]

MarkGaox commented 2 years ago
Screen Shot 2021-11-21 at 3 06 35 PM
MarkGaox commented 2 years ago

it's done. refer to: 992c6a6897515ef0ed32268abbb75f102b34abe9

MarkGaox commented 2 years ago

Heroku deployment log:

Screen Shot 2021-11-21 at 3 15 16 PM