Skip to main content

datacontract api

Start the CLI as a web server application with a REST API. The OpenAPI documentation (Swagger UI) is available at http://localhost:4242. Requires the api extra. See the API guide.

datacontract api [OPTIONS]
OptionDefaultDescription
--port4242Bind the socket to this port.
--host127.0.0.1Bind to this host (use 0.0.0.0 for Docker).
--debug / --no-debugoffEnable debug logging.

Protect the API by setting DATACONTRACT_CLI_API_KEY; requests must then include an x-api-key header.

datacontract api --port 4242 --host 0.0.0.0