How to add a note to a sequence via python api

Hey,

I am sure i am missing something super obvious but I am trying to add a note to a shotgun sequence (ideally I could do this for a shot or asset or anything). I’m not sure what the best way to do this is via the python api.

To note, this is being done through a script authentication not a user.

Thanks!

3 Likes

Hi @thebeardedberry,

Check out the shotgun methods page (http://developer.shotgunsoftware.com/python-api/reference.html#shotgun-methods) It’s always my first stop for using the Python API.

As for your question, I would use a create method to create a note and then add the Sequence into the Links field, here is an example;

data = {
    "project": {"type": "Project", "id": 87},
    "note_links": [{"type": "Sequence", "id": 45}],
    "subject": "This is the Subject",
    "content": "This is the Body Text",
    "user": {"type": "HumanUser", "id": 87},
    "addressings_to": [{"type": "HumanUser", "id": 92}]
}

sg.create("Note", data) 

Just replace the relevant id’s and its should work for you.

-David

3 Likes