> For the complete documentation index, see [llms.txt](https://docs.flosum.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.flosum.com/devops/devops-ja/zu-zhi/no-1/metadtano.md).

# 組織メタデータの取得

## ![](https://225042527-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRpUu5iMlzMFAudyBvMOl%2Fuploads%2FG5ZbxX918xOHwbAwAJ4n%2FSummary2-Small-Icon.svg?alt=media\&token=da26a67f-ff7f-47b3-8669-06be960dc2d7) 概要

Flosum Cloud DevOps では、 **取得** ジョブは、組織のメタデータの最新バージョン、つまりブランチを構成するコンポーネントを取得します。各 Retrieve ジョブは、前回の取得以降に変更されたコンポーネントのみを取得します。

このメタデータは、変更を常に最新の状態に保つために 1 時間ごとに自動的に取得されます。それでも、この組織を使用するブランチをコミットまたはデプロイする前に、最新のデータを使用できるよう、メタデータを手動で取得することをお勧めします。

手動取得では、宣言的フィルターを設定して、フィルターに一致するコンポーネントのみを取得できます。これにより、組織内で多くの不要なコンポーネントが変更された場合に、Retrieve ジョブにかかる時間を短縮できます。

このガイドでは、組織のメタデータを手動で取得する方法について説明します。

{% hint style="info" %}

#### Retrieve Settings の除外コンポーネント

この組織の **Retrieve Settings** で Retrieve ジョブから除外するコンポーネントを設定している場合、手動取得でも、 **宣言的フィルター** が通常それらを含む場合でも、除外されたコンポーネントは対象外になります。Retrieve Settings の詳細については、次の記事を参照してください。

* [組織設定の変更 - 設定の取得](/devops/devops-ja/zu-zhi/no-1/no-no.md)
  {% endhint %}

{% hint style="info" %}

#### メタデータとは何ですか？

Salesforce のメタデータとは何か、またそれがどのように使用されるのかについては、以下の Salesforce の記事をお読みください。

* <https://www.salesforce.com/data/what-is-metadata/>
  {% endhint %}

## メタデータを取得

{% stepper %}
{% step %}

### 取得を開始

1. 次をクリックします **組織** を左側のサイドバーメニューから。
2. メタデータを取得する組織をクリックします。

   <div align="left"><figure><img src="https://225042527-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRpUu5iMlzMFAudyBvMOl%2Fuploads%2Fvvsg1J1yF1YK5wRyj26o%2FRetrievingOrganizationMetadata-S01-01.png?alt=media&amp;token=334f8535-5390-4981-b50c-d1bc2685e144" alt="" width="563"><figcaption></figcaption></figure></div>
3. 次をクリックします **取得**.

   <div align="left"><figure><img src="https://225042527-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRpUu5iMlzMFAudyBvMOl%2Fuploads%2F1RwllXGcRkgC7HyTOJTT%2FRetrievingOrganizationMetadata-S01-02.png?alt=media&amp;token=4807ba53-5535-4765-9015-ecadb3667c74" alt="" width="563"><figcaption></figcaption></figure></div>

{% endstep %}

{% step %}

### （任意）宣言的フィルターを追加

1. 次をクリックします **宣言的フィルター** のトグル。

   <div align="left"><figure><img src="https://225042527-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRpUu5iMlzMFAudyBvMOl%2Fuploads%2FcyA7TaYlIjQLgKeARDpK%2FRetrievingOrganizationMetadata-S02-01.png?alt=media&amp;token=43acd0ae-a5b9-48e7-9b57-81fae9fe592b" alt="" width="563"><figcaption></figcaption></figure></div>
2. 次をクリックします **フィールドを選択** のドロップダウンメニュー。
3. フィルター条件に使用するフィールドを選択します。

   <div align="left"><figure><img src="https://225042527-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRpUu5iMlzMFAudyBvMOl%2Fuploads%2FivQ2Pi2Wkmnlthls4NJN%2FRetrievingOrganizationMetadata-S02-02.png?alt=media&amp;token=605f8d1b-8bea-4eb7-b4a4-a9968c4d1fdb" alt="" width="563"><figcaption></figcaption></figure></div>
4. 次をクリックします **オプションを選択** のドロップダウンメニュー。
5. フィルター条件に使用する論理演算を選択します。

   <div align="left"><figure><img src="https://225042527-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRpUu5iMlzMFAudyBvMOl%2Fuploads%2Frj9WbYVOZ99p9En9edRr%2FRetrievingOrganizationMetadata-S02-03.png?alt=media&amp;token=8f92958c-5de4-4afa-9e6f-42b4a92780c5" alt="" width="563"><figcaption></figcaption></figure></div>
6. フィルターを入力 **値** をフィルター条件の最後のフィルターボックスに入力します。

   <div align="left"><figure><img src="https://225042527-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRpUu5iMlzMFAudyBvMOl%2Fuploads%2F014FiJ5JwLnoXln2NaRS%2FRetrievingOrganizationMetadata-S02-04.png?alt=media&amp;token=b9adaf3c-40f5-4f66-b807-9da19b5dacdc" alt="" width="563"><figcaption></figcaption></figure></div>

{% hint style="info" %}
フィルター条件の最後のフィルターボックスは、最初のフィルターボックスで **項目** 選択した **lastModifiedDate** の種類に応じて変化します。たとえば、上のスクリーンショットでは、
{% endhint %}
{% endstep %}

{% step %}

### （任意）複数の宣言的フィルターを追加

複数の宣言的フィルター条件を追加し、次の 2 つの方法で組み合わせることができます。

<table><thead><tr><th width="140.333251953125"></th><th></th></tr></thead><tbody><tr><td><strong>基本ロジック</strong></td><td>すべてのフィルター条件は <strong>AND</strong> 演算で結合され、すべてのフィルター条件を満たす必要があります。</td></tr><tr><td><strong>カスタムロジック</strong></td><td>独自のロジックを定義して、フィルター条件を組み合わせることができます。 <strong>AND</strong>, <strong>OR</strong>、および <strong>()</strong> 演算を使用します。フィルター条件は行番号で参照されます。たとえば、 <code>2 AND (1 OR 3)</code> は、条件 2 が満たされ、かつ条件 1 または条件 3 のいずれかが満たされる場合にフィルターが true になることを意味します。</td></tr></tbody></table>

1. 次をクリックします **フィルターを追加** して、別のフィルター条件を追加します。

   <div align="left"><figure><img src="https://225042527-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRpUu5iMlzMFAudyBvMOl%2Fuploads%2FOFmnaMR1ayHks2zpXxZS%2FRetrievingOrganizationMetadata-S03-01.png?alt=media&amp;token=890852e6-2b11-41e5-b1e8-9fa043d0bec6" alt="" width="563"><figcaption></figcaption></figure></div>
2. 上のセクションの手順に従ってフィルターを完了します。

   <div align="left"><figure><img src="https://225042527-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRpUu5iMlzMFAudyBvMOl%2Fuploads%2FIjUYt5qbA0QspZJTYUuh%2FRetrievingOrganizationMetadata-S03-02.png?alt=media&amp;token=303e864e-f6d1-4e29-9d93-216dc61362e0" alt="" width="563"><figcaption></figcaption></figure></div>
3. 必要な数だけフィルター条件を追加するには、この手順を繰り返します。
4. フィルター条件をどのように組み合わせるかを決定します。オプションについては上の表を参照してください。もし **基本ロジック** が使用されている場合、他に必要な操作はありません。

   <div align="left"><figure><img src="https://225042527-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRpUu5iMlzMFAudyBvMOl%2Fuploads%2F09XgRsV4ECDHEIPqLeJD%2FRetrievingOrganizationMetadata-S03-03.png?alt=media&amp;token=0fd0557d-5d26-4521-9e4b-147f303eb061" alt="" width="563"><figcaption></figcaption></figure></div>

**カスタムロジックを使用**

1. 選択してください **カスタム** オプションを使用してカスタムロジックを有効にします。

   <div align="left"><figure><img src="https://225042527-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRpUu5iMlzMFAudyBvMOl%2Fuploads%2FoAqUvhsWv1Eks9shWLni%2FRetrievingOrganizationMetadata-S03-04.png?alt=media&amp;token=4a478b2f-3f0b-456c-a2a0-4d0b22c612a3" alt="" width="563"><figcaption></figcaption></figure></div>
2. ドロップダウンメニューの右側にあるテキストボックスにカスタムロジックを入力します。

   <div align="left"><figure><img src="https://225042527-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRpUu5iMlzMFAudyBvMOl%2Fuploads%2F7s4lydjuyU1EGDSKi88t%2FRetrievingOrganizationMetadata-S03-05.png?alt=media&amp;token=e8b7a240-3dd2-448c-9ef2-dfa453ddf545" alt="" width="563"><figcaption></figcaption></figure></div>

{% hint style="info" %}
カスタムロジックでは **AND**, **OR**、および **()** 演算を使用して、フィルター条件を行番号で組み合わせることができます。
{% endhint %}
{% endstep %}

{% step %}

### Retrieve を実行

1. 次をクリックします **実行** 、Retrieve ジョブの設定が完了したら。

   <div align="left"><figure><img src="https://225042527-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRpUu5iMlzMFAudyBvMOl%2Fuploads%2FWY6gOZni79WAzhOcD4Cz%2FRetrievingOrganizationMetadata-S04-01.png?alt=media&amp;token=36f6936e-f9d1-4322-bcdb-76962db647e4" alt="" width="563"><figcaption></figcaption></figure></div>
2. Retrieve ジョブを開始すると、 **アクティビティ** タブに移動し、そこで状態を確認できます。

   <div align="left"><figure><img src="https://225042527-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRpUu5iMlzMFAudyBvMOl%2Fuploads%2F4s8GbI2yezeQLT0RgEN6%2FRetrievingOrganizationMetadata-S04-02.png?alt=media&amp;token=3152369c-c5cc-4c54-ae68-728fe3ae866f" alt="" width="563"><figcaption></figcaption></figure></div>

{% hint style="info" %}

#### 取得ステータス

Retrieve ジョブが完了するまでには、取得するコンポーネントの数によって数分かかることがあります。ジョブは **キュー済み**として開始され、その後 **進行中** になり、処理を開始します。更新ボタンをクリックしてジョブのステータスを更新します。

大きな Retrieve ジョブでは、ステータスが **一部完了**と表示されることがあります。これは、一部のコンポーネントはすでに取得されて使用可能であり、ジョブがバックグラウンドで残りの取得を続けていることを意味します。
{% endhint %}

3. ジョブのステータスが **完了**.
   {% endstep %}

{% step %}

### ログを表示

{% hint style="info" %}
Retrieve ジョブのログでは、前回の取得以降に追加または削除されたコンポーネントを含め、実行されたアクションを追跡できます。また、エラーも強調表示されるため、トラブルシューティングに役立ちます。Retrieve ジョブの結果とログの詳細については、次の記事を参照してください。

* [組織のアクティビティを表示](/devops/devops-ja/zu-zhi/no-1/noakutibitiwo.md)
  {% endhint %}

1. ジョブの **取得** リンクをクリックしてログを表示します。

   <div align="left"><figure><img src="https://225042527-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRpUu5iMlzMFAudyBvMOl%2Fuploads%2F5KoPlubKa595E854C0aC%2FRetrievingOrganizationMetadata-S05-01.png?alt=media&amp;token=d0ccda9c-d38a-4c9a-a477-12f690966592" alt="" width="563"><figcaption></figcaption></figure></div>
2. 次のスクリーンショットは、まだ変更されたコンポーネントを検出していない、完了途中のジョブの例を示しています。

   <div align="left"><figure><img src="https://225042527-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRpUu5iMlzMFAudyBvMOl%2Fuploads%2F3bEjXfw47UB171PksCPz%2FRetrievingOrganizationMetadata-S05-02.png?alt=media&amp;token=4287d4d7-0752-473c-a8f1-c80c32391bcc" alt="" width="563"><figcaption></figcaption></figure></div>

{% endstep %}
{% endstepper %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.flosum.com/devops/devops-ja/zu-zhi/no-1/metadtano.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
