Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
544 views
in Technique[技术] by (71.8m points)

docusignapi - Add permission profile through API

Is it possible to add a permission profile for a user through the DocuSign REST API? Either when creating a new user or afterwards? I see where I can add a user to a group, but not a permission profile.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

Yes you can do both - you can modify user profiles when adding a new user, and you can also modify existing users - through DocuSign's APIs. (You can also manually set them through the Console UI)

When adding new users to an account there are some high level settings you set about the user, such as name, email, company, etc., and then there is a

userSettings 

object that contains (name,value) pairs for settings such as whether they're an admin, if they can send envelopes, if they can send through the API, etc. The following page from the online REST API guide describes this call and has a separate section below that lists all the potential name->value pairs and their values. Most of them are booleans but some are strings.

DocuSign REST API call - Add Members to Account

Next, to see what account settings are set for an existing user, you can make an API call to retrieve them:

DocuSign REST API call - Get User Settings

Lastly, to modify the settings of an existing user, you can make the following call:

DocuSign REST API call - Modify User Settings

Probably the best way to test all of this out easily and quickly is to use the REST API explorer. You can add the userSettings name->value pairs through the tool and see what the sample request bodies look like...

DocuSign ioDocs Explorer

[EDIT] With regards to user profiles that can be viewed in the Console (i.e. DocuSign Sender, Admin, etc.) you can create groups, add users to those groups, then configure those groups to use existing profiles based on the permissionProfileId. The steps to do that through the API are as follows:

  1. Add a new group
  2. Add users to the new group you just created
  3. Get a list of Permission Profiles in your account
  4. Set the Permission profile for the group

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

1.4m articles

1.4m replys

5 comments

57.0k users

...