Register or update credentials
curl --request POST \
--url https://crawler.prod.judit.io/credentials \
--header 'Content-Type: application/json' \
--header 'api-key: <api-key>' \
--data '
{
"credentials": [
{
"credential": {
"system_name": "PJE TJBA - 1º grau",
"customer_key": "00000001",
"username": "999.999.999-99",
"password": "Senha123"
}
}
]
}
'import requests
url = "https://crawler.prod.judit.io/credentials"
payload = { "credentials": [{ "credential": {
"system_name": "PJE TJBA - 1º grau",
"customer_key": "00000001",
"username": "999.999.999-99",
"password": "Senha123"
} }] }
headers = {
"api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
credentials: [
{
credential: {
system_name: 'PJE TJBA - 1º grau',
customer_key: '00000001',
username: '999.999.999-99',
password: 'Senha123'
}
}
]
})
};
fetch('https://crawler.prod.judit.io/credentials', 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://crawler.prod.judit.io/credentials",
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([
'credentials' => [
[
'credential' => [
'system_name' => 'PJE TJBA - 1º grau',
'customer_key' => '00000001',
'username' => '999.999.999-99',
'password' => 'Senha123'
]
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"api-key: <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://crawler.prod.judit.io/credentials"
payload := strings.NewReader("{\n \"credentials\": [\n {\n \"credential\": {\n \"system_name\": \"PJE TJBA - 1º grau\",\n \"customer_key\": \"00000001\",\n \"username\": \"999.999.999-99\",\n \"password\": \"Senha123\"\n }\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("api-key", "<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://crawler.prod.judit.io/credentials")
.header("api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"credentials\": [\n {\n \"credential\": {\n \"system_name\": \"PJE TJBA - 1º grau\",\n \"customer_key\": \"00000001\",\n \"username\": \"999.999.999-99\",\n \"password\": \"Senha123\"\n }\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://crawler.prod.judit.io/credentials")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"credentials\": [\n {\n \"credential\": {\n \"system_name\": \"PJE TJBA - 1º grau\",\n \"customer_key\": \"00000001\",\n \"username\": \"999.999.999-99\",\n \"password\": \"Senha123\"\n }\n }\n ]\n}"
response = http.request(request)
puts response.read_body[
{
"system_name": "PJEINTER TJBA - 1º grau",
"customer_key": "00000001",
"message": "CREDENTIAL_CREATED"
},
{
"system_name": "PJE TJMT - 1º grau",
"customer_key": "00000001",
"message": "CREDENTIAL_CREATED"
},
{
"system_name": "PJE TJBA - 2º grau",
"customer_key": "00000001",
"message": "CREDENTIAL_CREATED"
},
{
"system_name": "PJEINTER TJMT - 1º grau",
"customer_key": "00000001",
"message": "CREDENTIAL_CREATED"
},
{
"system_name": "PROJUDI TJBA - 1º grau",
"customer_key": "00000001",
"message": "CREDENTIAL_CREATED"
},
{
"system_name": "PJE TJBA - 1º grau",
"customer_key": "00000001",
"message": "CREDENTIAL_CREATED"
},
{
"system_name": "PJE TJMT - 2º grau",
"customer_key": "00000001",
"message": "CREDENTIAL_CREATED"
},
{
"system_name": "PROJUDI TJBA - 2º grau",
"customer_key": "00000001",
"message": "CREDENTIAL_CREATED"
}
]
Credentials Vault
Credential Registration
To register a credential or update an existing one, use the route below.
POST
/
credentials
Register or update credentials
curl --request POST \
--url https://crawler.prod.judit.io/credentials \
--header 'Content-Type: application/json' \
--header 'api-key: <api-key>' \
--data '
{
"credentials": [
{
"credential": {
"system_name": "PJE TJBA - 1º grau",
"customer_key": "00000001",
"username": "999.999.999-99",
"password": "Senha123"
}
}
]
}
'import requests
url = "https://crawler.prod.judit.io/credentials"
payload = { "credentials": [{ "credential": {
"system_name": "PJE TJBA - 1º grau",
"customer_key": "00000001",
"username": "999.999.999-99",
"password": "Senha123"
} }] }
headers = {
"api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
credentials: [
{
credential: {
system_name: 'PJE TJBA - 1º grau',
customer_key: '00000001',
username: '999.999.999-99',
password: 'Senha123'
}
}
]
})
};
fetch('https://crawler.prod.judit.io/credentials', 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://crawler.prod.judit.io/credentials",
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([
'credentials' => [
[
'credential' => [
'system_name' => 'PJE TJBA - 1º grau',
'customer_key' => '00000001',
'username' => '999.999.999-99',
'password' => 'Senha123'
]
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"api-key: <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://crawler.prod.judit.io/credentials"
payload := strings.NewReader("{\n \"credentials\": [\n {\n \"credential\": {\n \"system_name\": \"PJE TJBA - 1º grau\",\n \"customer_key\": \"00000001\",\n \"username\": \"999.999.999-99\",\n \"password\": \"Senha123\"\n }\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("api-key", "<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://crawler.prod.judit.io/credentials")
.header("api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"credentials\": [\n {\n \"credential\": {\n \"system_name\": \"PJE TJBA - 1º grau\",\n \"customer_key\": \"00000001\",\n \"username\": \"999.999.999-99\",\n \"password\": \"Senha123\"\n }\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://crawler.prod.judit.io/credentials")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"credentials\": [\n {\n \"credential\": {\n \"system_name\": \"PJE TJBA - 1º grau\",\n \"customer_key\": \"00000001\",\n \"username\": \"999.999.999-99\",\n \"password\": \"Senha123\"\n }\n }\n ]\n}"
response = http.request(request)
puts response.read_body[
{
"system_name": "PJEINTER TJBA - 1º grau",
"customer_key": "00000001",
"message": "CREDENTIAL_CREATED"
},
{
"system_name": "PJE TJMT - 1º grau",
"customer_key": "00000001",
"message": "CREDENTIAL_CREATED"
},
{
"system_name": "PJE TJBA - 2º grau",
"customer_key": "00000001",
"message": "CREDENTIAL_CREATED"
},
{
"system_name": "PJEINTER TJMT - 1º grau",
"customer_key": "00000001",
"message": "CREDENTIAL_CREATED"
},
{
"system_name": "PROJUDI TJBA - 1º grau",
"customer_key": "00000001",
"message": "CREDENTIAL_CREATED"
},
{
"system_name": "PJE TJBA - 1º grau",
"customer_key": "00000001",
"message": "CREDENTIAL_CREATED"
},
{
"system_name": "PJE TJMT - 2º grau",
"customer_key": "00000001",
"message": "CREDENTIAL_CREATED"
},
{
"system_name": "PROJUDI TJBA - 2º grau",
"customer_key": "00000001",
"message": "CREDENTIAL_CREATED"
}
]
array
Important notes about credential registration
Important notes about credential registration
Wildcard Credential: *If you register a credential under it, every court that does not have its own specific credential will use the wildcard credential.If no customer_key is provided, an empty customer_key will be created.username and password as empty.
[
{
"system_name": "PJEINTER TJBA - 1º grau",
"customer_key": "00000001",
"message": "CREDENTIAL_CREATED"
},
{
"system_name": "PJE TJMT - 1º grau",
"customer_key": "00000001",
"message": "CREDENTIAL_CREATED"
},
{
"system_name": "PJE TJBA - 2º grau",
"customer_key": "00000001",
"message": "CREDENTIAL_CREATED"
},
{
"system_name": "PJEINTER TJMT - 1º grau",
"customer_key": "00000001",
"message": "CREDENTIAL_CREATED"
},
{
"system_name": "PROJUDI TJBA - 1º grau",
"customer_key": "00000001",
"message": "CREDENTIAL_CREATED"
},
{
"system_name": "PJE TJBA - 1º grau",
"customer_key": "00000001",
"message": "CREDENTIAL_CREATED"
},
{
"system_name": "PJE TJMT - 2º grau",
"customer_key": "00000001",
"message": "CREDENTIAL_CREATED"
},
{
"system_name": "PROJUDI TJBA - 2º grau",
"customer_key": "00000001",
"message": "CREDENTIAL_CREATED"
}
]
CREDENTIAL_UPDATED.Authorizations
API key for authentication
Body
application/json
Show child attributes
Show child attributes
Was this page helpful?
⌘I