Method: projects.locations.productSets.addProduct
Tetap teratur dengan koleksi
Simpan dan kategorikan konten berdasarkan preferensi Anda.
Menambahkan Produk ke ProductSet yang ditentukan. Jika Product sudah ada, tidak ada perubahan yang dilakukan.
Satu Produk dapat ditambahkan ke maksimal 100 ProductSets.
Kemungkinan error:
- Menampilkan NOT_FOUND jika Produk atau ProductSet tidak ada.
Permintaan HTTP
POST https://vision.googleapis.com/v1/{name=projects/*/locations/*/productSets/*}:addProduct
URL menggunakan sintaks gRPC Transcoding.
Parameter jalur
Parameter |
name |
string
Wajib. Nama resource untuk ProductSet yang akan diubah. Format adalah: projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID
|
Isi permintaan
Isi permintaan memuat data dengan struktur berikut:
Representasi JSON |
{
"product": string
} |
Kolom |
product |
string
Wajib. Nama resource untuk Product yang akan ditambahkan ke ProductSet ini. Format adalah: projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID
|
Isi respons
Jika berhasil, isi respons akan kosong.
Cakupan Otorisasi
Memerlukan salah satu cakupan OAuth berikut:
https://www.googleapis.com/auth/cloud-platform
https://www.googleapis.com/auth/cloud-vision
Untuk mengetahui informasi selengkapnya, lihat Ringkasan Autentikasi.
Kecuali dinyatakan lain, konten di halaman ini dilisensikan berdasarkan Lisensi Creative Commons Attribution 4.0, sedangkan contoh kode dilisensikan berdasarkan Lisensi Apache 2.0. Untuk mengetahui informasi selengkapnya, lihat Kebijakan Situs Google Developers. Java adalah merek dagang terdaftar dari Oracle dan/atau afiliasinya.
Terakhir diperbarui pada 2025-07-30 UTC.
[[["Mudah dipahami","easyToUnderstand","thumb-up"],["Memecahkan masalah saya","solvedMyProblem","thumb-up"],["Lainnya","otherUp","thumb-up"]],[["Sulit dipahami","hardToUnderstand","thumb-down"],["Informasi atau kode contoh salah","incorrectInformationOrSampleCode","thumb-down"],["Informasi/contoh yang saya butuhkan tidak ada","missingTheInformationSamplesINeed","thumb-down"],["Masalah terjemahan","translationIssue","thumb-down"],["Lainnya","otherDown","thumb-down"]],["Terakhir diperbarui pada 2025-07-30 UTC."],[],[],null,["# Method: projects.locations.productSets.addProduct\n\n- [HTTP request](#body.HTTP_TEMPLATE)\n- [Path parameters](#body.PATH_PARAMETERS)\n- [Request body](#body.request_body)\n - [JSON representation](#body.request_body.SCHEMA_REPRESENTATION)\n- [Response body](#body.response_body)\n- [Authorization Scopes](#body.aspect)\n\nAdds a Product to the specified ProductSet. If the Product is already present, no change is made.\n\nOne Product can be added to at most 100 ProductSets.\n\nPossible errors:\n\n- Returns NOT_FOUND if the Product or the ProductSet doesn't exist.\n\n### HTTP request\n\n`POST https://vision.googleapis.com/v1/{name=projects/*/locations/*/productSets/*}:addProduct`\n\nThe URL uses [gRPC Transcoding](https://github.com/googleapis/googleapis/blob/master/google/api/http.proto) syntax.\n\n### Path parameters\n\n### Request body\n\nThe request body contains data with the following structure:\n\n### Response body\n\nIf successful, the response body will be empty.\n\n### Authorization Scopes\n\nRequires one of the following OAuth scopes:\n\n- `https://www.googleapis.com/auth/cloud-platform`\n- `https://www.googleapis.com/auth/cloud-vision`\n\nFor more information, see the [Authentication Overview](https://cloud.google.com/docs/authentication/)."]]