文章 Update Blog Post REST 端点

URLs

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

UPDATE a blog post.

请求参数

名称

类型

描述

必需

默认值

选项

Id

int

Id

是

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?

Default is true.

否

GeneratePostSummary

bool?

Default is true.

否

PublishedDate

DateTime?

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

否

IsApproved

bool?

Is Approved

否

IsFeatured

bool?

Is Featured

否

IsCrossPostingEnabled

bool?

Default is false.

否

FeaturedImage

string

Used to include a featured image when IsFeatured is true.

否

ContentType

string

Required when updating FileData, FileUrl, or FileUploadContext.

否

FileName

string

Required when updating FileData, FileUrl, or FileUploadContext.

否

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.

否

RemoveAttachment

bool?

Remove Attachment

否

Tags

string

A comma separated list of tags.

否

ExtendedAttributes

RestExtendedAttributes

Extended Attributes

否

PostImageUrl

string

Blogpost 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.

否

Remove Open Graph Image.

bool?

Remove 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.

否