
### delete <a name="delete"></a>
Delete an API



**API Endpoint**: `DELETE /api/{api_name}`

#### Example Snippet

```rust
let client = sideko_rest_api::SidekoClient::default()
    .with_api_key_auth(&std::env::var("API_KEY").unwrap())
    .with_cookie_auth(&std::env::var("API_KEY").unwrap());
let res = client
    .api()
    .delete(sideko_rest_api::resources::api::DeleteRequest {
        api_name: "my-project".to_string(),
    })
    .await;
```

### list <a name="list"></a>
List your APIs



**API Endpoint**: `GET /api`

#### Example Snippet

```rust
let client = sideko_rest_api::SidekoClient::default()
    .with_api_key_auth(&std::env::var("API_KEY").unwrap())
    .with_cookie_auth(&std::env::var("API_KEY").unwrap());
let res = client.api().list().await;
```

### get <a name="get"></a>
Get one API



**API Endpoint**: `GET /api/{api_name}`

#### Example Snippet

```rust
let client = sideko_rest_api::SidekoClient::default()
    .with_api_key_auth(&std::env::var("API_KEY").unwrap())
    .with_cookie_auth(&std::env::var("API_KEY").unwrap());
let res = client
    .api()
    .get(sideko_rest_api::resources::api::GetRequest {
        api_name: "my-project".to_string(),
    })
    .await;
```

### patch <a name="patch"></a>
Update an existing API



**API Endpoint**: `PATCH /api/{api_name}`

#### Example Snippet

```rust
let client = sideko_rest_api::SidekoClient::default()
    .with_api_key_auth(&std::env::var("API_KEY").unwrap())
    .with_cookie_auth(&std::env::var("API_KEY").unwrap());
let res = client
    .api()
    .patch(sideko_rest_api::resources::api::PatchRequest {
        api_name: "my-project".to_string(),
        ..Default::default()
    })
    .await;
```

### create <a name="create"></a>
Create a new API



**API Endpoint**: `POST /api`

#### Example Snippet

```rust
let client = sideko_rest_api::SidekoClient::default()
    .with_api_key_auth(&std::env::var("API_KEY").unwrap())
    .with_cookie_auth(&std::env::var("API_KEY").unwrap());
let res = client
    .api()
    .create(sideko_rest_api::resources::api::CreateRequest {
        name: "my-api-spec".to_string(),
    })
    .await;
```

### init <a name="init"></a>
Create an API with an initial version



**API Endpoint**: `POST /api/init`

#### Example Snippet

```rust
let client = sideko_rest_api::SidekoClient::default()
    .with_api_key_auth(&std::env::var("API_KEY").unwrap())
    .with_cookie_auth(&std::env::var("API_KEY").unwrap());
let res = client
    .api()
    .init(sideko_rest_api::resources::api::InitRequest {
        name: "my-api-spec".to_string(),
        openapi: sideko_rest_api::UploadFile::from_path("uploads/openapi.yaml")
            .unwrap(),
        version: sideko_rest_api::models::VersionOrBump::VersionBumpEnum(
            sideko_rest_api::models::VersionBumpEnum::Major,
        ),
        ..Default::default()
    })
    .await;
```
