Melihat API Gateway API di hub API
Halaman ini menjelaskan cara melihat API Gateway API Anda di hub API menggunakan konsol atau API Google Cloud . Untuk mengetahui informasi selengkapnya, lihat Mencantumkan resource API.
Lihat API API Gateway di hub API seperti yang dijelaskan di bawah.
KonsolGoogle Cloud
Untuk melihat API Gateway API Anda di hub API, lakukan hal berikut:
- Di konsol Google Cloud , buka halaman APIs di API hub.
- Pilih Gateway: API Gateway di drop-down Filter untuk menampilkan semua API Gateway API.
Halaman utama Katalog API akan terbuka dan menampilkan semua API yang tersedia.
- Klik API untuk melihat detail selengkapnya.
Tabel berikut menjelaskan kolom hub API dan memetakannya ke kolom API Gateway yang setara. Lihat juga Mengelola atribut dalam dokumentasi hub API untuk mengetahui informasi tentang atribut yang ditentukan pengguna dan sistem lainnya.
| Kolom hub API | Kolom API Gateway | Deskripsi | |
|---|---|---|---|
| Ringkasan> Nama | Detail> Nama | Nama API. | |
| Ringkasan> ID API | T/A | ID API di hub API. | |
| Ringkasan> Terakhir diubah | Detail> Diperbarui | Stempel waktu saat API terakhir diubah. | |
| Versi> Nama | Configs> ID Konfigurasi | ID konfigurasi API. | |
| Versi> ID Versi | T/A | ID versi konfigurasi API di hub API. | |
| Versi> Terakhir diubah | Configs> Updated | Stempel waktu saat konfigurasi API terakhir diubah. | |
| Versi> Operasi | paths dalam file Spesifikasi OpenAPI |
Operasi yang ditentukan dalam file spesifikasi. Detail Gateway API yang di-ingest mencakup:
|
|
| Versi> File spesifikasi | Configs> Full resource location | File spesifikasi yang terkait dengan konfigurasi API. Detail Gateway API yang diproses mencakup:
|
|
| Deployment> Nama deployment | Gateway> ID Gateway | Deployment API Gateway dalam format berikut:
LOCATION/GATEWAY_ID |
|
| Deployment> Jenis deployment | T/A | Jenis deployment. Setel ke API Gateway. | |
| Deployment> Terakhir diubah | Gateway> Diperbarui | Stempel waktu saat API Gateway terakhir diubah. | |
| Deployments> Resources URI | Gateways> Full resource name | URI resource untuk API Gateway dalam format berikut:
projects/RUNTIME_PROJECT_ID/locations/LOCATION/gateways/GATEWAY_ID |
|
| Deployments> Management URL | Gateway> gateway | URL yang digunakan untuk mengelola deployment API Gateway dalam format berikut:
https://console.cloud.google.com/api-gateway/gateway/GATEWAY_ID/location/LOCATION?project=RUNTIME_PROJECT_ID |
|
| Deployment> Project sumber | Gateways> Full resource name | Project sumber untuk deployment. | |
| Deployment> Endpoint | Gateway> URL Gateway | Alamat IP tempat resource deployment mendengarkan permintaan API. | |
| Insight | Catatan: Informasi Insight saat ini tidak tersedia untuk API Gateway API. | ||
| Keamanan | Catatan: Informasi keamanan untuk API Gateway API saat ini tidak tersedia. | ||
REST
Untuk mencantumkan semua API Gateway API di hub API, gunakan API List APIs. Dengan menambahkan filter instance plugin, Anda dapat mencantumkan hanya aset API untuk instance plugin API Gateway yang ditentukan.
Contoh:
curl 'https://apihub.googleapis.com/v1/projects/HUB_PROJECT_ID/locations/HUB_LOCATION/apis?filter=source_metadata.plugin_instance_action_source.plugin_instance="projects/HUB_PROJECT_ID/locations/HUB_LOCATION/plugins/PLUGIN_TYPE/instances/PLUGIN_INSTANCE_ID"' \ -X GET \ -H "Authorization: Bearer $(gcloud auth print-access-token)"
Ganti kode berikut:
- HUB_PROJECT_ID: Nama project host hub API Anda. Project host dipilih saat hub API disediakan.
- HUB_LOCATION: Lokasi project host. Lokasi dipilih saat hub API disediakan.
- PLUGIN_TYPE: Jenis plugin. Tetapkan ke system-api-gateway.
- PLUGIN_INSTANCE_ID: ID instance plugin API Gateway. Gunakan API list plugin instances untuk mendapatkan ID instance plugin.
Berikut adalah contoh responsnya.
{
"apis": [
{
"name": "projects/myproject/locations/us-west1/apis/4fc95784-16b0-4b6e-8b7f-a08607febf78",
"displayName": "test-api-1",
"versions": [
"projects/myproject/locations/us-west1/apis/4fc95784-16b0-4b6e-8b7f-a08607febf78/versions/843a7e72-c5d2-4af8-95b0-162fa5d5ea10",
"projects/myproject/locations/us-west1/apis/4fc95784-16b0-4b6e-8b7f-a08607febf78/versions/b6af2674-4a0e-410e-990d-d90ccbe6867e"
],
"createTime": "2025-12-12T18:55:54.445487Z",
"updateTime": "2025-12-12T18:55:54.445487Z",
"apiStyle": {
"attribute": "projects/myproject/locations/us-west1/attributes/system-api-style",
"enumValues": {
"values": [
{
"id": "rest",
"displayName": "REST",
"description": "REST",
"immutable": true
}
]
}
},
"fingerprint": "test-api-1",
"sourceMetadata": [
{
"pluginInstanceActionSource": {
"pluginInstance": "projects/myproject/locations/us-west1/plugins/system-api-gateway/instances/90b21a65-38b4-4159-8e9d-07a8b6cecab0",
"actionId": "sync-metadata"
},
"sourceType": "PLUGIN",
"originalResourceId": "projects/runtimeproject/locations/global/apis/test-api-1",
"originalResourceCreateTime": "2025-12-11T01:57:54.841944920Z",
"originalResourceUpdateTime": "0001-01-01T00:00:00Z"
}
]
}
]
}Tabel berikut menjelaskan kolom yang diisi dengan metadata API dari API Gateway dalam respons. Lihat juga Mengelola atribut dalam dokumentasi hub API untuk mengetahui informasi tentang atribut yang ditentukan pengguna dan sistem lainnya.
| Kolom API | Deskripsi |
|---|---|
name |
ID API di hub API dalam format berikut: projects/HUB_PROJECT_ID/locations/HUB_LOCATION/apis/API_ID
Catatan: API_ID digunakan dalam nama resource untuk memastikan nilai tersebut unik. |
displayName |
Nama tampilan API. |
createTime |
Stempel waktu saat API dibuat. |
updateTime |
Stempel waktu saat API dibuat. |
fingerprint |
ID unik untuk API (biasanya ditetapkan ke nama tampilan). |
sourceMetadata |
Informasi instance plugin API Gateway, termasuk:
|