Organization admin check service#
Checks authorization preconditions rather than creating or modifying administrator grants.
OpenAPI file: nominal.authorization.permissions.v1.json
Endpoints#
Check organization admin#
POST /authorization/permissions/v1/organization-admin-checks/check
Checks that the caller is an admin of their current org. Returns an empty response when the caller is. Changes nothing.
Errors:
PERMISSION_DENIED: the caller is not an admin of their current org.
Body
An empty JSON object, {}.
Response
An empty JSON object, {}.
Request
curl -X POST "https://api.gov.nominal.io/api/authorization/permissions/v1/organization-admin-checks/check" \
-H "Authorization: Bearer <api key>" \
-H "Content-Type: application/json" \
--data '{}'
import requests
response = requests.post(
"https://api.gov.nominal.io/api/authorization/permissions/v1/organization-admin-checks/check",
headers={"Authorization": "Bearer <api key>"},
json={},
)
response.raise_for_status()
print(response.json())
import httpx
response = httpx.post(
"https://api.gov.nominal.io/api/authorization/permissions/v1/organization-admin-checks/check",
headers={"Authorization": "Bearer <api key>"},
json={},
)
response.raise_for_status()
print(response.json())
import asyncio
import aiohttp
async def main() -> None:
async with aiohttp.ClientSession() as session:
async with session.post(
"https://api.gov.nominal.io/api/authorization/permissions/v1/organization-admin-checks/check",
headers={"Authorization": "Bearer <api key>"},
json={},
) as response:
response.raise_for_status()
print(await response.json())
asyncio.run(main())
Response: 200
{}
Page design based on Scalar, MIT License.