Skip to main content

Managing Organization

A organization in Shield looks like

{
"organizations": [
{
"id": "4eb3c3b4-962b-4b45-b55b-4c07d3810ca8",
"name": "gotocompany",
"slug": "gotocompany",
"metadata": {
"description": "Goto company"
},
"createdAt": "2022-12-07T14:10:42.755848Z",
"updatedAt": "2022-12-07T14:10:42.755848Z"
}
]
}

API Interface

Create Organizations

$ curl --location --request POST 'http://localhost:8000/admin/v1beta1/organizations'
--header 'Content-Type: application/json'
--header 'Accept: application/json'
--data-raw '{
"name": "gotocompany",
"slug": "gotocompany",
"metadata": {
"description": "Goto company"
}
}'

List Organizations

$ curl --location --request GET 'http://localhost:8000/admin/v1beta1/organizations'
--header 'Accept: application/json'

Get Organizations

$ curl --location --request GET 'http://localhost:8000/admin/v1beta1/organizations/4eb3c3b4-962b-4b45-b55b-4c07d3810ca8'
--header 'Accept: application/json'

Update Organizations

$ curl --location --request PUT 'http://localhost:8000/admin/v1beta1/organizations/4eb3c3b4-962b-4b45-b55b-4c07d3810ca8'
--header 'Content-Type: application/json'
--header 'Accept: application/json'
--data-raw '{
"name": "gotocompany",
"slug": "gotocompany",
"metadata": {
"description": "Goto company",
"url": "github.com/goto"
}
} '