# Basic Usage

The basic principle is simple:

  1. Describe your API using a zum.toml file.
  2. Use the zum CLI to interact with your API.

We'll get more in-depth with how to structure the zum.toml file and how to use the zum CLI, but first let's see a very basic example. Imagine that you are developing an API that gets the URL of a song on YouTube (opens new window). This API, for now, has only 1 endpoint: GET /song (clearly a WIP (opens new window)). To describe your API, you would have to write a zum.toml file similar to this one:

[metadata]
server = "http://localhost:8000"

[endpoints.dada]
route = "/song"
method = "get"

Now, to get your song's URL, all you need to do is to run:

zum dada

As we already established, we'll get more in-depth with how does the zum CLI works on another section, but for now, notice that, after the zum command, we passed an argument, that in this case was dada. This argument tells zum that it should interact with the endpoint described on the dada endpoint section, denoted by the header [endpoints.dada]. As a rule, to access an endpoint described by the header [endpoints.{my-endpoint-name}], you will call the zum command with the {my-endpoint-name} argument:

zum {my-endpoint-name}