Mit Sammlungen den Überblick behalten
Sie können Inhalte basierend auf Ihren Einstellungen speichern und kategorisieren.
Einige Methoden der Video Intelligence API geben einen lang andauernden Vorgang zurück. Diese Methoden sind asynchron und der Vorgang ist möglicherweise noch nicht abgeschlossen, wenn die Methode eine Antwort zurückgibt.
Vorgangsstatus abrufen
Sie können den Status einer lang andauernden Aufgabe (Szenenwechsel erkennen) anhand des Vorgangsnamens prüfen.
REST
Ersetzen Sie diese Werte in den folgenden Anfragedaten:
OPERATION_NAME: Das Feld name, das vom Aufruf der Video Intelligence API zurückgegeben wird. Dies ist ein Wert im Format: projects/PROJECT_NUMBER/locations/LOCATION_ID/operations/OPERATION_ID, wobei:
PROJECT_NUMBER die Nummer Ihres Google Cloud -Projekts
LOCATION_ID die Cloudregion, in der die Annotation stattgefunden hat (z. B. us-east1, us-west1, europe-west1, asia-east1) und
OPERATION_ID die ID des lang andauernden Vorgangs ist.
HTTP-Methode und URL:
GET https://videointelligence.googleapis.com/v1/OPERATION_NAME
Wenn Sie die Anfrage senden möchten, maximieren Sie eine der folgenden Optionen:
Sie können einen lang andauernden Vorgang mit der Vorgangs-ID abbrechen. Es wird jedoch nicht garantiert, dass der Abbruch tatsächlich erfolgt.
REST
Ersetzen Sie diese Werte in den folgenden Anfragedaten:
OPERATION_ID : Diese wird in der Antwort beim Start des Vorgangs angegeben. Beispiel: 3326639765503758657 von projects/754177431483/locations/us-west1/operations/3326639765503758657
Hinweis:
PROJECT_NUMBER: ID Ihres GCP-Projekts
LOCATION_ID: Die Cloud-Region, in der die Annotation erfolgen soll. Unterstützte Cloud-Regionen sind: us-east1, us-west1, europe-west1, asia-east1. Wenn keine Region angegeben ist, wird eine Region basierend auf dem Speicherort der Videodatei festgelegt.
HTTP-Methode und URL:
POST https://videointelligence.googleapis.com/v1/projects/PROJECT_NUMBER/locations/LOCATION_ID/operations/OPERATION_ID:cancel
Wenn Sie die Anfrage senden möchten, maximieren Sie eine der folgenden Optionen:
[[["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-09-03 (UTC)."],[],[],null,["# Long-running operations\n\nSome methods of the Video Intelligence API return a long-running\noperation. These methods are asynchronous, and the operation may not be\ncompleted when the method returns a response.\n| **Note:** Video Intelligence API does not support the `PageToken`, or `pageSize` parameters.\n\nGet an operation status\n-----------------------\n\nYou can check the status of a long-running task ([detecting shot changes](/video-intelligence/docs/analyze-shots))\nusing the operation name.\n**Note:** When using the Web UI you can monitor the status in the **Status** column of the list page. \n\n### REST\n\n\nBefore using any of the request data,\nmake the following replacements:\n\n- \u003cvar translate=\"no\"\u003eOPERATION_NAME\u003c/var\u003e: the `name` field returned from the call to Video Intelligence API. This is a value in the format: \n `projects/`\u003cvar translate=\"no\"\u003ePROJECT_NUMBER\u003c/var\u003e`/locations/`\u003cvar translate=\"no\"\u003eLOCATION_ID\u003c/var\u003e`/operations/`\u003cvar translate=\"no\"\u003eOPERATION_ID\u003c/var\u003e, \n where:\n - \u003cvar translate=\"no\"\u003ePROJECT_NUMBER\u003c/var\u003e is the [number](https://cloud.google.com/resource-manager/docs/creating-managing-projects#identifying_projects) of your Google Cloud project,\n - \u003cvar translate=\"no\"\u003eLOCATION_ID\u003c/var\u003e is the cloud region where annotation took place (for example: `us-east1`, `us-west1`, `europe-west1`, `asia-east1`),\n - \u003cvar translate=\"no\"\u003eOPERATION_ID\u003c/var\u003e is the ID of the long-running operation.\n\n\nHTTP method and URL:\n\n```\nGET https://videointelligence.googleapis.com/v1/OPERATION_NAME\n```\n\nTo send your request, expand one of these options:\n\n#### curl (Linux, macOS, or Cloud Shell)\n\n| **Note:** The following command assumes that you have logged in to the `gcloud` CLI with your user account by running [`gcloud init`](/sdk/gcloud/reference/init) or [`gcloud auth login`](/sdk/gcloud/reference/auth/login) , or by using [Cloud Shell](/shell/docs), which automatically logs you into the `gcloud` CLI . You can check the currently active account by running [`gcloud auth list`](/sdk/gcloud/reference/auth/list).\n\n\nExecute the following command:\n\n```\ncurl -X GET \\\n -H \"Authorization: Bearer $(gcloud auth print-access-token)\" \\\n -H \"x-goog-user-project: PROJECT_NUMBER\" \\\n \"https://videointelligence.googleapis.com/v1/OPERATION_NAME\"\n```\n\n#### PowerShell (Windows)\n\n| **Note:** The following command assumes that you have logged in to the `gcloud` CLI with your user account by running [`gcloud init`](/sdk/gcloud/reference/init) or [`gcloud auth login`](/sdk/gcloud/reference/auth/login) . You can check the currently active account by running [`gcloud auth list`](/sdk/gcloud/reference/auth/list).\n\n\nExecute the following command:\n\n```\n$cred = gcloud auth print-access-token\n$headers = @{ \"Authorization\" = \"Bearer $cred\"; \"x-goog-user-project\" = \"PROJECT_NUMBER\" }\n\nInvoke-WebRequest `\n -Method GET `\n -Headers $headers `\n -Uri \"https://videointelligence.googleapis.com/v1/OPERATION_NAME\" | Select-Object -Expand Content\n```\n\nYou should receive a JSON response similar to the following:\n\n```\n{\n \"name\": \"projects/PROJECT_NUMBER/locations/LOCATION_ID/operations/OPERATION_ID\",\n \"metadata\": {\n \"@type\": \"type.googleapis.com/google.cloud.videointelligence.v1p3beta1.AnnotateVideoProgress\",\n \"annotationProgress\": [\n {\n \"inputUri\": \"INPUT_URI\",\n \"progressPercent\": 100,\n \"startTime\": \"2020-05-12T19:36:09.110351Z\",\n \"updateTime\": \"2020-05-12T19:36:17.519069Z\"\n }\n ]\n },\n \"done\": true,\n \"response\": {\n \"@type\": \"type.googleapis.com/google.cloud.videointelligence.v1p3beta1.AnnotateVideoResponse\",\n \"annotationResults\": [\n {\n ...\n }\n ]\n }\n}\n```\n\n\u003cbr /\u003e\n\nCancel an operation\n-------------------\n\nYou can cancel a long-running operation using the operation ID. However,\ncancellation is not guaranteed to succeed. \n\n### REST\n\n\nBefore using any of the request data,\nmake the following replacements:\n\n- \u003cvar translate=\"no\"\u003eOPERATION_ID\u003c/var\u003e: provided in the response when you started the operation, \n for example `3326639765503758657` from `projects/754177431483/locations/us-west1/operations/3326639765503758657`\n- Note:\n - \u003cvar translate=\"no\"\u003ePROJECT_NUMBER\u003c/var\u003e: your GCP project ID\n - \u003cvar translate=\"no\"\u003eLOCATION_ID\u003c/var\u003e: the Cloud region where annotation should take place. Supported cloud regions are: `us-east1`, `us-west1`, `europe-west1`, `asia-east1`. If no region is specified, a region will be determined based on video file location.\n\n\nHTTP method and URL:\n\n```\nPOST https://videointelligence.googleapis.com/v1/projects/PROJECT_NUMBER/locations/LOCATION_ID/operations/OPERATION_ID:cancel\n```\n\nTo send your request, expand one of these options:\n\n#### curl (Linux, macOS, or Cloud Shell)\n\n| **Note:** The following command assumes that you have logged in to the `gcloud` CLI with your user account by running [`gcloud init`](/sdk/gcloud/reference/init) or [`gcloud auth login`](/sdk/gcloud/reference/auth/login) , or by using [Cloud Shell](/shell/docs), which automatically logs you into the `gcloud` CLI . You can check the currently active account by running [`gcloud auth list`](/sdk/gcloud/reference/auth/list).\n\n\nExecute the following command:\n\n```\ncurl -X POST \\\n -H \"Authorization: Bearer $(gcloud auth print-access-token)\" \\\n -H \"x-goog-user-project: PROJECT_NUMBER\" \\\n -H \"Content-Type: application/json; charset=utf-8\" \\\n -d \"\" \\\n \"https://videointelligence.googleapis.com/v1/projects/PROJECT_NUMBER/locations/LOCATION_ID/operations/OPERATION_ID:cancel\"\n```\n\n#### PowerShell (Windows)\n\n| **Note:** The following command assumes that you have logged in to the `gcloud` CLI with your user account by running [`gcloud init`](/sdk/gcloud/reference/init) or [`gcloud auth login`](/sdk/gcloud/reference/auth/login) . You can check the currently active account by running [`gcloud auth list`](/sdk/gcloud/reference/auth/list).\n\n\nExecute the following command:\n\n```\n$cred = gcloud auth print-access-token\n$headers = @{ \"Authorization\" = \"Bearer $cred\"; \"x-goog-user-project\" = \"PROJECT_NUMBER\" }\n\nInvoke-WebRequest `\n -Method POST `\n -Headers $headers `\n -Uri \"https://videointelligence.googleapis.com/v1/projects/PROJECT_NUMBER/locations/LOCATION_ID/operations/OPERATION_ID:cancel\" | Select-Object -Expand Content\n```\n\nYou should receive a successful status code (2xx) and an empty response.\n\n\u003cbr /\u003e"]]