POST api/Leis/Adicionar

Request Information

URI Parameters

None.

Body Parameters

Leis
NameDescriptionTypeAdditional information
Titulo

string

None.

Descicao

string

None.

UrlDownload

string

None.

Deputado

Deputado

None.

ID

integer

None.

Request Formats

application/json, text/json

Sample:
{
  "Titulo": "sample string 1",
  "Descicao": "sample string 2",
  "UrlDownload": "sample string 3",
  "Deputado": {
    "Foto": "sample string 1",
    "Email": "sample string 2",
    "Filiacao": "sample string 3",
    "Telefone": "sample string 4",
    "NomeCivil": "sample string 5",
    "Descricao": "sample string 6",
    "Nascimento": "2019-10-17T10:00:32.5168009-04:00",
    "NomeParlamentar": "sample string 8",
    "MidiasSociais": [
      "sample string 1",
      "sample string 2"
    ],
    "ID": 9
  },
  "ID": 4
}

application/xml, text/xml

Sample:
<Leis xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/ChatFidelity.Models">
  <ID>4</ID>
  <Deputado>
    <ID>9</ID>
    <Descricao>sample string 6</Descricao>
    <Email>sample string 2</Email>
    <Filiacao>sample string 3</Filiacao>
    <Foto>sample string 1</Foto>
    <MidiasSociais xmlns:d3p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
      <d3p1:string>sample string 1</d3p1:string>
      <d3p1:string>sample string 2</d3p1:string>
    </MidiasSociais>
    <Nascimento>2019-10-17T10:00:32.5168009-04:00</Nascimento>
    <NomeCivil>sample string 5</NomeCivil>
    <NomeParlamentar>sample string 8</NomeParlamentar>
    <Telefone>sample string 4</Telefone>
  </Deputado>
  <Descicao>sample string 2</Descicao>
  <Titulo>sample string 1</Titulo>
  <UrlDownload>sample string 3</UrlDownload>
</Leis>

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 'Leis'.

Response Information

Resource Description

Collection of Leis
NameDescriptionTypeAdditional information
Titulo

string

None.

Descicao

string

None.

UrlDownload

string

None.

Deputado

Deputado

None.

ID

integer

None.

Response Formats

application/json, text/json

Sample:
[
  {
    "Titulo": "sample string 1",
    "Descicao": "sample string 2",
    "UrlDownload": "sample string 3",
    "Deputado": {
      "Foto": "sample string 1",
      "Email": "sample string 2",
      "Filiacao": "sample string 3",
      "Telefone": "sample string 4",
      "NomeCivil": "sample string 5",
      "Descricao": "sample string 6",
      "Nascimento": "2019-10-17T10:00:32.5438159-04:00",
      "NomeParlamentar": "sample string 8",
      "MidiasSociais": [
        "sample string 1",
        "sample string 2"
      ],
      "ID": 9
    },
    "ID": 4
  },
  {
    "Titulo": "sample string 1",
    "Descicao": "sample string 2",
    "UrlDownload": "sample string 3",
    "Deputado": {
      "Foto": "sample string 1",
      "Email": "sample string 2",
      "Filiacao": "sample string 3",
      "Telefone": "sample string 4",
      "NomeCivil": "sample string 5",
      "Descricao": "sample string 6",
      "Nascimento": "2019-10-17T10:00:32.5438159-04:00",
      "NomeParlamentar": "sample string 8",
      "MidiasSociais": [
        "sample string 1",
        "sample string 2"
      ],
      "ID": 9
    },
    "ID": 4
  }
]

application/xml, text/xml

Sample:
<ArrayOfLeis xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/ChatFidelity.Models">
  <Leis>
    <ID>4</ID>
    <Deputado>
      <ID>9</ID>
      <Descricao>sample string 6</Descricao>
      <Email>sample string 2</Email>
      <Filiacao>sample string 3</Filiacao>
      <Foto>sample string 1</Foto>
      <MidiasSociais xmlns:d4p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
        <d4p1:string>sample string 1</d4p1:string>
        <d4p1:string>sample string 2</d4p1:string>
      </MidiasSociais>
      <Nascimento>2019-10-17T10:00:32.5438159-04:00</Nascimento>
      <NomeCivil>sample string 5</NomeCivil>
      <NomeParlamentar>sample string 8</NomeParlamentar>
      <Telefone>sample string 4</Telefone>
    </Deputado>
    <Descicao>sample string 2</Descicao>
    <Titulo>sample string 1</Titulo>
    <UrlDownload>sample string 3</UrlDownload>
  </Leis>
  <Leis>
    <ID>4</ID>
    <Deputado>
      <ID>9</ID>
      <Descricao>sample string 6</Descricao>
      <Email>sample string 2</Email>
      <Filiacao>sample string 3</Filiacao>
      <Foto>sample string 1</Foto>
      <MidiasSociais xmlns:d4p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
        <d4p1:string>sample string 1</d4p1:string>
        <d4p1:string>sample string 2</d4p1:string>
      </MidiasSociais>
      <Nascimento>2019-10-17T10:00:32.5438159-04:00</Nascimento>
      <NomeCivil>sample string 5</NomeCivil>
      <NomeParlamentar>sample string 8</NomeParlamentar>
      <Telefone>sample string 4</Telefone>
    </Deputado>
    <Descicao>sample string 2</Descicao>
    <Titulo>sample string 1</Titulo>
    <UrlDownload>sample string 3</UrlDownload>
  </Leis>
</ArrayOfLeis>