Bynder Asset Usage API

Asset usage tracking: record where an asset has been used by an integration, retrieve usage for an asset, delete a usage entry, and sync all usage from a single integration in one call.

OpenAPI Specification

bynder-asset-usage-v4-openapi.json Raw ↑
{"openapi":"3.1.0","info":{"title":"Asset Usage API","version":"1.0.0","description":"These calls allow you to keep track of assets being exported from Bynder and imported into a third party application. In order to get started or find an existing integration id you should check out this [Bynder support](https://help.bynder.com/en/216226-track-asset-usage.html#UUID-5db586ff-9502-8e5b-4355-ca3630fceee3_N1579707153615_body) article. If you want to register a new third party application please contact us at [support@bynder.com](mailto:support@bynder.com).\n"},"servers":[{"url":"https://{your-bynder-domain}/"}],"security":[{"OAuth2":["STATISTICS"]},{"permanentToken":["STATISTICS"]}],"tags":[{"name":"Asset Usage","description":"These calls allow you to keep track of assets being exported from Bynder and imported into a third party application. In order to get started or find an existing integration id you should check out this Bynder support article. If you want to register a new third party application please contact us at [support@bynder.com](mailto:support@bynder.com).\n\n__Warning:__ Requires the STATISTICS security role.\n"},{"name":"Asset Usage Sync","description":"This alternative API call allows you to sync all your usage from a single integration.\n* A usage will be created when there is no existing usage on the specified asset\n* A usage will be updated when adding additional info\n* A usage will be deleted when specifying a URI but not using that URI in a usage\n\n__Warning:__ Requires the STATISTICS security role.\n"}],"paths":{"/api/media/usage":{"get":{"summary":"Retrieve asset usage","description":"Retrieve asset usage information.","tags":["Asset Usage"],"parameters":[{"in":"query","name":"asset_id","schema":{"type":"string"},"description":"Asset id."},{"in":"query","name":"integration_id","schema":{"type":"string"},"description":"Integration id."},{"in":"query","name":"uri","schema":{"type":"string"},"description":"URI."}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"asset_id":{"type":"string"},"id":{"type":"string"},"integration":{"type":"object","properties":{"id":{"type":"string"},"description":{"type":"string"}}},"timestamp":{"type":"string","format":"date-time"},"uri":{"type":"string"},"additional":{"type":"string"}}}}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"asset_id":{"type":"string"}}}}}}}},"post":{"summary":"Create asset usage","description":"Create a new asset usage entry.","tags":["Asset Usage"],"requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"type":"object","properties":{"integration_id":{"type":"string","description":"Integration id."},"asset_id":{"type":"string","description":"Asset id."},"timestamp":{"type":"string","format":"date-time","description":"Datetime in ISO8601 format."},"uri":{"type":"string","description":"Location."},"additional":{"type":"string","description":"Additional information."}}}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"uri":{"type":"string"},"additional":{"type":"string"},"asset_id":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"integration":{"type":"object","properties":{"id":{"type":"string"},"description":{"type":"string"}}}}}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"integration_id":{"type":"string"},"asset_id":{"type":"string"}}}}}}}},"delete":{"summary":"Delete asset usage","description":"Delete an asset usage entry.","tags":["Asset Usage"],"parameters":[{"in":"query","name":"integration_id","schema":{"type":"string"},"description":"Integration id."},{"in":"query","name":"asset_id","schema":{"type":"string"},"description":"Asset id."},{"in":"query","name":"uri","schema":{"type":"string"},"description":"Asset location."}],"responses":{"204":{"description":"No Content"},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"integration_id":{"type":"string"},"asset_id":{"type":"string"}}}}}}}}},"/api/media/usage/sync":{"post":{"summary":"Sync asset usage","description":"Sync all usage from a single integration.","tags":["Asset Usage Sync"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"integration_id":{"type":"string","description":"Integration id."},"uris":{"type":"array","items":{"type":"string"},"description":"An array of URIs that are part of your integration."},"usages":{"type":"array","items":{"type":"object","properties":{"asset_id":{"type":"string"},"uri":{"type":"string"},"additional":{"type":"string"}}}}}}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"accepted":{"type":"array","items":{"type":"object","properties":{"additional":{"type":"string"},"asset_id":{"type":"string"},"uri":{"type":"string"}}}},"new":{"type":"array","items":{"type":"object","properties":{"additional":{"type":"string"},"asset_id":{"type":"string"},"id":{"type":"string"},"integration":{"type":"object","properties":{"description":{"type":"string"},"id":{"type":"string"}}},"timestamp":{"type":"string","format":"date-time"},"uri":{"type":"string"}}}},"rejected":{"type":"array","items":{"type":"object","properties":{"asset_id":{"type":"string"},"reason":{"type":"string"},"uri":{"type":"string"}}}},"removed":{"type":"array","items":{"type":"object","properties":{"asset_id":{"type":"string"},"uri":{"type":"string"}}}}}}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"integration_id":{"type":"string"},"asset_id":{"type":"string"}}}}}}}}}},"components":{"securitySchemes":{"permanentToken":{"type":"apiKey","in":"header","name":"Authorization"},"OAuth2":{"type":"oauth2","flows":{"clientCredentials":{"tokenUrl":"https://{your-bynder-domain}/v6/authentication/oauth2/token","scopes":{"STATISTICS":""}},"authorizationCode":{"authorizationUrl":"https://{your-auth-url}","tokenUrl":"https://{your-bynder-domain}/v6/authentication/oauth2/token","scopes":{"STATISTICS":""}}}}}}}