Skip to main content

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

tool_id

Number

Yes

ID of the tool that you want to share access for.

domain

String

Yes

Domain to share access with. One of: user, team, role, or global.

domain_ids

Array

Yes/No

An array of one or more IDs within the domain. Optional for the global domain.

Response

Method shareToolAccess returns the following response:

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