Create Dashboard
Create Dashboard
POST
https://api.ocamba.com/v2/ocamba/dashboards
Creates a new Dashboard objectRequest schema
bodyResponse schemas
›
201
application/json
curl -X POST \
"https://api.ocamba.com/v2/ocamba/dashboards" \
-H "Authorization: Bearer {TOKEN}" \
-H "Content-Type: application/json" \
-d '{
"company_id": "6197120",
"app_id": "1001",
"name": "Activity dashboard",
"description": "Displays user activity"
}'const url = 'https://api.ocamba.com/v2/ocamba/dashboards';
const options = {
method: 'POST',
headers: {
Authorization: "Bearer {TOKEN}",
'Content-Type': "application/json"
},
body: JSON.stringify(
{
"company_id": "6197120",
"app_id": "1001",
"name": "Activity dashboard",
"description": "Displays user activity"
}
)
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}$ch = curl_init("https://api.ocamba.com/v2/ocamba/dashboards");
curl_setopt($ch, CURLOPT_HTTPHEADER, [
"Authorization: Bearer {TOKEN}",
"Content-Type: application/json"
]);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode(
[
"company_id" => "6197120",
"app_id" => "1001",
"name" => "Activity dashboard",
"description" => "Displays user activity"
]
));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);Responses
201 Created
{
"id": "295",
"company_id": "6197120",
"app_id": "1001",
"ref": null,
"creator_id": "1000077",
"name": "Activity dashboard",
"description": "Displays user activity"
}
Responses