URI
<newsInfos_uri>/publishedstatus[.<format>]
Supported Methods
Parent Resource
Introduction
The newsInfosPublishedStatus resource is used to batch set the publication status of news. Only administrators have the permission to batch set the publication status of news.
Supported Methods:
- PUT: Batch update the publication status of news.
Supported output formats: RJSON, JSON, HTML, XML.
Resource hierarchy

HTTP Request Method
Perform an HTTP request on the following URI. The rjson output format is used as an example, where supermapiportal is the server name.
http://supermapiportal:8190/iportal/web/news/publishedstatus.rjson
PUT Request
Batch update the publication status of news.
Request Parameters
When sending a request, you need to pass the following parameters in the request body:
| Name | Type | Description |
| newsIds | Integer[] | The array of news IDs. |
| published | Boolean | The publication status of the news. |
Response Structure
The returned resource representation structure is as follows:
| Field | Type | Description |
| succeed | Boolean | Whether the batch update of the publication status of news is successful. |
| error | HttpError | Error information. If the batch update of the publication status of news is successful, this field is not returned. |
Response Example
For the newsInfosPublishedStatus resource: http://localhost:8190/iportal/web/news/publishedstatus.rjson, perform a PUT request to batch publish two news items with IDs 1 and 2. The request body is as follows:
{
"newsIds": [
1,
2
],
"published": true
}
The returned rjson representation is as follows:
{ "succeed": true}
See