/system/organizations

This endpoint allows you to create and manage organizations.


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/organizations/" -d '{"name":"API Create Organization"}' -X POST \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "Authorization: Bearer access_token" \
-H "Host: example.org" \
-H "Cookie: "

Request Parameters (POST and PUT)

Name Required/Optional Type Description
name Required string Name of organization

Success Response Codes

  • 200 OK
  • 201 Created

Error Response Codes

  • 422 Unprocessable Entity

Response Attributes

Name Type Description
id integer ID of organization
name string Name of organization

List all organizations

GET /system/organizations

Request Example

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

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
Link: 
X-Pagination: {"total_count":1,"total_pages":1,"first_page":true,"last_page":true,"previous_page":null,"next_page":null}
ETag: W/"1a6b2f8d90f184a5a9cc5571ac90538a"
Cache-Control: max-age=0, private, must-revalidate
X-Request-Id: 0e038246-0bb2-4d0a-b8d8-372b1633f71e
X-Runtime: 0.012541
Content-Length: 30

Success Response Example

200 OK
[
{
"id": 32400255,
"name": "Org"
}
]


Get specific organization

GET /organizations/{organization_id}/settings/organization

Request Example

curl -g "http://shares.example.com/organizations/32400255/settings/organization" -X GET

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/"c6d537e60f288f3a69a1363b8a9a1e64"
Cache-Control: max-age=0, private, must-revalidate
X-Request-Id: a1b70faa-f94b-4e12-b021-f16675dc520a
X-Runtime: 0.180796
Content-Length: 28

Success Response Example

200 OK
{
"id": 32400255,
"name": "Org"
}


Create new organization

POST /system/organizations/

Request Example

curl "http://shares.example.com/system/organizations/" -d '{"name":"API Create Organization"}' -X POST

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/"e90f1a10dc7bd702b5269e9579121fe9"
Cache-Control: max-age=0, private, must-revalidate
X-Request-Id: 041ab2b9-a2d0-4b4a-bc1c-059415fc9a7f
X-Runtime: 0.019765
Content-Length: 48

Success Response Example

201 Created
{
  "id": 32400259,
  "name": "API Create Organization"
}

Error Response Example

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

Troubleshooting: The error above is caused by a missing "name" value in the request body:

{"name":""}


Update an organization

PUT /organizations/{organization_id}/settings/organization

Request Example

curl "http://shares.example.com/organizations/32400255/settings/organization" -d '{"name":"API Update Organization"}' -X PUT

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/"22e0a90ae190aa50a4ec9639cdc2a66e"
Cache-Control: max-age=0, private, must-revalidate
X-Request-Id: 81d645be-e58e-41b0-b807-600449dd6d80
X-Runtime: 0.017019
Content-Length: 48

Success Response Example

200 OK
{
  "id": 32400255,
  "name": "API Update Organization"
}

Error Response Example

422 Unprocessable Entity

Example Response Body

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

Troubleshooting: The error above is caused by a missing "name" value in the request body:

{"name":""}


Remove an organization

DELETE /organizations/{organization_id}/settings/organization

Request Example

curl "http://shares.example.com/organizations/32400255/settings/organization" -d '' -X 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
  Cache-Control: no-cache
  X-Request-Id: 8a82b532-688f-46d9-82e2-97321655164c
  X-Runtime: 0.136354

Success Response Example

204 No Content

Video player

Video

×