The Create Block program creates a new DCF block based on block object id.
/catalog/blocks/{blockId}/provision: post: tags: - "block" summary: "" description: "Create block: Create a new DCF block based on block object id" operationId: "createBlock" produces: - "application/json" parameters: - in: "path" name: "blockId" description: "Block object id" required: true type: "string" - in: body name: payload required: true schema: type: string responses: default: description: "Returns Block Config for the newly created block"
Example:
Request : curl --user admin:changeme -k -X POST -H 'Content-Type: application/json' https://127.0.0.1:8443/dcc/v1/catalog/blocks/smarts-metrics/provision
Response : { "blockID": "smarts-metrics", "message": "Block successfully deployed", "time": "2019-02-25 23:25:06.824015", "instanceId": "smarts-metricseaea8c69-b12a-4fa6-8389-6ea87dd997c5", "params": { "smarts-metrics": { "primary": { "collect": { "sm": [ { "host": "localhost", "port": "12345", "name": "INCHARGE-AM-PM", "username": "admin", "password": "{FAF745B9C01D858B45D7F644CE55D30064E409A847AA2351B30B6FB74B3BA7FDEC5A9315ECA00C2F69D9C425039CA1F1}", "type": "both", "topologyPollingPeriod": "3600", "metricPollingPeriod": "240", "backendgroup": "group", "thread": { "poolsize": "3" }, "dmconnection": { "poolsize": "3" } } ] } }, "kafka": { "cluster": { "node": [ { "host": "localhost", "port": "9092" } ], "topic": "default-topic", "auth": "true", "username": "admin", "password": "admin-secret" } } } } }