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 |
---|---|---|---|---|
account
|
path | True |
string |
Nama akun Azure Video Indexer. Pola regex: |
resource
|
path | True |
string |
Nama grup sumber daya. Nama tidak peka huruf besar/kecil. |
subscription
|
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 |
Izin yang diminta |
|
scope | True |
Jenis media yang diminta |
|
projectId |
string |
ID proyek |
|
videoId |
string |
ID video |
Respons
Nama | Jenis | Deskripsi |
---|---|---|
200 OK |
Properti token akses akun Azure Video Indexer berhasil diambil. |
|
Other Status Codes |
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
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 |
---|---|
Access |
Token akses Azure Video Indexer. |
Error |
Definisi kesalahan. |
Error |
Respons kesalahan. |
Generate |
Parameter permintaan pembuatan token akses |
permission |
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 |
Detail kesalahan internal. |
|
message |
string |
Deskripsi kesalahan. |
ErrorResponse
Respons kesalahan.
Nama | Jenis | Deskripsi |
---|---|---|
error |
Detail kesalahan. |
GenerateAccessTokenParameters
Parameter permintaan pembuatan token akses
Nama | Jenis | Deskripsi |
---|---|---|
permissionType |
Izin yang diminta |
|
projectId |
string |
ID proyek |
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 |