...
Type | Endpoint | Input | Functionality | Output |
---|
Google Vision | https://dgz-integration-broker.azurewebsites.net/api/integrations/asset/invoke?clientId={SECRET_CLIENT_ID}&integrationType=GoogleImageSearch&assetId=<assetid>&code={SECRET_CODE}
Info |
---|
Since this is custom categories it requires a workshop to define categories and get images which corresponds to those categories for training the AI model. |
| clientId: provided by Digizuite integrationType: GoogleImageSearch code: provided by digizuite
| Sends image for web search at google Vision and returns urls. | Returns Code Block | interface DigizuiteTagResponse {
status: string; // from ai service
errorMessage: string; // from ai service
tags: DetectTagObject[];
}
interface DetectTagObject {
prop: number;
name: number;
id: number;
}See all the definitions here: https://cloud.google.com/vision/docs/detecting-web Code Block |
---|
public class GoogleResponse
{
public WebDetection webDetection { get; set; }
}
public class WebDetection
{
public List<WebEntity> webEntities { get; set; }
public List<FullMatchingImage> fullMatchingImages { get; set; }
public List<PartialMatchingImage> partialMatchingImages { get; set; }
public List<PagesWithMatchingImage> pagesWithMatchingImages { get; set; }
public List<VisuallySimilarImage> visuallySimilarImages { get; set; }
public List<BestGuessLabel> bestGuessLabels { get; set; }
}
public class BestGuessLabel
{
public string label { get; set; }
}
public class FullMatchingImage
{
public string url { get; set; }
}
public class PagesWithMatchingImage
{
public string url { get; set; }
public string pageTitle { get; set; }
public List<FullMatchingImage> fullMatchingImages { get; set; }
}
public class PartialMatchingImage
{
public string url { get; set; }
}
public class VisuallySimilarImage
{
public string url { get; set; }
}
public class WebEntity
{
public string entityId { get; set; }
public double score { get; set; }
public string description { get; set; }
} |
|
Configuration
The following shows a starting point for your integration.
...
Code Block |
---|
trigger "Metadata trigger" {
type = "Specific Metadata Value"
resolves = "Set String Metafield"
value = "#54a0ff;creative"
ignore_casing = "true"
meta_field = "guid:6fe35f10-c810-497b-af9c-e52c3d583593"
listen_to_metadata_changes = "all"
}
action "Invoke Endpoint" {
type = "Invoke Endpoint"
endpoint = "https://dgz-integration-broker.azurewebsites.net/api/integrations/asset/invoke?clientId={SECRET_CLIENT_ID}&integrationType=ximilaraiserviceGoogleImageSearch&assetId=<assetid>&code={SECRET_CODE}"
method = "post"
response = "@response"
}
action "Query JSON" {
type = "Query JSON"
needs = "Invoke Endpoint"
json = "@response"
json_path = "$.result.tagswebDetection.pagesWithMatchingImages[*].nameurl"
error_on_not_found_items = "true"
result = "@queryResult"
}
action "Set String Metafield" {
type = "Set String Metafield"
needs = "Query JSON"
meta_field = "guid:7441267e-4f7c-4dcd-9c42-20273a4ab6af"
new_value = "@queryResult"
asset_item_ids = "@sourceAssetItemId"
} |
...