POST Api/WorkTypes

Dodaje asynchronicznie nowy obiekt WorkType do bazy danych

Request Information

URI Parameters

None.

Body Parameters

nowy obiekt

WorkTypeDto
NameDescriptionTypeAdditional information
WorkTypeId

integer

Required

OrganizationalUnitId

integer

Required

NameTranslations

Collection of TranslationDto

None.

TagsTranslations

Collection of TranslationDto

None.

Request Formats

application/json, text/json

Sample:
{
  "workTypeId": 1,
  "organizationalUnitId": 2,
  "nameTranslations": [
    {
      "languageId": 1,
      "text": "sample string 2"
    },
    {
      "languageId": 1,
      "text": "sample string 2"
    }
  ],
  "tagsTranslations": [
    {
      "languageId": 1,
      "text": "sample string 2"
    },
    {
      "languageId": 1,
      "text": "sample string 2"
    }
  ]
}

multipart/form-data

Sample:
{"workTypeId":1,"organizationalUnitId":2,"nameTranslations":[{"languageId":1,"text":"sample string 2"},{"languageId":1,"text":"sample string 2"}],"tagsTranslations":[{"languageId":1,"text":"sample string 2"},{"languageId":1,"text":"sample string 2"}]}

application/xml, text/xml

Sample:
<WorkTypeDto xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
  <WorkTypeId>1</WorkTypeId>
  <OrganizationalUnitId>2</OrganizationalUnitId>
  <NameTranslations>
    <TranslationDto>
      <LanguageId>1</LanguageId>
      <Text>sample string 2</Text>
    </TranslationDto>
    <TranslationDto>
      <LanguageId>1</LanguageId>
      <Text>sample string 2</Text>
    </TranslationDto>
  </NameTranslations>
  <TagsTranslations>
    <TranslationDto>
      <LanguageId>1</LanguageId>
      <Text>sample string 2</Text>
    </TranslationDto>
    <TranslationDto>
      <LanguageId>1</LanguageId>
      <Text>sample string 2</Text>
    </TranslationDto>
  </TagsTranslations>
</WorkTypeDto>

application/x-www-form-urlencoded

Sample:

Sample not available.

Response Information

Resource Description

identyfikator nowo dodanego obiektu

WorkTypeDto
NameDescriptionTypeAdditional information
WorkTypeId

integer

Required

OrganizationalUnitId

integer

Required

NameTranslations

Collection of TranslationDto

None.

TagsTranslations

Collection of TranslationDto

None.

Response Formats

application/json, text/json

Sample:
{
  "workTypeId": 1,
  "organizationalUnitId": 2,
  "nameTranslations": [
    {
      "languageId": 1,
      "text": "sample string 2"
    },
    {
      "languageId": 1,
      "text": "sample string 2"
    }
  ],
  "tagsTranslations": [
    {
      "languageId": 1,
      "text": "sample string 2"
    },
    {
      "languageId": 1,
      "text": "sample string 2"
    }
  ]
}

multipart/form-data

Sample:
{"workTypeId":1,"organizationalUnitId":2,"nameTranslations":[{"languageId":1,"text":"sample string 2"},{"languageId":1,"text":"sample string 2"}],"tagsTranslations":[{"languageId":1,"text":"sample string 2"},{"languageId":1,"text":"sample string 2"}]}

application/xml, text/xml

Sample:
<WorkTypeDto xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
  <WorkTypeId>1</WorkTypeId>
  <OrganizationalUnitId>2</OrganizationalUnitId>
  <NameTranslations>
    <TranslationDto>
      <LanguageId>1</LanguageId>
      <Text>sample string 2</Text>
    </TranslationDto>
    <TranslationDto>
      <LanguageId>1</LanguageId>
      <Text>sample string 2</Text>
    </TranslationDto>
  </NameTranslations>
  <TagsTranslations>
    <TranslationDto>
      <LanguageId>1</LanguageId>
      <Text>sample string 2</Text>
    </TranslationDto>
    <TranslationDto>
      <LanguageId>1</LanguageId>
      <Text>sample string 2</Text>
    </TranslationDto>
  </TagsTranslations>
</WorkTypeDto>