---
title: GetCategoryTemplates Web メソッドの使用
slug: neurons-for-itsm/admin-user-help/jpn/latest/getcategorytemplates-web
createdAt: 2026-10-29T01:28:26.152Z
---

指定されたカテゴリのサービス カタログ内の申請項目のリストを返します。

## リクエスト構文

```bash
パブリック FRSHEATGetTemplatesResponse GetCategoryTemplates(文字列セッションキー、文字列テナント ID、文字列カテゴリ ID、文字列検索文字列)
```

## パラメータ

- **sessionKey**: **Connect** Web メソッドからのセッション キー。
- **tenantId**: セッション キーが認証されるテナント。
- **categoryId**: **GetCategories** Web メソッドからのサービス カタログ内のカテゴリの RecID。
- **searchString**: 一致するリクエストの提供を決定するためのサブ文字列。

## 戻り値

**FRSHEATGetTemplatesResponse** オブジェクトは次のように定義されます。

```bash
パブリッククラス FRSHEATGetTemplatesResponse
    {
パブリック文字列ステータス { 取得; 設定; }
パブリック文字列例外理由 { 取得; 設定; }
パブリック リスト<FRSHEATServiceReqTemplateListItem> srtList { 取得; 設定; }
    }
```

F**RSHEATGetTemplatesResponse&#x20;**&#x30AF;ラスには次のフィールドがあります。

- **ステータス**: 接続の状態に関するステータスを提供します。 以下の表には、使用可能なステータス値の詳細な説明が記載されています。
- **exceptionReason**: この Web メソッドの実行時にアプリケーションが例外をスローした場合の例外情報が含まれます。
- **srtList**: **FRSHEATServiceReqTemplateListItem** オブジェクトのリストが含まれます。各オブジェクトは検索条件に一致する申請項目を表します。

F**RSHEATServiceReqTemplateListItem&#x20;**&#x30AF;ラスは次のように定義されます。

```bash
パブリッククラスFRSHEATServiceReqTemplateListItem
    {
public string strRecId;
public string strName;
パブリック文字列 strDescription;
public string strSubscriptionId;
    }
```

F**RSHEATServiceReqTemplateListItem&#x20;**&#x30AF;ラスには次のフィールドがあります。

- **strRecId**: 申請項目に対応する RecID。
- **strName**: 申請項目の名前。
- **strDescription**: 申請項目の説明。
- **strSubscriptionId**: サブスクリプション ID。

次の表に、使用可能なステータス値とその解釈方法を示します。

| <font color="#FFFFFF">**状態**</font> | <font color="#FFFFFF">**説明**</font>                                                    |
| ----------------------------------- | -------------------------------------------------------------------------------------- |
| **成功**                              | サービス カタログ内の申請項目のリストを正常に取得しました。 このリストは **srtList** フィールドで使用できます。                        |
| **エラー**                             | この Web メソッドの実行中にエラーが発生しました。  対応する **exceptionReason** フィールドを調べて、Web メソッドが失敗した理由を特定します。 |

## 例

```bash
FRSHEATGetTemplatesResponse getTemplatesResponse = frSvc.GetCategoryTemplates(authSessionKey、tenantId、categoryid、searchString);

if (getTemplatesResponse.status == "成功")
            {
foreach (FRSHEATServiceReqTemplateListItem srTemplateListItem in getTemplatesResponse.srtList)
                {
Console.WriteLine("申請項目: {0} {1}", srTemplateListItem.strSubscriptionId, srTemplateListItem.strName);
                }
            }
```
