POST api/News/GetAllNews

Request Information

URI Parameters

None.

Body Parameters

GridAdminRequestDTO
NameDescriptionTypeAdditional information
search

string

None.

sort

string

None.

pageSize

integer

None.

page

integer

None.

descending

boolean

None.

userId

string

None.

Request Formats

application/json, text/json

Sample:
{
  "search": "sample string 1",
  "sort": "sample string 2",
  "pageSize": 3,
  "page": 4,
  "descending": true,
  "userId": "sample string 6"
}

application/xml, text/xml

Sample:
<GridAdminRequestDTO xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Application.DTOs">
  <descending>true</descending>
  <page>4</page>
  <pageSize>3</pageSize>
  <search>sample string 1</search>
  <sort>sample string 2</sort>
  <userId>sample string 6</userId>
</GridAdminRequestDTO>

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

Response Information

Resource Description

ListNewsDTO
NameDescriptionTypeAdditional information
page

integer

None.

total

integer

None.

totalPages

integer

None.

pageSize

string

None.

listNewsDTO

Collection of NewsDTO

None.

Response Formats

application/json

Sample:

An exception has occurred while using the formatter 'JsonMediaTypeFormatter' to generate sample for media type 'application/json'. Exception message: Self referencing loop detected with type 'Application.DTOs.NewsDTO'. Path 'listNewsDTO[0].listNewsRelated'.

text/json

Sample:

An exception has occurred while using the formatter 'JsonMediaTypeFormatter' to generate sample for media type 'text/json'. Exception message: Self referencing loop detected with type 'Application.DTOs.NewsDTO'. Path 'listNewsDTO[0].listNewsRelated'.

application/xml

Sample:

An exception has occurred while using the formatter 'XmlMediaTypeFormatter' to generate sample for media type 'application/xml'. Exception message: Object graph for type 'System.Collections.Generic.List`1[[Application.DTOs.NewsDTO, Application, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]]' contains cycles and cannot be serialized if reference tracking is disabled.

text/xml

Sample:

An exception has occurred while using the formatter 'XmlMediaTypeFormatter' to generate sample for media type 'text/xml'. Exception message: Object graph for type 'System.Collections.Generic.List`1[[Application.DTOs.NewsDTO, Application, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]]' contains cycles and cannot be serialized if reference tracking is disabled.