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": "39f48dc2-f14e-47f1-8192-1ae5c4d3ff68",
"Roles": [
"37ad8dbb-e599-400f-815d-8d6231f745e5",
"2824b21d-995e-46b6-8a70-a4364d42a9a2"
],
"Rules": [
{
"Id": "df9c807a-fac7-4e9b-be9a-85f706cf8e66",
"PreSetRuleType": 2,
"PreSetRuleValue": "sample string 3"
},
{
"Id": "df9c807a-fac7-4e9b-be9a-85f706cf8e66",
"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>39f48dc2-f14e-47f1-8192-1ae5c4d3ff68</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>37ad8dbb-e599-400f-815d-8d6231f745e5</d2p1:guid>
<d2p1:guid>2824b21d-995e-46b6-8a70-a4364d42a9a2</d2p1:guid>
</Roles>
<Rules xmlns:d2p1="http://schemas.datacontract.org/2004/07/Alice.Dto.Dtos">
<d2p1:PreSetRuleDto>
<d2p1:Id>df9c807a-fac7-4e9b-be9a-85f706cf8e66</d2p1:Id>
<d2p1:PreSetRuleType>2</d2p1:PreSetRuleType>
<d2p1:PreSetRuleValue>sample string 3</d2p1:PreSetRuleValue>
</d2p1:PreSetRuleDto>
<d2p1:PreSetRuleDto>
<d2p1:Id>df9c807a-fac7-4e9b-be9a-85f706cf8e66</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>