curl " https://api.playground.try.be/shop/reports/organisation/authentication-log/queue?date_from=2019-01-01&date_to=2019-12-31 " \
-H " Authorization: Bearer YOUR_API_KEY " \
-H " Accept: application/json " const response = await fetch ( ' https://api.playground.try.be/shop/reports/organisation/authentication-log/queue?date_from=2019-01-01&date_to=2019-12-31 ' , {
method : ' GET ' ,
headers : {
Authorization : ' Bearer YOUR_API_KEY ' ,
Accept : ' application/json ' ,
},
} )
if ( ! response . ok ) {
throw new Error ( ` Trybe API ${ response . status } : ${ await response . text () }` )
}
const data = await response . json () import httpx
response = httpx . get (
" https://api.playground.try.be/shop/reports/organisation/authentication-log/queue?date_from=2019-01-01&date_to=2019-12-31 " ,
headers = {
" Authorization " : " Bearer YOUR_API_KEY " ,
" Accept " : " application/json " ,
},
)
response . raise_for_status ()
data = response . json () <? php
$ client = new \ GuzzleHttp \ Client ();
$ response = $ client -> request ( ' GET ' , ' https://api.playground.try.be/shop/reports/organisation/authentication-log/queue?date_from=2019-01-01&date_to=2019-12-31 ' , [
' headers ' => [
' Authorization ' => ' Bearer YOUR_API_KEY ' ,
' Accept ' => ' application/json ' ,
],
]);
$ data = json_decode ($ response -> getBody (), true ); package main
import (
" encoding/json "
" net/http "
)
func main () {
req , _ := http . NewRequest ( " GET " , " https://api.playground.try.be/shop/reports/organisation/authentication-log/queue?date_from=2019-01-01&date_to=2019-12-31 " , nil )
req . Header . Set ( " Authorization " , " Bearer YOUR_API_KEY " )
req . Header . Set ( " Accept " , " application/json " )
resp , err := http . DefaultClient . Do ( req )
if err != nil {
panic ( err )
}
defer resp . Body . Close ()
var data map [ string ] interface {}
json . NewDecoder ( resp . Body ). Decode ( & data )
} 200 400 401
The job was successfully queued
{
" data " : {
" id " : " 00000000-0000-0000-0000-000000000000 " ,
" status " : " pending " ,
" output " : {},
" created_at " : " 2023-11-07T00:00:00+00:00 " ,
" updated_at " : " 2023-11-07T01:00:00+00:00 "
}
} {
" message " : " Unauthenticated "
}