POST api/BookingTypes/{bookingTypeIdentity}/Rules

Request Information

URI Parameters

NameDescriptionTypeAdditional information
bookingTypeIdentity

string

Required

Body Parameters

BookingRule
NameDescriptionTypeAdditional information
Identity

globally unique identifier

None.

RuleType

BookingRuleType

None.

Properties

Collection of BookingRuleDatum

None.

AppliesTo

Collection of NamedObject

None.

RunOnCreate

boolean

None.

RunOnUpdate

boolean

None.

RunOnDelete

boolean

None.

FailureMessage

string

None.

AdminsExempt

boolean

None.

BookingManagersExempt

boolean

None.

ApproversExempt

boolean

None.

PermissionGroupsExempt

boolean

None.

ExemptPermissionGroups

Collection of NamedObject

None.

Request Formats

application/json, text/json

Sample:
{
  "Identity": "b0b71714-a3ad-4e18-b2b4-56257db9dda7",
  "RuleType": {
    "Properties": [
      {
        "Name": "sample string 1",
        "ValueType": "sample string 2",
        "ValueChoices": [
          "sample string 1",
          "sample string 2"
        ],
        "Identity": "8273387b-d2a5-4418-a77a-21c851f98681",
        "StartRange": true,
        "EndRange": true
      },
      {
        "Name": "sample string 1",
        "ValueType": "sample string 2",
        "ValueChoices": [
          "sample string 1",
          "sample string 2"
        ],
        "Identity": "8273387b-d2a5-4418-a77a-21c851f98681",
        "StartRange": true,
        "EndRange": true
      }
    ],
    "RunOnUpdateAsCreate": true,
    "RunOnCreateType": 0,
    "RunOnUpdateType": 0,
    "RunOnDeleteType": 0,
    "RuleGroupRequiresOneValidOnly": true,
    "Identity": "b6f9b017-cc14-4074-ae19-43969859a355",
    "Name": "sample string 4"
  },
  "Properties": [
    {
      "Value": {},
      "ValueType": "sample string 2",
      "ValueChoices": [
        "sample string 1",
        "sample string 2"
      ],
      "StartRange": true,
      "EndRange": true,
      "IsObsolete": true,
      "Identity": "974cb547-67ab-4618-8029-6a53403d9593",
      "Name": "sample string 7"
    },
    {
      "Value": {},
      "ValueType": "sample string 2",
      "ValueChoices": [
        "sample string 1",
        "sample string 2"
      ],
      "StartRange": true,
      "EndRange": true,
      "IsObsolete": true,
      "Identity": "974cb547-67ab-4618-8029-6a53403d9593",
      "Name": "sample string 7"
    }
  ],
  "AppliesTo": [
    {
      "Identity": "efb325e8-fd7a-4315-b5eb-4c2cb9a830aa",
      "Name": "sample string 2"
    },
    {
      "Identity": "efb325e8-fd7a-4315-b5eb-4c2cb9a830aa",
      "Name": "sample string 2"
    }
  ],
  "RunOnCreate": true,
  "RunOnUpdate": true,
  "RunOnDelete": true,
  "FailureMessage": "sample string 5",
  "AdminsExempt": true,
  "BookingManagersExempt": true,
  "ApproversExempt": true,
  "PermissionGroupsExempt": true,
  "ExemptPermissionGroups": [
    {
      "Identity": "efb325e8-fd7a-4315-b5eb-4c2cb9a830aa",
      "Name": "sample string 2"
    },
    {
      "Identity": "efb325e8-fd7a-4315-b5eb-4c2cb9a830aa",
      "Name": "sample string 2"
    }
  ]
}

application/xml, text/xml

Sample:
<BookingRule xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Scientia.Platform.API.Model">
  <AdminsExempt>true</AdminsExempt>
  <AppliesTo xmlns:d2p1="http://schemas.datacontract.org/2004/07/Scientia.Platform.Library.Security">
    <d2p1:NamedObject>
      <d2p1:Identity>efb325e8-fd7a-4315-b5eb-4c2cb9a830aa</d2p1:Identity>
      <d2p1:Name>sample string 2</d2p1:Name>
    </d2p1:NamedObject>
    <d2p1:NamedObject>
      <d2p1:Identity>efb325e8-fd7a-4315-b5eb-4c2cb9a830aa</d2p1:Identity>
      <d2p1:Name>sample string 2</d2p1:Name>
    </d2p1:NamedObject>
  </AppliesTo>
  <ApproversExempt>true</ApproversExempt>
  <BookingManagersExempt>true</BookingManagersExempt>
  <ExemptPermissionGroups xmlns:d2p1="http://schemas.datacontract.org/2004/07/Scientia.Platform.Library.Security">
    <d2p1:NamedObject>
      <d2p1:Identity>efb325e8-fd7a-4315-b5eb-4c2cb9a830aa</d2p1:Identity>
      <d2p1:Name>sample string 2</d2p1:Name>
    </d2p1:NamedObject>
    <d2p1:NamedObject>
      <d2p1:Identity>efb325e8-fd7a-4315-b5eb-4c2cb9a830aa</d2p1:Identity>
      <d2p1:Name>sample string 2</d2p1:Name>
    </d2p1:NamedObject>
  </ExemptPermissionGroups>
  <FailureMessage>sample string 5</FailureMessage>
  <Identity>b0b71714-a3ad-4e18-b2b4-56257db9dda7</Identity>
  <PermissionGroupsExempt>true</PermissionGroupsExempt>
  <Properties>
    <BookingRuleDatum>
      <Identity xmlns="http://schemas.datacontract.org/2004/07/Scientia.Platform.Library.Security">974cb547-67ab-4618-8029-6a53403d9593</Identity>
      <Name xmlns="http://schemas.datacontract.org/2004/07/Scientia.Platform.Library.Security">sample string 7</Name>
      <EndRange>true</EndRange>
      <IsObsolete>true</IsObsolete>
      <StartRange>true</StartRange>
      <Value />
      <ValueChoices xmlns:d4p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
        <d4p1:string>sample string 1</d4p1:string>
        <d4p1:string>sample string 2</d4p1:string>
      </ValueChoices>
      <ValueType>sample string 2</ValueType>
    </BookingRuleDatum>
    <BookingRuleDatum>
      <Identity xmlns="http://schemas.datacontract.org/2004/07/Scientia.Platform.Library.Security">974cb547-67ab-4618-8029-6a53403d9593</Identity>
      <Name xmlns="http://schemas.datacontract.org/2004/07/Scientia.Platform.Library.Security">sample string 7</Name>
      <EndRange>true</EndRange>
      <IsObsolete>true</IsObsolete>
      <StartRange>true</StartRange>
      <Value />
      <ValueChoices xmlns:d4p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
        <d4p1:string>sample string 1</d4p1:string>
        <d4p1:string>sample string 2</d4p1:string>
      </ValueChoices>
      <ValueType>sample string 2</ValueType>
    </BookingRuleDatum>
  </Properties>
  <RuleType>
    <Identity xmlns="http://schemas.datacontract.org/2004/07/Scientia.Platform.Library.Security">b6f9b017-cc14-4074-ae19-43969859a355</Identity>
    <Name xmlns="http://schemas.datacontract.org/2004/07/Scientia.Platform.Library.Security">sample string 4</Name>
    <Properties>
      <BookingRuleTypeProperty>
        <EndRange>true</EndRange>
        <Identity>8273387b-d2a5-4418-a77a-21c851f98681</Identity>
        <Name>sample string 1</Name>
        <StartRange>true</StartRange>
        <ValueChoices xmlns:d5p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
          <d5p1:string>sample string 1</d5p1:string>
          <d5p1:string>sample string 2</d5p1:string>
        </ValueChoices>
        <ValueType>sample string 2</ValueType>
      </BookingRuleTypeProperty>
      <BookingRuleTypeProperty>
        <EndRange>true</EndRange>
        <Identity>8273387b-d2a5-4418-a77a-21c851f98681</Identity>
        <Name>sample string 1</Name>
        <StartRange>true</StartRange>
        <ValueChoices xmlns:d5p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
          <d5p1:string>sample string 1</d5p1:string>
          <d5p1:string>sample string 2</d5p1:string>
        </ValueChoices>
        <ValueType>sample string 2</ValueType>
      </BookingRuleTypeProperty>
    </Properties>
    <RuleGroupRequiresOneValidOnly>true</RuleGroupRequiresOneValidOnly>
    <RunOnCreateType>Never</RunOnCreateType>
    <RunOnDeleteType>Never</RunOnDeleteType>
    <RunOnUpdateAsCreate>true</RunOnUpdateAsCreate>
    <RunOnUpdateType>Never</RunOnUpdateType>
  </RuleType>
  <RunOnCreate>true</RunOnCreate>
  <RunOnDelete>true</RunOnDelete>
  <RunOnUpdate>true</RunOnUpdate>
</BookingRule>

application/x-www-form-urlencoded

Sample:

Sample not available.

Response Information

Resource Description

BookingRule
NameDescriptionTypeAdditional information
Identity

globally unique identifier

None.

RuleType

BookingRuleType

None.

Properties

Collection of BookingRuleDatum

None.

AppliesTo

Collection of NamedObject

None.

RunOnCreate

boolean

None.

RunOnUpdate

boolean

None.

RunOnDelete

boolean

None.

FailureMessage

string

None.

AdminsExempt

boolean

None.

BookingManagersExempt

boolean

None.

ApproversExempt

boolean

None.

PermissionGroupsExempt

boolean

None.

ExemptPermissionGroups

Collection of NamedObject

None.

Response Formats

application/json, text/json

Sample:
{
  "Identity": "9cdf9077-214d-4e5c-b8ff-5e936f1d8566",
  "RuleType": {
    "Properties": [
      {
        "Name": "sample string 1",
        "ValueType": "sample string 2",
        "ValueChoices": [
          "sample string 1",
          "sample string 2"
        ],
        "Identity": "0cd761e3-f3e8-40e3-9a8c-99c3066aab46",
        "StartRange": true,
        "EndRange": true
      },
      {
        "Name": "sample string 1",
        "ValueType": "sample string 2",
        "ValueChoices": [
          "sample string 1",
          "sample string 2"
        ],
        "Identity": "0cd761e3-f3e8-40e3-9a8c-99c3066aab46",
        "StartRange": true,
        "EndRange": true
      }
    ],
    "RunOnUpdateAsCreate": true,
    "RunOnCreateType": 0,
    "RunOnUpdateType": 0,
    "RunOnDeleteType": 0,
    "RuleGroupRequiresOneValidOnly": true,
    "Identity": "1f31f124-6d27-428f-8e78-1ada6d498e6a",
    "Name": "sample string 4"
  },
  "Properties": [
    {
      "Value": {},
      "ValueType": "sample string 2",
      "ValueChoices": [
        "sample string 1",
        "sample string 2"
      ],
      "StartRange": true,
      "EndRange": true,
      "IsObsolete": true,
      "Identity": "786f1884-81c7-4809-9d54-a681301c5eb2",
      "Name": "sample string 7"
    },
    {
      "Value": {},
      "ValueType": "sample string 2",
      "ValueChoices": [
        "sample string 1",
        "sample string 2"
      ],
      "StartRange": true,
      "EndRange": true,
      "IsObsolete": true,
      "Identity": "786f1884-81c7-4809-9d54-a681301c5eb2",
      "Name": "sample string 7"
    }
  ],
  "AppliesTo": [
    {
      "Identity": "1b9d3d10-0387-42b4-9795-8638b10c5953",
      "Name": "sample string 2"
    },
    {
      "Identity": "1b9d3d10-0387-42b4-9795-8638b10c5953",
      "Name": "sample string 2"
    }
  ],
  "RunOnCreate": true,
  "RunOnUpdate": true,
  "RunOnDelete": true,
  "FailureMessage": "sample string 5",
  "AdminsExempt": true,
  "BookingManagersExempt": true,
  "ApproversExempt": true,
  "PermissionGroupsExempt": true,
  "ExemptPermissionGroups": [
    {
      "Identity": "1b9d3d10-0387-42b4-9795-8638b10c5953",
      "Name": "sample string 2"
    },
    {
      "Identity": "1b9d3d10-0387-42b4-9795-8638b10c5953",
      "Name": "sample string 2"
    }
  ]
}

application/xml, text/xml

Sample:
<BookingRule xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Scientia.Platform.API.Model">
  <AdminsExempt>true</AdminsExempt>
  <AppliesTo xmlns:d2p1="http://schemas.datacontract.org/2004/07/Scientia.Platform.Library.Security">
    <d2p1:NamedObject>
      <d2p1:Identity>1b9d3d10-0387-42b4-9795-8638b10c5953</d2p1:Identity>
      <d2p1:Name>sample string 2</d2p1:Name>
    </d2p1:NamedObject>
    <d2p1:NamedObject>
      <d2p1:Identity>1b9d3d10-0387-42b4-9795-8638b10c5953</d2p1:Identity>
      <d2p1:Name>sample string 2</d2p1:Name>
    </d2p1:NamedObject>
  </AppliesTo>
  <ApproversExempt>true</ApproversExempt>
  <BookingManagersExempt>true</BookingManagersExempt>
  <ExemptPermissionGroups xmlns:d2p1="http://schemas.datacontract.org/2004/07/Scientia.Platform.Library.Security">
    <d2p1:NamedObject>
      <d2p1:Identity>1b9d3d10-0387-42b4-9795-8638b10c5953</d2p1:Identity>
      <d2p1:Name>sample string 2</d2p1:Name>
    </d2p1:NamedObject>
    <d2p1:NamedObject>
      <d2p1:Identity>1b9d3d10-0387-42b4-9795-8638b10c5953</d2p1:Identity>
      <d2p1:Name>sample string 2</d2p1:Name>
    </d2p1:NamedObject>
  </ExemptPermissionGroups>
  <FailureMessage>sample string 5</FailureMessage>
  <Identity>9cdf9077-214d-4e5c-b8ff-5e936f1d8566</Identity>
  <PermissionGroupsExempt>true</PermissionGroupsExempt>
  <Properties>
    <BookingRuleDatum>
      <Identity xmlns="http://schemas.datacontract.org/2004/07/Scientia.Platform.Library.Security">786f1884-81c7-4809-9d54-a681301c5eb2</Identity>
      <Name xmlns="http://schemas.datacontract.org/2004/07/Scientia.Platform.Library.Security">sample string 7</Name>
      <EndRange>true</EndRange>
      <IsObsolete>true</IsObsolete>
      <StartRange>true</StartRange>
      <Value />
      <ValueChoices xmlns:d4p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
        <d4p1:string>sample string 1</d4p1:string>
        <d4p1:string>sample string 2</d4p1:string>
      </ValueChoices>
      <ValueType>sample string 2</ValueType>
    </BookingRuleDatum>
    <BookingRuleDatum>
      <Identity xmlns="http://schemas.datacontract.org/2004/07/Scientia.Platform.Library.Security">786f1884-81c7-4809-9d54-a681301c5eb2</Identity>
      <Name xmlns="http://schemas.datacontract.org/2004/07/Scientia.Platform.Library.Security">sample string 7</Name>
      <EndRange>true</EndRange>
      <IsObsolete>true</IsObsolete>
      <StartRange>true</StartRange>
      <Value />
      <ValueChoices xmlns:d4p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
        <d4p1:string>sample string 1</d4p1:string>
        <d4p1:string>sample string 2</d4p1:string>
      </ValueChoices>
      <ValueType>sample string 2</ValueType>
    </BookingRuleDatum>
  </Properties>
  <RuleType>
    <Identity xmlns="http://schemas.datacontract.org/2004/07/Scientia.Platform.Library.Security">1f31f124-6d27-428f-8e78-1ada6d498e6a</Identity>
    <Name xmlns="http://schemas.datacontract.org/2004/07/Scientia.Platform.Library.Security">sample string 4</Name>
    <Properties>
      <BookingRuleTypeProperty>
        <EndRange>true</EndRange>
        <Identity>0cd761e3-f3e8-40e3-9a8c-99c3066aab46</Identity>
        <Name>sample string 1</Name>
        <StartRange>true</StartRange>
        <ValueChoices xmlns:d5p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
          <d5p1:string>sample string 1</d5p1:string>
          <d5p1:string>sample string 2</d5p1:string>
        </ValueChoices>
        <ValueType>sample string 2</ValueType>
      </BookingRuleTypeProperty>
      <BookingRuleTypeProperty>
        <EndRange>true</EndRange>
        <Identity>0cd761e3-f3e8-40e3-9a8c-99c3066aab46</Identity>
        <Name>sample string 1</Name>
        <StartRange>true</StartRange>
        <ValueChoices xmlns:d5p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
          <d5p1:string>sample string 1</d5p1:string>
          <d5p1:string>sample string 2</d5p1:string>
        </ValueChoices>
        <ValueType>sample string 2</ValueType>
      </BookingRuleTypeProperty>
    </Properties>
    <RuleGroupRequiresOneValidOnly>true</RuleGroupRequiresOneValidOnly>
    <RunOnCreateType>Never</RunOnCreateType>
    <RunOnDeleteType>Never</RunOnDeleteType>
    <RunOnUpdateAsCreate>true</RunOnUpdateAsCreate>
    <RunOnUpdateType>Never</RunOnUpdateType>
  </RuleType>
  <RunOnCreate>true</RunOnCreate>
  <RunOnDelete>true</RunOnDelete>
  <RunOnUpdate>true</RunOnUpdate>
</BookingRule>