This documentation relates to QuickBuild 7.0.x
Select here if you are using a different version

Interact with Group Share

You are viewing an old version (v. 3) of this page.
The latest version is v. 9, last edited on Dec 05, 2016 (view differences | )
<< View previous version | view page history | view next version >>
Group share is the object used to control dashboard sharing with groups

Get all group shares in the system

Syntax

Group shares in the system can be accessed using http GET method through below url:

http://localhost:8810/rest/group_shares

The response is of mime type application/xml and the content is XML representation of all group shares in the system.

Security

You will need to use http BASIC authentication to login as administrator.

Demo

Below curl command demonstrates how to get all group shares:

curl -u admin:admin http://localhost:8810/rest/group_shares

Access group share by id

Syntax

Group share can be accessed by id using http GET method through below url:

http://localhost:8810/rest/group_shares/<group_share id>

The response is of mime type application/xml and the content is XML representation of the group share.

Security

You will need to use http BASIC authentication to login as administrator or user owning dashboard of the group share.

Demo

Below curl command demonstrates how to get group share of id 1:

curl -u admin:admin http://localhost:8810/rest/group_shares/1

Update group share

Syntax

Group share can be updated by posting xml representation of the group share to below url:

http://localhost:8810/rest/group_shares

Normally you do not need to create the XML from scratch: you may retrieve XML representation of the group share using http GET method, modify certain parts of the XML and post back to above url.
The response is of mime type text/plain and the content is string representation of the group share id being updated.

Security

You will need to use http BASIC authentication to login as administrator or user owning dashboard of the group share.

Create group share

Syntax

Group share can be created by posting XML representation of the group share to below url:

http://localhost:8810/rest/group_shares

A sample group share XML representation is like below:

<com.pmease.quickbuild.model.GroupShare>
  <!-- id of associated group of this group share. If group element does not exist, QuickBuild will share the dashboard with everyone -->
  <group>2</group>

  <!-- id of associated group of this group share. -->
  <dashboard>1</dashboard>
</com.pmease.quickbuild.model.GroupShare>

The response is of mime type text/plain and the content is string representation of the newly created group share id.

Security

You will need to use http BASIC authentication to login as administrator or user owning dashboard of the group share.

Demo

We will use curl to demonstrate how to share dashboard project1 (assume id is 2) with group group1 (assume the id is 3).

  1. Save below content into file tempfile.xml:
    <com.pmease.quickbuild.model.GroupShare>
      <dashboard>2</dashboard>
      <group>3</group>
    </com.pmease.quickbuild.model.GroupShare>
    
  2. Post content of tempfile.xml to QuickBuild using below command:
    curl -X POST -u admin:admin -d@tempfile.xml http://localhost:8810/rest/group_shares

Delete group share

Syntax

Group share can be deleted using http DELETE method through below url:

http://localhost:8810/rest/group_shares/<group share id>

Here <group share id> stands for id of the group share to be deleted.

Security

You will need to use http BASIC authentication to login as administrator or user owning dashboard of the group share.

Demo

Below curl command demonstrates how to remove group group1 (assume id is 3) from share list of dashboard project1 (assume the id is 2).

  1. Get group shares of dashboard project1 with below command:
    curl -u admin:admin http://localhost:8810/rest/group_shares?dashboard_id=2
  2. Analyze response of above command to find out id of the group share associated with group id 3, assume id of the found group share is 100.
  3. Delete the found membership with below command:
    curl -X DELETE -u admin:admin http://localhost:8810/rest/group_shares/100
Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.