Skip to content

User Profile API

CreateProfile

GraphQL

mutation CreateProfile {
createProfile(
input: {
id: "00000000-0000-0000-0000-000000000000"
fullName: "Kevin Chen"
orgId: "00000000-0000-0000-0000-000000000000"
}
) {
profile {
id
fullName
orgId
}
}
}

Response

{
"data": {
"createProfile": {
"profile": {
"id": "00000000-0000-0000-0000-000000000000",
"fullName": "Kevin Chen",
"orgId": "00000000-0000-0000-0000-000000000000"
}
}
}
}

Connect

Terminal window
pkgx http POST \
http://localhost:9091/profile.v1beta1.ProfileService/CreateProfile <<<'
{
"id": "00000000-0000-0000-0000-000000000000",
"fullName": "Kevin Chen",
"orgId": "00000000-0000-0000-0000-000000000000"
}
'

Response

{
"profile": {
"id": "00000000-0000-0000-0000-000000000000",
"fullName": "Kevin Chen",
"orgId": "00000000-0000-0000-0000-000000000000"
}
}

REST

Terminal window
pkgx http \
http://localhost:9091/profiles/00000000-0000-0000-0000-000000000000 \
id="00000000-0000-0000-0000-000000000000" \
fullName="Kevin Chen" \
orgId="00000000-0000-0000-0000-000000000000"

GetProfile

GraphQL

query GetProfile {
profile(id: "d0d77fa9-faa5-4a7d-83a3-92fe3a83544c") {
profile {
id
fullName
}
}
}

Connect

Terminal window
pkgx http POST \
http://localhost:9091/profile.v1beta1.ProfileService/GetProfile <<<'
{
"id": "8816d06a-32da-4b54-8e71-3e4ca9422058"
}
'

Response

{
"profile": {
"fullName": "Kevin Chen",
"id": "8816d06a-32da-4b54-8e71-3e4ca9422058",
"orgId": "9997faf2-b1f1-4982-8c75-8d05a73d88f4"
}
}

REST

Terminal window
pkgx http \
http://localhost:9091/profiles/8816d06a-32da-4b54-8e71-3e4ca9422058