getToolShares
A Graze API GET request that returns the shared access for a specified tool.
Back to Graze API EndPoint Reference.
Request arguments
Endpoint getToolShares
takes the following request arguments:
Name |
Type |
Required |
Description |
---|---|---|---|
|
String |
Yes |
A valid |
|
Number |
Yes |
ID of the tool that you want to retrieve its shared access for. |
Response
Endpoint getToolShares
returns the following response:
Successful requests return a JSON object containing the following:
Name |
Type |
Description |
---|---|---|
|
Number |
ID of the tool you requested to return its shared access for. |
|
Array |
An array of all the IDs within the domain that can access the tool. If the domain is global, no domain IDs are returned. |
|
String |
Domain that can access the tool. One of: |
Examples
The following examples demonstrate typical use of endpoint getToolShares
:
Request example
Example cURL request to retrieve all the domain IDs that have access to tool 15:
curl -X POST -u graze:graze -k -v "https://localhost/graze/v1/getToolShares" \ -H "Content-Type: application/json; charset=UTF-8" \ -d '{ "tool_id":15 }'
Response example
Example response returning that tool ID 15 can be accessed by team ID 3:
{ "tool_id": 15, "domain_ids": [3], "domain": "team" }