CoreService

<back to all web services

CreateCollection

Collection - CRUD

Creates a new collection

Requires Authentication
Required role:TenantReader
The following routes are available for this service:
POST/api/collections/Creates a new collection
POST/collections/Creates a new collection
CreateCollection Parameters:
NameParameterData TypeRequiredDescription
TenantNameheaderstringYes
NamebodystringYesThe collections name
DisplayNamebodystringNoThe collections display name
DescriptionbodystringNoA more detailed description for the collection
IsLostAndFoundbodyboolNoDefines the collections where scanned but not deployed resources will be stored
VariablesbodyarrayNo
TagsbodyarrayNo
VariableDto Parameters:
NameParameterData TypeRequiredDescription
NameformstringYes
ValueformstringYesValue in form of a json string (e.g. Number = 1234, String = "foo", Boolean = false, List = [1,2,3,4]). Note: string values need extra quotes
TypeformValueDataTypeNoThe data type of the value property
DescriptionformstringNo
IsInheritedformboolNo
EnvironmentformEnvironments?No
ValueDataType Enum:
String
Number
Boolean
List
Environments Enum:
Lab
Poc
Dev
Test
Int
Uat
Prod
TagDto Parameters:
NameParameterData TypeRequiredDescription
NameformstringYes
ValueformstringNo
IsProtectedformboolNo
DeploymentCollectionDto Parameters:
NameParameterData TypeRequiredDescription
TenantIdformGuidNo
TenantformTenantDtoNo
VariablesformIList<VariableDto>YesA collection scoped list of variables
IsLostAndFoundformboolNoDefines the collection where scanned but not deployed resources will be stored
MonthlyBudgetformdecimal?NoThe monthly cost budget for the whole collection
SendBudgetNotificationMailsformbool?NoWhether to send budget information mails to the collection owners
BudgetWarningThresholdPercentformint?NoA threshold, when to send the first budget warning mail
LinksformIList<LinkDto>Yes
ConfigItemDto Parameters:
NameParameterData TypeRequiredDescription
IdformGuidNo
NameformstringYes
DisplayNameformstringYes
DescriptionformstringNo
ObjectTypeformObjectTypesNo
SelfLinkformstringYes
TagsformIList<TagDto>Yes
PathformIList<PathItemDto>Yes
CreatedformDateTimeNo
CreateUserformstringYes
CreateUserIdformstringYes
ModifiedformDateTimeNo
ModifyUserformstringYes
ModifyUserIdformstringYes
IsDeletedformboolNo
DeletedformDateTime?No
DeleteUserformstringNo
DeleteUserIdformstringNo
LinksformIList<LinkDto>Yes
ObjectTypes Enum:
None
ConfigItem
Tenant
Collection
Resource
ComputeNode
VirtualMachine
PhysicalMachine
Disk
Subnet
IPAddress
Job
JobEvent
FreezePeriod
ResourceGroup
Deployment
ResourceGroupTemplate
DeploymentTemplate
ResourceProvider
GenericResource
Role
Permission
User
PatchingWindow
Update
ReportDefinition
TimeSeries
DataPoint
Action
ActionAssignment
UserNote
PathItemDto Parameters:
NameParameterData TypeRequiredDescription
LabelformstringYes
LinkformstringYes
ObjectTypeformObjectTypesNo
ObjectIdformGuidNo
LinkDto Parameters:
NameParameterData TypeRequiredDescription
CaptionformstringYes
RelformstringYes
HRefformstringYes
MethodformstringYes
TenantDto Parameters:
NameParameterData TypeRequiredDescription
VariablesformIList<VariableDto>YesVariables defined on tenant level
AllowedMailDomainsformIList<string>YesAllowed email domains used for authentication
LicensedModulesformIList<string>YesList of licensed modules for this tenant
DefaultDeploymentLifetimeDaysformshortNoAmount of days until a Deployment expires
MaxDeploymentLifetimeDaysformshortNoMax amount of days until a Deployment expires
SystemUnpatchedWarningDaysformshortNoAmount of days without patching until a unpatched warning is shown
SystemBackupMissingWarningHoursformshortNoAmount of hours without backup until a backup missing warning is shown
StopVulnerableResourceAfterDaysformshortNoAmount of days until a vulnerable resource is getting stopped
DeploymentExpirationWarningDaysformshortNoAmount of days before deployment expiration, which triggers the expiration warning
PatchNotificationDaysformshortNoAmount of days the patch notification is sent out prior to the patch date
UseCustomHostnamesformboolNoUse a pool with your own hostnames (true) or let the hostname be auto generated (false)
RemoveInactiveVulnerabilitiesAfterDaysformshortNoAfter how many days inactive vulnerabilities will be purged from database
LinksformIList<LinkDto>Yes

To override the Content-type in your clients, use the HTTP Accept Header, append the .json suffix or ?format=json

To embed the response in a jsonp callback, append ?callback=myCallback

HTTP + JSON

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

POST /api/collections/ HTTP/1.1 
Host: core.starburst.svc 
Accept: application/json
Content-Type: application/json
Content-Length: length

{"tenantName":"String","name":"String","displayName":"String","description":"String","isLostAndFound":false,"variables":null,"tags":null,"txId":"00000000-0000-0000-0000-000000000000"}
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: length

{"tenantId":"00000000-0000-0000-0000-000000000000","tenant":{"variables":null,"allowedMailDomains":null,"licensedModules":null,"defaultDeploymentLifetimeDays":0,"maxDeploymentLifetimeDays":0,"systemUnpatchedWarningDays":0,"systemBackupMissingWarningHours":0,"stopVulnerableResourceAfterDays":0,"deploymentExpirationWarningDays":0,"patchNotificationDays":0,"useCustomHostnames":false,"removeInactiveVulnerabilitiesAfterDays":0,"links":[{"caption":"Collections","rel":"down","hRef":"/collections/","method":"GET"}],"id":"00000000-0000-0000-0000-000000000000","name":"String","displayName":"String","description":"String","objectType":"None","selfLink":"String","tags":null,"path":null,"created":"0001-01-01T00:00:00.0000000Z","createUser":"String","createUserId":"String","modified":"0001-01-01T00:00:00.0000000Z","modifyUser":"String","modifyUserId":"String","isDeleted":false,"deleted":"0001-01-01T00:00:00.0000000Z","deleteUser":"String","deleteUserId":"String"},"variables":null,"isLostAndFound":false,"monthlyBudget":0,"sendBudgetNotificationMails":false,"budgetWarningThresholdPercent":0,"links":[{"caption":"Index","rel":"up","hRef":"/collections/","method":"GET"},{"caption":"Deployments","rel":"down","hRef":"/deployments?parentId=00000000-0000-0000-0000-000000000000","method":"GET"}],"id":"00000000-0000-0000-0000-000000000000","name":"String","displayName":"String","description":"String","objectType":"None","selfLink":"String","tags":null,"path":null,"created":"0001-01-01T00:00:00.0000000Z","createUser":"String","createUserId":"String","modified":"0001-01-01T00:00:00.0000000Z","modifyUser":"String","modifyUserId":"String","isDeleted":false,"deleted":"0001-01-01T00:00:00.0000000Z","deleteUser":"String","deleteUserId":"String"}