Link Search Menu Expand Document

Profiles

Profiles are individual consumers of the Matatika service. A profile is automatically created for a user when they first access the app, or accept an invitation to a workspace from an existing member via email.


Objects

Profile

Path Type Format Description
id String Version 4 UUID The profile ID
name String The full name of the person or entity represented by this profile  
handle String The unique @-prefixed handle for this profile (generated and read-only)  
phone String Phone number The profile phone number
email String Email address The profile email address
defaultWorkspace Workspace The profile default workspace  
{
  "id" : "auth0|5eb0327cbfd7490bff55feeb",
  "name" : "[email protected]",
  "handle" : "@support+integrationtests+a7o91bel",
  "email" : "[email protected]",
  "_links" : {
    "self" : {
      "href" : "https://catalog.matatika.com/api/profiles"
    },
    "update edit profile" : {
      "href" : "https://catalog.matatika.com/api/profiles/auth0%7C5eb0327cbfd7490bff55feeb"
    },
    "workspaces" : {
      "href" : "https://catalog.matatika.com/api/workspaces"
    },
    "new workspace" : {
      "href" : "https://catalog.matatika.com/api/workspaces"
    }
  }
}

Requests


View all profiles

GET

/api/profiles

Returns all profiles under the authenticated user account.

Request

Example Snippets

  • cURL
curl -H "Authorization: Bearer $ACCESS_TOKEN" 'https://catalog.matatika.com:443/api/profiles' -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/profiles"

headers = {
  'Authorization': ACCESS_TOKEN
}

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

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

Response

200 OK

Profile collection with HAL links.

{
  "_embedded" : {
    "profiles" : [ {
      "id" : "auth0|5eb0327cbfd7490bff55feeb",
      "name" : "[email protected]",
      "handle" : "@support+integrationtests+a7o91bel",
      "email" : "[email protected]",
      "_links" : {
        "self" : {
          "href" : "https://catalog.matatika.com/api/profiles"
        },
        "update edit profile" : {
          "href" : "https://catalog.matatika.com/api/profiles/auth0%7C5eb0327cbfd7490bff55feeb"
        },
        "workspaces" : {
          "href" : "https://catalog.matatika.com/api/workspaces"
        },
        "new workspace" : {
          "href" : "https://catalog.matatika.com/api/workspaces"
        }
      }
    } ]
  },
  "_links" : {
    "self" : {
      "href" : "https://catalog.matatika.com/api/profiles"
    }
  }
}

View a profile

GET

/api/profiles/{profile-id}

Returns the profile {profile-id}.

Prerequisites

  • Profile {profile-id} must exist under the authenticated user account

Request

Example Snippets

  • cURL
curl -H "Authorization: Bearer $ACCESS_TOKEN" 'https://catalog.matatika.com:443/api/profiles/auth0%7C5eb0327cbfd7490bff55feeb' -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/profiles/auth0%7C5eb0327cbfd7490bff55feeb"

headers = {
  'Authorization': ACCESS_TOKEN
}

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

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

Response

200 OK

Profile with HAL links.

{
  "id" : "auth0|5eb0327cbfd7490bff55feeb",
  "name" : "[email protected]",
  "handle" : "@support+integrationtests+a7o91bel",
  "email" : "[email protected]",
  "_links" : {
    "self" : {
      "href" : "https://catalog.matatika.com/api/profiles"
    },
    "update edit profile" : {
      "href" : "https://catalog.matatika.com/api/profiles/auth0%7C5eb0327cbfd7490bff55feeb"
    },
    "workspaces" : {
      "href" : "https://catalog.matatika.com/api/workspaces"
    },
    "new workspace" : {
      "href" : "https://catalog.matatika.com/api/workspaces"
    }
  }
}

Create or update profile

PUT

/api/profiles/{profile-id}

Creates or updates the user profile.

Prerequisites

  • The authentication subject must match the profile ID {profile-id}

Request

Body

Profile resource.

{
  "name" : "SIT-Generated Profile [2023-03-23T21:45:15.705736]",
  "phone" : "13042473219",
  "email" : "[email protected]"
}

Example Snippets

  • cURL
curl -H "Authorization: Bearer $ACCESS_TOKEN" 'https://catalog.matatika.com:443/api/profiles/auth0%7C641cc86bd74e82cbf0a09149' -i -X PUT \
    -H 'Accept: application/json, application/javascript, text/javascript, text/json' \
    -H 'Content-Type: application/hal+json; charset=ISO-8859-1' \
    -d '{
  "name" : "SIT-Generated Profile [2023-03-23T21:45:15.705736]",
  "phone" : "13042473219",
  "email" : "[email protected]"
}'
  • Python (requests)
import requests

url = "https://catalog.matatika.com:443/api/profiles/auth0%7C641cc86bd74e82cbf0a09149"

data = {
  "name" : "SIT-Generated Profile [2023-03-23T21:45:15.705736]",
  "phone" : "13042473219",
  "email" : "[email protected]"
}
headers = {
  'Authorization': ACCESS_TOKEN
}

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

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

Response

200 OK / 201 Created

Profile with HAL links.

{
  "id" : "auth0|641cc86bd74e82cbf0a09149",
  "name" : "SIT-Generated Profile [2023-03-23T21:45:15.705736]",
  "handle" : "@sit-generatedprofile[2023-03-23t21:45:14.970380]",
  "phone" : "13042473219",
  "email" : "[email protected]",
  "_links" : {
    "self" : {
      "href" : "https://catalog.matatika.com/api/profiles"
    },
    "update edit profile" : {
      "href" : "https://catalog.matatika.com/api/profiles/auth0%7C641cc86bd74e82cbf0a09149"
    },
    "workspaces" : {
      "href" : "https://catalog.matatika.com/api/workspaces"
    },
    "new workspace" : {
      "href" : "https://catalog.matatika.com/api/workspaces"
    }
  }
}

Set a workspace as default

PATCH

/api/profiles/{profile-id}

Sets a default workspace for the profile {profile-id}.

Prerequisites

  • The authentication subject must match the profile ID {profile-id}

A workspace can be set as default, which defines the environment the Matatika app will initially load for a given profile. The default workspace setting persists only for the profile that sets it.

Request

Body

Profile resource.

{
  "defaultWorkspace" : {
    "id" : "9d51a01d-da8e-4bde-81c7-1ee4d8bec74d"
  }
}

Example Snippets

  • cURL
curl -H "Authorization: Bearer $ACCESS_TOKEN" 'https://catalog.matatika.com:443/api/profiles/auth0%7C5eb0327cbfd7490bff55feeb' -i -X PATCH \
    -H 'Accept: application/json, application/javascript, text/javascript, text/json' \
    -H 'Content-Type: application/hal+json; charset=ISO-8859-1' \
    -d '{
  "defaultWorkspace" : {
    "id" : "9d51a01d-da8e-4bde-81c7-1ee4d8bec74d"
  }
}'
  • Python (requests)
import requests

url = "https://catalog.matatika.com:443/api/profiles/auth0%7C5eb0327cbfd7490bff55feeb"

data = {
  "defaultWorkspace" : {
    "id" : "9d51a01d-da8e-4bde-81c7-1ee4d8bec74d"
  }
}
headers = {
  'Authorization': ACCESS_TOKEN
}

response = requests.request("PATCH", url, headers=headers, data=data)

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

Response

200 OK

Profile with HAL links.

{
  "id" : "auth0|5eb0327cbfd7490bff55feeb",
  "name" : "[email protected]",
  "handle" : "@support+integrationtests+a7o91bel",
  "email" : "[email protected]",
  "defaultWorkspace" : {
    "name" : "Test Workspace [2023-03-23T21:45:10.027235313]",
    "id" : "9d51a01d-da8e-4bde-81c7-1ee4d8bec74d"
  },
  "_links" : {
    "self" : {
      "href" : "https://catalog.matatika.com/api/profiles"
    },
    "update edit profile" : {
      "href" : "https://catalog.matatika.com/api/profiles/auth0%7C5eb0327cbfd7490bff55feeb"
    },
    "workspaces" : {
      "href" : "https://catalog.matatika.com/api/workspaces"
    },
    "new workspace" : {
      "href" : "https://catalog.matatika.com/api/workspaces"
    }
  }
}