POST api/preset/add
Create new license preset.
Request Information
URI Parameters
None.
Body Parameters
LicensePreSetRequest| Name | Description | Type | Additional information |
|---|---|---|---|
| Name | string |
None. |
|
| SystemName | string |
None. |
|
| Description | string |
None. |
|
| Buffer | integer |
None. |
|
| AccessType | integer |
None. |
|
| LicenseType | integer |
None. |
|
| CategoryId | globally unique identifier |
None. |
|
| Roles | Collection of globally unique identifier |
None. |
|
| Rules | Collection of PreSetRuleDto |
None. |
|
| LicenseDurationModifierDto | LicenseDurationModifierDto |
None. |
Request Formats
application/json, text/json
Sample:
{
"Name": "sample string 1",
"SystemName": "sample string 2",
"Description": "sample string 3",
"Buffer": 1,
"AccessType": 1,
"LicenseType": 1,
"CategoryId": "a0d39540-24fe-4d2a-9182-d9efcf8979e5",
"Roles": [
"ee7ed41b-28d3-4400-b50d-f268c6db5f6b",
"9d2d1344-5b0d-42f0-b457-bcb5f7706020"
],
"Rules": [
{
"Id": "cedf33d4-a2d4-4bd0-85d0-99d5c644a541",
"PreSetRuleType": 2,
"PreSetRuleValue": "sample string 3"
},
{
"Id": "cedf33d4-a2d4-4bd0-85d0-99d5c644a541",
"PreSetRuleType": 2,
"PreSetRuleValue": "sample string 3"
}
],
"LicenseDurationModifierDto": {
"Years": 1,
"Months": 2,
"Weeks": 3,
"Days": 4
}
}
application/xml, text/xml
Sample:
<LicensePreSetRequest xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Alice.Dto.Requests">
<AccessType>1</AccessType>
<Buffer>1</Buffer>
<CategoryId>a0d39540-24fe-4d2a-9182-d9efcf8979e5</CategoryId>
<Description>sample string 3</Description>
<LicenseDurationModifierDto xmlns:d2p1="http://schemas.datacontract.org/2004/07/Alice.Dto.Dtos">
<d2p1:Days>4</d2p1:Days>
<d2p1:Months>2</d2p1:Months>
<d2p1:Weeks>3</d2p1:Weeks>
<d2p1:Years>1</d2p1:Years>
</LicenseDurationModifierDto>
<LicenseType>1</LicenseType>
<Name>sample string 1</Name>
<Roles xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d2p1:guid>ee7ed41b-28d3-4400-b50d-f268c6db5f6b</d2p1:guid>
<d2p1:guid>9d2d1344-5b0d-42f0-b457-bcb5f7706020</d2p1:guid>
</Roles>
<Rules xmlns:d2p1="http://schemas.datacontract.org/2004/07/Alice.Dto.Dtos">
<d2p1:PreSetRuleDto>
<d2p1:Id>cedf33d4-a2d4-4bd0-85d0-99d5c644a541</d2p1:Id>
<d2p1:PreSetRuleType>2</d2p1:PreSetRuleType>
<d2p1:PreSetRuleValue>sample string 3</d2p1:PreSetRuleValue>
</d2p1:PreSetRuleDto>
<d2p1:PreSetRuleDto>
<d2p1:Id>cedf33d4-a2d4-4bd0-85d0-99d5c644a541</d2p1:Id>
<d2p1:PreSetRuleType>2</d2p1:PreSetRuleType>
<d2p1:PreSetRuleValue>sample string 3</d2p1:PreSetRuleValue>
</d2p1:PreSetRuleDto>
</Rules>
<SystemName>sample string 2</SystemName>
</LicensePreSetRequest>
application/x-www-form-urlencoded
Sample:
Sample not available.
Response Information
Resource Description
ValidationResult| Name | Description | Type | Additional information |
|---|---|---|---|
| IsValid | boolean |
None. |
|
| Errors | Collection of ValidationFailure |
None. |
Response Formats
application/json, text/json
Sample:
{
"errors": []
}
application/xml, text/xml
Sample:
<ValidationResult xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/FluentValidation.Results"> <errors /> </ValidationResult>