have a simple question,
i can create shots , seq , assets through the api,
how do i add person to the people section in shotgrid using the api,
ex:
creating new name , email, permission and so forth, in the people section of shotgrid,
using the api
thanks for the info much apritiated,
would be great to know the command to create a person , with name, email , and user privilage
as in sg.create(‘Asset’) , is it sg.create(‘HumanUser’), and what would go in the data ,
since this person data , is located in a separate page called people ,
how would i add this data , to the person data using the api,
any pointers would be helpful
Users are entities, the same way shots, takes, assets, etc. are entities. Everything is created/updated/deleted in a similar fashion with the create/update/delete method. Users are no different or special.
Entities will have specific constraints (e.g. for a HumanUser, you need to specify an email, first name and last name and such).
If there is anything missing, the error message should be verbose enough for you to deduce what is missing or what is wrong.
As for sample code, just search in the forums. You will surely find snippets of sample code.
thx for the pointers , everything is working with the legacy login,
ecxept , unable to create the user , complains about HumanUser type, which i take to be the entityType, maybe i am passing the wrong entityType ?
gives me this error shotgun_api3.shotgun.Fault: API create() HumanUser.HumanUser doesn’t exist: {“field_name”=>“HumanUser”, “value”=>{“type”=>“HumanUser”}}
Try reading an existing HumanUser through the API to verify your script key is working.
Also printing out the returned HumanUser may help understand the structure needed for creating one.
thx for the doc ,
Patrick from the eralier post had mentioned it creating a human user would not be possible with the scriptkey, and can only done with access token
well i tried accessing a user,
filters = [['id ', ‘is’, 998]]
usr = sg.find(“HumanUser”, filters, [“name”])
print(usr)
and it complains
shotgun_api3.shotgun.Fault: API read() HumanUser.id doesn’t exist:
{“path”=>"id ", “relation”=>“is”, “values”=>[998]}
not sure if this is access issue or scriptkey / token issue ?
assets / shots and all those entities work without any problem with the scriptkey ,
its just creating human , reckon it does not like something in the scriptkey / token ,
not sure
Did you try printing the return value of the create call ?
Also are you sure you don’t have some filters in the people page that would hide the newly created users ?
just tried the same , creating a single user,
thanks Patrick,
now it complains about not authenticated, although i have set up the legacy token and passphrase,
just to clarify,
is the login , the same as login name when signing into shotgrid
and the password is it the password signing into shotgrid or the legacy token passphrase/password