6.15. レジストリーコンテキストに対する検索
search
API エンドポイントを使用して、すべてのレジストリーコンテキストに対して検索を実行できます。
手順
GET /api/v1/find/repositories
エンドポイントを使用して、指定されたクエリーに一致するアプリケーションとリポジトリーのリストを取得します。curl -X GET "https://quay-server.example.com/api/v1/find/repositories?query=<repo_name>&page=1&includeUsage=true" \ -H "Authorization: Bearer <bearer_token>"
$ curl -X GET "https://quay-server.example.com/api/v1/find/repositories?query=<repo_name>&page=1&includeUsage=true" \ -H "Authorization: Bearer <bearer_token>"
Copy to Clipboard Copied! Toggle word wrap Toggle overflow 出力例
{"results": [], "has_additional": false, "page": 2, "page_size": 10, "start_index": 10}
{"results": [], "has_additional": false, "page": 2, "page_size": 10, "start_index": 10}
Copy to Clipboard Copied! Toggle word wrap Toggle overflow GET /api/v1/find/all
エンドポイントを使用して、指定したクエリーに一致するエンティティーとリソースのリストを取得します。curl -X GET "https://quay-server.example.com/api/v1/find/all?query=<mysearchterm>" \ -H "Authorization: Bearer <bearer_token>"
$ curl -X GET "https://quay-server.example.com/api/v1/find/all?query=<mysearchterm>" \ -H "Authorization: Bearer <bearer_token>"
Copy to Clipboard Copied! Toggle word wrap Toggle overflow 出力例
{"results": [{"kind": "repository", "title": "repo", "namespace": {"title": "user", "kind": "user", "avatar": {"name": "quayadmin", "hash": "6d640d802fe23b93779b987c187a4b7a4d8fbcbd4febe7009bdff58d84498fba", "color": "#f7b6d2", "kind": "user"}, "name": "quayadmin", "score": 1, "href": "/user/quayadmin"}, "name": "busybox", "description": null, "is_public": false, "score": 4.0, "href": "/repository/quayadmin/busybox"}]}
{"results": [{"kind": "repository", "title": "repo", "namespace": {"title": "user", "kind": "user", "avatar": {"name": "quayadmin", "hash": "6d640d802fe23b93779b987c187a4b7a4d8fbcbd4febe7009bdff58d84498fba", "color": "#f7b6d2", "kind": "user"}, "name": "quayadmin", "score": 1, "href": "/user/quayadmin"}, "name": "busybox", "description": null, "is_public": false, "score": 4.0, "href": "/repository/quayadmin/busybox"}]}
Copy to Clipboard Copied! Toggle word wrap Toggle overflow GET /api/v1/entities/{prefix}
エンドポイントを使用して、指定した接頭辞に一致するエンティティーのリストを取得します。curl -X GET "https://quay-server.example.com/api/v1/entities/<prefix>?includeOrgs=<true_or_false>&includeTeams=<true_or_false>&namespace=<namespace>" \ -H "Authorization: Bearer <bearer_token>"
$ curl -X GET "https://quay-server.example.com/api/v1/entities/<prefix>?includeOrgs=<true_or_false>&includeTeams=<true_or_false>&namespace=<namespace>" \ -H "Authorization: Bearer <bearer_token>"
Copy to Clipboard Copied! Toggle word wrap Toggle overflow 出力例
{"results": [{"name": "quayadmin", "kind": "user", "is_robot": false, "avatar": {"name": "quayadmin", "hash": "6d640d802fe23b93779b987c187a4b7a4d8fbcbd4febe7009bdff58d84498fba", "color": "#f7b6d2", "kind": "user"}}]}
{"results": [{"name": "quayadmin", "kind": "user", "is_robot": false, "avatar": {"name": "quayadmin", "hash": "6d640d802fe23b93779b987c187a4b7a4d8fbcbd4febe7009bdff58d84498fba", "color": "#f7b6d2", "kind": "user"}}]}
Copy to Clipboard Copied! Toggle word wrap Toggle overflow