POST v1/EntityPortfolios/Create
Creates an entity portfolio.
Request Information
Parameters
| Name | Type | Description | Additional information |
|---|---|---|---|
| request | EntityPortfoliosCreateRequest | Container for the EntityPortfoliosCreateRequest input parameters. See parameter details below. |
Define this parameter in the request body. |
Request body formats
application/json, text/json
Sample:
{
"name": "sample string 1",
"insiteId": "sample string 2",
"id": 3,
"list": [
{
"id": "sample string 1",
"cashWeight": 1.0
},
{
"id": "sample string 1",
"cashWeight": 1.0
},
{
"id": "sample string 1",
"cashWeight": 1.0
}
],
"sdkVersion": "sample string 4"
}
application/xml, text/xml
Sample:
<EntityPortfoliosCreateRequest xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
<SdkVersion>sample string 4</SdkVersion>
<Id>3</Id>
<InsiteId>sample string 2</InsiteId>
<List>
<EntityPortfolioInput>
<CashWeight>1</CashWeight>
<Id>sample string 1</Id>
</EntityPortfolioInput>
<EntityPortfolioInput>
<CashWeight>1</CashWeight>
<Id>sample string 1</Id>
</EntityPortfolioInput>
<EntityPortfolioInput>
<CashWeight>1</CashWeight>
<Id>sample string 1</Id>
</EntityPortfolioInput>
</List>
<Name>sample string 1</Name>
</EntityPortfoliosCreateRequest>
Parameter Information
Parameter Name: request
| Property | Type | Description |
|---|---|---|
| Name | String | The name of the new portfolio. |
| InsiteId | String | Optional - Insite Id. |
| Id | Int32 | Optional - Portfolio to copy entities from. "List" parameter will be ignored if "Id" is used. |
| List | List`1 | Optional - The list of entities to include in the new portfolio. Exposures can be passed in with the list of entities through the EntityPortfolioInput class. |
| SdkVersion | String | If the client is using the SDK, the version number will be passed along with the request. This field is optional. |
Response Information
Response body formats
application/json, text/json
Sample:
{
"id": 1,
"itemsAdded": 2,
"errorOccurred": false,
"errorMessages": [
"sample string 1",
"sample string 2",
"sample string 3"
],
"request": {
"name": "sample string 1",
"insiteId": "sample string 2",
"id": 3,
"list": [
{
"id": "sample string 1",
"cashWeight": 1.0
},
{
"id": "sample string 1",
"cashWeight": 1.0
},
{
"id": "sample string 1",
"cashWeight": 1.0
}
],
"sdkVersion": "sample string 4"
}
}
application/xml, text/xml
Sample:
<EntityPortfoliosCreateResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
<ErrorMessages xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d2p1:string>sample string 1</d2p1:string>
<d2p1:string>sample string 2</d2p1:string>
<d2p1:string>sample string 3</d2p1:string>
</ErrorMessages>
<ErrorOccurred>false</ErrorOccurred>
<Request>
<SdkVersion>sample string 4</SdkVersion>
<Id>3</Id>
<InsiteId>sample string 2</InsiteId>
<List>
<EntityPortfolioInput>
<CashWeight>1</CashWeight>
<Id>sample string 1</Id>
</EntityPortfolioInput>
<EntityPortfolioInput>
<CashWeight>1</CashWeight>
<Id>sample string 1</Id>
</EntityPortfolioInput>
<EntityPortfolioInput>
<CashWeight>1</CashWeight>
<Id>sample string 1</Id>
</EntityPortfolioInput>
</List>
<Name>sample string 1</Name>
</Request>
<Id>1</Id>
<ItemsAdded>2</ItemsAdded>
</EntityPortfoliosCreateResponse>