Skip to content

Org API

CreateOrg

GraphQL

mutation CreateOrg {
createOrg(
input: {
id: "00000000-0000-0000-0000-000000000000"
name: "My Org"
}
) {
org {
id
name
}
}
}

Response

{
"data": {
"createOrg": {
"org": {
"id": "00000000-0000-0000-0000-000000000000",
"name": "My Org"
}
}
}
}

Connect

Terminal window
pkgx http POST \
http://localhost:9090/org.v1beta1.OrgService/CreateOrg <<<'
{
"id": "00000000-0000-0000-0000-000000000000",
"name": "My Org"
}
'

Response

{
"org": {
"id": "00000000-0000-0000-0000-000000000000",
"name": "My Org"
}
}

REST

Terminal window
pkgx http \
http://localhost:9090/orgs/00000000-0000-0000-0000-000000000000 \
id="00000000-0000-0000-0000-000000000000" \
name="My Org"

GetOrg

GraphQL

query GetOrg {
org(id: "d0d77fa9-faa5-4a7d-83a3-92fe3a83544c") {
org {
id
name
}
}
}

Connect

Terminal window
pkgx http POST \
http://localhost:9090/org.v1beta1.OrgService/GetOrg <<<'
{
"id": "9997faf2-b1f1-4982-8c75-8d05a73d88f4"
}
'

Response

{
"org": {
"id": "9997faf2-b1f1-4982-8c75-8d05a73d88f4",
"name": "Org 1"
}
}

REST

Terminal window
pkgx http \
http://localhost:9090/orgs/9997faf2-b1f1-4982-8c75-8d05a73d88f4