> ## Documentation Index
> Fetch the complete documentation index at: https://docs.coreweave.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Api

export const GitHubLink = ({url, compact = false}) => <a href={url} target="_blank" rel="noopener noreferrer" className={compact ? "source-link" : "github-source-link"}>
    {compact ? "View source" : <>
    <svg width="20" height="20" viewBox="0 0 24 24" fill="currentColor" xmlns="http://www.w3.org/2000/svg">
      <path d="M12 0C5.37 0 0 5.37 0 12c0 5.31 3.435 9.795 8.205 11.385.6.105.825-.255.825-.57 0-.285-.015-1.23-.015-2.235-3.015.555-3.795-.735-4.035-1.41-.135-.345-.72-1.41-1.23-1.695-.42-.225-1.02-.78-.015-.795.945-.015 1.62.87 1.845 1.23 1.08 1.815 2.805 1.305 3.495.99.105-.78.42-1.305.765-1.605-2.67-.3-5.46-1.335-5.46-5.925 0-1.305.465-2.385 1.23-3.225-.12-.3-.54-1.53.12-3.18 0 0 1.005-.315 3.3 1.23.96-.27 1.98-.405 3-.405s2.04.135 3 .405c2.295-1.56 3.3-1.23 3.3-1.23.66 1.65.24 2.88.12 3.18.765.84 1.23 1.905 1.23 3.225 0 4.605-2.805 5.625-5.475 5.925.435.375.81 1.095.81 2.22 0 1.605-.015 2.895-.015 3.3 0 .315.225.69.825.57A12.02 12.02 0 0024 12c0-6.63-5.37-12-12-12z" />
    </svg>
    GitHub source
      </>}
  </a>;

<GitHubLink compact url="https://github.com/wandb/wandb/blob/main/wandb/apis/public/api.py#L100" />

<h2 id="class-wandbapi">
  <Badge color="yellow" size="lg" shape="rounded">クラス</Badge> wandb.Api
</h2>

W\&B サーバーをクエリするために使用します。

```python theme={"system"}
overrides: 'dict[str, Any] | None' = None,
timeout: 'int | None' = None,
api_key: 'str | None' = None
```

<h2 id="args">
  引数
</h2>

<ResponseField name="overrides" type="dict[str, Any] | None">
  `https://api.wandb.ai` 以外の W\&B サーバーを使用する場合は、`base_url` を設定できます。`entity`、`project`、`run` のデフォルトも設定できます。
</ResponseField>

<ResponseField name="timeout" type="int | None">
  API リクエストの HTTP タイムアウト (秒単位) です。指定しない場合は、デフォルトのタイムアウトが使用されます。
</ResponseField>

<ResponseField name="api_key" type="str | None">
  認証に使用する APIキーです。指定しない場合は、現在の環境または設定の APIキーが使用されます。APIキーが指定されておらず、環境にも設定されていない場合は、APIキーの入力を求めます。
</ResponseField>

<h2 id="examples">
  サンプル
</h2>

```python theme={"system"}
import wandb

wandb.Api()
```

<h2 id="properties">
  プロパティ
</h2>

<ResponseField name="default_entity" type="str | None">
  デフォルトの W\&B entity を返します。
</ResponseField>

<ResponseField name="user_agent" type="str">
  W\&B のパブリックユーザーエージェントを返します。
</ResponseField>

<ResponseField name="viewer" type="User">
  viewer オブジェクトを返します。
</ResponseField>

<h2 id="methods">
  メソッド
</h2>

<h3 id="method-apiartifact">
  <Badge color="blue" size="lg" shape="rounded">メソッド</Badge> Api.artifact()
</h3>

```python theme={"system"}
(self,
name: 'str',
type: 'str | None' = None)
```

単一のアーティファクトを返します。

<h5 id="arguments">
  引数
</h5>

<ResponseField name="name" type="str">
  アーティファクト名です。アーティファクト名はファイルパスに似た形式で、少なくとも、アーティファクトがログされたプロジェクト名、アーティファクト名、およびアーティファクトのバージョンまたはエイリアスで構成されます。必要に応じて、アーティファクトをログした entity を接頭辞として先頭に付け、スラッシュで区切ることもできます。名に entity が指定されていない場合は、run または API 設定の entity が使用されます。
</ResponseField>

<ResponseField name="type" type="str | None">
  取得するアーティファクトのタイプです。
</ResponseField>

<h5 id="raises">
  送出される例外
</h5>

* `ValueError`: アーティファクト名が指定されていない場合。
* `ValueError`: アーティファクト タイプが指定されているものの、取得したアーティファクトのタイプと一致しない場合。

<h5 id="examples-2">
  サンプル
</h5>

以下のスニペットでは、「entity」、「project」、「artifact」、
「version」、および「エイリアス」は、それぞれ W\&B の entity、
アーティファクトが属する project の名、アーティファクトの名、
およびアーティファクトのバージョンのプレースホルダーです。

```python theme={"system"}
import wandb

# project、アーティファクトの名、およびアーティファクトの alias を指定します
wandb.Api().artifact(name="project/artifact:alias")

# project、アーティファクトの名、および特定のアーティファクトのバージョンを指定します
wandb.Api().artifact(name="project/artifact:version")

# entity、project、アーティファクトの名、およびアーティファクトの alias を指定します
wandb.Api().artifact(name="entity/project/artifact:alias")

# entity、project、アーティファクトの名、および特定のアーティファクトのバージョンを指定します
wandb.Api().artifact(name="entity/project/artifact:version")
```

<h3 id="method-apiartifact_collection">
  <Badge color="blue" size="lg" shape="rounded">メソッド</Badge> Api.artifact\_collection()
</h3>

```python theme={"system"}
self,
type_name: 'str',
name: 'str'
```

タイプを指定して単一のアーティファクト コレクションを返します。

返された `ArtifactCollection` オブジェクトを使用すると、
そのコレクション内の特定のアーティファクトに関する情報の取得などができます。

<h5 id="arguments-2">
  引数
</h5>

<ResponseField name="type_name" type="str">
  取得するアーティファクト コレクションのタイプ。
</ResponseField>

<ResponseField name="name" type="str">
  アーティファクト コレクション名。必要に応じて、アーティファクトをログした entity とスラッシュを接頭辞として先頭に付けることができます。
</ResponseField>

<h5 id="examples-3">
  サンプル
</h5>

次のコードスニペットの "type"、"entity"、"project"、
"artifact\_name" は、それぞれコレクションのタイプ、W\&B の
entity、アーティファクトが含まれるプロジェクト名、
アーティファクトの名を表すプレースホルダーです。

```python theme={"system"}
import wandb

collections = wandb.Api().artifact_collection(
    type_name="type", name="entity/project/artifact_name"
)

# コレクション内の最初のアーティファクトを取得します
artifact_example = collections.artifacts()[0]

# アーティファクトの内容を、指定したルートディレクトリにダウンロードします。
artifact_example.download()
```

<h3 id="method-apiartifact_collection_exists">
  <Badge color="blue" size="lg" shape="rounded">メソッド</Badge> Api.artifact\_collection\_exists()
</h3>

```python theme={"system"}
self,
name: 'str',
type: 'str'
```

指定された project と entity 内にアーティファクト コレクションが存在するかどうか。

<h5 id="arguments-3">
  引数
</h5>

<ResponseField name="name" type="str">
  アーティファクト コレクションの名です。オプションで、ログした entity を接頭辞として追加し、その後にスラッシュを付けます。entity または project が指定されていない場合、override params が存在すればそれらからコレクションを推測します。それ以外の場合は、entity はユーザー設定から取得され、project はデフォルトで "uncategorized" になります。
</ResponseField>

<ResponseField name="type" type="str">
  アーティファクト コレクションのタイプです。
</ResponseField>

<h5 id="examples-4">
  サンプル
</h5>

以下のコードスニペットの "type" と "collection\_name" は、それぞれアーティファクト コレクションのタイプ
とコレクション名を指します。

```python theme={"system"}
import wandb

wandb.Api.artifact_collection_exists(type="type", name="collection_name")
```

<h3 id="method-apiartifact_collections">
  <Badge color="blue" size="lg" shape="rounded">メソッド</Badge> Api.artifact\_collections()
</h3>

```python theme={"system"}
self,
project_name: 'str',
type_name: 'str',
order: 'str | None' = None,
per_page: 'int' = 50,
start: 'str | None' = None
```

一致するアーティファクト コレクションのコレクションを返します。

<h5 id="arguments-4">
  引数
</h5>

<ResponseField name="project_name" type="str">
  フィルター対象とする project の名前。
</ResponseField>

<ResponseField name="type_name" type="str">
  フィルター対象とするアーティファクト タイプの名前。
</ResponseField>

<ResponseField name="order" type="str | None">
  結果の順序を指定するオプションの string。接頭辞が '+' の場合は昇順 (デフォルト)、'-' の場合は降順で並べ替えます。
</ResponseField>

<ResponseField name="per_page" type="int">
  クエリのページネーションにおけるページサイズを設定します。通常は変更する必要はありません。
</ResponseField>

<ResponseField name="start" type="str | None">
  過去のクエリを再開するためのページネーション カーソル。以前のページネーターの `.cursor` 属性から取得した値を指定します。
</ResponseField>

<h3 id="method-apiartifact_exists">
  <Badge color="blue" size="lg" shape="rounded">メソッド</Badge> Api.artifact\_exists()
</h3>

```python theme={"system"}
self,
name: 'str',
type: 'str | None' = None
```

指定した project と entity 内にアーティファクトのバージョンが存在するかどうか。

<h5 id="arguments-5">
  引数
</h5>

<ResponseField name="name" type="str">
  アーティファクトの名です。先頭にアーティファクトの entity と project を接頭辞として付けます。末尾にはコロンに続けてアーティファクトのバージョンまたはエイリアスを付けます。entity または project が指定されていない場合、上書き用のパラメーターが設定されていれば、W\&B はそれを使用します。設定されていない場合、entity はユーザー設定から取得され、project は「Uncategorized」に設定されます。
</ResponseField>

<ResponseField name="type" type="str | None">
  アーティファクトのタイプです。
</ResponseField>

<h5 id="examples-5">
  サンプル
</h5>

以下のコードスニペットでは、「entity」、「project」、「artifact」、
「version」、「alias」は、それぞれ W\&B の entity、アーティファクトが属する project の名前、
アーティファクトの名前、
アーティファクトのバージョンを表すプレースホルダーです。

```python theme={"system"}
import wandb

wandb.Api().artifact_exists("entity/project/artifact:version")
wandb.Api().artifact_exists("entity/project/artifact:alias")
```

<h3 id="method-apiartifact_type">
  <Badge color="blue" size="lg" shape="rounded">メソッド</Badge> Api.artifact\_type()
</h3>

```python theme={"system"}
self,
type_name: 'str',
project: 'str | None' = None
```

一致する `ArtifactType` を返します。

<h5 id="arguments-6">
  引数
</h5>

<ResponseField name="type_name" type="str">
  取得するアーティファクト タイプの名。
</ResponseField>

<ResponseField name="project" type="str | None">
  フィルターに使用するプロジェクト名またはパス (指定した場合)。
</ResponseField>

<h3 id="method-apiartifact_types">
  <Badge color="blue" size="lg" shape="rounded">メソッド</Badge> Api.artifact\_types()
</h3>

```python theme={"system"}
self,
project: 'str | None' = None,
start: 'str | None' = None
```

一致するアーティファクト タイプのコレクションを返します。

<h5 id="arguments-7">
  引数
</h5>

<ResponseField name="project" type="str | None">
  フィルタリング対象のプロジェクト名またはパス。
</ResponseField>

<ResponseField name="start" type="str | None">
  過去のクエリを再開するためのページネーションカーソル。以前のページネーターの `.cursor` 属性から取得します。
</ResponseField>

<h3 id="method-apiartifact_versions">
  <Badge color="blue" size="lg" shape="rounded">メソッド</Badge> Api.artifact\_versions()
</h3>

```python theme={"system"}
(self, type_name, name, per_page=50)
```

非推奨。代わりに `Api.artifacts(type_name, name)` メソッドを使用してください。

<h5 id="arguments-8">
  引数
</h5>

<ResponseField name="type_name" type="_empty">
  説明はありません。
</ResponseField>

<ResponseField name="name" type="_empty">
  説明はありません。
</ResponseField>

<ResponseField name="per_page" type="_empty">
  説明はありません。
</ResponseField>

<h3 id="method-apiartifacts">
  <Badge color="blue" size="lg" shape="rounded">メソッド</Badge> Api.artifacts()
</h3>

```python theme={"system"}
self,
type_name: 'str',
name: 'str',
order: 'str | None' = None,
per_page: 'int' = 50,
tags: 'list[str] | None' = None,
start: 'str | None' = None
```

`Artifacts` コレクションを返します。

<h5 id="arguments-9">
  引数
</h5>

<ResponseField name="type_name" type="str">
  取得するアーティファクトのタイプ。
</ResponseField>

<ResponseField name="name" type="str">
  アーティファクトのコレクション名。オプションで、接頭辞としてアーティファクトをログした entity を指定し、その後にスラッシュを追加できます。
</ResponseField>

<ResponseField name="order" type="str | None">
  結果の順序を指定するオプションの string。「+」を接頭辞にすると昇順 (デフォルト) でソートします。「-」を接頭辞にすると降順でソートします。
</ResponseField>

<ResponseField name="per_page" type="int">
  クエリページネーションのページサイズを設定します。通常、これを変更する理由はありません。
</ResponseField>

<ResponseField name="tags" type="list[str] | None">
  これらのタグをすべて持つアーティファクトのみを返します。
</ResponseField>

<ResponseField name="start" type="str | None">
  過去のクエリを再開するためのページネーションカーソル。以前のページネーターの `.cursor` 属性から取得されます。
</ResponseField>

<h5 id="examples-6">
  サンプル
</h5>

以下のコードスニペットでは、"type"、"entity"、"project"、
"artifact\_name" は、それぞれアーティファクト タイプ、W\&B entity、
アーティファクトがログされたプロジェクト名、
アーティファクト名のプレースホルダーです。

```python theme={"system"}
import wandb

wandb.Api().artifacts(type_name="type", name="entity/project/artifact_name")
```

反復処理を一時停止し、後で同じ位置から再開するには、
ページネーターの `.cursor` を保存し、`start=` として渡します。

```python theme={"system"}
from itertools import islice

import wandb

api = wandb.Api()

# 結果の最初のページを読み取り、カーソルを保存します。
page_size = 10
artifacts = api.artifacts(
    type_name="type",
    name="entity/project/artifact_name",
    per_page=page_size,
)
first_page = list(islice(artifacts, page_size))

saved_cursor = artifacts.cursor

# 後で（例えば新しいプロセスで）、保存したカーソルから反復処理を再開します。
remaining_artifacts = api.artifacts(
    type_name="type",
    name="entity/project/artifact_name",
    per_page=page_size,
    start=saved_cursor,
)
```

<h3 id="method-apiautomation">
  <Badge color="blue" size="lg" shape="rounded">メソッド</Badge> Api.automation()
</h3>

```python theme={"system"}
self,
name: 'str', *,
entity: 'str | None' = None
```

パラメーターに一致する唯一のオートメーションを返します。

<h5 id="arguments-10">
  引数
</h5>

<ResponseField name="name" type="str">
  取得するオートメーションの名。
</ResponseField>

<ResponseField name="entity" type="str | None">
  オートメーションの取得対象の entity。
</ResponseField>

<h5 id="raises-2">
  送出される例外
</h5>

* `ValueError`: 検索条件に一致するオートメーションがない場合、または複数ある場合。

<h5 id="examples-7">
  サンプル
</h5>

"my-automation" という名の既存のオートメーションを取得します:

```python theme={"system"}
import wandb

api = wandb.Api()
automation = api.automation(name="my-automation")
```

entity "my-team" から、"other-automation" という名の既存のオートメーションを取得します:

```python theme={"system"}
automation = api.automation(name="other-automation", entity="my-team")
```

<h3 id="method-apiautomations">
  <Badge color="blue" size="lg" shape="rounded">メソッド</Badge> Api.automations()
</h3>

```python theme={"system"}
self,
entity: 'str | None' = None, *,
name: 'str | None' = None,
per_page: 'int' = 50,
start: 'str | None' = None
```

指定されたパラメーターに一致するすべてのオートメーションを走査するイテレーターを返します。

パラメーターを指定しない場合、返されるイテレーターには、ユーザーがアクセスできるすべての
オートメーションが含まれます。

<h5 id="arguments-11">
  引数
</h5>

<ResponseField name="entity" type="str | None">
  オートメーションを取得する対象の entity。
</ResponseField>

<ResponseField name="name" type="str | None">
  取得するオートメーションの名。
</ResponseField>

<ResponseField name="per_page" type="int">
  ページごとに取得するオートメーションの数。デフォルトは 50 です。  通常、変更する必要はありません。
</ResponseField>

<ResponseField name="start" type="str | None">
  過去のクエリを再開するためのページネーションカーソル。以前のページネーターの `.cursor` 属性から取得します。
</ResponseField>

<h5 id="examples-8">
  サンプル
</h5>

entity "my-team" の既存のオートメーションをすべて取得します:

```python theme={"system"}
import wandb

api = wandb.Api()
automations = api.automations(entity="my-team")
```

<h3 id="method-apicreate_automation">
  <Badge color="blue" size="lg" shape="rounded">メソッド</Badge> Api.create\_automation()
</h3>

```python theme={"system"}
self,
obj: 'NewAutomation', *,
fetch_existing: 'bool' = False, **kwargs: 'Unpack[WriteAutomationsKwargs]'
```

新しいオートメーションを作成します。

<h5 id="arguments-12">
  引数
</h5>

<ResponseField name="obj" type="NewAutomation">
  作成するオートメーション。
</ResponseField>

<ResponseField name="fetch_existing" type="bool">
  True で、競合するオートメーションがすでに存在する場合は、エラーを発生させる代わりに既存のオートメーションの取得を試みます。
</ResponseField>

<ResponseField name="kwargs" type="Unpack[WriteAutomationsKwargs]">
  説明はありません。
</ResponseField>

<h5 id="examples-9">
  サンプル
</h5>

特定の project 内の run がカスタムしきい値を超えるメトリクスをログしたときに Slack 通知を送信する、
"my-automation" という名の新しいオートメーションを作成します：

```python theme={"system"}
import wandb
from wandb.automations import OnRunMetric, RunEvent, SendNotification

api = wandb.Api()

project = api.project("my-project", entity="my-team")

# チームの最初の Slack インテグレーションを使用します
slack_hook = next(api.slack_integrations(entity="my-team"))

event = OnRunMetric(
    scope=project,
    filter=RunEvent.metric("custom-metric") > 10,
)
action = SendNotification.from_integration(slack_hook)

automation = api.create_automation(
    event >> action,
    name="my-automation",
    description="Send a Slack message whenever 'custom-metric' exceeds 10.",
)
```

<h3 id="method-apicreate_custom_chart">
  <Badge color="blue" size="lg" shape="rounded">メソッド</Badge> Api.create\_custom\_chart()
</h3>

```python theme={"system"}
self,
entity: 'str',
name: 'str',
display_name: 'str',
spec_type: "Literal['vega2']",
access: "Literal['private', 'public']",
spec: 'str | dict'
```

カスタム チャート プリセットを作成し、その ID を返します。

<h5 id="arguments-13">
  引数
</h5>

<ResponseField name="entity" type="str">
  チャートを所有する entity (ユーザーまたはチーム)
</ResponseField>

<ResponseField name="name" type="str">
  チャートプリセットの一意の ID
</ResponseField>

<ResponseField name="display_name" type="str">
  UI に表示される、人が読みやすい名
</ResponseField>

<ResponseField name="spec_type" type="Literal['vega2']">
  spec のタイプ。Vega-Lite v2 の spec では "vega2" にする必要があります。
</ResponseField>

<ResponseField name="access" type="Literal['private', 'public']">
  チャートのアクセスレベル:

  * "private": チャートを作成した entity のみがアクセスできます
  * "public": チャートに誰でもアクセスできます
</ResponseField>

<ResponseField name="spec" type="str | dict">
  辞書または JSON string として指定する Vega/Vega-Lite の spec
</ResponseField>

<h5 id="raises-3">
  送出される例外
</h5>

* `wandb.Error`: チャートの作成に失敗した場合
* `UnsupportedError`: サーバーがカスタム チャートをサポートしていない場合

<h5 id="examples-10">
  サンプル
</h5>

```python theme={"system"}
    import wandb

    api = wandb.Api()

    # シンプルな棒グラフの spec を定義します
    vega_spec = {
        "$schema": "https://vega.github.io/schema/vega-lite/v6.json",
        "mark": "bar",
        "data": {"name": "wandb"},
        "encoding": {
            "x": {"field": "${field:x}", "type": "ordinal"},
            "y": {"field": "${field:y}", "type": "quantitative"},
        },
    }

    # カスタム チャートを作成します
    chart_id = api.create_custom_chart(
        entity="my-team",
        name="my-bar-chart",
        display_name="My Custom Bar Chart",
        spec_type="vega2",
        access="private",
        spec=vega_spec,
    )

    # wandb.plot_table() と組み合わせて使用します
    chart = wandb.plot_table(
        vega_spec_name=chart_id,
        data_table=my_table,
        fields={"x": "category", "y": "value"},
    )
```

<h3 id="method-apicreate_project">
  <Badge color="blue" size="lg" shape="rounded">メソッド</Badge> Api.create\_project()
</h3>

```python theme={"system"}
self,
name: 'str',
entity: 'str'
```

新しい project を作成します。

<h5 id="arguments-14">
  引数
</h5>

<ResponseField name="name" type="str">
  新しい project の名。
</ResponseField>

<ResponseField name="entity" type="str">
  新しい project の entity。
</ResponseField>

<h3 id="method-apicreate_registry">
  <Badge color="blue" size="lg" shape="rounded">メソッド</Badge> Api.create\_registry()
</h3>

```python theme={"system"}
self,
name: 'str',
visibility: "Literal['organization', 'restricted']",
organization: 'str | None' = None,
description: 'str | None' = None,
artifact_types: 'list[str] | None' = None
```

新しい Registry を作成します。

<h5 id="arguments-15">
  引数
</h5>

<ResponseField name="name" type="str">
  Registry 名です。名は組織内で一意である必要があります。
</ResponseField>

<ResponseField name="visibility" type="Literal['organization', 'restricted']">
  Registry の可視性です。organization: 組織内の誰でもこの Registry を閲覧できます。ロールは後から UI の設定で編集できます。restricted: UI で招待されたメンバーのみがこの Registry にアクセスできます。公開共有は無効です。
</ResponseField>

<ResponseField name="organization" type="str | None">
  Registry の組織です。設定で組織が指定されておらず、entity が 1 つの組織のみに所属している場合は、entity から組織を取得します。
</ResponseField>

<ResponseField name="description" type="str | None">
  Registry の説明です。
</ResponseField>

<ResponseField name="artifact_types" type="list[str] | None">
  Registry で受け入れるアーティファクト タイプです。タイプは 128 文字以下で、`/` または `:` を含めることはできません。指定しない場合は、すべてのタイプを受け入れます。Registry に追加した許可タイプは、後から削除できません。
</ResponseField>

<h5 id="examples-11">
  サンプル
</h5>

```python theme={"system"}
import wandb

api = wandb.Api()
registry = api.create_registry(
    name="my-registry",
    visibility="restricted",
    organization="my-org",
    description="This is a test registry",
    artifact_types=["model"],
)
```

<h3 id="method-apicreate_run">
  <Badge color="blue" size="lg" shape="rounded">メソッド</Badge> Api.create\_run()
</h3>

```python theme={"system"}
self, *,
run_id: 'str | None' = None,
project: 'str | None' = None,
entity: 'str | None' = None
```

新しい run を作成します。

<h5 id="arguments-16">
  引数
</h5>

<ResponseField name="run_id" type="str | None">
  run に割り当てる ID です。指定しない場合、W\&B がランダムな ID を作成します。
</ResponseField>

<ResponseField name="project" type="str | None">
  run をログする先の project です。project を指定しない場合、"Uncategorized" という project に run をログします。
</ResponseField>

<ResponseField name="entity" type="str | None">
  project を所有する entity です。entity を指定しない場合、デフォルトの entity に run をログします。
</ResponseField>

<h3 id="method-apicreate_run_queue">
  <Badge color="blue" size="lg" shape="rounded">メソッド</Badge> Api.create\_run\_queue()
</h3>

```python theme={"system"}
self,
name: 'str',
type: 'public.RunQueueResourceType',
entity: 'str | None' = None,
prioritization_mode: 'public.RunQueuePrioritizationMode | None' = None,
config: 'dict | None' = None,
template_variables: 'dict | None' = None
```

W\&B Launch に新しい run キューを作成します。

<h5 id="arguments-17">
  引数
</h5>

<ResponseField name="name" type="str">
  作成するキューの名
</ResponseField>

<ResponseField name="type" type="public.RunQueueResourceType">
  キューに使用するリソースのタイプ。"local-container", "local-process", "kubernetes","sagemaker", "gcp-vertex" のいずれかです。
</ResponseField>

<ResponseField name="entity" type="str | None">
  キューを作成する entity の名。`None` の場合、設定済みの entity またはデフォルトの entity を使用します。
</ResponseField>

<ResponseField name="prioritization_mode" type="public.RunQueuePrioritizationMode | None">
  使用する優先順位付けのバージョン。"V0" または `None` です。
</ResponseField>

<ResponseField name="config" type="dict | None">
  キューに使用するデフォルトのリソース設定。テンプレート変数を指定するには handlebars (例: `{{var}}`) を使用します。
</ResponseField>

<ResponseField name="template_variables" type="dict | None">
  設定とともに使用するテンプレート変数のスキーマの辞書。
</ResponseField>

<h3 id="method-apicreate_team">
  <Badge color="blue" size="lg" shape="rounded">メソッド</Badge> Api.create\_team()
</h3>

```python theme={"system"}
self,
team: 'str',
admin_username: 'str | None' = None
```

新しいチームを作成します。

W\&B Multi-tenant Cloud のユーザーは、`create_team()` を呼び出す前に、W\&B UI のユーザー設定で
デフォルトの API 組織を設定してください。
この設定によって、新しいチームが所属する組織が決まります。

<h5 id="arguments-18">
  引数
</h5>

<ResponseField name="team" type="str">
  チーム名。
</ResponseField>

<ResponseField name="admin_username" type="str | None">
  チームの管理者ユーザーのユーザー名。デフォルトは現在のユーザーです。
</ResponseField>

<h3 id="method-apicreate_user">
  <Badge color="blue" size="lg" shape="rounded">メソッド</Badge> Api.create\_user()
</h3>

```python theme={"system"}
self,
email: 'str',
admin: 'bool | None' = False
```

新しいユーザーを作成します。

<h5 id="arguments-19">
  引数
</h5>

<ResponseField name="email" type="str">
  ユーザーのメールアドレス。
</ResponseField>

<ResponseField name="admin" type="bool | None">
  ユーザーをインスタンス全体の管理者に設定します。
</ResponseField>

<h3 id="method-apidelete_automation">
  <Badge color="blue" size="lg" shape="rounded">メソッド</Badge> Api.delete\_automation()
</h3>

```python theme={"system"}
self,
obj: 'Automation | str'
```

オートメーションを削除します。

<h5 id="arguments-20">
  引数
</h5>

<ResponseField name="obj" type="Automation | str">
  削除するオートメーション、またはその ID。
</ResponseField>

<h3 id="method-apiflush">
  <Badge color="blue" size="lg" shape="rounded">メソッド</Badge> Api.flush()
</h3>

```python theme={"system"}
(self)
```

ローカルキャッシュをクリアします。

api オブジェクトは run のローカルキャッシュを保持するため、スクリプトの実行中に run の状態が
変わる可能性がある場合は、ローカルキャッシュをクリアする必要があります。
`api.flush()` を使用すると、run に関連付けられた最新の値を取得できます。

<h3 id="method-apifrom_path">
  <Badge color="blue" size="lg" shape="rounded">メソッド</Badge> Api.from\_path()
</h3>

```python theme={"system"}
(self,
path: 'str')
```

パスから run、sweep、project または report を返します。

<h5 id="arguments-21">
  引数
</h5>

<ResponseField name="path" type="str">
  project、run、sweep または report へのパス
</ResponseField>

<h5 id="examples-12">
  サンプル
</h5>

以下のコードスニペットの "project"、"team"、"run\_id"、"sweep\_id"、
および "report\_name" は、それぞれ project、チーム、run ID、
sweep ID、および特定の report の名を表すプレースホルダーです。

```python theme={"system"}
import wandb

api = wandb.Api()

project = api.from_path("project")
team_project = api.from_path("team/project")
run = api.from_path("team/project/runs/run_id")
sweep = api.from_path("team/project/sweeps/sweep_id")
report = api.from_path("team/project/reports/report_name")
```

<h3 id="method-apiintegrations">
  <Badge color="blue" size="lg" shape="rounded">メソッド</Badge> Api.integrations()
</h3>

```python theme={"system"}
self,
entity: 'str | None' = None, *,
per_page: 'int' = 50,
start: 'str | None' = None
```

entity のすべてのインテグレーションのイテレーターを返します。

<h5 id="arguments-22">
  引数
</h5>

<ResponseField name="entity" type="str | None">
  インテグレーションを取得する entity (例：チーム名) 。  指定しない場合は、ユーザーのデフォルトの entity を使用します。
</ResponseField>

<ResponseField name="per_page" type="int">
  ページごとに取得するインテグレーションの数。デフォルトは 50 です。  通常、変更する必要はありません。
</ResponseField>

<ResponseField name="start" type="str | None">
  説明はありません。
</ResponseField>

<h3 id="method-apijob">
  <Badge color="blue" size="lg" shape="rounded">メソッド</Badge> Api.job()
</h3>

```python theme={"system"}
self,
name: 'str | None',
path: 'str | None' = None
```

`Job` オブジェクトを返します。

<h5 id="arguments-23">
  引数
</h5>

<ResponseField name="name" type="str | None">
  ジョブ名。
</ResponseField>

<ResponseField name="path" type="str | None">
  ジョブのアーティファクトをダウンロードするルートパス。
</ResponseField>

<h3 id="method-apilist_jobs">
  <Badge color="blue" size="lg" shape="rounded">メソッド</Badge> Api.list\_jobs()
</h3>

```python theme={"system"}
self,
entity: 'str',
project: 'str'
```

指定された entity と project にジョブがある場合、その一覧を返します。

<h5 id="arguments-24">
  引数
</h5>

<ResponseField name="entity" type="str">
  一覧表示するジョブの entity です。
</ResponseField>

<ResponseField name="project" type="str">
  一覧表示するジョブの project です。
</ResponseField>

<h3 id="method-apiorganization">
  <Badge color="blue" size="lg" shape="rounded">メソッド</Badge> Api.organization()
</h3>

```python theme={"system"}
self,
name: 'str | None' = None
```

一致する `Organization` を返します。

<h5 id="arguments-25">
  引数
</h5>

<ResponseField name="name" type="str | None">
  組織名。省略した場合、このメソッドは現在のデフォルトの組織を推定して返そうとします。
</ResponseField>

<h3 id="method-apiproject">
  <Badge color="blue" size="lg" shape="rounded">メソッド</Badge> Api.project()
</h3>

```python theme={"system"}
self,
name: 'str',
entity: 'str | None' = None
```

指定された名 (および指定されている場合は entity) を持つ `Project` を返します。

<h5 id="arguments-26">
  引数
</h5>

<ResponseField name="name" type="str">
  プロジェクト名。
</ResponseField>

<ResponseField name="entity" type="str | None">
  リクエストされた entity の名。  None の場合、`Api` に渡されたデフォルトの entity にフォールバックします。  デフォルトの entity がない場合、`ValueError` を発生させます。
</ResponseField>

<h3 id="method-apiprojects">
  <Badge color="blue" size="lg" shape="rounded">メソッド</Badge> Api.projects()
</h3>

```python theme={"system"}
self,
entity: 'str | None' = None,
per_page: 'int' = 200
```

指定された entity の project を取得します。

<h5 id="arguments-27">
  引数
</h5>

<ResponseField name="entity" type="str | None">
  リクエストされた entity の名です。  None の場合、`Api` に渡されたデフォルトの entity が使用されます。  デフォルトの entity がない場合、`ValueError` が発生します。
</ResponseField>

<ResponseField name="per_page" type="int">
  クエリのページネーションのページサイズを設定します。通常、これを変更する必要はありません。
</ResponseField>

<h3 id="method-apiqueued_run">
  <Badge color="blue" size="lg" shape="rounded">メソッド</Badge> Api.queued\_run()
</h3>

```python theme={"system"}
(self,
entity: 'str',
project: 'str',
queue_name: 'str',
run_queue_item_id: 'str', project_queue=None, priority=None)
```

パスに基づいて、キューに登録された単一の run を返します。

`entity/project/queue_id/run_queue_item_id` 形式のパスを解析します。

<h5 id="arguments-28">
  引数
</h5>

<ResponseField name="entity" type="str">
  説明はありません。
</ResponseField>

<ResponseField name="project" type="str">
  説明はありません。
</ResponseField>

<ResponseField name="queue_name" type="str">
  説明はありません。
</ResponseField>

<ResponseField name="run_queue_item_id" type="str">
  説明はありません。
</ResponseField>

<ResponseField name="project_queue" type="_empty">
  説明はありません。
</ResponseField>

<ResponseField name="priority" type="_empty">
  説明はありません。
</ResponseField>

<h3 id="method-apiregistries">
  <Badge color="blue" size="lg" shape="rounded">メソッド</Badge> Api.registries()
</h3>

```python theme={"system"}
self,
organization: 'str | None' = None,
filter: 'dict[str, Any] | None' = None,
order: 'str | None' = None,
per_page: 'int' = 100,
start: 'str | None' = None
```

`Registry` オブジェクトの遅延イテレーターを返します。

イテレーターを使用して、組織の Registry 全体で Registry、コレクション、
またはアーティファクトのバージョンを検索し、フィルターを適用します。結果は
反復処理に応じて遅延取得されるため、任意の件数の
項目を取得した後で、たとえば :func:`itertools.islice` を使用して、残りをリクエストせずに
停止できます。

<h5 id="arguments-29">
  引数
</h5>

<ResponseField name="organization" type="str | None">
  取得する Registry の組織です。指定しない場合は、ユーザーの設定で指定された組織を使用します。
</ResponseField>

<ResponseField name="filter" type="dict[str, Any] | None">
  遅延評価の Registry イテレーター内の各オブジェクトに適用する、省略可能な MongoDB 形式のフィルターです。Registry のフィルターに使用できるフィールドは `name`、`description`、`created_at`、`updated_at` です。コレクションのフィルターに使用できるフィールドは `name`、`tag`、`description`、`created_at`、`updated_at` です。バージョンのフィルターに使用できるフィールドは `tag`、`alias`、`created_at`、`updated_at`、`metadata` です。
</ResponseField>

<ResponseField name="order" type="str | None">
  結果の順序を指定する、省略可能な string です。接頭辞が '+' の場合は昇順 (デフォルト) 、'-' の場合は降順で並べ替えます。
</ResponseField>

<ResponseField name="per_page" type="int">
  クエリのページネーションのページサイズを設定します。
</ResponseField>

<ResponseField name="start" type="str | None">
  過去のクエリを再開するためのページネーションカーソルです。以前のページネーターの `.cursor` 属性から取得します。
</ResponseField>

<h5 id="examples-13">
  サンプル
</h5>

名に "model" を含むすべてのレジストリを検索します

```python theme={"system"}
import wandb

api = wandb.Api()  # entity が複数の組織に所属している場合は、組織を指定します
api.registries(filter={"name": {"$regex": "model"}})
```

レジストリ内で、名が "my\_collection" でタグが "my\_tag" のコレクションをすべて検索します

```python theme={"system"}
api.registries().collections(filter={"name": "my_collection", "tag": "my_tag"})
```

コレクション名に "my\_collection" を含み、バージョンにエイリアス "best" が付いている、レジストリ内のすべてのアーティファクトのバージョンを検索します

```python theme={"system"}
api.registries().collections(
    filter={"name": {"$regex": "my_collection"}}
).versions(filter={"alias": "best"})
```

"model" を含むレジストリ内で、タグ "prod" またはエイリアス "best" を持つすべてのアーティファクトのバージョンを検索します

```python theme={"system"}
api.registries(filter={"name": {"$regex": "model"}}).versions(
    filter={"$or": [{"tag": "prod"}, {"alias": "best"}]}
)
```

ページネーターの `.cursor` を保存し、`start=` として渡すことで、
反復処理を一時停止して、後で同じ位置から再開できます。

```python theme={"system"}
from itertools import islice

import wandb

api = wandb.Api()

# 結果の最初のページを取得し、カーソルを保存します。
page_size = 10
registries = api.registries(per_page=page_size)
first_page = list(islice(registries, page_size))

saved_cursor = registries.cursor

# 後で（例えば新しいプロセスで）、保存したカーソルから反復処理を再開します。
remaining_registries = api.registries(per_page=page_size, start=saved_cursor)
```

<h3 id="method-apiregistry">
  <Badge color="blue" size="lg" shape="rounded">メソッド</Badge> Api.registry()
</h3>

```python theme={"system"}
self,
name: 'str',
organization: 'str | None' = None
```

Registry 名を指定して Registry を返します。

<h5 id="arguments-30">
  引数
</h5>

<ResponseField name="name" type="str">
  Registry の名です。`wandb-registry-` 接頭辞は含みません。
</ResponseField>

<ResponseField name="organization" type="str | None">
  Registry の組織です。設定で組織が指定されておらず、entity が 1 つの組織にのみ属している場合は、entity から組織を取得します。
</ResponseField>

<h5 id="examples-14">
  サンプル
</h5>

Registry を取得して更新します

```python theme={"system"}
import wandb

api = wandb.Api()
registry = api.registry(name="my-registry", organization="my-org")
registry.description = "This is an updated description"
registry.save()
```

<h3 id="method-apireports">
  <Badge color="blue" size="lg" shape="rounded">メソッド</Badge> Api.reports()
</h3>

```python theme={"system"}
self,
path: 'str' = '',
name: 'str | None' = None,
per_page: 'int' = 50
```

指定されたプロジェクトパスの report を取得します。

注: `wandb.Api.reports()` API はベータ版であり、
今後のリリースで変更される可能性があります。

<h5 id="arguments-31">
  引数
</h5>

<ResponseField name="path" type="str">
  report が存在する project へのパスです。project を作成した entity を接頭辞として指定し、その後にスラッシュを付けます。
</ResponseField>

<ResponseField name="name" type="str | None">
  リクエストされた report の名です。
</ResponseField>

<ResponseField name="per_page" type="int">
  クエリのページネーションのページサイズを設定します。通常、変更する必要はありません。
</ResponseField>

<h5 id="examples-15">
  サンプル
</h5>

```python theme={"system"}
import wandb

wandb.Api.reports("entity/project")
```

<h3 id="method-apirun">
  <Badge color="blue" size="lg" shape="rounded">メソッド</Badge> Api.run()
</h3>

```python theme={"system"}
self,
path: 'str' = ''
```

`entity/project/run_id` 形式のパスを解析して、単一の run を返します。

<h5 id="arguments-32">
  引数
</h5>

<ResponseField name="path" type="str">
  `entity/project/run_id` 形式の run へのパスです。`api.entity` が設定されている場合は `project/run_id` 形式にでき、`api.project` が設定されている場合は run\_id のみを指定できます。
</ResponseField>

<h5 id="raises-4">
  送出される例外
</h5>

* `RunNotFoundError`: run が見つからない場合、または run データを読み込めない場合。

<h3 id="method-apirun_queue">
  <Badge color="blue" size="lg" shape="rounded">メソッド</Badge> Api.run\_queue()
</h3>

```python theme={"system"}
(self,
entity: 'str',
name: 'str')
```

entity の指定された名の `RunQueue` を返します。

run キューの作成方法の詳細については、`Api.create_run_queue` を参照してください。

<h5 id="arguments-33">
  引数
</h5>

<ResponseField name="entity" type="str">
  説明はありません。
</ResponseField>

<ResponseField name="name" type="str">
  説明はありません。
</ResponseField>

<h3 id="method-apiruns">
  <Badge color="blue" size="lg" shape="rounded">メソッド</Badge> Api.runs()
</h3>

```python theme={"system"}
(self,
path: 'str | None' = None,
filters: 'dict[str, Any] | None' = None,
order: 'str' = '+created_at',
per_page: 'int' = 50,
include_sweeps: 'bool' = False,
lazy: 'bool' = True)
```

`Run` オブジェクトを遅延反復する `Runs` オブジェクトを返します。

フィルターに使用できるフィールドは次のとおりです。

* `createdAt`: run が作成されたタイムスタンプです。(ISO 8601 形式、例: "2023-01-01T12:00:00Z")
* `displayName`: run の人間が読みやすい表示名です。(例: "eager-fox-1")
* `duration`: run の総実行時間 (秒) です。
* `group`: 関連する run をまとめて整理するために使用するグループ名です。
* `host`: run が実行されたホスト名です。
* `jobType`: ジョブのタイプまたは run の目的です。
* `name`: run の一意の ID です。(例: "a1b2cdef")
* `state`: run の現在の状態です。
* `tags`: run に関連付けられたタグです。
* `username`: run を開始したユーザーのユーザー名です

さらに、run 設定やサマリー メトリクスの項目でフィルターすることもできます。
たとえば、`config.experiment_name`、`summary_metrics.loss` などです。

より複雑なフィルターには、MongoDB のクエリオペレーターを使用できます。
詳細については、[https://docs.mongodb.com/manual/reference/operator/query](https://docs.mongodb.com/manual/reference/operator/query) を参照してください。
次の操作がサポートされます。

* `$and`
* `$or`
* `$nor`
* `$eq`
* `$ne`
* `$gt`
* `$gte`
* `$lt`
* `$lte`
* `$in`
* `$nin`
* `$exists`
* `$regex`

<h5 id="arguments-34">
  引数
</h5>

<ResponseField name="path" type="str | None">
  (str) project へのパスです。"entity/project" の形式で指定してください。
</ResponseField>

<ResponseField name="filters" type="dict[str, Any] | None">
  (dict) MongoDB クエリ言語を使用して特定の run をクエリします。config.key、summary\_metrics.key、state、entity、createdAt などの run のプロパティでフィルターできます。たとえば、`{"config.experiment_name": "foo"}` は、設定エントリの実験名が "foo" に設定されている run を検索します。
</ResponseField>

<ResponseField name="order" type="str">
  (str) 順序には `created_at`、`heartbeat_at`、`config.*.value`、`summary_metrics.*` を指定できます。先頭に + を付けると昇順になります (デフォルト) 。先頭に - を付けると降順になります。デフォルトの順序は run.created\_at に基づく古い順です。
</ResponseField>

<ResponseField name="per_page" type="int">
  (int) クエリのページネーションのページサイズを設定します。
</ResponseField>

<ResponseField name="include_sweeps" type="bool">
  (bool) 各 run の結果で sweep オブジェクトを即時取得するかどうかを指定します。
</ResponseField>

<ResponseField name="lazy" type="bool">
  (bool) パフォーマンスを向上させるために遅延読み込みを使用するかどうかを指定します。True (デフォルト) の場合、最初は必須の run メタデータのみが読み込まれます。config、summaryMetrics、systemMetrics などの重いフィールドは、アクセス時にオンデマンドで読み込まれます。最初からすべてのデータを読み込むには False に設定してください。
</ResponseField>

<h5 id="examples-16">
  サンプル
</h5>

```python theme={"system"}
import wandb
from wandb.apis.public import Api

# project 内で config.experiment_name が "foo" に設定されている run を検索します
Api.runs(path="my_entity/project", filters={"config.experiment_name": "foo"})
```

```python theme={"system"}
# project 内で config.experiment_name が "foo" または "bar" に設定されている run を検索します
Api.runs(
    path="my_entity/project",
    filters={
        "$or": [
            {"config.experiment_name": "foo"},
            {"config.experiment_name": "bar"},
        ]
    },
)
```

```python theme={"system"}
# project 内で config.experiment_name が正規表現に一致する run を検索します
Api.runs(
    path="my_entity/project",
    filters={"config.experiment_name": {"$regex": "b.*"}},
)
```

注意:
正規表現は Google の RE2 構文を使用します:
[https://github.com/google/re2/wiki/Syntax](https://github.com/google/re2/wiki/Syntax)

```python theme={"system"}
# project 内で run 名が正規表現に一致する run を検索します
Api.runs(
    path="my_entity/project", filters={"display_name": {"$regex": "^foo.*"}}
)
```

```python theme={"system"}
# project 内の run を損失の昇順で並べて検索します
Api.runs(path="my_entity/project", order="+summary_metrics.loss")
```

<h3 id="method-apislack_integrations">
  <Badge color="blue" size="lg" shape="rounded">メソッド</Badge> Api.slack\_integrations()
</h3>

```python theme={"system"}
self, *,
entity: 'str | None' = None,
per_page: 'int' = 50,
start: 'str | None' = None
```

entity の Slack インテグレーションのイテレーターを返します。

<h5 id="arguments-35">
  引数
</h5>

<ResponseField name="entity" type="str | None">
  インテグレーションを取得する entity (例：チーム名) 。  指定しない場合は、ユーザーのデフォルトの entity を使用します。
</ResponseField>

<ResponseField name="per_page" type="int">
  ページごとに取得するインテグレーションの数。デフォルトは 50 です。  通常、変更する必要はありません。
</ResponseField>

<ResponseField name="start" type="str | None">
  説明はありません。
</ResponseField>

<h5 id="examples-17">
  サンプル
</h5>

チーム "my-team" に登録されているすべての Slack インテグレーションを取得します:

```python theme={"system"}
import wandb

api = wandb.Api()
slack_integrations = api.slack_integrations(entity="my-team")
```

チャンネル名が "team-alerts-" で始まるチャンネルに投稿する Slack インテグレーションのみを検索します:

```python theme={"system"}
slack_integrations = api.slack_integrations(entity="my-team")
team_alert_integrations = [
    ig
    for ig in slack_integrations
    if ig.channel_name.startswith("team-alerts-")
]
```

<h3 id="method-apisweep">
  <Badge color="blue" size="lg" shape="rounded">メソッド</Badge> Api.sweep()
</h3>

```python theme={"system"}
(self, path='')
```

`entity/project/sweep_id` 形式のパスを解析して sweep を返します。

<h5 id="arguments-36">
  引数
</h5>

<ResponseField name="path" type="_empty">
  entity/project/sweep\_id 形式の sweep へのパスです。`api.entity` が設定されている場合は project/sweep\_id 形式で指定でき、`api.project` が設定されている場合は sweep\_id のみで指定できます。
</ResponseField>

<h3 id="method-apisync_tensorboard">
  <Badge color="blue" size="lg" shape="rounded">メソッド</Badge> Api.sync\_tensorboard()
</h3>

```python theme={"system"}
(self, root_dir, run_id=None, project=None, entity=None)
```

tfevent ファイルを含むローカルディレクトリを wandb に同期します。

<h5 id="arguments-37">
  引数
</h5>

<ResponseField name="root_dir" type="_empty">
  説明はありません。
</ResponseField>

<ResponseField name="run_id" type="_empty">
  説明はありません。
</ResponseField>

<ResponseField name="project" type="_empty">
  説明はありません。
</ResponseField>

<ResponseField name="entity" type="_empty">
  説明はありません。
</ResponseField>

<h3 id="method-apiteam">
  <Badge color="blue" size="lg" shape="rounded">メソッド</Badge> Api.team()
</h3>

```python theme={"system"}
self,
team: 'str'
```

指定された名に一致する `Team` を返します。

<h5 id="arguments-38">
  引数
</h5>

<ResponseField name="team" type="str">
  チーム名。
</ResponseField>

<h3 id="method-apiupdate_automation">
  <Badge color="blue" size="lg" shape="rounded">メソッド</Badge> Api.update\_automation()
</h3>

```python theme={"system"}
self,
obj: 'Automation', *,
create_missing: 'bool' = False, **kwargs: 'Unpack[WriteAutomationsKwargs]'
```

既存のオートメーションを更新します。

<h5 id="arguments-39">
  引数
</h5>

<ResponseField name="obj" type="Automation">
  更新するオートメーション。  既存のオートメーションである必要があります。
</ResponseField>

<ResponseField name="create_missing" type="bool">
  True の場合、オートメーションが存在しなければ作成します。
</ResponseField>

<ResponseField name="kwargs" type="Unpack[WriteAutomationsKwargs]">
  説明はありません。
</ResponseField>

<h5 id="examples-18">
  サンプル
</h5>

既存のオートメーション ("my-automation") を無効にし、説明を編集します:

```python theme={"system"}
import wandb

api = wandb.Api()

automation = api.automation(name="my-automation")
automation.enabled = False
automation.description = "Kept for reference, but no longer used."

updated_automation = api.update_automation(automation)
```

または

```python theme={"system"}
import wandb

api = wandb.Api()

automation = api.automation(name="my-automation")

updated_automation = api.update_automation(
    automation,
    enabled=False,
    description="Kept for reference, but no longer used.",
)
```

<h3 id="method-apiupsert_run_queue">
  <Badge color="blue" size="lg" shape="rounded">メソッド</Badge> Api.upsert\_run\_queue()
</h3>

```python theme={"system"}
(self,
name: 'str',
resource_config: 'dict',
resource_type: 'public.RunQueueResourceType',
entity: 'str | None' = None,
template_variables: 'dict | None' = None,
external_links: 'dict | None' = None,
prioritization_mode: 'public.RunQueuePrioritizationMode | None' = None)
```

W\&B Launch で run キューを作成または更新します。

<h5 id="arguments-40">
  引数
</h5>

<ResponseField name="name" type="str">
  作成するキューの名
</ResponseField>

<ResponseField name="resource_config" type="dict">
  キューで使用するデフォルトのリソース設定 (省略可能) 。テンプレート変数を指定するには、handlebars (例：`{{var}}`) を使用します。
</ResponseField>

<ResponseField name="resource_type" type="public.RunQueueResourceType">
  キューで使用するリソースのタイプ。"local-container"、"local-process"、"kubernetes"、"sagemaker"、"gcp-vertex" のいずれかです。
</ResponseField>

<ResponseField name="entity" type="str | None">
  キューを作成する entity の名 (省略可能) 。`None` の場合は、設定済みの entity またはデフォルトの entity を使用します。
</ResponseField>

<ResponseField name="template_variables" type="dict | None">
  設定で使用するテンプレート変数のスキーマの辞書。
</ResponseField>

<ResponseField name="external_links" type="dict | None">
  キューで使用する外部リンクの辞書 (省略可能) 。
</ResponseField>

<ResponseField name="prioritization_mode" type="public.RunQueuePrioritizationMode | None">
  使用する優先順位付けのバージョン (省略可能) 。"V0" または None です
</ResponseField>

<h3 id="method-apiuser">
  <Badge color="blue" size="lg" shape="rounded">メソッド</Badge> Api.user()
</h3>

```python theme={"system"}
self,
username_or_email: 'str'
```

ユーザー名またはメールアドレスからユーザーを返します。

この関数はローカル管理者のみ使用できます。`api.viewer` を使用して
自分のユーザーオブジェクトを取得します。

<h5 id="arguments-41">
  引数
</h5>

<ResponseField name="username_or_email" type="str">
  ユーザーのユーザー名またはメールアドレス。
</ResponseField>

<h3 id="method-apiusers">
  <Badge color="blue" size="lg" shape="rounded">メソッド</Badge> Api.users()
</h3>

```python theme={"system"}
self,
username_or_email: 'str'
```

ユーザー名またはメールアドレスの部分一致でクエリし、該当するすべてのユーザーを返します。

この関数はローカル管理者のみ使用できます。`api.viewer` を使用して
自分のユーザーオブジェクトを取得します。

<h5 id="arguments-42">
  引数
</h5>

<ResponseField name="username_or_email" type="str">
  検索するユーザーの接頭辞または接尾辞。
</ResponseField>

<h3 id="method-apiwebhook_integrations">
  <Badge color="blue" size="lg" shape="rounded">メソッド</Badge> Api.webhook\_integrations()
</h3>

```python theme={"system"}
self,
entity: 'str | None' = None, *,
per_page: 'int' = 50,
start: 'str | None' = None
```

entity の webhook インテグレーションのイテレーターを返します。

<h5 id="arguments-43">
  引数
</h5>

<ResponseField name="entity" type="str | None">
  インテグレーションを取得する entity (例：チーム名) 。  指定しない場合は、ユーザーのデフォルトの entity を使用します。
</ResponseField>

<ResponseField name="per_page" type="int">
  ページごとに取得するインテグレーションの数。デフォルトは 50 です。  通常、変更する必要はありません。
</ResponseField>

<ResponseField name="start" type="str | None">
  説明はありません。
</ResponseField>

<h5 id="examples-19">
  サンプル
</h5>

チーム "my-team" に登録されているすべての Webhook インテグレーションを取得します:

```python theme={"system"}
import wandb

api = wandb.Api()
webhook_integrations = api.webhook_integrations(entity="my-team")
```

"[https://my-fake-url.com](https://my-fake-url.com)" にリクエストを送信する webhook インテグレーションのみを検索します:

```python theme={"system"}
webhook_integrations = api.webhook_integrations(entity="my-team")
my_webhooks = [
    ig
    for ig in webhook_integrations
    if ig.url_endpoint.startswith("https://my-fake-url.com")
]
```


## Related topics

- [API](/ja/support/models/tags/api.md)
