POST api/rightapi/add?siteId={siteId}

Request Information

URI Parameters

NameDescriptionTypeAdditional information
siteId

globally unique identifier

None.

Body Parameters

RightViewModel
NameDescriptionTypeAdditional information
descriptions

Dictionary of string [key] and string [value]

Required

active

boolean

Required

code

string

Required

for_material

boolean

Required

ID

globally unique identifier

None.

type

globally unique identifier

None.

main_right

globally unique identifier

None.

technical_description

string

Required

String length: inclusive between 0 and 100

position

integer

None.

Request Formats

application/json, text/json

Sample:
{
  "descriptions": {
    "sample string 1": "sample string 2",
    "sample string 3": "sample string 4"
  },
  "active": true,
  "code": "sample string 2",
  "for_material": true,
  "id": "51b64d90-faf3-49e7-959d-48875f5fc862",
  "type": "4d06863f-a9ed-4cfc-9675-8bd7af1be380",
  "main_right": "bfb61f3f-b319-4149-9f6f-0f142ae0ccab",
  "technical_description": "sample string 5",
  "position": 1
}

application/xml, text/xml

Sample:
<right xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/EntityModel">
  <ID>51b64d90-faf3-49e7-959d-48875f5fc862</ID>
  <active>true</active>
  <code>sample string 2</code>
  <for_material>true</for_material>
  <main_right>bfb61f3f-b319-4149-9f6f-0f142ae0ccab</main_right>
  <position>1</position>
  <technical_description>sample string 5</technical_description>
  <type>4d06863f-a9ed-4cfc-9675-8bd7af1be380</type>
  <descriptions xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
    <d2p1:KeyValueOfstringstring>
      <d2p1:Key>sample string 1</d2p1:Key>
      <d2p1:Value>sample string 2</d2p1:Value>
    </d2p1:KeyValueOfstringstring>
    <d2p1:KeyValueOfstringstring>
      <d2p1:Key>sample string 3</d2p1:Key>
      <d2p1:Value>sample string 4</d2p1:Value>
    </d2p1:KeyValueOfstringstring>
  </descriptions>
</right>

application/x-www-form-urlencoded

Sample:

Failed to generate the sample for media type 'application/x-www-form-urlencoded'. Cannot use formatter 'JQueryMvcFormUrlEncodedFormatter' to write type 'RightViewModel'.

Response Information

Resource Description

globally unique identifier

Response Formats

application/json, text/json

Sample:
"809fc341-def9-4a01-a40f-77143acd290e"

application/xml, text/xml

Sample:
<guid xmlns="http://schemas.microsoft.com/2003/10/Serialization/">809fc341-def9-4a01-a40f-77143acd290e</guid>