/organizations/{organization_id}/projects/{project_id}/settings/project_authorized_teams

This endpoint allows you to manage teams in relation to projects.

Request Headers

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

Request Example

curl "http://shares.example.com/organizations/32400255/projects/800313582/settings/project_authorized_teams" -d '{"team_id":81831458,"permission_delete":false,"permission_download":false,"permission_make_folder":false,"permission_rename":false,"permission_upload":false,"permission_view":false}' -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
team_id Required integer ID of team
permission_delete Optional boolean Delete permission
permission_download Optional boolean Download permission
permission_make_folder Optional boolean Make folder permission
permission_rename Optional boolean Rename permission
permission_upload Optional boolean Upload permission
permission_view Optional boolean View permission

Success Response Codes

  • 200 OK
  • 201 Created

Error Response Codes

  • 422 Unprocessable Entity

Response Attributes

Name Type Description
id integer ID for team resource
permission_delete boolean Delete Permission
permission_download boolean Download Permission
permission_make_folder boolean Make Folder Permission
permission_rename boolean Rename Permission
permission_upload boolean Upload Permission
permission_view boolean View Permission
team JSON object Object that contains the team ID

List all teams in a project

GET /organizations/{organization_id}/projects/{project_id}/settings/project_authorized_teams

Request Example

curl -g "http://shares.example.com/organizations/32400255/projects/800313582/settings/project_authorized_teams" -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/"19ed5afeccd6d92a102f67c7ecddee71"
      Cache-Control: max-age=0, private, must-revalidate
      X-Request-Id: 98d5f542-5b2e-4cba-a95c-2f236e7d37ae
      X-Runtime: 0.029573
      Content-Length: 202

Success Response Example

200 OK

Example Response Body

[
      {
        "id": 120896318,
        "permission_delete": false,
        "permission_download": false,
        "permission_make_folder": false,
        "permission_rename": false,
        "permission_upload": false,
        "permission_view": false,
        "team": {
          "id": 81831458
        }
      }
      ]


Get a specific team in a project

GET /organizations/{organization_id}/projects/{project_id}/settings/project_authorized_teams/{id}

Request Example

curl -g "http://shares.example.com/organizations/32400255/projects/800313582/settings/project_authorized_teams/120896318" -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/"5beaf89c535eecd9b2202981c20130ac"
  Cache-Control: max-age=0, private, must-revalidate
  X-Request-Id: 9d5516ab-98f6-49e4-a04b-69eeda6616f5
  X-Runtime: 0.040617
  Content-Length: 200

Success Response Example

200 OK
{
  "id": 120896318,
  "permission_delete": false,
  "permission_download": false,
  "permission_make_folder": false,
  "permission_rename": false,
  "permission_upload": false,
  "permission_view": false,
  "team": {
    "id": 81831458
  }
  }


Authorize a team to a project

POST /organizations/{organization_id}/projects/{project_id}/settings/project_authorized_teams

Request Example

curl "http://shares.example.com/organizations/32400255/projects/800313582/settings/project_authorized_teams" -d '{"team_id":81831458,"permission_delete":false,"permission_download":false,"permission_make_folder":false,"permission_rename":false,"permission_upload":false,"permission_view":false}' -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/"2289e27bad001e201fbff58fd9236b38"
Cache-Control: max-age=0, private, must-revalidate
X-Request-Id: 6e8f7a13-08ad-4d17-9d9d-49a6afff635b
X-Runtime: 0.056751
Content-Length: 200

Success Response Example

201 Created
{
  "id": 120896320,
  "permission_delete": false,
  "permission_download": false,
  "permission_make_folder": false,
  "permission_rename": false,
  "permission_upload": false,
  "permission_view": false,
  "team": {
    "id": 81831458
  }
}

Error Response Example

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


Update a team's permissions in a project

PUT /organizations/{organization_id}/projects/{project_id}/settings/project_authorized_teams/{id}

Request Example

curl "http://shares.example.com/organizations/32400255/projects/800313582/settings/project_authorized_teams/120896318" -d '{"permission_delete":true,"permission_download":false,"permission_make_folder":false,"permission_rename":false,"permission_upload":false,"permission_view":true}' -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/"bf252df9d020c3120a814fbe37ef32e3"
Cache-Control: max-age=0, private, must-revalidate
X-Request-Id: f61027d1-95aa-4feb-a9df-cc9ca3e4dd84
X-Runtime: 0.032273
Content-Length: 198

Success Response Example

200 OK
{
  "id": 120896318,
  "permission_delete": true,
  "permission_download": false,
  "permission_make_folder": false,
  "permission_rename": false,
  "permission_upload": false,
  "permission_view": true,
  "team": {
    "id": 81831458
  }
}

Error Response Example

422 Unprocessable Entity
{
                "errors": {
                  "permission_view": [
                    "is not included in the list"
                  ]
                }
              }

Troubleshooting: The "permission_view" request parameter is missing in the request.


Remove a team from a project

DELETE /organizations/{organization_id}/projects/{project_id}/settings/project_authorized_teams/{id}

Request Example

curl "http://shares.example.com/organizations/32400255/projects/800313582/settings/project_authorized_teams/120896318" -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: d01b08f3-9872-4df0-89d3-3609ccd4f6c1
  X-Runtime: 0.02818

Success Response Example

204 No Content

Video player

Video

×