This page includes the endpoints for Groups and Group Users.


Groups

system/groups

This endpoint allows you to manage groups.

Request Headers

Content-Type: application/json
Accept: application/json
Authorization: Bearer access_token
Host: example.org
Cookie: 

Request Example

curl "http://shares.example.com/system/groups" -d '{"name":""}' -X POST \
	-H "Content-Type: application/json" \
	-H "Accept: application/json" \
	-H "Authorization: Bearer access_token" \
	-H "Host: example.org" \
	-H "Cookie: "

Success Response Codes

  • 200 OK (GET)
  • 201 Created (POST)
  • 204 No Content (DELETE)

Response Headers

X-Frame-Options: SAMEORIGIN
X-XSS-Protection: 1; mode=block
X-Content-Type-Options: nosniff
Content-Security-Policy: script-src 'self' 'unsafe-inline' 'unsafe-eval' https://local.connectme.us https://d3gcli72yxqn2z.cloudfront.net http://d3gcli72yxqn2z.cloudfront.net
Content-Type: application/json; charset=utf-8
Cache-Control: no-cache
X-Request-Id: d22306bc-cd5f-47e0-87b4-e89fee62940e
X-Runtime: 0.010570
Content-Length: 38

Response Attributes

Name Type Description
id integer Group ID
name string Group name
ldap_group string LDAP group id
saml_group string SAML group id

List all groups

GET /system/groups

Request Example

curl -g "http://shares.example.com/system/groups" -X GET 

Success Response

200 OK
[
  {
    "id": 767575238,
    "name": "Group"
  }
]


Show a specific group

GET /system/groups/{id}

Request Example

curl -g "http://shares.example.com/system/groups/767575238" -X GET 

Success Response

200 OK
{
  "id": 767575238,
  "name": "Group",
  "ldap_group": null,
  "saml_group": null
}


Create a new group

POST /system/groups

Request Parameters

Name Required/Optional Type Description
name Optional string Group name

Request Example

curl "http://shares.example.com/system/groups" -d '{"name":"The Prefects"}' -X POST

Success Response

201 Created
{
  "id": 834029691,
  "name": "The Prefects",
  "ldap_group": null,
  "saml_group": null
}

Error Response

422 Unprocessable Entity
{
  "errors": {
    "name": [
      "can't be blank"
    ]
  }
}


Update a group

PUT /system/groups/{id}

Request Parameters

Name Required/Optional Type Description
name Optional string Group name

Request Headers

Content-Type: application/json
Accept: application/json
Authorization: Bearer access_keys
Host: example.org
Cookie: 

Request Example

curl "http://shares.example.com/system/groups/767575238" -d '{"name":"The Prefects"}' -X PUT

Success Response

200 OK
{
  "id": 767575238,
  "name": "The Prefects",
  "ldap_group": null,
  "saml_group": null
}

Error Response Code

422 Unprocessable Entity

Example Response Body

{
  "errors": {
    "name": [
      "can't be blank"
    ]
  }
}


Delete a group

DELETE /system/groups/{id}

Request Example

curl "http://shares.example.com/system/groups/767575238" -d '' -X DELETE

Success Response

204 No Content


Group Users

/system/groups/{group_id}/group_users

This endpoint allows you to manage users in groups.

Request Headers

Content-Type: application/json
Accept: application/json
Authorization: Bearer access_keys
Host: example.org
Cookie: 

Request Example

curl "http://shares.example.com/system/groups/767575238/group_users" -d '{"user_id":830138774}' -X POST \
	-H "Content-Type: application/json" \
	-H "Accept: application/json" \
	-H "Authorization: Bearer access_token" \
	-H "Host: example.org" \
	-H "Cookie: "

Success Response Codes

  • 200 OK (GET)
  • 201 Created (POST)
  • 204 No Content (DELETE)

Response Headers

X-Frame-Options: SAMEORIGIN
X-XSS-Protection: 1; mode=block
X-Content-Type-Options: nosniff
Content-Security-Policy: script-src 'self' 'unsafe-inline' 'unsafe-eval' https://local.connectme.us https://d3gcli72yxqn2z.cloudfront.net http://d3gcli72yxqn2z.cloudfront.net
Content-Type: application/json; charset=utf-8
ETag: W/"c029579ee0c20b5a4cd19722829ec071"
Cache-Control: max-age=0, private, must-revalidate
X-Request-Id: 6d936526-58d2-4f24-b78f-8e263a9a6e14
X-Runtime: 0.045658
Content-Length: 32

Response Attributes

Name Type Description
id integer ID for user resource
user JSON object Object that contains the user ID (type: string)

List all users in a group

GET /system/groups/{group_id}/group_users

Request Example

curl -g "http://shares.example.com/system/groups/767575238/group_users" -X GET

Response Headers

Note: The response headers for this method contain two additional lines, Link and X-Pagination.

"http://shares.example.com/system/groups/767575238/group_users" -X GET
          
Link: 
X-Pagination: {"total_count":1,"total_pages":1,"first_page":true,"last_page":true,"previous_page":null,"next_page":null}
ETag: W/"51a652577ec179a8dcfeaceefa58809c"
Cache-Control: max-age=0, private, must-revalidate
X-Request-Id: b9f7c634-5a08-45c2-b9b6-3473ac322236
X-Runtime: 0.018199
Content-Length: 42

Success Response

200 OK
[
{
"id": 617188667,
"user": {
  "id": 830138774
}
}
]


Remove a user from a group

DELETE /system/groups/{group_id}/group_users/{id}

Request Example

curl "http://shares.example.com/system/groups/767575238/group_users/617188667" -d '' -X DELET

Success Response

204 No Content


Show a specific user in a group

GET /system/groups/{group_id}/group_users/{id}

Request Example

curl -g "http://shares.example.com/system/groups/767575238/group_users/617188667" -X GET 

Success Response

200 OK
{
"id": 617188667,
"user": {
"id": 830138774
}
}


Authorize a user to a group

POST /system/groups/{group_id}/group_users

Request Parameters

Name Required/Optional Type Description
user_id Required integer ID of user

Request Example

curl "http://shares.example.com/system/groups/767575238/group_users" -d '{"user_id":830138774}' -X POST 

Success Response

201 Created
{
  "id": 6,
  "user": {
    "id": 830138774
  }
}


Authorize a user to a group - errors

POST /system/groups/{group_id}/group_users

Request Parameters

Name Required/Optional Type Description
user_id Required integer ID of user

Request Example

curl "http://shares.example.com/system/groups/767575238/group_users" -d '{"user_id":830138774}' -X POST 

Error Response

422 Unprocessable Entity
{
  "errors": {
    "user": [
      "has already been taken"
    ]
  }
}
Video player

Video

×