GET
https://api.app.athenic.com/api/projects
The Athenic AI API uses API keys to authenticate requests. You can view your API keys in the Athenic AI dashboard.
Projects must be created in the application. This API request will retrieve IDs and names for all projects owned by your team. You can then use any project_id to query that project.
200: OK
project_names : A dictionary of projects by their ID. Projects have a name attribute.
Copy {
"project_id_example" : {
"name" : "My Project" ,
"is_owner" : true ,
"created_at" : "Oct 06, 2023"
}
}
Request:
Python CURL Java Node.JS PHP
Copy import http . client
conn = http . client . HTTPSConnection ( "api.app.athenic.com" )
headers = { 'Authorization': "Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJrIjoiQjZSU0lpRTkifQ.p54KkQWA0icjiKusC6-Odhuii_Y9vbZeaNsJN5PBbEs" }
conn . request ( "GET" , "/api/projects" , "" , headers)
res = conn . getresponse ()
data = res . read ()
print (data. decode ( "utf-8" ))
Copy curl --request GET \
--url https://api.askedith.ai/api/projects \
--header 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJrIjoiQjZSU0lpRTkifQ.p54KkQWA0icjiKusC6-Odhuii_Y9vbZeaNsJN5PBbEs'
Copy HttpResponse < String > response = Unirest . get ( "https://api.askedith.ai/api/projects" )
.header("Authorization", "Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJrIjoiQjZSU0lpRTkifQ.p54KkQWA0icjiKusC6-Odhuii_Y9vbZeaNsJN5PBbEs")
. asString ();
Copy var request = require ( "request" );
var options = { method : 'GET' ,
url : 'https://api.askedith.ai/api/projects' ,
headers: { 'Authorization': 'Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJrIjoiQjZSU0lpRTkifQ.p54KkQWA0icjiKusC6-Odhuii_Y9vbZeaNsJN5PBbEs' },
};
request (options , function (error , response , body) {
if (error) throw new Error (error);
console .log (body);
});
Copy $curl = curl_init () ;
curl_setopt_array ( $curl , array(
CURLOPT_URL => "https://api.askedith.ai/api/projects" ,
CURLOPT_RETURNTRANSFER => true ,
CURLOPT_ENCODING => "" ,
CURLOPT_MAXREDIRS => 10 ,
CURLOPT_TIMEOUT => 30 ,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1 ,
CURLOPT_CUSTOMREQUEST => "GET" ,
CURLOPT_HTTPHEADER => array(
"Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJrIjoiQjZSU0lpRTkifQ.p54KkQWA0icjiKusC6-Odhuii_Y9vbZeaNsJN5PBbEs"
) ,
) ) ;
$response = curl_exec ( $curl ) ;
$err = curl_error ( $curl ) ;
curl_close ( $curl ) ;
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
Last updated 6 months ago