Function: createBlogPost()
function createBlogPost(client, parameters): Promise<{
[key: string]: unknown;
_links?: | {
[key: string]: unknown;
base?: string;
byOperation?: string;
collection?: string;
context?: string;
download?: string;
editui?: string;
edituiv2?: string;
next?: string;
prev?: string;
self?: string;
tinyui?: string;
webui?: string;
}
| null;
authorId?: string;
body?: | {
[key: string]: unknown;
atlas_doc_format?: | {
[key: string]: unknown;
representation?: string;
value?: string;
}
| null;
storage?: | {
[key: string]: unknown;
representation?: string;
value?: string;
}
| null;
view?: | {
[key: string]: unknown;
representation?: string;
value?: string;
}
| null;
}
| null;
createdAt?: Date;
id?: string;
isFavoritedByCurrentUser?: boolean;
labels?: | {
[key: string]: unknown;
_links?: | {
[key: string]: unknown;
base?: string;
byOperation?: string;
collection?: string;
context?: string;
download?: string;
editui?: string;
edituiv2?: string;
next?: string;
prev?: string;
self?: string;
tinyui?: string;
webui?: string;
}
| null;
meta?: | {
[key: string]: unknown;
count?: number;
cursor?: string;
hasMore?: boolean;
}
| null;
results?: object[] | null;
}
| null;
likes?: | {
[key: string]: unknown;
_links?: | {
[key: string]: unknown;
base?: string;
byOperation?: string;
collection?: string;
context?: string;
download?: string;
editui?: string;
edituiv2?: string;
next?: string;
prev?: string;
self?: string;
tinyui?: string;
webui?: string;
}
| null;
meta?: | {
[key: string]: unknown;
count?: number;
cursor?: string;
hasMore?: boolean;
}
| null;
results?: object[] | null;
}
| null;
operations?: | {
[key: string]: unknown;
_links?: | {
[key: string]: unknown;
base?: string;
byOperation?: string;
collection?: string;
context?: string;
download?: string;
editui?: string;
edituiv2?: string;
next?: string;
prev?: string;
self?: string;
tinyui?: string;
webui?: string;
}
| null;
meta?: | {
[key: string]: unknown;
count?: number;
cursor?: string;
hasMore?: boolean;
}
| null;
results?: object[] | null;
}
| null;
properties?: | {
[key: string]: unknown;
_links?: | {
[key: string]: unknown;
base?: string;
byOperation?: string;
collection?: string;
context?: string;
download?: string;
editui?: string;
edituiv2?: string;
next?: string;
prev?: string;
self?: string;
tinyui?: string;
webui?: string;
}
| null;
meta?: | {
[key: string]: unknown;
count?: number;
cursor?: string;
hasMore?: boolean;
}
| null;
results?: object[] | null;
}
| null;
spaceId?: string;
status?: "deleted" | "any" | "current" | "historical" | "draft" | "trashed";
title?: string;
version?: | {
[key: string]: unknown;
attachment?: Record<string, any>;
authorId?: string;
comment?: Record<string, any>;
contributorIds?: unknown[];
createdAt?: Date;
message?: string | null;
minorEdit?: boolean;
ncsStepVersion?: string | null;
number?: number;
}
| null;
versions?: | {
[key: string]: unknown;
_links?: | {
[key: string]: unknown;
base?: string;
byOperation?: string;
collection?: string;
context?: string;
download?: string;
editui?: string;
edituiv2?: string;
next?: string;
prev?: string;
self?: string;
tinyui?: string;
webui?: string;
}
| null;
meta?: | {
[key: string]: unknown;
count?: number;
cursor?: string;
hasMore?: boolean;
}
| null;
results?: object[] | null;
}
| null;
}>;Defined in: src/v2/api/blogPost.ts:49
Creates a new blog post in the space specified by the spaceId.
By default this will create the blog post as a non-draft, unless the status is specified as draft. If creating a non-draft, the title must not be empty.
Currently only supports the storage representation specified in the body.representation enums below
Parameters
| Parameter | Type | Description |
|---|---|---|
client | Client | - |
parameters | { body?: Record<string, any>; private?: boolean; } | - |
parameters.body? | Record<string, any> | - |
parameters.private? | boolean | The blog post will be private. Only the user who creates this blog post will have permission to view and edit one. |
Returns
Promise<{ [key: string]: unknown; _links?: | { [key: string]: unknown; base?: string; byOperation?: string; collection?: string; context?: string; download?: string; editui?: string; edituiv2?: string; next?: string; prev?: string; self?: string; tinyui?: string; webui?: string; } | null; authorId?: string; body?: | { [key: string]: unknown; atlas_doc_format?: | { [key: string]: unknown; representation?: string; value?: string; } | null; storage?: | { [key: string]: unknown; representation?: string; value?: string; } | null; view?: | { [key: string]: unknown; representation?: string; value?: string; } | null; } | null; createdAt?: Date; id?: string; isFavoritedByCurrentUser?: boolean; labels?: | { [key: string]: unknown; _links?: | { [key: string]: unknown; base?: string; byOperation?: string; collection?: string; context?: string; download?: string; editui?: string; edituiv2?: string; next?: string; prev?: string; self?: string; tinyui?: string; webui?: string; } | null; meta?: | { [key: string]: unknown; count?: number; cursor?: string; hasMore?: boolean; } | null; results?: object[] | null; } | null; likes?: | { [key: string]: unknown; _links?: | { [key: string]: unknown; base?: string; byOperation?: string; collection?: string; context?: string; download?: string; editui?: string; edituiv2?: string; next?: string; prev?: string; self?: string; tinyui?: string; webui?: string; } | null; meta?: | { [key: string]: unknown; count?: number; cursor?: string; hasMore?: boolean; } | null; results?: object[] | null; } | null; operations?: | { [key: string]: unknown; _links?: | { [key: string]: unknown; base?: string; byOperation?: string; collection?: string; context?: string; download?: string; editui?: string; edituiv2?: string; next?: string; prev?: string; self?: string; tinyui?: string; webui?: string; } | null; meta?: | { [key: string]: unknown; count?: number; cursor?: string; hasMore?: boolean; } | null; results?: object[] | null; } | null; properties?: | { [key: string]: unknown; _links?: | { [key: string]: unknown; base?: string; byOperation?: string; collection?: string; context?: string; download?: string; editui?: string; edituiv2?: string; next?: string; prev?: string; self?: string; tinyui?: string; webui?: string; } | null; meta?: | { [key: string]: unknown; count?: number; cursor?: string; hasMore?: boolean; } | null; results?: object[] | null; } | null; spaceId?: string; status?: "deleted" | "any" | "current" | "historical" | "draft" | "trashed"; title?: string; version?: | { [key: string]: unknown; attachment?: Record<string, any>; authorId?: string; comment?: Record<string, any>; contributorIds?: unknown[]; createdAt?: Date; message?: string | null; minorEdit?: boolean; ncsStepVersion?: string | null; number?: number; } | null; versions?: | { [key: string]: unknown; _links?: | { [key: string]: unknown; base?: string; byOperation?: string; collection?: string; context?: string; download?: string; editui?: string; edituiv2?: string; next?: string; prev?: string; self?: string; tinyui?: string; webui?: string; } | null; meta?: | { [key: string]: unknown; count?: number; cursor?: string; hasMore?: boolean; } | null; results?: object[] | null; } | null; }>