Upload zip files to a raw repository using rest API

I need to upload some zip files to a repository, we are using Raw since they are just files that later on we will download and we are only keeping them for versioning

so i have a local zip file and a repository in nexus, how can i upload it using API, do i need to create a folder in the repository first? or when i upload it the file i can specify the path and the API will create the folder structure in Nexus and put the zip file there?

i been trying to understand but shows mavens and other software’s

https://help.sonatype.com/repomanager3/rest-and-integration-api/assets-api

thanks guys.

The folders don’t really exist and are just a presentation detail for the UI so there is nothing to create there.

If you haven’t, experiment with the Upload section in the UI internally it should use the same code as REST API for uploads so should hopefully give an idea of what is required.

Limitations of Swagger made documenting the method difficult but this is a help page under Components - Components API