Bagikan melalui


Generate - Access Token

Membuat token akses Azure Video Indexer.

POST https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.VideoIndexer/accounts/{accountName}/generateAccessToken?api-version=2024-01-01

Parameter URI

Nama Dalam Diperlukan Jenis Deskripsi
accountName
path True

string

Nama akun Azure Video Indexer.

Pola regex: ^[A-Za-z0-9-]+$

resourceGroupName
path True

string

Nama grup sumber daya. Nama tidak peka huruf besar/kecil.

subscriptionId
path True

string

ID langganan target.

api-version
query True

string

Versi API yang digunakan untuk operasi ini.

Isi Permintaan

Nama Diperlukan Jenis Deskripsi
permissionType True

permissionType

Izin yang diminta

scope True

scope

Jenis media yang diminta

projectId

string

ID proyek

videoId

string

ID video

Respons

Nama Jenis Deskripsi
200 OK

AccessToken

Properti token akses akun Azure Video Indexer berhasil diambil.

Other Status Codes

ErrorResponse

Respons kesalahan yang menjelaskan mengapa operasi gagal.

Keamanan

azure_auth

Alur OAuth2 Azure Active Directory

Jenis: oauth2
Alur: implicit
URL Otorisasi: https://login.microsoftonline.com/common/oauth2/authorize

Cakupan

Nama Deskripsi
user_impersonation meniru akun pengguna Anda

Contoh

Generate accessToken for account contributor
Generate accessToken for account reader
Generate accessToken for project contributor
Generate accessToken for project reader
Generate accessToken for video contributor
Generate accessToken for video reader

Generate accessToken for account contributor

Permintaan sampel

POST https://management.azure.com/subscriptions/b04775c3-63fa-40f3-9430-139d2e5522d3/resourceGroups/contosto-videoanalyzer-rg/providers/Microsoft.VideoIndexer/accounts/contosto-videoanalyzer/generateAccessToken?api-version=2024-01-01

{
  "permissionType": "Contributor",
  "scope": "Account"
}

Respon sampel

{
  "accessToken": "<jwt token of 1260 characters length>"
}

Generate accessToken for account reader

Permintaan sampel

POST https://management.azure.com/subscriptions/b04775c3-63fa-40f3-9430-139d2e5522d3/resourceGroups/contosto-videoanalyzer-rg/providers/Microsoft.VideoIndexer/accounts/contosto-videoanalyzer/generateAccessToken?api-version=2024-01-01

{
  "permissionType": "Reader",
  "scope": "Account"
}

Respon sampel

{
  "accessToken": "<jwt token of 1260 characters length>"
}

Generate accessToken for project contributor

Permintaan sampel

POST https://management.azure.com/subscriptions/b04775c3-63fa-40f3-9430-139d2e5522d3/resourceGroups/contosto-videoanalyzer-rg/providers/Microsoft.VideoIndexer/accounts/contosto-videoanalyzer/generateAccessToken?api-version=2024-01-01

{
  "permissionType": "Contributor",
  "scope": "Project",
  "projectId": "07ec9e38d4"
}

Respon sampel

{
  "accessToken": "<jwt token of 1260 characters length>"
}

Generate accessToken for project reader

Permintaan sampel

POST https://management.azure.com/subscriptions/b04775c3-63fa-40f3-9430-139d2e5522d3/resourceGroups/contosto-videoanalyzer-rg/providers/Microsoft.VideoIndexer/accounts/contosto-videoanalyzer/generateAccessToken?api-version=2024-01-01

{
  "permissionType": "Reader",
  "scope": "Project",
  "projectId": "07ec9e38d4"
}

Respon sampel

{
  "accessToken": "<jwt token of 1260 characters length>"
}

Generate accessToken for video contributor

Permintaan sampel

POST https://management.azure.com/subscriptions/b04775c3-63fa-40f3-9430-139d2e5522d3/resourceGroups/contosto-videoanalyzer-rg/providers/Microsoft.VideoIndexer/accounts/contosto-videoanalyzer/generateAccessToken?api-version=2024-01-01

{
  "permissionType": "Contributor",
  "scope": "Video",
  "videoId": "07ec9e38d4"
}

Respon sampel

{
  "accessToken": "<jwt token of 1260 characters length>"
}

Generate accessToken for video reader

Permintaan sampel

POST https://management.azure.com/subscriptions/b04775c3-63fa-40f3-9430-139d2e5522d3/resourceGroups/contosto-videoanalyzer-rg/providers/Microsoft.VideoIndexer/accounts/contosto-videoanalyzer/generateAccessToken?api-version=2024-01-01

{
  "permissionType": "Reader",
  "scope": "Video",
  "videoId": "07ec9e38d4"
}

Respon sampel

{
  "accessToken": "<jwt token of 1260 characters length>"
}

Definisi

Nama Deskripsi
AccessToken

Token akses Azure Video Indexer.

ErrorDefinition

Definisi kesalahan.

ErrorResponse

Respons kesalahan.

GenerateAccessTokenParameters

Parameter permintaan pembuatan token akses

permissionType

Izin yang diminta

scope

Jenis media yang diminta

AccessToken

Token akses Azure Video Indexer.

Nama Jenis Deskripsi
accessToken

string

Token akses.

ErrorDefinition

Definisi kesalahan.

Nama Jenis Deskripsi
code

string

Kode kesalahan khusus layanan yang berfungsi sebagai substatus untuk kode kesalahan HTTP.

details

ErrorDefinition[]

Detail kesalahan internal.

message

string

Deskripsi kesalahan.

ErrorResponse

Respons kesalahan.

Nama Jenis Deskripsi
error

ErrorDefinition

Detail kesalahan.

GenerateAccessTokenParameters

Parameter permintaan pembuatan token akses

Nama Jenis Deskripsi
permissionType

permissionType

Izin yang diminta

projectId

string

ID proyek

scope

scope

Jenis media yang diminta

videoId

string

ID video

permissionType

Izin yang diminta

Nama Jenis Deskripsi
Contributor

string

Reader

string

scope

Jenis media yang diminta

Nama Jenis Deskripsi
Account

string

Project

string

Video

string