Import From Json Table - MindBridge Documentation
Import From Json Table
cURL
curl --request POST \
--url https://{tenant}.mindbridge.ai/api/v1/file-manager/import-from-json-table \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"engagementId": "<string>",
"jsonTableId": "<string>",
"parentFileManagerEntityId": "<string>"
}
'
Python
import requests
url = "https://{tenant}.mindbridge.ai/api/v1/file-manager/import-from-json-table"
payload = {
"name": "<string>",
"engagementId": "<string>",
"jsonTableId": "<string>",
"parentFileManagerEntityId": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)
JavaScript
const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
engagementId: '<string>',
jsonTableId: '<string>',
parentFileManagerEntityId: '<string>'
})
};
fetch('https://{tenant}.mindbridge.ai/api/v1/file-manager/import-from-json-table', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
PHP
<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://{tenant}.mindbridge.ai/api/v1/file-manager/import-from-json-table",
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>',
'engagementId' => '<string>',
'jsonTableId' => '<string>',
'parentFileManagerEntityId' => '<string>'
]),
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;
}
Go
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://{tenant}.mindbridge.ai/api/v1/file-manager/import-from-json-table"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"engagementId\": \"<string>\",\n \"jsonTableId\": \"<string>\",\n \"parentFileManagerEntityId\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}
Response
201 - application/json
{
"originalName": "<string>",
"extension": "<string>",
"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>"
},
"engagementId": "<string>",
"parentFileManagerEntityId": "<string>",
"name": "<string>",
"status": [],
"fileInfoId": "<string>"
}
Authorizations
- Authorization: Bearer authentication header of the form
Bearer <token>, where<token>is your auth token.
Body
- name (string): The name of the newly created file manager file. Minimum string length:
1 - engagementId (string): Identifies the associated engagement to import the formatted file into.
- jsonTableId (string): Identifies the JSON table to be formatted into a file.
- parentFileManagerEntityId (string): Identifies the file manager entity that will be the parent of the newly created file.