Clone Dataset
POST
/v2/datasets/copy
const url = 'http://localhost:3000/v2/datasets/copy';const options = { method: 'POST', headers: {'Content-Type': 'application/json'}, body: '{"id":"api.datasets.copy","ver":"v2","ts":"2024-05-21T14:30:00Z","params":{"msgid":"127384e4a-a051-4a9f-9b3f-a64a8034fad7"},"request":{"source":{"datasetId":"dataset-telemetry","isLive":true},"destination":{"datasetId":"bew-copy-live2"}}}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url http://localhost:3000/v2/datasets/copy \ --header 'Content-Type: application/json' \ --data '{ "id": "api.datasets.copy", "ver": "v2", "ts": "2024-05-21T14:30:00Z", "params": { "msgid": "127384e4a-a051-4a9f-9b3f-a64a8034fad7" }, "request": { "source": { "datasetId": "dataset-telemetry", "isLive": true }, "destination": { "datasetId": "bew-copy-live2" } } }'Request Body
Section titled “Request Body ” Media type application/json
object
Example
{ "id": "api.datasets.copy", "ver": "v2", "ts": "2024-05-21T14:30:00Z", "params": { "msgid": "127384e4a-a051-4a9f-9b3f-a64a8034fad7" }, "request": { "source": { "datasetId": "dataset-telemetry", "isLive": true }, "destination": { "datasetId": "bew-copy-live2" } }}Responses
Section titled “ Responses ”OK
Media type application/json
object
Example
{ "id": "api.datasets.copy", "ver": "v2", "ts": "2024-11-19T12:56:12+05:30", "params": { "status": "SUCCESS", "msgid": "127384e4a-a051-4a9f-9b3f-a64a8034fad7", "resmsgid": "28072631-8e80-45eb-906f-d933a90646d0" }, "responseCode": "OK", "result": { "dataset_id": "new-copy-live2", "message": "Dataset clone successful" }}Headers
Section titled “Headers ” X-Powered-By
string
Example
Express Content-Length
integer
Example
296 ETag
string
Example
W/"128-bi4wSfgkyMP13qFE8VPTmgDdgLA" Date
string
Example
Tue, 19 Nov 2024 07:26:12 GMT Connection
string
Example
keep-alive Keep-Alive
string
Example
timeout=5Not Found
Media type application/json
object
Example
{ "id": "api.datasets.copy", "ver": "v2", "ts": "2024-11-19T12:52:41+05:30", "params": { "status": "FAILED", "msgid": "127384e4a-a051-4a9f-9b3f-a64a8034fad7", "resmsgid": "f2fd51bb-fc18-4278-a229-47fa25398e69" }, "responseCode": "NOT_FOUND", "result": {}, "error": { "code": "DATASET_NOT_EXISTS", "message": "Dataset dataset-telemetry does not exists" }}Headers
Section titled “Headers ” X-Powered-By
string
Example
Express Content-Length
integer
Example
328 ETag
string
Example
W/"148-jUDshghYf/jOhmmVkvtHlfJT864" Date
string
Example
Tue, 19 Nov 2024 07:22:41 GMT Connection
string
Example
keep-alive Keep-Alive
string
Example
timeout=5