Firmen-API
Beispielfirmen; Mitarbeitende sind über companyId mit ihnen verknüpft. Feste Daten im Speicher: Schreibzugriffe halten bis zum Neustart der App.
- GET
https://api.testingapis.com/api/CompaniesList companies with filtering, sorting, search and pagination. - POST
https://api.testingapis.com/api/CompaniesCreate a company. - GETHEAD
https://api.testingapis.com/api/Companies/{id}Get a company by ID (HEAD returns the headers only). - PUT
https://api.testingapis.com/api/Companies/{id}Replace a company. - PATCH
https://api.testingapis.com/api/Companies/{id}Partially update a company with a JSON merge patch. - DELETE
https://api.testingapis.com/api/Companies/{id}Delete a company. - GET
https://api.testingapis.com/api/Companies/{id}/employeesList a company's employees. - POST
https://api.testingapis.com/api/Companies/bulkCreate up to 100 companies in one request. - DELETE
https://api.testingapis.com/api/Companies/bulkDelete several companies by ID. - GET
https://api.testingapis.com/api/Companies/countCount all companies.
Beispiel-Request
List companies with filtering, sorting, search and pagination. Vollständige Referenz und Send-Button (auf Englisch).
cURL
curl -X GET "https://api.testingapis.com/api/Companies?limit=2"Antwort · 200 OK
[
{
"id": 1,
"name": "Nimbus Cloud Systems",
"industry": "Technology",
"founded": 2008,
"website": "https://nimbuscloud.example.com",
"headquarters": {"city": "San Francisco", "country": "USA"},
"revenue": 1250000000,
"employeeCount": 4200
},
{
… (3 more lines)Filtern, Sortieren und Paginierung
Der Listen-Endpunkt nimmt limit, page, offset, sort, order und q an, dazu jeden Feldnamen als exakten Filter. Die Gesamtzahl kommt im Header X-Total-Count zurück. Schreibzugriffe bleiben bis zum Neustart des Servers im Speicher, Tests können also frei Datensätze anlegen, ändern und löschen. Referenz der Query-Parameter.