Red Hat Quay API ガイド


Red Hat Quay 3.5

Red Hat Quay API ガイド

概要

Red Hat Quay API の使用

序文

Red Hat Quay API (アプリケーションプログラミングインターフェース) は、Red Hat Quay の機能の追加、表示、変更、および削除を行うための一連のエンドポイントで構成される OAuth 2 RESTful API です。本書では、これらのエンドポイントと、そのエンドポイントにアクセスするために使用するコマンドおよびブラウザーベースの例を説明します。

第1章 Red Hat Quay API の使用

Red Hat Quay は、以下の完全な OAuth 2 RESTful API を提供します。

  • URL https://<yourquayhost>/api/v1 で各 Red Hat Quay インスタンスのエンドポイントから利用できます。
  • Swagger UI を有効にして Red Hat Quay 設定を取得し、削除し、送信し、配置できるようにブラウザーでエンドポイントに接続できます。
  • API 呼び出しを実行し、OAuth トークンを使用するアプリケーションからアクセスできます。
  • JSON としてデータを送受信します。

以下では、Red Hat Quay API にアクセスし、これを使用して Red Hat Quay クラスターで設定を表示し、変更する方法を説明します。付録 A には API エンドポイントが一覧表示され、これらについて説明されています。

1.1. Quay.io から Quay API へのアクセス

独自の Red Hat Quay クラスターがまだ実行中でない場合は、Web ブラウザーから Quay.io で利用可能な Red Hat Quay API を確認できます。

https://docs.quay.io/api/swagger/
Copy to Clipboard Toggle word wrap

表示される API Explorer には Quay.io API エンドポイントが表示されます。スーパーユーザー API エンドポイントや (リポジトリーミラーリングなど) Quay.io で有効にされていない Red Hat Quay 機能のエンドポイントは表示されません。

API Explorer から、以下の情報を取得したり、変更したりすることが可能です。

  • Billing (請求)、サブスクリプション、Plan (計画)
  • リポジトリービルドおよびビルドトリガー
  • エラーメッセージおよびグローバルメッセージ
  • リポジトリーイメージ、マニフェスト、パーミッション、通知、脆弱性およびイメージの署名
  • 使用ログ
  • 組織、メンバーおよび OAuth アプリケーション
  • ユーザーおよびロボットアカウント
  • その他

これを選択してエンドポイントを開き、エンドポイントの各部分の Model Schema を表示します。エンドポイントを開き、必要なパラメーター (リポジトリー名やイメージなど) を入力し、「Try it out!」ボタンを選択して Quay.io エンドポイントに関連する設定をクエリーするか、または変更します。

1.2. OAuth アクセストークンの作成

組織の API にアクセスできるように OAuth アクセストークンを作成するには、以下を実行します。

  1. Red Hat Quay にログインし、使用する組織を選択します (または新規の組織を作成します)。
  2. 左側のナビゲーションから「Applications」アイコンを選択します。
  3. 「Create New Application」を選択し、プロンプトが出されたら新しいアプリケーションに名前を付けます。
  4. 新規アプリケーションを選択します。
  5. 左側のナビゲーションから「Generate Token」を選択します。
  6. チェックボックスを選択してトークンのスコープを設定し、「Generate Access Token」を選択します。
  7. 許可するパーミッションを確認し、「Authorize Application」を選択してこれを承認します。
  8. API にアクセスするために使用する新規に生成されたトークンをコピーします。

1.3. Web ブラウザーから Quay API へのアクセス

Swagger を有効にすると、Web ブラウザーを使用して独自の Red Hat Quay インスタンスの API にアクセスできます。この URL を使用すると、Swagger UI と URL で Red Hat Quay API を公開できます。

https://<yourquayhost>/api/v1/discovery.
Copy to Clipboard Toggle word wrap

この API にアクセスする方法には、Red Hat Quay インストールで利用可能なスーパーユーザーエンドポイントは含まれません。以下は、swagger-ui コンテナーイメージを実行してローカルシステムで実行されている Red Hat Quay API インターフェースにアクセスする例です。

# export SERVER_HOSTNAME=<yourhostname>
# sudo podman run -p 8888:8080 -e API_URL=https://$SERVER_HOSTNAME:8443/api/v1/discovery docker.io/swaggerapi/swagger-ui
Copy to Clipboard Toggle word wrap

swagger-ui コンテナーが実行されている状態で、Web ブラウザーを localhost ポート 8888 で開き、swagger-ui コンテナーで API エンドポイントを表示します。

「API calls must be invoked with an X-Requested-With header if called from a browser」などのエラーがログに出されるのを防ぐには、以下の行を、クラスター内のすべてのノード上の config.yaml に追加し、Red Hat Quay を再起動します。

BROWSER_API_CALLS_XHR_ONLY: false
Copy to Clipboard Toggle word wrap

1.4. コマンドラインからの Red Hat Quay API へのアクセス

curl コマンドを、Red Hat Quay クラスターの API で GET、PUT、POST、または DELETE 設定に使用できます。<token> を、以下の例で設定を取得または変更するために作成した OAuth アクセストークンに置き換えます。

1.4.1. スーパーユーザー情報の取得

$ curl -X GET -H "Authorization: Bearer <token_here>" \
    "https://<yourquayhost>/api/v1/superuser/users/"
Copy to Clipboard Toggle word wrap

以下は例になります。

$ curl -X GET -H "Authorization: Bearer mFCdgS7SAIoMcnTsHCGx23vcNsTgziAa4CmmHIsg" http://quay-server:8080/api/v1/superuser/users/ | jq

{
  "users": [
    {
      "kind": "user",
      "name": "quayadmin",
      "username": "quayadmin",
      "email": "quayadmin@example.com",
      "verified": true,
      "avatar": {
        "name": "quayadmin",
        "hash": "357a20e8c56e69d6f9734d23ef9517e8",
        "color": "#5254a3",
        "kind": "user"
      },
      "super_user": true,
      "enabled": true
    }
  ]
}
Copy to Clipboard Toggle word wrap

1.4.2. API を使用したスーパーユーザーの作成

  • 『Quay のデプロイ』で説明されているようにスーパーユーザーの名前を設定します。

    • 設定エディターの UI を使用します。または以下を実行します。
    • 設定 API を使用して更新された設定バンドルを検証(およびダウンロード)するオプションで、config.yaml ファイルを直接編集します。
  • スーパーユーザー名のユーザーアカウントを作成します。

    • 上記のように認証トークンを取得し、curl を使用してユーザーを作成します。

      $ curl -H "Content-Type: application/json"  -H "Authorization: Bearer Fava2kV9C92p1eXnMawBZx9vTqVnksvwNm0ckFKZ" -X POST --data '{
       "username": "quaysuper",
       "email": "quaysuper@example.com"
      }'  http://quay-server:8080/api/v1/superuser/users/ | jq
      Copy to Clipboard Toggle word wrap
    • 返されるコンテンツには、新規ユーザーアカウント用に生成されたパスワードが含まれます。

      {
        "username": "quaysuper",
        "email": "quaysuper@example.com",
        "password": "EH67NB3Y6PTBED8H0HC6UVHGGGA3ODSE",
        "encrypted_password": "fn37AZAUQH0PTsU+vlO9lS0QxPW9A/boXL4ovZjIFtlUPrBz9i4j9UDOqMjuxQ/0HTfy38goKEpG8zYXVeQh3lOFzuOjSvKic2Vq7xdtQsU="
      }
      Copy to Clipboard Toggle word wrap

ユーザーの一覧を要求すると、quaysuper がスーパーユーザーとして表示されるようになりました。

$ curl -X GET -H "Authorization: Bearer mFCdgS7SAIoMcnTsHCGx23vcNsTgziAa4CmmHIsg" http://quay-server:8080/api/v1/superuser/users/ | jq

{
  "users": [
  {
      "kind": "user",
      "name": "quayadmin",
      "username": "quayadmin",
      "email": "quayadmin@example.com",
      "verified": true,
      "avatar": {
        "name": "quayadmin",
        "hash": "357a20e8c56e69d6f9734d23ef9517e8",
        "color": "#5254a3",
        "kind": "user"
      },
      "super_user": true,
      "enabled": true
    },
    {
      "kind": "user",
      "name": "quaysuper",
      "username": "quaysuper",
      "email": "quaysuper@example.com",
      "verified": true,
      "avatar": {
        "name": "quaysuper",
        "hash": "c0e0f155afcef68e58a42243b153df08",
        "color": "#969696",
        "kind": "user"
      },
      "super_user": true,
      "enabled": true
    }
  ]
}
Copy to Clipboard Toggle word wrap

1.4.3. ディレクトリーの同期

LDAP の対応するグループ名が ldapgroup の、testadminorg 組織の newteam チームのディレクトリーの同期を有効にするには、以下を実行します。

$ curl -X POST -H "Authorization: Bearer 9rJYBR3v3pXcj5XqIA2XX6Thkwk4gld4TCYLLWDF" \
       -H "Content-type: application/json" \
       -d '{"group_dn": "cn=ldapgroup,ou=Users"}' \
       http://quay1-server:8080/api/v1/organization/testadminorg/team/newteam/syncing
Copy to Clipboard Toggle word wrap

同じチームの同期を無効にするには、以下を実行します。

$ curl -X DELETE -H "Authorization: Bearer 9rJYBR3v3pXcj5XqIA2XX6Thkwk4gld4TCYLLWDF" \
       http://quay1-server:8080/api/v1/organization/testadminorg/team/newteam/syncing
Copy to Clipboard Toggle word wrap

1.4.4. API を使用したリポジトリービルドの作成

指定された入力からリポジトリーをビルドし、カスタムタグでビルドにタグを付けるために、requestRepoBuild エンドポイントを使用できます。これには、以下のデータが使用されます。

{
"docker_tags": [
   "string"
],
"pull_robot": "string",
"subdirectory": "string",
"archive_url": "string"
}
Copy to Clipboard Toggle word wrap

archive_url パラメーターは、Dockerfile およびその他のビルドに必要なファイルが含まれる tar または zip アーカイブを参照する必要があります。file_id パラメーターは、古いビルドシステムから分離されました。これを使用することはできません。Dockerfile がサブディレクトリーにある場合は、Dockerfile も指定する必要があります。

アーカイブは一般にアクセスできる必要があります。OAuth アプリケーションには、「Administer Organization」(組織管理者) のスコープが設定されている必要があります。組織管理者のみがロボットのアカウントトークンにアクセスできるためです。それ以外の場合は、他のユーザーは (アクセスがなくても) ロボットにビルドアクセスを付与するだけでロボットパーミッションを取得でき、これを使用してイメージコンテンツを取得できる場合があります。エラーが発生した場合は、返される json ブロックを確認し、アーカイブの場所、プルロボットおよびその他のパラメーターが正しく渡されていることを確認します。個々のビルドページの右上にある「Download logs」をクリックし、ログで詳細なメッセージを確認できます。

1.4.5. 組織ロボットの作成

$ curl -X PUT https://quay.io/api/v1/organization/{orgname}/robots/{robot shortname} \
   -H 'Authorization: Bearer <token>''
Copy to Clipboard Toggle word wrap

1.4.6. ビルドのトリガー

$ curl -X POST https://quay.io/api/v1/repository/YOURORGNAME/YOURREPONAME/build/ \
   -H 'Authorization: Bearer <token>'
Copy to Clipboard Toggle word wrap

要求を使用する Python

import requests
r = requests.post('https://quay.io/api/v1/repository/example/example/image', headers={'content-type': 'application/json', 'Authorization': 'Bearer <redacted>'}, data={[<request-body-contents>})
print(r.text)
Copy to Clipboard Toggle word wrap

1.4.7. プライベートリポジトリーの作成

$ curl -X POST https://quay.io/api/v1/repository \
    -H 'Authorization: Bearer {token}' \
    -H 'Content-Type: application/json' \
    -d '{"namespace":"yournamespace", "repository":"yourreponame",
    "description":"descriptionofyourrepo", "visibility": "private"}' | jq
Copy to Clipboard Toggle word wrap

第2章 付録 A: Red Hat Quay API (アプリケーションプログラミングインターフェース)

この API を使用すると、Red Hat Quay リポジトリー、ユーザー、および組織を使用するために必要な多くの操作を実行できます。

2.2. ビルド: リポジトリービルドの作成、一覧表示、取り消し、ステータス/ログの取得

2.2.1. get /api/v1/repository/{repository}/build/{build_uuid}/status

2.2.1.1. 実装に関する注意

ビルドの uuid で指定されるビルドのステータスを返します。

2.2.1.2. パラメーター
Expand

パラメーター

説明

パラメータータイプ

データタイプ

build_uuid

required (必須)

ビルドの UUID

パス

文字列

repository

required (必須)

リポジトリーの完全なパス(例: namespace/name)

パス

文字列

2.2.1.3. 応答メッセージ
Expand
HTTP ステータスコード理由応答モデルヘッダー

200

Successful invocation (正常な呼び出し)

Copy to Clipboard Toggle word wrap
 

400

不適切な要求

Mode: Model Schema

{
  "status": 0,
  "error_message": "string",
  "title": "string",
  "error_type": "string",
  "detail": "string",
  "type": "string"
Copy to Clipboard Toggle word wrap
 

401

Session required (セッションが必要)

 Model: Model Schema

{
  "status": 0,
  "error_message": "string",
  "title": "string",
  "error_type": "string",
  "detail": "string",
  "type": "string"
}
Copy to Clipboard Toggle word wrap
 

403

Unauthorized access (不正アクセス)

Model: Model Schema

{
  "status": 0,
  "error_message": "string",
  "title": "string",
  "error_type": "string",
  "detail": "string",
  "type": "string"
}
Copy to Clipboard Toggle word wrap
 

404

Not found (見つからない)

Model: Model Schema

{
  "status": 0,
  "error_message": "string",
  "title": "string",
  "error_type": "string",
  "detail": "string",
  "type": "string"
}
Copy to Clipboard Toggle word wrap
 

2.2.2. get /api/v1/repository/{repository}/build/{build_uuid}/logs

2.2.2.1. 実装に関する注意

ビルドの uuid によって指定されるビルドのビルドログを返します。

2.2.2.2. パラメーター
Expand

パラメーター

説明

パラメータータイプ

データタイプ

build_uuid

required (必須)

ビルドの UUID

パス

文字列

repository

required (必須)

リポジトリーの完全なパス(例: namespace/name)

パス

文字列

2.2.2.3. 応答メッセージ
Expand
HTTP ステータスコード理由応答モデルヘッダー

200

Successful invocation (正常な呼び出し)

Copy to Clipboard Toggle word wrap
 

400

不適切な要求

Mode: Model Schema

{
  "status": 0,
  "error_message": "string",
  "title": "string",
  "error_type": "string",
  "detail": "string",
  "type": "string"
Copy to Clipboard Toggle word wrap
 

401

Session required (セッションが必要)

 Model: Model Schema

{
  "status": 0,
  "error_message": "string",
  "title": "string",
  "error_type": "string",
  "detail": "string",
  "type": "string"
}
Copy to Clipboard Toggle word wrap
 

403

Unauthorized access (不正アクセス)

Model: Model Schema

{
  "status": 0,
  "error_message": "string",
  "title": "string",
  "error_type": "string",
  "detail": "string",
  "type": "string"
}
Copy to Clipboard Toggle word wrap
 

404

Not found (見つからない)

Model: Model Schema

{
  "status": 0,
  "error_message": "string",
  "title": "string",
  "error_type": "string",
  "detail": "string",
  "type": "string"
}
Copy to Clipboard Toggle word wrap
 

2.2.3. get /api/v1/repository/{repository}/build/{build_uuid}

2.2.3.1. 実装に関する注意

ビルドに関する情報を返します。

2.2.3.2. パラメーター
Expand

パラメーター

説明

パラメータータイプ

データタイプ

build_uuid

required (必須)

ビルドの UUID

パス

文字列

repository

required (必須)

リポジトリーの完全なパス(例: namespace/name)

パス

文字列

2.2.3.3. 応答メッセージ
Expand
HTTP ステータスコード理由応答モデルヘッダー

200

Successful invocation (正常な呼び出し)

Copy to Clipboard Toggle word wrap
 

400

不適切な要求

Mode: Model Schema

{
  "status": 0,
  "error_message": "string",
  "title": "string",
  "error_type": "string",
  "detail": "string",
  "type": "string"
Copy to Clipboard Toggle word wrap
 

401

Session required (セッションが必要)

 Model: Model Schema

{
  "status": 0,
  "error_message": "string",
  "title": "string",
  "error_type": "string",
  "detail": "string",
  "type": "string"
}
Copy to Clipboard Toggle word wrap
 

403

Unauthorized access (不正アクセス)

Model: Model Schema

{
  "status": 0,
  "error_message": "string",
  "title": "string",
  "error_type": "string",
  "detail": "string",
  "type": "string"
}
Copy to Clipboard Toggle word wrap
 

404

Not found (見つからない)

Model: Model Schema

{
  "status": 0,
  "error_message": "string",
  "title": "string",
  "error_type": "string",
  "detail": "string",
  "type": "string"
}
Copy to Clipboard Toggle word wrap
 

2.2.4. delete /api/v1/repository/{repository}/build/{build_uuid}

2.2.4.1. 実装に関する注意

リポジトリービルドを取り消します。

2.2.4.2. パラメーター
Expand

パラメーター

説明

パラメータータイプ

データタイプ

build_uuid

required (必須)

ビルドの UUID

パス

文字列

repository

required (必須)

リポジトリーの完全なパス(例: namespace/name)

パス

文字列

2.2.4.3. 応答メッセージ
Expand
HTTP ステータスコード理由応答モデルヘッダー

204

Deleted (削除)

Copy to Clipboard Toggle word wrap
 

400

不適切な要求

Mode: Model Schema

{
  "status": 0,
  "error_message": "string",
  "title": "string",
  "error_type": "string",
  "detail": "string",
  "type": "string"
Copy to Clipboard Toggle word wrap
 

401

Session required (セッションが必要)

 Model: Model Schema

{
  "status": 0,
  "error_message": "string",
  "title": "string",
  "error_type": "string",
  "detail": "string",
  "type": "string"
}
Copy to Clipboard Toggle word wrap
 

403

Unauthorized access (不正アクセス)

Model: Model Schema

{
  "status": 0,
  "error_message": "string",
  "title":Successful invocation "string",
  "error_type": "string",
  "detail": "string",
  "type": "string"
}
Copy to Clipboard Toggle word wrap
 

404

Not found (見つからない)

Model: Model Schema

{
  "status": 0,
  "error_message": "string",
  "title": "string",
  "error_type": "string",
  "detail": "string",
  "type": "string"
}
Copy to Clipboard Toggle word wrap
 

2.2.5. get /api/v1/repository/{repository}/build/

2.2.5.1. 実装に関する注意

リポジトリービルドの一覧を取得します。

2.2.5.2. パラメーター
Expand
パラメーター説明パラメータータイプデータタイプ

repository

required (必須)

リポジトリーの完全なパス(例: namespace/name)

パス

文字列

since

 

指定の unix タイムコードからすべてのビルドを返します。

クエリー

整数

limit

 

返すビルドの最大数。

クエリー

整数

2.2.5.3. 応答メッセージ
Expand
HTTP ステータスコード理由応答モデルヘッダー

200

Successful invocation (正常な呼び出し)

Copy to Clipboard Toggle word wrap
 

400

不適切な要求

Mode: Model Schema

{
  "status": 0,
  "error_message": "string",
  "title": "string",
  "error_type": "string",
  "detail": "string",
  "type": "string"
Copy to Clipboard Toggle word wrap
 

401

Session required (セッションが必要)

 Model: Model Schema

{
  "status": 0,
  "error_message": "string",
  "title": "string",
  "error_type": "string",
  "detail": "string",
  "type": "string"
}
Copy to Clipboard Toggle word wrap
 

403

Unauthorized access (不正アクセス)

Model: Model Schema

{
  "status": 0,
  "error_message": "string",
  "title": "string",
  "error_type": "string",
  "detail": "string",
  "type": "string"
}
Copy to Clipboard Toggle word wrap
 

404

Not found (見つからない)

Model: Model Schema

{
  "status": 0,
  "error_message": "string",
  "title": "string",
  "error_type": "string",
  "detail": "string",
  "type": "string"
}
Copy to Clipboard Toggle word wrap
 

2.2.6. post /api/v1/repository/{repository}/build/

2.2.6.1. 実装に関する注意

リポジトリーをビルドし、指定の入力からプッシュするよう要求します。

2.2.6.2. パラメーター
Expand
パラメーター説明パラメータータイプデータタイプ

repository

required (必須)

リポジトリーの完全なパス(例: namespace/name)

path

string
Copy to Clipboard Toggle word wrap

body

必須 (パラメーターコンテンツタイプ: application/json)

要求本体の内容。

body

Model: Model Schema

{
  "subdirectory": "string",
  "archive_url": "string",
  "docker_tags": [
"string"
  ],
  "pull_robot": "string",
  "file_id": "string",
  "context": "string",
  "dockerfile_path": "string"
}
Copy to Clipboard Toggle word wrap
2.2.6.3. 応答メッセージ
Expand
HTTP ステータスコード理由応答モデルヘッダー

201

Successful creation (正常な作成)

Copy to Clipboard Toggle word wrap
 

400

不適切な要求

Mode: Model Schema

{
  "status": 0,
  "error_message": "string",
  "title": "string",
  "error_type": "string",
  "detail": "string",
  "type": "string"
Copy to Clipboard Toggle word wrap
 

401

Session required (セッションが必要)

 Model: Model Schema

{
  "status": 0,
  "error_message": "string",
  "title": "string",
  "error_type": "string",
  "detail": "string",
  "type": "string"
}
Copy to Clipboard Toggle word wrap
 

403

Unauthorized access (不正アクセス)

Model: Model Schema

{
  "status": 0,
  "error_message": "string",
  "title": "string",
  "error_type": "string",
  "detail": "string",
  "type": "string"
}
Copy to Clipboard Toggle word wrap
 

404

Not found (見つからない)

Model: Model Schema

{
  "status": 0,
  "error_message": "string",
  "title": "string",
  "error_type": "string",
  "detail": "string",
  "type": "string"
}
Copy to Clipboard Toggle word wrap
 

2.3. 検出: API 検出情報

2.4. エラー: エラー詳細 API

2.5. globalmessages : Messages API

2.6. イメージ: リポジトリーイメージの一覧表示および検索

2.7. ログ: 組織またはリポジトリーの使用ログへのアクセス

2.8. マニフェスト: リポジトリーのマニフェストの管理

2.9. 組織: 組織、メンバー、および OAuth アプリケーションの管理

2.10. パーミッション: リポジトリーパーミッションの管理

2.11. プロトタイプ: リポジトリーに追加されたデフォルトのパーミッションの管理

2.12. リポジトリー: リポジトリーの一覧表示、作成、および管理

2.13. repositorynotification: リポジトリーイベント/通知の一覧表示、作成、および管理

2.14. ロボット: ユーザーおよび組織のロボットアカウントの管理

2.15. 検索: すべてのレジストリーコンテキストに対する検索

2.16. スーパーユーザー: スーパーユーザー API

2.17. タグ: リポジトリーのタグの管理

2.18. チーム: 組織のチームの作成、一覧表示および管理

2.18.1. get /api/v1/organization/{orgname}/team/{teamname}/permissions

2.18.1.1. 実装に関する注意

組織のチームのリポジトリーパーミッションの一覧を返します。

2.18.1.2. パラメーター
Expand

パラメーター

説明

パラメータータイプ

データタイプ

orgname

required (必須)

組織の名前

パス

文字列

teamname

required (必須)

チームの名前。

パス

文字列

2.18.1.3. 応答メッセージ
Expand
HTTP ステータスコード理由応答モデルヘッダー

200

Successful invocation (正常な呼び出し)

Copy to Clipboard Toggle word wrap
 

400

不適切な要求

Mode: Model Schema

{
  "status": 0,
  "error_message": "string",
  "title": "string",
  "error_type": "string",
  "detail": "string",
  "type": "string"
Copy to Clipboard Toggle word wrap
 

401

Session required (セッションが必要)

 Model: Model Schema

{
  "status": 0,
  "error_message": "string",
  "title": "string",
  "error_type": "string",
  "detail": "string",
  "type": "string"
}
Copy to Clipboard Toggle word wrap
 

403

Unauthorized access (不正アクセス)

Model: Model Schema

{
  "status": 0,
  "error_message": "string",
  "title": "string",
  "error_type": "string",
  "detail": "string",
  "type": "string"
}
Copy to Clipboard Toggle word wrap
 

404

Not found (見つからない)

Model: Model Schema

{
  "status": 0,
  "error_message": "string",
  "title": "string",
  "error_type": "string",
  "detail": "string",
  "type": "string"
}
Copy to Clipboard Toggle word wrap
 

2.18.2. delete /api/v1/organization/{orgname}/team/{teamname}/members/{membername}

2.18.2.1. 実装に関する注意

チームのメンバーを削除します。ユーザーがチームに参加するよう招待されるだけであれば、招待は削除されます。

2.18.2.2. パラメーター
Expand
パラメーター説明パラメータータイプデータタイプ

orgname

required (必須)

組織の名前

パス

文字列

membername

required (必須)

チームメンバーのユーザー名

パス

文字列

teamname

required (必須)

チームの名前。

パス

文字列

2.18.2.3. 応答メッセージ
Expand
HTTP ステータスコード理由応答モデルヘッダー

204

Deleted (削除)

Copy to Clipboard Toggle word wrap
 

400

不適切な要求

Mode: Model Schema

{
  "status": 0,
  "error_message": "string",
  "title": "string",
  "error_type": "string",
  "detail": "string",
  "type": "string"
Copy to Clipboard Toggle word wrap
 

401

Session required (セッションが必要)

 Model: Model Schema

{
  "status": 0,
  "error_message": "string",
  "title": "string",
  "error_type": "string",
  "detail": "string",
  "type": "string"
}
Copy to Clipboard Toggle word wrap
 

403

Unauthorized access (不正アクセス)

Model: Model Schema

{
  "status": 0,
  "error_message": "string",
  "title": "string",
  "error_type": "string",
  "detail": "string",
  "type": "string"
}
Copy to Clipboard Toggle word wrap
 

404

Not found (見つからない)

Model: Model Schema

{
  "status": 0,
  "error_message": "string",
  "title": "string",
  "error_type": "string",
  "detail": "string",
  "type": "string"
}
Copy to Clipboard Toggle word wrap
 

:leveloffset: +1

2.19. get /api/v1/organization/{orgname}/team/{teamname}/members

2.19.1. 実装に関する注意

指定されたチームのメンバーの一覧を取得します。

2.19.2. パラメーター

Expand

パラメーター

説明

パラメータータイプ

データタイプ

orgname

required (必須)

組織の名前

パス

文字列

teamname

required (必須)

チームの名前。

パス

文字列

includePending

true / false

保留中のメンバーを含めるかどうか。

クエリー

ブール値

2.19.3. 応答メッセージ

Expand
HTTP ステータスコード理由応答モデルヘッダー

200

Successful invocation (正常な呼び出し)

Copy to Clipboard Toggle word wrap
 

400

不適切な要求

Mode: Model Schema

{
  "status": 0,
  "error_message": "string",
  "title": "string",
  "error_type": "string",
  "detail": "string",
  "type": "string"
Copy to Clipboard Toggle word wrap
 

401

Session required (セッションが必要)

 Model: Model Schema

{
  "status": 0,
  "error_message": "string",
  "title": "string",
  "error_type": "string",
  "detail": "string",
  "type": "string"
}
Copy to Clipboard Toggle word wrap
 

403

Unauthorized access (不正アクセス)

Model: Model Schema

{
  "status": 0,
  "error_message": "string",
  "title": "string",
  "error_type": "string",
  "detail": "string",
  "type": "string"
}
Copy to Clipboard Toggle word wrap
 

404

Not found (見つからない)

Model: Model Schema

{
  "status": 0,
  "error_message": "string",
  "title": "string",
  "error_type": "string",
  "detail": "string",
  "type": "string"
}
Copy to Clipboard Toggle word wrap
 

2.20. トリガー: ビルドトリガーの作成、一覧表示および管理

2.20.1. post /api/v1/repository/{repository}/trigger/{trigger_uuid}/activate

2.20.1.1. 実装に関する注意

指定されたビルドトリガーをアクティベートします。

2.20.1.2. パラメーター
Expand
パラメーター説明パラメータータイプデータタイプ

trigger_uuid

required (必須)

ビルドトリガーの UUID

path

string
Copy to Clipboard Toggle word wrap

repository

required (必須)

リポジトリーの完全なパス(例: namespace/name)

path

string
Copy to Clipboard Toggle word wrap

body

必須 (パラメーターコンテンツタイプ: application/json)

要求本体の内容。

body

Model: Model Schema

{
  "pull_robot": "string",
  "config": {}
}
Copy to Clipboard Toggle word wrap
2.20.1.3. 応答メッセージ
Expand
HTTP ステータスコード理由応答モデルヘッダー

201

Successful creation (正常な作成)

Copy to Clipboard Toggle word wrap
 

400

不適切な要求

Mode: Model Schema

{
  "status": 0,
  "error_message": "string",
  "title": "string",
  "error_type": "string",
  "detail": "string",
  "type": "string"
Copy to Clipboard Toggle word wrap
 

401

Session required (セッションが必要)

 Model: Model Schema

{
  "status": 0,
  "error_message": "string",
  "title": "string",
  "error_type": "string",
  "detail": "string",
  "type": "string"
}
Copy to Clipboard Toggle word wrap
 

403

Unauthorized access (不正アクセス)

Model: Model Schema

{
  "status": 0,
  "error_message": "string",
  "title": "string",
  "error_type": "string",
  "detail": "string",
  "type": "string"
}
Copy to Clipboard Toggle word wrap
 

404

Not found (見つからない)

Model: Model Schema

{
  "status": 0,
  "error_message": "string",
  "title": "string",
  "error_type": "string",
  "detail": "string",
  "type": "string"
}
Copy to Clipboard Toggle word wrap
 

2.20.2. get /api/v1/repository/{repository}/trigger/{trigger_uuid}/builds

2.20.2.1. 実装に関する注意

指定されたトリガーによって開始されるビルドを一覧表示します。

2.20.2.2. パラメーター
Expand
パラメーター説明パラメータータイプデータタイプ

trigger_uuid

required (必須)

ビルドトリガーの UUID

パス

文字列

repository

required (必須)

リポジトリーの完全なパス(例: namespace/name)

パス

文字列

limit

 

返すビルドの最大数。

クエリー

整数

2.20.2.3. 応答メッセージ
Expand
HTTP ステータスコード理由応答モデルヘッダー

201

Successful creation (正常な作成)

Copy to Clipboard Toggle word wrap
 

400

不適切な要求

Mode: Model Schema

{
  "status": 0,
  "error_message": "string",
  "title": "string",
  "error_type": "string",
  "detail": "string",
  "type": "string"
Copy to Clipboard Toggle word wrap
 

401

Session required (セッションが必要)

 Model: Model Schema

{
  "status": 0,
  "error_message": "string",
  "title": "string",
  "error_type": "string",
  "detail": "string",
  "type": "string"
}
Copy to Clipboard Toggle word wrap
 

403

Unauthorized access (不正アクセス)

Model: Model Schema

{
  "status": 0,
  "error_message": "string",
  "title": "string",
  "error_type": "string",
  "detail": "string",
  "type": "string"
}
Copy to Clipboard Toggle word wrap
 

404

Not found (見つからない)

Model: Model Schema

{
  "status": 0,
  "error_message": "string",
  "title": "string",
  "error_type": "string",
  "detail": "string",
  "type": "string"
}
Copy to Clipboard Toggle word wrap
 

2.20.3. post /api/v1/repository/{repository}/trigger/{trigger_uuid}/start

2.20.3.1. 実装に関する注意

指定されたトリガーからビルドを手動で開始します。

2.20.3.2. パラメーター
Expand
パラメーター説明パラメータータイプデータタイプ

trigger_uuid

required (必須)

ビルドトリガーの UUID

path

string
Copy to Clipboard Toggle word wrap

repository

required (必須)

リポジトリーの完全なパス(例: namespace/name)

path

string
Copy to Clipboard Toggle word wrap

body

必須 (パラメーターコンテンツタイプ: application/json)

要求本体の内容。

body

Model: Model Schema

{
  "branch_name": "string",
  "commit_sha": "string"
}
Copy to Clipboard Toggle word wrap
2.20.3.3. 応答メッセージ
Expand
HTTP ステータスコード理由応答モデルヘッダー

201

Successful creation (正常な作成)

Copy to Clipboard Toggle word wrap
 

400

不適切な要求

Mode: Model Schema

{
  "status": 0,
  "error_message": "string",
  "title": "string",
  "error_type": "string",
  "detail": "string",
  "type": "string"
Copy to Clipboard Toggle word wrap
 

401

Session required (セッションが必要)

 Model: Model Schema

{
  "status": 0,
  "error_message": "string",
  "title": "string",
  "error_type": "string",
  "detail": "string",
  "type": "string"
}
Copy to Clipboard Toggle word wrap
 

403

Unauthorized access (不正アクセス)

Model: Model Schema

{
  "status": 0,
  "error_message": "string",
  "title": "string",
  "error_type": "string",
  "detail": "string",
  "type": "string"
}
Copy to Clipboard Toggle word wrap
 

404

Not found (見つからない)

Model: Model Schema

{
  "status": 0,
  "error_message": "string",
  "title": "string",
  "error_type": "string",
  "detail": "string",
  "type": "string"
}
Copy to Clipboard Toggle word wrap
 

2.20.4. get /api/v1/repository/{repository}/trigger/{trigger_uuid}

2.20.4.1. 実装に関する注意

指定されたビルドトリガーの情報を取得します。

2.20.4.2. パラメーター
Expand
パラメーター説明パラメータータイプデータタイプ

trigger_uuid

required (必須)

ビルドトリガーの UUID

パス

文字列

repository

required (必須)

リポジトリーの完全なパス(例: namespace/name)

パス

文字列

2.20.4.3. 応答メッセージ
Expand
HTTP ステータスコード理由応答モデルヘッダー

200

Successful invocation (正常な呼び出し)

Copy to Clipboard Toggle word wrap
 

400

不適切な要求

Mode: Model Schema

{
  "status": 0,
  "error_message": "string",
  "title": "string",
  "error_type": "string",
  "detail": "string",
  "type": "string"
Copy to Clipboard Toggle word wrap
 

401

Session required (セッションが必要)

 Model: Model Schema

{
  "status": 0,
  "error_message": "string",
  "title": "string",
  "error_type": "string",
  "detail": "string",
  "type": "string"
}
Copy to Clipboard Toggle word wrap
 

403

Unauthorized access (不正アクセス)

Model: Model Schema

{
  "status": 0,
  "error_message": "string",
  "title": "string",
  "error_type": "string",
  "detail": "string",
  "type": "string"
}
Copy to Clipboard Toggle word wrap
 

404

Not found (見つからない)

Model: Model Schema

{
  "status": 0,
  "error_message": "string",
  "title": "string",
  "error_type": "string",
  "detail": "string",
  "type": "string"
}
Copy to Clipboard Toggle word wrap
 

2.20.5. put /api/v1/repository/{repository}/trigger/{trigger_uuid}

2.20.5.1. 実装に関する注意

指定されたビルドトリガーを更新します。

2.20.5.2. パラメーター
Expand
パラメーター説明パラメータータイプデータタイプ

trigger_uuid

required (必須)

ビルドトリガーの UUID

path

string
Copy to Clipboard Toggle word wrap

repository

required (必須)

リポジトリーの完全なパス(例: namespace/name)

path

string
Copy to Clipboard Toggle word wrap

body

必須 (パラメーターコンテンツタイプ: application/json)

要求本体の内容。

body

Model: Model Schema

{
  "enabled": true
}
Copy to Clipboard Toggle word wrap
2.20.5.3. 応答メッセージ
Expand
HTTP ステータスコード理由応答モデルヘッダー

200

Successful invocation (正常な呼び出し)

Copy to Clipboard Toggle word wrap
 

400

不適切な要求

Mode: Model Schema

{
  "status": 0,
  "error_message": "string",
  "title": "string",
  "error_type": "string",
  "detail": "string",
  "type": "string"
Copy to Clipboard Toggle word wrap
 

401

Session required (セッションが必要)

 Model: Model Schema

{
  "status": 0,
  "error_message": "string",
  "title": "string",
  "error_type": "string",
  "detail": "string",
  "type": "string"
}
Copy to Clipboard Toggle word wrap
 

403

Unauthorized access (不正アクセス)

Model: Model Schema

{
  "status": 0,
  "error_message": "string",
  "title": "string",
  "error_type": "string",
  "detail": "string",
  "type": "string"
}
Copy to Clipboard Toggle word wrap
 

404

Not found (見つからない)

Model: Model Schema

{
  "status": 0,
  "error_message": "string",
  "title": "string",
  "error_type": "string",
  "detail": "string",
  "type": "string"
}
Copy to Clipboard Toggle word wrap
 

2.20.6. delete /api/v1/repository/{repository}/trigger/{trigger_uuid}

2.20.6.1. 実装に関する注意

指定されたビルドトリガーを削除します。

2.20.6.2. パラメーター
Expand
パラメーター説明パラメータータイプデータタイプ

trigger_uuid

required (必須)

ビルドトリガーの UUID

パス

文字列

repository

required (必須)

リポジトリーの完全なパス(例: namespace/name)

パス

文字列

2.20.6.3. 応答メッセージ
Expand
HTTP ステータスコード理由応答モデルヘッダー

204

Deleted (削除)

Copy to Clipboard Toggle word wrap

400

Bad Request (不適切な要求)

モード: Model Schema

{ "status": 0, "error_message": "string", "title": "string", "error_type": "string", "detail": "string", "type": "string"

Copy to Clipboard Toggle word wrap

401

Session required (セッションが必要)

モデル: Model Schema

{ "status": 0, "error_message": "string", "title": "string", "error_type": "string", "detail": "string", "type": "string" }

Copy to Clipboard Toggle word wrap

403

Unauthorized access (不正アクセス)

モデル: Model Schema

{ "status": 0, "error_message": "string", "title": "string", "error_type": "string", "detail": "string", "type": "string" }

Copy to Clipboard Toggle word wrap

404

2.20.7. get /api/v1/repository/{repository}/trigger/

2.20.7.1. 実装に関する注意

指定されたリポジトリーのトリガーを一覧表示します。

2.20.7.2. パラメーター
Expand
パラメーター説明パラメータータイプデータタイプ

repository

required (必須)

リポジトリーの完全パス (例: namespace/name)

パス

文字列

2.20.7.3. 応答メッセージ
Expand
HTTP ステータスコード理由応答モデルヘッダー

200

Successful invocation (正常な呼び出し)

Copy to Clipboard Toggle word wrap
 

400

不適切な要求

Mode: Model Schema

{
  "status": 0,
  "error_message": "string",
  "title": "string",
  "error_type": "string",
  "detail": "string",
  "type": "string"
Copy to Clipboard Toggle word wrap
 

401

Session required (セッションが必要)

 Model: Model Schema

{
  "status": 0,
  "error_message": "string",
  "title": "string",
  "error_type": "string",
  "detail": "string",
  "type": "string"
}
Copy to Clipboard Toggle word wrap
 

403

Unauthorized access (不正アクセス)

Model: Model Schema

{
  "status": 0,
  "error_message": "string",
  "title": "string",
  "error_type": "string",
  "detail": "string",
  "type": "string"
}
Copy to Clipboard Toggle word wrap
 

404

Not found (見つからない)

Model: Model Schema

{
  "status": 0,
  "error_message": "string",
  "title": "string",
  "error_type": "string",
  "detail": "string",
  "type": "string"
}
Copy to Clipboard Toggle word wrap
 

2.21. ユーザー: 現在のユーザーの管理

2.21.1. get /api/v1/user/starred

2.21.1.1. 実装に関する注意

共有されているすべてのリポジトリーを一覧表示します。

2.21.1.2. パラメーター
Expand
パラメーター説明パラメータータイプデータタイプ

next_page

required (必須)

次のページのページトークン。

パス

文字列

2.21.1.3. 応答メッセージ
Expand
HTTP ステータスコード理由応答モデルヘッダー

200

Successful invocation (正常な呼び出し)

Copy to Clipboard Toggle word wrap
 

400

不適切な要求

Mode: Model Schema

{
  "status": 0,
  "error_message": "string",
  "title": "string",
  "error_type": "string",
  "detail": "string",
  "type": "string"
Copy to Clipboard Toggle word wrap
 

401

Session required (セッションが必要)

 Model: Model Schema

{
  "status": 0,
  "error_message": "string",
  "title": "string",
  "error_type": "string",
  "detail": "string",
  "type": "string"
}
Copy to Clipboard Toggle word wrap
 

403

Unauthorized access (不正アクセス)

Model: Model Schema

{
  "status": 0,
  "error_message": "string",
  "title": "string",
  "error_type": "string",
  "detail": "string",
  "type": "string"
}
Copy to Clipboard Toggle word wrap
 

404

Not found (見つからない)

Model: Model Schema

{
  "status": 0,
  "error_message": "string",
  "title": "string",
  "error_type": "string",
  "detail": "string",
  "type": "string"
}
Copy to Clipboard Toggle word wrap
 

2.21.2. post /api/v1/user/starred

2.21.2.1. 実装に関する注意
2.21.2.2. パラメーター
Expand
パラメーター説明パラメータータイプデータタイプ

body

必須 (パラメーターコンテンツタイプ: application/json)

要求本体の内容。

body

Model: Model Schema

{
  "namespace": "string",
  "repository": "string"
}
Copy to Clipboard Toggle word wrap
2.21.2.3. 応答メッセージ
Expand
HTTP ステータスコード理由応答モデルヘッダー

201

Successful creation (正常な作成)

Copy to Clipboard Toggle word wrap
 

400

不適切な要求

Mode: Model Schema

{
  "status": 0,
  "error_message": "string",
  "title": "string",
  "error_type": "string",
  "detail": "string",
  "type": "string"
Copy to Clipboard Toggle word wrap
 

401

Session required (セッションが必要)

 Model: Model Schema

{
  "status": 0,
  "error_message": "string",
  "title": "string",
  "error_type": "string",
  "detail": "string",
  "type": "string"
}
Copy to Clipboard Toggle word wrap
 

403

Unauthorized access (不正アクセス)

Model: Model Schema

{
  "status": 0,
  "error_message": "string",
  "title": "string",
  "error_type": "string",
  "detail": "string",
  "type": "string"
}
Copy to Clipboard Toggle word wrap
 

404

Not found (見つからない)

Model: Model Schema

{
  "status": 0,
  "error_message": "string",
  "title": "string",
  "error_type": "string",
  "detail": "string",
  "type": "string"
}
Copy to Clipboard Toggle word wrap
 

2.21.3. get /api/v1/user/

2.21.3.1. 実装に関する注意

認証されたユーザーのユーザー情報を取得します。

2.21.3.2. 応答クラス (ステータス 200)

モデル: Model Schema

{
  "organizations": [
{}
  ],
  "verified": true,
  "avatar": {},
  "anonymous": true,
  "logins": [
{}
  ],
  "can_create_repo": true,
  "preferred_namespace": true,
  "email": "string"
}
Copy to Clipboard Toggle word wrap

応答コンテンツタイプ: application/json

2.21.3.3. 応答メッセージ
Expand
HTTP ステータスコード理由応答モデルヘッダー

400

不適切な要求

Mode: Model Schema

{
  "status": 0,
  "error_message": "string",
  "title": "string",
  "error_type": "string",
  "detail": "string",
  "type": "string"
Copy to Clipboard Toggle word wrap
 

401

Session required (セッションが必要)

 Model: Model Schema

{
  "status": 0,
  "error_message": "string",
  "title": "string",
  "error_type": "string",
  "detail": "string",
  "type": "string"
}
Copy to Clipboard Toggle word wrap
 

403

Unauthorized access (不正アクセス)

Model: Model Schema

{
  "status": 0,
  "error_message": "string",
  "title": "string",
  "error_type": "string",
  "detail": "string",
  "type": "string"
}
Copy to Clipboard Toggle word wrap
 

404

Not found (見つからない)

Model: Model Schema

{
  "status": 0,
  "error_message": "string",
  "title": "string",
  "error_type": "string",
  "detail": "string",
  "type": "string"
}
Copy to Clipboard Toggle word wrap
 

2.21.4. delete /api/v1/user/starred/{repository}

2.21.4.1. 実装に関する注意

リポジトリーからスターを削除します。

2.21.4.2. パラメーター
Expand
パラメーター説明パラメータータイプデータタイプ

repository

required (必須)

リポジトリーの完全なパス(例: namespace/name)

パス

文字列

2.21.4.3. 応答メッセージ
Expand
HTTP ステータスコード理由応答モデルヘッダー

204

Deleted (削除)

Copy to Clipboard Toggle word wrap
 

400

不適切な要求

Mode: Model Schema

{
  "status": 0,
  "error_message": "string",
  "title": "string",
  "error_type": "string",
  "detail": "string",
  "type": "string"
Copy to Clipboard Toggle word wrap
 

401

Session required (セッションが必要)

 Model: Model Schema

{
  "status": 0,
  "error_message": "string",
  "title": "string",
  "error_type": "string",
  "detail": "string",
  "type": "string"
}
Copy to Clipboard Toggle word wrap
 

403

Unauthorized access (不正アクセス)

Model: Model Schema

{
  "status": 0,
  "error_message": "string",
  "title": "string",
  "error_type": "string",
  "detail": "string",
  "type": "string"
}
Copy to Clipboard Toggle word wrap
 

404

Not found (見つからない)

Model: Model Schema

{
  "status": 0,
  "error_message": "string",
  "title": "string",
  "error_type": "string",
  "detail": "string",
  "type": "string"
}
Copy to Clipboard Toggle word wrap
 

2.21.5. get /api/v1/users/{username}

2.21.5.1. 実装に関する注意

指定されたユーザーのユーザー情報を取得します。

2.21.5.2. パラメーター
Expand
パラメーター説明パラメータータイプデータタイプ

username

required (必須)

 

パス

文字列

2.21.5.3. 応答メッセージ
Expand
HTTP ステータスコード理由応答モデルヘッダー

200

Successful invocation (正常な呼び出し)

Copy to Clipboard Toggle word wrap
 

400

不適切な要求

Mode: Model Schema

{
  "status": 0,
  "error_message": "string",
  "title": "string",
  "error_type": "string",
  "detail": "string",
  "type": "string"
Copy to Clipboard Toggle word wrap
 

401

Session required (セッションが必要)

 Model: Model Schema

{
  "status": 0,
  "error_message": "string",
  "title": "string",
  "error_type": "string",
  "detail": "string",
  "type": "string"
}
Copy to Clipboard Toggle word wrap
 

403

Unauthorized access (不正アクセス)

Model: Model Schema

{
  "status": 0,
  "error_message": "string",
  "title": "string",
  "error_type": "string",
  "detail": "string",
  "type": "string"
}
Copy to Clipboard Toggle word wrap
 

404

Not found (見つからない)

Model: Model Schema

{
  "status": 0,
  "error_message": "string",
  "title": "string",
  "error_type": "string",
  "detail": "string",
  "type": "string"
}
Copy to Clipboard Toggle word wrap
 

関連資料

トップに戻る
Red Hat logoGithubredditYoutubeTwitter

詳細情報

試用、購入および販売

コミュニティー

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

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

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

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

会社概要

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

Theme

© 2026 Red Hat