Query Content on Pages

Last Updated on : 2023-06-15 05:11:39

Query the information about contents on pages, according to the language, status, and other parameters.

API address

GET: /v1.0/iot-03/app-contents

Request parameter

Parameter name Type IN Required Description
page_size Integer query true The number of items to be returned per page.
lang String query false The language.
status Integer query false The status of the article. Valid values:
  • 1: The article has been released.
  • 2: The article is to be released.
  • 3: The article is being reviewed.
  • 4: The article failed to pass the review.
  • 5: The article has been removed.
article_code String query false The number of a specified article.
title String query false The title of a specified article.
category_id String query false The ID of a specified category.
start_time Long query false The start time of the content updates.
end_time Long query false The end time of the content updates.
type Integer query false The type of the content. Valid values:
  • 1: images and text.
  • 2: video.
creator String query false The person who has created the banner.
page_no Integer query true The page number.
schema String query false App schema

Return parameter

Parameter name Type Description
result PageResult

Description of result

Parameter name Type Description
page_info PageInfo The information on a page.
datas List The data.

Description of datas

Parameter name Type Description
article_code String The number of a specified article.
content_id String The ID of a specified content.
tenant_id String The ID of a specified tenant.
title String The title.
sub_title String The sub-title.
lang String The language.
main_pic String The main image.
sub_pic String The sub-image of a specified article.
content_url String The URL of a specified content.
video_url String The URL of the video.
type Integer The type of the article. Valid values:
  • 1: images and text.
  • 2: video.
top Boolean Indicates whether the article is sticky on the top. Valid values:
  • true: yes.
  • false: no.
status Integer The status of the article. Valid values:
  • 1: The article has been released.
  • 2: The article is to be released.
  • 3: The article is being reviewed.
  • 4: The article failed to pass the review.
  • 5: The article has been removed.
create_time Long The time when it is created.
publish_time Long The time when it is released.
update_time Long The time when it is updated.
read_count Integer The page views of the banner.
like_count Integer The number of likes of the article.
category_id String The ID of a specified category.
category_name String The name of a specified category.
creator String The person who has created the content.
modifier String The person who has modified the content.
schema String App schema

Description of page_info

Parameter name Type Description
page_count Integer The total number of pages.
page_size Integer The number of items to be returned per page.
total Integer The total number.
page_no Integer The number of the current page.

Request example

GET: /v1.0/iot-03/app-contents?page=1&page_size=10&scheme=1

Return example

{ "result": { "datas": [ { "schema": "abc", "main_pic": "/suramar/content/1619002638fd391d975de.jpeg", "tenant_id": "bsh1618231457224vDlX", "creator": "bsh1618231457224vDlX", "category_name": "Test_Vf", "like_count": 0, "create_time": 1630329550907, "content_id": "1432332067141083189", "modifier": "bsh1618231457224vDlX", "title": "Great Discount on Smart Locks", "type": 2, "storage_source": 1, "article_code": "Kavrbcbo61mx5", "update_time": 1630329784465, "video_url": "/suramar/content/16196872089f000412038.mp4", "category_id": "1432271805678096432", "top": false, "publish_time": 1630329550847, "lang": "zh", "read_count": 0, "status": 3 } ], "page_info": { "page_no": 1, "total": 1, "page_count": 1, "page_size": 10 } }, "t": 1630330011768, "success": true }

Error code

For more information, see error code.