Create Library - MindBridge Documentation
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
Create Library API Call
POST /v1/libraries
Request
a. cURL
curl --request POST \
--url https://{tenant}.mindbridge.ai/api/v1/libraries \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '\
{\
"name": "<string>",\
"basedOnLibraryId": "<string>",\
"warningsDismissed": true,\
"accountGroupingId": "<string>",\
"analysisTypeIds": [\
"<string>"\
],\
"controlPointSelectionPermission": true,\
"controlPointWeightPermission": true,\
"controlPointSettingsPermission": true,\
"riskScoreAndGroupsSelectionPermission": true,\
"convertSettings": true,\
"defaultDelimiter": "<string>",\
"riskRangeEditPermission": true\
}
'
b. Python
import requests
url = "https://{tenant}.mindbridge.ai/api/v1/libraries"
payload = {
"name": "<string>",
"basedOnLibraryId": "<string>",
"warningsDismissed": True,
"accountGroupingId": "<string>",
"analysisTypeIds": ["<string>"],
"controlPointSelectionPermission": True,
"controlPointWeightPermission": True,
"controlPointSettingsPermission": True,
"riskScoreAndGroupsSelectionPermission": True,
"convertSettings": True,
"defaultDelimiter": "<string>",
"riskRangeEditPermission": True
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)
c. JavaScript (Fetch)
const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
basedOnLibraryId: '<string>',
warningsDismissed: true,
accountGroupingId: '<string>',
analysisTypeIds: ['<string>'],
controlPointSelectionPermission: true,
controlPointWeightPermission: true,
controlPointSettingsPermission: true,
riskScoreAndGroupsSelectionPermission: true,
convertSettings: true,
defaultDelimiter: '<string>',
riskRangeEditPermission: true
})
};
fetch('https://{tenant}.mindbridge.ai/api/v1/libraries', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
d. PHP
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://{tenant}.mindbridge.ai/api/v1/libraries",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'basedOnLibraryId' => '<string>',
'warningsDismissed' => true,
'accountGroupingId' => '<string>',
'analysisTypeIds' => [
'<string>'
],
'controlPointSelectionPermission' => true,
'controlPointWeightPermission' => true,
'controlPointSettingsPermission' => true,
'riskScoreAndGroupsSelectionPermission' => true,
'convertSettings' => true,
'defaultDelimiter' => '<string>',
'riskRangeEditPermission' => true
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
Response
{
"id": "<string>",
"version": 123,
"creationDate": "2023-11-07T05:31:56Z",
"lastModifiedDate": "2023-11-07T05:31:56Z",
"createdUserInfo": {
"userId": "<string>",
"userName": "<string>"
},
"lastModifiedUserInfo": {
"userId": "<string>",
"userName": "<string>"
},
"name": "<string>",
"basedOnLibraryId": "<string>",
"originalSystemLibraryId": "<string>",
"warningsDismissed": true,
"conversionWarnings": [
{
"entityType": "<string>",
"entityId": "<string>",
"identifier": "<string>",
"values": [
"<string>"
],
"reason": "<string>",
"suggestedValues": [
"<string>"
],
"problemCount": 123
}
],
"accountGroupingId": "<string>",
"analysisTypeIds": [
"<string>"
],
"defaultDelimiter": "<string>",
"controlPointSelectionPermission": true,
"controlPointWeightPermission": true,
"controlPointSettingsPermission": true,
"riskScoreAndGroupsSelectionPermission": true,
"riskRangeEditPermission": true,
"system": true,
"archived": true
}
Authorizations
Authorization
- Type: String
- Location: Header
- Required: Bearer authentication header of the form
Bearer <token>, where<token>is your auth token.
Body
- name: string (required) - The current name of the library. Maximum string length:
80 - basedOnLibraryId: string (required) - Identifies the library that the new library is based on.
- warningsDismissed: boolean (required) - When set to
true, any conversion warnings for this library will not be displayed in the Libraries tab in the UI. - accountGroupingId: string (required) - Identifies the account grouping used.
- analysisTypeIds: string[] (required) - Identifies the analysis types used in the library.
- controlPointSelectionPermission: boolean (required) - When set to
true, control points can be added or removed within each risk score. - controlPointWeightPermission: boolean (required) - When set to
true, the weight of each control point can be adjusted within each risk score. - controlPointSettingsPermission: boolean (required) - When set to
true, individual control point settings can be adjusted within each risk score. - riskScoreAndGroupsSelectionPermission: boolean (required) - When set to
true, risk scores and groups can be disabled, and accounts associated with risk scores can be edited. - riskRangeEditPermission: boolean - Indicates whether or not settings from the selected base library should be converted for use with the selected account grouping.