Archive a report
curl --request POST \
--url https://api.flare.io/firework/v2/reporting/reports/{report_id}/archive \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.flare.io/firework/v2/reporting/reports/{report_id}/archive"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.flare.io/firework/v2/reporting/reports/{report_id}/archive', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.flare.io/firework/v2/reporting/reports/{report_id}/archive",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.flare.io/firework/v2/reporting/reports/{report_id}/archive"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.flare.io/firework/v2/reporting/reports/{report_id}/archive")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.flare.io/firework/v2/reporting/reports/{report_id}/archive")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"report": {
"id": 123,
"report_group_id": 123,
"title": "<string>",
"author": "<string>",
"created_at": "<string>",
"is_ready_for_generation": true,
"is_archived": true,
"tenant_id": 123,
"tenant_name": "<string>",
"activity_count": 123,
"elements": [
{
"id": 123,
"report_id": 123,
"category": "<string>",
"position": 123,
"enabled": true,
"data": {},
"processed_at": "2023-11-07T05:31:56Z"
}
],
"audience": "technical",
"timeframe_start_at": "<string>",
"timeframe_end_at": "<string>",
"is_mutable": true
}
}{
"message": "<string>",
"code": "<string>"
}{
"message": "<string>",
"code": "<string>"
}Reporting
Archive Report
Mark a report as archived and return it under the report key. Archived reports are kept and can still be read and downloaded, but GET /reporting/reports only lists them when include_archived is true. There is no operation to unarchive a report. Requires write access to the tenant’s reports.
POST
/
firework
/
v2
/
reporting
/
reports
/
{report_id}
/
archive
Archive a report
curl --request POST \
--url https://api.flare.io/firework/v2/reporting/reports/{report_id}/archive \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.flare.io/firework/v2/reporting/reports/{report_id}/archive"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.flare.io/firework/v2/reporting/reports/{report_id}/archive', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.flare.io/firework/v2/reporting/reports/{report_id}/archive",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.flare.io/firework/v2/reporting/reports/{report_id}/archive"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.flare.io/firework/v2/reporting/reports/{report_id}/archive")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.flare.io/firework/v2/reporting/reports/{report_id}/archive")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"report": {
"id": 123,
"report_group_id": 123,
"title": "<string>",
"author": "<string>",
"created_at": "<string>",
"is_ready_for_generation": true,
"is_archived": true,
"tenant_id": 123,
"tenant_name": "<string>",
"activity_count": 123,
"elements": [
{
"id": 123,
"report_id": 123,
"category": "<string>",
"position": 123,
"enabled": true,
"data": {},
"processed_at": "2023-11-07T05:31:56Z"
}
],
"audience": "technical",
"timeframe_start_at": "<string>",
"timeframe_end_at": "<string>",
"is_mutable": true
}
}{
"message": "<string>",
"code": "<string>"
}{
"message": "<string>",
"code": "<string>"
}Was this page helpful?