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 | JSON Type | Format | Description |
|---|---|---|---|
administrator | bool | Whether or not the member is an administrator |
{
"id" : "auth0|6a21dcb31409cf3514bdf167",
"name" : "sit+prod+2@meltano.com",
"handle" : "@sit+prod+21",
"administrator" : true,
"_links" : {
"self" : {
"href" : "https://app.matatika.com/api/workspaces/facb8389-7299-43ca-b60e-c14fe9191846/members/auth0%7C6a21dcb31409cf3514bdf167"
}
}
}
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}
Examples
- cURL
- Python (requests)
curl -H "Authorization: Bearer $ACCESS_TOKEN" 'https://app.matatika.com/api/workspaces/facb8389-7299-43ca-b60e-c14fe9191846/administrators' -i -X GET
import requests
url = "https://app.matatika.com/api/workspaces/facb8389-7299-43ca-b60e-c14fe9191846/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|6a21dcb31409cf3514bdf167",
"name" : "sit+prod+2@meltano.com",
"handle" : "@sit+prod+21",
"administrator" : true,
"_links" : {
"self" : {
"href" : "https://app.matatika.com/api/workspaces/facb8389-7299-43ca-b60e-c14fe9191846/members/auth0%7C6a21dcb31409cf3514bdf167"
}
}
}, {
"id" : "auth0|6a21dc7aa1db2e036a222942",
"name" : "sit+prod@meltano.com",
"handle" : "@sit+prod1",
"administrator" : true,
"_links" : {
"self" : {
"href" : "https://app.matatika.com/api/workspaces/facb8389-7299-43ca-b60e-c14fe9191846/members/auth0%7C6a21dc7aa1db2e036a222942"
}
}
} ]
},
"_links" : {
"self" : {
"href" : "https://app.matatika.com/api/workspaces/facb8389-7299-43ca-b60e-c14fe9191846/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}
Examples
- cURL
- Python (requests)
curl -H "Authorization: Bearer $ACCESS_TOKEN" 'https://app.matatika.com/api/workspaces/facb8389-7299-43ca-b60e-c14fe9191846/administrators/auth0%7C6a21dcb31409cf3514bdf167' -i -X PUT \
-H 'Content-Type: application/json'
import requests
url = "https://app.matatika.com/api/workspaces/facb8389-7299-43ca-b60e-c14fe9191846/administrators/auth0%7C6a21dcb31409cf3514bdf167"
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|6a21dcb31409cf3514bdf167",
"name" : "sit+prod+2@meltano.com",
"handle" : "@sit+prod+21",
"administrator" : true,
"_links" : {
"self" : {
"href" : "https://app.matatika.com/api/workspaces/facb8389-7299-43ca-b60e-c14fe9191846/members/auth0%7C6a21dcb31409cf3514bdf167"
}
}
}
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}
Examples
- cURL
- Python (requests)
curl -H "Authorization: Bearer $ACCESS_TOKEN" 'https://app.matatika.com/api/workspaces/facb8389-7299-43ca-b60e-c14fe9191846/administrators/auth0%7C6a21dcb31409cf3514bdf167' -i -X DELETE
import requests
url = "https://app.matatika.com/api/workspaces/facb8389-7299-43ca-b60e-c14fe9191846/administrators/auth0%7C6a21dcb31409cf3514bdf167"
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|6a21dcb31409cf3514bdf167",
"name" : "sit+prod+2@meltano.com",
"handle" : "@sit+prod+21",
"administrator" : false,
"_links" : {
"self" : {
"href" : "https://app.matatika.com/api/workspaces/facb8389-7299-43ca-b60e-c14fe9191846/members/auth0%7C6a21dcb31409cf3514bdf167"
}
}
}