This page includes the Admin Groups and Admin Users endpoints.

Admin Groups

/system/admin_groups/

This endpoint allows you to manage admin groups



Request Format Example

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

Request Headers

Content-Type: application/json
Accept: application/json
Authorization: Bearer access_token
Host: example.org
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/"11d68429e3584b9c0a969d92236e0ef9"
Cache-Control: max-age=0, private, must-revalidate
X-Request-Id: fbf66d2d-fc52-482b-bad5-329f34495294
X-Runtime: 0.014829
Content-Length: 41

Response Attributes

Name Type Description
id integer ID for group resource
group string Object that contains the group ID

Get a specific admin group

GET /system/admin_groups/{id}

Request Example

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

Success Response

200 OK

Example Response Body

{
  "id": 233488194,
  "group": {
    "id": 830138774
  }
}

List all admin groups

GET /system/admin_groups

Request Example

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

Response Headers

Note: The response header for this method contains additional lines for Link: and X-Pagination:, as shown in the example below.

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
Link: 
X-Pagination: {"total_count":1,"total_pages":1,"first_page":true,"last_page":true,"previous_page":null,"next_page":null}
ETag: W/"8530fa20ec977ea3b1fd1d2fccf415fe"
Cache-Control: max-age=0, private, must-revalidate
X-Request-Id: f1edb1a9-1418-4022-9835-8a9a30b827de
X-Runtime: 0.029126
Content-Length: 43

Success Response

200 OK

Example Response Body

[
  {
    "id": 233488194,
    "group": {
      "id": 830138774
    }
  }
]


Make a group an admin group

POST /system/admin_groups

Request Example

curl "http://shares.example.com/system/admin_groups" -d '{"group_id":830138774}' -X POST

Request Parameters

Name Required/Optional Type Description
group_id Optional string ID of group

Success Response

201 Created

Example Response Body

{
  "id": 233488195,
  "group": {
    "id": 830138774
  }
}


Remove an admin group

DELETE /system/admin_groups/{id}

Request Example

curl "http://shares.example.com/system/admin_groups/233488194" -d '' -X DELETE

Success Response

204 No Content

Admin Users

/system/admin_groups

Request Format Example

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

Request Headers

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

Success Response Codes

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

Error Response Code

  • 422 Unprocessable Entity "has already been taken"

    (POST) - User is not available as admin

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/"325557298282c79df505b5ea733a19fb"
Cache-Control: max-age=0, private, must-revalidate
X-Request-Id: 7e71ae84-0136-4110-a6ee-6a60b103a5e2
X-Runtime: 0.014478
Content-Length: 40

Response Attributes

Name Type Description
id integer ID for user resource
user string Object that contains the user ID

Get a specific admin user

GET /system/admin_users/{id}

Request Example

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

Success Response

200 OK

Example Response Body

{
  "id": 764040363,
  "user": {
    "id": 830138774
  }
}


List all admin users

GET /system/admin_users

Request Example

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

Response Headers

Note: The response header for this method contains additional lines for Link: and X-Pagination:, as shown in the example below.

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
Link: 
X-Pagination: {"total_count":2,"total_pages":1,"first_page":true,"last_page":true,"previous_page":null,"next_page":null}
ETag: W/"78fb2e239e4e1276105031a68a8997d3"
Cache-Control: max-age=0, private, must-revalidate
X-Request-Id: 1385330c-0331-4f16-af7a-7973a565a681
X-Runtime: 0.029530
Content-Length: 83

Success Response Code

200 OK

Example Response Body

[
  {
    "id": 352619395,
    "user": {
      "id": 891963376
    }
  },
  {
    "id": 764040363,
    "user": {
      "id": 830138774
    }
  }
]


Make a user an admin user

POST /system/admin_users

Request Parameters

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

Request Example

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

Success Response

201 Created

Example Response Body

{
  "id": 764040367,
  "user": {
    "id": 830138774
  }
}

Error Response

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


Remove an admin user

DELETE /system/admin_users/{id}

Request Example

curl "http://shares.example.com/system/admin_users/764040363" -d '' -X DELETE

Success Response

204 No Content
Video player

Video

×