Fetch / Upload Media APIs
You can quickly start creating the APIs and models with the bucket name, utilising the starter Template. This helps you in auto generating convention based APIs and models for your object storage with greater productivity
Steps to create APIs from Template
Navigate to the APIs listing page from Application Layer -> APIs.
Click on the Create API button on the top right corner.
Select the Browse Template option from the dialogue box.
Select the Fetch / Upload Media APIs option.
Enter the Storage account name.
Click on finish to generate the starter APIs and models.
You can then customise and edit any APIs that are created via Templates
The starter template that Cosmocloud provides contains three methods and models.
Initially, APIs and models will be created in ‘Draft’ state. You can edit them in the Workflow builder to add more customisations.
UPLOAD
This method allows you to upload your files in your object storage and returns a URL with fields to validate your file.
This method also contains an optional expiresIn | Expiration time for presigned URL (in seconds)
This internally uses a Create Presigned URL node in the API, which you can go and tweak if needed.
GET
This method allows you to retrieve your files from your object storage and returns a URL
This method also contains an optional expiresIn | Expiration time for presigned URL (in seconds)
DELETE
This method allows you to delete your files from your object storage.
Conclusion
If you want to know more about utilizing object storage APIs check out :
Last updated