Verificar se o identificador existe e seu andamento
curl --request HEAD \
--url https://api.example.com/v1/batches/{batchId} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.example.com/v1/batches/{batchId}"
headers = {"Authorization": "Bearer <token>"}
response = requests.head(url, headers=headers)
print(response.text)const options = {method: 'HEAD', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.example.com/v1/batches/{batchId}', 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/v1/batches/{batchId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "HEAD",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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/v1/batches/{batchId}"
req, _ := http.NewRequest("HEAD", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.head("https://api.example.com/v1/batches/{batchId}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/v1/batches/{batchId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Head.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"errors": [
{
"code": "<string>",
"target": "<string>",
"message": "<string>"
}
]
}{
"errors": [
{
"code": "<string>",
"target": "<string>",
"message": "<string>"
}
]
}Batches
Verificar se o identificador existe e seu andamento
Verifica se um identificador de lote de tarefas em segundo plano existe e seu andamento.
HEAD
/
v1
/
batches
/
{batchId}
Verificar se o identificador existe e seu andamento
curl --request HEAD \
--url https://api.example.com/v1/batches/{batchId} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.example.com/v1/batches/{batchId}"
headers = {"Authorization": "Bearer <token>"}
response = requests.head(url, headers=headers)
print(response.text)const options = {method: 'HEAD', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.example.com/v1/batches/{batchId}', 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/v1/batches/{batchId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "HEAD",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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/v1/batches/{batchId}"
req, _ := http.NewRequest("HEAD", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.head("https://api.example.com/v1/batches/{batchId}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/v1/batches/{batchId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Head.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"errors": [
{
"code": "<string>",
"target": "<string>",
"message": "<string>"
}
]
}{
"errors": [
{
"code": "<string>",
"target": "<string>",
"message": "<string>"
}
]
}Parâmetros de caminho
Identificador do lote de tarefas
Resposta
O lote de tarefas em segundo plano está em andamento.
Esta página foi útil?
⌘I