# REST

Expose REST APIs and call external ones, all in Python.

## Get started

Give every service an HTTP endpoint that clients call - JSON in, JSON out, secured the way you choose.

[REST channels](https://zato.io/docs/dev/rest/channels.html)

service.py

```
# Call an external REST API
conn = self.rest['Customer API']

response = conn.get()

response.status_code
200

response.data['name']
'Alice Smith'
```

## Expose APIs

[Channels Expose services as REST endpoints with security, data formats and URL parameters.](https://zato.io/docs/dev/rest/channels.html) [HTTP verbs Handle GET, POST, PUT, PATCH and DELETE in one service or in separate ones.](https://zato.io/docs/dev/rest/verbs.html) [URL path matching Path parameters, match priorities and every option that influences request routing.](https://zato.io/docs/dev/rest/url-matching.html) [Webhooks Receive webhooks from external systems and route each event to a service.](https://zato.io/docs/dev/rest/webhooks.html) [CORS Let browsers call your channels across origins, with preflight requests handled.](https://zato.io/docs/dev/rest/cors.html) [Versioning Version your APIs through URL paths and keep old consumers working.](https://zato.io/docs/dev/rest/versioning.html)

## Call APIs

[Calling REST APIs Invoke external REST APIs from services, with JSON parsed into Python objects.](https://zato.io/docs/dev/rest/calling-apis.html) [Outgoing connections Configure connection pools, TLS, timeouts and security for external APIs.](https://zato.io/docs/dev/rest/outconns.html) [Delivery retries and dead-letter queues Retry failed requests, queue them until they go through and see what never did.](https://zato.io/docs/dev/delivery.html) [REST adapter Bridge REST APIs without writing code, mapping requests and responses in configuration.](https://zato.io/docs/dev/rest/rest-adapter.html) [API gateways Put Zato behind or in front of API gateways and integrate with existing ones.](https://zato.io/docs/dev/rest/api-gateways.html)

## Security

[Authentication Basic Auth, API keys and bearer tokens for channels, NTLM for outgoing connections.](https://zato.io/docs/dev/rest/authentication.html) [Security groups Many credentials on one channel, with mTLS channels and the proxy header contract.](https://zato.io/docs/dev/rest/security-groups.html) [Custom authentication Implement your own authentication logic when the built-in methods are not enough.](https://zato.io/docs/dev/rest/custom-auth.html)

## Data and errors

[Data mapping Map and transform data between systems with plain Python dictionaries and models.](https://zato.io/docs/dev/rest/data-mapping.html) [Orchestration Call multiple APIs in one service and combine their responses into one reply.](https://zato.io/docs/dev/rest/orchestration.html) [Error handling Return errors to callers and handle the errors external APIs return to you.](https://zato.io/docs/dev/rest/error-handling.html) [Error catalog Every status code a channel returns, what causes it and what to check.](https://zato.io/docs/dev/rest/error-catalog.html) [File uploads and downloads Accept file uploads in channels and download files from external APIs.](https://zato.io/docs/dev/rest/file-handling.html) [Cloud storage Store and retrieve files in cloud storage from your REST services.](https://zato.io/docs/dev/rest/cloud-storage.html) [SQL stored procedures Expose SQL queries and stored procedures as REST endpoints.](https://zato.io/docs/dev/rest/sql-stored-procedures.html) [Enmasse reference The full channel\_rest field reference for enmasse YAML, with every key explained.](https://zato.io/docs/dev/rest/enmasse.html)

## OpenAPI

[OpenAPI specifications Generate OpenAPI specifications from your services and their data models.](https://zato.io/docs/dev/rest/openapi.html) [OpenAPI console Live API documentation with a try-it client, showing each caller their endpoints.](https://zato.io/docs/dev/rest/openapi-console.html)
