Hiermit werden Assets (Bilder und Anmerkungen) aus einer Metadatei in Cloud Storage importiert. Jede Zeile in der Metadatei entspricht einem Bild (angegeben durch einen Cloud Storage-URI) und seinen Anmerkungen.
HTTP-Anfrage
POST https://visionai.googleapis.com/v1/{parent=projects/*/locations/*/corpora/*}/assets:import
Pflichtangabe. Die übergeordnete Corpusressource, in die die Assets importiert werden. Format: projects/{project_number}/locations/{locationId}/corpora/{corpus_id}
Anfragetext
Der Anfragetext enthält Daten mit folgender Struktur:
JSON-Darstellung
{// Union field source can be only one of the following:"assetsGcsUri": string// End of list of possible types for union field source.}
Felder
Union-Feld source. Die Quelle. Für source ist nur einer der folgenden Werte zulässig:
assetsGcsUri
string
Die Datei enthält alle zu importierenden Asset-Informationen. * Die Datei hat das JSONL-Format. * Jede Zeile entspricht einem Asset. * Jede Zeile wird in InputImageAsset proto umgewandelt.
Antworttext
Wenn der Vorgang erfolgreich abgeschlossen wurde, enthält der Antworttext eine Instanz von Operation.
[[["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-03-04 (UTC)."],[],[],null,["# Method: projects.locations.corpora.assets.import\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- [IAM Permissions](#body.aspect_1)\n\nImports assets (images plus annotations) from a meta file on cloud storage. Each row in the meta file is corresponding to an image (specified by a cloud storage uri) and its annotations.\n\n### HTTP request\n\n`POST https://visionai.googleapis.com/v1/{parent=projects/*/locations/*/corpora/*}/assets:import`\n\nThe URL uses [gRPC Transcoding](https://google.aip.dev/127) 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 contains an instance of [Operation](/vision-ai/docs/reference/rest/Shared.Types/ListOperationsResponse#Operation).\n\n### Authorization scopes\n\nRequires the following OAuth scope:\n\n- `https://www.googleapis.com/auth/cloud-platform`\n\nFor more information, see the [Authentication Overview](https://cloud.google.com/docs/authentication/).\n\n### IAM Permissions\n\nRequires the following [IAM](https://cloud.google.com/iam/docs) permission on the `parent` resource:\n\n- `visionai.corpora.import`\n\nFor more information, see the [IAM documentation](https://cloud.google.com/iam/docs)."]]