curl -X GET 'https://api.weir.ai/admin/organizations' \
-H 'Authorization: Bearer YOUR_ADMIN_ACCESS_TOKEN'
{
"data": {
"organizations": [
{
"organizationId": "org_123456789",
"name": "Acme Corporation",
"type": "Platform",
"status": "active",
"memberCount": 15,
"platformCount": 3,
"createdAt": "2024-01-01T00:00:00Z"
}
],
"total": 1
},
"message": "Organizations retrieved successfully",
"status": "success"
}
Admin APIs - System
Get All Organizations
Retrieve all organizations in the system
GET
/
admin
/
organizations
curl -X GET 'https://api.weir.ai/admin/organizations' \
-H 'Authorization: Bearer YOUR_ADMIN_ACCESS_TOKEN'
{
"data": {
"organizations": [
{
"organizationId": "org_123456789",
"name": "Acme Corporation",
"type": "Platform",
"status": "active",
"memberCount": 15,
"platformCount": 3,
"createdAt": "2024-01-01T00:00:00Z"
}
],
"total": 1
},
"message": "Organizations retrieved successfully",
"status": "success"
}
Get All Organizations
Retrieve a list of all organizations in the system (admin only).curl -X GET 'https://api.weir.ai/admin/organizations' \
-H 'Authorization: Bearer YOUR_ADMIN_ACCESS_TOKEN'
{
"data": {
"organizations": [
{
"organizationId": "org_123456789",
"name": "Acme Corporation",
"type": "Platform",
"status": "active",
"memberCount": 15,
"platformCount": 3,
"createdAt": "2024-01-01T00:00:00Z"
}
],
"total": 1
},
"message": "Organizations retrieved successfully",
"status": "success"
}
Response Fields
array
required
Usage Examples
const getAllOrganizations = async (accessToken) => {
const response = await fetch('https://api.weir.ai/admin/organizations', {
headers: { 'Authorization': `Bearer ${accessToken}` }
});
if (!response.ok) throw new Error(`HTTP error! status: ${response.status}`);
return await response.json();
};
import requests
def get_all_organizations(access_token):
response = requests.get(
'https://api.weir.ai/admin/organizations',
headers={'Authorization': f'Bearer {access_token}'}
)
response.raise_for_status()
return response.json()
Was this page helpful?