文章 List Media REST 端点

URLs

GET api/v1/groups/{groupid}/media/files.xml (or .json)

LIST media files.

GET api/v1/media/{galleryid}/files.xml (or .json)

LIST media files.

GET api/v1/media/files.xml (or .json)

LIST media files.

请求参数

名称

类型

描述

必需

默认值

选项

MediaGalleryId

int?

This Property is deprecated in favor of GalleryId and will be removed in a future version of the product.

GalleryId

int?

Gallery Id

MediaGalleryIds

string

This property is deprecated in favor of GalleryIds and will be removed in a future version of the product.

GalleryIds

string

Used to filter by a list of media galleries. Multiple values are separated with commas.

GroupId

int?

Group Id

IncludeSubGroups

bool?

Used when filtering by group.

IncludeUnpublished

bool?

Include unpublished posts too? Default is published only.

ContentIds

string

Comma separated list of ContentIds. Used to limit to a specific set of files as well as sort order if SoryBy is set to ContentIdsOrder

SortBy

string

Options are: Author, Comments, Downloads, PostDate, Rating, Subject, Views, Score:SCORE_ID, ContentIdsOrder. Default is PostDate.

SortOrder

string

Options include Ascending, Descending. Default when sorting by scores is Descending, otherwise Ascending.

PostTarget

string

Do not document this property.

PageSize

int?

Specify the number of results to return per page. If not set the default is 20. The max is 100.

PageIndex

int?

Specify the page number of paged results to return. Zero-based index. If not specified the default is 0.