Job config (secrets stripped)
curl --request GET \
--url https://api.example.com/api/v1/jobs/{name}/config \
--cookie snapr_session=import requests
url = "https://api.example.com/api/v1/jobs/{name}/config"
headers = {"cookie": "snapr_session="}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {cookie: 'snapr_session='}};
fetch('https://api.example.com/api/v1/jobs/{name}/config', 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.example.com/api/v1/jobs/{name}/config",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_COOKIE => "snapr_session=",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/api/v1/jobs/{name}/config"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("cookie", "snapr_session=")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.example.com/api/v1/jobs/{name}/config")
.header("cookie", "snapr_session=")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/v1/jobs/{name}/config")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["cookie"] = 'snapr_session='
response = http.request(request)
puts response.read_body{
"config": {
"name": "<string>",
"schedule": "<string>",
"compression": "<string>",
"defaultStorage": "<string>",
"encryption": {
"cipher": "<string>",
"type": "<string>"
},
"hasAfterScript": true,
"hasBeforeScript": true,
"notifiers": [
{
"onFailure": true,
"onSuccess": true,
"type": "<string>",
"chatId": "<string>",
"from": "<string>",
"name": "<string>",
"smtpHost": "<string>",
"to": [
"<string>"
],
"urlHost": "<string>"
}
],
"retention": {
"last": 123
},
"sources": [
{
"type": "<string>",
"allDatabases": true,
"database": "<string>",
"endpoint": "<string>",
"excludeTables": [
"<string>"
],
"excludes": [
"<string>"
],
"extraParams": {},
"hasUri": true,
"host": "<string>",
"oplog": true,
"path": "<string>",
"port": 123,
"syncPath": "<string>",
"tables": [
"<string>"
],
"username": "<string>",
"zoneName": "<string>"
}
],
"split": {
"chunkSize": "<string>"
},
"storages": [
{
"name": "<string>",
"type": "<string>",
"bucket": "<string>",
"endpoint": "<string>",
"hasKnownHosts": true,
"hasPrivateKey": true,
"hasUrl": true,
"host": "<string>",
"path": "<string>",
"port": 123,
"pullZoneHostname": "<string>",
"region": "<string>",
"storageClass": "<string>",
"strictHostKey": true,
"urlHost": "<string>",
"username": "<string>",
"zoneName": "<string>"
}
]
},
"job": "<string>"
}{
"detail": "Property foo is required but is missing.",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
],
"instance": "https://example.com/error-log/abc123",
"status": 400,
"title": "Bad Request",
"type": "https://example.com/errors/example"
}Jobs
Job config (secrets stripped)
When server.permissions.showConfig is false, only name and schedule are returned.
GET
/
api
/
v1
/
jobs
/
{name}
/
config
Job config (secrets stripped)
curl --request GET \
--url https://api.example.com/api/v1/jobs/{name}/config \
--cookie snapr_session=import requests
url = "https://api.example.com/api/v1/jobs/{name}/config"
headers = {"cookie": "snapr_session="}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {cookie: 'snapr_session='}};
fetch('https://api.example.com/api/v1/jobs/{name}/config', 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.example.com/api/v1/jobs/{name}/config",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_COOKIE => "snapr_session=",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/api/v1/jobs/{name}/config"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("cookie", "snapr_session=")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.example.com/api/v1/jobs/{name}/config")
.header("cookie", "snapr_session=")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/v1/jobs/{name}/config")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["cookie"] = 'snapr_session='
response = http.request(request)
puts response.read_body{
"config": {
"name": "<string>",
"schedule": "<string>",
"compression": "<string>",
"defaultStorage": "<string>",
"encryption": {
"cipher": "<string>",
"type": "<string>"
},
"hasAfterScript": true,
"hasBeforeScript": true,
"notifiers": [
{
"onFailure": true,
"onSuccess": true,
"type": "<string>",
"chatId": "<string>",
"from": "<string>",
"name": "<string>",
"smtpHost": "<string>",
"to": [
"<string>"
],
"urlHost": "<string>"
}
],
"retention": {
"last": 123
},
"sources": [
{
"type": "<string>",
"allDatabases": true,
"database": "<string>",
"endpoint": "<string>",
"excludeTables": [
"<string>"
],
"excludes": [
"<string>"
],
"extraParams": {},
"hasUri": true,
"host": "<string>",
"oplog": true,
"path": "<string>",
"port": 123,
"syncPath": "<string>",
"tables": [
"<string>"
],
"username": "<string>",
"zoneName": "<string>"
}
],
"split": {
"chunkSize": "<string>"
},
"storages": [
{
"name": "<string>",
"type": "<string>",
"bucket": "<string>",
"endpoint": "<string>",
"hasKnownHosts": true,
"hasPrivateKey": true,
"hasUrl": true,
"host": "<string>",
"path": "<string>",
"port": 123,
"pullZoneHostname": "<string>",
"region": "<string>",
"storageClass": "<string>",
"strictHostKey": true,
"urlHost": "<string>",
"username": "<string>",
"zoneName": "<string>"
}
]
},
"job": "<string>"
}{
"detail": "Property foo is required but is missing.",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
],
"instance": "https://example.com/error-log/abc123",
"status": 400,
"title": "Bad Request",
"type": "https://example.com/errors/example"
}⌘I