curl -X GET 'https://api.weir.ai/admin/platforms' \
-H 'Authorization: Bearer YOUR_ADMIN_ACCESS_TOKEN'
{
"data": {
"platforms": [
{
"platformId": "platform_123456789",
"name": "My Platform",
"domain": "myplatform.com",
"type": "Forum/Community",
"organizationId": "org_123456789",
"organizationName": "Acme Corp",
"status": "verified",
"createdAt": "2024-01-15T10:30:00Z"
}
],
"total": 1
},
"message": "Platforms retrieved successfully",
"status": "success"
}
Retrieve all platforms in the system
curl -X GET 'https://api.weir.ai/admin/platforms' \
-H 'Authorization: Bearer YOUR_ADMIN_ACCESS_TOKEN'
{
"data": {
"platforms": [
{
"platformId": "platform_123456789",
"name": "My Platform",
"domain": "myplatform.com",
"type": "Forum/Community",
"organizationId": "org_123456789",
"organizationName": "Acme Corp",
"status": "verified",
"createdAt": "2024-01-15T10:30:00Z"
}
],
"total": 1
},
"message": "Platforms retrieved successfully",
"status": "success"
}
curl -X GET 'https://api.weir.ai/admin/platforms' \
-H 'Authorization: Bearer YOUR_ADMIN_ACCESS_TOKEN'
{
"data": {
"platforms": [
{
"platformId": "platform_123456789",
"name": "My Platform",
"domain": "myplatform.com",
"type": "Forum/Community",
"organizationId": "org_123456789",
"organizationName": "Acme Corp",
"status": "verified",
"createdAt": "2024-01-15T10:30:00Z"
}
],
"total": 1
},
"message": "Platforms retrieved successfully",
"status": "success"
}
const getAllPlatforms = async (accessToken) => {
const response = await fetch('https://api.weir.ai/admin/platforms', {
headers: { 'Authorization': `Bearer ${accessToken}` }
});
if (!response.ok) throw new Error(`HTTP error! status: ${response.status}`);
return await response.json();
};
Was this page helpful?