[API] POST Topic
This commit is contained in:
parent
e24423e613
commit
ee92f4482f
1 changed files with 17 additions and 0 deletions
|
@ -14,6 +14,23 @@ module.exports = function (fastify, opts, next) {
|
||||||
})
|
})
|
||||||
.get('/clusters/:clusterId/topics/:topicId/config', function (request, reply) {
|
.get('/clusters/:clusterId/topics/:topicId/config', function (request, reply) {
|
||||||
reply.send(topicConfig);
|
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();
|
next();
|
||||||
|
|
Loading…
Add table
Reference in a new issue