Récupérer la tâche de recommandations SEO
curl --request GET \
--url https://api.athenahq.ai/api/v1/seo/recommendations/{job_id} \
--header 'x-api-key: <api-key>'import requests
url = "https://api.athenahq.ai/api/v1/seo/recommendations/{job_id}"
headers = {"x-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://api.athenahq.ai/api/v1/seo/recommendations/{job_id}', 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.athenahq.ai/api/v1/seo/recommendations/{job_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"x-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"
"net/http"
"io"
)
func main() {
url := "https://api.athenahq.ai/api/v1/seo/recommendations/{job_id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<api-key>")
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.athenahq.ai/api/v1/seo/recommendations/{job_id}")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.athenahq.ai/api/v1/seo/recommendations/{job_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"job_id": "<string>",
"status": "pending",
"created_at": "<string>",
"completed_at": "<string>",
"result": {
"contract_version": "seo-recommendations/v1",
"source_digest": "<string>",
"recommendations": [
{
"id": "<string>",
"priority": "high",
"category": "seo",
"title": "<string>",
"change": "<string>",
"evidence": "<string>",
"heading_path": [
"<string>"
]
}
],
"usage": {
"input_characters": 123,
"input_tokens": 123,
"output_tokens": 123,
"provider_cost_usd": 123,
"cost_status": "unavailable"
},
"warnings": [
"<string>"
]
},
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}Recommandations SEO
Récupérer la tâche de recommandations SEO
Lit une tâche enregistrée avec accès en consultation du contenu (lecteur ou supérieur). Les résultats peuvent contenir les éléments de brouillons soumis. Un résultat terminé inclut recommandations fondées sur les sources, source_digest, consommation de jetons et avertissements. Le coût monétaire est explicitement indisponible. Les tâches attendent la capacité des workers ; le temps en file ne fait pas expirer une analyse. Un worker en échec renvoie une erreur structurée ; soumettez un nouveau request_id pour réessayer. Interrogez un sous-ensemble borné et espacez si pending ; le suivi partage le budget API de l’organisation.
GET
/
api
/
v1
/
seo
/
recommendations
/
{job_id}
Récupérer la tâche de recommandations SEO
curl --request GET \
--url https://api.athenahq.ai/api/v1/seo/recommendations/{job_id} \
--header 'x-api-key: <api-key>'import requests
url = "https://api.athenahq.ai/api/v1/seo/recommendations/{job_id}"
headers = {"x-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://api.athenahq.ai/api/v1/seo/recommendations/{job_id}', 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.athenahq.ai/api/v1/seo/recommendations/{job_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"x-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"
"net/http"
"io"
)
func main() {
url := "https://api.athenahq.ai/api/v1/seo/recommendations/{job_id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<api-key>")
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.athenahq.ai/api/v1/seo/recommendations/{job_id}")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.athenahq.ai/api/v1/seo/recommendations/{job_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"job_id": "<string>",
"status": "pending",
"created_at": "<string>",
"completed_at": "<string>",
"result": {
"contract_version": "seo-recommendations/v1",
"source_digest": "<string>",
"recommendations": [
{
"id": "<string>",
"priority": "high",
"category": "seo",
"title": "<string>",
"change": "<string>",
"evidence": "<string>",
"heading_path": [
"<string>"
]
}
],
"usage": {
"input_characters": 123,
"input_tokens": 123,
"output_tokens": 123,
"provider_cost_usd": 123,
"cost_status": "unavailable"
},
"warnings": [
"<string>"
]
},
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}Paramètres de chemin
Paramètres de requête
Cette page vous a-t-elle été utile ?