AUTHENTICATED
scope can execute createPost
mutation.
The current API user will be set as an author. A content such as a learning path or a certificate can be shared.
If the provided content doesn’t relate to the current API user, it will be skipped, and a post will be created only with the text.
Mutation has a single required incoming argument - data
that represents PostCreationInput
object:
Parameter | Type | Description |
---|---|---|
text | String | Required. The post body text. Available HTML tags are: <a> , <p> , <br> . Any other tag will be trimmed. |
sharedContent | PostSharedContentInput | Optional. Contains the data related to the content that is going to be shared in the post (learning path or a certificate). |
imagesBase64 | [UploadedFileInput ] | The list of post images, each one should be formatted as base64 string. Up to 10 images can be shared, max file size - 20Mb. Allowed extensions: png, jpg, jpeg, gif. Leave empty to not attach any images to the post. Warning: once the post was created, this property cannot be updated. |
filesBase64 | [UploadedFileInput ] | The post files, each one should be formatted as base64 string. Up to 10 files can be shared, max file size - 20Mb. Allowed extensions: txt, pdf, doc, docx, xls, xlsx, ppt, pptx, svg. Leave empty to not attach any files to the post. Warning: once the post was created, this property cannot be updated. |
communityId | ID | Should be filled if the post relates to a community. Leave empty to create a regular post. In case if it’s filled, the created post will be visible not only to the current user’s network, but to all members of the given community. Warning: once the post was created, this property cannot be updated. |
PostSharedContentInput
object
Parameter | Type | Description |
---|---|---|
contentId | ID | Required. ID of the shared content (a learning path or a certificate). |
contentType | PostSharedContentType | Required. Contains the type of the shared content. Available options: LEARNING_PATH or CERTIFICATE . |
getPaginatedUserCertificates
query.
To get the list of learning paths (trainings) available for sharing, the getTrainingsForSharing
query should be called.
UploadedFileInput
object
Represents an input data to upload a new file through the API.
Parameter | Type | Description |
---|---|---|
filename | String | Required. A name of the file that should be created. Available file extensions depend on the entity that should be created. |
contentBase64 | String | Required. File content formatted as a base64 string. The limit for the file upload is 20 Mb (or the limit that is set for the file upload on the server, if it’s less than 20 Mb). |
An example of a post creation
Post
object. Detailed description and the full list of available properties can be found here.