API ガイド


Red Hat Satellite 6.3

Red Hat Satellite の Representational State Transfer (REST) API 使用ガイド

Red Hat Satellite Documentation Team

概要

TRed Hat Satellite 6.3 Representational State Transfer (REST) API ガイドでは、REST API のコンセプトを説明し、さまざまな要求タイプの使用例を紹介します。このドキュメントは、管理者および開発者がカスタムのスクリプトを記述して、サードパーティーのアプリケーションと Red Hat Satellite を統合するための基本事項を説明します。

第1章 Red Hat Satellite API について

Red Hat Satellite は、物理環境、仮想環境、およびクラウド環境でのシステムのデプロイ、設定、および保守を可能にするシステム管理ソリューションです。これにより、一元化された単一のツールを使用して複数の Red Hat Enterprise Linux デプロイメントのプロビジョニング、リモート管理、監視が可能です。Red Hat Satellite Server は、Red Hat カスタマーポータルからのコンテンツを同期し、詳細なライフサイクル管理、ユーザーおよびグループのロールベースのアクセス制御、サブスクリプションの統合管理、高度な GUI、CLI、または API アクセスを含む機能を提供します。

1.1. Red Hat Satellite API

Red Hat Satellite には Representational State Transfer (REST) API が含まれています。ソフトウェア開発者やシステム管理者は、この API を使用することで、標準の Web インターフェイス以外で Red Hat Satellite 環境を制御できるようになります。REST API は、Red Hat Satellite の機能と、HTTP 経由で API にアクセスする外部アプリケーションやカスタムスクリプトを統合することを目的とする開発者や管理者には便利です。
注記
包括的な API リファレンスは、お使いの Satellite Server でご確認いただけます( satellite6.example.com は、お使いの Satellite Server のホスト名に置き換えてください)。Satellite 6 API のバージョン 1 と 2 が利用できますが、Red Hat ではバージョン 2 のみをサポートする点に注意してください。
REST API には、以下のようなメリットがあります。
  • 幅広いクライアントサポート: HTTP プロトコルをサポートする各種プログラミング言語、フレームワークまたはシステムで API を使用できます。
  • 自己記述型: 実行時に多くの詳細が発見されるため、クライアントアプリケーションでは、Red Hat Satellite インフラストラクチャーに関する知識が最小限で済みます。
  • リソースベースのモデル: リソースベースの REST モデルにより仮想化プラットフォームを自然な形で管理することが可能です。
これにより、開発者および管理者は以下のような作業を行うことができます。
  • エンタープライズ IT システムとの統合
  • サードパーティー製のアプリケーションとの統合
  • 自動メンテナンスやエラーチェックなどのタスクの実行
  • スクリプトによる反復タスクの自動化

1.2. Representational State Transfer

Representational State Transfer (REST)は、特定のサービスとその表現に焦点を当てたソフトウェア設計アーキテクチャーです。リソース表現は、情報の主要な抽象化で、サーバー上の特定の 1 つの管理要素に対応します。クライアントは Uniform Resource Identifier (URI)にある server 要素にリクエストを送信し、GETPOSTPUTDELETE などの標準の HTTP メソッドで操作を実行します。これにより、クライアントとサーバー間でステートレスに通信が行われ、各要求が他の要求とは独立して機能し、要求完了に必要なすべての情報が含まれます。

1.3. Hammer CLI ツールと Satellite API の比較

多くのタスクで、Hammer も Satellite API も同じように利用できます。Hammer は、スクリプトに適用する前に API の呼び出しの応答をテストするなど、Satellite API よりも使いやすいインターフェイスとして利用できます( hammer -d organization listなど、Hammer で発行した API の呼び出しを検査するには-d オプションを使用します)。API での変更は自動的に Hammer に適用されますが、API を直接使用するスクリプトは手動で更新する必要があります。
バックグラウンドで、各 Hammer コマンドは最初に API へのバインドを確立し、要求を送信します。この動作は、大量の Hammer コマンドを順に実行する場合に、パフォーマンスに影響を与える可能性があります。一方、API で直接接続するスクリプトを使用すると、バインドを確立するのは一度で済みます。詳細情報は、Hammer CLI ガイド を参照してください。

第2章 API リファレンス

包括的な API リファレンスは、お使いの Satellite Server でご確認いただけます( satellite6.example.com は、お使いの Satellite Server のホスト名に置き換えてください)。Satellite 6 API のバージョン 1 と 2 が利用できますが、Red Hat ではバージョン 2 のみをサポートする点に注意してください。

2.1. API 構文の理解

ビルトイン API リファレンスは、HTTP 動詞の後に API ルートまたはパスを示します。
HTTP_VERB API_ROUTE
Copy to Clipboard Toggle word wrap
API が使用する HTTP 動詞は、GET、POST、PUT、および DELETE です。一部の例は、http://satellite6.example.com/apidoc/v2/hosts.html の API リファレンスドキュメントの HOSTS セクションを参照してください。API 構文および curl コマンドに慣れている場合は、本セクションをスキップできます。
API を使用するには、リファレンスドキュメントの API ルートと、コマンドのドキュメントからコマンド構文を使用して、コマンドを作成します。たとえば、curl の man ページには、以下の基本的な構文
curl [options] [URL...]
Copy to Clipboard Toggle word wrap
が表示されます。本ガイドで使用するオプションには -X、--request コマンド が含まれます。ここでの command は HTTP 動詞です。
HTTP 動詞 (GET) の使用
HTTP 動詞の GET は、既存のエントリーまたはリソースに関して API からデータを取得するのに使用します。
GET /api/hosts などの API HOST セクションと curl 構文を組み合わせると、以下のようになります。
curl -X GET https://satellite6.example.com/api/hosts
Copy to Clipboard Toggle word wrap
Satellite は API への接続向けの HTTPS のみをサポートし、一部の認証形式が必要です。
使用可能な例として、少なくとも the -u オプションを指定してユーザー名を追加し、SSL ピア証明書の検証チェックをスキップするには -k オプションを追加する必要があります。
$ curl -X GET -k -u sat_username https://satellite6.example.com/api/hosts
Enter host password for user 'sat_username':
{
  "total": 2,
  "subtotal": 2,
  "page": 1,
  "per_page": 20,
  "search": null,
  "sort": {
    "by": null,
    "order": null
  },
  "results":
	output truncated
Copy to Clipboard Toggle word wrap
API からの上記の応答により合計 2 つの結果が返され、以下のような 2 つの結果が返されたこと、これは結果の 1 ページ目で、ページごとの最大結果数は 20 に設定されていることが分かります。これについては、「JSON 応答形式の理解」 で詳細に説明されています。
API リファレンスの例には、:パラメーターの前にコロンが付いた用語が含まれています。たとえば、
GET /api/hosts/:id
Copy to Clipboard Toggle word wrap
これらは API ルートパラメーターであり、適切な値に置き換える必要があります。ルートパラメーターはコロンで始まり、ID が で 終わる
注記
Satellite 6 では、API のバージョン 2 がデフォルトです。したがって、API 呼び出しの URL に v2 を使用する必要はありません。
HTTP 動詞 (POST) の使用
HTTP 動詞 POST は、データを API に送信して新規エントリーまたはリソースを作成するために使用されます。データは JSON 形式である必要があり、-- d, --data オプションの後に中かっこ {} で囲まれた引用符で囲まれた JSON 形式のデータをイン ラインで含めることができます。引用符で囲まれていない JSON 形式のデータをファイルで囲み、curl コマンドの @ オプションを使用して指定することもできます。たとえば、d @ファイル.json です。
JSON 形式のデータに外部ファイルを使用する利点は、引用やエスケープの問題が少なく、構文チェッカーを備えた好みのエディターを使用して間違いを見つけ、回避でき、JSON データの妥当性を確認して再フォーマットする外部ツールを使用できることです。たとえば、yajl パッケージには、json_verify ツールと json_reformat ツールが含まれています。
json_verify ツールを使用すると、以下のように JSON ファイルの有効性を確認できます。
$ json_verify < test_file.json
Copy to Clipboard Toggle word wrap
API コールによって返される非構造化 JSON データは、python モジュール json.tool でパイプできます。
curl API_call | python -m json.tool
Copy to Clipboard Toggle word wrap
または、json_reformat ツールを使用してください。
curl API_call | json_reformat
Copy to Clipboard Toggle word wrap
出力形式については、「JSON 応答形式の理解」 で説明されています。
API リファレンスには、アクティベーションキー セクションに以下が含まれます。
POST /katello/api/activation_keys
Copy to Clipboard Toggle word wrap
これは、POST /katello/api/activation_keys コマンドの形式になります。
curl -X POST -k -u sat_username:sat_password \
-d @file_of_json-formatted_data \
https://satellite6.example.com/katello/api/activation_keys
Copy to Clipboard Toggle word wrap
HTTP 動詞 POST の仕組みを確認するには、以下のように内容を含むテストファイル(例: activation-key.json )を作成します。
{"organization_id":1, "name":"TestKey", "description":"Just for testing"}
Copy to Clipboard Toggle word wrap
以下の例では、先程作成したファイルのデータを適用して、新規アクティベーションキーを作成します。
$ curl -H "Accept:application/json,version=2" \
-H "Content-Type:application/json" -X POST \
-u sat_username:sat_password -k \
-d @activation-key.json \
https://satellite6.example.com/katello/api/activation_keys | json_reformat
{
    "id": 2,
    "name": "TestKey",
    "description": "Just for testing",
    "unlimited_hosts": true,
    "auto_attach": true,
    "content_view_id": null,
    "environment_id": null,
    "usage_count": 0,
    "user_id": 3,
    "max_hosts": null,
    "release_version": null,
    "service_level": null,
    "content_overrides": [

    ],
    "organization": {
        "name": "Default Organization",
        "label": "Default_Organization",
        "id": 1
    },
    "created_at": "2017-02-16 12:37:47 UTC",
    "updated_at": "2017-02-16 12:37:48 UTC",
    "content_view": null,
    "environment": null,
    "products": null,
    "host_collections": [

    ],
    "permissions": {
        "view_activation_keys": true,
        "edit_activation_keys": true,
        "destroy_activation_keys": true
    }
}
Copy to Clipboard Toggle word wrap
Web UI でこのエントリーを表示するには、コンテンツアクティベーションキー に移動します。変更後は、必ずページを再読み込みしてください。
HTTP 動詞 (PUT) の使用
HTTP 動詞の PUT は、データを API に送信して、既存のエントリーまたはリソースを更新するために使用されます。POST API 呼び出しと同様に、データは JSON 形式である必要があり、d, --data オプションの後に中かっこ {} で囲まれた引用符で囲まれた JSON 形式のデータをイン ラインで含めることができます。引用符で囲まれていない JSON 形式のデータをファイルで囲み、curl コマンドの @ オプションを使用して指定することもできます。たとえば、d @ファイル.json です。
既存の値を変更したり、既存のリソースに追加する場合は、HTTP 動詞(PUT)を使用します。API リファレンスには、アクティベーションキーを更新するための以下のエントリーがあります。
PUT /katello/api/activation_keys/:id
Copy to Clipboard Toggle word wrap
既存のアクティベーションキーを更新するには、以下の形式のコマンドを使用します。
curl -X PUT -k -u sat_username:sat_password \
-d @file_of_json-formatted_data \
https://satellite6.example.com/katello/api/activation_keys/:id
Copy to Clipboard Toggle word wrap
:id を、更新するアクティベーションキーの ID に置き換えます。同じ値で PUT コマンドを複数回使用しても、複数のエントリー は作成されません
たとえば、以前の例で作成したテスト用のアクティベーションキーを更新するには、以下のように以前作成したファイルを編集します。
{"organization_id":1, "name":"TestKey", "description":"Just for testing","max_hosts":"10" }
Copy to Clipboard Toggle word wrap
以下のコマンドを使用して、JSON ファイルに変更を適用します。
$ curl -H "Accept:application/json,version=2" \
-H "Content-Type:application/json" -X PUT \
-u sat_username:sat_password -k \
-d @activation-key.json \
https://satellite6.example.com/katello/api/activation_keys/2
{
    "id": 2,
    "name": "TestKey",
    "description": "Just for testing",
    "unlimited_hosts": false,
    "auto_attach": true,
    "content_view_id": null,
    "environment_id": null,
    "usage_count": 0,
    "user_id": 3,
"max_hosts": 10,
    "release_version": null,
    "service_level": null,
    "content_overrides": [

    ],
    "organization": {
        "name": "Default Organization",
        "label": "Default_Organization",
        "id": 1
    },
    "created_at": "2017-02-16 12:37:47 UTC",
    "updated_at": "2017-02-16 12:46:17 UTC",
    "content_view": null,
    "environment": null,
    "products": null,
    "host_collections": [

    ],
    "permissions": {
        "view_activation_keys": true,
        "edit_activation_keys": true,
        "destroy_activation_keys": true
    }
}

Copy to Clipboard Toggle word wrap
HTTP 動詞 (DELETE) の使用
リソースを削除するには、削除するリソース ID を含む API ルートと DELETE 動詞を使用します。
既存のアクティベーションキーを削除するには、以下の形式のコマンドを使用します。
curl -X DELETE -k -u sat_username:sat_password \
https://satellite6.example.com/katello/api/activation_keys/:id
Copy to Clipboard Toggle word wrap
:id を、削除するアクティベーションキーの ID に置き換えます。以下に例を示します。
$ curl -H "Accept:application/json,version=2" \
-H "Content-Type:application/json" -X DELETE \
-u admin:RedHat1! -k \
https://satellite6.example.com/katello/api/activation_keys/2 | json_reformat
output omitted
    "started_at": "2017-02-16 12:58:17 UTC",
    "ended_at": "2017-02-16 12:58:18 UTC",
    "state": "stopped",
    "result": "success",
    "progress": 1.0,
    "input": {
        "activation_key": {
            "id": 2,
            "name": "TestKey"
output truncated
Copy to Clipboard Toggle word wrap
API エラーメッセージと API リファレンスの関連付け
API はエラーの表示に RAILS 形式を使用します。
Nested_Resource.Attribute_Name
Copy to Clipboard Toggle word wrap
これは、以下のように、API リファレンスで使用する形式に変換されます。
Resource[Nested_Resource_attributes][Attribute_Name_id]
Copy to Clipboard Toggle word wrap

2.2. JSON 応答形式の理解

GET を使用した API への呼び出しは、JSON 形式の結果を返します。Python json.tool モジュールを介して出力を渡すと、人間が判読できる形式で出力されます。
コレクション用の JSON 応答形式
コレクションは、ホストとドメインなどのオブジェクトリストです。JSON 応答コレクションの形式は、メタデータのフィールドセクションの後に結果セクションで設定されます。以下は、API ルート GET /api/domains を使用する場合のドメイン一覧のコレクション JSON レスポンスの形式例です。この出力は json.tool でパイプされ、結果セクションを読みやすくしました。
$ curl -X GET -k -u admin:password https://satellite6.example.com/api/domains | python -m json.tool
{
    "total": 3,
    "subtotal": 3,
    "page": 1,
    "per_page": 20,
    "search": null,
    "sort": {
        "by": null,
        "order": null
    },
    "results": [
        {
            "id": 23,
            "name": "qa.lab.example.com",
            "fullname": "QA",
            "dns_id": 10,
            "created_at": "2013-08-13T09:02:31Z",
            "updated_at": "2013-08-13T09:02:31Z"
        },
        {
            "id": 25,
            "name": "sat.lab.example.com",
            "fullname": "SATLAB",
            "dns_id": 8,
            "created_at": "2013-08-13T08:32:48Z",
            "updated_at": "2013-08-14T07:04:03Z"
        },
        {
            "id": 32,
            "name": "hr.lab.example.com",
            "fullname": "HR",
            "dns_id": 8,
            "created_at": "2013-08-16T08:32:48Z",
            "updated_at": "2013-08-16T07:04:03Z"
        }
    ]
}
Copy to Clipboard Toggle word wrap
応答のメタデータのフィールドの説明は以下のとおりです。
  • total: 検索パラメーターなしのオブジェクトの合計数
  • Sub total: 検索パラメーターを指定して返されたオブジェクトの数(検索がない場合は、合計が合計と同じになります)。
  • page: ページ番号。
  • per_page: ページごとに返す最大オブジェクト数
  • limit: コレクションの応答で返すオブジェクトの指定数
  • offset: コレクションを返す前に省略するオブジェクト数
  • Search: scoped_scoped 構文をもとにした検索文字列
  • sort
    • by: コレクションがソートされるフィールド。
    • order: ソート順(ASC は昇順、DESC は降順)
  • 結果: オブジェクトのコレクション
単一オブジェクトの JSON 応答形式
単一オブジェクトの JSON 応答を使用して、単一のオブジェクトを表示します。GET リクエストには、オブジェクトの一意の識別子 :id または :name が必要です。:name は、常に一意の識別子として使用できませんが、:id を常に使用できます。単一オブジェクトの JSON 応答の形式は、オブジェクトの属性のみで設定されます。
以下は、API ルートの GET /api/domains/ 23 または GET /api/domains/ qa.lab.example.com を使用する場合の単一オブジェクト JSON 応答の形式例です。
$ curl -X GET -k -u admin:password https://satellite6.example.com/api/domains/23 | python -m json.tool
{
    "id": 23,
    "name": "qa.lab.example.com",
    "fullname": "QA",
    "dns_id": 10,
    "created_at": "2013-08-13T09:02:31Z",
    "updated_at": "2013-08-13T09:02:31Z"
}
Copy to Clipboard Toggle word wrap

第3章 API 呼び出しの認証

Satellite API との対話には認証が必要です。各 API 要求で使用するローカルホストに Satellite Server CA 証明書をダウンロードして、SSL 認証を提供できます。各 API リクエストには、有効なユーザー名とパスワードも必要です。これらについては、以下のセクションで説明します。

3.1. SSL 認証の使用

Red Hat Satellite は HTTPS を使用して、Red Hat Satellite Server との通信時に、一定の暗号化およびアイデンティティーの検証を行います。SSL 以外の通信は、Satellite 6 ではサポートされていません。
各 Red Hat Satellite Server は自己署名証明書を使用します。この証明書は、暗号化キーを検証するサーバー証明書および Satellite Server のアイデンティティーを信頼する証明局のロールを果たします。以下の手順は、Satellite Server に SSL 認証を設定する方法を説明します(この場合は satellite6.example.com)。
  1. 以下のオプションのいずれかを使用して、通信する Satellite Server (satellite6.example.com)から証明書を取得します。
    1. SSH を使用して証明書を取得するには、以下のコマンドを実行します。
      $ scp root@satellite6.example.com:/var/www/html/pub/katello-server-ca.crt ./
      Copy to Clipboard Toggle word wrap
    2. コマンドを Satellite Server で直接実行する場合は、以下のコマンドを実行してローカルで利用可能なコピーから証明書を取得します。
      $ cp /var/www/html/pub/katello-server-ca.crt ./
      Copy to Clipboard Toggle word wrap
    3. HTTP を使用して証明書を取得するには、以下のコマンドを実行します。
      $ curl -O http://satellite6.example.com/pub/katello-server-ca.crt
      Copy to Clipboard Toggle word wrap
      警告
      暗号化されていない HTTP 接続を使用して証明書を取得すると、セキュリティーリスクにさらされる可能性があります。
  2. クライアント上の証明書を認証局として使用して、Satellite Server の ID を検証します。
    $ curl -X GET -u sat_username:sat_password \
    -H "Accept:application/json" --cacert katello-server-ca.crt \
    https://satellite6.example.com/katello/api/organizations
    Copy to Clipboard Toggle word wrap
    GET はデフォルトのアクションであるため、ここで は GET 属性を省略することができます。
  3. Network Security Services (NSS) データベースを作成して証明書を保存します。
    $ certutil -N -d sql:$HOME/.pki/nssdb
    Enter a password which will be used to encrypt your keys.
    The password should be at least 8 characters long,
    and should contain at least one non-alphabetic character.
    
    Enter new password:
    Re-enter password:
    Copy to Clipboard Toggle word wrap
    NSS データベースがすでに存在する場合には、以下のようにパスワードが求められます。
    Enter Password or Pin for "NSS Certificate DB":
    Copy to Clipboard Toggle word wrap
  4. 以下のコマンドを使用して、NSS データベースに永続的に証明書を追加します。
    $ certutil -d sql:$HOME/.pki/nssdb -A -t TC -n "Red Hat Satellite" \
    -i katello-server-ca.crt
    Copy to Clipboard Toggle word wrap
    これにより、証明書が NSS データベースにインポートされます。つまり、要求ごとに the- cacert オプションを省略できます。これは、次のようにテストできます。
    $ curl -X GET -u sat_username:sat_password https://satellite6.example.com/api/v2/hosts
    {
        "total": 2,
        ...,
        "results": [
            ...
        ]
    }
    output omitted
    Copy to Clipboard Toggle word wrap

3.2. HTTP 認証の使用

Satellite API への要求にはすべて、適切なユーザー名とパスワードが必要です。API は HTTP Basic 認証を使用します。 [1] これらのクレデンシャルをエンコードするには、それが Authorization ヘッダーに追加されます。要求に適切な Authorization ヘッダーが含まれていない場合には、API は 401 Authorization Required エラーを返します。
重要
Basic 認証では、パスワードなどの機密情報がプレーンテキストで送信される可能性があります。REST API には、プレーンテキストの要求をトランスポートレベルで暗号化する HTTPS が必要です。
base64 ライブラリーによっては、暗号化された認証情報を複数行に分け、行末には改行文字を付けることがあります。そのような場合には、ヘッダーが破損し、要求に問題が発生します。認証ヘッダーには、エンコードされた認証情報がヘッダー内に一行で記載されている必要があります。


[1] Basic 認証については、RFC 2617 HTTP Authentication: Basic and Digest Access Authentication で説明されています。

3.3. OAuth 認証の使用

Basic 認証の代わりに、制約はありますが API で OAuth 1.0 認証をサポートしています (プロトコルのバージョン 1.0a の 1-legged OAuth と呼ばれることもあります)。

3.3.1. OAuth の認証

Satellite 6.3 では、OAuth はデフォルトで有効になっています。設定は /etc/foreman/settings.yaml 設定ファイルに保存され、AdministerSettingsAuth に移動して Web UI で確認できます。OAuth コンシューマーキー は全 OAuth クライアントが使用するトークンです。Web UI の特定の値は変更できません。これらの値は、新しいオプションで satellite-installer スクリプトを再度実行することによってのみ変更できます。アップグレード時に、ファイルを手動で変更すると変更が失われることに注意してください。以下のコマンドを入力して、OAuth 関連のインストーラーオプションをすべて表示します。
# satellite-installer --full-help | grep oauth
Copy to Clipboard Toggle word wrap
OAuth を使用して行われたすべての API リクエストを組み込みの匿名 API 管理者アカウントとして承認する場合は、/etc/foreman/settings.yaml ファイルで OAuth マップユーザーfalse に設定したままにします。リクエストを行うユーザーを指定する場合は、この設定オプションを true に変更します。これにより、クライアントは既存の Foreman ユーザーのログインを含む FOREMAN-USER ヘッダーを送信できます。
重要
ヘッダーは OAuth 要求で署名されないため、偽造される可能性があります。有効なコンシューマーキーを持つユーザーなら誰でも、Foreman ユーザーになりすますことができます。

3.3.2. OAuth 要求の作成

通常、OAuth クライアントライブラリーは要求の生成に使用されます。curl を使用した OAuth 要求の例は、こちらでどのように機能するかを理解するのに役立ちます。

例3.1 curl を使用した OAuth 要求の例

$ curl 'https://satellite6.example.com/api/architectures' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json,version=2' \
-H 'FOREMAN-USER: User1' \
-H 'Authorization: OAuth oauth_version="1.0",oauth_consumer_key="secretkey",oauth_signature_method="hmac-sha1",oauth_timestamp=1321473112,oauth_signature=Il8hR8/ogj/XVuOqMPB9qNjSy6E='
Copy to Clipboard Toggle word wrap
上記の例では、認証に OAuth を使用してリストされています。ログイン User1 を持つユーザーとして要求を試みます。Foreman 設定でマッピングが有効になっている場合、結果には、ユーザー User1 が確認できるアーキテクチャーのみが含まれます。署名は手動で構築されたことに注意してください。これは oauth_timestamp の変更で変更する必要がある点に注意してください。また、署名にはすべてのパラメーター、HTTP メソッド、および URI の変更を反映します。そのため、OAuth クライアントライブラリーを使用してすべての OAuth パラメーターを構築することが推奨されます。

第4章 Red Hat Satellite API のスタートガイド

この章では、Red Hat Satellite API を使用して各種タスクを実行する方法をさまざまな例を挙げて説明します。以下の例では、ポート 443 で HTTPS を使用する Satellite Server に重点を置いています。Satellite Capsule から API にアクセスすることもできますが、ポート 8443 を使用する必要があります。そうしないと、API 呼び出しが失敗します。
スクリプト自体で、異なるポートの要件に対応することができます。たとえば、Ruby では Satellite および Capsule の URL を以下のように指定することができます。
url = 'https://satellite6.example.com/api/v2/'
capsule_url = 'https://capsule.example.com:8443/api/v2/'
katello_url = 'https://satellite6.example.com/katello/api/v2/'
Copy to Clipboard Toggle word wrap
ホストが Satellite Server または Capsule Server にサブスクライブしている場合は、/etc/rhsm/rhsm.conf ファイルの [server] セクションの エントリーをもとに、API へのアクセスに必要な、正しいポートを判断できます。これらの値を使用してスクリプトを完全に自動化し、使用するポートを検証する必要性をなくします。

4.1. curl を使用した API の例

本セクションでは、curl を使用して Satellite API を使用してさまざまなタスクを実行する方法を説明します。

4.1.1. シンプルなクエリーの実行

以下の例では、curl を使用して Satellite デプロイメントに関する情報を検索する方法を説明します。これらの例には、実際のコマンドとサンプル出力、およびユーザー名とパスワードの例の値が含まれます。デプロイメントごとに、異なる結果が得られることが想定されます。これらの例では、python -m json.tool コマンドを使用して出力をフォーマットしています。
注記
Red Hat Satellite は HTTPS と、デフォルトではホストの識別用に証明書を使用する必要があります。「SSL 認証の使用」 の記載どおりに Satellite Server の証明書を追加していない場合には、-k (セキュアでない)オプションを使用して証明書チェックを省略することができます。
ユーザー認証の場合は、form -u username:password を使用するか、パスワードを含めない場合はコマンドにより入力が求められます。Red Hat は、コマンドの一部としてパスワードを含めないことを推奨します。パスワードはシェル履歴の一部になり、セキュリティーリスクが生じる可能性があります。この例には、簡素化の目的でのみパスワードが含まれています。
curl-s (サイレント)オプションを使用する場合は、進捗メーターやエラーメッセージは表示されません。

リソースリストの取得

以下は、リソースの一覧を返す基本的なクエリーです。このような要求では、メタデータでラップされたデータリストを返しますが、他の要求タイプでは実際のオブジェクトが返されます。

$ curl -X GET -s -k -u sat_username:sat_password https://satellite6.example.com/api/v2/hosts | python -m json.tool

{
       "total" => 2,
    "subtotal" => 2,
        "page" => 1,
    "per_page" => 1000,
      "search" => nil,
        "sort" => {
           "by" => nil,
        "order" => nil
    },
     "results" => [
      ...
}
Copy to Clipboard Toggle word wrap

例4.1 ユーザーのリスト表示

$ curl -X GET -s -k -u sat_username:sat_password https://satellite6.example.com/api/users
{
  "total": 1,
  "subtotal": 1,
  "page": 1,
  "per_page": 20,
  "search": null,
  "sort": {
    "by": null,
    "order": null
  },
  "results": [{"firstname":"Admin","lastname":"User","mail":"root@example.com","admin":true,"auth_source_id":1,"auth_source_name":"Internal","timezone":null,"locale":null,"last_login_on":"2017-02-08 23:25:51 UTC","created_at":"2017-01-09 12:10:02 UTC","updated_at":"2017-02-08 23:25:51 UTC","id":3,"login":"admin","default_location":null,"locations":[],"default_organization":{"id":1,"name":"Default Organization","title":"Default Organization","description":null},"organizations":[]}]
}
Copy to Clipboard Toggle word wrap

一般的なホストクエリーの実行

以下のクエリーは、satellite6.example.com ホストの情報を返します。

$  curl -X GET -s -k -u sat_username:sat_password https://satellite6.example.com/api/v2/hosts/satellite6.example.com | python -m json.tool
{
    "all_puppetclasses": [],
    "architecture_id": 1,
    "architecture_name": "x86_64",
    "build": false,
    "capabilities": [
        "build"
    ],
    "certname": "satellite6.example.com",
    "comment": null,
    "compute_profile_id": null,
    ...
}
Copy to Clipboard Toggle word wrap

特定のホストのファクト検索

以下のクエリーは、satellite6.example.com ホストの全ファクトを返します。

$ curl -X GET -s -k -u sat_username:sat_password https://satellite6.example.com/api/v2/hosts/satellite6.example.com/facts | python -m json.tool
{
...
    "results": {
        "satellite6.example.com": {
            "augeasversion": "1.0.0",
            "bios_release_date": "01/01/2007",
            "bios_version": "0.5.1",
            "blockdevice_sr0_size": "1073741312",
            "facterversion": "1.7.6",
            ...
}
Copy to Clipboard Toggle word wrap

一致するパターンがあるか全ホストの検索

以下のクエリーは、example というパターンと一致するホストをすべて返します。

$ curl -X GET -s -k -u sat_username:sat_password https://satellite6.example.com/api/v2/hosts?search=example | python -m json.tool
{
    ...
    "results": [
        {
            "name": "satellite6.example.com",
            ...
        }
    ],
    "search": "example",
    ...
}
Copy to Clipboard Toggle word wrap

特定の環境内の全ホスト検索

以下のクエリーは、production 環境内の全ホストを返します。

$ curl -X GET -s -k -u sat_username:sat_password https://satellite6.example.com/api/v2/hosts?search=environment=production | python -m json.tool
{
    ...
    "results": [
        {
            "environment_name": "production",
            "name": "satellite6.example.com",
            ...
        }
    ],
    "search": "environment=production",
    ...
}
Copy to Clipboard Toggle word wrap

特定のファクト値を持つ全ホストの検索

以下のクエリーでは、RHEV Hypervisor というモデル名を持つホストがすべて返されます。

$ curl -X GET -s -k -u sat_username:sat_password https://satellite6.example.com/api/v2/hosts?search=model=\"RHEV+Hypervisor\" | python -m json.tool
{
    ...
    "results": [
        {
            "model_id": 1,
            "model_name": "RHEV Hypervisor",
            "name": "satellite6.example.com",
            ...
        }
    ],
    "search": "model=\"RHEV Hypervisor\"",
    ...
}
Copy to Clipboard Toggle word wrap

ホストの削除

以下のクエリーでは、名前が host1.example.com のホストが削除されます。

curl -k -u sat_username:sat_password -X DELETE https://satellite6.example.com/api/v2/hosts/host1.example.com
Copy to Clipboard Toggle word wrap

4.1.2. リソースの作成および変更

Satellite API を使用して、Satellite Server のリソースを操作できます。これらの API 呼び出しでは、クエリーを実行する単純なユーザー名、パスワード、および URI 以外にさまざまなパラメーターを渡す必要があります。たとえば、Satellite Server にコンテンツをアップロードするか、Satellite リソースを変更するには、要求の作成時にヘッダーに追加情報を追加する必要があります。
以下の例のように、API のバージョンは、ヘッダーで、または URL の一部として指定できます。たとえば、https://satellite6.example.com/api/v2/architectures は要求ヘッダーで Accept:version=2 を使用するのと同じです。URL の仕様が優先されます。
以下は、POST 要求の基本構文です。
$ curl -H "Accept:application/json,version=2" \
       -H "Content-Type:application/json" -X POST \
       -u username:password -k \
       -d json-formatted-data https://satellite6.example.com
Copy to Clipboard Toggle word wrap
たとえば、新規アーキテクチャーを作成するには、以下の例のような要求を使用することができます。
$ curl -H "Accept:application/json,version=2" \
       -H "Content-Type:application/json" -X POST -u sat_username:sat_password \
       -k -d "{\"architecture\":{\"name\":\"i686\"}}" \
       https://satellite6.example.com/api/architectures
Copy to Clipboard Toggle word wrap
これにより、以下のような出力が返されます。
{"name":"i686","id":3,"created_at":"2015-10-29T13:21:09Z","updated_at":"2015-10-29T13:21:09Z","operatingsystems":[],"images":[]}
Copy to Clipboard Toggle word wrap
以下のコマンドを使用して、作成したアーキテクチャーを検証します。
$ curl -X GET -u sat_username:sat_password -k https://satellite6.example.com/api/v2/architectures | python -m json.tool
  {
      "page": 1,
      "per_page": 20,
      "results": [
          {
              "created_at": "2015-04-02T05:29:46Z",
              "id": 2,
              "name": "i386",
              "updated_at": "2015-04-02T05:29:46Z"
          },
          {
              "created_at": "2015-04-02T05:29:46Z",
              "id": 1,
              "name": "x86_64",
              "updated_at": "2015-04-02T05:29:46Z"
          },
          {
              "created_at": "2015-11-04T19:40:15Z",
              "id": 3,
              "name": "i686",
              "updated_at": "2015-11-04T19:40:15Z"
          }
      ],
      "search": null,
      "sort": {
          "by": null,
          "order": null
      },
      "subtotal": 3,
      "total": 3
  }
Copy to Clipboard Toggle word wrap
Satellite Server で hammer を使用して、結果を検証することもできます。
$ hammer -u sat_username -p sat_password architecture list
---|-------
ID | NAME
---|-------
2  | i386
1  | x86_64
3  | i686
---|-------
Copy to Clipboard Toggle word wrap

例4.2 新しいユーザーの作成

$ curl -H "Accept:application/json,version=2" \
-H "Content-Type:application/json" -X POST \
-u sat_username:sat_password -k \
-d "{\"firstname\":\"Test\",\"lastname\":\"API-User\",\"mail\":\"test@example.com\",\"login\":\"test_api\",\"password\":\"123456\",\"auth_source_id\":1}" \
https://satellite6.example.com/api/users
Copy to Clipboard Toggle word wrap
4.1.2.1. Satellite Server へのコンテンツのアップロード
このセクションでは、Satellite 6 API で curl を使用して、Satellite Server に大容量のファイルをアップロードし、インポートする方法を説明します。このプロセスでは、4 つの手順が含まれます。
  1. アップロード要求を作成します。
  2. コンテンツをアップロードします。
  3. コンテンツをインポートします。
  4. アップロード要求を削除します。
アップロード可能な最大ファイルサイズは約 30 MB です。より大きなコンテンツをアップロードするには、例4.3「30 MB よりも大きいコンテンツのアップロード」 を参照してください。

手順4.1 Satellite Server へのコンテンツのアップロード

  1. アップロード要求を作成します。デプロイメントに合わせてサンプルパラメーターを変更するようにしてください。
    $ curl -H "Accept:application/json,version=2" \
           -H "Content-Type:application/json" \
           -X POST \
           -u sat_username:sat_password -k -d "{}" \
           https://satellite6.example.com/katello/api/repositories/3/content_uploads
    Copy to Clipboard Toggle word wrap
    このコマンドは、以下のような upload_id を返します。
    {"upload_id":"0be156b1-f373-4cad-89d0-924f8f4491d2","_href":"/pulp/api/v2/content/uploads/0be156b1-f373-4cad-89d0-924f8f4491d2/"}
    Copy to Clipboard Toggle word wrap
  2. コンテンツをアップロードします。データのアップロード時には、正しい MIME タイプを使用していることを確認します。application/json MIME タイプは、Satellite 6 に対する要求の大部分に使用されます。upload_id と MIME タイプ、およびその他のパラメーターを組み合わせてコンテンツをアップロードします。
    $ curl -H "Accept:application/json,version=2" \
           -H "Content-Type:multipart/form-data" \
           -X PUT \
           -u sat_username:sat_password \
           -k --data-urlencode "content@/home/sat6user/rpmbuild/RPMS/noarch/python-scripttest-1.1.1-1.fc21.noarch.rpm" \
           --data-urlencode offset=0 \
           https://satellite6.example.com/katello/api/repositories/3/content_uploads/0be156b1-f373-4cad-89d0-924f8f4491d2
    Copy to Clipboard Toggle word wrap
  3. Satellite Server にコンテンツをアップロードした後に、適切なリポジトリーにそのコンテンツをインポートする必要があります。この手順を完了するまで、Satellite Server は新しいコンテンツを認識しません。
    $ curl -H "Accept:application/json,version=2" \
           -H "Content-Type:application/json" \
           -X PUT \
           -u sat_username:sat_password \
           -k -d "{\"upload_ids\":[\"0be156b1-f373-4cad-89d0-924f8f4491d2\"]}" \
           https://satellite6.example.com/katello/api/repositories/3/import_uploads
    Copy to Clipboard Toggle word wrap
  4. コンテンツのアップロードおよびインポートが正常に完了したら、アップロード要求を削除することができます。これにより、アップロード中に使用された一時的なディスク領域を解放できます。
    $ curl -H "Accept:application/json,version=2" \
           -H "Content-Type:application/json" \
           -X DELETE -d "{}" \
           -u sat_username:sat_password \
           -k https://satellite6.example.com/katello/api/repositories/3/content_uploads/0be156b1-f373-4cad-89d0-924f8f4491d2
    Copy to Clipboard Toggle word wrap

例4.3 30 MB よりも大きいコンテンツのアップロード

以下の例では、大容量のファイルをチャンクに分割して、アップロード要求の作成、個別ファイルのアップロード、Satellite へのインポートを行ってから、アップロード要求を削除する方法を説明します。この例は、サンプルのコンテンツ、ホスト名、ユーザー名、ファイル名を使用している点に注意してください。
  1. サンプルモジュールをダウンロードします。
    $ wget https://forgeapi.puppetlabs.com/v3/files/theforeman-foreman-5.0.1.tar.gz?_ga=1.267255502.1792403825.1430297670 -O theforeman-foreman-5.0.1.tar.gz
    
    Copy to Clipboard Toggle word wrap
    50,000 バイトのチャンクにモジュールを分割します。
    $ split --bytes 50000 --numeric-suffixes --suffix-length=1 theforeman-foreman-5.0.1.tar.gz foreman_module.
    
    Copy to Clipboard Toggle word wrap
    結果ファイルを表示します。
    $ ls -la theforeman-foreman-5.0.1.tar.gz foreman_module.*
    -rw-r--r--. 1 root root 50000 Nov  4 04:42 foreman_module.0
    -rw-r--r--. 1 root root 32928 Nov  4 04:42 foreman_module.1
    -rw-r--r--. 1 root root 82928 Nov  4 04:41 theforeman-foreman-5.0.1.tar.gz
    Copy to Clipboard Toggle word wrap
  2. 新しいアップロード要求を作成します(これは Satellite Server の cat に相当します)。
    $ curl -H "Accept:application/json,version=2" \
           -H "Content-Type:application/json" \
           -X POST \
           -u sat_username:sat_password -k -d "{}" \
           https://ibm-vm01.example.com/katello/api/repositories/2/content_uploads
    
    Copy to Clipboard Toggle word wrap
    上記のコマンドはアップロード ID を返します。
    {"upload_id":"9585528f-07ad-4bb1-9c80-ccece249b2b7","_href":"/pulp/api/v2/content/uploads/9585528f-07ad-4bb1-9c80-ccece249b2b7/"}
    Copy to Clipboard Toggle word wrap
  3. ステップ 1 で作成したファイルのチャンクをアップロードします。以下の例で offset パラメーターを使用して、ファイルサイズと関連付けている点に注意してください。
    $ curl -H "Accept:application/json,version=2" \
           -H "Content-Type:multipart/form-data" \
           -X PUT \
           -u sat_username:sat_password \
           -k --data-urlencode "content@foreman_module.0" \
           --data-urlencode offset=0 \
           https://ibm-vm01.example.com/katello/api/repositories/2/content_uploads/9585528f-07ad-4bb1-9c80-ccece249b2b7
    
    Copy to Clipboard Toggle word wrap
    $ curl -H "Accept:application/json,version=2" \
           -H "Content-Type:multipart/form-data" \
           -X PUT \
           -u sat_username:sat_password \
           -k --data-urlencode "content@foreman_module.1" \
           --data-urlencode offset=50000 \
           https://ibm-vm01.example.com/katello/api/repositories/2/content_uploads/9585528f-07ad-4bb1-9c80-ccece249b2b7
    Copy to Clipboard Toggle word wrap
  4. 完全なアップロードをリポジトリーにインポートします。
    $ curl -H "Accept:application/json,version=2" \
           -H "Content-Type:application/json" \
           -X PUT \
           -u sat_username:sat_password \
           -k -d "{\"upload_ids\":[\"9585528f-07ad-4bb1-9c80-ccece249b2b7\"]}" \
           https://ibm-vm01.example.com/katello/api/repositories/2/import_uploads
    Copy to Clipboard Toggle word wrap
  5. アップロード要求を削除します。
    $ curl -H "Accept:application/json,version=2" \
           -H "Content-Type:application/json" \
           -X DELETE -d "{}" \
           -u sat_username:sat_password \
           -k https://ibm-vm01.example.com/katello/api/repositories/2/content_uploads/9585528f-07ad-4bb1-9c80-ccece249b2b7
    Copy to Clipboard Toggle word wrap
  6. Satellite サーバーにログインして、ファイルが正しく転送されたかどうかを確認します。
    $ ls -la /var/lib/pulp/content/puppet_module/theforeman-foreman-5.0.1.tar.gz
    -rw-r--r--. 1 apache apache 82928 Nov  4 04:55 /var/lib/pulp/content/puppet_module/theforeman-foreman-5.0.1.tar.gz
    
    Copy to Clipboard Toggle word wrap
    ファイルを比較します。
    $ cmp /var/lib/pulp/content/puppet_module/theforeman-foreman-5.0.1.tar.gz theforeman-foreman-5.0.1.tar.gz
    
    Copy to Clipboard Toggle word wrap
    $ echo $?
    0
    
    Copy to Clipboard Toggle word wrap

4.1.3. スマートクラスのオーバーライド

API を使用してスマートパラメーターを検索し、値を指定してクラスのスマートパラメーターを上書きすることができます。変更可能な属性の完全リストは、https://satellite6.example.com/apidoc/v2/smart_class_parameters/update.html にある組み込み API リファレンスを参照してください。
たとえば、スマートクラスパラメーターすべてを一覧表示するには、API ルートは GET /api/smart_class_parameters のようになります。curl を使用すると、コマンドは以下のようになります。
$ curl -X GET -s -k -u sat_username:sat_password \
https://satellite6.example.com/api/smart_class_parameters
Copy to Clipboard Toggle word wrap
5 など、Puppet クラス ID が分かる場合には、以下のように範囲を絞り込むことができます。
$ curl -X GET -s -k -u sat_username:sat_password https://satellite6.example.com/api/puppetclasses/5/smart_class_parameters
Copy to Clipboard Toggle word wrap
どちらの呼び出しも検索パラメーターに対応します。検索可能なフィールドの全一覧は、Web UI の 検索入力ボックス に表示されます。ConfigureSmart variables に移動し、検索クエリーボックスをクリックしてフィールドのリストを表示します。
特に検索パラメーターで便利なのは、puppetclass_namekey の 2 つで、特定のパラメーターを検索できます。たとえば、-- d, -- data オプションを使用して、URL のエンコードデータを渡します。
$ curl -X GET -s -k -u sat_username:sat_password https://satellite6.example.com/api/smart_class_parameters -d 'search=puppetclass_name = access_insights_client and key = authmethod'
Copy to Clipboard Toggle word wrap
標準のスコープ指定の検索構文はサポートされています。
パラメーターの ID が見つかったら、現在のオーバーライド値を含む完全な詳細の一覧表示に進むことができます。たとえば、ID が 63 の場合には、API ルートは GET /api/smart_class_parameters/63 です。curl を使用すると、コマンドは以下のようになります。
$ curl -X GET -s -k -u sat_username:sat_password \
https://satellite6.example.com/api/smart_class_parameters/63
Copy to Clipboard Toggle word wrap
これで、PUT 呼び出しでパラメーターの値をオーバーライドすることができます。
$ curl -H "Accept:application/json,version=2" \
-H "Content-Type:application/json" -X PUT \
-s -k -u sat_username:sat_password \
-d '{"smart_class_parameter":{"override":true}}' \
https://satellite6.example.com/api/smart_class_parameters/63
Copy to Clipboard Toggle word wrap
パラメーターを手動で作成または削除する方法がないことに注意してください。ユーザーは属性のみを変更できます。パラメーターは、プロキシーからクラスをインポートすることでのみ作成および削除されます。
オーバーライドが有効な場合には、カスタムの Override Matcher を追加できます。
$ curl -H "Accept:application/json,version=2" \
-H "Content-Type:application/json" -X PUT \
-s -k -u sat_username:sat_password \
-d '{"smart_class_parameter":{"override_value":{"match":"hostgroup=Test","value":"2.4.6"}}}' \
https://satellite6.example.com/api/smart_class_parameters/63
Copy to Clipboard Toggle word wrap
API 呼び出しのすべてのパラメーターの詳細については、https://satellite6.example.com/apidoc/v2/override_values.html を参照してください。
オーバーライド値を削除するには、以下のようなコマンドを使用します。
$ curl -X DELETE -s -u sat_username:sat_password \
https://satellite6.example.com/api/smart_class_parameters/63/override_values/3
Copy to Clipboard Toggle word wrap
4.1.3.1. 外部ファイルを使用したスマートクラスパラメーターの変更
外部ファイルを使用すると、JSON データでの作業が簡素化されます。構文が強調されるエディターを使用するので、間違いを回避し、特定しやすくなります。

手順4.2 外部ファイルを使用したスマートクラスパラメーターの変更

以下の例では、MOTD Puppet マニフェストを使用します。
  1. motd という名前で Puppet クラスを検索します。今回の例では、motd という名前で検索します。
    $ curl -H "Accept:application/json,version=2" \
    -H "Content-Type:application/json" -X GET \
    -u sat_user:sat_passwd -k \
    "https://satellite6.example.com/api/smart_class_parameters?search=puppetclass_name=motd” \
    | python -m json.tool
    {
    "page": 1,
    "per_page": 20,
    "results": [
    {
    "avoid_duplicates": false,
    "created_at": "2017-02-06 12:37:48 UTC",
    "default_value": "",
    "description": "",
    "hidden_value": "*****",
    "hidden_value?": false,
    "id": 3,
    "merge_default": false,
    "merge_overrides": false,
    "override": false,
    "override_value_order": "fqdn\nhostgroup\nos\ndomain",
    "override_values_count": 0,
    "parameter": "content",
    "parameter_type": "string",
    "puppetclass_id": 3,
    "puppetclass_name": "motd",
    "required": false,
    "updated_at": "2017-02-07 13:08:42 UTC",
    "use_puppet_default": false,
    "validator_rule": null,
    "validator_type": ""
    },
    {
    "avoid_duplicates": false,
    "created_at": "2017-02-06 12:37:48 UTC",
    "default_value": true,
    "description": "",
    "hidden_value": "*****",
    "hidden_value?": false,
    "id": 1,
    "merge_default": false,
    "merge_overrides": false,
    "override": false,
    "override_value_order": "fqdn\nhostgroup\nos\ndomain",
    "override_values_count": 0,"parameter": "dynamic_motd",
    "parameter_type": "boolean",
    "puppetclass_id": 3,
    "puppetclass_name": "motd",
    "required": false,
    "updated_at": "2017-02-06 15:21:06 UTC",
    "use_puppet_default": null,
    "validator_rule": null,
    "validator_type": null
    },
    {
    "avoid_duplicates": false,
    "created_at": "2017-02-06 12:37:48 UTC",
    "default_value": "",
    "description": "",
    "hidden_value": "*****",
    "hidden_value?": false,
    "id": 2,
    "merge_default": false,
    "merge_overrides": false,
    "override": false,
    "override_value_order": "fqdn\nhostgroup\nos\ndomain",
    "override_values_count": 0,
    "parameter": "template",
    "parameter_type": "string",
    "puppetclass_id": 3,
    "puppetclass_name": "motd",
    "required": false,
    "updated_at": "2017-02-06 15:21:06 UTC",
    "use_puppet_default": null,
    "validator_rule": null,
    "validator_type": null
    }
    ],
    "search": "puppetclass_name=motd",
    "sort": {
    "by": null,
    "order": null
    },
    "subtotal": 3,
    "total": 66
    }
    Copy to Clipboard Toggle word wrap
    スマートクラスのパラメーターにはそれぞれ、同じ Satellite インスタンスでグローバルとなる ID が割り当てられています。Satellite Server では、motd クラスの content パラメーターは id=3 となっています。Puppet クラス名の前に表示される Puppet クラス ID と混同しないようにしてください。
  2. パラメーター ID 3 を使用して、motd パラメーター固有の情報を取得して、出力を output_file.json などのファイルにリダイレクトします。
    $ curl -H "Accept:application/json,version=2" \
    -H "Content-Type:application/json" -X GET \
    -u sat_user:sat_passwd -k \
    "https://satellite6.example.com/api/smart_class_parameters/3 \
    | python -m json.tool > output_file.json
    Copy to Clipboard Toggle word wrap
  3. 1 つ前の手順で作成し たファイルを、新しいファイル(changeed_file.json など)にコピーして編集します。エディターでファイルを開き、必要な値を変更します。以下の例では、motd モジュールのコンテンツパラメーターを変更しますが、これには、override オプションを false から true に変更する必要があります。
    {
    "avoid_duplicates": false,
    "created_at": "2017-02-06 12:37:48 UTC", # This line must be removed.
    "default_value": "", # A new value should be supplied here.
    "description": "",
    "hidden_value": "*****",
    "hidden_value?": false,
    "id": 3,
    "merge_default": false,
    "merge_overrides": false,
    "override": false, # The override value must be set to true.
    "override_value_order": "fqdn\nhostgroup\nos\ndomain",
    "override_values": [], # This line must be removed.
    "override_values_count": 0,
    "parameter": "content",
    "parameter_type": "string",
    "puppetclass_id": 3,
    "puppetclass_name": "motd",
    "required": false,
    "updated_at": "2017-02-07 11:56:55 UTC", # This line must be removed.
    "use_puppet_default": false,
    "validator_rule": null,
    "validator_type": ""
    }
    Copy to Clipboard Toggle word wrap
  4. ファイルの編集後に、以下のようになっていることを確認して、変更を保存します。
    {
    "avoid_duplicates": false,
    "default_value": "No Unauthorized Access Allowed",
    "description": "",
    "hidden_value": "*****",
    "hidden_value?": false,
    "id": 3,
    "merge_default": false,
    "merge_overrides": false,
    "override": true,
    "override_value_order": "fqdn\nhostgroup\nos\ndomain",
    "override_values_count": 0,
    "parameter": "content",
    "parameter_type": "string",
    "puppetclass_id": 3,
    "puppetclass_name": "motd",
    "required": false,
    "use_puppet_default": false,
    "validator_rule": null,
    "validator_type": ""
    }
    Copy to Clipboard Toggle word wrap
  5. 以下のように PUT コマンドを使用して、Satellite サーバーに変更を適用します。
    $ curl -H "Accept:application/json,version=2" \
    -H "Content-Type:application/json" \
    -X PUT -u $user:$passwd \
    -d @changed_file.json \
    -k "https://satellite6.example.com/api/smart_class_parameters/3
    Copy to Clipboard Toggle word wrap

4.1.4. エラータのホストまたはホストコレクションへの適用

PUT コマンドで curl を使用して、エラータをホスト、ホストグループ、またはホストコレクションに適用することができます。以下は、PUT 要求の基本的な構文です。
$ curl -H "Accept:application/json,version=2" \
                   -H "Content-Type:application/json" -X PUT \
                   -u sat_username:sat_password -k \
                   -d json-formatted-data https://satellite6.example.com
Copy to Clipboard Toggle word wrap
同梱の API ドキュメント(https://satellite6.example.com/apidoc/v2.html)を参照して、エラータ適用に使用する URL を検索します。Satellite Web UI で、検索クエリーの形式を確認できます。HostsHost Collections に移動し、ホストコレクションを選択します。コレクションアクションエラータのインストール に移動して、検索クエリーボックスの内容を確認します。たとえば、my-collection と呼ばれるホストコレクションの場合は、検索ボックスに host_collection="my-collection" が含まれます。これは、以下の例でホストコレクションに使用されます。

例4.4 ホストへのエラータの適用

以下の例では、一括アクションの API URL /katello/api/hosts/bulk/install_content を使用して、単純な検索に必要な形式を示しています。
$ curl -H "Accept:application/json,version=2" \
       -H "Content-Type:application/json" -X PUT \
       -u sat_username:sat_password -k \
       -d "{\"organization_id\":1,\"included\":{\"search\":\"my-host\"},\"content_type\":\"errata\",\"content\":[\"RHBA-2016:1981\"]}" https://satellite6.example.com/api/v2/hosts/bulk/install_content
Copy to Clipboard Toggle word wrap

例4.5 ホストコレクションへのエラータの適用

以下の例では、Satellite Web UI に表示されているように、検索文字列 host_collection="my-collection" を渡すために必要なエスケープレベルに注目してください。
$ curl -H "Accept:application/json,version=2" \
       -H "Content-Type:application/json" -X PUT \
       -u sat_username:sat_password -k \
       -d "{\"organization_id\":1,\"included\":{\"search\":\"host_collection=\\\"my-collection\\\"\"},\"content_type\":\"errata\",\"content\":[\"RHBA-2016:1981\"]}" https://satellite6.example.com/api/v2/hosts/bulk/install_content
Copy to Clipboard Toggle word wrap

4.2. Ruby を使用した API の例

以下の例では、Ruby を使用してさまざまなタスクを実行して Satellite API と通信する方法について説明します。
重要
以下は、スクリプトおよびコマンドの例です。以下のスクリプトを慎重にレビューしてから使用するようにしてください。変数、ユーザー名、パスワード、その他の情報は、お使いのデプロイメントに適した値に置き換えてください。

4.2.1. Ruby を使用したオブジェクトの作成

以下のスクリプトは Red Hat Satellite 6 API と接続して新規組織を作成し、続いて新規組織に 3 つの環境を作成します。組織がすでに存在する場合には、このスクリプトはその組織を使用します。組織内に環境が 1 つでも存在する場合は、スクリプトによりエラーが送出されて、スクリプトは終了します。
#!/usr/bin/ruby

require 'rest-client'
require 'json'

url = 'https://satellite6.example.com/api/v2/'
katello_url = "#{url}/katello/api/v2/"

$username = 'admin'
$password = 'changeme'

org_name = "MyOrg"
environments = [ "Development", "Testing", "Production" ]

# Performs a GET using the passed URL location
def get_json(location)
  response = RestClient::Request.new(
    :method => :get,
    :url => location,
    :user => $username,
    :password => $password,
    :headers => { :accept => :json,
    :content_type => :json }
  ).execute
  JSON.parse(response.to_str)
end

# Performs a POST and passes the data to the URL location
def post_json(location, json_data)
  response = RestClient::Request.new(
    :method => :post,
    :url => location,
    :user => $username,
    :password => $password,
    :headers => { :accept => :json,
    :content_type => :json},
    :payload => json_data
  ).execute
  JSON.parse(response.to_str)
end

# Creates a hash with ids mapping to names for an array of recods
def id_name_map(records)
  records.inject({}) do |map, record|
    map.update(record['id'] => record['name'])
  end
end

# Get list of existing organizations
orgs = get_json("#{katello_url}/organizations")
org_list = id_name_map(orgs['results'])

if !org_list.has_value?(org_name)
  # If our organization is not found, create it
  puts "Creating organization: \t#{org_name}"
  org_id = post_json("#{katello_url}/organizations", JSON.generate({"name"=> org_name}))["id"]
else
  # Our organization exists, so let's grab it
  org_id = org_list.key(org_name)
  puts "Organization \"#{org_name}\" exists"
end

# Get list of organization's lifecycle environments
envs = get_json("#{katello_url}/organizations/#{org_id}/environments")
env_list = id_name_map(envs['results'])
prior_env_id = env_list.key("Library")

# Exit the script if at least one life cycle environment already exists
environments.each do |e|
  if env_list.has_value?(e)
    puts "ERROR: One of the Environments is not unique to organization"
    exit
  end
end

 # Create life cycle environments
environments.each do |environment|
  puts "Creating environment: \t#{environment}"
  prior_env_id = post_json("#{katello_url}/organizations/#{org_id}/environments", JSON.generate({"name" => environment, "organization_id" => org_id, "prior_id" => prior_env_id}))["id"]
end
Copy to Clipboard Toggle word wrap

4.2.2. Apipie バインディングの使用

Apipie バインディングは、apipie で記述された API の Ruby バインディングであり、Satellite から API 定義を取得してキャッシュし、オンデマンドで API 呼び出しを生成します。apipie バインディングを使用すると、Ruby API クエリーを簡素化できます。APIpie は通常、happy がない rhyme まで、"appy-pie" です。
以下の例では、新しい組織を作成してから、新しい組織に 3 つの環境を作成します。組織がすでに存在する場合には、このスクリプトはその組織を使用します。組織内に環境が 1 つでも存在する場合は、スクリプトによりエラーが送出されて、スクリプトは終了します。
#!/usr/bin/tfm-ruby

require 'apipie-bindings'

org_name = "MyOrg"
environments = [ "Development", "Testing", "Production" ]

# Create an instance of apipie bindings
@api = ApipieBindings::API.new({
  :uri => 'https://satellite6.example.com/',
  :username => 'admin',
  :password => 'changeme',
  :api_version => 2
})

# Performs an API call with default options
def call_api(resource_name, action_name, params = {})
  http_headers = {}
  apipie_options = { :skip_validation => true }
  @api.resource(resource_name).call(action_name, params, http_headers, apipie_options)
end

# Creates a hash with IDs mapping to names for an array of records
def id_name_map(records)
  records.inject({}) do |map, record|
    map.update(record['id'] => record['name'])
  end
end

# Get list of existing organizations
orgs = call_api(:organizations, :index)
org_list = id_name_map(orgs['results'])

if !org_list.has_value?(org_name)
  # If our organization is not found, create it
  puts "Creating organization: \t#{org_name}"
  org_id = call_api(:organizations, :create, {'organization' => { :name => org_name }})['id']
else
  # Our organization exists, so let's grab it
  org_id = org_list.key(org_name)
  puts "Organization \"#{org_name}\" exists"
end

# Get list of organization's life cycle environments
envs = call_api(:lifecycle_environments, :index, {'organization_id' => org_id})
env_list = id_name_map(envs['results'])
prior_env_id = env_list.key("Library")

# Exit the script if at least one life cycle environment already exists
environments.each do |e|
  if env_list.has_value?(e)
    puts "ERROR: One of the Environments is not unique to organization"
    exit
  end
end

 # Create life cycle environments
environments.each do |environment|
  puts "Creating environment: \t#{environment}"
  prior_env_id = call_api(:lifecycle_environments, :create, {"name" => environment, "organization_id" => org_id, "prior_id" => prior_env_id })['id']
end
Copy to Clipboard Toggle word wrap

4.3. Python を使用した API の例

以下の例では、Python を使用してさまざまなタスクを実行して Satellite API と通信する方法について説明します。
重要
以下は、スクリプトおよびコマンドの例です。以下のスクリプトを慎重にレビューしてから使用するようにしてください。変数、ユーザー名、パスワード、その他の情報は、お使いのデプロイメントに適した値に置き換えてください。
以下のスクリプトは、REST API との対話に SSL 検証を使用しません。ここで紹介しているスクリプトはデモのみを目的としています。

4.3.1. Python を使用したオブジェクトの作成

以下のスクリプトは Red Hat Satellite 6 API と接続して新規組織を作成し、続いて新規組織に 3 つの環境を作成します。組織がすでに存在する場合には、このスクリプトはその組織を使用します。組織内に環境が 1 つでも存在する場合は、スクリプトによりエラーが送出されて、スクリプトは終了します。
#!/usr/bin/python

import json
import sys

try:
    import requests
except ImportError:
    print "Please install the python-requests module."
    sys.exit(-1)

# URL to your Satellite 6 server
URL = "https://satellite6.example.com"
# URL for the API to your deployed Satellite 6 server
SAT_API = "%s/katello/api/v2/" % URL
# Katello-specific API
KATELLO_API = "%s/katello/api/" % URL
POST_HEADERS = {'content-type': 'application/json'}
# Default credentials to login to Satellite 6
USERNAME = "admin"
PASSWORD = "changeme"
# Ignore SSL for now
SSL_VERIFY = False

# Name of the organization to be either created or used
ORG_NAME = "MyOrg"
# Name for life cycle environments to be either created or used
ENVIRONMENTS = ["Development", "Testing", "Production"]


def get_json(location):
    """
    Performs a GET using the passed URL location
    """

    r = requests.get(location, auth=(USERNAME, PASSWORD), verify=SSL_VERIFY)

    return r.json()


def post_json(location, json_data):
    """
    Performs a POST and passes the data to the URL location
    """

    result = requests.post(
        location,
        data=json_data,
        auth=(USERNAME, PASSWORD),
        verify=SSL_VERIFY,
        headers=POST_HEADERS)

    return result.json()


def main():
    """
    Main routine that creates or re-uses an organization and
    life cycle environments. If life cycle environments already
    exist, exit out.
    """

    # Check if our organization already exists
    org = get_json(SAT_API + "organizations/" + ORG_NAME)

    # If our organization is not found, create it
    if org.get('error', None):
        org_id = post_json(
            SAT_API + "organizations/",
            json.dumps({"name": ORG_NAME}))["id"]
        print "Creating organization: \t" + ORG_NAME
    else:
        # Our organization exists, so let's grab it
        org_id = org['id']
        print "Organization '%s' exists." % ORG_NAME

    # Now, let's fetch all available life cycle environments for this org...
    envs = get_json(
        SAT_API + "organizations/" + str(org_id) + "/environments/")

    # ... and add them to a dictionary, with respective 'Prior' environment
    prior_env_id = 0
    env_list = {}
    for env in envs['results']:
        env_list[env['id']] = env['name']
        prior_env_id = env['id'] if env['name'] == "Library" else prior_env_id

    # Exit the script if at least one life cycle environment already exists
    if all(environment in env_list.values() for environment in ENVIRONMENTS):
        print "ERROR: One of the Environments is not unique to organization"
        sys.exit(-1)

    # Create life cycle environments
    for environment in ENVIRONMENTS:
        new_env_id = post_json(
            SAT_API + "organizations/" + str(org_id) + "/environments/",
            json.dumps(
                {
                    "name": environment,
                    "organization_id": org_id,
                    "prior": prior_env_id}
            ))["id"]

        print "Creating environment: \t" + environment
        prior_env_id = new_env_id


if __name__ == "__main__":
    main()
Copy to Clipboard Toggle word wrap

4.3.2. Python を使用したクエリーの実行

Python スクリプトを作成および実行して、「curl を使用した API の例」 に記載されているものと同じ結果を得ることができます。以下のスクリプト例では、このアプローチを説明します。まず、sat6api.py という名前の実行可能ファイルを作成し、以下の内容を追加します。
#!/usr/bin/python
import json
import sys
try:
    import requests
except ImportError:
    print "Please install the python-requests module."
    sys.exit(-1)

SAT_API = 'https://satellite6.example.com/api/v2/'
USERNAME = "admin"
PASSWORD = "password"
SSL_VERIFY = False   # Ignore SSL for now

def get_json(url):
    # Performs a GET using the passed URL location
    r = requests.get(url, auth=(USERNAME, PASSWORD), verify=SSL_VERIFY)
    return r.json()

def get_results(url):
    jsn = get_json(url)
    if jsn.get('error'):
        print "Error: " + jsn['error']['message']
    else:
        if jsn.get('results'):
            return jsn['results']
        elif 'results' not in jsn:
            return jsn
        else:
            print "No results found"
    return None

def display_all_results(url):
    results = get_results(url)
    if results:
        print json.dumps(results, indent=4, sort_keys=True)

def display_info_for_hosts(url):
    hosts = get_results(url)
    if hosts:
        for host in hosts:
            print "ID: %-10d Name: %-30s IP: %-20s OS: %-30s" % (host['id'], host['name'], host['ip'], host['operatingsystem_name'])

def main():
    host = 'satellite6.example.com'
    print "Displaying all info for host %s ..." % host
    display_all_results(SAT_API + 'hosts/' + host)

    print "Displaying all facts for host %s ..." % host
    display_all_results(SAT_API + 'hosts/%s/facts' % host)

    host_pattern = 'example'
    print "Displaying basic info for hosts matching pattern '%s'..." % host_pattern
    display_info_for_hosts(SAT_API + 'hosts?search=' + host_pattern)

    environment = 'production'
    print "Displaying basic info for hosts in environment %s..." % environment
    display_info_for_hosts(SAT_API + 'hosts?search=environment=' + environment)

    model = 'RHEV Hypervisor'
    print "Displaying basic info for hosts with model name %s..." % model
    display_info_for_hosts(SAT_API + 'hosts?search=model="' + model + '"')

if __name__ == "__main__":
    main()
Copy to Clipboard Toggle word wrap
その後、コマンドラインから ./sat6api.py を実行して結果を表示できます。

4.4. 詳細検索の使用

Web UI を使用して、クエリーの作成に使用できるその他の検索用語を判断できます。Satellite 6 は、このタスクを簡単にするために、スコープ指定の検索とタブ補完をサポートします。
たとえば、オペレーティングシステム別にホストを検索するには、HostsAll Hosts に移動し、Search テキストボックスをクリックして検索用語のリストを表示します。オペレーティングシステムの検索用語の 1 つが os_description で、以下のように API クエリーで使用できます。
$ curl -s -k -u sat_username:sat_password https://satellite6.example.com/api/v2/hosts?search=os_description=\"RHEL+Server+6.6\" | python -m json.tool
  {
    ...
    "results": [
        {
            "name": "satellite6.example.com",
            "operatingsystem_id": 1,
            "operatingsystem_name": "RHEL Server 6.6",
            ...
        }
    ],
    "search": "os_description=\"RHEL Server 6.6\"",
}
Copy to Clipboard Toggle word wrap

4.5. ページネーション制御のある検索の使用

per_page および page ページネーションパラメーターを使用して、API 検索クエリーによって返される検索結果を制限できます。per_page パラメーターは、ページごとの量を指定し、page パラメーターは per_page パラメーターの計算に合わせて、どのページを返すかを指定します。
ページネーションパラメーターを指定しない場合に、返す項目数のデフォルト値を 1000 に設定しますが、page パラメーターを指定すると per_page のデフォルト値は 20 が適用されます。

例4.6 コンテンツビューの表示

以下の例では、返された結果の 3 ページ目の 10 件分をリストするコンテンツビューが表示されます。
$ curl -X GET --user sat_username:sat_password \
"https://satellite6.example.com/katello/api/content_views?per_page=10&page=3"
Copy to Clipboard Toggle word wrap

例4.7 アクティベーションキーの表示

以下の例では、ID が 1 の組織のアクティベーションキー 30 個を 1 ページにリストする検索の 2 ページ目を表示します。
$ curl -X GET --user sat_username:sat_password \
"https://satellite6.example.com/katello/api/activation_keys?organization_id=1&per_page=30&page=2"
Copy to Clipboard Toggle word wrap
複数のページの結果を取得するには、ループ構造を 使用できます。

例4.8 複数ページを返す設定

以下の例では、ページごとに 5 件ずつ表示するコンテンツビュー 3 ページ分の 1 ページを返します。
$ for i in `seq 1 3`; do curl -X GET --user sat_username:sat_password \
"https://satellite6.example.com/katello/api/content_views?per_page=5&page=$i"; done
Copy to Clipboard Toggle word wrap

4.6. ライフサイクル環境との作業

アーキテクチャーガイド』 の ライフサイクル 環境 セクションで 説明されているように、アプリケーションライフサイクルは ライフサイクル 環境 に分割され、アプリケーションライフサイクルの各ステージを表します。ライフサイクル環境は、環境パス からリンクされます。API を使用してリンクされたライフサイクル環境を作成するには、prio _id パラメーターを使用してください。
ライフサイクル環境に関する API リファレンスは https://satellite6.example.com/apidoc/v2/lifecycle_environments.html にあります。API ルートには /katello/api/environments および /katello/api/organizations/:organization_id/environments が含まれます。
以下のように、Satellite 上の現在のライフサイクル環境をすべてデフォルトの組織 1 について一覧表示できます。
$ curl -H "Accept:application/json,version=2" \
-H "Content-Type:application/json" -X GET \
-u sat_user:sat_password -k \
https://satellite6.example.com/katello/api/organizations/1/environments | python -m json.tool
Copy to Clipboard Toggle word wrap
新規インストールした Satellite の出力では、以下のようなセクションが表示されるはずです。
      output omitted
   "description": null,
   "id": 1,
   "label": "Library",
   "library": true,
   "name": "Library",
   "organization": {
        "id": 1,
        "label": "Default_Organization",
        "name": "Default Organization"
   },
   "permissions": {
       "destroy_lifecycle_environments": false,
       "edit_lifecycle_environments": true,
       "promote_or_remove_content_views_to_environments": true,
       "view_lifecycle_environments": true
   },
   "prior": null,
   "successor": null,
      output truncated
Copy to Clipboard Toggle word wrap
以下の手順では、ID が 1 のデフォルトのライブラリー環境が、ライフサイクル環境を作成するための開始点として使用されます。

手順4.3 ライフサイクル環境のリンク作成

  1. 開始点として使用する既存のライフサイクル環境を選択します。その ID を使用して環境を一覧表示します。今回の例では、ID が 1 の環境を使用します。
    $ curl -X GET -s -k -u sat_user:sat_password \
    https://satellite6.example.com/katello/api/environments/1 | python -m json.tool
    	output omitted
       "id": 1,
       "label": "Library",
    	output omitted
        "prior": null,
        "successor": null,
    	output truncated
    Copy to Clipboard Toggle word wrap
  2. prior オプションを 1 に設定して、新しいライフサイクル環境を作成します。
    1. {"organization_id":1,"label":"api-dev","name":"API Development","prior":1}の内容で JSON ファイルを作成します(例: life-cycle.json )。
    2. 以下のようなコマンドを入力します。
      $ curl -H "Accept:application/json,version=2" \
      -H "Content-Type:application/json" -X POST \
      -u sat_user:sat_password -k \
      -d @life-cycle.json \
      https://satellite6.example.com/katello/api/environments \
      | python -m json.tool
            output omitted
          "description": null,
          "id": 2,
          "label": "api-dev",
          "library": false,
          "name": "API Development",
          "organization": {
              "id": 1,
              "label": "Default_Organization",
              "name": "Default Organization"
          },
          "permissions": {
              "destroy_lifecycle_environments": true,
              "edit_lifecycle_environments": true,
              "promote_or_remove_content_views_to_environments": true,
              "view_lifecycle_environments": true
          },
         "prior": {
              "id": 1,
              "name": "Library"
          },
      	output truncated
      Copy to Clipboard Toggle word wrap
    以下のコマンドの出力では、ライフサイクル環境の ID が 2 で、その 1 つ前のライフサイクル環境は 1 であると分かります。これは、ライフサイクル環境 1 および 2 がリンクされていることを示しています。この環境の後継を作成する際には、ライフサイクル環境 ID 2 が使用されます。
  3. prior オプションを 2 に設定して、別のライフサイクル環境を作成します。
    1. 以前作成した life-cycle.json を編集して、ラベル名前、および以前の値を更新します: {"organization_id":1,"label":"api-qa","name":"API QA"," prior ":2}
    2. 以下のようなコマンドを入力します。
      $ curl -H "Accept:application/json,version=2" \
      -H "Content-Type:application/json" -X POST \
      -u sat_user:sat_password -k \
      -d @life-cycle.json \
      https://satellite6.example.com/katello/api/environments \
      | python -m json.tool
            output omitted
         "description": null,
         "id": 3,
          "label": "api-qa",
          "library": false,
          "name": "API QA",
          "organization": {
              "id": 1,
              "label": "Default_Organization",
              "name": "Default Organization"
          },
          "permissions": {
              "destroy_lifecycle_environments": true,
              "edit_lifecycle_environments": true,
              "promote_or_remove_content_views_to_environments": true,
              "view_lifecycle_environments": true
          },
         "prior": {
              "id": 2,
              "name": "API Development"
          },
          "successor": null,
      	output truncated
      Copy to Clipboard Toggle word wrap
    以下のコマンドの出力では、ライフサイクル環境の ID が 3 で、その 1 つ前のライフサイクル環境は 2 であると分かります。これは、ライフサイクル環境 23 がリンクされていることを示しています。
ライフサイクル環境の更新
ライフサイクル環境は PUT コマンドを使用して更新できます。以下に例を示します。
$ curl -H "Accept:application/json,version=2" \
-H "Content-Type:application/json" -X POST \
-u sat_user:sat_password -k \
 -d '{"description":"Quality Acceptance Testing"}' \
https://satellite6.example.com/katello/api/environments/3 \
| python -m json.tool
      output omitted
 "description": "Quality Acceptance Testing",
    "id": 3,
    "label": "api-qa",
    "library": false,
    "name": "API QA",
    "organization": {
        "id": 1,
        "label": "Default_Organization",
        "name": "Default Organization"
    },
    "permissions": {
        "destroy_lifecycle_environments": true,
        "edit_lifecycle_environments": true,
        "promote_or_remove_content_views_to_environments": true,
        "view_lifecycle_environments": true
    },
    "prior": {
        "id": 2,
        "name": "API Development"
    },
	output truncated
Copy to Clipboard Toggle word wrap
ライフサイクル環境の削除
後継がない前提でライフサイクル環境を削除できます。そのため、以下の形式のコマンドを使用して、逆順でそれらを削除します。
curl -X DELETE -s -k -u sat_user:sat_password https://satellite6.example.com/katello/api/environments/:id
Copy to Clipboard Toggle word wrap

付録A API 応答コード

Red Hat Satellite 6 API には、API 呼び出しの HTTP 応答ステータスコードがあります。以下のコードは、Satellite API の全リソースに共通します。
Expand
表A.1 API 応答コード
応答説明
200 OK show、index、update、delete (GET、PUT、DELETE 要求) などの要求アクションに成功した場合
201 Created create アクション (POST 要求) に成功した場合
301 Moved Permanently Satellite が HTTPS しか使用できないように制限されているにも拘らず、HTTP が試行された時にリダイレクトされる場合
400 Bad Request 必要なパラメーターがないか、検索クエリーに無効な構文が含まれている場合
401 Unauthorized ユーザー認証に失敗した場合 (認証情報が不正な場合など)
403 Forbidden ユーザーにアクションの実行、リソースの読み込みなど、十分なパーミッションがないか、アクション自体がサポートされていない場合
404 Not Found 指定の ID のレコードが存在しない場合。要求のレコードが存在しない場合には show または delete アクションに、関連のレコードの 1 つが存在しない場合には create、update、delete アクションに表示されることがあります。
409 Conflict 既存の依存関係が原因でレコードを削除できない場合 (例: ホストのあるホストグループなど)
415 Unsupported Media Type HTTP 要求のコンテンツタイプが JSON でない場合
422 Unprocessable Entity バリデーションエラーが原因でエンティティーの作成に失敗した場合。アクションの作成または更新にのみ適用されます。
500 Internal Server Error 予期しないサーバーエラーが発生した場合
503 Service Unavailable サーバーが実行されていない場合

付録B API パーミッションの表

Red Hat Satellite 6 API は、さまざまなアクションをサポートしますが、それぞれのアクションには固有のパーミッションが必要です。以下の表では、API パーミッション名、そのパーミッションに関連付けられたアクションとリソースタイプを紹介しています。
Expand
表B.1 API パーミッションの表
パーミッション名アクションリソースタイプ
view_activation_keys
  • katello/activation_keys/all
  • katello/activation_keys/index
  • katello/activation_keys/auto_complete_search
  • katello/api/v2/activation_keys/index
  • katello/api/v2/activation_keys/show
  • katello/api/v2/activation_keys/available_host_collections
  • katello/api/v2/activation_keys/available_releases
  • katello/api/v2/activation_keys/product_content
Katello::ActivationKey
create_activation_keys
  • katello/api/v2/activation_keys/create
  • katello/api/v2/activation_keys/copy
Katello::ActivationKey
edit_activation_keys
  • katello/api/v2/activation_keys/update
  • katello/api/v2/activation_keys/content_override
  • katello/api/v2/activation_keys/add_subscriptions
  • katello/api/v2/activation_keys/remove_subscriptions
Katello::ActivationKey
destroy_activation_keys
  • katello/api/v2/activation_keys/destroy
Katello::ActivationKey
logout
  • users/logout
 
view_architectures
  • architectures/index
  • architectures/show
  • architectures/auto_complete_search
  • api/v1/architectures/index
  • api/v1/architectures/show
  • api/v2/architectures/index
  • api/v2/architectures/show
 
create_architectures
  • architectures/new
  • architectures/create
  • api/v1/architectures/create
  • api/v2/architectures/create
 
edit_architectures
  • architectures/edit
  • architectures/update
  • api/v1/architectures/update
  • api/v2/architectures/update
 
destroy_architectures
  • architectures/destroy
  • api/v1/architectures/destroy
  • api/v2/architectures/destroy
 
view_audit_logs
  • audits/index
  • audits/show
  • audits/auto_complete_search
  • api/v1/audits/index
  • api/v1/audits/show
  • api/v2/audits/index
  • api/v2/audits/show
 
view_authenticators
  • auth_source_ldaps/index
  • auth_source_ldaps/show
  • api/v1/auth_source_ldaps/index
  • api/v1/auth_source_ldaps/show
  • api/v2/auth_source_ldaps/index
  • api/v2/auth_source_ldaps/show
 
create_authenticators
  • auth_source_ldaps/new
  • auth_source_ldaps/create
  • api/v1/auth_source_ldaps/create
  • api/v2/auth_source_ldaps/create
 
edit_authenticators
  • auth_source_ldaps/edit
  • auth_source_ldaps/update
  • api/v1/auth_source_ldaps/update
  • api/v2/auth_source_ldaps/update
 
destroy_authenticators
  • auth_source_ldaps/destroy
  • api/v1/auth_source_ldaps/destroy
  • api/v2/auth_source_ldaps/destroy
 
view_bookmarks
  • bookmarks/index
  • bookmarks/show
  • api/v1/bookmarks/index
  • api/v1/bookmarks/show
  • api/v2/bookmarks/index
  • api/v2/bookmarks/show
 
create_bookmarks
  • bookmarks/new
  • bookmarks/create
  • api/v1/bookmarks/new
  • api/v1/bookmarks/create
  • api/v2/bookmarks/new
  • api/v2/bookmarks/create
 
edit_bookmarks
  • bookmarks/edit
  • bookmarks/update
  • api/v1/bookmarks/edit
  • api/v1/bookmarks/update
  • api/v2/bookmarks/edit
  • api/v2/bookmarks/update
 
destroy_bookmarks
  • bookmarks/destroy
  • api/v1/bookmarks/destroy
  • api/v2/bookmarks/destroy
 
download_bootdisk
  • foreman_bootdisk/disks/generic
  • foreman_bootdisk/disks/host
  • foreman_bootdisk/disks/full_host
  • foreman_bootdisk/disks/subnet
  • foreman_bootdisk/disks/help
  • foreman_bootdisk/api/v2/disks/generic
  • foreman_bootdisk/api/v2/disks/host
 
manage_capsule_content
  • katello/api/v2/capsule_content/lifecycle_environments
  • katello/api/v2/capsule_content/available_lifecycle_environments
  • katello/api/v2/capsule_content/add_lifecycle_environment
  • katello/api/v2/capsule_content/remove_lifecycle_environment
  • katello/api/v2/capsule_content/sync
  • katello/api/v2/capsule_content/sync_status
  • katello/api/v2/capsule_content/cancel_sync
SmartProxy
view_capsule_content
  • smart_proxies/pulp_storage
  • smart_proxies/pulp_status
  • smart_proxies/show_with_content
SmartProxy
view_compute_profiles
  • compute_profiles/index
  • compute_profiles/show
  • compute_profiles/auto_complete_search
  • api/v2/compute_profiles/index
  • api/v2/compute_profiles/show
 
create_compute_profiles
  • compute_profiles/new
  • compute_profiles/create
  • api/v2/compute_profiles/create
 
edit_compute_profiles
  • compute_profiles/edit
  • compute_profiles/update
  • api/v2/compute_profiles/update
 
destroy_compute_profiles
  • compute_profiles/destroy
  • api/v2/compute_profiles/destroy
 
view_compute_resources
  • compute_resources/index
  • compute_resources/show
  • compute_resources/auto_complete_search
  • compute_resources/ping
  • compute_resources/available_images
  • api/v1/compute_resources/index
  • api/v1/compute_resources/show
  • api/v2/compute_resources/index
  • api/v2/compute_resources/show
  • api/v2/compute_resources/available_images
  • api/v2/compute_resources/available_clusters
  • api/v2/compute_resources/available_folders
  • api/v2/compute_resources/available_flavors
  • api/v2/compute_resources/available_networks
  • api/v2/compute_resources/available_resource_pools
  • api/v2/compute_resources/available_security_groups
  • api/v2/compute_resources/available_storage_domains
  • api/v2/compute_resources/available_zones
  • api/v2/compute_resources/available_storage_pods
 
create_compute_resources
  • compute_resources/new
  • compute_resources/create
  • compute_resources/test_connection
  • api/v1/compute_resources/create
  • api/v2/compute_resources/create
 
edit_compute_resources
  • compute_resources/edit
  • compute_resources/update
  • compute_resources/test_connection
  • compute_attributes/new
  • compute_attributes/create
  • compute_attributes/edit
  • compute_attributes/update
  • api/v1/compute_resources/update
  • api/v2/compute_resources/update
  • api/v2/compute_attributes/create
  • api/v2/compute_attributes/update
 
destroy_compute_resources
  • compute_resources/destroy
  • api/v1/compute_resources/destroy
  • api/v2/compute_resources/destroy
 
view_compute_resources_vms
  • compute_resources_vms/index
  • compute_resources_vms/show
 
create_compute_resources_vms
  • compute_resources_vms/new
  • compute_resources_vms/create
 
edit_compute_resources_vms
  • compute_resources_vms/edit
  • compute_resources_vms/update
 
destroy_compute_resources_vms
  • compute_resources_vms/destroy
 
power_compute_resources_vms
  • compute_resources_vms/power
  • compute_resources_vms/pause
 
console_compute_resources_vms
  • compute_resources_vms/console
 
view_config_groups
  • config_groups/index
  • config_groups/auto_complete_search
  • api/v2/config_groups/index
  • api/v2/config_groups/show
 
create_config_groups
  • config_groups/new
  • config_groups/create
  • api/v2/config_groups/create
 
edit_config_groups
  • config_groups/edit
  • config_groups/update
  • api/v2/config_groups/update
 
destroy_config_groups
  • config_groups/destroy
  • api/v2/config_groups/destroy
 
view_config_reports
  • api/v1/reports/index
  • api/v1/reports/show
  • api/v1/reports/last
  • api/v2/reports/index
  • api/v2/reports/show
  • api/v2/reports/last
  • config_reports/index
  • config_reports/show
  • config_reports/auto_complete_search
  • api/v2/config_reports/index
  • api/v2/config_reports/show
  • api/v2/config_reports/last
 
destroy_config_reports
  • config_reports/destroy
  • api/v1/reports/destroy
  • api/v2/reports/destroy
  • api/v2/config_reports/destroy
 
upload_config_reports
  • api/v2/reports/create
  • api/v2/config_reports/create
 
view_containers
  • containers/index
  • containers/show
  • api/v2/containers/index
  • api/v2/containers/show
  • api/v2/containers/logs
Container
commit_containers
  • containers/commit
Container
create_containers
  • containers/steps/show
  • containers/steps/update
  • containers/new
  • api/v2/containers/create
  • api/v2/containers/power
Container
destroy_containers
  • containers/destroy
  • api/v2/containers/destroy
Container
power_compute_resources_vms
  • containers/power
  • api/v2/containers/create
  • api/v2/containers/power
ComputeResource
view_content_hosts
  • katello/content_hosts/auto_complete_search
  • katello/api/v2/systems/index
  • katello/api/v2/systems/show
  • katello/api/v2/systems/errata
  • katello/api/v2/systems/package_profile
  • katello/api/v2/systems/product_content
  • katello/api/v2/systems/report
  • katello/api/v2/systems/releases
  • katello/api/v2/systems/available_host_collections
  • katello/api/v2/host_collections/systems
Katello::System
create_content_hosts
  • katello/api/v2/systems/create
  • katello/api/rhsm/candlepin_proxies/consumer_create
  • katello/api/rhsm/candlepin_proxies/consumer_show
Katello::System
edit_content_hosts
  • katello/api/v2/systems/update
  • katello/api/v2/systems/content_override
  • katello/api/rhsm/candlepin_proxies/upload_package_profile
  • katello/api/rhsm/candlepin_proxies/regenerate_identity_certificates
  • katello/api/rhsm/candlepin_proxies/hypervisors_update
Katello::System
destroy_content_hosts
  • katello/api/v2/systems/destroy
Katello::System
view_content_views
  • katello/api/v2/content_views/index
  • katello/api/v2/content_views/show
  • katello/api/v2/content_views/available_puppet_modules
  • katello/api/v2/content_views/available_puppet_module_names
  • katello/api/v2/content_view_filters/index
  • katello/api/v2/content_view_filters/show
  • katello/api/v2/content_view_filter_rules/index
  • katello/api/v2/content_view_filter_rules/show
  • katello/api/v2/content_view_histories/index
  • katello/api/v2/content_view_puppet_modules/index
  • katello/api/v2/content_view_puppet_modules/show
  • katello/api/v2/content_view_versions/index
  • katello/api/v2/content_view_versions/show
  • katello/api/v2/package_groups/index
  • katello/api/v2/package_groups/show
  • katello/api/v2/errata/index
  • katello/api/v2/errata/show
  • katello/api/v2/puppet_modules/index
  • katello/api/v2/puppet_modules/show
  • katello/content_views/auto_complete
  • katello/content_views/auto_complete_search
  • katello/errata/short_details
  • katello/errata/auto_complete
  • katello/packages/details
  • katello/packages/auto_complete
  • katello/products/auto_complete
  • katello/repositories/auto_complete_library
  • katello/content_search/index
  • katello/content_search/products
  • katello/content_search/repos
  • katello/content_search/packages
  • katello/content_search/errata
  • katello/content_search/puppet_modules
  • katello/content_search/packages_items
  • katello/content_search/errata_items
  • katello/content_search/puppet_modules_items
  • katello/content_search/view_packages
  • katello/content_search/view_puppet_modules
  • katello/content_search/repo_packages
  • katello/content_search/repo_errata
  • katello/content_search/repo_puppet_modules
  • katello/content_search/repo_compare_errata
  • katello/content_search/repo_compare_packages
  • katello/content_search/repo_compare_puppet_modules
  • katello/content_search/view_compare_errata
  • katello/content_search/view_compare_packages
  • katello/content_search/view_compare_puppet_modules
  • katello/content_search/views
Katello::ContentView
create_content_views
  • katello/api/v2/content_views/create
  • katello/api/v2/content_views/copy
Katello::ContentView
edit_content_views
  • katello/api/v2/content_views/update
  • katello/api/v2/content_view_filters/create
  • katello/api/v2/content_view_filters/update
  • katello/api/v2/content_view_filters/destroy
  • katello/api/v2/content_view_filter_rules/create
  • katello/api/v2/content_view_filter_rules/update
  • katello/api/v2/content_view_filter_rules/destroy
  • katello/api/v2/content_view_puppet_modules/create
  • katello/api/v2/content_view_puppet_modules/update
  • katello/api/v2/content_view_puppet_modules/destroy
Katello::ContentView
destroy_content_views
  • katello/api/v2/content_views/destroy
  • katello/api/v2/content_views/remove
  • katello/api/v2/content_view_versions/destroy
Katello::ContentView
publish_content_views
  • katello/api/v2/content_views/publish
  • katello/api/v2/content_view_versions/incremental_update
Katello::ContentView
promote_or_remove_content_views
  • katello/api/v2/content_view_versions/promote
  • katello/api/v2/content_views/remove_from_environment
  • katello/api/v2/content_views/remove
Katello::ContentView
export_content_views
  • katello/api/v2/content_view_versions/export
Katello::ContentView
access_dashboard
  • dashboard/index
  • dashboard/save_positions
  • dashboard/reset_default
  • dashboard/create
  • dashboard/destroy
  • api/v1/dashboard/index
  • api/v2/dashboard/index
 
view_discovered_hosts
  • discovered_hosts/index
  • discovered_hosts/show
  • discovered_hosts/auto_complete_search
  • api/v2/discovered_hosts/index
  • api/v2/discovered_hosts/show
Host
submit_discovered_hosts
  • api/v2/discovered_hosts/facts
  • api/v2/discovered_hosts/create
Host
auto_provision_discovered_hosts
  • discovered_hosts/auto_provision
  • discovered_hosts/auto_provision_all
  • api/v2/discovered_hosts/auto_provision
  • api/v2/discovered_hosts/auto_provision_all
Host
provision_discovered_hosts
  • discovered_hosts/edit
  • discovered_hosts/update
  • api/v2/discovered_hosts/update
Host
edit_discovered_hosts
  • discovered_hosts/update_multiple_location
  • discovered_hosts/select_multiple_organization
  • discovered_hosts/update_multiple_organization
  • discovered_hosts/select_multiple_location
  • discovered_hosts/refresh_facts
  • discovered_hosts/reboot
  • discovered_hosts/reboot_all
  • api/v2/discovered_hosts/refresh_facts
  • api/v2/discovered_hosts/reboot
  • api/v2/discovered_hosts/reboot_all
Host
destroy_discovered_hosts
  • discovered_hosts/destroy
  • discovered_hosts/submit_multiple_destroy
  • discovered_hosts/multiple_destroy
  • api/v2/discovered_hosts/destroy
Host
view_discovery_rules
  • discovery_rules/index
  • discovery_rules/show
  • discovery_rules/auto_complete_search
  • api/v2/discovery_rules/index
  • api/v2/discovery_rules/show
DiscoveryRule
create_discovery_rules
  • discovery_rules/new
  • discovery_rules/create
  • api/v2/discovery_rules/create
DiscoveryRule
edit_discovery_rules
  • discovery_rules/edit
  • discovery_rules/update
  • discovery_rules/enable
  • discovery_rules/disable
  • api/v2/discovery_rules/create
  • api/v2/discovery_rules/update
DiscoveryRule
execute_discovery_rules
  • discovery_rules/auto_provision
  • discovery_rules/auto_provision_all
  • api/v2/discovery_rules/auto_provision
  • api/v2/discovery_rules/auto_provision_all
DiscoveryRule
destroy_discovery_rules
  • discovery_rules/destroy
  • api/v2/discovery_rules/destroy
DiscoveryRule
view_domains
  • domains/index
  • domains/show
  • domains/auto_complete_search
  • api/v1/domains/index
  • api/v1/domains/show
  • api/v2/domains/index
  • api/v2/domains/show
  • api/v2/parameters/index
  • api/v2/parameters/show
 
create_domains
  • domains/new
  • domains/create
  • api/v1/domains/create
  • api/v2/domains/create
 
edit_domains
  • domains/edit
  • domains/update
  • api/v1/domains/update
  • api/v2/domains/update
  • api/v2/parameters/create
  • api/v2/parameters/update
  • api/v2/parameters/destroy
  • api/v2/parameters/reset
 
destroy_domains
  • domains/destroy
  • api/v1/domains/destroy
  • api/v2/domains/destroy
 
view_environments
  • environments/index
  • environments/show
  • environments/auto_complete_search
  • api/v1/environments/index
  • api/v1/environments/show
  • api/v2/environments/index
  • api/v2/environments/show
 
create_environments
  • environments/new
  • environments/create
  • api/v1/environments/create
  • api/v2/environments/create
 
edit_environments
  • environments/edit
  • environments/update
  • api/v1/environments/update
  • api/v2/environments/update
 
destroy_environments
  • environments/destroy
  • api/v1/environments/destroy
  • api/v2/environments/destroy
 
import_environments
  • environments/import_environments
  • environments/obsolete_and_new
  • api/v1/environments/import_puppetclasses
  • api/v2/environments/import_puppetclasses
  • api/v1/smart_proxies/import_puppetclasses
  • api/v2/smart_proxies/import_puppetclasses
 
view_external_usergroups
  • external_usergroups/index
  • external_usergroups/show
  • api/v2/external_usergroups/index
  • api/v2/external_usergroups/show
 
create_external_usergroups
  • external_usergroups/new
  • external_usergroups/create
  • api/v2/external_usergroups/new
  • api/v2/external_usergroups/create
 
edit_external_usergroups
  • external_usergroups/edit
  • external_usergroups/update
  • external_usergroups/refresh
  • api/v2/external_usergroups/update
  • api/v2/external_usergroups/refresh
 
destroy_external_usergroups
  • external_usergroups/destroy
  • api/v2/external_usergroups/destroy
 
view_external_variables
  • lookup_keys/index
  • lookup_keys/show
  • lookup_keys/auto_complete_search
  • puppetclass_lookup_keys/index
  • puppetclass_lookup_keys/show
  • puppetclass_lookup_keys/auto_complete_search
  • variable_lookup_keys/index
  • variable_lookup_keys/show
  • variable_lookup_keys/auto_complete_search
  • lookup_values/index
  • api/v1/lookup_keys/index
  • api/v1/lookup_keys/show
  • api/v2/smart_variables/index
  • api/v2/smart_variables/show
  • api/v2/smart_class_parameters/index
  • api/v2/smart_class_parameters/show
  • api/v2/override_values/index
  • api/v2/override_values/show
 
create_external_variables
  • lookup_keys/new
  • lookup_keys/create
  • puppetclass_lookup_keys/new
  • puppetclass_lookup_keys/create
  • variable_lookup_keys/new
  • variable_lookup_keys/create
  • lookup_values/create
  • api/v1/lookup_keys/create
  • api/v2/smart_variables/create
  • api/v2/smart_class_parameters/create
  • api/v2/override_values/create
 
edit_external_variables
  • lookup_keys/edit
  • lookup_keys/update
  • puppetclass_lookup_keys/edit
  • puppetclass_lookup_keys/update
  • variable_lookup_keys/edit
  • variable_lookup_keys/update
  • lookup_values/create
  • lookup_values/update
  • lookup_values/destroy
  • api/v1/lookup_keys/update
  • api/v2/smart_variables/update
  • api/v2/smart_class_parameters/update
  • api/v2/override_values/create
  • api/v2/override_values/update
  • api/v2/override_values/destroy
 
destroy_external_variables
  • lookup_keys/destroy
  • puppetclass_lookup_keys/destroy
  • variable_lookup_keys/destroy
  • lookup_values/destroy
  • api/v1/lookup_keys/destroy
  • api/v2/smart_variables/destroy
  • api/v2/smart_class_parameters/destroy
  • api/v2/override_values/create
  • api/v2/override_values/update
  • api/v2/override_values/destroy
 
view_facts
  • facts/index
  • facts/show
  • fact_values/index
  • fact_values/show
  • fact_values/auto_complete_search
  • api/v1/fact_values/index
  • api/v1/fact_values/show
  • api/v2/fact_values/index
  • api/v2/fact_values/show
 
upload_facts
  • api/v2/hosts/facts
 
view_filters
  • filters/index
  • filters/auto_complete_search
  • api/v2/filters/index
  • api/v2/filters/show
 
create_filters
  • filters/new
  • filters/create
  • api/v2/filters/create
 
edit_filters
  • filters/edit
  • filters/update
  • permissions/index
  • api/v2/filters/update
  • api/v2/permissions/index
  • api/v2/permissions/show
  • api/v2/permissions/resource_types
 
destroy_filters
  • filters/destroy
  • api/v2/filters/destroy
 
view_arf_reports
  • arf_reports/index
  • arf_reports/show
  • arf_reports/parse_html
  • arf_reports/show_html
  • arf_reports/parse_bzip
  • arf_reports/auto_complete_search
  • api/v2/compliance/arf_reports/index
  • api/v2/compliance/arf_reports/show
  • compliance_hosts/show
 
destroy_arf_reports
  • arf_reports/destroy
  • arf_reports/delete_multiple
  • arf_reports/submit_delete_multiple
  • api/v2/compliance/arf_reports/destroy
 
create_arf_reports
  • api/v2/compliance/arf_reports/create
 
view_policies
  • policies/index
  • policies/show
  • policies/parse
  • policies/auto_complete_search
  • policy_dashboard/index
  • compliance_dashboard/index
  • api/v2/compliance/policies/index
  • api/v2/compliance/policies/show
  • api/v2/compliance/policies/content
ForemanOpenscap::Policy
edit_policies
  • policies/edit
  • policies/update
  • policies/scap_content_selected
  • api/v2/compliance/policies/update
ForemanOpenscap::Policy
create_policies
  • policies/new
  • policies/create
  • api/v2/compliance/policies/create
ForemanOpenscap::Policy
destroy_policies
  • policies/destroy
  • api/v2/compliance/policies/destroy
ForemanOpenscap::Policy
assign_policies
  • policies/select_multiple_hosts
  • policies/update_multiple_hosts
  • policies/disassociate_multiple_hosts
  • policies/remove_policy_from_multiple_hosts
ForemanOpenscap::Policy
view_scap_contents
  • scap_contents/index
  • scap_contents/show
  • scap_contents/auto_complete_search
  • api/v2/compliance/scap_contents/index
  • api/v2/compliance/scap_contents/show
ForemanOpenscap::ScapContent
view_scap_contents
  • scap_contents/index
  • scap_contents/show
  • scap_contents/auto_complete_search
  • api/v2/compliance/scap_contents/index
  • api/v2/compliance/scap_contents/show
ForemanOpenscap::ScapContent
edit_scap_contents
  • scap_contents/edit
  • scap_contents/update
  • api/v2/compliance/scap_contents/update
ForemanOpenscap::ScapContent
create_scap_contents
  • scap_contents/new
  • scap_contents/create
  • api/v2/compliance/scap_contents/create
ForemanOpenscap::ScapContent
destroy_scap_contents
  • scap_contents/destroy
  • api/v2/compliance/scap_contents/destroy
ForemanOpenscap::ScapContent
edit_hosts
  • hosts/openscap_proxy_changed
Host
edit_hostgroups
  • hostgroups/openscap_proxy_changed
Host
view_job_templates
  • job_templates/index
  • job_templates/show
  • job_templates/revision
  • job_templates/auto_complete_search
  • job_templates/auto_complete_job_category
  • job_templates/preview
  • job_templates/export
  • api/v2/job_templates/index
  • api/v2/job_templates/show
  • api/v2/job_templates/revision
  • api/v2/job_templates/export
  • api/v2/template_inputs/index
  • api/v2/template_inputs/show
  • api/v2/foreign_input_sets/index
  • api/v2/foreign_input_sets/show
JobTemplate
create_job_templates
  • job_templates/new
  • job_templates/create
  • job_templates/clone_template
  • job_templates/import
  • api/v2/job_templates/create
  • api/v2/job_templates/clone
  • api/v2/job_templates/import
JobTemplate
edit_job_templates
  • job_templates/edit
  • job_templates/update
  • api/v2/job_templates/update
  • api/v2/template_inputs/create
  • api/v2/template_inputs/update
  • api/v2/template_inputs/destroy
  • api/v2/foreign_input_sets/create
  • api/v2/foreign_input_sets/update
  • api/v2/foreign_input_sets/destroy
 
edit_job_templates
  • job_templates/edit
  • job_templates/update
  • api/v2/job_templates/update
  • api/v2/template_inputs/create
  • api/v2/template_inputs/update
  • api/v2/template_inputs/destroy
  • api/v2/foreign_input_sets/create
  • api/v2/foreign_input_sets/update
  • api/v2/foreign_input_sets/destroy
 
edit_remote_execution_features
  • remote_execution_features/index
  • remote_execution_features/show
  • remote_execution_features/update
  • api/v2/remote_execution_features/index
  • api/v2/remote_execution_features/show
  • api/v2/remote_execution_features/update
RemoteExecutionFeature
destroy_job_templates
  • job_templates/destroy
  • api/v2/job_templates/destroy
JobTemplate
lock_job_templates
  • job_templates/lock
  • job_templates/unlock
JobTemplate
create_job_invocations
  • job_invocations/new
  • job_invocations/create
  • job_invocations/refresh
  • job_invocations/rerun
  • job_invocations/preview_hosts
  • api/v2/job_invocations/create
JobInvocation
view_job_invocations
  • job_invocations/index
  • job_invocations/show
  • template_invocations/show
  • api/v2/job_invocations/index
  • api/v2/job_invocations/show
  • api/v2/job_invocations/output
JobInvocation
execute_template_invocation TemplateInvocation
filter_autocompletion_for_template_invocation
  • template_invocations/auto_complete_search
  • job_invocations/show
  • template_invocations/index
TemplateInvocation
view_foreman_tasks
  • foreman_tasks/tasks/auto_complete_search
  • foreman_tasks/tasks/sub_tasks
  • foreman_tasks/tasks/index
  • foreman_tasks/tasks/show
  • foreman_tasks/api/tasks/bulk_search
  • foreman_tasks/api/tasks/show
  • foreman_tasks/api/tasks/index
  • foreman_tasks/api/tasks/summary
ForemanTasks::Task
edit_foreman_tasks
  • foreman_tasks/tasks/resume
  • foreman_tasks/tasks/unlock
  • foreman_tasks/tasks/force_unlock
  • foreman_tasks/tasks/cancel_step
  • foreman_tasks/api/tasks/bulk_resume
ForemanTasks::Task
create_recurring_logics ForemanTasks::RecurringLogic
view_recurring_logics
  • foreman_tasks/recurring_logics/index
  • foreman_tasks/recurring_logics/show
  • foreman_tasks/api/recurring_logics/index
  • foreman_tasks/api/recurring_logics/show
ForemanTasks::RecurringLogic
edit_recurring_logics
  • foreman_tasks/recurring_logics/cancel
  • foreman_tasks/api/recurring_logics/cancel
ForemanTasks::RecurringLogic
view_globals
  • common_parameters/index
  • common_parameters/show
  • common_parameters/auto_complete_search
  • api/v1/common_parameters/index
  • api/v1/common_parameters/show
  • api/v2/common_parameters/index
  • api/v2/common_parameters/show
 
create_globals
  • common_parameters/new
  • common_parameters/create
  • api/v1/common_parameters/create
  • api/v2/common_parameters/create
 
edit_globals
  • common_parameters/edit
  • common_parameters/update
  • api/v1/common_parameters/update
  • api/v2/common_parameters/update
 
destroy_globals
  • common_parameters/destroy
  • api/v1/common_parameters/destroy
  • api/v2/common_parameters/destroy
 
view_gpg_keys
  • katello/gpg_keys/all
  • katello/gpg_keys/index
  • katello/gpg_keys/auto_complete_search
  • katello/api/v2/gpg_keys/index
  • katello/api/v2/gpg_keys/show
Katello::GpgKey
create_gpg_keys
  • katello/api/v2/gpg_keys/create
Katello::GpgKey
edit_gpg_keys
  • katello/api/v2/gpg_keys/update
  • katello/api/v2/gpg_keys/content
Katello::GpgKey
destroy_gpg_keys
  • katello/api/v2/gpg_keys/destroy
Katello::GpgKey
view_host_collections
  • katello/api/v2/host_collections/index
  • katello/api/v2/host_collections/show
  • katello/host_collections/auto_complete_search
Katello::HostCollection
create_host_collections
  • katello/api/v2/host_collections/create
  • katello/api/v2/host_collections/copy
Katello::HostCollection
edit_host_collections
  • katello/api/v2/host_collections/update
  • katello/api/v2/host_collections/add_systems
  • katello/api/v2/host_collections/remove_systems
Katello::HostCollection
destroy_host_collections
  • katello/api/v2/host_collections/destroy
Katello::HostCollection
edit_classes
  • host_editing/edit_classes
  • api/v2/host_classes/index
  • api/v2/host_classes/create
  • api/v2/host_classes/destroy
 
create_params
  • host_editing/create_params
  • api/v2/parameters/create
 
edit_params
  • host_editing/edit_params
  • api/v2/parameters/update
 
destroy_params
  • host_editing/destroy_params
  • api/v2/parameters/destroy
  • api/v2/parameters/reset
 
view_hostgroups
  • hostgroups/index
  • hostgroups/show
  • hostgroups/auto_complete_search
  • api/v1/hostgroups/index
  • api/v1/hostgroups/show
  • api/v2/hostgroups/index
  • api/v2/hostgroups/show
 
create_hostgroups
  • hostgroups/new
  • hostgroups/create
  • hostgroups/clone
  • hostgroups/nest
  • hostgroups/process_hostgroup
  • hostgroups/architecture_selected
  • hostgroups/domain_selected
  • hostgroups/environment_selected
  • hostgroups/medium_selected
  • hostgroups/os_selected
  • hostgroups/use_image_selected
  • hostgroups/process_hostgroup
  • hostgroups/puppetclass_parameters
  • host/process_hostgroup
  • puppetclasses/parameters
  • api/v1/hostgroups/create
  • api/v1/hostgroups/clone
  • api/v2/hostgroups/create
  • api/v2/hostgroups/clone
 
edit_hostgroups
  • hostgroups/edit
  • hostgroups/update
  • hostgroups/architecture_selected
  • hostgroups/process_hostgroup
  • hostgroups/architecture_selected
  • hostgroups/domain_selected
  • hostgroups/environment_selected
  • hostgroups/medium_selected
  • hostgroups/os_selected
  • hostgroups/use_image_selected
  • hostgroups/process_hostgroup
  • hostgroups/puppetclass_parameters
  • host/process_hostgroup
  • puppetclasses/parameters
  • api/v1/hostgroups/update
  • api/v2/hostgroups/update
  • api/v2/parameters/create
  • api/v2/parameters/update
  • api/v2/parameters/destroy
  • api/v2/parameters/reset
  • api/v2/hostgroup_classes/index
  • api/v2/hostgroup_classes/create
  • api/v2/hostgroup_classes/destroy
 
destroy_hostgroups
  • hostgroups/destroy
  • api/v1/hostgroups/destroy
  • api/v2/hostgroups/destroy
 
view_hosts
  • hosts/index
  • hosts/show
  • hosts/errors
  • hosts/active
  • hosts/out_of_sync
  • hosts/disabled
  • hosts/pending
  • hosts/vm
  • hosts/externalNodes
  • hosts/pxe_config
  • hosts/storeconfig_klasses
  • hosts/auto_complete_search
  • hosts/bmc
  • hosts/runtime
  • hosts/resources
  • hosts/templates
  • hosts/overview
  • hosts/nics
  • dashboard/OutOfSync
  • dashboard/errors
  • dashboard/active
  • unattended/host_template
  • unattended/hostgroup_template
  • api/v1/hosts/index
  • api/v1/hosts/show
  • api/v1/hosts/status
  • api/v2/hosts/index
  • api/v2/hosts/show
  • api/v2/hosts/status
  • api/v2/hosts/get_status
  • api/v2/hosts/vm_compute_attributes
  • api/v2/hosts/template
  • api/v2/interfaces/index
  • api/v2/interfaces/show
  • locations/mismatches
  • organizations/mismatches
  • hosts/puppet_environment_for_content_view
  • katello/api/v2/host_autocomplete/auto_complete_search
  • katello/api/v2/host_errata/index
  • katello/api/v2/host_errata/show
  • katello/api/v2/host_errata/auto_complete_search
  • katello/api/v2/host_subscriptions/index
  • katello/api/v2/host_subscriptions/events
  • katello/api/v2/host_subscriptions/product_content
  • katello/api/v2/hosts_bulk_actions/installable_errata
  • katello/api/v2/hosts_bulk_actions/available_incremental_updates
  • katello/api/v2/host_packages/index
 
create_hosts
  • hosts/new
  • hosts/create
  • hosts/clone
  • hosts/architecture_selected
  • hosts/compute_resource_selected
  • hosts/domain_selected
  • hosts/environment_selected
  • hosts/hostgroup_or_environment_selected
  • hosts/medium_selected
  • hosts/os_selected
  • hosts/use_image_selected
  • hosts/process_hostgroup
  • hosts/process_taxonomy
  • hosts/current_parameters
  • hosts/puppetclass_parameters
  • hosts/template_used
  • hosts/interfaces
  • compute_resources/cluster_selected
  • compute_resources/template_selected
  • compute_resources/provider_selected
  • compute_resources/resource_pools
  • puppetclasses/parameters
  • subnets/freeip
  • interfaces/new
  • api/v1/hosts/create
  • api/v2/hosts/create
  • api/v2/interfaces/create
  • api/v2/tasks/index
 
edit_hosts
  • hosts/edit
  • hosts/update
  • hosts/multiple_actions
  • hosts/reset_multiple
  • hosts/submit_multiple_enable
  • hosts/select_multiple_hostgroup
  • hosts/select_multiple_environment
  • hosts/submit_multiple_disable
  • hosts/multiple_parameters
  • hosts/multiple_disable
  • hosts/multiple_enable
  • hosts/update_multiple_environment
  • hosts/update_multiple_hostgroup
  • hosts/update_multiple_parameters
  • hosts/toggle_manage
  • hosts/select_multiple_organization
  • hosts/update_multiple_organization
  • hosts/disassociate
  • hosts/multiple_disassociate
  • hosts/update_multiple_disassociate
  • hosts/select_multiple_owner
  • hosts/update_multiple_owner
  • hosts/select_multiple_power_state
  • hosts/update_multiple_power_state
  • hosts/select_multiple_puppet_proxy
  • hosts/update_multiple_puppet_proxy
  • hosts/select_multiple_puppet_ca_proxy
  • hosts/update_multiple_puppet_ca_proxy
  • hosts/select_multiple_location
  • hosts/update_multiple_location
  • hosts/architecture_selected
  • hosts/compute_resource_selected
  • hosts/domain_selected
  • hosts/environment_selected
  • hosts/hostgroup_or_environment_selected
  • hosts/medium_selected
  • hosts/os_selected
  • hosts/use_image_selected
  • hosts/process_hostgroup
  • hosts/process_taxonomy
  • hosts/current_parameters
  • hosts/puppetclass_parameters
  • hosts/template_used
  • hosts/interfaces
  • compute_resources/associate
  • compute_resources/[:cluster_selected, :template_selected, :provider_selected, :resource_pools]
  • compute_resources_vms/associate
  • puppetclasses/parameters
  • subnets/freeip
  • interfaces/new
  • api/v1/hosts/update
  • api/v2/hosts/update
  • api/v2/hosts/disassociate
  • api/v2/interfaces/create
  • api/v2/interfaces/update
  • api/v2/interfaces/destroy
  • api/v2/compute_resources/associate
  • api/v2/hosts/host_collections
  • katello/api/v2/host_errata/apply
  • katello/api/v2/host_packages/install
  • katello/api/v2/host_packages/upgrade
  • katello/api/v2/host_packages/upgrade_all
  • katello/api/v2/host_packages/remove
  • katello/api/v2/host_subscriptions/auto_attach
  • katello/api/v2/host_subscriptions/add_subscriptions
  • katello/api/v2/host_subscriptions/remove_subscriptions
  • katello/api/v2/host_subscriptions/content_override
  • katello/api/v2/hosts_bulk_actions/bulk_add_host_collections
  • katello/api/v2/hosts_bulk_actions/bulk_remove_host_collections
  • katello/api/v2/hosts_bulk_actions/install_content
  • katello/api/v2/hosts_bulk_actions/update_content
  • katello/api/v2/hosts_bulk_actions/remove_content
  • katello/api/v2/hosts_bulk_actions/environment_content_view
 
destroy_hosts
  • hosts/destroy
  • hosts/multiple_actions
  • hosts/reset_multiple
  • hosts/multiple_destroy
  • hosts/submit_multiple_destroy
  • api/v1/hosts/destroy
  • api/v2/hosts/destroy
  • api/v2/interfaces/destroy
  • katello/api/v2/hosts_bulk_actions/destroy_hosts
 
build_hosts
  • hosts/setBuild
  • hosts/cancelBuild
  • hosts/multiple_build
  • hosts/submit_multiple_build
  • hosts/review_before_build
  • hosts/rebuild_config
  • hosts/submit_rebuild_config
  • tasks/show
  • api/v2/tasks/index
  • api/v2/hosts/rebuild_config
 
power_hosts
  • hosts/power
  • api/v2/hosts/power
 
console_hosts
  • hosts/console
 
ipmi_boot
  • hosts/ipmi_boot
  • api/v2/hosts/boot
 
puppetrun_hosts
  • hosts/puppetrun
  • hosts/multiple_puppetrun
  • hosts/update_multiple_puppetrun
  • api/v2/hosts/puppetrun
 
search_repository_image_search
  • image_search/auto_complete_repository_name
  • image_search/auto_complete_image_tag
  • image_search/search_repository
Docker/ImageSearch
view_images
  • images/index
  • images/show
  • images/auto_complete_search
  • api/v1/images/index
  • api/v1/images/show
  • api/v2/images/index
  • api/v2/images/show
 
create_images
  • images/new
  • images/create
  • api/v1/images/create
  • api/v2/images/create
 
edit_images
  • images/edit
  • images/update
  • api/v1/images/update
  • api/v2/images/update
 
destroy_images
  • images/destroy
  • api/v1/images/destroy
  • api/v2/images/destroy
 
view_lifecycle_environments
  • katello/api/v2/environments/index
  • katello/api/v2/environments/show
  • katello/api/v2/environments/paths
  • katello/api/v2/environments/repositories
  • katello/api/rhsm/candlepin_proxies/rhsm_index
  • katello/environments/auto_complete_search
Katello::KTEnvironment
create_lifecycle_environments
  • katello/api/v2/environments/create
Katello::KTEnvironment
edit_lifecycle_environments
  • katello/api/v2/environments/update
Katello::KTEnvironment
destroy_lifecycle_environments
  • katello/api/v2/environments/destroy
Katello::KTEnvironment
promote_or_remove_content_views_to_environments Katello::KTEnvironment
view_locations
  • locations/index
  • locations/show
  • locations/auto_complete_search
  • api/v1/locations/index
  • api/v1/locations/show
  • api/v2/locations/index
  • api/v2/locations/show
 
create_locations
  • locations/new
  • locations/create
  • locations/clone_taxonomy
  • locations/step2
  • locations/nest
  • api/v1/locations/create
  • api/v2/locations/create
 
edit_locations
  • locations/edit
  • locations/update
  • locations/import_mismatches
  • locations/parent_taxonomy_selected
  • api/v1/locations/update
  • api/v2/locations/update
 
destroy_locations
  • locations/destroy
  • api/v1/locations/destroy
  • api/v2/locations/destroy
 
assign_locations
  • locations/assign_all_hosts
  • locations/assign_hosts
  • locations/assign_selected_hosts
 
view_mail_notifications
  • mail_notifications/index
  • mail_notifications/auto_complete_search
  • mail_notifications/show
  • api/v2/mail_notifications/index
  • api/v2/mail_notifications/show
 
view_media
  • media/index
  • media/show
  • media/auto_complete_search
  • api/v1/media/index
  • api/v1/media/show
  • api/v2/media/index
  • api/v2/media/show
 
create_media
  • media/new
  • media/create
  • api/v1/media/create
  • api/v2/media/create
 
edit_media
  • media/edit
  • media/update
  • api/v1/media/update
  • api/v2/media/update
 
destroy_media
  • media/destroy
  • api/v1/media/destroy
  • api/v2/media/destroy
 
view_models
  • models/index
  • models/show
  • models/auto_complete_search
  • api/v1/models/index
  • api/v1/models/show
  • api/v2/models/index
  • api/v2/models/show
 
create_models
  • models/new
  • models/create
  • api/v1/models/create
  • api/v2/models/create
 
edit_models
  • models/edit
  • models/update
  • api/v1/models/update
  • api/v2/models/update
 
destroy_models
  • models/destroy
  • api/v1/models/destroy
  • api/v2/models/destroy
 
view_operatingsystems
  • operatingsystems/index
  • operatingsystems/show
  • operatingsystems/bootfiles
  • operatingsystems/auto_complete_search
  • api/v1/operatingsystems/index
  • api/v1/operatingsystems/show
  • api/v1/operatingsystems/bootfiles
  • api/v2/operatingsystems/index
  • api/v2/operatingsystems/show
  • api/v2/operatingsystems/bootfiles
  • api/v2/os_default_templates/index
  • api/v2/os_default_templates/show
 
create_operatingsystems
  • operatingsystems/new
  • operatingsystems/create
  • api/v1/operatingsystems/create
  • api/v2/operatingsystems/create
  • api/v2/os_default_templates/create
 
edit_operatingsystems
  • operatingsystems/edit
  • operatingsystems/update
  • api/v1/operatingsystems/update
  • api/v2/operatingsystems/update
  • api/v2/parameters/create
  • api/v2/parameters/update
  • api/v2/parameters/destroy
  • api/v2/parameters/reset
  • api/v2/os_default_templates/create
  • api/v2/os_default_templates/update
  • api/v2/os_default_templates/destroy
 
destroy_operatingsystems
  • operatingsystems/destroy
  • api/v1/operatingsystems/destroy
  • api/v2/operatingsystems/destroy
  • api/v2/os_default_templates/create
 
view_organizations
  • organizations/index
  • organizations/show
  • organizations/auto_complete_search
  • api/v1/organizations/index
  • api/v1/organizations/show
  • api/v2/organizations/index
  • api/v2/organizations/show
  • katello/api/v2/organizations/index
  • katello/api/v2/organizations/show
  • katello/api/v2/organizations/redhat_provider
  • katello/api/v2/organizations/download_debug_certificate
  • katello/api/v2/tasks/index
 
create_organizations
  • organizations/new
  • organizations/create
  • organizations/clone_taxonomy
  • organizations/step2
  • organizations/nest
  • api/v1/organizations/create
  • api/v2/organizations/create
  • katello/api/v2/organizations/create
 
edit_organizations
  • organizations/edit
  • organizations/update
  • organizations/import_mismatches
  • organizations/parent_taxonomy_selected
  • api/v1/organizations/update
  • api/v2/organizations/update
  • katello/api/v2/organizations/update
  • katello/api/v2/organizations/autoattach_subscriptions
 
destroy_organizations
  • organizations/destroy
  • api/v1/organizations/destroy
  • api/v2/organizations/destroy
  • katello/api/v2/organizations/destroy
 
assign_organizations
  • organizations/assign_all_hosts
  • organizations/assign_hosts
  • organizations/assign_selected_hosts
 
view_ptables
  • ptables/index
  • ptables/show
  • ptables/auto_complete_search
  • ptables/revision
  • ptables/preview
  • api/v1/ptables/index
  • api/v1/ptables/show
  • api/v2/ptables/index
  • api/v2/ptables/show
  • api/v2/ptables/revision
 
create_ptables
  • ptables/new
  • ptables/create
  • ptables/clone_template
  • api/v1/ptables/create
  • api/v2/ptables/create
  • api/v2/ptables/clone
 
edit_ptables
  • ptables/edit
  • ptables/update
  • api/v1/ptables/update
  • api/v2/ptables/update
 
destroy_ptables
  • ptables/destroy
  • api/v1/ptables/destroy
  • api/v2/ptables/destroy
 
lock_ptables
  • ptables/lock
  • ptables/unlock
  • api/v2/ptables/lock
  • api/v2/ptables/unlock
 
view_plugins
  • plugins/index
  • api/v2/plugins/index
 
view_products
  • katello/products/auto_complete
  • katello/products/auto_complete_search
  • katello/api/v2/products/index
  • katello/api/v2/products/show
  • katello/api/v2/repositories/index
  • katello/api/v2/repositories/show
  • katello/api/v2/packages/index
  • katello/api/v2/packages/show
  • katello/api/v2/distributions/index
  • katello/api/v2/distributions/show
  • katello/api/v2/package_groups/index
  • katello/api/v2/package_groups/show
  • katello/api/v2/errata/index
  • katello/api/v2/errata/show
  • katello/api/v2/puppet_modules/index
  • katello/api/v2/puppet_modules/show
  • katello/errata/short_details
  • katello/errata/auto_complete
  • katello/packages/details
  • katello/packages/auto_complete
  • katello/puppet_modules/show
  • katello/repositories/auto_complete_library
  • katello/repositories/repository_types
  • katello/content_search/index
  • katello/content_search/products
  • katello/content_search/repos
  • katello/content_search/packages
  • katello/content_search/errata
  • katello/content_search/puppet_modules
  • katello/content_search/packages_items
  • katello/content_search/errata_items
  • katello/content_search/puppet_modules_items
  • katello/content_search/repo_packages
  • katello/content_search/repo_errata
  • katello/content_search/repo_puppet_modules
  • katello/content_search/repo_compare_errata
  • katello/content_search/repo_compare_packages
  • katello/content_search/repo_compare_puppet_modules
Katello::Product
create_products
  • katello/api/v2/products/create
  • katello/api/v2/repositories/create
Katello::Product
edit_products
  • katello/api/v2/products/update
  • katello/api/v2/repositories/update
  • katello/api/v2/repositories/remove_content
  • katello/api/v2/repositories/import_uploads
  • katello/api/v2/repositories/upload_content
  • katello/api/v2/products_bulk_actions/update_sync_plans
  • katello/api/v2/content_uploads/create
  • katello/api/v2/content_uploads/update
  • katello/api/v2/content_uploads/destroy
  • katello/api/v2/organizations/repo_discover
  • katello/api/v2/organizations/cancel_repo_discover
Katello::Product
destroy_products
  • katello/api/v2/products/destroy
  • katello/api/v2/repositories/destroy
  • katello/api/v2/products_bulk_actions/destroy_products
  • katello/api/v2/repositories_bulk_actions/destroy_repositories
Katello::Product
sync_products
  • katello/api/v2/products/sync
  • katello/api/v2/repositories/sync
  • katello/api/v2/products_bulk_actions/sync_products
  • katello/api/v2/repositories_bulk_actions/sync_repositories
  • katello/api/v2/sync/index
  • katello/api/v2/sync_plans/sync
  • katello/sync_management/index
  • katello/sync_management/sync_status
  • katello/sync_management/product_status
  • katello/sync_management/sync
  • katello/sync_management/destroy
Katello::Product
export_products
  • katello/api/v2/repositories/export
Katello::Product
view_provisioning_templates
  • provisioning_templates/index
  • provisioning_templates/show
  • provisioning_templates/revision
  • provisioning_templates/auto_complete_search
  • provisioning_templates/preview
  • api/v1/config_templates/index
  • api/v1/config_templates/show
  • api/v1/config_templates/revision
  • api/v2/config_templates/index
  • api/v2/config_templates/show
  • api/v2/config_templates/revision
  • api/v2/provisioning_templates/index
  • api/v2/provisioning_templates/show
  • api/v2/provisioning_templates/revision
  • api/v2/template_combinations/index
  • api/v2/template_combinations/show
  • api/v1/template_kinds/index
  • api/v2/template_kinds/index
 
create_provisioning_templates
  • provisioning_templates/new
  • provisioning_templates/create
  • provisioning_templates/clone_template
  • api/v1/config_templates/create
  • api/v2/config_templates/create
  • api/v2/config_templates/clone
  • api/v2/provisioning_templates/create
  • api/v2/provisioning_templates/clone
  • api/v2/template_combinations/create
 
edit_provisioning_templates
  • provisioning_templates/edit
  • provisioning_templates/update
  • api/v1/config_templates/update
  • api/v2/config_templates/update
  • api/v2/provisioning_templates/update
  • api/v2/template_combinations/update
 
destroy_provisioning_templates
  • provisioning_templates/destroy
  • api/v1/config_templates/destroy
  • api/v2/config_templates/destroy
  • api/v2/provisioning_templates/destory
  • api/v2/template_combinations/destory
 
deploy_provisioning_templates
  • provisioning_templates/build_pxe_default
  • api/v1/config_templates/build_pxe_default
  • api/v2/config_templates/build_pxe_default
  • api/v2/provisioning_templates/build_pxe_default
 
lock_provisioning_templates
  • provisioning_templates/lock
  • provisioning_templates/unlock
  • api/v2/config_templates/lock
  • api/v2/config_templates/unlock
  • api/v2/provisioning_templates/lock
  • api/v2/provisioning_templates/unlock
 
user_logout
  • users/logout
 
my_account
  • users/edit
  • katello/api/v2/tasks/show
 
api_status
  • api/v1/home/status
  • api/v2/home/status
 
view_puppetclasses
  • puppetclasses/index
  • puppetclasses/show
  • puppetclasses/auto_complete_search
  • api/v1/puppetclasses/index
  • api/v1/puppetclasses/show
  • api/v2/puppetclasses/index
  • api/v2/puppetclasses/show
  • api/v1/lookup_keys/index
  • api/v1/lookup_keys/show
  • api/v2/smart_variables/index
  • api/v2/smart_variables/show
  • api/v2/smart_class_parameters/index
  • api/v2/smart_class_parameters/show
 
create_puppetclasses
  • puppetclasses/new
  • puppetclasses/create
  • api/v1/puppetclasses/create
  • api/v2/puppetclasses/create
 
edit_puppetclasses
  • puppetclasses/edit
  • puppetclasses/update
  • puppetclasses/override
  • api/v1/puppetclasses/update
  • api/v2/puppetclasses/update
  • api/v1/lookup_keys/create
  • api/v1/lookup_keys/update
  • api/v1/lookup_keys/destroy
  • api/v2/smart_variables/create
  • api/v2/smart_variables/update
  • api/v2/smart_variables/destroy
  • api/v2/smart_class_parameters/create
  • api/v2/smart_class_parameters/update
  • api/v2/smart_class_parameters/destroy
 
destroy_puppetclasses
  • puppetclasses/destroy
  • api/v1/puppetclasses/destroy
  • api/v2/puppetclasses/destroy
 
import_puppetclasses
  • puppetclasses/import_environments
  • puppetclasses/obsolete_and_new
  • api/v1/environments/import_puppetclasses
  • api/v2/environments/import_puppetclasses
  • api/v1/smart_proxies/import_puppetclasses
  • api/v2/smart_proxies/import_puppetclasses
 
view_realms
  • realms/index
  • realms/show
  • realms/auto_complete_search
  • api/v2/realms/index
  • api/v2/realms/show
 
create_realms
  • realms/new
  • realms/create
  • api/v2/realms/create
 
edit_realms
  • realms/edit
  • realms/update
  • api/v2/realms/update
 
destroy_realms
  • realms/destroy
  • api/v2/realms/destroy
 
view_search
  • redhat_access/search/index
 
view_cases
  • redhat_access/cases/index
  • redhat_access/cases/create
 
attachments
  • redhat_access/attachments/index
  • redhat_access/attachments/create
 
設定
  • redhat_access/configuration/index
 
app_root
  • redhat_access/redhat_access/index
 
view_log_viewer
  • redhat_access/logviewer/index
 
ログ
  • redhat_access/logs/index
 
rh_telemetry_api
  • redhat_access/api/telemetry_api/proxy
  • redhat_access/api/telemetry_api/connection_status
 
rh_telemetry_view
  • redhat_access/analytics_dashboard/index
 
rh_telemetry_configurations
  • redhat_access/telemetry_configurations/show
  • redhat_access/telemetry_configurations/update
 
view_registries
  • registries/index
  • registries/show
  • api/v2/registries/index
  • api/v2/registries/show
DockerRegistry
view_registries
  • registries/index
  • registries/show
  • api/v2/registries/index
  • api/v2/registries/show
DockerRegistry
create_registries
  • registries/new
  • registries/create
  • registries/update
  • registries/edit
  • api/v2/registries/create
  • api/v2/registries/update
DockerRegistry
destroy_registries
  • registries/destroy
  • api/v2/registries/destroy
DockerRegistry
view_roles
  • roles/index
  • roles/auto_complete_search
  • api/v2/roles/index
  • api/v2/roles/show
 
create_roles
  • roles/new
  • roles/create
  • roles/clone
  • api/v2/roles/create
 
edit_roles
  • roles/edit
  • roles/update
  • api/v2/roles/update
 
destroy_roles
  • roles/destroy
  • api/v2/roles/destroy
 
access_settings
  • home/settings
 
view_smart_proxies
  • smart_proxies/index
  • smart_proxies/ping
  • smart_proxies/auto_complete_search
  • smart_proxies/version
  • smart_proxies/show
  • smart_proxies/plugin_version
  • smart_proxies/tftp_server
  • smart_proxies/puppet_environments
  • smart_proxies/puppet_dashboard
  • smart_proxies/log_pane
  • smart_proxies/failed_modules
  • smart_proxies/errors_card
  • smart_proxies/modules_card
  • api/v1/smart_proxies/index
  • api/v1/smart_proxies/show
  • api/v2/smart_proxies/index
  • api/v2/smart_proxies/show
  • api/v2/smart_proxies/version
  • api/v2/smart_proxies/log
 
create_smart_proxies
  • smart_proxies/new
  • smart_proxies/create
  • api/v1/smart_proxies/create
  • api/v2/smart_proxies/create
 
edit_smart_proxies
  • smart_proxies/edit
  • smart_proxies/update
  • smart_proxies/refresh
  • smart_proxies/expire_logs
  • api/v1/smart_proxies/update
  • api/v1/smart_proxies/refresh
  • api/v2/smart_proxies/update
  • api/v2/smart_proxies/refresh
 
destroy_smart_proxies
  • smart_proxies/destroy
  • api/v1/smart_proxies/destroy
  • api/v2/smart_proxies/destroy
 
view_smart_proxies_autosign
  • autosign/index
  • autosign/show
  • autosign/counts
  • api/v1/autosign/index
  • api/v2/autosign/index
 
create_smart_proxies_autosign
  • autosign/new
  • autosign/create
 
destroy_smart_proxies_autosign
  • autosign/destroy
 
view_smart_proxies_puppetca
  • puppetca/index
  • puppetca/counts
  • puppetca/expiry
 
edit_smart_proxies_puppetca
  • puppetca/update
 
destroy_smart_proxies_puppetca
  • puppetca/destroy
 
view_statistics
  • statistics/index
  • api/v1/statistics/index
  • api/v2/statistics/index
 
view_subnets
  • subnets/index
  • subnets/show
  • subnets/auto_complete_search
  • api/v1/subnets/index
  • api/v1/subnets/show
  • api/v2/subnets/index
  • api/v2/subnets/show
 
create_subnets
  • subnets/new
  • subnets/create
  • api/v1/subnets/create
  • api/v2/subnets/create
 
edit_subnets
  • subnets/edit
  • subnets/update
  • api/v1/subnets/update
  • api/v2/subnets/update
 
destroy_subnets
  • subnets/destroy
  • api/v1/subnets/destroy
  • api/v2/subnets/destroy
 
import_subnets
  • subnets/import
  • subnets/create_multiple
 
view_subscriptions
  • katello/api/v2/subscriptions/index
  • katello/api/v2/subscriptions/show
  • katello/api/v2/subscriptions/available
  • katello/api/v2/subscriptions/manifest_history
  • katello/api/v2/subscriptions/auto_complete_search
  • katello/api/v2/repository_sets/index
  • katello/api/v2/repository_sets/show
  • katello/api/v2/repository_sets/available_repositories
Organization
attach_subscriptions
  • katello/api/v2/subscriptions/create
Organization
unattach_subscriptions
  • katello/api/v2/subscriptions/destroy
Organization
import_manifest
  • katello/products/available_repositories
  • katello/products/toggle_repository
  • katello/providers/redhat_provider
  • katello/providers/redhat_provider_tab
  • katello/api/v2/subscriptions/upload
  • katello/api/v2/subscriptions/refresh_manifest
  • katello/api/v2/repository_sets/enable
  • katello/api/v2/repository_sets/disable
Organization
delete_manifest
  • katello/api/v2/subscriptions/delete_manifest
Organization
view_sync_plans
  • katello/sync_plans/all
  • katello/sync_plans/index
  • katello/sync_plans/auto_complete_search
  • katello/api/v2/sync_plans/index
  • katello/api/v2/sync_plans/show
  • katello/api/v2/sync_plans/add_products
  • katello/api/v2/sync_plans/remove_products
  • katello/api/v2/sync_plans/available_products
  • katello/api/v2/products/index
Katello::SyncPlan
create_sync_plans
  • katello/api/v2/sync_plans/create
Katello::SyncPlan
edit_sync_plans
  • katello/api/v2/sync_plans/update
Katello::SyncPlan
destroy_sync_plans
  • katello/api/v2/sync_plans/destroy
Katello::SyncPlan
view_tasks
  • trends/show
 
view_trends
  • trends/index
  • trends/show
 
create_trends
  • trends/new
  • trends/create
 
edit_trends
  • trends/edit
  • trends/update
 
destroy_trends
  • trends/destroy
 
update_trends
  • trends/count
 
my_organizations
  • katello/api/rhsm/candlepin_proxies/list_owners
 
view_usergroups
  • usergroups/index
  • usergroups/show
  • usergroups/auto_complete_search
  • api/v1/usergroups/index
  • api/v1/usergroups/show
  • api/v2/usergroups/index
  • api/v2/usergroups/show
 
create_usergroups
  • usergroups/new
  • usergroups/create
  • api/v1/usergroups/create
  • api/v2/usergroups/create
 
edit_usergroups
  • usergroups/edit
  • usergroups/update
  • api/v1/usergroups/update
  • api/v2/usergroups/update
 
destroy_usergroups
  • usergroups/destroy
  • api/v1/usergroups/destroy
  • api/v2/usergroups/destroy
 
view_users
  • users/index
  • users/show
  • users/auto_complete_search
  • api/v1/users/index
  • api/v1/users/show
  • api/v2/users/index
  • api/v2/users/show
 
create_users
  • users/new
  • users/create
  • users/auth_source_selected
  • api/v1/users/create
  • api/v2/users/create
 
edit_users
  • users/edit
  • users/update
  • users/auth_source_selected
  • users/test_mail
  • api/v1/users/update
  • api/v2/users/update
 
destroy_users
  • users/destroy
  • api/v1/users/destroy
  • api/v2/users/destroy
 

法律上の通知

Copyright © 2017 Red Hat, Inc.
This document is licensed by Red Hat under the Creative Commons Attribution-ShareAlike 3.0 Unported License.If you distribute this document, or a modified version of it, you must provide attribution to Red Hat, Inc. and provide a link to the original.If the document is modified, all Red Hat trademarks must be removed.
Red Hat, as the licensor of this document, waives the right to enforce, and agrees not to assert, Section 4d of CC-BY-SA to the fullest extent permitted by applicable law.
Red Hat, Red Hat Enterprise Linux, the Shadowman logo, the Red Hat logo, JBoss, OpenShift, Fedora, the Infinity logo, and RHCE are trademarks of Red Hat, Inc., registered in the United States and other countries.
Linux® is the registered trademark of Linus Torvalds in the United States and other countries.
Java® is a registered trademark of Oracle and/or its affiliates.
XFS® is a trademark of Silicon Graphics International Corp. or its subsidiaries in the United States and/or other countries.
MySQL® is a registered trademark of MySQL AB in the United States, the European Union and other countries.
Node.js® is an official trademark of Joyent.Red Hat is not formally related to or endorsed by the official Joyent Node.js open source or commercial project.
The OpenStack® Word Mark and OpenStack logo are either registered trademarks/service marks or trademarks/service marks of the OpenStack Foundation, in the United States and other countries and are used with the OpenStack Foundation's permission.We are not affiliated with, endorsed or sponsored by the OpenStack Foundation, or the OpenStack community.
All other trademarks are the property of their respective owners.
トップに戻る
Red Hat logoGithubredditYoutubeTwitter

詳細情報

試用、購入および販売

コミュニティー

Red Hat ドキュメントについて

Red Hat をお使いのお客様が、信頼できるコンテンツが含まれている製品やサービスを活用することで、イノベーションを行い、目標を達成できるようにします。 最新の更新を見る.

多様性を受け入れるオープンソースの強化

Red Hat では、コード、ドキュメント、Web プロパティーにおける配慮に欠ける用語の置き換えに取り組んでいます。このような変更は、段階的に実施される予定です。詳細情報: Red Hat ブログ.

会社概要

Red Hat は、企業がコアとなるデータセンターからネットワークエッジに至るまで、各種プラットフォームや環境全体で作業を簡素化できるように、強化されたソリューションを提供しています。

Theme

© 2025 Red Hat