メインコンテンツまでスキップ

グループの一覧を取得する

GET https://deploygate.com/api/organizations

現在のユーザーが所属しているグループの一覧を取得します。


注意点

グループのAPIキーではご利用いただけません

Example

curl \
-X GET \
--url "https://deploygate.com/api/organizations" \
-H "Accept: application/json" \
-H "Authorization: Bearer ${API_TOKEN}"

Result 200

{
"error": false,
"organizations": [
{
"type": "Organization",
"name": "ExampleOrganization",
"description": "This is an organization",
"url": "https://deploygate.com/organizations/ExampleOrganization"
},
{
"type": "Organization",
"name": "ExampleEnterpriseOrganization",
"description": "This is an organization created in Enterprise",
"url": "https://deploygate.com/organizations/ExampleEnterpriseOrganization",
"enterprise": {
"type": "Enterprise",
"name": "ExampleEnterprise",
"display_name": "Example Enterprise Inc.",
"url": "https://deploygate.com/enterprises/ExampleEnterprise",
"icon_url": "/img/icons/enterprise-default-thumb.png"
}
}
]
}

Result 400 - グループのAPIキーでアクセスした場合

{
"error": true,
"message": "requester must be a user",
"because": "requester must be a user"
}