Export query results CSV
GET
/api/v1/queries/{env}/results/csv/{name}
const url = 'https://osctrl.net/api/v1/queries/example/results/csv/example';const options = {method: 'GET', headers: {Authorization: '<Authorization>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://osctrl.net/api/v1/queries/example/results/csv/example \ --header 'Authorization: <Authorization>'Streams query results as CSV.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”env
required
string
Environment name or UUID
name
required
string
Query name
Responses
Section titled “Responses”OK
Media typetext/csv
string
Bad request
Media typetext/csv
object
code
string
error
string
Unauthorized
Media typetext/csv
object
code
string
error
string
Forbidden
Media typetext/csv
object
code
string
error
string
Not found
Media typetext/csv
object
code
string
error
string
Conflict
Media typetext/csv
object
code
string
error
string
Too many requests
Media typetext/csv
object
code
string
error
string
Internal server error
Media typetext/csv
object
code
string
error
string
Service unavailable
Media typetext/csv
object
code
string
error
string
