I want to post a ticket like an image only with the Shotgun API.

Please change the API key etc. according to each environment.
import shotgun_api3
SERVER_URL = 'https://tanuki.shotgunstudio.com'
SCRIPT_NAME = 'tanuki_API'
SCRIPT_KEY = 'hondotanuki'
_sg = shotgun_api3.Shotgun(SERVER_URL, SCRIPT_NAME, SCRIPT_KEY)
data = {
    'project':{"type"  : "Project","id" : 1},
    'title' : u"Posting a test ticket"
    }
sg_Ticket = _sg.create('Ticket', data)
sg_reply = {
                'entity':{
                    'type':'Ticket',
                    'id':sg_Ticket["id"]
                },
                'content':u"test"
}
_sg.create("Reply",sg_reply)
Create a ticket from _sg.create ('Ticket', data) and write the details in reply format with _sg.create ("Reply", sg_reply).
At a minimum, you need to specify a project to create a ticket. The reply requires the ID of the ticket to be linked.
it is complete!

https://support.shotgunsoftware.com/hc/ja/community/posts/209486248-Reply-Note-with-API-this-is-possible-
Recommended Posts