Skip to main content
POST
/
api
/
v1
/
reports
/
{id}
/
filter
/
Filter
curl --request POST \
  --url https://api.main.apexscore.ai/api/v1/reports/{id}/filter/ \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "asynchronous": true,
  "configuration_id": "2a822a99-2ffd-459d-bf1f-5c0f187b90bc",
  "filters": [
    {
      "dataset_filterable_id": "6c58243e-f4ce-4295-abd8-d7d6df94996d",
      "value": [
        "55-64",
        "45-54"
      ]
    }
  ]
}
'
import requests

url = "https://api.main.apexscore.ai/api/v1/reports/{id}/filter/"

payload = {
"asynchronous": True,
"configuration_id": "2a822a99-2ffd-459d-bf1f-5c0f187b90bc",
"filters": [
{
"dataset_filterable_id": "6c58243e-f4ce-4295-abd8-d7d6df94996d",
"value": ["55-64", "45-54"]
}
]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.text)
const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
asynchronous: true,
configuration_id: '2a822a99-2ffd-459d-bf1f-5c0f187b90bc',
filters: [
{
dataset_filterable_id: '6c58243e-f4ce-4295-abd8-d7d6df94996d',
value: ['55-64', '45-54']
}
]
})
};

fetch('https://api.main.apexscore.ai/api/v1/reports/{id}/filter/', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
<?php

$curl = curl_init();

curl_setopt_array($curl, [
CURLOPT_URL => "https://api.main.apexscore.ai/api/v1/reports/{id}/filter/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'asynchronous' => true,
'configuration_id' => '2a822a99-2ffd-459d-bf1f-5c0f187b90bc',
'filters' => [
[
'dataset_filterable_id' => '6c58243e-f4ce-4295-abd8-d7d6df94996d',
'value' => [
'55-64',
'45-54'
]
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <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;
}
package main

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

func main() {

url := "https://api.main.apexscore.ai/api/v1/reports/{id}/filter/"

payload := strings.NewReader("{\n \"asynchronous\": true,\n \"configuration_id\": \"2a822a99-2ffd-459d-bf1f-5c0f187b90bc\",\n \"filters\": [\n {\n \"dataset_filterable_id\": \"6c58243e-f4ce-4295-abd8-d7d6df94996d\",\n \"value\": [\n \"55-64\",\n \"45-54\"\n ]\n }\n ]\n}")

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

req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")

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

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

fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.post("https://api.main.apexscore.ai/api/v1/reports/{id}/filter/")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"asynchronous\": true,\n \"configuration_id\": \"2a822a99-2ffd-459d-bf1f-5c0f187b90bc\",\n \"filters\": [\n {\n \"dataset_filterable_id\": \"6c58243e-f4ce-4295-abd8-d7d6df94996d\",\n \"value\": [\n \"55-64\",\n \"45-54\"\n ]\n }\n ]\n}")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.main.apexscore.ai/api/v1/reports/{id}/filter/")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"asynchronous\": true,\n \"configuration_id\": \"2a822a99-2ffd-459d-bf1f-5c0f187b90bc\",\n \"filters\": [\n {\n \"dataset_filterable_id\": \"6c58243e-f4ce-4295-abd8-d7d6df94996d\",\n \"value\": [\n \"55-64\",\n \"45-54\"\n ]\n }\n ]\n}"

response = http.request(request)
puts response.read_body
{
  "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "name": "<string>",
  "mona_version": {
    "id": 123,
    "name": "<string>",
    "audience": "<string>",
    "sequence": -1,
    "audience_type": 1
  },
  "comments": "<string>",
  "dataset": {
    "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "configurations": {
      "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "comments": "<string>",
      "content_pages": [
        {
          "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
          "title": "<string>",
          "created_by": {
            "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
            "full_name": "<string>",
            "email": "jsmith@example.com",
            "first_name": "<string>",
            "last_name": "<string>"
          },
          "icon": "<string>"
        }
      ],
      "filters": [
        {
          "filterable": {
            "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
            "name": "<string>"
          },
          "value": "<unknown>",
          "operator": "<string>"
        }
      ],
      "result": {
        "state": {
          "status_message": "<string>",
          "observations_data_pending": "<string>",
          "text_analysis_data_pending": "<string>"
        },
        "apex_score": 0,
        "potential_apex_score": 0,
        "value_boxes": [
          {
            "name": "<string>",
            "value": "<string>",
            "icon": "<string>",
            "impact_description": "<string>",
            "description": "<string>"
          }
        ],
        "rank": {
          "id": 123,
          "name": "<string>",
          "description": "<string>",
          "minimum_differential": -1,
          "audience_type": 123,
          "mona_version": 123
        },
        "opportunity_driver_categories": {},
        "fba": {},
        "ppp": {},
        "analyses": {},
        "benchmark": {},
        "misc": {},
        "attitudes": [
          {
            "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
            "attitude_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
            "keyword": "<string>",
            "description": "<string>",
            "explanation": "<string>",
            "seol": "<string>",
            "performance_rebased": 0,
            "importance_rebased": 0,
            "performance_agreed": 0,
            "importance_agreed": 0,
            "fulfillment_balance": 0,
            "fulfillment_ratio": 0,
            "content_icon_url": "<string>",
            "comments": {
              "count": 123,
              "commenters": [
                {
                  "full_name": "<string>"
                }
              ]
            },
            "content_recommendations": [
              {
                "header": "<string>",
                "subtext": "<string>",
                "example": "<string>",
                "why": "<string>"
              }
            ],
            "content_studies": [
              {
                "title": "<string>",
                "link": "<string>"
              }
            ],
            "performance_order": -1,
            "importance_order": -1
          }
        ],
        "population_size": -1
      },
      "filterables": [
        {
          "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
          "name": "<string>"
        }
      ],
      "name": "<string>",
      "is_primary": true,
      "copied_from": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "industry_configuration": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
    }
  },
  "issued_at": "2023-11-07T05:31:56Z",
  "meta": null
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

id
string<uuid>
required

A UUID string identifying this report.

Body

application/json
configuration_id
string<uuid>
required
filters
object[]
required
asynchronous
boolean
default:false
use_cache
boolean
default:true

Response

200 - application/json
id
string<uuid>
required
read-only
name
string
required
Maximum string length: 255
mona_version
object
required
comments
string
required
read-only
dataset
object
required
tags
  • competitive - Competitive
  • segment - Segment
  • industry - Industry
Available options:
competitive,
segment,
industry
issued_at
string<date-time>
meta
unknown