API de empresas
Empresas de ejemplo; los empleados se enlazan con ellas mediante companyId. Datos fijos en memoria: los cambios duran hasta que se reinicia la app.
Tu cuenta desbloquea estos endpoints. Usa Try it en la página de cada endpoint para enviar peticiones.
Estos endpoints necesitan una cuenta gratuita. Crea una o inicia sesión para ver sus detalles y probarlos aquí.
- GET
https://api.testingapis.com/api/CompaniesList companies with filtering, sorting, search and paginationList companies with filtering, sorting, search and pagination. - POST
https://api.testingapis.com/api/CompaniesCreate a companyCreate a company. - GETHEAD
https://api.testingapis.com/api/Companies/{id}Get a company by IDGet a company by ID (HEAD returns the headers only). - PUT
https://api.testingapis.com/api/Companies/{id}Replace a companyReplace a company. - PATCH
https://api.testingapis.com/api/Companies/{id}Partially update a company with a JSON merge patchPartially update a company with a JSON merge patch. - DELETE
https://api.testingapis.com/api/Companies/{id}Delete a companyDelete a company. - GET
https://api.testingapis.com/api/Companies/{id}/employeesList a company's employeesList a company's employees. - POST
https://api.testingapis.com/api/Companies/bulkCreate up to 100 companies in one requestCreate up to 100 companies in one request. - DELETE
https://api.testingapis.com/api/Companies/bulkDelete several companies by IDDelete several companies by ID. - GET
https://api.testingapis.com/api/Companies/countCount all companiesCount all companies.
Petición de ejemplo
List companies with filtering, sorting, search and pagination. Referencia completa y botón Send (en inglés).
curl -X GET "https://api.testingapis.com/api/Companies?limit=2"[
{
"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)Inicia sesión para ver los detalles
Los parámetros, los ejemplos de petición y respuesta y el panel Try it en vivo de estos endpoints son para miembros con sesión iniciada. Las cuentas son gratuitas y se crean en unos segundos.
Filtros, ordenación y paginación
El endpoint de lista acepta limit, page, offset, sort, order y q, y cualquier nombre de campo como filtro exacto. Los totales vuelven en la cabecera X-Total-Count. Los cambios se guardan en memoria hasta que se reinicia el servidor, así que los tests pueden crear, cambiar y borrar registros con libertad. Referencia de parámetros de query.