POST api/P1UserPreference/preferences

Get P1 user settings

Request Information

URI Parameters

None.

Body Parameters

SubProjectUserPreferenceBinder
NameDescriptionTypeAdditional information
ProjectId

integer

None.

SubProjectId

integer

None.

UserId

integer

None.

PrefIds

Collection of integer

None.

Request Formats

application/json, text/json

Sample:
{
  "ProjectId": 1,
  "SubProjectId": 2,
  "UserId": 3,
  "PrefIds": [
    1,
    2
  ]
}

application/xml, text/xml

Sample:
<SubProjectUserPreferenceBinder xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/TechExcel.DTKService.Model.Binding">
  <PrefIds xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
    <d2p1:int>1</d2p1:int>
    <d2p1:int>2</d2p1:int>
  </PrefIds>
  <ProjectId>1</ProjectId>
  <SubProjectId>2</SubProjectId>
  <UserId>3</UserId>
</SubProjectUserPreferenceBinder>

application/x-www-form-urlencoded

Sample:

Sample not available.

Response Information

Resource Description

Get P1 user settings

API_Data_IEnumerableOfTSubProjectUserPref
NameDescriptionTypeAdditional information
Success

boolean

None.

Error

ErrorInfo

None.

Data

Collection of TSubProjectUserPref

None.

Response Formats

application/json, text/json

Sample:
{
  "Success": true,
  "Error": {
    "ErrorCode": 1,
    "ErrorMessage": "sample string 1"
  },
  "Data": [
    {
      "ProjectId": 1,
      "SubProjectId": 2,
      "UserId": 3,
      "PrefId": 4,
      "PreferenceValue": 1,
      "PreferenceText": "sample string 5",
      "PreferenceMemo": "sample string 6"
    },
    {
      "ProjectId": 1,
      "SubProjectId": 2,
      "UserId": 3,
      "PrefId": 4,
      "PreferenceValue": 1,
      "PreferenceText": "sample string 5",
      "PreferenceMemo": "sample string 6"
    }
  ]
}

application/xml, text/xml

Sample:
<API_Data_ArrayOfTSubProjectUserPref xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/TechExcel.DTKService.Model.Common">
  <Data xmlns:d2p1="http://schemas.datacontract.org/2004/07/TechExcel.DTKService.Model.Project">
    <d2p1:TSubProjectUserPref>
      <d2p1:PrefId>4</d2p1:PrefId>
      <d2p1:PreferenceMemo>sample string 6</d2p1:PreferenceMemo>
      <d2p1:PreferenceText>sample string 5</d2p1:PreferenceText>
      <d2p1:PreferenceValue>1</d2p1:PreferenceValue>
      <d2p1:ProjectId>1</d2p1:ProjectId>
      <d2p1:SubProjectId>2</d2p1:SubProjectId>
      <d2p1:UserId>3</d2p1:UserId>
    </d2p1:TSubProjectUserPref>
    <d2p1:TSubProjectUserPref>
      <d2p1:PrefId>4</d2p1:PrefId>
      <d2p1:PreferenceMemo>sample string 6</d2p1:PreferenceMemo>
      <d2p1:PreferenceText>sample string 5</d2p1:PreferenceText>
      <d2p1:PreferenceValue>1</d2p1:PreferenceValue>
      <d2p1:ProjectId>1</d2p1:ProjectId>
      <d2p1:SubProjectId>2</d2p1:SubProjectId>
      <d2p1:UserId>3</d2p1:UserId>
    </d2p1:TSubProjectUserPref>
  </Data>
  <Error>
    <ErrorCode>1</ErrorCode>
    <ErrorMessage>sample string 1</ErrorMessage>
  </Error>
  <Success>true</Success>
</API_Data_ArrayOfTSubProjectUserPref>