How Can We Help?
Search for answers or browse our knowledge base.
Upload Attachments to Entities
Overview
Uploads attachments to entities, that are mentioned in a comment.
Example Scenarios
- Upload logs or attach a report to security scan and a bug opened from any system
- Attach build report to an entity
Request
The request URL should contains the system ID, this can be copied from the DevOps Process definition page.
PODT /api/v1.0/app/DevOpsGate/Enrich/{DevOpsProjectID}/Attachment
The payload should be in form-data or x-www-form-urlencoded
Parameter | Description |
---|---|
comments | Comment which contains the entity ids to update with #{Entity ID} for example “String with updated entity keys is ready for other DevOps Gate APIs, #CLS-3933, #CLS-3938” |
attachments | A file blob with first attachment |
attachments | If another attachment is needed add it as parameter with the same name |
Response
This is the response for the comment “String with updated entity keys is ready for other DevOps Gate APIs, #CLS-3933, #CLS-3938”.
{ "updatedEntitiesID": [ { "systemID": "10", "entityKeys": [ { "entityKey": "CLS-3933", "attachmentsID": [ "32013" ] }, { "entityKey": "CLS-3938", "attachmentsID": [ "32014" ] } ] } ], "errors": [], "warnings": [] }
Parameter | Description |
---|---|
updatedEntitiesID | An array of updated entities |
SystemID | The System where the entities were created |
entityKeys | The entities keys updated , the entity id and the attachment id created |
Error | Errors which has occurred during adding attachment |
Warning | Warnings which has occurred during adding attachment |
Step By Step Instructions
- Create a DevOps Gate Process
- Create two entities in a target system that should be updated by the DevOps Gate
- Go to the DevOps Gate Process Configuration and add 2 allowed projects (for sake of demonstration of update entities from different projects)
- Press the How It Works link
- Select
Upload Attachments
- Copy CURL
- Paste into a Command Line. Set entity keys of the entities created upper and execute
- To all entities from a commits were uploaded attachments