curl --request POST \
--url https://api.riskportal.activeviam.com/api/Books/CreateBook \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json-patch+json' \
--data '
{
"$type": "Derivitec.Web.Core.Book.ApiBookCreateRequest, Derivitec.Web.Core",
"book_name": "Example book",
"description": "<string>"
}
'import requests
url = "https://api.riskportal.activeviam.com/api/Books/CreateBook"
payload = {
"$type": "Derivitec.Web.Core.Book.ApiBookCreateRequest, Derivitec.Web.Core",
"book_name": "Example book",
"description": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json-patch+json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json-patch+json'},
body: JSON.stringify({
$type: 'Derivitec.Web.Core.Book.ApiBookCreateRequest, Derivitec.Web.Core',
book_name: 'Example book',
description: '<string>'
})
};
fetch('https://api.riskportal.activeviam.com/api/Books/CreateBook', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.riskportal.activeviam.com/api/Books/CreateBook",
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([
'$type' => 'Derivitec.Web.Core.Book.ApiBookCreateRequest, Derivitec.Web.Core',
'book_name' => 'Example book',
'description' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json-patch+json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.riskportal.activeviam.com/api/Books/CreateBook"
payload := strings.NewReader("{\n \"$type\": \"Derivitec.Web.Core.Book.ApiBookCreateRequest, Derivitec.Web.Core\",\n \"book_name\": \"Example book\",\n \"description\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json-patch+json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.riskportal.activeviam.com/api/Books/CreateBook")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json-patch+json")
.body("{\n \"$type\": \"Derivitec.Web.Core.Book.ApiBookCreateRequest, Derivitec.Web.Core\",\n \"book_name\": \"Example book\",\n \"description\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.riskportal.activeviam.com/api/Books/CreateBook")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json-patch+json'
request.body = "{\n \"$type\": \"Derivitec.Web.Core.Book.ApiBookCreateRequest, Derivitec.Web.Core\",\n \"book_name\": \"Example book\",\n \"description\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"$type": "Derivitec.Web.Core.Book.ApiBookCreateResponse, Derivitec.Web.Core",
"is_success": true,
"error_messages": [
"<string>"
]
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"instance": "<string>"
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"instance": "<string>"
}Create a book.
Creates an active Derivitec book and makes the caller its owner. Both name and description are required, and the name cannot duplicate another book already linked to the caller. Creation completes before returning in the normal result envelope.
curl --request POST \
--url https://api.riskportal.activeviam.com/api/Books/CreateBook \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json-patch+json' \
--data '
{
"$type": "Derivitec.Web.Core.Book.ApiBookCreateRequest, Derivitec.Web.Core",
"book_name": "Example book",
"description": "<string>"
}
'import requests
url = "https://api.riskportal.activeviam.com/api/Books/CreateBook"
payload = {
"$type": "Derivitec.Web.Core.Book.ApiBookCreateRequest, Derivitec.Web.Core",
"book_name": "Example book",
"description": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json-patch+json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json-patch+json'},
body: JSON.stringify({
$type: 'Derivitec.Web.Core.Book.ApiBookCreateRequest, Derivitec.Web.Core',
book_name: 'Example book',
description: '<string>'
})
};
fetch('https://api.riskportal.activeviam.com/api/Books/CreateBook', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.riskportal.activeviam.com/api/Books/CreateBook",
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([
'$type' => 'Derivitec.Web.Core.Book.ApiBookCreateRequest, Derivitec.Web.Core',
'book_name' => 'Example book',
'description' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json-patch+json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.riskportal.activeviam.com/api/Books/CreateBook"
payload := strings.NewReader("{\n \"$type\": \"Derivitec.Web.Core.Book.ApiBookCreateRequest, Derivitec.Web.Core\",\n \"book_name\": \"Example book\",\n \"description\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json-patch+json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.riskportal.activeviam.com/api/Books/CreateBook")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json-patch+json")
.body("{\n \"$type\": \"Derivitec.Web.Core.Book.ApiBookCreateRequest, Derivitec.Web.Core\",\n \"book_name\": \"Example book\",\n \"description\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.riskportal.activeviam.com/api/Books/CreateBook")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json-patch+json'
request.body = "{\n \"$type\": \"Derivitec.Web.Core.Book.ApiBookCreateRequest, Derivitec.Web.Core\",\n \"book_name\": \"Example book\",\n \"description\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"$type": "Derivitec.Web.Core.Book.ApiBookCreateResponse, Derivitec.Web.Core",
"is_success": true,
"error_messages": [
"<string>"
]
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"instance": "<string>"
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"instance": "<string>"
}Authorizations
OAuth2 access-token requested from AWS Cognito and provided as a Auth Bearer header
Body
Required non-empty BookName and Description. This request declares no explicit length bounds.
Book name and description used to create a Derivitec-managed book.
Derivitec.Web.Core.Book.ApiBookCreateRequest, Derivitec.Web.Core Name for the new book; it must be non-empty and unique among books linked to the caller.
"Example book"
Non-empty client-visible description for the new book.
Response
Created
Outcome of creating a book.
Derivitec.Web.Core.Book.ApiBookCreateResponse, Derivitec.Web.Core Whether the operation completed successfully. The default is true; error outcomes set it to false.
true
Messages explaining operation-level failures. The collection is empty by default.
Was this page helpful?