NAV
Shell (cURL) JavaScript Go Java PHP Python Ruby

Cometrics API Documentation v1.0.0

Scroll down for code samples, example requests and responses. Select a language for code samples from the tabs above or the mobile navigation menu.

Base URLs:

Terms of service Email: Cometrics Support

Authentication

Account

Account

Code samples

curl --request GET \
  --url https://app.cometrics.io/api/account \
  --header 'Accept: application/json' \
  --header 'Authorization: Bearer {access-token}'
const data = null;

const xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://app.cometrics.io/api/account");
xhr.setRequestHeader("Accept", "application/json");
xhr.setRequestHeader("Authorization", "Bearer {access-token}");

xhr.send(data);
package main

import (
    "fmt"
    "net/http"
    "io/ioutil"
)

func main() {

    url := "https://app.cometrics.io/api/account"

    req, _ := http.NewRequest("GET", url, nil)

    req.Header.Add("Accept", "application/json")
    req.Header.Add("Authorization", "Bearer {access-token}")

    res, _ := http.DefaultClient.Do(req)

    defer res.Body.Close()
    body, _ := ioutil.ReadAll(res.Body)

    fmt.Println(res)
    fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.get("https://app.cometrics.io/api/account")
  .header("Accept", "application/json")
  .header("Authorization", "Bearer {access-token}")
  .asString();
<?php

$curl = curl_init();

curl_setopt_array($curl, [
  CURLOPT_URL => "https://app.cometrics.io/api/account",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
  CURLOPT_HTTPHEADER => [
    "Accept: application/json",
    "Authorization: Bearer {access-token}"
  ],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
import http.client

conn = http.client.HTTPSConnection("app.cometrics.io")

headers = {
    'Accept': "application/json",
    'Authorization': "Bearer {access-token}"
    }

conn.request("GET", "/api/account", headers=headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
require 'uri'
require 'net/http'
require 'openssl'

url = URI("https://app.cometrics.io/api/account")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net::HTTP::Get.new(url)
request["Accept"] = 'application/json'
request["Authorization"] = 'Bearer {access-token}'

response = http.request(request)
puts response.read_body

GET /api/account

Example responses

Responses

Status Meaning Description Schema
200 OK Successful response None

Response Schema

Update Account

Code samples

curl --request PUT \
  --url https://app.cometrics.io/api/account \
  --header 'Accept: application/json' \
  --header 'Authorization: Bearer {access-token}' \
  --header 'Content-Type: application/json' \
  --data '{"account":{"first_name":"Updated First name","last_name":"Updated last name"}}'
const data = JSON.stringify({
  "account": {
    "first_name": "Updated First name",
    "last_name": "Updated last name"
  }
});

const xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("PUT", "https://app.cometrics.io/api/account");
xhr.setRequestHeader("Content-Type", "application/json");
xhr.setRequestHeader("Accept", "application/json");
xhr.setRequestHeader("Authorization", "Bearer {access-token}");

xhr.send(data);
package main

import (
    "fmt"
    "strings"
    "net/http"
    "io/ioutil"
)

func main() {

    url := "https://app.cometrics.io/api/account"

    payload := strings.NewReader("{\"account\":{\"first_name\":\"Updated First name\",\"last_name\":\"Updated last name\"}}")

    req, _ := http.NewRequest("PUT", url, payload)

    req.Header.Add("Content-Type", "application/json")
    req.Header.Add("Accept", "application/json")
    req.Header.Add("Authorization", "Bearer {access-token}")

    res, _ := http.DefaultClient.Do(req)

    defer res.Body.Close()
    body, _ := ioutil.ReadAll(res.Body)

    fmt.Println(res)
    fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.put("https://app.cometrics.io/api/account")
  .header("Content-Type", "application/json")
  .header("Accept", "application/json")
  .header("Authorization", "Bearer {access-token}")
  .body("{\"account\":{\"first_name\":\"Updated First name\",\"last_name\":\"Updated last name\"}}")
  .asString();
<?php

$curl = curl_init();

curl_setopt_array($curl, [
  CURLOPT_URL => "https://app.cometrics.io/api/account",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "PUT",
  CURLOPT_POSTFIELDS => "{\"account\":{\"first_name\":\"Updated First name\",\"last_name\":\"Updated last name\"}}",
  CURLOPT_HTTPHEADER => [
    "Accept: application/json",
    "Authorization: Bearer {access-token}",
    "Content-Type: application/json"
  ],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
import http.client

conn = http.client.HTTPSConnection("app.cometrics.io")

payload = "{\"account\":{\"first_name\":\"Updated First name\",\"last_name\":\"Updated last name\"}}"

headers = {
    'Content-Type': "application/json",
    'Accept': "application/json",
    'Authorization': "Bearer {access-token}"
    }

conn.request("PUT", "/api/account", payload, headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
require 'uri'
require 'net/http'
require 'openssl'

url = URI("https://app.cometrics.io/api/account")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net::HTTP::Put.new(url)
request["Content-Type"] = 'application/json'
request["Accept"] = 'application/json'
request["Authorization"] = 'Bearer {access-token}'
request.body = "{\"account\":{\"first_name\":\"Updated First name\",\"last_name\":\"Updated last name\"}}"

response = http.request(request)
puts response.read_body

PUT /api/account

Body parameter

{
  "account": {
    "first_name": "Updated First name",
    "last_name": "Updated last name"
  }
}

Parameters

Name In Type Required Description
Content-Type header string false none
Accept header string false none
body body object false none

Example responses

Responses

Status Meaning Description Schema
200 OK Successful response None

Response Schema

Update Password

Code samples

curl --request PUT \
  --url https://app.cometrics.io/api/account/update-password \
  --header 'Accept: application/json' \
  --header 'Authorization: Bearer {access-token}' \
  --header 'Content-Type: application/json' \
  --data '{"account":{"current_password":"current_password","password":"new_password_is_safe","password_confirmation":"new_password_is_safe"}}'
const data = JSON.stringify({
  "account": {
    "current_password": "current_password",
    "password": "new_password_is_safe",
    "password_confirmation": "new_password_is_safe"
  }
});

const xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("PUT", "https://app.cometrics.io/api/account/update-password");
xhr.setRequestHeader("Content-Type", "application/json");
xhr.setRequestHeader("Accept", "application/json");
xhr.setRequestHeader("Authorization", "Bearer {access-token}");

xhr.send(data);
package main

import (
    "fmt"
    "strings"
    "net/http"
    "io/ioutil"
)

func main() {

    url := "https://app.cometrics.io/api/account/update-password"

    payload := strings.NewReader("{\"account\":{\"current_password\":\"current_password\",\"password\":\"new_password_is_safe\",\"password_confirmation\":\"new_password_is_safe\"}}")

    req, _ := http.NewRequest("PUT", url, payload)

    req.Header.Add("Content-Type", "application/json")
    req.Header.Add("Accept", "application/json")
    req.Header.Add("Authorization", "Bearer {access-token}")

    res, _ := http.DefaultClient.Do(req)

    defer res.Body.Close()
    body, _ := ioutil.ReadAll(res.Body)

    fmt.Println(res)
    fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.put("https://app.cometrics.io/api/account/update-password")
  .header("Content-Type", "application/json")
  .header("Accept", "application/json")
  .header("Authorization", "Bearer {access-token}")
  .body("{\"account\":{\"current_password\":\"current_password\",\"password\":\"new_password_is_safe\",\"password_confirmation\":\"new_password_is_safe\"}}")
  .asString();
<?php

$curl = curl_init();

curl_setopt_array($curl, [
  CURLOPT_URL => "https://app.cometrics.io/api/account/update-password",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "PUT",
  CURLOPT_POSTFIELDS => "{\"account\":{\"current_password\":\"current_password\",\"password\":\"new_password_is_safe\",\"password_confirmation\":\"new_password_is_safe\"}}",
  CURLOPT_HTTPHEADER => [
    "Accept: application/json",
    "Authorization: Bearer {access-token}",
    "Content-Type: application/json"
  ],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
import http.client

conn = http.client.HTTPSConnection("app.cometrics.io")

payload = "{\"account\":{\"current_password\":\"current_password\",\"password\":\"new_password_is_safe\",\"password_confirmation\":\"new_password_is_safe\"}}"

headers = {
    'Content-Type': "application/json",
    'Accept': "application/json",
    'Authorization': "Bearer {access-token}"
    }

conn.request("PUT", "/api/account/update-password", payload, headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
require 'uri'
require 'net/http'
require 'openssl'

url = URI("https://app.cometrics.io/api/account/update-password")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net::HTTP::Put.new(url)
request["Content-Type"] = 'application/json'
request["Accept"] = 'application/json'
request["Authorization"] = 'Bearer {access-token}'
request.body = "{\"account\":{\"current_password\":\"current_password\",\"password\":\"new_password_is_safe\",\"password_confirmation\":\"new_password_is_safe\"}}"

response = http.request(request)
puts response.read_body

PUT /api/account/update-password

Body parameter

{
  "account": {
    "current_password": "current_password",
    "password": "new_password_is_safe",
    "password_confirmation": "new_password_is_safe"
  }
}

Parameters

Name In Type Required Description
Content-Type header string false none
Accept header string false none
body body object false none

Example responses

Responses

Status Meaning Description Schema
200 OK Successful response None

Response Schema

Categories

All categories

Code samples

curl --request GET \
  --url https://app.cometrics.io/api/categories \
  --header 'Accept: application/json' \
  --header 'Authorization: Bearer {access-token}' \
  --header 'Content-Type: application/json'
const data = null;

const xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://app.cometrics.io/api/categories");
xhr.setRequestHeader("Accept", "application/json");
xhr.setRequestHeader("Content-Type", "application/json");
xhr.setRequestHeader("Authorization", "Bearer {access-token}");

xhr.send(data);
package main

import (
    "fmt"
    "net/http"
    "io/ioutil"
)

func main() {

    url := "https://app.cometrics.io/api/categories"

    req, _ := http.NewRequest("GET", url, nil)

    req.Header.Add("Accept", "application/json")
    req.Header.Add("Content-Type", "application/json")
    req.Header.Add("Authorization", "Bearer {access-token}")

    res, _ := http.DefaultClient.Do(req)

    defer res.Body.Close()
    body, _ := ioutil.ReadAll(res.Body)

    fmt.Println(res)
    fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.get("https://app.cometrics.io/api/categories")
  .header("Accept", "application/json")
  .header("Content-Type", "application/json")
  .header("Authorization", "Bearer {access-token}")
  .asString();
<?php

$curl = curl_init();

curl_setopt_array($curl, [
  CURLOPT_URL => "https://app.cometrics.io/api/categories",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
  CURLOPT_HTTPHEADER => [
    "Accept: application/json",
    "Authorization: Bearer {access-token}",
    "Content-Type: application/json"
  ],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
import http.client

conn = http.client.HTTPSConnection("app.cometrics.io")

headers = {
    'Accept': "application/json",
    'Content-Type': "application/json",
    'Authorization': "Bearer {access-token}"
    }

conn.request("GET", "/api/categories", headers=headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
require 'uri'
require 'net/http'
require 'openssl'

url = URI("https://app.cometrics.io/api/categories")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net::HTTP::Get.new(url)
request["Accept"] = 'application/json'
request["Content-Type"] = 'application/json'
request["Authorization"] = 'Bearer {access-token}'

response = http.request(request)
puts response.read_body

GET /api/categories

Parameters

Name In Type Required Description
Content-Type header string false none
Accept header string false none

Example responses

Responses

Status Meaning Description Schema
200 OK Successful response None

Response Schema

Companies

Show Company

Code samples

curl --request GET \
  --url https://app.cometrics.io/api/companies/100 \
  --header 'Accept: application/json' \
  --header 'Authorization: Bearer {access-token}'
const data = null;

const xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://app.cometrics.io/api/companies/100");
xhr.setRequestHeader("Accept", "application/json");
xhr.setRequestHeader("Authorization", "Bearer {access-token}");

xhr.send(data);
package main

import (
    "fmt"
    "net/http"
    "io/ioutil"
)

func main() {

    url := "https://app.cometrics.io/api/companies/100"

    req, _ := http.NewRequest("GET", url, nil)

    req.Header.Add("Accept", "application/json")
    req.Header.Add("Authorization", "Bearer {access-token}")

    res, _ := http.DefaultClient.Do(req)

    defer res.Body.Close()
    body, _ := ioutil.ReadAll(res.Body)

    fmt.Println(res)
    fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.get("https://app.cometrics.io/api/companies/100")
  .header("Accept", "application/json")
  .header("Authorization", "Bearer {access-token}")
  .asString();
<?php

$curl = curl_init();

curl_setopt_array($curl, [
  CURLOPT_URL => "https://app.cometrics.io/api/companies/100",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
  CURLOPT_HTTPHEADER => [
    "Accept: application/json",
    "Authorization: Bearer {access-token}"
  ],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
import http.client

conn = http.client.HTTPSConnection("app.cometrics.io")

headers = {
    'Accept': "application/json",
    'Authorization': "Bearer {access-token}"
    }

conn.request("GET", "/api/companies/100", headers=headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
require 'uri'
require 'net/http'
require 'openssl'

url = URI("https://app.cometrics.io/api/companies/100")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net::HTTP::Get.new(url)
request["Accept"] = 'application/json'
request["Authorization"] = 'Bearer {access-token}'

response = http.request(request)
puts response.read_body

GET /api/companies/{id}

Parameters

Name In Type Required Description
id path integer true Company Id

Example responses

Responses

Status Meaning Description Schema
200 OK Successful response None

Response Schema

Content

Content Search Request Schema

Code samples

curl --request GET \
  --url https://app.cometrics.io/api/content/search-schema \
  --header 'Accept: application/json' \
  --header 'Authorization: Bearer {access-token}'
const data = null;

const xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://app.cometrics.io/api/content/search-schema");
xhr.setRequestHeader("Accept", "application/json");
xhr.setRequestHeader("Authorization", "Bearer {access-token}");

xhr.send(data);
package main

import (
    "fmt"
    "net/http"
    "io/ioutil"
)

func main() {

    url := "https://app.cometrics.io/api/content/search-schema"

    req, _ := http.NewRequest("GET", url, nil)

    req.Header.Add("Accept", "application/json")
    req.Header.Add("Authorization", "Bearer {access-token}")

    res, _ := http.DefaultClient.Do(req)

    defer res.Body.Close()
    body, _ := ioutil.ReadAll(res.Body)

    fmt.Println(res)
    fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.get("https://app.cometrics.io/api/content/search-schema")
  .header("Accept", "application/json")
  .header("Authorization", "Bearer {access-token}")
  .asString();
<?php

$curl = curl_init();

curl_setopt_array($curl, [
  CURLOPT_URL => "https://app.cometrics.io/api/content/search-schema",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
  CURLOPT_HTTPHEADER => [
    "Accept: application/json",
    "Authorization: Bearer {access-token}"
  ],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
import http.client

conn = http.client.HTTPSConnection("app.cometrics.io")

headers = {
    'Accept': "application/json",
    'Authorization': "Bearer {access-token}"
    }

conn.request("GET", "/api/content/search-schema", headers=headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
require 'uri'
require 'net/http'
require 'openssl'

url = URI("https://app.cometrics.io/api/content/search-schema")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net::HTTP::Get.new(url)
request["Accept"] = 'application/json'
request["Authorization"] = 'Bearer {access-token}'

response = http.request(request)
puts response.read_body

GET /api/content/search-schema

Example responses

200 Response

{
  "type": "object",
  "required": [],
  "properties": {
    "query": {
      "type": "string",
      "optional": true
    },
    "companies": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "optional": true
    },
    "themes": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "optional": true
    },
    "mediaTypes": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "optional": true
    },
    "platforms": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "optional": true
    },
    "uuids": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "optional": true
    },
    "countries": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "optional": true
    },
    "is_ad": {
      "type": "boolean",
      "optional": true,
      "default": false
    },
    "is_news": {
      "type": "boolean",
      "optional": true,
      "default": false
    },
    "is_verified": {
      "type": "boolean",
      "optional": true,
      "default": true
    },
    "only_has_media": {
      "type": "boolean",
      "optional": true,
      "default": false
    },
    "only_has_theme": {
      "type": "boolean",
      "optional": true,
      "default": false
    },
    "created_at": {
      "type": "object",
      "properties": {
        "operator": {
          "enum": [
            ">",
            "<"
          ]
        },
        "timestamp": {
          "type": "number"
        }
      },
      "optional": true
    },
    "publisher_created_at": {
      "type": "object",
      "properties": {
        "operator": {
          "enum": [
            ">",
            "<"
          ]
        },
        "timestamp": {
          "type": "number"
        }
      },
      "optional": true
    },
    "hitsPerPage": {
      "type": "number",
      "optional": true,
      "default": 25
    },
    "page": {
      "type": "number",
      "optional": true,
      "default": 0
    }
  }
}

Responses

Status Meaning Description Schema
200 OK OK Inline

Response Schema

Search Content

Code samples

curl --request POST \
  --url https://app.cometrics.io/api/content/search \
  --header 'Accept: application/json' \
  --header 'Authorization: Bearer {access-token}' \
  --header 'Content-Type: application/json' \
  --data '{"q":{"companies":["Example Corp"],"themes":["Energy Use"]}}'
const data = JSON.stringify({
  "q": {
    "companies": [
      "Example Corp"
    ],
    "themes": [
      "Energy Use"
    ]
  }
});

const xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("POST", "https://app.cometrics.io/api/content/search");
xhr.setRequestHeader("Content-Type", "application/json");
xhr.setRequestHeader("Accept", "application/json");
xhr.setRequestHeader("Authorization", "Bearer {access-token}");

xhr.send(data);
package main

import (
    "fmt"
    "strings"
    "net/http"
    "io/ioutil"
)

func main() {

    url := "https://app.cometrics.io/api/content/search"

    payload := strings.NewReader("{\"q\":{\"companies\":[\"Example Corp\"],\"themes\":[\"Energy Use\"]}}")

    req, _ := http.NewRequest("POST", url, payload)

    req.Header.Add("Content-Type", "application/json")
    req.Header.Add("Accept", "application/json")
    req.Header.Add("Authorization", "Bearer {access-token}")

    res, _ := http.DefaultClient.Do(req)

    defer res.Body.Close()
    body, _ := ioutil.ReadAll(res.Body)

    fmt.Println(res)
    fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.post("https://app.cometrics.io/api/content/search")
  .header("Content-Type", "application/json")
  .header("Accept", "application/json")
  .header("Authorization", "Bearer {access-token}")
  .body("{\"q\":{\"companies\":[\"Example Corp\"],\"themes\":[\"Energy Use\"]}}")
  .asString();
<?php

$curl = curl_init();

curl_setopt_array($curl, [
  CURLOPT_URL => "https://app.cometrics.io/api/content/search",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_POSTFIELDS => "{\"q\":{\"companies\":[\"Example Corp\"],\"themes\":[\"Energy Use\"]}}",
  CURLOPT_HTTPHEADER => [
    "Accept: application/json",
    "Authorization: Bearer {access-token}",
    "Content-Type: application/json"
  ],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
import http.client

conn = http.client.HTTPSConnection("app.cometrics.io")

payload = "{\"q\":{\"companies\":[\"Example Corp\"],\"themes\":[\"Energy Use\"]}}"

headers = {
    'Content-Type': "application/json",
    'Accept': "application/json",
    'Authorization': "Bearer {access-token}"
    }

conn.request("POST", "/api/content/search", payload, headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
require 'uri'
require 'net/http'
require 'openssl'

url = URI("https://app.cometrics.io/api/content/search")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request["Accept"] = 'application/json'
request["Authorization"] = 'Bearer {access-token}'
request.body = "{\"q\":{\"companies\":[\"Example Corp\"],\"themes\":[\"Energy Use\"]}}"

response = http.request(request)
puts response.read_body

POST /api/content/search

Body parameter

{
  "q": {
    "companies": [
      "Example Corp"
    ],
    "themes": [
      "Energy Use"
    ]
  }
}

Parameters

Name In Type Required Description
body body object false none

Example responses

Responses

Status Meaning Description Schema
200 OK Successful response None

Response Schema

View

Code samples

curl --request GET \
  --url https://app.cometrics.io/api/content/1a252aac-f7ad-4827-8afb-8f1bb042bac5 \
  --header 'Accept: application/json' \
  --header 'Authorization: Bearer {access-token}'
const data = null;

const xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://app.cometrics.io/api/content/1a252aac-f7ad-4827-8afb-8f1bb042bac5");
xhr.setRequestHeader("Accept", "application/json");
xhr.setRequestHeader("Authorization", "Bearer {access-token}");

xhr.send(data);
package main

import (
    "fmt"
    "net/http"
    "io/ioutil"
)

func main() {

    url := "https://app.cometrics.io/api/content/1a252aac-f7ad-4827-8afb-8f1bb042bac5"

    req, _ := http.NewRequest("GET", url, nil)

    req.Header.Add("Accept", "application/json")
    req.Header.Add("Authorization", "Bearer {access-token}")

    res, _ := http.DefaultClient.Do(req)

    defer res.Body.Close()
    body, _ := ioutil.ReadAll(res.Body)

    fmt.Println(res)
    fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.get("https://app.cometrics.io/api/content/1a252aac-f7ad-4827-8afb-8f1bb042bac5")
  .header("Accept", "application/json")
  .header("Authorization", "Bearer {access-token}")
  .asString();
<?php

$curl = curl_init();

curl_setopt_array($curl, [
  CURLOPT_URL => "https://app.cometrics.io/api/content/1a252aac-f7ad-4827-8afb-8f1bb042bac5",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
  CURLOPT_HTTPHEADER => [
    "Accept: application/json",
    "Authorization: Bearer {access-token}"
  ],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
import http.client

conn = http.client.HTTPSConnection("app.cometrics.io")

headers = {
    'Accept': "application/json",
    'Authorization': "Bearer {access-token}"
    }

conn.request("GET", "/api/content/1a252aac-f7ad-4827-8afb-8f1bb042bac5", headers=headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
require 'uri'
require 'net/http'
require 'openssl'

url = URI("https://app.cometrics.io/api/content/1a252aac-f7ad-4827-8afb-8f1bb042bac5")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net::HTTP::Get.new(url)
request["Accept"] = 'application/json'
request["Authorization"] = 'Bearer {access-token}'

response = http.request(request)
puts response.read_body

GET /api/content/{id}

Parameters

Name In Type Required Description
id path string true Content UUID

Example responses

Responses

Status Meaning Description Schema
200 OK Successful response None

Response Schema

Export

Code samples

curl --request POST \
  --url https://app.cometrics.io/api/content/1a252aac-f7ad-4827-8afb-8f1bb042bac5/export \
  --header 'Accept: application/json' \
  --header 'Authorization: Bearer {access-token}'
const data = null;

const xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("POST", "https://app.cometrics.io/api/content/1a252aac-f7ad-4827-8afb-8f1bb042bac5/export");
xhr.setRequestHeader("Accept", "application/json");
xhr.setRequestHeader("Authorization", "Bearer {access-token}");

xhr.send(data);
package main

import (
    "fmt"
    "net/http"
    "io/ioutil"
)

func main() {

    url := "https://app.cometrics.io/api/content/1a252aac-f7ad-4827-8afb-8f1bb042bac5/export"

    req, _ := http.NewRequest("POST", url, nil)

    req.Header.Add("Accept", "application/json")
    req.Header.Add("Authorization", "Bearer {access-token}")

    res, _ := http.DefaultClient.Do(req)

    defer res.Body.Close()
    body, _ := ioutil.ReadAll(res.Body)

    fmt.Println(res)
    fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.post("https://app.cometrics.io/api/content/1a252aac-f7ad-4827-8afb-8f1bb042bac5/export")
  .header("Accept", "application/json")
  .header("Authorization", "Bearer {access-token}")
  .asString();
<?php

$curl = curl_init();

curl_setopt_array($curl, [
  CURLOPT_URL => "https://app.cometrics.io/api/content/1a252aac-f7ad-4827-8afb-8f1bb042bac5/export",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_HTTPHEADER => [
    "Accept: application/json",
    "Authorization: Bearer {access-token}"
  ],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
import http.client

conn = http.client.HTTPSConnection("app.cometrics.io")

headers = {
    'Accept': "application/json",
    'Authorization': "Bearer {access-token}"
    }

conn.request("POST", "/api/content/1a252aac-f7ad-4827-8afb-8f1bb042bac5/export", headers=headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
require 'uri'
require 'net/http'
require 'openssl'

url = URI("https://app.cometrics.io/api/content/1a252aac-f7ad-4827-8afb-8f1bb042bac5/export")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net::HTTP::Post.new(url)
request["Accept"] = 'application/json'
request["Authorization"] = 'Bearer {access-token}'

response = http.request(request)
puts response.read_body

POST /api/content/{id}/export

Body parameter

Parameters

Name In Type Required Description
id path string true Content UUID

Example responses

Responses

Status Meaning Description Schema
200 OK Successful response None

Response Schema

Exports

Stream a ZIP of content that you'd like exported

Create

Code samples

curl --request POST \
  --url https://app.cometrics.io/api/exports \
  --header 'Accept: application/json' \
  --header 'Authorization: Bearer {access-token}' \
  --header 'Content-Type: application/json' \
  --data '{"export":{"content_uuids":["1a252aac-f7ad-4827-8afb-8f1bb042bac5"]}}'
const data = JSON.stringify({
  "export": {
    "content_uuids": [
      "1a252aac-f7ad-4827-8afb-8f1bb042bac5"
    ]
  }
});

const xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("POST", "https://app.cometrics.io/api/exports");
xhr.setRequestHeader("Content-Type", "application/json");
xhr.setRequestHeader("Accept", "application/json");
xhr.setRequestHeader("Authorization", "Bearer {access-token}");

xhr.send(data);
package main

import (
    "fmt"
    "strings"
    "net/http"
    "io/ioutil"
)

func main() {

    url := "https://app.cometrics.io/api/exports"

    payload := strings.NewReader("{\"export\":{\"content_uuids\":[\"1a252aac-f7ad-4827-8afb-8f1bb042bac5\"]}}")

    req, _ := http.NewRequest("POST", url, payload)

    req.Header.Add("Content-Type", "application/json")
    req.Header.Add("Accept", "application/json")
    req.Header.Add("Authorization", "Bearer {access-token}")

    res, _ := http.DefaultClient.Do(req)

    defer res.Body.Close()
    body, _ := ioutil.ReadAll(res.Body)

    fmt.Println(res)
    fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.post("https://app.cometrics.io/api/exports")
  .header("Content-Type", "application/json")
  .header("Accept", "application/json")
  .header("Authorization", "Bearer {access-token}")
  .body("{\"export\":{\"content_uuids\":[\"1a252aac-f7ad-4827-8afb-8f1bb042bac5\"]}}")
  .asString();
<?php

$curl = curl_init();

curl_setopt_array($curl, [
  CURLOPT_URL => "https://app.cometrics.io/api/exports",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_POSTFIELDS => "{\"export\":{\"content_uuids\":[\"1a252aac-f7ad-4827-8afb-8f1bb042bac5\"]}}",
  CURLOPT_HTTPHEADER => [
    "Accept: application/json",
    "Authorization: Bearer {access-token}",
    "Content-Type: application/json"
  ],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
import http.client

conn = http.client.HTTPSConnection("app.cometrics.io")

payload = "{\"export\":{\"content_uuids\":[\"1a252aac-f7ad-4827-8afb-8f1bb042bac5\"]}}"

headers = {
    'Content-Type': "application/json",
    'Accept': "application/json",
    'Authorization': "Bearer {access-token}"
    }

conn.request("POST", "/api/exports", payload, headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
require 'uri'
require 'net/http'
require 'openssl'

url = URI("https://app.cometrics.io/api/exports")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request["Accept"] = 'application/json'
request["Authorization"] = 'Bearer {access-token}'
request.body = "{\"export\":{\"content_uuids\":[\"1a252aac-f7ad-4827-8afb-8f1bb042bac5\"]}}"

response = http.request(request)
puts response.read_body

POST /api/exports

Body parameter

{
  "export": {
    "content_uuids": [
      "1a252aac-f7ad-4827-8afb-8f1bb042bac5"
    ]
  }
}

Parameters

Name In Type Required Description
Content-Type header string false none
Accept header string false none
body body object false none

Example responses

Responses

Status Meaning Description Schema
200 OK Successful response None

Response Schema

Facets

View the different values that are used to filter content searches

View Company Facets

Code samples

curl --request GET \
  --url https://app.cometrics.io/api/facets/company \
  --header 'Accept: application/json' \
  --header 'Authorization: Bearer {access-token}'
const data = null;

const xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://app.cometrics.io/api/facets/company");
xhr.setRequestHeader("Accept", "application/json");
xhr.setRequestHeader("Authorization", "Bearer {access-token}");

xhr.send(data);
package main

import (
    "fmt"
    "net/http"
    "io/ioutil"
)

func main() {

    url := "https://app.cometrics.io/api/facets/company"

    req, _ := http.NewRequest("GET", url, nil)

    req.Header.Add("Accept", "application/json")
    req.Header.Add("Authorization", "Bearer {access-token}")

    res, _ := http.DefaultClient.Do(req)

    defer res.Body.Close()
    body, _ := ioutil.ReadAll(res.Body)

    fmt.Println(res)
    fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.get("https://app.cometrics.io/api/facets/company")
  .header("Accept", "application/json")
  .header("Authorization", "Bearer {access-token}")
  .asString();
<?php

$curl = curl_init();

curl_setopt_array($curl, [
  CURLOPT_URL => "https://app.cometrics.io/api/facets/company",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
  CURLOPT_HTTPHEADER => [
    "Accept: application/json",
    "Authorization: Bearer {access-token}"
  ],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
import http.client

conn = http.client.HTTPSConnection("app.cometrics.io")

headers = {
    'Accept': "application/json",
    'Authorization': "Bearer {access-token}"
    }

conn.request("GET", "/api/facets/company", headers=headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
require 'uri'
require 'net/http'
require 'openssl'

url = URI("https://app.cometrics.io/api/facets/company")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net::HTTP::Get.new(url)
request["Accept"] = 'application/json'
request["Authorization"] = 'Bearer {access-token}'

response = http.request(request)
puts response.read_body

GET /api/facets/company

Example responses

Responses

Status Meaning Description Schema
200 OK Successful response None

Response Schema

View Theme Facets

Code samples

curl --request GET \
  --url https://app.cometrics.io/api/facets/themes \
  --header 'Accept: application/json' \
  --header 'Authorization: Bearer {access-token}'
const data = null;

const xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://app.cometrics.io/api/facets/themes");
xhr.setRequestHeader("Accept", "application/json");
xhr.setRequestHeader("Authorization", "Bearer {access-token}");

xhr.send(data);
package main

import (
    "fmt"
    "net/http"
    "io/ioutil"
)

func main() {

    url := "https://app.cometrics.io/api/facets/themes"

    req, _ := http.NewRequest("GET", url, nil)

    req.Header.Add("Accept", "application/json")
    req.Header.Add("Authorization", "Bearer {access-token}")

    res, _ := http.DefaultClient.Do(req)

    defer res.Body.Close()
    body, _ := ioutil.ReadAll(res.Body)

    fmt.Println(res)
    fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.get("https://app.cometrics.io/api/facets/themes")
  .header("Accept", "application/json")
  .header("Authorization", "Bearer {access-token}")
  .asString();
<?php

$curl = curl_init();

curl_setopt_array($curl, [
  CURLOPT_URL => "https://app.cometrics.io/api/facets/themes",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
  CURLOPT_HTTPHEADER => [
    "Accept: application/json",
    "Authorization: Bearer {access-token}"
  ],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
import http.client

conn = http.client.HTTPSConnection("app.cometrics.io")

headers = {
    'Accept': "application/json",
    'Authorization': "Bearer {access-token}"
    }

conn.request("GET", "/api/facets/themes", headers=headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
require 'uri'
require 'net/http'
require 'openssl'

url = URI("https://app.cometrics.io/api/facets/themes")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net::HTTP::Get.new(url)
request["Accept"] = 'application/json'
request["Authorization"] = 'Bearer {access-token}'

response = http.request(request)
puts response.read_body

GET /api/facets/themes

Example responses

Responses

Status Meaning Description Schema
200 OK Successful response None

Response Schema

View Platform Facets

Code samples

curl --request GET \
  --url https://app.cometrics.io/api/facets/platform \
  --header 'Accept: application/json' \
  --header 'Authorization: Bearer {access-token}'
const data = null;

const xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://app.cometrics.io/api/facets/platform");
xhr.setRequestHeader("Accept", "application/json");
xhr.setRequestHeader("Authorization", "Bearer {access-token}");

xhr.send(data);
package main

import (
    "fmt"
    "net/http"
    "io/ioutil"
)

func main() {

    url := "https://app.cometrics.io/api/facets/platform"

    req, _ := http.NewRequest("GET", url, nil)

    req.Header.Add("Accept", "application/json")
    req.Header.Add("Authorization", "Bearer {access-token}")

    res, _ := http.DefaultClient.Do(req)

    defer res.Body.Close()
    body, _ := ioutil.ReadAll(res.Body)

    fmt.Println(res)
    fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.get("https://app.cometrics.io/api/facets/platform")
  .header("Accept", "application/json")
  .header("Authorization", "Bearer {access-token}")
  .asString();
<?php

$curl = curl_init();

curl_setopt_array($curl, [
  CURLOPT_URL => "https://app.cometrics.io/api/facets/platform",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
  CURLOPT_HTTPHEADER => [
    "Accept: application/json",
    "Authorization: Bearer {access-token}"
  ],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
import http.client

conn = http.client.HTTPSConnection("app.cometrics.io")

headers = {
    'Accept': "application/json",
    'Authorization': "Bearer {access-token}"
    }

conn.request("GET", "/api/facets/platform", headers=headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
require 'uri'
require 'net/http'
require 'openssl'

url = URI("https://app.cometrics.io/api/facets/platform")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net::HTTP::Get.new(url)
request["Accept"] = 'application/json'
request["Authorization"] = 'Bearer {access-token}'

response = http.request(request)
puts response.read_body

GET /api/facets/platform

Example responses

Responses

Status Meaning Description Schema
200 OK Successful response None

Response Schema

View Media Type Facets

Code samples

curl --request GET \
  --url https://app.cometrics.io/api/facets/media-type \
  --header 'Accept: application/json' \
  --header 'Authorization: Bearer {access-token}'
const data = null;

const xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://app.cometrics.io/api/facets/media-type");
xhr.setRequestHeader("Accept", "application/json");
xhr.setRequestHeader("Authorization", "Bearer {access-token}");

xhr.send(data);
package main

import (
    "fmt"
    "net/http"
    "io/ioutil"
)

func main() {

    url := "https://app.cometrics.io/api/facets/media-type"

    req, _ := http.NewRequest("GET", url, nil)

    req.Header.Add("Accept", "application/json")
    req.Header.Add("Authorization", "Bearer {access-token}")

    res, _ := http.DefaultClient.Do(req)

    defer res.Body.Close()
    body, _ := ioutil.ReadAll(res.Body)

    fmt.Println(res)
    fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.get("https://app.cometrics.io/api/facets/media-type")
  .header("Accept", "application/json")
  .header("Authorization", "Bearer {access-token}")
  .asString();
<?php

$curl = curl_init();

curl_setopt_array($curl, [
  CURLOPT_URL => "https://app.cometrics.io/api/facets/media-type",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
  CURLOPT_HTTPHEADER => [
    "Accept: application/json",
    "Authorization: Bearer {access-token}"
  ],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
import http.client

conn = http.client.HTTPSConnection("app.cometrics.io")

headers = {
    'Accept': "application/json",
    'Authorization': "Bearer {access-token}"
    }

conn.request("GET", "/api/facets/media-type", headers=headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
require 'uri'
require 'net/http'
require 'openssl'

url = URI("https://app.cometrics.io/api/facets/media-type")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net::HTTP::Get.new(url)
request["Accept"] = 'application/json'
request["Authorization"] = 'Bearer {access-token}'

response = http.request(request)
puts response.read_body

GET /api/facets/media-type

Example responses

Responses

Status Meaning Description Schema
200 OK Successful response None

Response Schema

View Country Facets

Code samples

curl --request GET \
  --url https://app.cometrics.io/api/facets/country \
  --header 'Accept: application/json' \
  --header 'Authorization: Bearer {access-token}'
const data = null;

const xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://app.cometrics.io/api/facets/country");
xhr.setRequestHeader("Accept", "application/json");
xhr.setRequestHeader("Authorization", "Bearer {access-token}");

xhr.send(data);
package main

import (
    "fmt"
    "net/http"
    "io/ioutil"
)

func main() {

    url := "https://app.cometrics.io/api/facets/country"

    req, _ := http.NewRequest("GET", url, nil)

    req.Header.Add("Accept", "application/json")
    req.Header.Add("Authorization", "Bearer {access-token}")

    res, _ := http.DefaultClient.Do(req)

    defer res.Body.Close()
    body, _ := ioutil.ReadAll(res.Body)

    fmt.Println(res)
    fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.get("https://app.cometrics.io/api/facets/country")
  .header("Accept", "application/json")
  .header("Authorization", "Bearer {access-token}")
  .asString();
<?php

$curl = curl_init();

curl_setopt_array($curl, [
  CURLOPT_URL => "https://app.cometrics.io/api/facets/country",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
  CURLOPT_HTTPHEADER => [
    "Accept: application/json",
    "Authorization: Bearer {access-token}"
  ],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
import http.client

conn = http.client.HTTPSConnection("app.cometrics.io")

headers = {
    'Accept': "application/json",
    'Authorization': "Bearer {access-token}"
    }

conn.request("GET", "/api/facets/country", headers=headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
require 'uri'
require 'net/http'
require 'openssl'

url = URI("https://app.cometrics.io/api/facets/country")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net::HTTP::Get.new(url)
request["Accept"] = 'application/json'
request["Authorization"] = 'Bearer {access-token}'

response = http.request(request)
puts response.read_body

GET /api/facets/country

Example responses

Responses

Status Meaning Description Schema
200 OK Successful response None

Response Schema

Flagged Content

Report content for inaccuracies.

Create

Code samples

curl --request POST \
  --url https://app.cometrics.io/api/flagged-content \
  --header 'Accept: application/json' \
  --header 'Authorization: Bearer {access-token}' \
  --header 'Content-Type: application/json' \
  --data '{"flagged_content":{"content_uuid":"41ba0c3c-7d07-45dc-bf71-be829cdac5c5","reason":"Incorrect Themes","additional_details":"The theme is Product Use Impact but it doesn'\''t mention any products"}}'
const data = JSON.stringify({
  "flagged_content": {
    "content_uuid": "41ba0c3c-7d07-45dc-bf71-be829cdac5c5",
    "reason": "Incorrect Themes",
    "additional_details": "The theme is Product Use Impact but it doesn't mention any products"
  }
});

const xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("POST", "https://app.cometrics.io/api/flagged-content");
xhr.setRequestHeader("Content-Type", "application/json");
xhr.setRequestHeader("Accept", "application/json");
xhr.setRequestHeader("Authorization", "Bearer {access-token}");

xhr.send(data);
package main

import (
    "fmt"
    "strings"
    "net/http"
    "io/ioutil"
)

func main() {

    url := "https://app.cometrics.io/api/flagged-content"

    payload := strings.NewReader("{\"flagged_content\":{\"content_uuid\":\"41ba0c3c-7d07-45dc-bf71-be829cdac5c5\",\"reason\":\"Incorrect Themes\",\"additional_details\":\"The theme is Product Use Impact but it doesn't mention any products\"}}")

    req, _ := http.NewRequest("POST", url, payload)

    req.Header.Add("Content-Type", "application/json")
    req.Header.Add("Accept", "application/json")
    req.Header.Add("Authorization", "Bearer {access-token}")

    res, _ := http.DefaultClient.Do(req)

    defer res.Body.Close()
    body, _ := ioutil.ReadAll(res.Body)

    fmt.Println(res)
    fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.post("https://app.cometrics.io/api/flagged-content")
  .header("Content-Type", "application/json")
  .header("Accept", "application/json")
  .header("Authorization", "Bearer {access-token}")
  .body("{\"flagged_content\":{\"content_uuid\":\"41ba0c3c-7d07-45dc-bf71-be829cdac5c5\",\"reason\":\"Incorrect Themes\",\"additional_details\":\"The theme is Product Use Impact but it doesn't mention any products\"}}")
  .asString();
<?php

$curl = curl_init();

curl_setopt_array($curl, [
  CURLOPT_URL => "https://app.cometrics.io/api/flagged-content",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_POSTFIELDS => "{\"flagged_content\":{\"content_uuid\":\"41ba0c3c-7d07-45dc-bf71-be829cdac5c5\",\"reason\":\"Incorrect Themes\",\"additional_details\":\"The theme is Product Use Impact but it doesn't mention any products\"}}",
  CURLOPT_HTTPHEADER => [
    "Accept: application/json",
    "Authorization: Bearer {access-token}",
    "Content-Type: application/json"
  ],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
import http.client

conn = http.client.HTTPSConnection("app.cometrics.io")

payload = "{\"flagged_content\":{\"content_uuid\":\"41ba0c3c-7d07-45dc-bf71-be829cdac5c5\",\"reason\":\"Incorrect Themes\",\"additional_details\":\"The theme is Product Use Impact but it doesn't mention any products\"}}"

headers = {
    'Content-Type': "application/json",
    'Accept': "application/json",
    'Authorization': "Bearer {access-token}"
    }

conn.request("POST", "/api/flagged-content", payload, headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
require 'uri'
require 'net/http'
require 'openssl'

url = URI("https://app.cometrics.io/api/flagged-content")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request["Accept"] = 'application/json'
request["Authorization"] = 'Bearer {access-token}'
request.body = "{\"flagged_content\":{\"content_uuid\":\"41ba0c3c-7d07-45dc-bf71-be829cdac5c5\",\"reason\":\"Incorrect Themes\",\"additional_details\":\"The theme is Product Use Impact but it doesn't mention any products\"}}"

response = http.request(request)
puts response.read_body

POST /api/flagged-content

Body parameter

{
  "flagged_content": {
    "content_uuid": "41ba0c3c-7d07-45dc-bf71-be829cdac5c5",
    "reason": "Incorrect Themes",
    "additional_details": "The theme is Product Use Impact but it doesn't mention any products"
  }
}

Parameters

Name In Type Required Description
Content-Type header string false none
Accept header string false none
body body object false none

Example responses

Responses

Status Meaning Description Schema
200 OK Successful response None

Response Schema

Nominations

Send us companies that you'd like to have tracked

Create

Code samples

curl --request POST \
  --url https://app.cometrics.io/api/nominations \
  --header 'Accept: application/json' \
  --header 'Authorization: Bearer {access-token}' \
  --header 'Content-Type: application/json' \
  --data '{"nomination":{"company_name":"Example Corp","website":"https://example.com","additional_details":"Any additional context about the company we should know"}}'
const data = JSON.stringify({
  "nomination": {
    "company_name": "Example Corp",
    "website": "https://example.com",
    "additional_details": "Any additional context about the company we should know"
  }
});

const xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("POST", "https://app.cometrics.io/api/nominations");
xhr.setRequestHeader("Content-Type", "application/json");
xhr.setRequestHeader("Accept", "application/json");
xhr.setRequestHeader("Authorization", "Bearer {access-token}");

xhr.send(data);
package main

import (
    "fmt"
    "strings"
    "net/http"
    "io/ioutil"
)

func main() {

    url := "https://app.cometrics.io/api/nominations"

    payload := strings.NewReader("{\"nomination\":{\"company_name\":\"Example Corp\",\"website\":\"https://example.com\",\"additional_details\":\"Any additional context about the company we should know\"}}")

    req, _ := http.NewRequest("POST", url, payload)

    req.Header.Add("Content-Type", "application/json")
    req.Header.Add("Accept", "application/json")
    req.Header.Add("Authorization", "Bearer {access-token}")

    res, _ := http.DefaultClient.Do(req)

    defer res.Body.Close()
    body, _ := ioutil.ReadAll(res.Body)

    fmt.Println(res)
    fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.post("https://app.cometrics.io/api/nominations")
  .header("Content-Type", "application/json")
  .header("Accept", "application/json")
  .header("Authorization", "Bearer {access-token}")
  .body("{\"nomination\":{\"company_name\":\"Example Corp\",\"website\":\"https://example.com\",\"additional_details\":\"Any additional context about the company we should know\"}}")
  .asString();
<?php

$curl = curl_init();

curl_setopt_array($curl, [
  CURLOPT_URL => "https://app.cometrics.io/api/nominations",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_POSTFIELDS => "{\"nomination\":{\"company_name\":\"Example Corp\",\"website\":\"https://example.com\",\"additional_details\":\"Any additional context about the company we should know\"}}",
  CURLOPT_HTTPHEADER => [
    "Accept: application/json",
    "Authorization: Bearer {access-token}",
    "Content-Type: application/json"
  ],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
import http.client

conn = http.client.HTTPSConnection("app.cometrics.io")

payload = "{\"nomination\":{\"company_name\":\"Example Corp\",\"website\":\"https://example.com\",\"additional_details\":\"Any additional context about the company we should know\"}}"

headers = {
    'Content-Type': "application/json",
    'Accept': "application/json",
    'Authorization': "Bearer {access-token}"
    }

conn.request("POST", "/api/nominations", payload, headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
require 'uri'
require 'net/http'
require 'openssl'

url = URI("https://app.cometrics.io/api/nominations")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request["Accept"] = 'application/json'
request["Authorization"] = 'Bearer {access-token}'
request.body = "{\"nomination\":{\"company_name\":\"Example Corp\",\"website\":\"https://example.com\",\"additional_details\":\"Any additional context about the company we should know\"}}"

response = http.request(request)
puts response.read_body

POST /api/nominations

Body parameter

{
  "nomination": {
    "company_name": "Example Corp",
    "website": "https://example.com",
    "additional_details": "Any additional context about the company we should know"
  }
}

Parameters

Name In Type Required Description
Content-Type header string false none
Accept header string false none
body body object false none

Example responses

Responses

Status Meaning Description Schema
200 OK Successful response None

Response Schema

Save Groups

Organize content by groups for reporting or analysis.

List All

Code samples

curl --request GET \
  --url https://app.cometrics.io/api/save-groups \
  --header 'Accept: application/json' \
  --header 'Authorization: Bearer {access-token}'
const data = null;

const xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://app.cometrics.io/api/save-groups");
xhr.setRequestHeader("Accept", "application/json");
xhr.setRequestHeader("Authorization", "Bearer {access-token}");

xhr.send(data);
package main

import (
    "fmt"
    "net/http"
    "io/ioutil"
)

func main() {

    url := "https://app.cometrics.io/api/save-groups"

    req, _ := http.NewRequest("GET", url, nil)

    req.Header.Add("Accept", "application/json")
    req.Header.Add("Authorization", "Bearer {access-token}")

    res, _ := http.DefaultClient.Do(req)

    defer res.Body.Close()
    body, _ := ioutil.ReadAll(res.Body)

    fmt.Println(res)
    fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.get("https://app.cometrics.io/api/save-groups")
  .header("Accept", "application/json")
  .header("Authorization", "Bearer {access-token}")
  .asString();
<?php

$curl = curl_init();

curl_setopt_array($curl, [
  CURLOPT_URL => "https://app.cometrics.io/api/save-groups",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
  CURLOPT_HTTPHEADER => [
    "Accept: application/json",
    "Authorization: Bearer {access-token}"
  ],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
import http.client

conn = http.client.HTTPSConnection("app.cometrics.io")

headers = {
    'Accept': "application/json",
    'Authorization': "Bearer {access-token}"
    }

conn.request("GET", "/api/save-groups", headers=headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
require 'uri'
require 'net/http'
require 'openssl'

url = URI("https://app.cometrics.io/api/save-groups")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net::HTTP::Get.new(url)
request["Accept"] = 'application/json'
request["Authorization"] = 'Bearer {access-token}'

response = http.request(request)
puts response.read_body

GET /api/save-groups

Example responses

Responses

Status Meaning Description Schema
200 OK Successful response None

Response Schema

Create Group

Code samples

curl --request POST \
  --url https://app.cometrics.io/api/save-groups \
  --header 'Accept: application/json' \
  --header 'Authorization: Bearer {access-token}' \
  --header 'Content-Type: application/json' \
  --data '{"save_group":{"name":"Water Specific Content","description":"Content that mentions water or has a theme related to water impact"}}'
const data = JSON.stringify({
  "save_group": {
    "name": "Water Specific Content",
    "description": "Content that mentions water or has a theme related to water impact"
  }
});

const xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("POST", "https://app.cometrics.io/api/save-groups");
xhr.setRequestHeader("Content-Type", "application/json");
xhr.setRequestHeader("Accept", "application/json");
xhr.setRequestHeader("Authorization", "Bearer {access-token}");

xhr.send(data);
package main

import (
    "fmt"
    "strings"
    "net/http"
    "io/ioutil"
)

func main() {

    url := "https://app.cometrics.io/api/save-groups"

    payload := strings.NewReader("{\"save_group\":{\"name\":\"Water Specific Content\",\"description\":\"Content that mentions water or has a theme related to water impact\"}}")

    req, _ := http.NewRequest("POST", url, payload)

    req.Header.Add("Content-Type", "application/json")
    req.Header.Add("Accept", "application/json")
    req.Header.Add("Authorization", "Bearer {access-token}")

    res, _ := http.DefaultClient.Do(req)

    defer res.Body.Close()
    body, _ := ioutil.ReadAll(res.Body)

    fmt.Println(res)
    fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.post("https://app.cometrics.io/api/save-groups")
  .header("Content-Type", "application/json")
  .header("Accept", "application/json")
  .header("Authorization", "Bearer {access-token}")
  .body("{\"save_group\":{\"name\":\"Water Specific Content\",\"description\":\"Content that mentions water or has a theme related to water impact\"}}")
  .asString();
<?php

$curl = curl_init();

curl_setopt_array($curl, [
  CURLOPT_URL => "https://app.cometrics.io/api/save-groups",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_POSTFIELDS => "{\"save_group\":{\"name\":\"Water Specific Content\",\"description\":\"Content that mentions water or has a theme related to water impact\"}}",
  CURLOPT_HTTPHEADER => [
    "Accept: application/json",
    "Authorization: Bearer {access-token}",
    "Content-Type: application/json"
  ],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
import http.client

conn = http.client.HTTPSConnection("app.cometrics.io")

payload = "{\"save_group\":{\"name\":\"Water Specific Content\",\"description\":\"Content that mentions water or has a theme related to water impact\"}}"

headers = {
    'Content-Type': "application/json",
    'Accept': "application/json",
    'Authorization': "Bearer {access-token}"
    }

conn.request("POST", "/api/save-groups", payload, headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
require 'uri'
require 'net/http'
require 'openssl'

url = URI("https://app.cometrics.io/api/save-groups")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request["Accept"] = 'application/json'
request["Authorization"] = 'Bearer {access-token}'
request.body = "{\"save_group\":{\"name\":\"Water Specific Content\",\"description\":\"Content that mentions water or has a theme related to water impact\"}}"

response = http.request(request)
puts response.read_body

POST /api/save-groups

Body parameter

{
  "save_group": {
    "name": "Water Specific Content",
    "description": "Content that mentions water or has a theme related to water impact"
  }
}

Parameters

Name In Type Required Description
Content-Type header string false none
Accept header string false none
body body object false none

Example responses

Responses

Status Meaning Description Schema
200 OK Successful response None

Response Schema

View Group

Code samples

curl --request GET \
  --url https://app.cometrics.io/api/save-groups/8 \
  --header 'Accept: application/json' \
  --header 'Authorization: Bearer {access-token}'
const data = null;

const xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://app.cometrics.io/api/save-groups/8");
xhr.setRequestHeader("Accept", "application/json");
xhr.setRequestHeader("Authorization", "Bearer {access-token}");

xhr.send(data);
package main

import (
    "fmt"
    "net/http"
    "io/ioutil"
)

func main() {

    url := "https://app.cometrics.io/api/save-groups/8"

    req, _ := http.NewRequest("GET", url, nil)

    req.Header.Add("Accept", "application/json")
    req.Header.Add("Authorization", "Bearer {access-token}")

    res, _ := http.DefaultClient.Do(req)

    defer res.Body.Close()
    body, _ := ioutil.ReadAll(res.Body)

    fmt.Println(res)
    fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.get("https://app.cometrics.io/api/save-groups/8")
  .header("Accept", "application/json")
  .header("Authorization", "Bearer {access-token}")
  .asString();
<?php

$curl = curl_init();

curl_setopt_array($curl, [
  CURLOPT_URL => "https://app.cometrics.io/api/save-groups/8",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
  CURLOPT_HTTPHEADER => [
    "Accept: application/json",
    "Authorization: Bearer {access-token}"
  ],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
import http.client

conn = http.client.HTTPSConnection("app.cometrics.io")

headers = {
    'Accept': "application/json",
    'Authorization': "Bearer {access-token}"
    }

conn.request("GET", "/api/save-groups/8", headers=headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
require 'uri'
require 'net/http'
require 'openssl'

url = URI("https://app.cometrics.io/api/save-groups/8")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net::HTTP::Get.new(url)
request["Accept"] = 'application/json'
request["Authorization"] = 'Bearer {access-token}'

response = http.request(request)
puts response.read_body

GET /api/save-groups/{id}

Parameters

Name In Type Required Description
id path integer true none

Example responses

Responses

Status Meaning Description Schema
200 OK Successful response None

Response Schema

Update Group

Code samples

curl --request PUT \
  --url https://app.cometrics.io/api/save-groups/3 \
  --header 'Accept: application/json' \
  --header 'Authorization: Bearer {access-token}' \
  --header 'Content-Type: application/json' \
  --data '{"save_group":{"name":"Water Specific Content","description":"Content that mentions water or has a theme related to water impact and ocean health"}}'
const data = JSON.stringify({
  "save_group": {
    "name": "Water Specific Content",
    "description": "Content that mentions water or has a theme related to water impact and ocean health"
  }
});

const xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("PUT", "https://app.cometrics.io/api/save-groups/3");
xhr.setRequestHeader("Content-Type", "application/json");
xhr.setRequestHeader("Accept", "application/json");
xhr.setRequestHeader("Authorization", "Bearer {access-token}");

xhr.send(data);
package main

import (
    "fmt"
    "strings"
    "net/http"
    "io/ioutil"
)

func main() {

    url := "https://app.cometrics.io/api/save-groups/3"

    payload := strings.NewReader("{\"save_group\":{\"name\":\"Water Specific Content\",\"description\":\"Content that mentions water or has a theme related to water impact and ocean health\"}}")

    req, _ := http.NewRequest("PUT", url, payload)

    req.Header.Add("Content-Type", "application/json")
    req.Header.Add("Accept", "application/json")
    req.Header.Add("Authorization", "Bearer {access-token}")

    res, _ := http.DefaultClient.Do(req)

    defer res.Body.Close()
    body, _ := ioutil.ReadAll(res.Body)

    fmt.Println(res)
    fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.put("https://app.cometrics.io/api/save-groups/3")
  .header("Content-Type", "application/json")
  .header("Accept", "application/json")
  .header("Authorization", "Bearer {access-token}")
  .body("{\"save_group\":{\"name\":\"Water Specific Content\",\"description\":\"Content that mentions water or has a theme related to water impact and ocean health\"}}")
  .asString();
<?php

$curl = curl_init();

curl_setopt_array($curl, [
  CURLOPT_URL => "https://app.cometrics.io/api/save-groups/3",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "PUT",
  CURLOPT_POSTFIELDS => "{\"save_group\":{\"name\":\"Water Specific Content\",\"description\":\"Content that mentions water or has a theme related to water impact and ocean health\"}}",
  CURLOPT_HTTPHEADER => [
    "Accept: application/json",
    "Authorization: Bearer {access-token}",
    "Content-Type: application/json"
  ],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
import http.client

conn = http.client.HTTPSConnection("app.cometrics.io")

payload = "{\"save_group\":{\"name\":\"Water Specific Content\",\"description\":\"Content that mentions water or has a theme related to water impact and ocean health\"}}"

headers = {
    'Content-Type': "application/json",
    'Accept': "application/json",
    'Authorization': "Bearer {access-token}"
    }

conn.request("PUT", "/api/save-groups/3", payload, headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
require 'uri'
require 'net/http'
require 'openssl'

url = URI("https://app.cometrics.io/api/save-groups/3")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net::HTTP::Put.new(url)
request["Content-Type"] = 'application/json'
request["Accept"] = 'application/json'
request["Authorization"] = 'Bearer {access-token}'
request.body = "{\"save_group\":{\"name\":\"Water Specific Content\",\"description\":\"Content that mentions water or has a theme related to water impact and ocean health\"}}"

response = http.request(request)
puts response.read_body

PUT /api/save-groups/{id}

Body parameter

{
  "save_group": {
    "name": "Water Specific Content",
    "description": "Content that mentions water or has a theme related to water impact and ocean health"
  }
}

Parameters

Name In Type Required Description
id path integer true none
body body object false none

Example responses

Responses

Status Meaning Description Schema
200 OK Successful response None

Response Schema

Delete Group

Code samples

curl --request DELETE \
  --url https://app.cometrics.io/api/save-groups/6 \
  --header 'Accept: application/json' \
  --header 'Authorization: Bearer {access-token}'
const data = null;

const xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("DELETE", "https://app.cometrics.io/api/save-groups/6");
xhr.setRequestHeader("Accept", "application/json");
xhr.setRequestHeader("Authorization", "Bearer {access-token}");

xhr.send(data);
package main

import (
    "fmt"
    "net/http"
    "io/ioutil"
)

func main() {

    url := "https://app.cometrics.io/api/save-groups/6"

    req, _ := http.NewRequest("DELETE", url, nil)

    req.Header.Add("Accept", "application/json")
    req.Header.Add("Authorization", "Bearer {access-token}")

    res, _ := http.DefaultClient.Do(req)

    defer res.Body.Close()
    body, _ := ioutil.ReadAll(res.Body)

    fmt.Println(res)
    fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.delete("https://app.cometrics.io/api/save-groups/6")
  .header("Accept", "application/json")
  .header("Authorization", "Bearer {access-token}")
  .asString();
<?php

$curl = curl_init();

curl_setopt_array($curl, [
  CURLOPT_URL => "https://app.cometrics.io/api/save-groups/6",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "DELETE",
  CURLOPT_HTTPHEADER => [
    "Accept: application/json",
    "Authorization: Bearer {access-token}"
  ],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
import http.client

conn = http.client.HTTPSConnection("app.cometrics.io")

headers = {
    'Accept': "application/json",
    'Authorization': "Bearer {access-token}"
    }

conn.request("DELETE", "/api/save-groups/6", headers=headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
require 'uri'
require 'net/http'
require 'openssl'

url = URI("https://app.cometrics.io/api/save-groups/6")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net::HTTP::Delete.new(url)
request["Accept"] = 'application/json'
request["Authorization"] = 'Bearer {access-token}'

response = http.request(request)
puts response.read_body

DELETE /api/save-groups/{id}

Parameters

Name In Type Required Description
id path integer true none

Example responses

Responses

Status Meaning Description Schema
200 OK Successful response None

Response Schema

Save Groups > Saved Content

List All

Code samples

curl --request GET \
  --url https://app.cometrics.io/api/saved-content \
  --header 'Accept: application/json' \
  --header 'Authorization: Bearer {access-token}'
const data = null;

const xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://app.cometrics.io/api/saved-content");
xhr.setRequestHeader("Accept", "application/json");
xhr.setRequestHeader("Authorization", "Bearer {access-token}");

xhr.send(data);
package main

import (
    "fmt"
    "net/http"
    "io/ioutil"
)

func main() {

    url := "https://app.cometrics.io/api/saved-content"

    req, _ := http.NewRequest("GET", url, nil)

    req.Header.Add("Accept", "application/json")
    req.Header.Add("Authorization", "Bearer {access-token}")

    res, _ := http.DefaultClient.Do(req)

    defer res.Body.Close()
    body, _ := ioutil.ReadAll(res.Body)

    fmt.Println(res)
    fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.get("https://app.cometrics.io/api/saved-content")
  .header("Accept", "application/json")
  .header("Authorization", "Bearer {access-token}")
  .asString();
<?php

$curl = curl_init();

curl_setopt_array($curl, [
  CURLOPT_URL => "https://app.cometrics.io/api/saved-content",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
  CURLOPT_HTTPHEADER => [
    "Accept: application/json",
    "Authorization: Bearer {access-token}"
  ],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
import http.client

conn = http.client.HTTPSConnection("app.cometrics.io")

headers = {
    'Accept': "application/json",
    'Authorization': "Bearer {access-token}"
    }

conn.request("GET", "/api/saved-content", headers=headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
require 'uri'
require 'net/http'
require 'openssl'

url = URI("https://app.cometrics.io/api/saved-content")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net::HTTP::Get.new(url)
request["Accept"] = 'application/json'
request["Authorization"] = 'Bearer {access-token}'

response = http.request(request)
puts response.read_body

GET /api/saved-content

Example responses

Responses

Status Meaning Description Schema
200 OK Successful response None

Response Schema

Add Content to Group

Code samples

curl --request POST \
  --url https://app.cometrics.io/api/save-groups/8/saved/ \
  --header 'Accept: application/json' \
  --header 'Authorization: Bearer {access-token}' \
  --header 'Content-Type: application/json' \
  --data '{"saved_content":{"content_id":4688}}'
const data = JSON.stringify({
  "saved_content": {
    "content_id": 4688
  }
});

const xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("POST", "https://app.cometrics.io/api/save-groups/8/saved/");
xhr.setRequestHeader("Content-Type", "application/json");
xhr.setRequestHeader("Accept", "application/json");
xhr.setRequestHeader("Authorization", "Bearer {access-token}");

xhr.send(data);
package main

import (
    "fmt"
    "strings"
    "net/http"
    "io/ioutil"
)

func main() {

    url := "https://app.cometrics.io/api/save-groups/8/saved/"

    payload := strings.NewReader("{\"saved_content\":{\"content_id\":4688}}")

    req, _ := http.NewRequest("POST", url, payload)

    req.Header.Add("Content-Type", "application/json")
    req.Header.Add("Accept", "application/json")
    req.Header.Add("Authorization", "Bearer {access-token}")

    res, _ := http.DefaultClient.Do(req)

    defer res.Body.Close()
    body, _ := ioutil.ReadAll(res.Body)

    fmt.Println(res)
    fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.post("https://app.cometrics.io/api/save-groups/8/saved/")
  .header("Content-Type", "application/json")
  .header("Accept", "application/json")
  .header("Authorization", "Bearer {access-token}")
  .body("{\"saved_content\":{\"content_id\":4688}}")
  .asString();
<?php

$curl = curl_init();

curl_setopt_array($curl, [
  CURLOPT_URL => "https://app.cometrics.io/api/save-groups/8/saved/",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_POSTFIELDS => "{\"saved_content\":{\"content_id\":4688}}",
  CURLOPT_HTTPHEADER => [
    "Accept: application/json",
    "Authorization: Bearer {access-token}",
    "Content-Type: application/json"
  ],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
import http.client

conn = http.client.HTTPSConnection("app.cometrics.io")

payload = "{\"saved_content\":{\"content_id\":4688}}"

headers = {
    'Content-Type': "application/json",
    'Accept': "application/json",
    'Authorization': "Bearer {access-token}"
    }

conn.request("POST", "/api/save-groups/8/saved/", payload, headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
require 'uri'
require 'net/http'
require 'openssl'

url = URI("https://app.cometrics.io/api/save-groups/8/saved/")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request["Accept"] = 'application/json'
request["Authorization"] = 'Bearer {access-token}'
request.body = "{\"saved_content\":{\"content_id\":4688}}"

response = http.request(request)
puts response.read_body

POST /api/save-groups/{id}/saved/

Body parameter

{
  "saved_content": {
    "content_id": 4688
  }
}

Parameters

Name In Type Required Description
Content-Type header string false none
Accept header string false none
id path integer true none
body body object false none

Example responses

Responses

Status Meaning Description Schema
200 OK Successful response None

Response Schema

Remove Content

Code samples

curl --request DELETE \
  --url https://app.cometrics.io/api/save-groups/3/saved/4689 \
  --header 'Accept: application/json' \
  --header 'Authorization: Bearer {access-token}'
const data = null;

const xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("DELETE", "https://app.cometrics.io/api/save-groups/3/saved/4689");
xhr.setRequestHeader("Accept", "application/json");
xhr.setRequestHeader("Authorization", "Bearer {access-token}");

xhr.send(data);
package main

import (
    "fmt"
    "net/http"
    "io/ioutil"
)

func main() {

    url := "https://app.cometrics.io/api/save-groups/3/saved/4689"

    req, _ := http.NewRequest("DELETE", url, nil)

    req.Header.Add("Accept", "application/json")
    req.Header.Add("Authorization", "Bearer {access-token}")

    res, _ := http.DefaultClient.Do(req)

    defer res.Body.Close()
    body, _ := ioutil.ReadAll(res.Body)

    fmt.Println(res)
    fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.delete("https://app.cometrics.io/api/save-groups/3/saved/4689")
  .header("Accept", "application/json")
  .header("Authorization", "Bearer {access-token}")
  .asString();
<?php

$curl = curl_init();

curl_setopt_array($curl, [
  CURLOPT_URL => "https://app.cometrics.io/api/save-groups/3/saved/4689",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "DELETE",
  CURLOPT_HTTPHEADER => [
    "Accept: application/json",
    "Authorization: Bearer {access-token}"
  ],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
import http.client

conn = http.client.HTTPSConnection("app.cometrics.io")

headers = {
    'Accept': "application/json",
    'Authorization': "Bearer {access-token}"
    }

conn.request("DELETE", "/api/save-groups/3/saved/4689", headers=headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
require 'uri'
require 'net/http'
require 'openssl'

url = URI("https://app.cometrics.io/api/save-groups/3/saved/4689")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net::HTTP::Delete.new(url)
request["Accept"] = 'application/json'
request["Authorization"] = 'Bearer {access-token}'

response = http.request(request)
puts response.read_body

DELETE /api/save-groups/{groupId}/saved/{contentId}

Parameters

Name In Type Required Description
groupId path integer true none
contentId path integer true none

Example responses

Responses

Status Meaning Description Schema
200 OK Successful response None

Response Schema

Stats

Trends and data for visualizations

Top Companies

Code samples

curl --request GET \
  --url https://app.cometrics.io/api/stats/company-themes \
  --header 'Accept: application/json' \
  --header 'Authorization: Bearer {access-token}'
const data = null;

const xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://app.cometrics.io/api/stats/company-themes");
xhr.setRequestHeader("Accept", "application/json");
xhr.setRequestHeader("Authorization", "Bearer {access-token}");

xhr.send(data);
package main

import (
    "fmt"
    "net/http"
    "io/ioutil"
)

func main() {

    url := "https://app.cometrics.io/api/stats/company-themes"

    req, _ := http.NewRequest("GET", url, nil)

    req.Header.Add("Accept", "application/json")
    req.Header.Add("Authorization", "Bearer {access-token}")

    res, _ := http.DefaultClient.Do(req)

    defer res.Body.Close()
    body, _ := ioutil.ReadAll(res.Body)

    fmt.Println(res)
    fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.get("https://app.cometrics.io/api/stats/company-themes")
  .header("Accept", "application/json")
  .header("Authorization", "Bearer {access-token}")
  .asString();
<?php

$curl = curl_init();

curl_setopt_array($curl, [
  CURLOPT_URL => "https://app.cometrics.io/api/stats/company-themes",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
  CURLOPT_HTTPHEADER => [
    "Accept: application/json",
    "Authorization: Bearer {access-token}"
  ],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
import http.client

conn = http.client.HTTPSConnection("app.cometrics.io")

headers = {
    'Accept': "application/json",
    'Authorization': "Bearer {access-token}"
    }

conn.request("GET", "/api/stats/company-themes", headers=headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
require 'uri'
require 'net/http'
require 'openssl'

url = URI("https://app.cometrics.io/api/stats/company-themes")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net::HTTP::Get.new(url)
request["Accept"] = 'application/json'
request["Authorization"] = 'Bearer {access-token}'

response = http.request(request)
puts response.read_body

GET /api/stats/company-themes

Example responses

Responses

Status Meaning Description Schema
200 OK Successful response None

Response Schema

Platform Breakdown

Code samples

curl --request GET \
  --url https://app.cometrics.io/api/stats/platform-breakdown \
  --header 'Accept: application/json' \
  --header 'Authorization: Bearer {access-token}'
const data = null;

const xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://app.cometrics.io/api/stats/platform-breakdown");
xhr.setRequestHeader("Accept", "application/json");
xhr.setRequestHeader("Authorization", "Bearer {access-token}");

xhr.send(data);
package main

import (
    "fmt"
    "net/http"
    "io/ioutil"
)

func main() {

    url := "https://app.cometrics.io/api/stats/platform-breakdown"

    req, _ := http.NewRequest("GET", url, nil)

    req.Header.Add("Accept", "application/json")
    req.Header.Add("Authorization", "Bearer {access-token}")

    res, _ := http.DefaultClient.Do(req)

    defer res.Body.Close()
    body, _ := ioutil.ReadAll(res.Body)

    fmt.Println(res)
    fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.get("https://app.cometrics.io/api/stats/platform-breakdown")
  .header("Accept", "application/json")
  .header("Authorization", "Bearer {access-token}")
  .asString();
<?php

$curl = curl_init();

curl_setopt_array($curl, [
  CURLOPT_URL => "https://app.cometrics.io/api/stats/platform-breakdown",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
  CURLOPT_HTTPHEADER => [
    "Accept: application/json",
    "Authorization: Bearer {access-token}"
  ],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
import http.client

conn = http.client.HTTPSConnection("app.cometrics.io")

headers = {
    'Accept': "application/json",
    'Authorization': "Bearer {access-token}"
    }

conn.request("GET", "/api/stats/platform-breakdown", headers=headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
require 'uri'
require 'net/http'
require 'openssl'

url = URI("https://app.cometrics.io/api/stats/platform-breakdown")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net::HTTP::Get.new(url)
request["Accept"] = 'application/json'
request["Authorization"] = 'Bearer {access-token}'

response = http.request(request)
puts response.read_body

GET /api/stats/platform-breakdown

Parameters

Name In Type Required Description
company_id query integer false Required

Example responses

Responses

Status Meaning Description Schema
200 OK Successful response None

Response Schema

Theme Breakdown By Company

Code samples

curl --request GET \
  --url https://app.cometrics.io/api/stats/root-theme-breakdown \
  --header 'Accept: application/json' \
  --header 'Authorization: Bearer {access-token}'
const data = null;

const xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://app.cometrics.io/api/stats/root-theme-breakdown");
xhr.setRequestHeader("Accept", "application/json");
xhr.setRequestHeader("Authorization", "Bearer {access-token}");

xhr.send(data);
package main

import (
    "fmt"
    "net/http"
    "io/ioutil"
)

func main() {

    url := "https://app.cometrics.io/api/stats/root-theme-breakdown"

    req, _ := http.NewRequest("GET", url, nil)

    req.Header.Add("Accept", "application/json")
    req.Header.Add("Authorization", "Bearer {access-token}")

    res, _ := http.DefaultClient.Do(req)

    defer res.Body.Close()
    body, _ := ioutil.ReadAll(res.Body)

    fmt.Println(res)
    fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.get("https://app.cometrics.io/api/stats/root-theme-breakdown")
  .header("Accept", "application/json")
  .header("Authorization", "Bearer {access-token}")
  .asString();
<?php

$curl = curl_init();

curl_setopt_array($curl, [
  CURLOPT_URL => "https://app.cometrics.io/api/stats/root-theme-breakdown",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
  CURLOPT_HTTPHEADER => [
    "Accept: application/json",
    "Authorization: Bearer {access-token}"
  ],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
import http.client

conn = http.client.HTTPSConnection("app.cometrics.io")

headers = {
    'Accept': "application/json",
    'Authorization': "Bearer {access-token}"
    }

conn.request("GET", "/api/stats/root-theme-breakdown", headers=headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
require 'uri'
require 'net/http'
require 'openssl'

url = URI("https://app.cometrics.io/api/stats/root-theme-breakdown")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net::HTTP::Get.new(url)
request["Accept"] = 'application/json'
request["Authorization"] = 'Bearer {access-token}'

response = http.request(request)
puts response.read_body

GET /api/stats/root-theme-breakdown

Example responses

Responses

Status Meaning Description Schema
200 OK Successful response None

Response Schema

Code samples

curl --request GET \
  --url https://app.cometrics.io/api/stats/trending-themes \
  --header 'Accept: application/json' \
  --header 'Authorization: Bearer {access-token}'
const data = null;

const xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://app.cometrics.io/api/stats/trending-themes");
xhr.setRequestHeader("Accept", "application/json");
xhr.setRequestHeader("Authorization", "Bearer {access-token}");

xhr.send(data);
package main

import (
    "fmt"
    "net/http"
    "io/ioutil"
)

func main() {

    url := "https://app.cometrics.io/api/stats/trending-themes"

    req, _ := http.NewRequest("GET", url, nil)

    req.Header.Add("Accept", "application/json")
    req.Header.Add("Authorization", "Bearer {access-token}")

    res, _ := http.DefaultClient.Do(req)

    defer res.Body.Close()
    body, _ := ioutil.ReadAll(res.Body)

    fmt.Println(res)
    fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.get("https://app.cometrics.io/api/stats/trending-themes")
  .header("Accept", "application/json")
  .header("Authorization", "Bearer {access-token}")
  .asString();
<?php

$curl = curl_init();

curl_setopt_array($curl, [
  CURLOPT_URL => "https://app.cometrics.io/api/stats/trending-themes",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
  CURLOPT_HTTPHEADER => [
    "Accept: application/json",
    "Authorization: Bearer {access-token}"
  ],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
import http.client

conn = http.client.HTTPSConnection("app.cometrics.io")

headers = {
    'Accept': "application/json",
    'Authorization': "Bearer {access-token}"
    }

conn.request("GET", "/api/stats/trending-themes", headers=headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
require 'uri'
require 'net/http'
require 'openssl'

url = URI("https://app.cometrics.io/api/stats/trending-themes")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net::HTTP::Get.new(url)
request["Accept"] = 'application/json'
request["Authorization"] = 'Bearer {access-token}'

response = http.request(request)
puts response.read_body

GET /api/stats/trending-themes

Example responses

Status Meaning Description Schema
200 OK Successful response None