Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root


1 badge earned


Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!


Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.


Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!


cURL Variable as Attachment to Alert API


Is there a way to use cURL to add a variable as an attachment to an alert using the Alert API in OpsGenie?

The documentation shows how to do this using a file on the filesystem, but I am hoping to include a BASE64-encoded variable of a string/some JSON and upload that as an attachment instead.

Is this possible through the OpsGenie Alert API? I have tried a number of ways of formatting it but still getting a 400 error saying:

Required request part 'file' is not present

Thank you!

1 answer

1 accepted

0 votes
Answer accepted
Justin Sitarz
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
Mar 16, 2023

Hi Andrew!


Justin here, from Opsgenie support - happy to help!


An alert attachment is required to be a file, so in your example, you would probably want to generate a file (perhaps just a .txt or .json file) locally, containing your string or JSON prior to making the actual request to Opsgenie to add that newly generated file as an attachment. 


If you're wanting to simply add some plain text to an alert, your best option would instead be to add it as a note, using the Add Note method outlined here:


Let me know if that helps to answer your question, or if there's anything else I could assist with!




Justin Sitarz

Cloud Support Engineer, Opsgenie

Suggest an answer

Log in or Sign up to answer
AUG Leaders

Atlassian Community Events