Analytics
POST /analytics/reports
Create a report
curl -X POST "https://api.paperguide.com/analytics/reports" \
-H "Content-Type: application/json" \
-d '{
"title": "Monthly Analysis",
"data": [
"metric1",
"metric2"
]
}'
import requests
import json
url = "https://api.paperguide.com/analytics/reports"
headers = {
"Content-Type": "application/json"
}
data = {
"title": "Monthly Analysis",
"data": [
"metric1",
"metric2"
]
}
response = requests.post(url, headers=headers, json=data)
print(response.json())
const response = await fetch("https://api.paperguide.com/analytics/reports", {
method: "POST",
headers: {
"Content-Type": "application/json"
},
body: JSON.stringify({
"title": "Monthly Analysis",
"data": [
"metric1",
"metric2"
]
})
});
const data = await response.json();
console.log(data);
package main
import (
"fmt"
"net/http"
"bytes"
"encoding/json"
)
func main() {
data := []byte(`{
"title": "Monthly Analysis",
"data": [
"metric1",
"metric2"
]
}`)
req, err := http.NewRequest("POST", "https://api.paperguide.com/analytics/reports", bytes.NewBuffer(data))
if err != nil {
panic(err)
}
req.Header.Set("Content-Type", "application/json")
client := &http.Client{}
resp, err := client.Do(req)
if err != nil {
panic(err)
}
defer resp.Body.Close()
fmt.Println("Response Status:", resp.Status)
}
require 'net/http'
require 'json'
uri = URI('https://api.paperguide.com/analytics/reports')
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true
request = Net::HTTP::Post.new(uri)
request['Content-Type'] = 'application/json'
request.body = '{
"title": "Monthly Analysis",
"data": [
"metric1",
"metric2"
]
}'
response = http.request(request)
puts response.body
{
"reportId": "report_67890"
}
POST
/analytics/reports
POST
Content-Typestring
RequiredThe media type of the request body
Options: application/json
Request Preview
Response
Response will appear here after sending the request