POST Role/SaveRole

Request Information

URI Parameters

None.

Body Parameters

RoleViewModel
NameDescriptionTypeAdditional information
SelectedRole

IdentityRole

None.

SelectedUserIds

Collection of string

None.

AvailableUsers

Collection of ApplicationUser

None.

IsNewRole

boolean

None.

Request Formats

application/json, text/json

Sample:
{
  "SelectedRole": {
    "Users": [],
    "Id": "sample string 1",
    "Name": "sample string 2"
  },
  "SelectedUserIds": [
    "sample string 1",
    "sample string 2"
  ],
  "AvailableUsers": [
    {
      "LoginType": 1,
      "LoginKey": 2,
      "DefaultPortalKey": 3,
      "AssignedRoleNames": [
        "sample string 1",
        "sample string 2"
      ],
      "ContactName": "sample string 4",
      "ForcePasswordReset": true,
      "LastLoginDate": "2025-01-09T14:02:49.2483781-06:00",
      "RegistrationDate": "2025-01-09T14:02:49.2483781-06:00",
      "Email": "sample string 6",
      "EmailConfirmed": true,
      "PasswordHash": "sample string 8",
      "SecurityStamp": "sample string 9",
      "PhoneNumber": "sample string 10",
      "PhoneNumberConfirmed": true,
      "TwoFactorEnabled": true,
      "LockoutEndDateUtc": "2025-01-09T14:02:49.2483781-06:00",
      "LockoutEnabled": true,
      "AccessFailedCount": 14,
      "Roles": [],
      "Claims": [],
      "Logins": [],
      "Id": "sample string 15",
      "UserName": "sample string 16"
    },
    {
      "LoginType": 1,
      "LoginKey": 2,
      "DefaultPortalKey": 3,
      "AssignedRoleNames": [
        "sample string 1",
        "sample string 2"
      ],
      "ContactName": "sample string 4",
      "ForcePasswordReset": true,
      "LastLoginDate": "2025-01-09T14:02:49.2483781-06:00",
      "RegistrationDate": "2025-01-09T14:02:49.2483781-06:00",
      "Email": "sample string 6",
      "EmailConfirmed": true,
      "PasswordHash": "sample string 8",
      "SecurityStamp": "sample string 9",
      "PhoneNumber": "sample string 10",
      "PhoneNumberConfirmed": true,
      "TwoFactorEnabled": true,
      "LockoutEndDateUtc": "2025-01-09T14:02:49.2483781-06:00",
      "LockoutEnabled": true,
      "AccessFailedCount": 14,
      "Roles": [],
      "Claims": [],
      "Logins": [],
      "Id": "sample string 15",
      "UserName": "sample string 16"
    }
  ],
  "IsNewRole": true
}

application/xml, text/xml

Sample:
<RoleViewModel xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/VHCSAPIModels.Models">
  <AvailableUsers>
    <ApplicationUser>
      <AccessFailedCount xmlns="http://schemas.datacontract.org/2004/07/Microsoft.AspNet.Identity.EntityFramework">14</AccessFailedCount>
      <Email xmlns="http://schemas.datacontract.org/2004/07/Microsoft.AspNet.Identity.EntityFramework">sample string 6</Email>
      <EmailConfirmed xmlns="http://schemas.datacontract.org/2004/07/Microsoft.AspNet.Identity.EntityFramework">true</EmailConfirmed>
      <Id xmlns="http://schemas.datacontract.org/2004/07/Microsoft.AspNet.Identity.EntityFramework">sample string 15</Id>
      <LockoutEnabled xmlns="http://schemas.datacontract.org/2004/07/Microsoft.AspNet.Identity.EntityFramework">true</LockoutEnabled>
      <LockoutEndDateUtc xmlns="http://schemas.datacontract.org/2004/07/Microsoft.AspNet.Identity.EntityFramework">2025-01-09T14:02:49.2483781-06:00</LockoutEndDateUtc>
      <PasswordHash xmlns="http://schemas.datacontract.org/2004/07/Microsoft.AspNet.Identity.EntityFramework">sample string 8</PasswordHash>
      <PhoneNumber xmlns="http://schemas.datacontract.org/2004/07/Microsoft.AspNet.Identity.EntityFramework">sample string 10</PhoneNumber>
      <PhoneNumberConfirmed xmlns="http://schemas.datacontract.org/2004/07/Microsoft.AspNet.Identity.EntityFramework">true</PhoneNumberConfirmed>
      <SecurityStamp xmlns="http://schemas.datacontract.org/2004/07/Microsoft.AspNet.Identity.EntityFramework">sample string 9</SecurityStamp>
      <TwoFactorEnabled xmlns="http://schemas.datacontract.org/2004/07/Microsoft.AspNet.Identity.EntityFramework">true</TwoFactorEnabled>
      <UserName xmlns="http://schemas.datacontract.org/2004/07/Microsoft.AspNet.Identity.EntityFramework">sample string 16</UserName>
      <AssignedRoleNames xmlns:d4p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
        <d4p1:string>sample string 1</d4p1:string>
        <d4p1:string>sample string 2</d4p1:string>
      </AssignedRoleNames>
      <ContactName>sample string 4</ContactName>
      <DefaultPortalKey>3</DefaultPortalKey>
      <ForcePasswordReset>true</ForcePasswordReset>
      <LastLoginDate>2025-01-09T14:02:49.2483781-06:00</LastLoginDate>
      <LoginKey>2</LoginKey>
      <LoginType>1</LoginType>
      <RegistrationDate>2025-01-09T14:02:49.2483781-06:00</RegistrationDate>
    </ApplicationUser>
    <ApplicationUser>
      <AccessFailedCount xmlns="http://schemas.datacontract.org/2004/07/Microsoft.AspNet.Identity.EntityFramework">14</AccessFailedCount>
      <Email xmlns="http://schemas.datacontract.org/2004/07/Microsoft.AspNet.Identity.EntityFramework">sample string 6</Email>
      <EmailConfirmed xmlns="http://schemas.datacontract.org/2004/07/Microsoft.AspNet.Identity.EntityFramework">true</EmailConfirmed>
      <Id xmlns="http://schemas.datacontract.org/2004/07/Microsoft.AspNet.Identity.EntityFramework">sample string 15</Id>
      <LockoutEnabled xmlns="http://schemas.datacontract.org/2004/07/Microsoft.AspNet.Identity.EntityFramework">true</LockoutEnabled>
      <LockoutEndDateUtc xmlns="http://schemas.datacontract.org/2004/07/Microsoft.AspNet.Identity.EntityFramework">2025-01-09T14:02:49.2483781-06:00</LockoutEndDateUtc>
      <PasswordHash xmlns="http://schemas.datacontract.org/2004/07/Microsoft.AspNet.Identity.EntityFramework">sample string 8</PasswordHash>
      <PhoneNumber xmlns="http://schemas.datacontract.org/2004/07/Microsoft.AspNet.Identity.EntityFramework">sample string 10</PhoneNumber>
      <PhoneNumberConfirmed xmlns="http://schemas.datacontract.org/2004/07/Microsoft.AspNet.Identity.EntityFramework">true</PhoneNumberConfirmed>
      <SecurityStamp xmlns="http://schemas.datacontract.org/2004/07/Microsoft.AspNet.Identity.EntityFramework">sample string 9</SecurityStamp>
      <TwoFactorEnabled xmlns="http://schemas.datacontract.org/2004/07/Microsoft.AspNet.Identity.EntityFramework">true</TwoFactorEnabled>
      <UserName xmlns="http://schemas.datacontract.org/2004/07/Microsoft.AspNet.Identity.EntityFramework">sample string 16</UserName>
      <AssignedRoleNames xmlns:d4p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
        <d4p1:string>sample string 1</d4p1:string>
        <d4p1:string>sample string 2</d4p1:string>
      </AssignedRoleNames>
      <ContactName>sample string 4</ContactName>
      <DefaultPortalKey>3</DefaultPortalKey>
      <ForcePasswordReset>true</ForcePasswordReset>
      <LastLoginDate>2025-01-09T14:02:49.2483781-06:00</LastLoginDate>
      <LoginKey>2</LoginKey>
      <LoginType>1</LoginType>
      <RegistrationDate>2025-01-09T14:02:49.2483781-06:00</RegistrationDate>
    </ApplicationUser>
  </AvailableUsers>
  <IsNewRole>true</IsNewRole>
  <SelectedRole xmlns:d2p1="http://schemas.datacontract.org/2004/07/Microsoft.AspNet.Identity.EntityFramework">
    <d2p1:Id>sample string 1</d2p1:Id>
    <d2p1:Name>sample string 2</d2p1:Name>
  </SelectedRole>
  <SelectedUserIds xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
    <d2p1:string>sample string 1</d2p1:string>
    <d2p1:string>sample string 2</d2p1:string>
  </SelectedUserIds>
</RoleViewModel>

application/x-www-form-urlencoded

Sample:

Sample not available.

Response Information

Resource Description

IHttpActionResult

None.

Response Formats

application/json, text/json, application/xml, text/xml

Sample:

Sample not available.