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"
}
Retrieve all organizations in the system
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"
}
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"
}
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();
};
Was this page helpful?