shareToolAccess
A MoogDb v2 method that shares access to a tool with other users, teams, or roles, or makes it global so that all users can access it. When a user creates a tool, it is automatically shared globally. You can use this endpoint to restrict its availability and ensure that tools are only available to users who need them. Using this endpoint to share access to a tool overwrites any existing shares.
Request arguments
Method shareToolAccess
takes the following request arguments:
Name | Type | Required | Description |
---|---|---|---|
| Number | Yes | ID of the tool that you want to share access for. |
| String | Yes | Domain to share access with. One of: |
| Array | Yes/No | An array of one or more IDs within the domain. Optional for the |
Response
Method shareToolAccess
returns the following response:
Type | Description |
---|---|
Boolean | Indicates whether or not the operation was successful: |
Examples
The following examples demonstrate typical use of method shareToolAccess
:
Request example
Example request to share access of tool ID 15 with team ID 3:
var actions = moogdb.shareToolAccess(15, “team”, 3);
Response example
A successful request returns true
.