文章 Create Forum Thread REST 端点

URLs

POST api/v1/forums/{forumid}/threads.xml (or .json)

CREATE a new forum thread.

请求参数

名称

类型

描述

必需

默认值

选项

ForumId

int

Forum Id

Subject

string

Subject

Body

string

Body

IsSticky

bool?

Defaults to false if not specified.

StickyDate

DateTime?

If a thread is sticky, used to specify how long it should be sticky. If no sticky date provided default is current date + 7 days.

IsFeatured

bool?

Default is false.

FeaturedImage

string

Used to include a featured image when IsFeatured is true.

PostDate

DateTime?

Defaults to current datetime if not specified.

IsQuestion

bool?

Default is false. Only used when the forum being posted to has both discussions and questions.

IsLocked

bool?

Default is false.

SubscribeToThread

bool?

Default is false.

Tags

string

A comma separated list of tags.

ContentType

string

Used when adding a post attachement.

FileName

string

Used when adding a post attachement.

FileData

Byte[]

When adding a post attachment either FileData, FileUrl or FileUploadContext is required.

FileUploadContext

string

When adding a post attachment either FileData, FileUrl or FileUploadContext is required.

FileUrl

string

When adding a post attachment either FileData, FileUrl or FileUploadContext is required.

IsAnonymous

bool?

Default is false.

HasPoll

bool?

Default is false. Deprecated in 8.5, use poll embedding instead.

PollTitle

string

Deprecated in 8.5, use poll embedding instead.

PollDescription

string

Deprecated in 8.5, use poll embedding instead.

PollExpirationDate

DateTime?

Deprecated in 8.5, use poll embedding instead.

ExtendedAttributes

RestExtendedAttributes

Extended Attributes

MarkAsRead

bool?

Default is false.