box-open-sdk 0.4.1

Box API client for Rust (open source, community, punk rock) — typed models, async managers, and a reqwest runtime with retry, backoff, and token refresh.
Documentation
<!-- Generated by box-gantry. DO NOT EDIT. -->
# MetadataTemplatesManager

Reach these methods through the `metadata_templates` field on `client::Client`.

## list

`GET /metadata_templates`

| Parameter | In | Type | Required |
|---|---|---|---|
| `metadata_instance_id` | query | `String` | yes |
| `marker` | query | `String` | no |
| `limit` | query | `i64` | no |

**Returns:** `MetadataTemplates`

**Example**

```rust
let mut pages = client.metadata_templates.list("METADATA_INSTANCE_ID".to_string(), None);
while let Some(item) = pages.next().await {
    // use item
}
```

Paginated — `list(...)` returns a paginator you drive with `.next().await`, threading the cursor for you. See the [pagination guide](../pagination.md).

## get_schema

`GET /metadata_templates/{scope}/{template_key}/schema`

| Parameter | In | Type | Required |
|---|---|---|---|
| `scope` | path | `GetFileIdMetadataIdScope` | yes |
| `template_key` | path | `String` | yes |

**Returns:** `MetadataTemplate`

**Example**

```rust
let result = client.metadata_templates.get_schema(Default::default(), "TEMPLATE_KEY".to_string()).await?;
```

## update_schema

`PUT /metadata_templates/{scope}/{template_key}/schema`

| Parameter | In | Type | Required |
|---|---|---|---|
| `scope` | path | `GetFileIdMetadataIdScope` | yes |
| `template_key` | path | `String` | yes |

**Request body** (`application/json-patch+json`): `Vec<UpdateSchemaRequest>`

**Returns:** `MetadataTemplate`

**Example**

```rust
let result = client.metadata_templates.update_schema(Default::default(), "TEMPLATE_KEY".to_string(), vec![]).await?;
```

## delete_schema

`DELETE /metadata_templates/{scope}/{template_key}/schema`

| Parameter | In | Type | Required |
|---|---|---|---|
| `scope` | path | `GetFileIdMetadataIdScope` | yes |
| `template_key` | path | `String` | yes |

**Returns:** no content

**Example**

```rust
client.metadata_templates.delete_schema(Default::default(), "TEMPLATE_KEY".to_string()).await?;
```

## get

`GET /metadata_templates/{template_id}`

| Parameter | In | Type | Required |
|---|---|---|---|
| `template_id` | path | `String` | yes |

**Returns:** `MetadataTemplate`

**Example**

```rust
let result = client.metadata_templates.get("TEMPLATE_ID".to_string()).await?;
```

## list_global

`GET /metadata_templates/global`

| Parameter | In | Type | Required |
|---|---|---|---|
| `marker` | query | `String` | no |
| `limit` | query | `i64` | no |

**Returns:** `MetadataTemplates`

**Example**

```rust
let mut pages = client.metadata_templates.list_global(None);
while let Some(item) = pages.next().await {
    // use item
}
```

Paginated — `list_global(...)` returns a paginator you drive with `.next().await`, threading the cursor for you. See the [pagination guide](../pagination.md).

## list_enterprise

`GET /metadata_templates/enterprise`

| Parameter | In | Type | Required |
|---|---|---|---|
| `marker` | query | `String` | no |
| `limit` | query | `i64` | no |

**Returns:** `MetadataTemplates`

**Example**

```rust
let mut pages = client.metadata_templates.list_enterprise(None);
while let Some(item) = pages.next().await {
    // use item
}
```

Paginated — `list_enterprise(...)` returns a paginator you drive with `.next().await`, threading the cursor for you. See the [pagination guide](../pagination.md).

## create_schema

`POST /metadata_templates/schema`

**Request body** (`application/json`): `CreateSchemaRequest`

**Returns:** `MetadataTemplate`

**Example**

```rust
let result = client.metadata_templates.create_schema(schemas::CreateSchemaRequest { /* … */ }).await?;
```