Skip to main content

Our team plans on automating the uploading of our photography projects.

For this, I am using the Python SDK to upload assets to Bynder and set some keywords.

Most parts are working; I can login with my token, create a Collection, upload my assets, set tags and metaproperties.

What I am unable to do is

  1. add Additional Files (eg add a PDF that relates to a DNG)
  2. add relationships between assets

The API feature set appears to be incomplete. 

Even if I cannot use the Python SDK for this functionality, I should be able to use the API - pure http requests() calls.

Great to see you in the Community ​@Ronald.Knol! Thank you for taking the time to ask your question. For item a, it's true that the python SDK currently does not have the ability to upload additional files built it, but you can add the functionality and create a PR on the Github repo and we can possibly add it. For b, you can relate assets either during upload or modifying assets using the SDK the same way they add metaproperty options to assets. The format in the SDK for the query would need the metaproperty ID for the related assets field, then the values would be the asset IDs they want to relate to the asset. (Note that the asset ID for the related asset metaproperty will need to be converted from the Version 4 UUID format to the legacy Coldfusion format for it to work, or else you'll get an error when doing the call)

 

 


Hi Ryanne,

 

You say “you can add the functionality“ but can you show me the API documentation where it (add Additional Files) is described?

 


Hi ​@Ronald.Knol so I think adding more context here would be helpful. To expand on that, you would create your own branch of the python SDK, add in the new functionality for uploading additional assets, then create a Pull Request to merge your changes with the main branch of the repository. If you submit the pull request, the Bynder dev team would review the proposed change and approve/reject it, and if it's approved then it would become part of the SDK that other clients could use. 


Hi Ryanne,


I was clear on what you were asking.

However, all the SDK can do is call HTTP requests for existing Bynder API calls.

I cannot find in any documentation what the appropriate API calls are.


@Ronald.Knol Please let us know if this helps at all!


@Sara Anthony

The upload part of the documentation does not describe how to add additional files or how to relate to other assets.

The apiary documentation you link to is helpful; I can call that Retrieve Metaproperties and get a list, and in there I do indeed see our RelatedAssets property and its id. It does not match Ryanne’s id but I guess every instance has unique UUIDs?

The note on identifiers (https://bynder.docs.apiary.io/#introduction/note-on-identifiers) is confusing since the ColdFusion UUID is for /api/v4 requests but then the next bullet calls the old API (without /v4) a version 4 format. Can that be clarified?

 


@Ronald.Knol  Every portal will unique UUIDs for their metproperties and metaproperty options, including the one for Related Assets. We recommend to use the uppercase UUID format for the Related Assets field that you get back in the API - there is some inconsistency in how this UUID is returned in the Related Assets section in the admin page, and for the API call to relate assets together, it needs to be in the uppercase UUID format you gets back in the Retrieve Metaproperties API call.
To upload additional files to assets, you will follow the standard API upload steps, but at Step 4 you will do this call instead https://bynder.docs.apiary.io/#reference/upload-assets/4-finalise-a-completely-uploaded-o…]mpletely-uploaded-file-and-save-as-a-new-asset-additional (Note: you do not have to do the subsequent upload API calls for additional files) Please let us know if that helps! 

 

If you need further assistance we can submit a support ticket. The screenshot here shows how to the structure the Modify Assets or Upload call in the SDK to relate assets together (the same one we posted before but just in case you need it again)


Reply