Uploading files using the trigger API
Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.
Issue
We would like to be able to upload a bundle file (ZIP) using a Gitlab Trigger API request.
Information about our workflow :
A gitlab pipeline for API Management is used to deploy API Bundles, i.e. ZIP files containging
- OpenAPI specification
- Auxiliary API Documentation
- API Proxy and Shared Flows for Apigee
The pipeline...
- Validates OpenAPI specifications
- Stores valid API Bundles in a package repository
- Deploys API Proxies and create API Products in Apigee
- Updates API documentation in a Developer Portal
- Records the deployed state in environment specific branch
The pipeline can be triggered through...
- Another Gitlab pipeline
- Manually
- An API call using a Gitlab Trigger token
When triggered from another Gitlab pipeline the API Bundle can be pulled from the calling Job. When triggered manually (an already uploaded API Bundle can be redeployed or deployed to a different environment and there is no need to submit the API bundle.
For the third case - which is critical as the large majority of our API Providers do not use Gitlab - the best solution is to push the API Bundle as part of the API call.
A simple interface is required our API providers all have different levels of sophistication are using different platforms and that use different tools.
As a workaround we have implemented a pull feature where the API provider submits a URL and credentials for a location where the API Bundle can be downloaded.
This works for some providers, e.g. Java developers using Maven, but for the majority this places the burden of having to host API Bundles in a location where bundles can easily be downloaded and where the API Management system can have access using a secure mechanism. Using push to upload the API Bundle to the API Management pipeline greatly facilitates the integration of an API Provider in API Management by reducing lead time, complexity and cost.