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": "a980cdcd-3fc8-44a2-8645-22d7002af1be",
"Roles": [
"8f98dbda-c51a-4ae8-a136-87e7ffceba51",
"62315442-e081-499b-809b-a0cc64db800c"
],
"Rules": [
{
"Id": "e196c28b-a013-4548-8679-ee436d55512b",
"PreSetRuleType": 2,
"PreSetRuleValue": "sample string 3"
},
{
"Id": "e196c28b-a013-4548-8679-ee436d55512b",
"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>a980cdcd-3fc8-44a2-8645-22d7002af1be</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>8f98dbda-c51a-4ae8-a136-87e7ffceba51</d2p1:guid>
<d2p1:guid>62315442-e081-499b-809b-a0cc64db800c</d2p1:guid>
</Roles>
<Rules xmlns:d2p1="http://schemas.datacontract.org/2004/07/Alice.Dto.Dtos">
<d2p1:PreSetRuleDto>
<d2p1:Id>e196c28b-a013-4548-8679-ee436d55512b</d2p1:Id>
<d2p1:PreSetRuleType>2</d2p1:PreSetRuleType>
<d2p1:PreSetRuleValue>sample string 3</d2p1:PreSetRuleValue>
</d2p1:PreSetRuleDto>
<d2p1:PreSetRuleDto>
<d2p1:Id>e196c28b-a013-4548-8679-ee436d55512b</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>