Preview filter changes
curl --request POST \
--url https://api.vollna.com/v1/filters/{id}/preview \
--header 'Content-Type: application/json' \
--header 'X-API-TOKEN: <api-key>' \
--data '{
"patch": {}
}'import requests
url = "https://api.vollna.com/v1/filters/{id}/preview"
payload = { "patch": {} }
headers = {
"X-API-TOKEN": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-TOKEN': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({patch: {}})
};
fetch('https://api.vollna.com/v1/filters/{id}/preview', 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.vollna.com/v1/filters/{id}/preview",
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([
'patch' => [
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-TOKEN: <api-key>"
],
]);
$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.vollna.com/v1/filters/{id}/preview"
payload := strings.NewReader("{\n \"patch\": {}\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-API-TOKEN", "<api-key>")
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.vollna.com/v1/filters/{id}/preview")
.header("X-API-TOKEN", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"patch\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.vollna.com/v1/filters/{id}/preview")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-TOKEN"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"patch\": {}\n}"
response = http.request(request)
puts response.read_body{
"data": {
"filterId": 123,
"changedFields": [
"<string>"
],
"days": 30,
"jobs": 123,
"avgPerDay": 123,
"currentJobs": 123,
"currentAvgPerDay": 123,
"sampleJobs": [
{
"projectId": 123,
"title": "<string>",
"url": "<string>",
"publishedAt": "2023-11-07T05:31:56Z",
"budget": {
"type": "<string>",
"amount": "<string>"
}
}
]
}
}{
"error": "Validation failed",
"message": "<string>",
"fields": {}
}{
"error": "<string>"
}{
"error": "Validation failed",
"message": "<string>",
"fields": {}
}{
"error": "Validation failed",
"message": "<string>",
"fields": {}
}{
"error": "Validation failed",
"message": "<string>",
"fields": {}
}{
"error": "Validation failed",
"message": "<string>",
"fields": {}
}Filters
Preview filter changes
Shows what a criteria change would match before you save it: jobs over the last 30 days with the change and without it, and the 5 newest jobs the changed filter would show. Saves nothing. Counts against the daily filter_preview cap. The sample jobs use project credits
POST
/
filters
/
{id}
/
preview
Preview filter changes
curl --request POST \
--url https://api.vollna.com/v1/filters/{id}/preview \
--header 'Content-Type: application/json' \
--header 'X-API-TOKEN: <api-key>' \
--data '{
"patch": {}
}'import requests
url = "https://api.vollna.com/v1/filters/{id}/preview"
payload = { "patch": {} }
headers = {
"X-API-TOKEN": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-TOKEN': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({patch: {}})
};
fetch('https://api.vollna.com/v1/filters/{id}/preview', 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.vollna.com/v1/filters/{id}/preview",
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([
'patch' => [
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-TOKEN: <api-key>"
],
]);
$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.vollna.com/v1/filters/{id}/preview"
payload := strings.NewReader("{\n \"patch\": {}\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-API-TOKEN", "<api-key>")
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.vollna.com/v1/filters/{id}/preview")
.header("X-API-TOKEN", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"patch\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.vollna.com/v1/filters/{id}/preview")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-TOKEN"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"patch\": {}\n}"
response = http.request(request)
puts response.read_body{
"data": {
"filterId": 123,
"changedFields": [
"<string>"
],
"days": 30,
"jobs": 123,
"avgPerDay": 123,
"currentJobs": 123,
"currentAvgPerDay": 123,
"sampleJobs": [
{
"projectId": 123,
"title": "<string>",
"url": "<string>",
"publishedAt": "2023-11-07T05:31:56Z",
"budget": {
"type": "<string>",
"amount": "<string>"
}
}
]
}
}{
"error": "Validation failed",
"message": "<string>",
"fields": {}
}{
"error": "<string>"
}{
"error": "Validation failed",
"message": "<string>",
"fields": {}
}{
"error": "Validation failed",
"message": "<string>",
"fields": {}
}{
"error": "Validation failed",
"message": "<string>",
"fields": {}
}{
"error": "Validation failed",
"message": "<string>",
"fields": {}
}Was this page helpful?