Skip to main content Link Menu Expand (external link) Document Search Copy Copied

Administrators

Administrators are types of members with delegated workspace management permissions, equivalent to those held by the workspace owner.


Objects

Administrator

Extends from Member

Path Type Format Description
administrator Boolean   Whether or not the member is an administrator
{
  "id" : "auth0|5f15609d498a0c0013aee1b1",
  "name" : "[email protected]",
  "handle" : "@sit+prod+2",
  "administrator" : true,
  "_links" : {
    "self" : {
      "href" : "https://catalog.matatika.com/api/workspaces/9937a4a7-45b9-44b7-978f-8288ee87f628/members/auth0%7C5f15609d498a0c0013aee1b1"
    }
  }
}

Requests


View all administrators of a workspace

GET

/api/workspaces/{workspace-id}/administrators

Returns all administrators of the workspace {workspace-id}.

Prerequisites

  • The user must be a member of the workspace {workspace-id}

Request

Example Snippets

cURL

curl -H "Authorization: Bearer $ACCESS_TOKEN" 'https://catalog.matatika.com:443/api/workspaces/9937a4a7-45b9-44b7-978f-8288ee87f628/administrators' -i -X GET \
    -H 'Accept: application/json, application/javascript, text/javascript, text/json' \
    -H 'Content-Type: application/json'

Python (requests)

import requests

url = "https://catalog.matatika.com:443/api/workspaces/9937a4a7-45b9-44b7-978f-8288ee87f628/administrators"

headers = {
  'Authorization': ACCESS_TOKEN
}

response = requests.request("GET", url, headers=headers)

print(response.text.encode('utf8'))

Response

200 OK

Administrator collection with HAL links.

{
  "_embedded" : {
    "administrators" : [ {
      "id" : "auth0|5f15609d498a0c0013aee1b1",
      "name" : "[email protected]",
      "handle" : "@sit+prod+2",
      "administrator" : true,
      "_links" : {
        "self" : {
          "href" : "https://catalog.matatika.com/api/workspaces/9937a4a7-45b9-44b7-978f-8288ee87f628/members/auth0%7C5f15609d498a0c0013aee1b1"
        }
      }
    }, {
      "id" : "auth0|5eb0327cbfd7490bff55feeb",
      "name" : "[email protected]",
      "handle" : "@sit+prod",
      "administrator" : true,
      "_links" : {
        "self" : {
          "href" : "https://catalog.matatika.com/api/workspaces/9937a4a7-45b9-44b7-978f-8288ee87f628/members/auth0%7C5eb0327cbfd7490bff55feeb"
        }
      }
    } ]
  },
  "_links" : {
    "self" : {
      "href" : "https://catalog.matatika.com/api/workspaces/9937a4a7-45b9-44b7-978f-8288ee87f628/administrators"
    }
  }
}

Add an administrator to a workspace

PUT

/api/workspaces/{workspace-id}/administrators/{profile-id}

Adds the profile {profile-id} as an administrator to the workspace {workspace-id}.

Prerequisites

  • The authenticated user profile must be the owner of the workspace {workspace-id}
  • The profile {profile-id} must be a member of the workspace {workspace-id}

Request

Example Snippets

cURL

curl -H "Authorization: Bearer $ACCESS_TOKEN" 'https://catalog.matatika.com:443/api/workspaces/9937a4a7-45b9-44b7-978f-8288ee87f628/administrators/auth0%7C5f15609d498a0c0013aee1b1' -i -X PUT \
    -H 'Accept: application/json, application/javascript, text/javascript, text/json' \
    -H 'Content-Type: application/json'

Python (requests)

import requests

url = "https://catalog.matatika.com:443/api/workspaces/9937a4a7-45b9-44b7-978f-8288ee87f628/administrators/auth0%7C5f15609d498a0c0013aee1b1"

headers = {
  'Authorization': ACCESS_TOKEN
}

response = requests.request("PUT", url, headers=headers)

print(response.text.encode('utf8'))

Response

200 OK

Administrator with HAL links.

{
  "id" : "auth0|5f15609d498a0c0013aee1b1",
  "name" : "[email protected]",
  "handle" : "@sit+prod+2",
  "administrator" : true,
  "_links" : {
    "self" : {
      "href" : "https://catalog.matatika.com/api/workspaces/9937a4a7-45b9-44b7-978f-8288ee87f628/members/auth0%7C5f15609d498a0c0013aee1b1"
    }
  }
}

Withdraw an administrator from a workspace

DELETE

/api/workspaces/{workspace-id}/administrators/{profile-id}

Withdraws the profile {profile-id} as an administrator from the workspace {workspace-id}.

Prerequisites

  • The authenticated user profile must be the owner of the workspace {workspace-id}
  • The profile {profile-id} must be an administrator of the workspace {workspace-id}

Request

Example Snippets

cURL

curl -H "Authorization: Bearer $ACCESS_TOKEN" 'https://catalog.matatika.com:443/api/workspaces/9937a4a7-45b9-44b7-978f-8288ee87f628/administrators/auth0%7C5f15609d498a0c0013aee1b1' -i -X DELETE \
    -H 'Accept: application/json, application/javascript, text/javascript, text/json' \
    -H 'Content-Type: application/json'

Python (requests)

import requests

url = "https://catalog.matatika.com:443/api/workspaces/9937a4a7-45b9-44b7-978f-8288ee87f628/administrators/auth0%7C5f15609d498a0c0013aee1b1"

headers = {
  'Authorization': ACCESS_TOKEN
}

response = requests.request("DELETE", url, headers=headers)

print(response.text.encode('utf8'))

Response

200 OK

Administrator with HAL links.

{
  "id" : "auth0|5f15609d498a0c0013aee1b1",
  "name" : "[email protected]",
  "handle" : "@sit+prod+2",
  "administrator" : false,
  "_links" : {
    "self" : {
      "href" : "https://catalog.matatika.com/api/workspaces/9937a4a7-45b9-44b7-978f-8288ee87f628/members/auth0%7C5f15609d498a0c0013aee1b1"
    }
  }
}