Lister les liens
curl --request GET \
--url https://api.taap.it/v1/links \
--header 'Authorization: <authorization>'import requests
url = "https://api.taap.it/v1/links"
headers = {"Authorization": "<authorization>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: '<authorization>'}};
fetch('https://api.taap.it/v1/links', 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.taap.it/v1/links",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: <authorization>"
],
]);
$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.taap.it/v1/links"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "<authorization>")
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.taap.it/v1/links")
.header("Authorization", "<authorization>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.taap.it/v1/links")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = '<authorization>'
response = http.request(request)
puts response.read_bodyAPI Links
Lister les liens
Récupérer une liste de tous les liens dans un espace de travail
GET
/
v1
/
links
Lister les liens
curl --request GET \
--url https://api.taap.it/v1/links \
--header 'Authorization: <authorization>'import requests
url = "https://api.taap.it/v1/links"
headers = {"Authorization": "<authorization>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: '<authorization>'}};
fetch('https://api.taap.it/v1/links', 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.taap.it/v1/links",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: <authorization>"
],
]);
$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.taap.it/v1/links"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "<authorization>")
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.taap.it/v1/links")
.header("Authorization", "<authorization>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.taap.it/v1/links")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = '<authorization>'
response = http.request(request)
puts response.read_bodyRécupérer tous les liens avec des options de pagination et de filtrage.
Requête :
Réponse :
cURL
curl -X GET 'https://api.taap.it/v1/links?archived=false&sort_by=created_at&sort_order=desc&page=1&page_size=20&cursor=eyJpZCI6ImxpbmtfOTg3NjU0MzIxIn0=' \
-H 'Authorization: Bearer taapit_your_api_key_here'
{
"items": [
{
"id": "link_987654321",
"original_url": "https://example.com/very-long-url-that-needs-shortening",
"short_url": "https://taapit.com/my-custom-link",
"code": "my-custom-link",
"created_at": "2024-01-15T10:30:00Z",
"click_count": 42,
"is_active": true,
"is_archived": false
}
],
"page": 1,
"page_size": 10,
"has_next": true,
"has_prev": false,
"next_cursor": "eyJpZCI6ImxpbmtfOTg3NjU0MzIxIn0=",
"prev_cursor": null
}
Autorisation
string
requis
Token Bearer pour l’authentification API. Format :
Bearer YOUR_API_KEYParamètres de requête
Paramètres de pagination
string
Curseur pour la pagination (utiliser pour une pagination efficace)
integer
défaut:"1"
Numéro de page (commence à 1)
integer
défaut:"20"
Nombre d’éléments par page (maximum 100)
Paramètres de tri
string
Champ de tri (e.g., “created_at”, “updated_at”, “clicks”, “code”)
string
défaut:"desc"
Ordre de tri: “asc” pour croissant ou “desc” pour décroissant
Paramètres de filtrage
boolean
Filtrer par statut d’archivage (true pour les liens archivés, false pour les liens actifs)