Skip to content

Commit 2290f72

Browse files
authored
Merge pull request #101192 from Juliako/patch-168
Update customize-brands-model-with-api.md
2 parents 1e57e0b + f53f741 commit 2290f72

File tree

1 file changed

+14
-187
lines changed

1 file changed

+14
-187
lines changed

articles/media-services/video-indexer/customize-brands-model-with-api.md

Lines changed: 14 additions & 187 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ manager: johndeu
99
ms.service: media-services
1010
ms.subservice: video-indexer
1111
ms.topic: article
12-
ms.date: 05/15/2019
12+
ms.date: 01/14/2020
1313
ms.author: anzaman
1414
---
1515

@@ -23,43 +23,15 @@ You can use the Video Indexer APIs to create, use, and edit custom Brands models
2323

2424
## Create a Brand
2525

26-
This creates a new custom brand and adds it to the custom Brands model for the specified account.
26+
The [create a brand](https://api-portal.videoindexer.ai/docs/services/operations/operations/Create-Brand) API creates a new custom brand and adds it to the custom Brands model for the specified account.
2727

28-
### Request URL
29-
30-
```
31-
https://api.videoindexer.ai/{location}/Accounts/{accountId}/Customization/Brands?accessToken={accessToken}
32-
```
33-
34-
[See required parameters and test out using the Video Indexer Developer Portal](https://api-portal.videoindexer.ai/docs/services/operations/operations/Create-Brand).
35-
36-
### Request parameters
37-
38-
|**Name**|**Type**|**Required**|**Description**|
39-
|---|---|---|---|
40-
|location|string|Yes|The Azure region to which the call should be routed. For more information, see [Azure regions and Video Indexer](regions.md).|
41-
|accountId|string|Yes|Globally unique identifier for the account|
42-
|accessToken|string|Yes|Access token (must be of scope [Account Access Token](https://api-portal.videoindexer.ai/docs/services/authorization/operations/Get-Account-Access-Token?)) to authenticate against the call. Access tokens expire within 1 hour.|
43-
44-
### Request body
45-
46-
In addition to these parameters, you must provide a request body JSON object that provides information on the new brand following the format of the example below.
47-
48-
```json
49-
{
50-
"name": "Example",
51-
"enabled": true,
52-
"tags": ["Tag1", "Tag2"],
53-
"description": "This is an example",
54-
"referenceUrl": "https://en.wikipedia.org/wiki/Example"
55-
}
56-
```
57-
58-
Setting **enabled** to true puts the brand in the *Include* list for Video Indexer to detect. Setting **enabled** to false puts the brand in the *Exclude* list, so Video Indexer will not detect it.
28+
> [!NOTE]
29+
> Setting **enabled** (in the body) to true puts the brand in the *Include* list for Video Indexer to detect. Setting **enabled** to false puts the brand in the *Exclude* list, so Video Indexer will not detect it.
5930
60-
The **referenceUrl** value can be any reference websites for the brand such as a link to its Wikipedia page.
31+
Some other parameters that you can set in the body:
6132

62-
The **tags** value is a list of tags for the brand. This shows up in the brand's *Category* field in the Video Indexer website. For example, the brand "Azure" can be tagged or categorized as "Cloud".
33+
* The **referenceUrl** value can be any reference websites for the brand such as a link to its Wikipedia page.
34+
* The **tags** value is a list of tags for the brand. This shows up in the brand's *Category* field in the Video Indexer website. For example, the brand "Azure" can be tagged or categorized as "Cloud".
6335

6436
### Response
6537

@@ -85,57 +57,15 @@ The response provides information on the brand that you just created following t
8557

8658
## Delete a Brand
8759

88-
Removes a brand from the custom Brands model for the specified account. The account is specified in the **accountId** parameter. Once called successfully, the brand will no longer be in the *Include* or *Exclude* brands lists.
89-
90-
### Request URL
91-
92-
```
93-
https://api.videoindexer.ai/{location}/Accounts/{accountId}/Customization/Brands/{id}?accessToken={accessToken}
94-
```
95-
96-
[See required parameters and test out using the Video Indexer Developer Portal](https://api-portal.videoindexer.ai/docs/services/operations/operations/Delete-Brand?).
97-
98-
### Request parameters
99-
100-
|**Name**|**Type**|**Required**|**Description**|
101-
|---|---|---|---|
102-
|location|string|Yes|The Azure region to which the call should be routed. For more information, see [Azure regions and Video Indexer](regions.md).|
103-
|accountId|string|Yes|Globally unique identifier for the account|
104-
|id|integer|Yes|The brand id (generated when the brand was created)|
105-
|accessToken|string|Yes|Access token (must be of scope [Account Access Token](https://api-portal.videoindexer.ai/docs/services/authorization/operations/Get-Account-Access-Token?)) to authenticate against the call. Access tokens expire within 1 hour.|
106-
107-
### Request body
108-
109-
There is no further request body required for this call.
60+
The [delete a brand](https://api-portal.videoindexer.ai/docs/services/operations/operations/Delete-Brand?) API removes a brand from the custom Brands model for the specified account. The account is specified in the **accountId** parameter. Once called successfully, the brand will no longer be in the *Include* or *Exclude* brands lists.
11061

11162
### Response
11263

11364
There is no returned content when the brand is deleted successfully.
11465

11566
## Get a specific Brand
11667

117-
This lets you search for the details of a brand in the custom Brands model for the specified account using the brand id.
118-
119-
### Request URL
120-
121-
```
122-
https://api.videoindexer.ai/{location}/Accounts/{accountId}/Customization/Brands?accessToken={accessToken}
123-
```
124-
125-
[See required parameters and test out using the Video Indexer Developer Portal](https://api-portal.videoindexer.ai/docs/services/operations/operations/Get-Brand?).
126-
127-
### Request parameters
128-
129-
|**Name**|**Type**|**Required**|**Description**|
130-
|---|---|---|---|
131-
|location|string|Yes|The Azure region to which the call should be routed. For more information, see [Azure regions and Video Indexer](regions.md).|
132-
|accountId|string|Yes|Globally unique identifier for the account|
133-
|id|integer|Yes|The brand ID (generated when the brand was created)|
134-
|accessToken|string|Yes|Access token (must be of scope [Account Access Token](https://api-portal.videoindexer.ai/docs/services/authorization/operations/Get-Account-Access-Token?)) to authenticate against the call. Access tokens expire within 1 hour.|
135-
136-
### Request body
137-
138-
There is no further request body required for this call.
68+
The [get a brand](https://api-portal.videoindexer.ai/docs/services/operations/operations/Get-Brand?) API lets you search for the details of a brand in the custom Brands model for the specified account using the brand ID.
13969

14070
### Response
14171

@@ -164,44 +94,7 @@ The response provides information on the brand that you searched (using brand ID
16494
16595
## Update a specific brand
16696

167-
This lets you search for the details of a brand in the custom Brands model for the specified account using the brand ID.
168-
169-
### Request URL
170-
171-
```
172-
https://api.videoindexer.ai/{location}/Accounts/{accountId}/Customization/Brands/{id}?accessToken={accessToken}
173-
```
174-
175-
[See required parameters and test out using the Video Indexer Developer Portal](https://api-portal.videoindexer.ai/docs/services/operations/operations/Update-Brand?).
176-
177-
### Request parameters
178-
179-
|**Name**|**Type**|**Required**|**Description**|
180-
|---|---|---|---|
181-
|location|string|Yes|The Azure region to which the call should be routed. For more information, see [Azure regions and Video Indexer](regions.md).|
182-
|accountId|string|Yes|Globally unique identifier for the account|
183-
|id|integer|Yes|The brand ID (generated when the brand was created)|
184-
|accessToken|string|Yes|Access token (must be of scope [Account Access Token](https://api-portal.videoindexer.ai/docs/services/authorization/operations/Get-Account-Access-Token?)) to authenticate against the call. Access tokens expire within 1 hour.|
185-
186-
### Request body
187-
188-
In addition to these parameters, you must provide a request body JSON object that provides updated information on the brand that you want to update following the format of the example below.
189-
190-
```json
191-
{
192-
"name": "Example",
193-
"enabled": false,
194-
"tags": ["Tag1", "NewTag2"],
195-
"description": "This is an update example",
196-
"referenceUrl": "https://en.wikipedia.org/wiki/Example",
197-
"lastModifierUserName": "SampleUserName",
198-
"created": "2018-04-25T14:59:52.7433333",
199-
"lastModified": "2018-04-28T15:52:22.3413983",
200-
}
201-
```
202-
203-
> [!NOTE]
204-
> In this example the brand that was created in the example request body in the **Create a Brand** section is being updated here with a new tag and new description. The **enabled** value has also been changed to false to put it in the *Exclude* list.
97+
The [update a brand](https://api-portal.videoindexer.ai/docs/services/operations/operations/Update-Brand?) API lets you search for the details of a brand in the custom Brands model for the specified account using the brand ID.
20598

20699
### Response
207100

@@ -227,27 +120,7 @@ The response provides the updated information on the brand that you updated foll
227120

228121
## Get all of the Brands
229122

230-
This returns all of the brands in the custom Brands model for the specified account regardless of whether the brand is meant to be in the *Include* or *Exclude* brands list.
231-
232-
### Request URL
233-
234-
```
235-
https://api.videoindexer.ai/{location}/Accounts/{accountId}/Customization/Brands?accessToken={accessToken}
236-
```
237-
238-
[See required parameters and test out using the Video Indexer Developer Portal](https://api-portal.videoindexer.ai/docs/services/operations/operations/Get-Brands?).
239-
240-
### Request parameters
241-
242-
|**Name**|**Type**|**Required**|**Description**|
243-
|---|---|---|---|
244-
|location|string|Yes|The Azure region to which the call should be routed. For more information, see [Azure regions and Video Indexer](regions.md).|
245-
|accountId|string|Yes|Globally unique identifier for the account|
246-
|accessToken|string|Yes|Access token (must be of scope [Account Access Token](https://api-portal.videoindexer.ai/docs/services/authorization/operations/Get-Account-Access-Token?)) to authenticate against the call. Access tokens expire within 1 hour.|
247-
248-
### Request body
249-
250-
There is no further request body required for this call.
123+
The [get all brands](https://api-portal.videoindexer.ai/docs/services/operations/operations/Get-Brands?) API returns all of the brands in the custom Brands model for the specified account regardless of whether the brand is meant to be in the *Include* or *Exclude* brands list.
251124

252125
### Response
253126

@@ -287,27 +160,7 @@ The response provides a list of all of the brands in your account and each of th
287160
288161
## Get Brands model settings
289162

290-
This returns the Brands model settings in the specified account. The Brands model settings represent whether detection from the Bing brands database is enabled or not. If Bing brands are not enabled, Video Indexer will only detect brands from the custom Brands model of the specified account.
291-
292-
### Request URL
293-
294-
```
295-
https://api.videoindexer.ai/{location}/Accounts/{accountId}/Customization/Brands?accessToken={accessToken}
296-
```
297-
298-
[See required parameters and test out using the Video Indexer Developer Portal](https://api-portal.videoindexer.ai/docs/services/operations/operations/Get-Brands).
299-
300-
### Request parameters
301-
302-
|**Name**|**Type**|**Required**|**Description**|
303-
|---|---|---|---|
304-
|location|string|Yes|The Azure region to which the call should be routed. For more information, see [Azure regions and Video Indexer](regions.md).|
305-
|accountId|string|Yes|Globally unique identifier for the account|
306-
|accessToken|string|Yes|Access token (must be of scope [Account Access Token](https://api-portal.videoindexer.ai/docs/services/authorization/operations/Get-Account-Access-Token?)) to authenticate against the call. Access tokens expire within 1 hour.|
307-
308-
### Request body
309-
310-
There is no further request body required for this call.
163+
The [get brands settings](https://api-portal.videoindexer.ai/docs/services/operations/operations/Get-Brands) API returns the Brands model settings in the specified account. The Brands model settings represent whether detection from the Bing brands database is enabled or not. If Bing brands are not enabled, Video Indexer will only detect brands from the custom Brands model of the specified account.
311164

312165
### Response
313166

@@ -325,35 +178,9 @@ The response shows whether Bing brands are enabled following the format of the e
325178
326179
## Update Brands model settings
327180

328-
This updates the Brands model settings in the specified account. The Brands model settings represent whether detection from the Bing brands database is enabled or not. If Bing brands are not enabled, Video Indexer will only detect brands from the custom Brands model of the specified account.
329-
330-
### Request URL:
331-
```
332-
https://api.videoindexer.ai/{location}/Accounts/{accountId}/Customization/BrandsModelSettings?accessToken={accessToken}
333-
```
334-
335-
[See required parameters and test out using the Video Indexer Developer Portal](https://api-portal.videoindexer.ai/docs/services/operations/operations/Update-Brands-Model-Settings?).
336-
337-
### Request parameters
338-
339-
|**Name**|**Type**|**Required**|**Description**|
340-
|---|---|---|---|
341-
|location|string|Yes|The Azure region to which the call should be routed. For more information, see [Azure regions and Video Indexer](regions.md).|
342-
|accountId|string|Yes|Globally unique identifier for the account|
343-
|accessToken|string|Yes|Access token (must be of scope [Account Access Token](https://api-portal.videoindexer.ai/docs/services/authorization/operations/Get-Account-Access-Token?)) to authenticate against the call. Access tokens expire within 1 hour.|
181+
The [update brands](https://api-portal.videoindexer.ai/docs/services/operations/operations/Update-Brands-Model-Settings?) updates the Brands model settings in the specified account. The Brands model settings represent whether detection from the Bing brands database is enabled or not. If Bing brands are not enabled, Video Indexer will only detect brands from the custom Brands model of the specified account.
344182

345-
### Request body
346-
347-
In addition to these parameters, you must provide a request body JSON object that provides information on the new brand following the format of the example below.
348-
349-
```json
350-
{
351-
"useBuiltIn":true
352-
}
353-
```
354-
355-
> [!NOTE]
356-
> **useBuiltIn** being set to true represents that Bing brands are enabled. If *useBuiltin* is false, Bing brands are disabled.
183+
The **useBuiltIn** flag set to true represents that Bing brands are enabled. If *useBuiltin* is false, Bing brands are disabled.
357184

358185
### Response
359186

0 commit comments

Comments
 (0)