文章 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.