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

# メタデータ階層項目を取得

export const Link = ({href, children, className, ...props}) => {
  const localizedHref = localizeLink(href);
  return <a href={localizedHref} className={className} {...props}>
      {children}
    </a>;
};

export const MultiRelatedLinks = ({sections = []}) => {
  if (!sections || sections.length === 0) {
    return null;
  }
  return <div className="space-y-8">
      {sections.map((section, index) => <RelatedLinks key={index} title={section.title} items={section.items} />)}
    </div>;
};

export const RelatedLinks = ({title, items = []}) => {
  const getBadgeClass = badge => {
    if (!badge) return "badge-default";
    const badgeType = badge.toLowerCase().replace(/\s+/g, "-");
    return `badge-${badge === "ガイド" ? "guide" : badgeType}`;
  };
  if (!items || items.length === 0) {
    return null;
  }
  return <div className="my-8">
      {}
      <h3 className="text-sm font-bold uppercase tracking-wider mb-4">{title}</h3>

      {}
      <div className="flex flex-col gap-3">
        {items.map((item, index) => <a key={index} href={item.href} className="py-2 px-3 rounded related_link hover:bg-[#f2f2f2] dark:hover:bg-[#111827] flex items-center gap-3 group no-underline hover:no-underline border-b-0">
            {}
            <span className={`px-2 py-1 rounded-full text-xs font-semibold uppercase tracking-wide flex-shrink-0 ${getBadgeClass(item.badge)}`}>
              {item.badge}
            </span>

            {}
            <span className="text-base">{item.label}</span>
          </a>)}
      </div>
    </div>;
};

メタデータ階層に関する情報は、`namespace`、`taxonomy_key`、`node_id`、`field_key`を使用して取得できます。

## メタデータ階層ノードのリストを取得

メタデータ階層の中で定義されているノードのリストを取得します。ノードは、メタデータ階層で得られる階層的なデータです。

すべてのノードのリストを取得するには、<Link href="/reference/get-metadata-taxonomies-id-id-nodes">`GET /metadata_taxonomies/{namespace}/{taxonomy_key}/nodes`</Link> APIエンドポイントを呼び出します。

<CodeGroup>
  ```sh cURL theme={null}

  curl --request GET \ 
    --url https://api.box.com/2.0/metadata_taxonomies/{namespace}/{taxonomy_key}/nodes \ 
    --header 'Authorization: Bearer <token>' 
  ```

  ```python Python v10 theme={null}
  client.metadata_taxonomies.get_metadata_taxonomy_nodes(namespace, taxonomy_key)
  ```

  ```typescript Node/TypeScript v10 theme={null}
  await client.metadataTaxonomies.getMetadataTaxonomyNodes(namespace, taxonomyKey);
  ```

  ```swift Swift v10 theme={null}
  try await client.metadataTaxonomies.getMetadataTaxonomyNodes(namespace: namespace, taxonomyKey: taxonomyKey)
  ```

  ```java Java v10 theme={null}
  client.getMetadataTaxonomies().getMetadataTaxonomyNodes(namespace, taxonomyKey)
  ```

  ```cs .NET v10 theme={null}
  await client.MetadataTaxonomies.GetMetadataTaxonomyNodesAsync(namespaceParam: namespaceParam, taxonomyKey: taxonomyKey);
  ```
</CodeGroup>

<Info>
  メタデータ階層の<Link href="/reference/resources/metadata-taxonomy#schema-namespace">`namespace`</Link>および<Link href="/reference/resources/metadata-taxonomy#schema-key">`taxonomy_key`</Link>については、追加情報があります。
</Info>

## キーを指定してメタデータ階層を取得

含まれるレベルの数や、各レベルの表示名と説明を含む、特定のメタデータ階層のすべての定義を取得します。

メタデータ階層キーを指定して情報を取得するには、<Link href="/reference/get-metadata-taxonomies-id-id">`GET /metadata_taxonomies/{namespace}/{taxonomy_key}`</Link> APIエンドポイントを呼び出します。

<CodeGroup>
  ```sh cURL theme={null}

  curl --request GET \ 
    --url https://api.box.com/2.0/metadata_taxonomies/{namespace}/{taxonomy_key} \ 
    --header 'Authorization: Bearer <token>'
  ```

  ```python Python v10 theme={null}
  client.metadata_taxonomies.get_metadata_taxonomy_by_key(namespace, taxonomy_key)
  ```

  ```typescript Node/TypeScript v10 theme={null}
  await client.metadataTaxonomies.getMetadataTaxonomyByKey(
    namespace,
    taxonomyKey,
  );
  ```

  ```swift Swift v10 theme={null}
  try await client.metadataTaxonomies.getMetadataTaxonomyByKey(namespace: namespace, taxonomyKey: taxonomyKey)
  ```

  ```java Java v10 theme={null}
  client.getMetadataTaxonomies().getMetadataTaxonomyByKey(namespace, taxonomyKey)
  ```

  ```cs .NET v10 theme={null}
  await client.MetadataTaxonomies.GetMetadataTaxonomyByKeyAsync(namespaceParam: namespaceParam, taxonomyKey: taxonomyKey);
  ```
</CodeGroup>

<Info>
  メタデータ階層の<Link href="/reference/resources/metadata-taxonomy#schema-namespace">`namespace`</Link>および<Link href="/reference/resources/metadata-taxonomy#schema-key">`taxonomy_key`</Link>については、追加情報があります。
</Info>

## IDを指定してメタデータ階層ノードを取得

IDを使用して特定のノードとそのメタデータを取得することができます。ノードは、メタデータ階層で得られる階層的なデータです。

ノードを取得するには、<Link href="/reference/get-metadata-taxonomies-id-id-nodes-id">`GET /metadata_taxonomies/{namespace}/{taxonomy_key}/nodes/{node_id}`</Link> APIエンドポイントを呼び出します。

<CodeGroup>
  ```sh cURL theme={null}

  curl --request GET \ 
    --url https://api.box.com/2.0/metadata_taxonomies/{namespace}/{taxonomy_key}/nodes/{node_id} \ 
    --header 'Authorization: Bearer <token>' 
  ```

  ```python Python v10 theme={null}
  client.metadata_taxonomies.get_metadata_taxonomy_node_by_id(
      namespace, taxonomy_key, country_node.id
  )
  ```

  ```typescript Node/TypeScript v10 theme={null}
  await client.metadataTaxonomies.getMetadataTaxonomyNodeById(
    namespace,
    taxonomyKey,
    countryNode.id,
  );
  ```

  ```swift Swift v10 theme={null}
  try await client.metadataTaxonomies.getMetadataTaxonomyNodeById(namespace: namespace, taxonomyKey: taxonomyKey, nodeId: countryNode.id)
  ```

  ```java Java v10 theme={null}
  client.getMetadataTaxonomies().getMetadataTaxonomyNodeById(namespace, taxonomyKey, countryNode.getId())
  ```

  ```cs .NET v10 theme={null}
  await client.MetadataTaxonomies.GetMetadataTaxonomyNodeByIdAsync(namespaceParam: namespaceParam, taxonomyKey: taxonomyKey, nodeId: countryNode.Id);
  ```
</CodeGroup>

<Info>
  メタデータ階層の<Link href="/reference/resources/metadata-taxonomy#schema-namespace">`namespace`</Link>、<Link href="/reference/resources/metadata-taxonomy#schema-key">`taxonomy_key`</Link>、<Link href="/reference/resources/metadata-taxonomy-node#schema-id">`node_id`</Link>については、追加情報を使用できます。
</Info>

## メタデータ階層フィールドのオプションのリストを取得

メタデータテンプレート内で定義された、メタデータ階層フィールドで選択可能なオプションとなっているノードを取得します。

テンプレートにおけるメタデータ階層ノードの可能な値のリストを取得するには、<Link href="/reference/get-metadata-templates-id-id-fields-id-options">`GET /metadata_templates/{namespace}/{template_key}/fields/{field_key}/options`</Link> APIエンドポイントを呼び出します。

<CodeGroup>
  ```sh cURL theme={null}

  curl --request GET \  
    --url https://api.box.com/2.0/metadata_templates/{namespace}/{template_key}/fields/{field_key}/options \ 
    --header 'Authorization: Bearer <token>'
  ```

  ```python Python v10 theme={null}
  client.metadata_taxonomies.get_metadata_template_field_options(
      namespace, metadata_template_key, "taxonomy"
  )
  ```

  ```typescript Node/TypeScript v10 theme={null}
  await client.metadataTaxonomies.getMetadataTemplateFieldOptions(
    namespace,
    metadataTemplateKey,
    'taxonomy',
  );
  ```

  ```swift Swift v10 theme={null}
  try await client.metadataTaxonomies.getMetadataTemplateFieldOptions(namespace: namespace, templateKey: metadataTemplateKey, fieldKey: "taxonomy")
  ```

  ```java Java v10 theme={null}
  client.getMetadataTaxonomies().getMetadataTemplateFieldOptions(namespace, metadataTemplateKey, "taxonomy")
  ```

  ```cs .NET v10 theme={null}
  await client.MetadataTaxonomies.GetMetadataTemplateFieldOptionsAsync(namespaceParam: namespaceParam, templateKey: metadataTemplateKey, fieldKey: "taxonomy");
  ```
</CodeGroup>

<Info>
  メタデータ階層の<Link href="/reference/resources/metadata-taxonomy#schema-namespace">`namespace`</Link>、<Link href="/guides/metadata/templates/create#template-keys">`template_key`</Link>、<Link href="/guides/metadata/templates/create">`field_key`</Link>については、追加情報を使用できます。
</Info>

<RelatedLinks
  title="関連するAPI"
  items={[
{ label: translate("List metadata taxonomy nodes"), href: "/reference/get-metadata-taxonomies-id-id-nodes", badge: "GET" },
{ label: translate("Get metadata taxonomy by taxonomy key"), href: "/reference/get-metadata-taxonomies-id-id", badge: "GET" },
{ label: translate("Get metadata taxonomy node by ID"), href: "/reference/get-metadata-taxonomies-id-id-nodes-id", badge: "GET" },
{ label: translate("List metadata template's options for taxonomy field"), href: "/reference/get-metadata-templates-id-id-fields-id-options", badge: "GET" }
]}
/>

<RelatedLinks
  title="関連するガイド"
  items={[

{ label: translate("Create metadata taxonomy items"), href: "/guides/metadata/taxonomies/create", badge: "GUIDE" },
{ label: translate("List metadata taxonomies"), href: "/guides/metadata/taxonomies/list", badge: "GUIDE" },
{ label: translate("Update metadata taxonomies"), href: "/guides/metadata/taxonomies/update", badge: "GUIDE" },
{ label: translate("Remove metadata taxonomy items"), href: "/guides/metadata/taxonomies/remove", badge: "GUIDE" }

]}
/>

<RelatedLinks
  title="関連するリソース"
  items={[

{ label: translate("Metadata"), href: "/guides/metadata/index", badge: "GUIDE" }

]}
/>
