curl --request POST \
--url https://api.riskportal.activeviam.com/api/Portfolios/CreatePortfolio \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json-patch+json' \
--data '
{
"$type": "Derivitec.Web.Core.Portfolios.ApiPortfolioCreateRequest, Derivitec.Web.Core",
"portfolio_name": "Example portfolio",
"description": "<string>"
}
'import requests
url = "https://api.riskportal.activeviam.com/api/Portfolios/CreatePortfolio"
payload = {
"$type": "Derivitec.Web.Core.Portfolios.ApiPortfolioCreateRequest, Derivitec.Web.Core",
"portfolio_name": "Example portfolio",
"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.Portfolios.ApiPortfolioCreateRequest, Derivitec.Web.Core',
portfolio_name: 'Example portfolio',
description: '<string>'
})
};
fetch('https://api.riskportal.activeviam.com/api/Portfolios/CreatePortfolio', 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/Portfolios/CreatePortfolio",
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.Portfolios.ApiPortfolioCreateRequest, Derivitec.Web.Core',
'portfolio_name' => 'Example portfolio',
'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/Portfolios/CreatePortfolio"
payload := strings.NewReader("{\n \"$type\": \"Derivitec.Web.Core.Portfolios.ApiPortfolioCreateRequest, Derivitec.Web.Core\",\n \"portfolio_name\": \"Example portfolio\",\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/Portfolios/CreatePortfolio")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json-patch+json")
.body("{\n \"$type\": \"Derivitec.Web.Core.Portfolios.ApiPortfolioCreateRequest, Derivitec.Web.Core\",\n \"portfolio_name\": \"Example portfolio\",\n \"description\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.riskportal.activeviam.com/api/Portfolios/CreatePortfolio")
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.Portfolios.ApiPortfolioCreateRequest, Derivitec.Web.Core\",\n \"portfolio_name\": \"Example portfolio\",\n \"description\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"$type": "Derivitec.Web.Core.Portfolios.ApiPortfolioCreateResponse, 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 portfolio.
Creates an active Derivitec portfolio and makes the caller its owner. Name and description are required, and the name cannot duplicate another portfolio already linked to the caller. Creation completes before returning in the normal result envelope.
curl --request POST \
--url https://api.riskportal.activeviam.com/api/Portfolios/CreatePortfolio \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json-patch+json' \
--data '
{
"$type": "Derivitec.Web.Core.Portfolios.ApiPortfolioCreateRequest, Derivitec.Web.Core",
"portfolio_name": "Example portfolio",
"description": "<string>"
}
'import requests
url = "https://api.riskportal.activeviam.com/api/Portfolios/CreatePortfolio"
payload = {
"$type": "Derivitec.Web.Core.Portfolios.ApiPortfolioCreateRequest, Derivitec.Web.Core",
"portfolio_name": "Example portfolio",
"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.Portfolios.ApiPortfolioCreateRequest, Derivitec.Web.Core',
portfolio_name: 'Example portfolio',
description: '<string>'
})
};
fetch('https://api.riskportal.activeviam.com/api/Portfolios/CreatePortfolio', 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/Portfolios/CreatePortfolio",
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.Portfolios.ApiPortfolioCreateRequest, Derivitec.Web.Core',
'portfolio_name' => 'Example portfolio',
'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/Portfolios/CreatePortfolio"
payload := strings.NewReader("{\n \"$type\": \"Derivitec.Web.Core.Portfolios.ApiPortfolioCreateRequest, Derivitec.Web.Core\",\n \"portfolio_name\": \"Example portfolio\",\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/Portfolios/CreatePortfolio")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json-patch+json")
.body("{\n \"$type\": \"Derivitec.Web.Core.Portfolios.ApiPortfolioCreateRequest, Derivitec.Web.Core\",\n \"portfolio_name\": \"Example portfolio\",\n \"description\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.riskportal.activeviam.com/api/Portfolios/CreatePortfolio")
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.Portfolios.ApiPortfolioCreateRequest, Derivitec.Web.Core\",\n \"portfolio_name\": \"Example portfolio\",\n \"description\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"$type": "Derivitec.Web.Core.Portfolios.ApiPortfolioCreateResponse, 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 PortfolioName and Description. This request declares no explicit API length bounds.
Name and description used to create a Derivitec-managed portfolio.
Derivitec.Web.Core.Portfolios.ApiPortfolioCreateRequest, Derivitec.Web.Core Name for the new portfolio; it must be non-empty and not duplicate a portfolio linked to the caller.
"Example portfolio"
Non-empty client-visible description for the new portfolio.
Response
Created
Outcome of creating a portfolio.
Derivitec.Web.Core.Portfolios.ApiPortfolioCreateResponse, 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?