Method: projects.locations.productSets.addProduct
Mit Sammlungen den Überblick behalten
Sie können Inhalte basierend auf Ihren Einstellungen speichern und kategorisieren.
Fügt ein Produkt zur angegebenen Produktgruppe hinzu. Wenn das Produkt bereits vorhanden ist, wird keine Änderung vorgenommen.
Ein Produkt kann maximal 100 Produktgruppen hinzugefügt werden.
Mögliche Fehler:
- Gibt NOT_FOUND zurück, wenn das Produkt oder die Produktgruppe nicht vorhanden ist.
HTTP-Anfrage
POST https://vision.googleapis.com/v1/{name=projects/*/locations/*/productSets/*}:addProduct
Die URL verwendet die Syntax der gRPC-Transcodierung.
Pfadparameter
Parameter |
name |
string
Pflichtangabe. Der Ressourcenname des zu ändernden ProductSets. Format ist: projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID
|
Anfragetext
Der Anfragetext enthält Daten mit folgender Struktur:
JSON-Darstellung |
{
"product": string
} |
Felder |
product |
string
Pflichtangabe. Der Ressourcenname des Produkts, das zu diesem ProductSet hinzugefügt werden soll. Format ist: projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID
|
Antworttext
Wenn der Vorgang erfolgreich ist, ist der Antworttext leer.
Autorisierungsbereiche
Erfordert einen der folgenden OAuth-Bereiche:
https://www.googleapis.com/auth/cloud-platform
https://www.googleapis.com/auth/cloud-vision
Weitere Informationen finden Sie in der Authentifizierungsübersicht.
Sofern nicht anders angegeben, sind die Inhalte dieser Seite unter der Creative Commons Attribution 4.0 License und Codebeispiele unter der Apache 2.0 License lizenziert. Weitere Informationen finden Sie in den Websiterichtlinien von Google Developers. Java ist eine eingetragene Marke von Oracle und/oder seinen Partnern.
Zuletzt aktualisiert: 2025-07-30 (UTC).
[[["Leicht verständlich","easyToUnderstand","thumb-up"],["Mein Problem wurde gelöst","solvedMyProblem","thumb-up"],["Sonstiges","otherUp","thumb-up"]],[["Schwer verständlich","hardToUnderstand","thumb-down"],["Informationen oder Beispielcode falsch","incorrectInformationOrSampleCode","thumb-down"],["Benötigte Informationen/Beispiele nicht gefunden","missingTheInformationSamplesINeed","thumb-down"],["Problem mit der Übersetzung","translationIssue","thumb-down"],["Sonstiges","otherDown","thumb-down"]],["Zuletzt aktualisiert: 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/)."]]