Expected Use of the API

This guide could cover the basics of how to use the API.

The BrandGuard APIs allow clients to upload images and text assets to be scored, and then to retrieve the details of the BrandGuard score for each asset.  Functionality is also provided to get lists of previously scored assets.

All requests require an Authorization header that will identify the user profile, which may limit the scope of functionality or data accessible to that user via the API. BrandGuard uses OAuth2. Users with appropriate access generate and download / copy / paste API credentials in the BrandGuard user interface under: Settings / API Access / Developer Credentials. Use your favorite jwt library to insert your credentials into http authorization headers when you invoke any API end-point.

A typical API sequence to score an image is:

  1. GET /brands/ - call to retrieve the id of the brand id you want to upload to (if not previously known or hard-coded)
  2. POST /bg/image/{bid:uuid}/ - upload the image to begin scoring, holding the resulting asset id
  3. GET /bg/image/{bid:uuid}/{id:uuid}/ - poll at intervals for the score until it is available.

There are three groups of API endpoints.

  • Brand Endpoints - Each BrandGuard customer may have any number of brands under management.  Brand API calls provide access to the details of each brand.
  • Image Endpoints - These endpoints allow callers to score image assets and list previously scored assets.  There are three supported endpoints: Search, Details and Upload.
  • Text Endpoints - These endpoints allow callers to score text assets and list previously scored assets.  There are three supported endpoints: Search, Details and Upload.