From ee92f4482ff486ac113be47a153813f70ad7072d Mon Sep 17 00:00:00 2001 From: Oleg Shuralev Date: Fri, 17 Jan 2020 23:06:48 +0300 Subject: [PATCH] [API] POST Topic --- api/services/topics.js | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/api/services/topics.js b/api/services/topics.js index 201b7e283c..8db5d5096c 100644 --- a/api/services/topics.js +++ b/api/services/topics.js @@ -14,6 +14,23 @@ module.exports = function (fastify, opts, next) { }) .get('/clusters/:clusterId/topics/:topicId/config', function (request, reply) { reply.send(topicConfig); + }) + .post('/clusters/:clusterId/topics', function (request, reply) { + /* Payload + { + "name":"AlphaNumeric-String_with,and.", + "partitions":"1", + "replicationFactor":"1", + "configs": { + "retention.ms": "604800000", + "retention.bytes": "-1", + "max.message.bytes":"1000012", + "min.insync.replicas":"1" + } + } + */ + + reply.code(201).send(); }); next();