Skip to content
AlejandroF edited this page Jan 23, 2017 · 12 revisions

Uploads export to S3 and ES:

POST /:stream/export?from=:from&to=:to

Request:

curl -X POST "https://c3-logger-archiver-01.mediainbox.net/cadena3.mp3/export?from=1485112298677&to=1485112363001"

Response:

{
	"id": 1485125978642,
	"format": "mp3",
	"to": "1485112363001",
	"from": "1485112298677"
}

Download export to browser:

GET /:stream/export?from=:from&to=:to

Request:

curl -X GET "https://c3-logger-archiver-01.mediainbox.net/cadena3.mp3/export?from=1485112298677&to=1485112363001"

Returns export from S3

GET /:stream/export/:id

Request:

curl -X GET "https://c3-logger-archiver-01.mediainbox.net/cadena3.mp3/export/1485115103061" -o file.mp3

Removes export from S3 and ES

DELETE /:stream/export/:id

Request:

curl -X DELETE https://c3-logger-archiver-01.mediainbox.net/cadena3.mp3/export/1485115103061

Response:

{"message":"ok"}

Returns all exports from ES

GET /:stream/exports

Request:

curl -X GET https://c3-logger-archiver-01.mediainbox.net/cadena3.mp3/exports

Response:

[{
	"id": 1485125876017,
	"format": "mp3",
	"to": "1485112363001",
	"from": "1485112298677"
}, {
	"id": 1485125978642,
	"format": "mp3",
	"to": "1485112363001",
	"from": "1485112298677"
}]

Returns all exports from ES between :from and :to (filtra usando el ID que es la fecha de creación en "timestamp en ms")

GET /:stream/exports?from=:from&to=:to