Using the Web API to Get or Create Roles
Is there currently a web API method to allow the creation, updating or returning of role objects (Not per user)? I have seen the requests that allow for returning of the functional/security roles of a particular user in the TeamDynamix Web API documentation, but are there methods or end points available to get All Roles (functional or security)? The use case for this, is that we want to be able to programmatically determine if a user's role has changed in another system (Oracle HR System), and then update the role on the TeamDynamix user object. Possibly also want to be able to create role objects when a new "Role" type exists in another system without manually creating the role.
Answers (3)
Hi John,
The API list on that page ( https://api.teamdynamix.com/TDWebApi/Home ) is our full list of current APIs. If you are not finding something there to work as you need, then it looks like we do not have one for that specific function.
I apologize for any inconvenience this may cause you. Please let me know if you have any further questions.
Sincerely,
Mark Sayers
TeamDynamix
Hi Mark,
I have reviewed the Web API documentation. I don't see anything that would let you return a role by name or ID, this is the issue, is that all the role assignment APIs are driven by the user that is passed in, and can't be dynamically managed by a service that synchronizes role assignments without manually typing each role name and role ID.
Not sure if this is the correct place for this, but I also noticed that in the JSON payload that returns the user's existing Roles (https://api.teamdynamix.com/TDWebApi/Home/section/People#GETapi/people/{uid}/functionalroles), the Functional Role Name is always returning a null value. The ID, StandardRate, CostRate, etc. are all correct for the roles assigned to the users I've checked against, but the "FunctionalRoleName" field is always null.
Thanks!
John
Hi John,
If you have not already, you may want to check out our Community site and look at the "Developers" link at the bottom of the page. Go to the APIs then select the People option. That should land you here: https://api.teamdynamix.com/TDWebApi/Home/section/People
There might be a couple of API methods that will assist you in making the calls you are needing to make as far as adding a user to a role (of either type). I do not know that an API is capable of creating either security or functional roles however. In reviewing the APIs at https://api.teamdynamix.com/TDWebApi/Home no APIs are listed for security or functional role creation.
I hope this has provided some assistance. If you have any further questions please let me know.
Sincerely,
Mark Sayers
TeamDynamix