Skip to main content

Core API (Rust)

The one-core handles the complete lifecycle of credentials and is available with an open source license. This page shows you how to get it deployed for local development and testing.

Prerequisites

  • one-core cloned or forked
  • Rust 1.92+ - Install via rustup.rs
  • Docker with Docker Compose - Docker Desktop recommended for easiest setup
  • Install cargo-make: cargo install cargo-make

Quick start

  1. Verify Docker is running:

docker compose version
  1. Compile the project:

makers build
  1. Start the database:

makers dbstart
  1. Start the server:

makers run
  1. Open http://localhost:3000/swagger-ui/index.html
    You should see the Swagger UI interface

  2. Click the "Authorize" button and set the bearer token: test
    You can now make API calls directly to the server using the Swagger UI interface

  3. Create an organization:

POST /api/organisation/v1

{}

response:

{
"id": "8cc5c9fa-2fc8-49dd-b3a8-0965f8c888e3"
}

Save this organization ID for later use; most APIs are used within an organizational context.

What's running:

Authentication

By default, Core starts in UNSAFE_STATIC mode and requires authorization using a static token. To change the token, update app.auth.staticToken in config/config-local.yml and restart the service. For details on other authentication modes, see Authentication Mode.

Troubleshooting

  • Issues compiling? Check rustc --version and run rustup update if your version is before 1.88.
  • Issues starting the database? Make sure Docker is running.
    • Mac: you should see the whale icon in your menu bar.
    • Windows: you should see the whale icon in your system tray.
  • Unauthorized API calls? Make sure you have added the authorization bearer token test to the swagger.

Next steps