Télécharger
Importer dans Postman
- Ouvrez Postman et cliquez sur Importer en haut à gauche.
- Faites glisser et déposez le fichier openapi.yaml ou collez l'URL : https://api.fs.ax/openapi.yaml
- Postman génèrera une collection complète avec tous les endpoints, paramètres et exemples de réponses.
- Définissez la variable Authorization sur votre clé API et commencez les tests.
Générer un client
Utilisez OpenAPI Generator pour créer un client typé dans 50+ langages :
# Install the generator
npm install -g @openapitools/openapi-generator-cli
# Generate a TypeScript client
openapi-generator-cli generate \
-i https://api.fs.ax/openapi.yaml \
-g typescript-fetch \
-o ./fsax-client
# Generate a Python client
openapi-generator-cli generate \
-i https://api.fs.ax/openapi.yaml \
-g python \
-o ./fsax-python-client
# Generate a Go client
openapi-generator-cli generate \
-i https://api.fs.ax/openapi.yaml \
-g go \
-o ./fsax-go-clientAperçu de la spécification
Voici un extrait de la spécification :
openapi: "3.1.0"
info:
title: fs.ax API
version: "1.0.0"
description: URL shortener with built-in monetization
contact:
email: api@fs.ax
servers:
- url: https://api.fs.ax/v1
description: Production
paths:
/links:
post:
summary: Create a short link
operationId: createLink
tags: [Links]
security:
- bearerAuth: []
requestBody:
required: true
content:
application/json:
schema:
$ref: "#/components/schemas/CreateLinkRequest"
responses:
"201":
description: Link created
content:
application/json:
schema:
$ref: "#/components/schemas/Link"Toujours à jour. La spécification est générée automatiquement à partir de notre code source Rust, donc elle correspond toujours exactement à l'API en production.
Besoin d'aide ? Consultez la documentation API ou contactez-nous à api@fs.ax.