Create Permission
Create Permission
POST
https://api.ocamba.com/v2/adex/permissions
Creates one permission catalog metadata row. Required fields are permission, scope, and name. Optional description. Server sets id, timestamps, and deprecated=0. Duplicate permission key returns 409.
Warning
Only the application owner may create permissions. Other callers receive 403.
Rate limits:
- Burst: 10/s
- Steady: 150/m
Request schema
bodyResponse schemas
›
201
application/json
›
400
application/json
›
403
application/json
›
409
application/json
›
500
application/json
curl -X POST \
"https://api.ocamba.com/v2/adex/permissions" \
-H "Authorization: Bearer {TOKEN}" \
-H "Content-Type: application/json" \
-d '{
"permission": "roles.get",
"scope": "roles",
"name": "Read roles",
"description": "List and get application roles"
}'const url = 'https://api.ocamba.com/v2/adex/permissions';
const options = {
method: 'POST',
headers: {
Authorization: "Bearer {TOKEN}",
'Content-Type': "application/json"
},
body: JSON.stringify(
{
"permission": "roles.get",
"scope": "roles",
"name": "Read roles",
"description": "List and get application roles"
}
)
};
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/adex/permissions");
curl_setopt($ch, CURLOPT_HTTPHEADER, [
"Authorization: Bearer {TOKEN}",
"Content-Type: application/json"
]);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode(
[
"permission" => "roles.get",
"scope" => "roles",
"name" => "Read roles",
"description" => "List and get application roles"
]
));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);Responses
201 Created
{
"id": "100",
"permission": "roles.get",
"scope": "roles",
"name": "Read roles",
"description": "List and get application roles",
"deprecated": 0,
"create_time": "2026-03-20 14:00:00",
"update_time": "2026-03-20 14:00:00"
}
400 Bad Request
{
"code": 400,
"title": "Bad request.",
"message": "The request is not valid.",
"trace_id": "99a84211-f73d-4ff8-acdf-eb3e06bb9d62"
}
403 Forbidden
{
"code": 403,
"title": "Forbidden",
"message": "You are not allowed to perform this action.",
"trace_id": "99a84211-f73d-4ff8-acdf-eb3e06bb9d62"
}
409 Conflict
{
"code": 409,
"title": "Conflict",
"message": "Object already exists",
"trace_id": "99a84211-f73d-4ff8-acdf-eb3e06bb9d62"
}
500 Internal Server Error
{
"code": 500,
"title": "Internal server error.",
"trace_id": "99a84211-f73d-4ff8-acdf-eb3e06bb9d62"
}
Responses