文章 Create Blog Post REST 端点

URLs

POST api/v1/blogs/{blogid}/posts.xml (or .json)

CREATE a blog post.

请求参数

名称

类型

描述

必需

默认值

选项

BlogId

int

Blog Id

Title

string

Title

Body

string

Body

Slug

string

If not specified slug will be automatically created based on post title.

Excerpt

string

Excerpt

ExcerptSize

int?

Excerpt Size

UsePostSummary

bool?

Use Post Summary

GeneratePostSummary

bool?

Default is true.

PublishedDate

DateTime?

If PublishedDate is not specified it will default to current date/time.

IsApproved

bool?

Default is true.

IsFeatured

bool?

Default is false.

IsCrossPostingEnabled

bool?

Default is false.

FeaturedImage

string

Used to include a featured image when IsFeatured is true.

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.

FileUrl

string

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.

ExtendedAttributes

RestExtendedAttributes

Extended Attributes

PostImageUrl

string

Blog post image Url.

OpenGraphTitle

string

Title used in Open Graph title tag.

OpenGraphDescription

string

Description used in Open Graph description tag.

OpenGraphImageContext

string

Context id for file used in Open Graph image.

OpenGraphImageFileName

string

Name for file used in Open Graph image.

MetaTitle

string

Used in the page's title.

MetaKeywords

string

Keywords for the page's meta keywords tag.

MetaDescription

string

Description for the page's meta description tag.