Logo Decentralized Social Network

moeralib.node

Functions

moera_root(url)

Convert partial node URL to a standardized form.

Parameters:
urlstr – partial URL
Return value:
str – standard URL

MoeraNodeError

Generic node error.

MoeraNodeError(name, message)

Parameters:
namestr – request name
messagestr – error message

MoeraNodeApiError

Node returned an error response.

error_code

str – Error code.

MoeraNodeApiError(name, result)

Parameters:
namestr – request name
resulttypes.Result – node response

MoeraNodeConnectionError

Error while connecting the node.

MoeraNodeConnectionError(name, result)

Parameters:
messagestr – error message

MoeraCartesError

Error obtaining valid cartes.

NodeAuth

Authentication type.

NONE

No authentication.

PEER

Carte authentication.

ADMIN

Admin token authentication.

ROOT_ADMIN

Root admin secret authentication.

MoeraCarteSource

Class that gets cartes from the given node, caches them and supplies them for authentication.

MoeraCarteSource(node)

Parameters:
nodeMoeraNode – node to get cartes from

renew()

Force renewing the cached list of cartes.

get_carte()

Get a valid carte. Use one of the cached ones, if possible.

Return value:
str – the carte

MoeraNode

Node API interface. This class contains a lot of methods, so we divided them to groups by their purpose.

root

str – API endpoint URL of the node.

MoeraNode(node_url=None)

Parameters:
node_urlstr(optional) node URL

General

General-purpose methods.

node_url(url)

Set node URL.

Parameters:
urlstr

call(name, location, params=None, method='GET', body=None, body_file=None, body_file_type=None, auth=True, schema=None, bodies=False, src_bodies=False)

Generic method for making node API requests.

Parameters:
namestr – request name (for error messages)
locationstr – request path
paramsMapping[str, str | int | None](optional) query parameters, mapping name to value, None values are skipped
methodstr(optional) request method (one of 'GET', 'POST', 'PUT', 'DELETE')
bodyStructure | Sequence[Structure](optional) request body
body_fileIO(optional) file to read the request body from
body_file_typestr(optional) content-type of the request body, when read from a file
authbool(optional) True to authenticate the request, False otherwise
schemaAny(optional) JSON schema to validate the response
bodiesbool(optional) True to decode Body structures in the response, False otherwise
src_bodiesbool(optional) True to encode Body structures in the request, False otherwise
Return value:
Any – the decoded response

Authentication

Methods related to authentication.

root_secret(secret)

Set root secret for authentication.

Parameters:
secretstr

token(token)

Set admin token for authentication.

Parameters:
tokenstr

carte(carte)

Set carte for authentication.

Parameters:
cartestr

carte_source(carte_source)

Set a source of cartes for authentication.

Parameters:
carte_source

auth_method(auth_method)

Select authentication method for the following requests.

Parameters:
auth_method

no_auth()

Switch off authentication for the following requests.

auth()

Select carte authentication for the following requests.

auth_admin()

Select admin token authentication for the following requests.

auth_root_admin()

Select root admin secret authentication for the following requests.

Activity Reactions

Local registry of all activity in the form of reactions performed by the node.

search_activity_reactions(filter)

Get the list of all reactions performed by the node, filtered by some criteria.

Parameters:
filtertypes.ActivityReactionFilter
Return value:
List[types.ActivityReactionInfo]
Authentication: read more
admin

Asyncronous Operations

Asyncronous operations pending or just finished on the node.

get_remote_posting_verification_status(id)

Get status of the asynchronous operation that performs verification of a remote posting signature.

Parameters:
idstr – asynchronous operation ID
Return value:
types.RemotePostingVerificationInfo
Authentication: read more
admin
Errors:
Code Description
async-operation.not-found async operation with the given ID is not found

get_remote_reaction_verification_status(id)

Get status of the asynchronous operation that performs verification of the signature of a reaction to a remote posting.

Parameters:
idstr – asynchronous operation ID
Return value:
types.RemoteReactionVerificationInfo
Authentication: read more
admin
Errors:
Code Description
async-operation.not-found async operation with the given ID is not found

Avatars

Avatars of the node's owner. The list of avatars is ordered using ordinals that every avatar has.

Every avatar has a shape. It is stored and returned solely for client's interpretation. The shape has no meaning for the node and does not affect the avatar image stored at the node.

get_avatars()

Get the list of avatars in the ascending order of their ordinals.

Parameters:
Return value:
List[types.AvatarInfo]
Authentication: read more
none

create_avatar(avatar)

Create a new avatar from a public media file that exists on the node. New public media file is created for the avatar. If avatar's ordinal is not provided in the input, the avatar is assigned an ordinal that is greater than ordinals of all existing avatars.

Parameters:
avatartypes.AvatarAttributes
Return value:
types.AvatarInfo
Authentication: read more
admin
Errors:
Code Description
media.storage-error media file cannot be stored
avatar.media-unsupported the type of the source media file is not supported for avatars

get_avatar(id)

Get an individual avatar.

Parameters:
idstr – avatar ID
Return value:
types.AvatarInfo
Authentication: read more
none
Errors:
Code Description
avatar.not-found avatar is not found

delete_avatar(id)

Delete an avatar.

Parameters:
idstr – avatar ID
Return value:
types.Result
Authentication: read more
admin
Errors:
Code Description
avatar.not-found avatar is not found

reorder_avatars(order)

Reorder avatars. Every avatar mentioned in the input is assigned an ordinal in ascending order as they appear in the input. Ordinals of avatars not mentioned in the input are not touched.

Parameters:
ordertypes.AvatarsOrdered
Return value:
List[types.AvatarOrdinal]
Authentication: read more
admin
Errors:
Code Description
avatar.not-found avatar is not found

Blocked Instants

It is possible to block creation of some types of stories in the instants feed.

block_instant(instant)

Blocks creation of instants of the given story type, related to the given entry, optionally unblocking at the given time in the future.

Parameters:
instanttypes.BlockedInstantAttributes
Return value:
types.BlockedInstantInfo
Authentication: read more
admin
Errors:
Code Description
entry.not-found entry is not found

get_blocked_instant(id)

Get details about the given blocked instant.

Parameters:
idstr – ID of the blocked instant
Return value:
types.BlockedInstantInfo
Authentication: read more
admin
Errors:
Code Description
blocked-instant.not-found blocked instant is not found

unblock_instant(id)

Unblock the given instant.

Parameters:
idstr – ID of the blocked instant
Return value:
types.Result
Authentication: read more
admin
Errors:
Code Description
blocked-instant.not-found blocked instant is not found

search_blocked_instants(filter)

Search blocked instants by the given criteria.

Parameters:
filtertypes.BlockedInstantFilter
Return value:
List[types.BlockedInstantInfo]
Authentication: read more
admin

Blocked Users

It is possible to block particular nodes from performing some operations on this node, even if they are otherwise permitted to do so. It is also possible to mark some nodes to be invisible (in discussions, for example), the client should fetch the list of invisible nodes to perform filtering on the client side.

block_user(user)

Blocks the given node from performing the given operations, in a particular posting or globally, optionally unblocking at the given time in the future.

Parameters:
usertypes.BlockedUserAttributes
Return value:
types.BlockedUserInfo
Authentication: read more
admin
Errors:
Code Description
entry.not-found entry is not found

get_blocked_user(id)

Get details about the given blocked user.

Parameters:
idstr – ID of the blocked user
Return value:
types.BlockedUserInfo
Authentication: read more
optional
Errors:
Code Description
blocked-user.not-found blocked user is not found

unblock_user(id)

Unblock the given user.

Parameters:
idstr – ID of the blocked user
Return value:
types.Result
Authentication: read more
admin
Errors:
Code Description
blocked-user.not-found blocked user is not found

search_blocked_users(filter)

Search blocked users by the given criteria.

Parameters:
filtertypes.BlockedUserFilter
Return value:
List[types.BlockedUserInfo]
Authentication: read more
optional

get_blocked_users_checksums()

Get checksums of the information about the blocked users. This request may be used to quickly detect the changes in the blocked users list to update the cache on the client side.

Parameters:
Return value:
types.BlockedUsersChecksums
Authentication: read more
admin

Blocked-by Users

The node receives notifications from nodes that blocked it. This information is stored on the node and can be requested.

get_blocked_by_user(id)

Get details about the given node that blocked this node.

Parameters:
idstr – ID of the blocked-by user
Return value:
types.BlockedByUserInfo
Authentication: read more
optional
Errors:
Code Description
blocked-by-user.not-found blocked-by user is not found

search_blocked_by_users(filter)

Search nodes, that blocked this node, by the given criteria.

Parameters:
filtertypes.BlockedByUserFilter
Return value:
List[types.BlockedByUserInfo]
Authentication: read more
optional

Cartes

Cartes - cryptographic tokens used to authenticate on any node besides the home node.

get_cartes(limit=None)

Get a set of cartes that correspond to successive periods of time. Two sequences of cartes are returned: one with all permissions and another with `view-media` permission only. The node may decide to return less cartes than the given limit.

Parameters:
limitint(optional) maximum number of sequential cartes returned
Return value:
types.CarteSet
Authentication: read more
admin

Comments

Comments to a posting.

get_comments_slice(posting_id, after=None, before=None, limit=None)

Get a slice of the list of comments, delimited by before or after moments (but not both) and the given limit. If neither before nor after are provided, the latest comments are returned. The node may decide to return less comments than the given limit. The stories are always sorted by moment, ascending.

Parameters:
posting_idstr – ID of the posting
afterint(optional) filter comments posted strongly after this moment
beforeint(optional) filter comments posted at or before this moment
limitint(optional) maximum number of comments returned
Return value:
types.CommentsSliceInfo
Authentication: read more
optional
Errors:
Code Description
posting.not-found there is no posting with the given ID
comments.before-after-exclusive before and after parameters are not allowed together
limit.invalid limit parameter has an invalid value

create_comment(posting_id, comment)

Create a comment from the given text and add it to the given posting. The comment owner must authenticate in some way. If the comment is not signed, it will be kept for a limited period of time and then erased. If authenticated as admin, the comment is signed by the node.

Parameters:
posting_idstr – ID of the posting
commenttypes.CommentText
Return value:
types.CommentCreated
Authentication: read more
required or signature
Errors:
Code Description
posting.not-found there is no posting with the given ID
posting.not-signed the posting is not signed, so it is impossible to add comments to it

get_comment(posting_id, comment_id, with_source=False)

Get an individual comment.

Parameters:
posting_idstr – ID of the posting
comment_idstr – ID of the comment
with_sourcebool(optional) include source text of the comment
Return value:
types.CommentInfo
Authentication: read more
optional
Errors:
Code Description
posting.not-found there is no posting with the given ID
comment.not-found there is no comment with the given ID
comment.wrong-posting the comment is not related to the given posting

update_all_comments(posting_id, attributes)

Update operation overrides for all comments in the posting.

Parameters:
posting_idstr – ID of the posting
attributestypes.CommentMassAttributes
Return value:
types.Result
Authentication: read more
optional
Errors:
Code Description
posting.not-found there is no posting with the given ID

update_comment(posting_id, comment_id, comment)

Update the comment, creating a new revision of it. The text is processed just like in the POST request.

Parameters:
posting_idstr – ID of the posting
comment_idstr – ID of the comment
commenttypes.CommentText
Return value:
types.CommentInfo
Authentication: read more
required or signature
Errors:
Code Description
posting.not-found there is no posting with the given ID
comment.not-found there is no comment with the given ID
comment.wrong-posting the comment is not related to the given posting

delete_comment(posting_id, comment_id)

Delete the comment. The comment may not be purged from the database immediately, but preserved for some period of time to give a chance to restore it.

Parameters:
posting_idstr – ID of the posting
comment_idstr – ID of the comment
Return value:
types.CommentTotalInfo
Authentication: read more
required
Errors:
Code Description
posting.not-found there is no posting with the given ID
comment.not-found there is no comment with the given ID
comment.wrong-posting the comment is not related to the given posting

get_postings_attached_to_comment(posting_id, comment_id)

Get all postings linked to media attached to the given comment.

Parameters:
posting_idstr – ID of the posting
comment_idstr – ID of the comment
Return value:
List[types.PostingInfo]
Authentication: read more
optional
Errors:
Code Description
posting.not-found there is no posting with the given ID
comment.not-found there is no comment with the given ID
comment.wrong-posting the comment is not related to the given posting

Comment Revisions

All revisions of the comment.

get_comment_revisions(posting_id, comment_id)

Get all revisions of the comment.

Parameters:
posting_idstr – ID of the posting
comment_idstr – ID of the comment
Return value:
List[types.CommentRevisionInfo]
Authentication: read more
optional
Errors:
Code Description
comment.not-found there is no comment with the given ID
comment.wrong-posting the comment is not related to the given posting

get_comment_revision(posting_id, comment_id, id)

Get an individual revision of the comment.

Parameters:
posting_idstr – ID of the posting
comment_idstr – ID of the comment
idstr – ID of the revision
Return value:
types.CommentRevisionInfo
Authentication: read more
optional
Errors:
Code Description
comment.not-found there is no comment with the given ID
comment.wrong-posting the comment is not related to the given posting
comment-revision.not-found there is no revision with the given ID

Comment Reactions

Reactions ("Likes") - simple textless answers to a comment.

create_comment_reaction(posting_id, comment_id, reaction)

Add a reaction to the given comment. The reaction owner must authenticate in some way. Only one reaction is allowed from each owner to a particular comment. If a reaction from the same owner to this comment already exists, it is overwritten. If the reaction is not signed, the reaction will be kept for a limited period of time and then erased (the previous reaction of the same owner will be restored, if any).

Parameters:
posting_idstr – ID of the posting
comment_idstr – ID of the comment
reactiontypes.ReactionDescription
Return value:
types.ReactionCreated
Authentication: read more
required or signature
Errors:
Code Description
comment.not-found there is no comment with the given ID
comment.wrong-posting the comment is not related to the given posting
comment.not-signed cannot add a reaction to an unsigned comment
reaction.not-accepted the reaction is not acceptable

update_comment_reaction(posting_id, comment_id, owner_name, reaction)

Update the reaction's operations or set operations' overrides.

Parameters:
posting_idstr – ID of the posting
comment_idstr – ID of the comment
owner_namestr – reaction owner node name
reactiontypes.ReactionOverride
Return value:
types.ReactionInfo
Authentication: read more
optional
Errors:
Code Description
posting.not-found there is no posting with the given ID
comment.not-found there is no comment with the given ID
comment.wrong-posting the comment is not related to the given posting

get_comment_reactions_slice(posting_id, comment_id, negative=None, emoji=None, before=None, limit=None)

Get a slice of the list of reactions to the given comment, optionally filtered by reaction type, delimited by before moment and the given limit. If before is not provided, the latest reactions are returned. The node may decide to return less reactions than the given limit. The reactions are always sorted by moment, descending.

Parameters:
posting_idstr – ID of the posting
comment_idstr – ID of the comment
negativebool(optional) True, to filter negative reactions, False, to filter positive ones
emojiint(optional) filter by reaction code, usually interpreted by clients as emoji code point
beforeint(optional) filter reactions created at or before this moment
limitint(optional) maximum number of reactions returned
Return value:
types.ReactionsSliceInfo
Authentication: read more
optional
Errors:
Code Description
comment.not-found there is no comment with the given ID
comment.wrong-posting the comment is not related to the given posting
limit.invalid limit parameter has an invalid value

get_comment_reaction(posting_id, comment_id, owner_name)

Get the detailed information about the reaction of the given owner to the given comment. If no reaction with such owner exist, an empty structure with just commentId is returned.

Parameters:
posting_idstr – ID of the posting
comment_idstr – ID of the comment
owner_namestr – reaction owner node name
Return value:
types.ReactionInfo
Authentication: read more
optional
Errors:
Code Description
comment.not-found there is no comment with the given ID
comment.wrong-posting the comment is not related to the given posting

delete_all_comment_reactions(posting_id, comment_id)

Delete all reactions to the given comment.

Parameters:
posting_idstr – ID of the posting
comment_idstr – ID of the comment
Return value:
types.Result
Authentication: read more
admin
Errors:
Code Description
comment.not-found there is no comment with the given ID
comment.wrong-posting the comment is not related to the given posting

delete_comment_reaction(posting_id, comment_id, owner_name)

Delete the reaction of the given owner to the given comment.

Parameters:
posting_idstr – ID of the posting
comment_idstr – ID of the comment
owner_namestr – reaction owner node name
Return value:
types.ReactionTotalsInfo
Authentication: read more
optional
Errors:
Code Description
comment.not-found there is no comment with the given ID
comment.wrong-posting the comment is not related to the given posting

Comment Reaction Totals

Summary of reactions to a comment.

get_comment_reaction_totals(posting_id, comment_id)

Get summary of reactions to the comment given.

Parameters:
posting_idstr – ID of the posting
comment_idstr – ID of the comment
Return value:
types.ReactionTotalsInfo
Authentication: read more
optional
Errors:
Code Description
comment.not-found there is no comment with the given ID
comment.wrong-posting the comment is not related to the given posting

Contacts

Information about all nodes having a relationship with the node.

get_contacts(query=None, limit=None)

Search for contacts matching the search query. Every space-delimited word in the query must case-insensitively match a beginning of the contact's node name or a beginning of any space-delimited word in the contact's full name. The order of words is not significant.

The node may decide to return less contacts than the given limit.

The contacts are sorted by their closeness to the node, which is calculated from the number of reactions and comments and their age.

Parameters:
querystr(optional) the search query
limitint(optional) maximum number of contacts returned
Return value:
List[types.ContactInfo]
Authentication: read more
admin
Errors:
Code Description
limit.invalid limit parameter has an invalid value

Credentials

Credentials used to authenticate the administrator of the node.

check_credentials()

Check whether the credentials are initialized already.

Parameters:
Return value:
types.CredentialsCreated
Authentication: read more
none

create_credentials(credentials)

Initialize credentials, if they are not set yet. Note that this operation can be executed without authentication, so this should be done as soon as possible after the node installation. Sign in is not allowed until the credentials are set.

Parameters:
credentialstypes.Credentials
Return value:
types.Result
Authentication: read more
none
Errors:
Code Description
credentials.already-created credentials are already created

update_credentials(credentials)

Update credentials. Either old password or credentials reset token should be set in the input for the operation to succeed. Credentials reset token is not related to the authentication token and usually is sent to the user by E-mail.

Parameters:
credentialstypes.CredentialsChange
Return value:
types.Result
Authentication: read more
none
Errors:
Code Description
credentials.login-incorrect login incorrect (the old password is wrong)
credentials.wrong-reset-token credentials reset token is wrong
credentials.reset-token-expired credentials reset token is expired

delete_credentials()

Delete credentials.

Parameters:
Return value:
types.Result
Authentication: read more
root admin

reset_credentials()

The node generates credentials reset token that is sent to the node admin by E-mail or using any other way that is defined for credentials recovery. This token then may be used to change the credentials without knowing the password.

Parameters:
Return value:
types.EmailHint
Authentication: read more
none
Errors:
Code Description
credentials.email-not-set E-mail address is not set for the node

Deleted Postings

All deleted postings, that are not purged from the database yet.

get_deleted_postings(page=None, limit=None)

Get the list of deleted postings, page by page. The node may decide to use smaller page size than the given limit. The postings are always sorted by the deletion timestamp, descending.

Parameters:
pageint(optional) page number, 0 by default
limitint(optional) page size (maximum number of postings returned), the default is defined by the node
Return value:
List[types.PostingInfo]
Authentication: read more
admin
Errors:
Code Description
page.invalid page parameter has an invalid value
limit.invalid limit parameter has an invalid value

get_deleted_posting(id)

Get an individual deleted posting.

Parameters:
idstr – ID of the posting
Return value:
types.PostingInfo
Authentication: read more
admin
Errors:
Code Description
posting.not-found there is no deleted posting with the given ID

restore_deleted_posting(id)

Restore a posting. A new revision is created with the same content as in the latest revision.

Parameters:
idstr – ID of the posting
Return value:
types.PostingInfo
Authentication: read more
admin
Errors:
Code Description
posting.not-found there is no posting with the given ID

Deleted Posting Revisions

All revisions of the deleted posting.

get_delete_posting_revisions(posting_id, limit=None)

Get all revisions of the deleted posting, but not more than limit. The node may decide to return less revisions than the given limit.

Parameters:
posting_idstr – ID of the posting
limitint(optional) maximum number of revisions returned
Return value:
List[types.PostingRevisionInfo]
Authentication: read more
optional
Errors:
Code Description
posting.not-found there is no posting with the given ID

get_deleted_posting_revision(posting_id, id)

Get an individual revision of the deleted posting.

Parameters:
posting_idstr – ID of the posting
idstr – ID of the revision
Return value:
types.PostingRevisionInfo
Authentication: read more
optional
Errors:
Code Description
posting.not-found there is no posting with the given ID
posting-revision.not-found there is no revision with the given ID

restore_deleted_posting_revision(posting_id, id)

Restore a posting at a particular revision. A new revision is created with the same content as in the given revision.

Parameters:
posting_idstr – ID of the posting
idstr – ID of the revision
Return value:
types.PostingRevisionInfo
Authentication: read more
admin
Errors:
Code Description
posting.not-found there is no posting with the given ID
posting-revision.not-found there is no revision with the given ID
posting-revision.already-current the given revision is already the current one

Domains

One instance of Moera node software can serve several virtual nodes. These virtual nodes are called domains and distinguished by the hostname passed in the HTTP request. Each virtual node has node ID, it is used in the database to designate the data that belongs to a particular node. The hostname is mapped to the node ID when the request is processed, using the list of registered domains. If there is no domain with such a name, the special _default_ domain is used.

get_domains()

Get the list of registered domains.

Parameters:
Return value:
List[types.DomainInfo]
Authentication: read more
root admin

get_domain(name)

Get information about the domain with the given hostname. If domain registration for this server is public, this request does not require authentication.

Parameters:
namestr – domain name
Return value:
types.DomainInfo
Authentication: read more
root admin or none
Errors:
Code Description
domain.not-found there is no domain with the given hostname

create_domain(domain)

Create a new domain with the given hostname. If nodeId is not passed, it is generated automatically. If domain registration for this server is public, this request does not require authentication.

Parameters:
domaintypes.DomainAttributes
Return value:
types.DomainInfo
Authentication: read more
root admin or none
Errors:
Code Description
domain.already-exists a domain with the given hostname already exists
domain.node-id-used a domain with the given node ID already exists

update_domain(name, domain)

Update the domain with the given hostname. If the new hostname is not passed, the old hostname is preserved. (Note that you cannot pass a new name for the default hostname, because it cannot be renamed and _default_ is not a valid hostname. Skip this field if you want to update the default hostname.) If nodeId is not passed, it is generated automatically.

Parameters:
namestr – domain's hostname
domaintypes.DomainAttributes
Return value:
types.DomainInfo
Authentication: read more
root admin
Errors:
Code Description
domain.not-found there is no domain with the given hostname
domain.cannot-rename-default cannot change the name of the default domain

delete_domain(name)

Delete the domain with the given hostname. This operation deletes the domain record only, the user's data related to the domain is preserved.

Parameters:
namestr – domain name
Return value:
types.Result
Authentication: read more
root admin
Errors:
Code Description
domain.not-found there is no domain with the given hostname
domain.cannot-delete-default cannot delete the default domain

is_domain_available(node_name)

Get an available domain name that is recommended for the given node name. The domain name is usually chosen to be close to the node name in English transcription. If domain registration for this server is not public, this request is not accessible.

Parameters:
node_namestr – node name
Return value:
types.DomainAvailable
Authentication: read more
none

Drafts

All drafts. This is an universal interface for managing all types for drafts to all types of entries. Drafts of entries located on remote nodes are all stored on the home node.

get_drafts(draft_type, node_name, posting_id=None, comment_id=None, page=None, limit=None)

Get the list of drafts, page by page, filtered by the given criteria. The node may decide to use smaller page size than the given limit. The drafts are always sorted by the creation timestamp, descending.

Parameters:
draft_typetypes.DraftType – type of the drafts
node_namestr – name of the node the drafts are related to
posting_idstr(optional) ID of the posting, mandatory for all types, except new-posting
comment_idstr(optional) ID of the comment, mandatory for comment-update type
pageint(optional) page number, 0 by default
limitint(optional) page size (maximum number of postings returned), the default is defined by the node
Return value:
List[types.DraftInfo]
Authentication: read more
admin
Errors:
Code Description
page.invalid page parameter has an invalid value
limit.invalid limit parameter has an invalid value

create_draft(draft)

Create a new draft from the text given.

Parameters:
drafttypes.DraftText
Return value:
types.DraftInfo
Authentication: read more
admin

get_draft(id)

Get an individual draft.

Parameters:
idstr – ID of the draft
Return value:
types.DraftInfo
Authentication: read more
admin
Errors:
Code Description
draft.not-found there is no draft with the given ID

update_draft(id, draft)

Update the draft.

Parameters:
idstr – ID of the draft
drafttypes.DraftText
Return value:
types.DraftInfo
Authentication: read more
admin
Errors:
Code Description
draft.not-found there is no draft with the given ID

delete_draft(id)

Delete the draft.

Parameters:
idstr – ID of the draft
Return value:
types.Result
Authentication: read more
admin
Errors:
Code Description
draft.not-found there is no draft with the given ID

Features

Information about features supported by the node.

get_features()

Get information about features supported by the node.

Parameters:
Return value:
types.Features
Authentication: read more
optional

Feeds

Feed is a set of stories collected for some purpose. The stories are sorted by moment, descending.

These are the standard feeds that have special meaning:

  • timeline - the main feed of publications;
  • instant - the feed of instant notifications;
  • news - the main feed of publications gathered from other nodes.

get_feeds()

Get general information about all feeds accessible by client.

Parameters:
Return value:
List[types.FeedInfo]
Authentication: read more
admin or none

get_feed_general(feed_name)

Get general information about the feed.

Parameters:
feed_namestr – name of the feed
Return value:
types.FeedInfo
Authentication: read more
admin or none
Errors:
Code Description
feed.not-found there is no accessible feed with this name

get_feed_status(feed_name)

Get information about total number and number of non-read and non-viewed stories in the feed.

Parameters:
feed_namestr – name of the feed
Return value:
types.FeedStatus
Authentication: read more
admin or none
Errors:
Code Description
feed.not-found there is no accessible feed with this name

update_feed_status(feed_name, change)

Update information about non-read and non-viewed stories in the feed.

Parameters:
feed_namestr – name of the feed
changetypes.FeedStatusChange
Return value:
types.FeedStatus
Authentication: read more
admin
Errors:
Code Description
feed.not-found there is no accessible feed with this name

get_feed_slice(feed_name, after=None, before=None, limit=None)

Get a slice of the feed, delimited by before or after moments (but not both) and the given limit. If neither before nor after are provided, the latest stories are returned. The node may decide to return less stories than the given limit. The stories are always sorted by moment, descending.

Parameters:
feed_namestr – name of the feed
afterint(optional) filter stories posted strongly after this moment
beforeint(optional) filter stories posted at or before this moment
limitint(optional) maximum number of stories returned
Return value:
types.FeedSliceInfo
Authentication: read more
admin or none
Errors:
Code Description
feed.not-found there is no accessible feed with this name
feed.before-after-exclusive before and after parameters are not allowed together
limit.invalid limit parameter has an invalid value

Friend Groups

A friend may be member of one or more groups of friends. Each group as an ID and title. The group with a title t:friends is a standard group "Friends" that is created automatically for every node.

get_friend_groups()

Get the list of all groups of friends that exist on the node.

Parameters:
Return value:
List[types.FriendGroupInfo]
Authentication: read more
optional

get_friend_group(id)

Get the information about the group of friends.

Parameters:
idstr – ID of the group of friends
Return value:
types.FriendGroupInfo
Authentication: read more
optional
Errors:
Code Description
friend-group.not-found the group of friends is not found

create_friend_group(friend_group)

Create a group of friends.

Parameters:
friend_grouptypes.FriendGroupDescription
Return value:
types.FriendGroupInfo
Authentication: read more
admin

update_friend_group(id, friend_group)

Update the details of the group of friends.

Parameters:
idstr – ID of the group of friends
friend_grouptypes.FriendGroupDescription
Return value:
types.FriendGroupInfo
Authentication: read more
admin
Errors:
Code Description
friend-group.not-found the group of friends is not found

delete_friend_group(id)

Delete the group of friends.

Parameters:
idstr – ID of the group of friends
Return value:
types.Result
Authentication: read more
admin
Errors:
Code Description
friend-group.not-found the group of friends is not found

Friends

Friends are nodes that may have special permissions on this node. It is possible to write "friends only" posts or to enable commenting to friends or to a group of friends only etc.

get_friends(group_id=None)

Get the list of all friends of the node or friends belonging to a particular group.

Parameters:
group_idstr(optional) ID of a group of friends
Return value:
List[types.FriendInfo]
Authentication: read more
optional
Errors:
Code Description
friend-group.not-found the group of friends is not found

get_friend(name)

Get the friendship information for the node given.

Parameters:
namestr – name of the node
Return value:
types.FriendInfo
Authentication: read more
optional

update_friends(friends)

Update the friendship status of the nodes passed in the input. If some of the nodes passed in the input is not a member of some of the groups of friends listed for it, the node is added to them. If it is a member of some of the groups of friends that are not listed for it, the node is removed from them.

Parameters:
friendsList[types.FriendDescription]
Return value:
List[types.FriendInfo]
Authentication: read more
admin

Friend-ofs

The node receives notifications from nodes that added it to their friends. This information is stored on the node and can be requested.

get_friend_ofs()

Get the list of all nodes that added this node to their friends.

Parameters:
Return value:
List[types.FriendOfInfo]
Authentication: read more
optional

get_friend_of(name)

Get the information for the node given, whether it has added this node to its friends.

Parameters:
namestr – name of the node
Return value:
types.FriendOfInfo
Authentication: read more
optional

Media (private)

Media files that are bound to a particular uploader and may be inaccessible to other clients. Private media files cannot be retrieved by their hash, only by their ID. The ID is unique to the client that uploaded the file and the node the file was uploaded to. A private media file may have a linked posting - it is used to store the media file description, reactions and comments. The linked posting is accessed as any other posting.

upload_private_media(file, file_type)

Upload a new media file. Content of the file is passed in the request body

Parameters:
fileIO
file_typestr – content-type of file
Return value:
types.PrivateMediaFileInfo
Authentication: read more
required
Errors:
Code Description
media.image-invalid media file is not a readable image
media.wrong-size media file is too large
media.storage-error media file cannot be stored

get_private_media(id, width=None, download=None)

Get media file content (returned in the response body).

Parameters:
idstr – media file ID
widthint(optional) preferred width of the media in pixels; if present, the node will try to return the smallest in size, but the best in quality variant of the media, according to the width provided
downloadbool(optional) if True, the node will add Content-Disposition: attachment header to the output
Return value:
blob
Authentication: read more
optional
Errors:
Code Description
media.not-found media file is not found

get_private_media_info(id)

Get media file details.

Parameters:
idstr – media file ID
Return value:
types.PrivateMediaFileInfo
Authentication: read more
optional
Errors:
Code Description
media.not-found media file is not found

get_private_media_parent_entry(id)

Get the list of all postings and comments the media file is attached to.

Parameters:
idstr – media file ID
Return value:
List[types.EntryInfo]
Authentication: read more
optional

Media (public)

Media files that should be accessible to any client. ID of a public media file is SHA-1 hash of its content.

upload_public_media(file, file_type)

Upload a new media file. Content of the file is passed in the request body

Parameters:
fileIO
file_typestr – content-type of file
Return value:
types.PublicMediaFileInfo
Authentication: read more
required
Errors:
Code Description
media.image-invalid media file is not a readable image
media.wrong-size media file is too large
media.storage-error media file cannot be stored

get_public_media(id, width=None, download=None)

Get media file content (returned in the response body).

Parameters:
idstr – media file ID
widthint(optional) preferred width of the media in pixels; if present, the node will try to return the smallest in size, but the best in quality variant of the media, according to the width provided
downloadbool(optional) if True, the node will add Content-Disposition: attachment header to the output
Return value:
blob
Authentication: read more
none
Errors:
Code Description
media.not-found media file is not found

get_public_media_info(id)

Get media file details.

Parameters:
idstr – media file ID
Return value:
types.PublicMediaFileInfo
Authentication: read more
none
Errors:
Code Description
media.not-found media file is not found

Node Name

The name of the node. Read more about it in the Architecture Overview section. Operations with the node name are performed asynchronously - need to poll the node periodically to get the current status of the operation. Only one operation with the node name may be performed by the node at any moment.

get_node_name()

Get the name of the node. Admin user receives also the current status of the latest operation with the node name.

Parameters:
Return value:
types.NodeNameInfo
Authentication: read more
admin or none

create_node_name(name_to_register)

Register a new name for the node. The corresponding signing key is generated automatically and stored at the node. The updating key is generated and returned in the encoded form and in the form of mnemonic (a sequence of English words) that need to be written down and stored securely to be able to perform further operations with the name.

Parameters:
name_to_registertypes.NameToRegister
Return value:
types.RegisteredNameSecret
Authentication: read more
admin
Errors:
Code Description
naming.operation-pending another operation with the node name is pending currently

update_node_name(secret)

Update the name of the node. May be used to assign an already-registered name to the node (the corresponding signing key is generated automatically and stored at the node), or to prolong the name. The secret or mnemonic of the updating key must be provided for this operation.

Parameters:
secrettypes.RegisteredNameSecret
Return value:
types.Result
Authentication: read more
admin
Errors:
Code Description
naming.operation-pending another operation with the node name is pending currently
registeredNameSecret.empty the registered name secret or mnemonic are not provided
node-name.name-absent the node name is not provided and not known by the node
node-name. various errors returned by naming server (see the list)

delete_node_name()

Delete all the information related to the node name (including the signing key) from the node. The name record on the naming server is not touched.

Parameters:
Return value:
types.Result
Authentication: read more
admin
Errors:
Code Description
naming.operation-pending another operation with the node name is pending currently

Notifications

Receiver of notifications from other nodes.

send_notification(packet)

Accept a notification packet from other node. Notification packets older than 10 minutes are ignored. The sending node should update the packet timestamp and the signature and send the packet again. This mechanism prevents attackers from recording and resending old signed packets.

Parameters:
packettypes.NotificationPacket
Return value:
types.Result
Authentication: read more
signature
Errors:
Code Description
ask.too-many the node cannot accept so many ASKED notifications from the same node
ask.too-often the node cannot accept so many ASKED notifications over a short period of time

People

Information related to other nodes.

get_people_general()

Get general information about other nodes.

Parameters:
Return value:
types.PeopleGeneralInfo
Authentication: read more
optional

Plugins

Plugins are web applications that integrate closely with the node or with the server as whole. Authenticating as root admin or node admin, they may perform operations, receive internal events, extend node API with new requests and add their own settings to the list of node settings. Every plugin registers its URL with the node, and the node uses this URL to call it when necessary.

register_plugin(plugin)

Register the plugin. If the plugin authenticates as root admin, the plugin is registered at the server level. If the plugin authenticates as node admin, the plugin is registered at the node level.

Parameters:
plugintypes.PluginDescription
Return value:
types.PluginInfo
Authentication: read more
root admin or admin
Errors:
Code Description
plugin.already-exists plugin with this name is already registered

get_plugins()

Get information about all plugins registered for the node and server.

Parameters:
Return value:
List[types.PluginInfo]
Authentication: read more
optional

get_plugin(plugin_name)

Get information about the plugin.

Parameters:
plugin_namestr – name of the plugin
Return value:
types.PluginInfo
Authentication: read more
optional
Errors:
Code Description
plugin.unknown unknown plugin

unregister_plugin(plugin_name)

Unregister the plugin.

Parameters:
plugin_namestr – name of the plugin
Return value:
types.Result
Authentication: read more
root admin or admin
Errors:
Code Description
plugin.unknown unknown plugin

Postings

All postings. Each posting may contain one or more revisions, a new revision is created every time the posting is updated. The latest revision is the current one, the previous ones are marked as deleted.

create_posting(posting)

Create a new posting from the text given and publish it in the given feeds (if any). The heading and the preview of the posting are created automatically, if needed. The posting owner must authenticate in some way. If the posting is not signed, it will be kept for a limited period of time and then erased. If authenticated as admin, the posting is signed by the node.

Parameters:
postingtypes.PostingText
Return value:
types.PostingInfo
Authentication: read more
required or signature

update_posting(id, posting)

Update the posting, creating a new revision of it. The text is processed just like in the POST request.

Parameters:
idstr – ID of the posting
postingtypes.PostingText
Return value:
types.PostingInfo
Authentication: read more
required or signature
Errors:
Code Description
posting.not-found there is no posting with the given ID
posting.not-original updating a non-original posting is not allowed

get_posting(id, with_source=False)

Get an individual posting.

Parameters:
idstr – ID of the posting
with_sourcebool(optional) include source text of the posting
Return value:
types.PostingInfo
Authentication: read more
optional
Errors:
Code Description
posting.not-found there is no posting with the given ID

delete_posting(id)

Delete the posting. The posting may not be purged from the database immediately, but preserved for some period of time to give a chance to restore it.

Parameters:
idstr – ID of the posting
Return value:
types.Result
Authentication: read more
optional
Errors:
Code Description
posting.not-found there is no posting with the given ID

get_postings_attached_to_posting(id)

Get all postings linked to media attached to the given posting.

Parameters:
idstr – ID of the posting
Return value:
List[types.PostingInfo]
Authentication: read more
optional
Errors:
Code Description
posting.not-found there is no posting with the given ID

Posting Revisions

All revisions of the posting.

get_posting_revisions(posting_id, limit=None)

Get all revisions of the posting, but not more than limit. The node may decide to return less revisions than the given limit.

Parameters:
posting_idstr – ID of the posting
limitint(optional) maximum number of revisions returned
Return value:
List[types.PostingRevisionInfo]
Authentication: read more
optional
Errors:
Code Description
posting.not-found there is no posting with the given ID

get_posting_revision(posting_id, id)

Get an individual revision of the posting.

Parameters:
posting_idstr – ID of the posting
idstr – ID of the revision
Return value:
types.PostingRevisionInfo
Authentication: read more
optional
Errors:
Code Description
posting.not-found there is no posting with the given ID
posting-revision.not-found there is no revision with the given ID

restore_posting_revision(posting_id, id)

Restore a revision of the posting. A new revision is created with the same content as in the given revision.

Parameters:
posting_idstr – ID of the posting
idstr – ID of the revision
Return value:
types.PostingRevisionInfo
Authentication: read more
admin
Errors:
Code Description
posting.not-found there is no posting with the given ID
posting-revision.not-found there is no revision with the given ID
posting-revision.already-current the given revision is already the current one

Posting Reactions

Reactions ("Likes") - simple textless answers to a posting.

create_posting_reaction(posting_id, reaction)

Add a reaction to the given posting. The reaction owner must authenticate in some way. Only one reaction is allowed from each owner to a particular posting. If a reaction from the same owner to this posting already exists, it is overwritten. If the reaction is not signed, the reaction will be kept for a limited period of time and then erased (the previous reaction of the same owner will be restored, if any).

Parameters:
posting_idstr – ID of the posting
reactiontypes.ReactionDescription
Return value:
types.ReactionCreated
Authentication: read more
required or signature
Errors:
Code Description
posting.not-found there is no posting with the given ID
posting.not-signed the posting is not signed, so it is impossible to add reactions to it
reaction.not-accepted the reaction is not acceptable

get_posting_reactions_slice(posting_id, negative=None, emoji=None, before=None, limit=None)

Get a slice of the list of reactions to the given posting, optionally filtered by reaction type, delimited by before moment and the given limit. If before is not provided, the latest reactions are returned. The node may decide to return less reactions than the given limit. The reactions are always sorted by moment, descending.

Parameters:
posting_idstr – ID of the posting
negativebool(optional) True, to filter negative reactions, False, to filter positive ones
emojiint(optional) filter by reaction code, usually interpreted by clients as emoji code point
beforeint(optional) filter reactions created at or before this moment
limitint(optional) maximum number of reactions returned
Return value:
types.ReactionsSliceInfo
Authentication: read more
optional
Errors:
Code Description
posting.not-found there is no posting with the given ID
limit.invalid limit parameter has an invalid value

update_posting_reaction(posting_id, owner_name, reaction)

Update the reaction's operations or set operations' overrides.

Parameters:
posting_idstr – ID of the posting
owner_namestr – reaction owner node name
reactiontypes.ReactionOverride
Return value:
types.ReactionInfo
Authentication: read more
optional
Errors:
Code Description
posting.not-found there is no posting with the given ID

get_posting_reaction(posting_id, owner_name)

Get the detailed information about the reaction of the given owner to the given posting. If no reaction with such owner exist, an empty structure with just postingId is returned.

Parameters:
posting_idstr – ID of the posting
owner_namestr – reaction owner node name
Return value:
types.ReactionInfo
Authentication: read more
optional
Errors:
Code Description
posting.not-found there is no posting with the given ID

delete_all_posting_reactions(posting_id)

Delete all reactions to the given posting.

Parameters:
posting_idstr – ID of the posting
Return value:
types.Result
Authentication: read more
optional
Errors:
Code Description
posting.not-found there is no posting with the given ID

delete_posting_reaction(posting_id, owner_name)

Delete the reaction of the given owner to the given posting.

Parameters:
posting_idstr – ID of the posting
owner_namestr – reaction owner node name
Return value:
types.ReactionTotalsInfo
Authentication: read more
optional
Errors:
Code Description
posting.not-found there is no posting with the given ID

search_posting_reactions(filter)

Search reactions by criteria provided. Both reaction owner and at least one posting ID should be provided to search, otherwise an empty list is returned.

Parameters:
filtertypes.ReactionsFilter
Return value:
List[types.ReactionInfo]
Authentication: read more
optional

Posting Reaction Totals

Summary of reactions to a posting.

get_posting_reaction_totals(posting_id)

Get summary of reactions to the posting given.

Parameters:
posting_idstr – ID of the posting
Return value:
types.ReactionTotalsInfo
Authentication: read more
optional
Errors:
Code Description
posting.not-found there is no posting with the given ID

search_posting_reaction_totals(filter)

Search summaries of reactions by criteria provided. At least one posting ID should be provided to search, otherwise an empty list is returned.

Parameters:
filtertypes.ReactionTotalsFilter
Return value:
List[types.ReactionTotalsInfo]
Authentication: read more
optional

Profile

The profile - the detailed information about the node's owner, node's purpose etc.

get_profile(with_source=False)

Get the profile.

Parameters:
with_sourcebool(optional) include source text of the bio
Return value:
types.ProfileInfo
Authentication: read more
optional

update_profile(profile)

Update the profile. Fields that are not set in the request body are left intact. Fields that are set to an empty value are reset to their defaults.

Parameters:
profiletypes.ProfileAttributes
Return value:
types.ProfileInfo
Authentication: read more
admin

Provider

Communication with the provider (owner of the server).

get_delete_node_request_status()

Get the current status of the request to delete the node.

Parameters:
Return value:
types.DeleteNodeStatus
Authentication: read more
admin

send_delete_node_request(delete_node_text)

Send a request to the provider to delete the node.

Parameters:
delete_node_texttypes.DeleteNodeText
Return value:
types.DeleteNodeStatus
Authentication: read more
admin

cancel_delete_node_request()

Cancel the request to delete the node.

Parameters:
Return value:
types.DeleteNodeStatus
Authentication: read more
admin

Proxy

Proxy, that may be used by web clients to workaround CORS restrictions of browsers

proxy_media(url)

Open the URL passed in the parameters and pass to the client the media file returned by the server.

Parameters:
urlstr
Return value:
blob
Authentication: read more
admin
Errors:
Code Description
proxy.request-failed HTTP request failed
proxy.resource-not-found resource is not found
proxy.resource-not-media resource is not a media file
proxy.error-status HTTP request returned an error status
proxy.url.invalid the URL is not valid

proxy_link_preview(url)

Parse the page located at the URL and return the title, the description and the picture that may be used to build a preview of the page.

Parameters:
urlstr
Return value:
types.LinkPreviewInfo
Authentication: read more
admin
Errors:
Code Description
proxy.resource-not-found resource is not found

Push Notifications

SSE channels for delivering push notifications from the home node. When a client opens an SSE connection for the first time, an individual push notifications channel for this client is created (every client must generate a unique random identifier for its channel). After that, push notifications are stacked for this channel and the client should poll the channel periodically (or keep it open constantly) to receive them. If the client does not poll the channel for a long time, the channel is deleted.

Push Relay

Moera network uses dedicated Push Relay servers that accept push messages from nodes and route them to their clients. Read more in the Push Relay API chapter.

register_at_push_relay(attributes)

Register a client at the push relay server to receive messages from this node. The operation is synchronous.

Parameters:
attributestypes.PushRelayClientAttributes
Return value:
types.Result
Authentication: read more
admin
Errors:
Code Description
push-relay.error push relay service returned an error

Remote Ask

The node may send requests to other nodes asking to subscribe to it, to add it to friends etc.

ask_remote_node(node_name, details)

Send a request to the remote node.

Parameters:
node_namestr – name of the remote node
detailstypes.AskDescription
Return value:
types.Result
Authentication: read more
admin

Remote Comments

Comments to postings located on other nodes.

create_remote_comment(node_name, posting_id, comment)

Add a comment to the posting on the remote node and register it in the registry at the local node.

Parameters:
node_namestr – name of the remote node
posting_idstr – ID of the posting on the remote node
commenttypes.CommentSourceText
Return value:
types.Result
Authentication: read more
admin

update_remote_comment(node_name, posting_id, comment_id, comment)

Update a comment to the posting on the remote node.

Parameters:
node_namestr – name of the remote node
posting_idstr – ID of the posting on the remote node
comment_idstr – ID of the comment on the remote node
commenttypes.CommentSourceText
Return value:
types.Result
Authentication: read more
admin

delete_remote_comment(node_name, posting_id, comment_id)

Delete a comment from the registry of all comments at the local node.

Parameters:
node_namestr – name of the remote node
posting_idstr – ID of the posting on the remote node
comment_idstr – ID of the comment on the remote node
Return value:
types.Result
Authentication: read more
admin

verify_remote_comment(node_name, posting_id, comment_id)

Verify the signature of the given comment to the posting on the remote node.

Parameters:
node_namestr – name of the remote node
posting_idstr – ID of the posting on the remote node
comment_idstr – ID of the comment on the remote node
Return value:
types.AsyncOperationCreated
Authentication: read more
admin

Remote Comment Reactions

Reactions to comments located on other nodes.

create_remote_comment_reaction(node_name, posting_id, comment_id, reaction)

Add a reaction to the comment on the remote node and register it in the registry at the local node.

Parameters:
node_namestr – name of the remote node
posting_idstr – ID of the posting on the remote node
comment_idstr – ID of the comment on the remote node
reactiontypes.ReactionAttributes
Return value:
types.Result
Authentication: read more
admin

delete_remote_comment_reaction(node_name, posting_id, comment_id)

Delete a reaction from the registry of all reactions at the local node.

Parameters:
node_namestr – name of the remote node
posting_idstr – ID of the posting on the remote node
comment_idstr – ID of the comment on the remote node
Return value:
types.Result
Authentication: read more
admin

verify_remote_comment_reaction(node_name, posting_id, comment_id, owner_name)

Verify the signature of the reaction of the given owner to the comment on the remote node.

Parameters:
node_namestr – name of the remote node
posting_idstr – ID of the posting on the remote node
comment_idstr – ID of the comment on the remote node
owner_namestr – reaction owner node name
Return value:
types.AsyncOperationCreated
Authentication: read more
admin

Remote Postings

Postings located on other nodes.

create_remote_posting(node_name, posting)

Add a posting to the remote node and register it in the registry at the local node.

Parameters:
node_namestr – name of the remote node
postingtypes.PostingSourceText
Return value:
types.Result
Authentication: read more
admin

update_remote_posting(node_name, posting_id, posting)

Update a posting on the remote node.

Parameters:
node_namestr – name of the remote node
posting_idstr – ID of the posting on the remote node
postingtypes.PostingSourceText
Return value:
types.Result
Authentication: read more
admin

delete_remote_posting(node_name, posting_id)

Delete a posting from the registry of all remote postings at the local node.

Parameters:
node_namestr – name of the remote node
posting_idstr – ID of the posting on the remote node
Return value:
types.Result
Authentication: read more
admin

verify_remote_posting(node_name, id)

Verify the signature of the given posting.

Parameters:
node_namestr – name of the remote node
idstr – ID of the posting on the remote node
Return value:
types.AsyncOperationCreated
Authentication: read more
admin

verify_remote_posting_revision(node_name, id, revision_id)

Verify the signature of the given revision of a posting.

Parameters:
node_namestr – name of the remote node
idstr – ID of the posting on the remote node
revision_idstr – ID of the posting revision
Return value:
types.AsyncOperationCreated
Authentication: read more
admin

Remote Posting Reactions

Reactions to postings located on other nodes.

create_remote_posting_reaction(node_name, posting_id, reaction)

Add a reaction to the posting on the remote node and register it in the registry at the local node.

Parameters:
node_namestr – name of the remote node
posting_idstr – ID of the posting on the remote node
reactiontypes.ReactionAttributes
Return value:
types.Result
Authentication: read more
admin

delete_remote_posting_reaction(node_name, posting_id)

Delete a reaction from the registry of all reactions at the local node.

Parameters:
node_namestr – name of the remote node
posting_idstr – ID of the posting on the remote node
Return value:
types.Result
Authentication: read more
admin

verify_remote_posting_reaction(node_name, posting_id, owner_name)

Verify the signature of the reaction of the given owner to the posting on the remote node.

Parameters:
node_namestr – name of the remote node
posting_idstr – ID of the posting on the remote node
owner_namestr – reaction owner node name
Return value:
types.AsyncOperationCreated
Authentication: read more
admin

Remote Sheriff Orders

Sheriff API to send orders to remote nodes. Add orders are stored on the sheriff's node and may be requested by anybody.

create_remote_sheriff_order(node_name, sheriff_order)

Sign and send the order to the remote node and store it in the registry at the local node.

Parameters:
node_namestr – name of the remote node
sheriff_ordertypes.SheriffOrderAttributes
Return value:
types.Result
Authentication: read more
admin

get_remote_sheriff_order(node_name, id)

Get the details of the given sheriff's order

Parameters:
node_namestr – name of the remote node
idstr – ID of the order
Return value:
types.SheriffOrderInfo
Authentication: read more
none
Errors:
Code Description
sheriff-order.not-found sheriff's order is not found
sheriff-order.wrong-node the sheriff's order is related to a different node

Settings

Settings - the node and client settings. The node settings affect the node behavior. Only those settings are accepted that are known by the node, and their values are validated before saving. The node settings metadata can be obtained by request. The client settings are saved without validation and their metadata is built into the client. All client settings must have names starting with client. to distinguish them from the node ones. By convention, the client name is added to the prefix (client.<client name>.) to be able to store settings of several different clients at the same time.

update_settings(settings)

Update the given settings. If the input contains node settings, they are validated and the first validation error is returned, if any. The update is always performed as whole - if there is an error saving any one of the settings in the input, none of them are updated.

If one of the settings to be updated is privileged, root secret authentication is required. If one of the settings to be updated is non-privileged, admin authentication is required.

Parameters:
settingsList[types.SettingInfo]
Return value:
types.Result
Authentication: read more
admin or root admin
Errors:
Code Description
setting.deserialization-failed setting value deserialization failed
setting.cannot-convert cannot convert value to the setting type
setting.invalid-value invalid value for the setting
setting.internal cannot set value of an internal setting
setting.unknown unknown setting

get_client_settings(prefix=None)

Get all client settings, sorted by name.

Parameters:
prefixstr(optional) filter settings whose names start with the given prefix, case-sensitive (client. prefix must be included)
Return value:
List[types.SettingInfo]
Authentication: read more
admin

get_node_settings(prefix=None)

Get all node settings, sorted by name. If a setting has not changed its value from the default, it is omitted.

Parameters:
prefixstr(optional) filter settings whose names start with the given prefix, case-sensitive
Return value:
List[types.SettingInfo]
Authentication: read more
admin

get_node_settings_metadata(prefix=None)

Get all node settings metadata, sorted by name.

Parameters:
prefixstr(optional) filter settings whose names start with the given prefix, case-sensitive
Return value:
List[types.SettingMetaInfo]
Authentication: read more
admin

update_node_settings_metadata(metadata)

Update node settings metadata, overriding built-in defaults.

Parameters:
metadataList[types.SettingMetaAttributes]
Return value:
types.Result
Authentication: read more
root admin
Errors:
Code Description
setting.deserialization-failed setting value deserialization failed
setting.cannot-convert cannot convert value to the setting type
setting.invalid-value invalid value for the setting
setting.internal cannot set value of an internal setting
setting.unknown unknown setting
setting.plugin plugin setting metadata cannot be modified

Sheriff Complaint Groups

Similar complaints sent to the sheriff are grouped together and the sheriff makes decisions on a group as whole. Read more about sheriff supervision in the Architecture Overview section.

get_sheriff_complaint_groups_slice(after=None, before=None, limit=None, status=None)

Get a slice of the list of groups of complaints, optionally filtered by status, delimited by before or after moment and the given limit. If neither before nor after are provided, the latest groups are returned. The node may decide to return less groups than the given limit. The groups are always sorted by moment, descending.

Parameters:
afterint(optional) filter groups created strongly after this moment
beforeint(optional) filter groups created at or before this moment
limitint(optional) maximum number of groups returned
statustypes.SheriffComplainStatus(optional) filter groups by status
Return value:
types.SheriffComplainGroupsSliceInfo
Authentication: read more
none
Errors:
Code Description
sheriff-complain-groups.before-after-exclusive before and after parameters are mutually exclusive

get_sheriff_complaint_group(id)

Get details of the given group of complaints.

Parameters:
idstr – ID of the group of complaints
Return value:
types.SheriffComplainGroupInfo
Authentication: read more
none
Errors:
Code Description
sheriff-complain-group.not-found

get_sheriff_complaints_by_group(id)

Get complaints included into the given group of complaints.

Parameters:
idstr – ID of the group of complaints
Return value:
List[types.SheriffComplainInfo]
Authentication: read more
none
Errors:
Code Description
sheriff-complain-group.not-found

update_sheriff_complaint_group(id, decision)

Make decision on the given group of complaints.

Parameters:
idstr – ID of the group of complaints
decisiontypes.SheriffComplainDecisionText
Return value:
types.SheriffComplainGroupInfo
Authentication: read more
admin
Errors:
Code Description
sheriff-complain-group.not-found

Sheriff Complaints

Complaints are sent to the sheriff via sheriff's node. Read more about sheriff supervision in the Architecture Overview section.

create_sheriff_complaint(complaint)

Send a complaint to the sheriff.

Parameters:
complainttypes.SheriffComplainText
Return value:
types.SheriffComplainInfo
Authentication: read more
required

Sheriff Orders

Orders sent by a sheriff to the node. The node must obey the orders if it accepted supervision by the sheriff. Read more about sheriff supervision in the Architecture Overview section.

create_sheriff_order(sheriff_order)

Receive and execute the sheriff's order.

Parameters:
sheriff_ordertypes.SheriffOrderDetails
Return value:
types.Result
Authentication: read more
signature
Errors:
Code Description
sheriff-order.wrong-feed the posting is not included into the designated feed
posting.not-found posting is not found
posting.not-signed posting is not signed
comment.not-found comment is not found
comment.wrong-posting comment is located under a different posting

Stories

All stories. Each story describes something happening in Moera, stories are building blocks for feeds. All stories have the same structure, but the meaning of fields depends on the story type. A story may reference a posting, a remote object, etc. Some feeds may not allow some types of stories.

get_story(id)

Get an individual story.

Parameters:
idstr – ID of the story
Return value:
types.StoryInfo
Authentication: read more
optional
Errors:
Code Description
story.not-found there is no story with the given ID

update_story(id, story)

Update the story.

Parameters:
idstr – ID of the story
storytypes.StoryAttributes
Return value:
types.StoryInfo
Authentication: read more
admin
Errors:
Code Description
story.not-found there is no story with the given ID

Subscribers

All nodes that have subscribed to notifications from this node.

get_subscribers(node_name=None, type=None, feed_name=None, entry_id=None)

Get the list of all subscribers, optionally filtered by some criteria.

Parameters:
node_namestr(optional) filter by subscribed node name
typetypes.SubscriptionType(optional) filter by subscription type
feed_namestr(optional) filter by name of the feed subscribed to
entry_idstr(optional) filter by ID of the entry subscribed to
Return value:
List[types.SubscriberInfo]
Authentication: read more
optional

create_subscriber(subscriber)

Subscribe to a particular group of notifications.

Parameters:
subscribertypes.SubscriberDescription
Return value:
types.SubscriberInfo
Authentication: read more
required

get_subscriber(id)

Get an individual subscriber.

Parameters:
idstr – ID of the subscriber
Return value:
types.SubscriberInfo
Authentication: read more
optional
Errors:
Code Description
subscriber.not-found there is no subscriber with the given ID

update_subscriber(id, subscriber)

Update the subscriber's operations or set operations' overrides.

Parameters:
idstr – ID of the subscriber
subscribertypes.SubscriberOverride
Return value:
types.SubscriberInfo
Authentication: read more
required
Errors:
Code Description
subscriber.not-found there is no subscriber with the given ID

delete_subscriber(id)

Delete the subscriber and return the updated information about the node that was subscribed.

Parameters:
idstr – ID of the subscriber
Return value:
types.ContactInfo
Authentication: read more
optional
Errors:
Code Description
subscriber.not-found there is no subscriber with the given ID

Subscriptions

All nodes that send notifications to this node.

get_subscriptions(node_name=None, type=None)

Get the list of all subscriptions, optionally filtered by some criteria.

Parameters:
node_namestr(optional) filter by node name
typetypes.SubscriptionType(optional) filter by subscription type
Return value:
List[types.SubscriptionInfo]
Authentication: read more
optional

create_subscription(subscription)

Register a subscription to notifications from a particular node.

Parameters:
subscriptiontypes.SubscriptionDescription
Return value:
types.SubscriptionInfo
Authentication: read more
admin
Errors:
Code Description
subscription.already-exists an identical subscription already exists

update_subscription(id, subscription)

Update the subscription's operations or set operations' overrides.

Parameters:
idstr – ID of the subscription
subscriptiontypes.SubscriptionOverride
Return value:
types.SubscriptionInfo
Authentication: read more
required
Errors:
Code Description
subscription.not-found there is no subscription with the given ID

delete_subscription(id)

Delete the subscription and return the updated information about the node that was subscribed to.

Parameters:
idstr – ID of the subscription
Return value:
types.ContactInfo
Authentication: read more
admin
Errors:
Code Description
subscription.not-found there is no subscription with the given parameters.

search_subscriptions(filter)

Search for subscriptions by the given criteria.

Parameters:
filtertypes.SubscriptionFilter
Return value:
List[types.SubscriptionInfo]
Authentication: read more
optional
Errors:
Code Description
subscription.filter.incomplete the filter should contain at least one feed or posting

Tokens

The authentication token. Read more about token-based authentication.

get_tokens()

Get the list of all existing tokens.

Parameters:
Return value:
List[types.TokenInfo]
Authentication: read more
admin

create_token(token)

Sign in and create a token.

Parameters:
tokentypes.TokenAttributes
Return value:
types.TokenInfo
Authentication: read more
none
Errors:
Code Description
credentials.not-created credentials are not created yet
credentials.login-incorrect login or password is incorrect

get_token_info(id)

Get information about the token.

Parameters:
idstr – ID of the token
Return value:
types.TokenInfo
Authentication: read more
admin

update_token(id, token)

Update the name of the token.

Parameters:
idstr – ID of the token
tokentypes.TokenName
Return value:
types.TokenInfo
Authentication: read more
admin

delete_token(id)

Delete the token.

Parameters:
idstr – ID of the token
Return value:
types.Result
Authentication: read more
admin

User Lists

Any node may keep lists of users, and all other nodes can read these lists, search in them and subscribe to them to receive notifications about changes. The lists may be used, for example, to fight spam or to create decentralized communities. The sheriff uses such a list to inform all nodes that some specific user violates the rules too often, and because of that all his comments should be marked by the sheriff's mark automatically.

get_user_list_general(name)

Get the general information about the user list given.

Parameters:
namestr – the name of the list
Return value:
types.UserListInfo
Authentication: read more
none

get_user_list_slice(name, after=None, before=None, limit=None)

Get a slice of the user list, delimited by before or after moment and the given limit. If neither before nor after are provided, the latest items are returned. The node may decide to return less items than the given limit. The items are always sorted by moment, descending.

Parameters:
namestr – the name of the list
afterint(optional) filter items created strongly after this moment
beforeint(optional) filter items created at or before this moment
limitint(optional) maximum number of items returned
Return value:
types.UserListSliceInfo
Authentication: read more
none
Errors:
Code Description
user-list-items.before-after-exclusive before and after parameters are mutually exclusive

get_user_list_item(name, node_name)

Get the information from the user list about the node given.

Parameters:
namestr – the name of the list
node_namestr – the node name to get information about
Return value:
types.UserListItemInfo
Authentication: read more
none
Errors:
Code Description
user-list-item.not-found user list item is not found

create_user_list_item(name, item)

Add a node to the user list.

Parameters:
namestr – the name of the list
itemtypes.UserListItemAttributes
Return value:
types.UserListItemInfo
Authentication: read more
admin
Errors:
Code Description
user-list-item.already-exists node is in the user list already

delete_user_list_item(name, node_name)

Delete a node from the user list

Parameters:
namestr – the name of the list
node_namestr – the node name to delete
Return value:
types.Result
Authentication: read more
admin
Errors:
Code Description
user-list-item.not-found user list item is not found

Who Am I

Brief information about the node.

who_am_i()

Get brief information about the node.

Parameters:
Return value:
types.WhoAmI
Authentication: read more
none


Structures

types.AcceptedReactions

Field Name Type Description
positive str comma-separated list of codes of the positive reactions that are accepted; a code may be prefixed by 0x to designate hexadecimal number and + to designate a recommended reaction
negative str comma-separated list of codes of the negative reactions that are accepted (the format is the same as above)

types.ActivityReactionFilter

Field Name Type Description
postings List[types.RemotePosting] (optional) include only reactions to remote postings from this list

types.ActivityReactionInfo

Field Name Type Description
remote_node_name str name of the remote node
remote_full_name str (optional) full name of the remote node
remote_avatar types.AvatarImage (optional) avatar of the remote node
remote_posting_id str ID of the posting on the remote node
negative bool True, if the reaction is negative, False, if positive
emoji int reaction code, usually interpreted by clients as emoji code point
created_at Timestamp reaction creation timestamp - the real time when the reaction was created

types.AskDescription

Field Name Type Description
subject types.AskSubject request subject
friend_group_id str (optional) if the request is to add this node to friends, this field contains ID of the corresponding group of friends on the remote node
message str (optional) message to the node admin
Validation errors:
Code Description
askDescription.friendGroupId.blank friend group ID is empty
askDescription.friendGroupId.wrong-size friend group ID is too long
askDescription.message.wrong-size message is too long

types.AsyncOperationCreated

Field Name Type Description
id str ID of the asynchronous operation that was created

types.AvatarAttributes

Field Name Type Description
media_id str ID of the public media file used as a source image
clip_x int x coordinate of the top-left corner of the clipping square
clip_y int y coordinate of the top-left corner of the clipping square
clip_size int size of the clipping square
avatar_size int size of the avatar to be created
rotate float rotation angle of the source image
shape str (optional) shape of the avatar
ordinal int (optional) ordinal of the avatar
Validation errors:
Code Description
avatarAttributes.mediaId.blank media ID is not set
avatarAttributes.mediaId.not-found the source media is not found
avatarAttributes.clipX.out-of-range clipping area left side is out of the image bounds
avatarAttributes.clipY.out-of-range clipping area top side is out of the image bounds
avatarAttributes.clipSize.out-of-range clipping area size is out of range (usually too small)
avatarAttributes.avatarSize.out-of-range avatar size is out of range (usually too small)

types.AvatarDescription

Field Name Type Description
media_id str ID of the public media file used as an avatar image
shape str shape of the avatar
optional bool (optional) if set to True, the node will ignore the absence of the media file referenced in mediaId field (empty avatar will be used in this case); if set to False or absent, the node will return an error, if the media file referenced in mediaId field is absent

types.AvatarImage

Field Name Type Description
media_id str ID of the media file
path str virtual location of the media file, relative to the /media virtual page
width int (optional) width of the media in pixels (None, if the media file is not an image/video)
height int (optional) height of the media in pixels (None, if the media file is not an image/video)
shape str (optional) shape of the avatar

types.AvatarInfo

Field Name Type Description
id str ID of the avatar
media_id str ID of the media file
path str virtual location of the media file, relative to the /media virtual page
width int (optional) width of the media in pixels (None, if the media file is not an image/video)
height int (optional) height of the media in pixels (None, if the media file is not an image/video)
shape str (optional) shape of the avatar
ordinal int ordinal of the avatar

types.AvatarOrdinal

Field Name Type Description
id str ID of the avatar
ordinal int ordinal of the avatar

types.AvatarsOrdered

Field Name Type Description
ids List[str] IDs of avatars

types.BlockedByUserFilter

Field Name Type Description
blocked_operations List[types.BlockedOperation] (optional) operations that are blocked
postings List[types.RemotePostingOrNode] (optional) the postings or whole nodes, where the node is blocked
strict bool (optional) if set to True, only the blockings that strictly fit the criteria are returned; otherwise global blockings are returned even if the search is limited to a particular posting

types.BlockedByUserInfo

Field Name Type Description
id str
blocked_operation types.BlockedOperation operation that is blocked
contact types.ContactInfo (optional) information known about the blocking node
node_name str name of the blocking node
posting_id str (optional) ID of the posting, where the node is blocked; None or absent, if the node is blocked globally
created_at Timestamp blocking timestamp - the real time when the node was blocked
deadline Timestamp (optional) unblocking timestamp - the real time when the node will be unblocked; None or absent, if the node is blocked permanently
reason str (optional) reason of blocking

types.BlockedInstantAttributes

Field Name Type Description
story_type types.StoryType type of the story
entry_id str (optional) ID of the local entry the blocked story should be related to
remote_node_name str (optional) node name of the remote posting the blocked story should be related to
remote_posting_id str (optional) ID of the remote posting the blocked story should be related to
remote_owner_name str (optional) owner name of the remote object the blocked story should be related to
deadline Timestamp (optional) unblocking timestamp - the real time when the story will be unblocked; None or absent, if the story is blocked permanently
Validation errors:
Code Description
blockedInstantAttributes.storyType.blank story type is not set

types.BlockedInstantFilter

Field Name Type Description
story_type types.StoryType type of the story
entry_id str (optional) ID of the local entry the blocked story should be related to
remote_node_name str (optional) node name of the remote posting the blocked story should be related to
remote_posting_id str (optional) ID of the remote posting the blocked story should be related to
remote_owner_name str (optional) owner name of the remote object the blocked story should be related to

types.BlockedInstantInfo

Field Name Type Description
id str
story_type types.StoryType type of the story
entry_id str (optional) ID of the local entry the blocked story should be related to
remote_node_name str (optional) node name of the remote posting the blocked story should be related to
remote_posting_id str (optional) ID of the remote posting the blocked story should be related to
remote_owner_name str (optional) owner name of the remote object the blocked story should be related to
created_at Timestamp blocking timestamp - the real time when the story was blocked
deadline Timestamp (optional) unblocking timestamp - the real time when the story will be unblocked; None or absent, if the story is blocked permanently

types.BlockedPostingInstantInfo

Field Name Type Description
id str
story_type types.StoryType type of the story
remote_owner_name str (optional) owner name of the remote object the blocked story should be related to
deadline Timestamp (optional) unblocking timestamp - the real time when the story will be unblocked; None or absent, if the story is blocked permanently

types.BlockedUserAttributes

Field Name Type Description
blocked_operation types.BlockedOperation operation that is to be blocked
node_name str name of the blocked node
entry_id str (optional) ID of the local entry, where the node is blocked; None or absent, if the node is blocked globally
entry_node_name str (optional) node name of the remote posting, where the node is blocked; None or absent, if the node is blocked globally
entry_posting_id str (optional) ID of the remote posting, where the node is blocked; None or absent, if the node is blocked globally
deadline Timestamp (optional) unblocking timestamp - the real time when the node will be unblocked; None or absent, if the node is blocked permanently
reason_src str (optional) source text of the reason of blocking
reason_src_format types.SourceFormat (optional) format of the source text of the reason of blocking, the list of available formats is returned in PostingFeatures
Validation errors:
Code Description
blockedUserAttributes.blockedOperation.blank blocked operation is not set
blockedUserAttributes.reasonSrc.wrong-size reason is too long

types.BlockedUserFilter

Field Name Type Description
blocked_operations List[types.BlockedOperation] (optional) operations that are blocked
node_name str (optional) name of the blocked node
entry_id str (optional) ID of the local entry, where the node is blocked; None or absent, if the node is blocked globally
entry_node_name str (optional) node name of the remote posting, where the node is blocked; None or absent, if the node is blocked globally
entry_posting_id str (optional) ID of the remote posting, where the node is blocked; None or absent, if the node is blocked globally
strict bool (optional) if set to True, only the blockings that strictly fit the criteria are returned; otherwise global blockings are returned even if the search is limited to a particular posting

types.BlockedUserInfo

Field Name Type Description
id str
blocked_operation types.BlockedOperation operation that is blocked
node_name str name of the blocked node
contact types.ContactInfo (optional) information known about the blocked node
entry_id str (optional) ID of the local entry, where the node is blocked; None or absent, if the node is blocked globally
entry_node_name str (optional) node name of the remote posting, where the node is blocked; None or absent, if the node is blocked globally
entry_posting_id str (optional) ID of the remote posting, where the node is blocked; None or absent, if the node is blocked globally
created_at Timestamp blocking timestamp - the real time when the node was blocked
deadline Timestamp (optional) unblocking timestamp - the real time when the node will be unblocked; None or absent, if the node is blocked permanently
reason_src str (optional) source text of the reason of blocking
reason_src_format types.SourceFormat (optional) format of the source text of the reason of blocking, the list of available formats is returned in PostingFeatures
reason str (optional) reason of blocking

types.BlockedUsersChecksums

Field Name Type Description
visibility int checksum of the list of users that are hidden

types.Body

Field Name Type Description
subject str (optional) the subject (plain text)
text str (optional) the text (HTML)
link_previews List[types.LinkPreview] (optional) link previews

types.CarteInfo

Field Name Type Description
carte str
beginning Timestamp timestamp of the beginning of the carte's life
deadline Timestamp timestamp of the end of the carte's life
permissions List[str] (optional) the list of permissions granted to the carte; the possible values are:
  • other - any other permission not listed below;
  • view-media - view media files.

types.CarteSet

Field Name Type Description
cartes_ip str (optional) the client IP address the cartes are bound to
cartes List[types.CarteInfo] the cartes
created_at Timestamp cartes creation timestamp

types.ClientReactionInfo

Field Name Type Description
negative bool True, if the reaction is negative, False, if positive
emoji int reaction code, usually interpreted by clients as emoji code point
created_at Timestamp reaction creation timestamp - the real time when the reaction was created
deadline Timestamp (optional) if present, the reaction will be erased at this time

types.CommentCreated

Field Name Type Description
comment types.CommentInfo details of the comment created
total int total number of comments in the posting after the creation

types.CommentInfo

Field Name Type Description
id str
owner_name str node name of the comment's owner
owner_full_name str (optional) full name of the comment's owner
owner_gender str (optional) gender of the comment's owner
owner_avatar types.AvatarImage (optional) avatar of the comment's owner
posting_id str ID of the parent posting of the comment
posting_revision_id str ID of the revision of parent posting that was current when the comment was created
revision_id str ID of the current revision of the comment
total_revisions int total number of revisions the comment has
body_preview types.Body (optional) preview of the comment's body, a string representation of a JSON structure
body_src types.Body (optional) the source text of the comment, a string representation of a JSON structure, may be absent if not requested
body_src_hash bytes hash of the source text of the comment
body_src_format types.SourceFormat (optional) format of the source text of the comment, the list of available formats is returned in PostingFeatures
body types.Body body of the comment, a string representation of a JSON structure
body_format types.BodyFormat (optional) format of the body of the comment, may have any value meaningful for the client
media List[types.MediaAttachment] (optional) list of the media attached to the comment
heading str heading of the comment
replied_to types.RepliedTo (optional) information about the comment this comment is replying to
moment int
created_at Timestamp comment creation timestamp - the real time when the comment was created
edited_at Timestamp (optional) comment editing timestamp - the last time the comment was updated
deleted_at Timestamp (optional) comment deletion timestamp - the time when the comment was deleted
revision_created_at Timestamp creation timestamp of the current revision of the comment
deadline Timestamp (optional) comment purging timestamp - the time when the deleted comment will be purged from the database
digest bytes (optional) cryptographic digest of the comment (use Comment fingerprint)
signature bytes (optional) the comment's owner signature (use Comment fingerprint)
signature_version int (optional) signature version (i.e. fingerprint version)
operations types.CommentOperations (optional) the supported operations and the corresponding principals
reaction_operations types.ReactionOperations (optional) the operations and the corresponding principals that are overridden in reactions to the comment
owner_operations types.CommentOperations (optional) the supported operations and the corresponding principals as defined by the comment's owner
senior_operations types.CommentOperations (optional) the operations and the corresponding principals that are overridden by the posting's owner ("senior")
blocked_operations List[types.BlockedEntryOperation] (optional) operations on the comment that are blocked for the client
sheriff_marks List[types.SheriffMark] (optional) list of sheriff marks on the comment
accepted_reactions types.AcceptedReactions (optional) types of reactions that the comment accepts
client_reaction types.ClientReactionInfo (optional) details of the existing reaction (if any) of the client's owner
senior_reaction types.ClientReactionInfo (optional) details of the existing reaction (if any) of the posting's owner ("senior") to the comment
reactions types.ReactionTotalsInfo (optional) reactions summary of the comment

types.CommentMassAttributes

Field Name Type Description
senior_operations types.CommentOperations (optional) the operations and the corresponding principals that are overridden by the comment's owner ("senior")
Validation errors:
Code Description
commentMassAttributes.seniorOperations.wrong-principal principal for one of senior operations is invalid

types.CommentRevisionInfo

Field Name Type Description
id str
posting_revision_id str ID of the posting revision that was actual at the moment of creation of this comment revision
body_preview types.Body (optional) preview of the revision's body, a string representation of a JSON structure
body_src_hash bytes hash of the source text of the revision
body_src_format types.SourceFormat (optional) format of the source text of the revision, the list of available formats is returned in PostingFeatures
body types.Body body of the revision, a string representation of a JSON structure
body_format types.BodyFormat (optional) format of the body of the revision, may have any value meaningful for the client
heading str heading of the revision
created_at Timestamp revision creation timestamp - the real time when the revision was created
deleted_at Timestamp (optional) revision deletion timestamp - the time when the revision was deleted
deadline Timestamp (optional) revision deletion timestamp - the time when the revision will be deleted and the previous revision will take its place
digest bytes (optional) cryptographic digest of the revision (use Comment fingerprint)
signature bytes (optional) the comment's owner signature (use Comment fingerprint)
signature_version int (optional) signature version (i.e. fingerprint version)
client_reaction types.ClientReactionInfo (optional) details of the existing reaction (if any) of the client's owner
reactions types.ReactionTotalsInfo (optional) reactions summary of the revision

types.CommentsSliceInfo

Field Name Type Description
before int the slice contains all comments before this moment, inclusive. May be the far future.
after int the slice contains all comments after this moment, exclusive. May be the far past.
comments List[types.CommentInfo] the comments
total int total number of comments
total_in_past int number of comments before this slice till the far past
total_in_future int number of comments after this slice till the far future

types.CommentSourceText

Field Name Type Description
owner_avatar types.AvatarDescription (optional) avatar of the comment's owner
body_src types.Body (optional) the source text of the comment, a string representation of a JSON structure
body_src_format types.SourceFormat (optional) format of the source text of the comment, plain-text by default; the list of available formats is returned in PostingFeatures
media List[types.MediaWithDigest] (optional) array of IDs and digests of private media to be attached to the comment
accepted_reactions types.AcceptedReactions (optional) types of reactions that the comment accepts
replied_to_id str (optional) ID of the comment this comment is replying to
operations types.CommentOperations (optional) the operations and the corresponding principals
senior_operations types.CommentOperations (optional) the operations and the corresponding principals that are overridden by the posting's owner ("senior"); only the senior may set this
Validation errors:
Code Description
commentText.bodySrc.blank body text is empty
commentText.bodySrc.wrong-size body text is too long
commentText.bodySrc.wrong-encoding body text is formatted incorrectly
commentText.acceptedReactions.positive.wrong-size list of accepted positive reactions is too long
commentText.acceptedReactions.positive.wrong-pattern list of accepted positive reactions has wrong format
commentText.acceptedReactions.negative.wrong-size list of accepted negative reactions is too long
commentText.acceptedReactions.negative.wrong-pattern list of accepted negative reactions has wrong format

types.CommentText

Field Name Type Description
owner_name str (optional) node name of the comment's owner
owner_full_name str (optional) full name of the comment's owner
owner_gender str (optional) gender of the comment's owner
owner_avatar types.AvatarDescription (optional) avatar of the comment's owner
body_preview types.Body (optional) preview of the comment's body, a string representation of a JSON structure
body_src types.Body (optional) the source text of the comment, a string representation of a JSON structure
body_src_format types.SourceFormat (optional) format of the source text of the comment, plain-text by default; the list of available formats is returned in PostingFeatures
body types.Body (optional) body of the comment, a string representation of a JSON structure
body_format types.BodyFormat (optional) format of the body of the comment, may have any value meaningful for the client
media List[str] (optional) array of IDs of private media to be attached to the comment
created_at Timestamp (optional) comment creation timestamp - the real time when the comment was created
accepted_reactions types.AcceptedReactions (optional) types of reactions that the comment accepts
replied_to_id str (optional) ID of the comment this comment is replying to
signature bytes (optional) the comment's owner signature (use Comment fingerprint)
signature_version int (optional) signature version (i.e. fingerprint version)
operations types.CommentOperations (optional) the operations and the corresponding principals
reaction_operations types.ReactionOperations (optional) the operations and the corresponding principals that are overridden in reactions to the comment
senior_operations types.CommentOperations (optional) the operations and the corresponding principals that are overridden by the posting's owner ("senior"); only the senior may set this
Validation errors:
Code Description
commentText.ownerAvatar.mediaId.not-found owner's avatar is not found
commentText.bodySrc.blank body text is empty
commentText.bodySrc.wrong-size body text is too long
commentText.bodySrc.wrong-encoding body text is formatted incorrectly
commentText.bodySrcFormat.unknown unknown body text format
commentText.body.blank body is empty
commentText.body.wrong-size body is too long
commentText.body.wrong-encoding body encoding is incorrect
commentText.bodyPreview.wrong-encoding body preview encoding is incorrect
commentText.bodyFormat.blank body format is not set
commentText.bodyFormat.wrong-size body format is too long
commentText.media.not-found media attachment is not found
commentText.media.not-compressed media attachment is not compressed as the node requires, the parameters of the desired compression are returned in PostingFeatures
commentText.createdAt.blank body creation timestamp is not set
commentText.createdAt.out-of-range body creation timestamp is too far from the current timestamp
commentText.acceptedReactions.positive.wrong-size list of accepted positive reactions is too long
commentText.acceptedReactions.positive.wrong-pattern list of accepted positive reactions has wrong format
commentText.acceptedReactions.negative.wrong-size list of accepted negative reactions is too long
commentText.acceptedReactions.negative.wrong-pattern list of accepted negative reactions has wrong format
commentText.repliedToId.not-found comment referred in `repliedToId` is not found
commentText.operations.wrong-principal principal for one of operations is invalid
commentText.reactionOperations.wrong-principal principal for one of reaction operations is invalid
commentText.seniorOperations.wrong-principal principal for one of senior operations is invalid

types.CommentTotalInfo

Field Name Type Description
total int total number of comments in the posting after the operation

types.ContactInfo

Field Name Type Description
node_name str
full_name str (optional)
gender str (optional)
avatar types.AvatarImage (optional)
closeness float closeness of the contact to the node, which is calculated from the number of reactions and comments and their age
has_feed_subscriber bool (optional) the contact is subscribed to at least one of the node's feeds
has_feed_subscription bool (optional) the node is subscribed to at least one of the contact's feeds
has_friend bool (optional) the contact is a friend of the node
has_friend_of bool (optional) the node is a friend of the contact
has_block bool (optional) the contact is blocked by the node
has_block_by bool (optional) the node is blocked by the contact
operations types.ContactOperations (optional) the supported operations and the corresponding principals
owner_operations types.ContactOperations (optional) the supported operations and the corresponding principals as defined by the contact's owner
admin_operations types.ContactOperations (optional) the operations and the corresponding principals that are overridden by the node administrator

types.Credentials

Field Name Type Description
login str
password str
Validation errors:
Code Description
credentials.login.blank the login is empty
credentials.password.blank the password is empty

types.CredentialsChange

Field Name Type Description
token str (optional) credentials reset token
old_password str (optional) the current password
login str
password str
Validation errors:
Code Description
credentials.login.blank the login is empty
credentials.password.blank the password is empty

types.CredentialsCreated

Field Name Type Description
created bool True if the credentials are initialized already, False otherwise

types.DeleteNodeStatus

Field Name Type Description
requested bool True if the request is sent, False otherwise

types.DeleteNodeText

Field Name Type Description
message str (optional) text message for the provider
Validation errors:
Code Description
delete-node.no-email e-mail is required to be set in the profile to communicate with the provider
deleteNodeText.message.wrong-size the message is too long

types.DomainAttributes

Field Name Type Description
name str (optional) domain's hostname or _default_ for the default domain
node_id str (optional) domain's node ID
Validation errors:
Code Description
domainAttributes.name.blank the domain name is empty
domainAttributes.name.wrong-hostname the domain name is not a valid hostname
domainAttributes.nodeId.wrong-uuid the node ID is not a valid UUID

types.DomainAvailable

Field Name Type Description
name str fully-qualified domain name

types.DomainInfo

Field Name Type Description
name str domain's hostname or _default_ for the default domain
node_id str domain's node ID
created_at Timestamp domain creation timestamp
Validation errors:
Code Description
domainInfo.name.blank the domain name is empty
domainInfo.name.wrong-hostname the domain name is not a valid hostname
domainInfo.nodeId.wrong-uuid the node ID is not a valid UUID

types.DraftInfo

Field Name Type Description
id str
draft_type types.DraftType type of the draft
receiver_name str name of the node the draft is related to
receiver_posting_id str (optional) ID of the posting, set for all types, except new-posting
receiver_comment_id str (optional) ID of the comment, set for comment-update type
replied_to_id str (optional) ID of the comment replied to, set for comment drafts, if needed
created_at Timestamp draft creation timestamp - the real time when the draft was created
edited_at Timestamp (optional) draft editing timestamp - the last time the draft was updated
deadline Timestamp (optional) draft purging timestamp - the time when the draft will be purged from the database, if not updated
owner_full_name str (optional) full name of the posting's/comment's owner
owner_avatar types.AvatarImage (optional) avatar of the posting's/comment's owner
accepted_reactions types.AcceptedReactions (optional) types of reactions that the posting accepts
body_src types.Body (optional) the source text of the draft, a string representation of a JSON structure
body_src_format types.SourceFormat (optional) format of the source text of the draft, plain-text by default; the list of available formats is returned in PostingFeatures
body types.Body body of the draft, a string representation of a JSON structure
body_format types.BodyFormat (optional) format of the body of the draft
media List[types.MediaAttachment] (optional) list of the media attached to the draft
heading str heading of the draft
publish_at int (optional) story publication timestamp - the time the story must be published under in the feed
update_info types.UpdateInfo (optional) description of the update
operations types.PostingOperations (optional) draft of the list of operations and the corresponding principals
comment_operations types.CommentOperations (optional) draft of the list of operations and the corresponding principals that are overridden in the posting's comments, set for posting drafts, if needed

types.DraftText

Field Name Type Description
draft_type types.DraftType type of the draft
receiver_name str name of the node the draft is related to
receiver_posting_id str (optional) ID of the posting, mandatory for all types, except new-posting
receiver_comment_id str (optional) ID of the comment, mandatory for comment-update type
replied_to_id str (optional) ID of the comment replied to
owner_full_name str (optional) full name of the posting's/comment's owner
owner_avatar types.AvatarDescription (optional) avatar of the posting's/comment's owner
accepted_reactions types.AcceptedReactions (optional) types of reactions that the posting accepts
body_src types.Body (optional) the source text of the draft, a string representation of a JSON structure
body_src_format types.SourceFormat (optional) format of the source text of the draft, plain-text by default; the list of available formats is returned in PostingFeatures
media List[types.RemoteMedia] (optional) list of the media attached to the draft, the media may be located on another node
publish_at int (optional) story publication timestamp - the time the story must be published under in the feed
update_info types.UpdateInfo (optional) description of the update
operations types.PostingOperations (optional) draft of the list of operations and the corresponding principals
comment_operations types.CommentOperations (optional) draft of the list of operations and the corresponding principals that are overridden in the posting's comments
Validation errors:
Code Description
draftText.postingId.blank posting ID is not set
draftText.commentId.blank comment ID is not set
draftText.ownerFullName.wrong-size owner's full name is too long
draftText.ownerAvatar.mediaId.not-found owner's avatar is not found
draftText.bodySrc.wrong-size body text is too long
draftText.bodySrc.wrong-encoding body text encoding is incorrect
draftText.bodySrcFormat.unknown unknown body text format
draftText.acceptedReactions.positive.wrong-size list of accepted positive reactions is too long
draftText.acceptedReactions.positive.wrong-pattern list of accepted positive reactions has wrong format
draftText.acceptedReactions.negative.wrong-size list of accepted negative reactions is too long
draftText.acceptedReactions.negative.wrong-pattern list of accepted negative reactions has wrong format

types.EmailHint

Field Name Type Description
email_hint str a masked E-mail address that should help user to understand which E-mail address was used without revealing it

types.EntryInfo

Field Name Type Description
posting types.PostingInfo (optional) posting details, set if the entry is a posting
comment types.CommentInfo (optional) comment details, set if the entry is a comment

types.Features

Field Name Type Description
posting types.PostingFeatures features of a posting
plugins List[str] (optional) list of names of plugins enabled for the node
feed_width int width of the feed in pixels
friend_groups types.FriendGroupsFeatures (optional) features of groups of friends
ask List[types.AskSubject] (optional) list of requests to the node owner that are accepted by the node
subscribed bool (optional) True, if the node is subscribed to the client, False otherwise

types.FeedInfo

Field Name Type Description
feed_name str name of the feed
title str (optional) title of the feed
total int total number of stories in the feed
first_created_at Timestamp (optional) creation timestamp of the earliest story in the feed
last_created_at Timestamp (optional) creation timestamp of the latest story in the feed
operations types.FeedOperations (optional) the supported operations and the corresponding principals
sheriffs List[str] (optional) list of sheriffs supervising the feed
sheriff_marks List[types.SheriffMark] (optional) list of sheriff marks on the feed

types.FeedReference

Field Name Type Description
feed_name str name of the feed
published_at Timestamp story publication timestamp - the time the story is published under in the feed
pinned bool (optional) True, if the story is pinned (should appear before any non-pinned story in the feed), False otherwise
moment int
story_id str ID of the story
operations types.StoryOperations (optional) the supported operations and the corresponding principals for the story in the feed

types.FeedSliceInfo

Field Name Type Description
before int the slice contains all stories before this moment, inclusive. May be the far future.
after int the slice contains all stories after this moment, exclusive. May be the far past.
stories List[types.StoryInfo] the stories
total_in_past int total number of stories in the feed before this slice
total_in_future int total number of stories in the feed after this slice

types.FeedStatus

Field Name Type Description
total int total number of stories
total_pinned int total number of pinned stories
last_moment int (optional) moment of the most recent story
not_viewed int (optional) number of stories that have not been viewed yet, admin only
not_read int (optional) number of stories that have not been read yet, admin only
not_viewed_moment int (optional) moment of the oldest non-viewed story, admin only
not_read_moment int (optional) moment of the oldest non-read story, admin only

types.FeedStatusChange

Field Name Type Description
viewed bool (optional) new value of the viewed flag (None, if the flag is not changed)
read bool (optional) new value of the read flag (None, if the flag is not changed)
before int change flags for all stories before this moment, inclusive

types.FeedWithStatus

Field Name Type Description
feed_name str name of the feed
not_viewed int number of stories in the feed that have not been viewed yet
not_read int number of stories in the feed that have not been read yet

types.FriendDescription

Field Name Type Description
node_name str name of the node
groups List[types.FriendGroupAssignment] (optional) groups of friends the node is to be included into
Validation errors:
Code Description
friendDescription.nodeName.blank friend's node name is empty
friendDescription.nodeName.wrong-size friend's node name is too long
friendDescription.groups.wrong-principal principal for one of operations is invalid

types.FriendGroupAssignment

Field Name Type Description
id str ID of the group of friends
operations types.FriendOperations (optional) the operations and the corresponding principals

types.FriendGroupDescription

Field Name Type Description
title str title of the group of friends
operations types.FriendGroupOperations (optional) the operations and the corresponding principals
Validation errors:
Code Description
friendGroupDescription.title.blank title of group of friends is empty
friendGroupDescription.title.wrong-size title of group of friends is too long
friendGroupDescription.operations.wrong-principal principal for one of operations is invalid

types.FriendGroupDetails

Field Name Type Description
id str ID of the group of friends
title str (optional) title of the group of friends
added_at Timestamp the friendship timestamp - the real time when the node was added to the group of friends
operations types.FriendOperations (optional) list of the supported operations and the corresponding principals

types.FriendGroupInfo

Field Name Type Description
id str
title str (optional) title of the group of friends
created_at Timestamp the group creation timestamp - the real time when the group of friends was created
operations types.FriendGroupOperations (optional) list of the supported operations and the corresponding principals

types.FriendGroupsFeatures

Field Name Type Description
available List[types.FriendGroupInfo] list of groups of friends existing on the node
member_of List[types.FriendGroupDetails] (optional) list of groups of friends the client is member of

types.FriendInfo

Field Name Type Description
node_name str name of the node
contact types.ContactInfo (optional) information about the node
groups List[types.FriendGroupDetails] (optional) groups of friends the node belongs to

types.FriendOfInfo

Field Name Type Description
remote_node_name str name of the remote node
contact types.ContactInfo (optional) information about the remote node
groups List[types.FriendGroupDetails] (optional) groups of friends on the remote node this node was added to

types.FundraiserInfo

Field Name Type Description
title str fundraiser title
qr_code str (optional) text or URI to be encoded and displayed as QR-code
text str (optional) arbitrary text to be displayed
href str (optional) link to the fundraiser

types.LinkPreview

Field Name Type Description
site_name str (optional) name of the site
url str (optional) canonical URL of the page
title str (optional) title of the page
description str (optional) description of the page
image_hash str (optional) hash of the image presenting the page

types.LinkPreviewInfo

Field Name Type Description
site_name str (optional) name of the site
url str (optional) canonical URL of the page
title str (optional) title of the page
description str (optional) description of the page
image_url str (optional) URL of the image presenting the page

types.MediaAttachment

Field Name Type Description
media types.PrivateMediaFileInfo (optional) details of the attached media, may be absent, if the media is not located on the node
remote_media types.RemoteMediaInfo (optional) details of the media, if it is located on another node
embedded bool True if the media is used in the body of the posting/comment, False otherwise

types.MediaFilePreviewInfo

Field Name Type Description
target_width int the width the preview was prepared for viewing at
width int actual width of the preview in pixels
height int actual height of the preview in pixels
original bool (optional) True if the preview is identical to the original media, False otherwise

types.MediaWithDigest

Field Name Type Description
id str ID of the media file
digest str (optional) cryptographic digest of the media file

types.NameToRegister

Field Name Type Description
name str
Validation errors:
Code Description
nameToRegister.name.blank the name is empty
nameToRegister.name.invalid the name is reserved, too long or contains invalid characters

types.NotificationPacket

Field Name Type Description
id str ID of the notification packet on the sending node (used to filter out duplicates)
node_name str name of the sending node
full_name str (optional) full name of the sending node
gender str (optional) gender of the sending node
avatar types.AvatarImage (optional) avatar of the sending node
created_at Timestamp notification packet creation timestamp
type str notification type
notification str the notification, a string representation of a JSON structure (see Notifications page for details)
signature bytes the notification packet sender signature (use NotificationPacket fingerprint)
signature_version int signature version (i.e. fingerprint version)

types.NodeNameInfo

Field Name Type Description
name str (optional)
operation_status types.OperationStatus (optional) status of the latest operation with the node name
operation_status_updated Timestamp (optional) the last time the operation status was updated
operation_error_code str (optional) if the operation with the node name was failed, the code of the failure
operation_error_message str (optional) if the operation with the node name was failed, the human-readable description of the failure
operations types.NodeNameOperations (optional) the supported operations and the corresponding principals

types.PeopleGeneralInfo

Field Name Type Description
feed_subscribers_total int (optional) total number of subscribers of the node
feed_subscriptions_total int (optional) total number of subscriptions of the node
friends_total Mapping[str, int] (optional) total number of friends in every group
friend_ofs_total int (optional) total number of nodes that added this node to their friends
blocked_total int (optional) total number of blocked nodes
blocked_by_total int (optional) total number of nodes that blocked this node
operations types.PeopleOperations (optional) the supported operations and the corresponding principals

types.PluginContext

Field Name Type Description
root_admin bool True, if the client has authenticated as root admin, False otherwise
admin bool True, if the client has authenticated as node admin, False otherwise
auth_categories List[str] the list of permissions granted to the client, if it has authenticated as node admin; see TokenInfo.permissions for the list of possible values
client_name str node name of the client
remote_address str IP address of the client
user_agent str user agent (browser) used by the client
user_agent_os str operating system used by the client
node_id str ID of the current node
node_name str node name of the current node
domain_name str domain name of the current node
origin_url str full URL of the request

types.PluginDescription

Field Name Type Description
name str a unique plugin name; can contain only small latin letters, digits or hyphen
title str (optional) user-readable title of the plugin
description str (optional) user-readable description of purpose of the plugin
location str (optional) URL of the plugin; used by the node to call the plugin API
accepted_events List[str] (optional) list of types of internal events the plugin wants to receive; Read more about internal events.
options List[types.SettingDescriptor] (optional) plugin settings to be added to the list of node settings, the settings appear in the list with a prefix plugin.<plugin name>.
Validation errors:
Code Description
pluginDescription.name.blank plugin name is empty
pluginDescription.name.wrong-size plugin name is too long
pluginDescription.name.wrong-pattern plugin name format is incorrect
pluginDescription.title.wrong-size plugin title is too long
pluginDescription.description.wrong-size plugin description is too long
pluginDescription.options.unknown-type option has an unknown type

types.PluginInfo

Field Name Type Description
node_id str ID of the node this plugin is connected to
local bool True if the plugin is enabled for a particular node only, False, if it is enabled for the whole server
name str a unique plugin name
title str (optional) user-readable title of the plugin
description str (optional) user-readable description of purpose of the plugin
location str (optional) URL of the plugin; used by the node to call the plugin API
accepted_events List[str] (optional) list of types of internal events the plugin wants to receive; Read more about internal events.
settings List[types.SettingMetaInfo] (optional) plugin settings to be added to the list of node settings
token_id str (optional) ID of the token used to authenticate the plugin

types.PostingFeatures

Field Name Type Description
post bool (optional) True if the client is allowed to create postings, False otherwise
subject_present bool True if new postings are recommended to have a subject, False otherwise
source_formats List[types.SourceFormat] list of source text formats the node understands
media_max_size int maximal size of a media attachment in a post
image_recommended_size int maximal size of a compressed image in a post
image_recommended_pixels int maximal resolution of a compressed image in a post (in pixels)
image_formats List[str] list of image formats (in MIME type form) the node understands

types.PostingInfo

Field Name Type Description
id str
revision_id str ID of the current revision of the posting
receiver_revision_id str (optional) ID of the current revision of the original posting (for cached copies of remote postings only)
total_revisions int total number of revisions the posting has
receiver_name str (optional) name of the node where the posting was published (for cached copies of remote postings only)
receiver_full_name str (optional) full name of the node where the posting was published (for cached copies of remote postings only)
receiver_gender str (optional) gender of the node where the posting was published (for cached copies of remote postings only)
receiver_avatar types.AvatarImage (optional) avatar of the node where the posting was published (for cached copies of remote postings only)
receiver_posting_id str (optional) ID of the original posting (for cached copies of remote postings only)
parent_media_id str (optional) ID of the media the posting is linked to, if any
owner_name str node name of the posting's owner
owner_full_name str (optional) full name of the posting's owner
owner_gender str (optional) gender of the posting's owner
owner_avatar types.AvatarImage (optional) avatar of the posting's owner
body_preview types.Body (optional) preview of the posting's body, a string representation of a JSON structure
body_src types.Body (optional) the source text of the posting, a string representation of a JSON structure, may be absent if not requested
body_src_hash bytes hash of the source text of the posting
body_src_format types.SourceFormat (optional) format of the source text of the posting, the list of available formats is returned in PostingFeatures
body types.Body body of the posting, a string representation of a JSON structure
body_format types.BodyFormat (optional) format of the body of the posting, may have any value meaningful for the client
media List[types.MediaAttachment] (optional) list of the media attached to the posting
heading str heading of the posting
update_info types.UpdateInfo (optional) description of the latest update
created_at Timestamp posting creation timestamp - the real time when the posting was created
edited_at Timestamp (optional) posting editing timestamp - the last time the posting was updated
deleted_at Timestamp (optional) posting deletion timestamp - the time when the posting was deleted
receiver_created_at Timestamp (optional) original posting creation timestamp (for cached copies of remote postings only)
receiver_edited_at Timestamp (optional) original posting editing timestamp (for cached copies of remote postings only)
receiver_deleted_at Timestamp (optional) original posting deletion timestamp (for cached copies of remote postings only)
revision_created_at Timestamp creation timestamp of the current revision of the posting
receiver_revision_created_at Timestamp (optional) creation timestamp of the current revision of the original posting (for cached copies of remote postings only)
deadline Timestamp (optional) posting purging timestamp - the time when the deleted posting will be purged from the database
digest bytes (optional) cryptographic digest of the posting (use Posting fingerprint)
signature bytes (optional) the posting's owner signature (use Posting fingerprint)
signature_version int (optional) signature version (i.e. fingerprint version)
feed_references List[types.FeedReference] (optional) array of references to the posting from stories in feeds
blocked_instants List[types.BlockedPostingInstantInfo] (optional) instants related to the posting that are blocked (for admin only)
operations types.PostingOperations (optional) the supported operations and the corresponding principals
receiver_operations types.PostingOperations (optional) the supported operations for the original posting and the corresponding principals (for cached copies of remote postings only)
comment_operations types.CommentOperations (optional) the operations and the corresponding principals that are overridden in the posting's comments
reaction_operations types.ReactionOperations (optional) the operations and the corresponding principals that are overridden in reactions to the posting
comment_reaction_operations types.ReactionOperations (optional) the operations and the corresponding principals that are overridden in reactions to the posting's comments
blocked_operations List[types.BlockedEntryOperation] (optional) operations on the posting that are blocked for the client
blocked_comment_operations List[types.BlockedEntryOperation] (optional) operations on the posting's comments that are blocked for the client
sheriffs List[str] (optional) list of sheriffs supervising the posting
sheriff_marks List[types.SheriffMark] (optional) list of sheriff marks on the posting
accepted_reactions types.AcceptedReactions (optional) types of reactions that the posting accepts
client_reaction types.ClientReactionInfo (optional) details of the existing reaction (if any) of the client's owner
reactions types.ReactionTotalsInfo (optional) reactions summary of the posting
sources List[types.PostingSourceInfo] (optional) details of the sources the posting was received from (for cached copies of remote postings only)
total_comments int (optional) total number of comments to the posting

types.PostingRevisionInfo

Field Name Type Description
id str
receiver_id str (optional) ID of the original revision (for cached copies of remote postings only)
body_preview types.Body (optional) preview of the revision's body, a string representation of a JSON structure
body_src_hash bytes hash of the source text of the revision
body_src_format types.SourceFormat (optional) format of the source text of the revision, the list of available formats is returned in PostingFeatures
body types.Body body of the revision, a string representation of a JSON structure
body_format types.BodyFormat (optional) format of the body of the revision
media List[types.MediaAttachment] (optional) list of the media attached to the revision
heading str heading of the revision
update_info types.UpdateInfo (optional) description of the latest update
created_at Timestamp revision creation timestamp - the real time when the revision was created
deleted_at Timestamp (optional) revision deletion timestamp - the time when the revision was deleted
receiver_created_at Timestamp (optional) original revision creation timestamp (for cached copies of remote postings only)
receiver_deleted_at Timestamp (optional) original revision deletion timestamp (for cached copies of remote postings only)
digest bytes (optional) cryptographic digest of the revision (use Posting fingerprint)
signature bytes (optional) the revision's owner signature (use Posting fingerprint)
signature_version int (optional) signature version (i.e. fingerprint version)
client_reaction types.ClientReactionInfo (optional) details of the existing reaction (if any) of the client's owner
reactions types.ReactionTotalsInfo (optional) reactions summary of the posting revision

types.PostingSourceInfo

Field Name Type Description
node_name str name of the remote node
full_name str (optional) full name of the remote node
avatar types.AvatarImage (optional) avatar of the remote node
feed_name str name of the feed on the remote node
posting_id str ID of the posting on the remote node
created_at Timestamp timestamp when the posting was received from this source

types.PostingSourceText

Field Name Type Description
owner_avatar types.AvatarDescription (optional) avatar of the posting's owner
body_src types.Body (optional) the source text of the posting, a string representation of a JSON structure
body_src_format types.SourceFormat (optional) format of the source text of the posting, plain-text by default; the list of available formats is returned in PostingFeatures
media List[types.MediaWithDigest] (optional) array of IDs and digests of private media to be attached to the posting
accepted_reactions types.AcceptedReactions (optional) types of reactions that the posting accepts
operations types.PostingOperations (optional) the operations and the corresponding principals
comment_operations types.CommentOperations (optional) the operations and the corresponding principals that are overridden in the posting's comments

types.PostingText

Field Name Type Description
owner_name str (optional) node name of the posting's owner
owner_full_name str (optional) full name of the posting's owner
owner_gender str (optional) gender of the posting's owner
owner_avatar types.AvatarDescription (optional) avatar of the posting's owner
body_preview types.Body (optional) preview of the posting's body, a string representation of a JSON structure
body_src types.Body (optional) the source text of the posting, a string representation of a JSON structure
body_src_format types.SourceFormat (optional) format of the source text of the posting, plain-text by default; the list of available formats is returned in PostingFeatures
body types.Body (optional) body of the posting, a string representation of a JSON structure
body_format types.BodyFormat (optional) format of the body of the posting, may have any value meaningful for the client
media List[str] (optional) array of IDs of private media to be attached to the posting
created_at Timestamp (optional) posting creation timestamp - the real time when the posting was created
accepted_reactions types.AcceptedReactions (optional) types of reactions that the posting accepts
publications List[types.StoryAttributes] (optional) list of publications in feeds that must be made after creating the posting (for new postings only)
update_info types.UpdateInfo (optional) description of the update
signature bytes (optional) the posting's owner signature (use Posting fingerprint)
signature_version int (optional) signature version (i.e. fingerprint version)
operations types.PostingOperations (optional) the operations and the corresponding principals
comment_operations types.CommentOperations (optional) the operations and the corresponding principals that are overridden in the posting's comments
reaction_operations types.ReactionOperations (optional) the operations and the corresponding principals that are overridden in reactions to the posting
comment_reaction_operations types.ReactionOperations (optional) the operations and the corresponding principals that are overridden in reactions to the posting's comments
Validation errors:
Code Description
postingText.ownerAvatar.mediaId.not-found owner's avatar is not found
postingText.bodySrc.blank body source text is empty
postingText.bodySrc.wrong-size body source text is too long
postingText.bodySrc.wrong-encoding body source text is formatted incorrectly
postingText.bodySrcFormat.unknown unknown body source text format
postingText.body.blank body text is empty
postingText.body.wrong-size body text is too long
postingText.bodyPreview.wrong-encoding body preview encoding is incorrect
postingText.bodyFormat.blank body format is not set
postingText.bodyFormat.wrong-size body format is too long
postingText.media.not-found media attachment is not found
postingText.media.not-compressed media attachment is not compressed as the node requires, the parameters of the desired compression are returned in PostingFeatures
postingText.createdAt.blank body creation timestamp is not set
postingText.createdAt.out-of-range body creation timestamp is too far from the current timestamp
postingText.acceptedReactions.positive.wrong-size list of accepted positive reactions is too long
postingText.acceptedReactions.positive.wrong-pattern list of accepted positive reactions has wrong format
postingText.acceptedReactions.negative.wrong-size list of accepted negative reactions is too long
postingText.acceptedReactions.negative.wrong-pattern list of accepted negative reactions has wrong format
postingText.publications.cannot-modify publications field is not allowed in posting modification query
postingText.operations.wrong-principal principal for one of operations is invalid
postingText.commentOperations.wrong-principal principal for one of comment operations is invalid
postingText.reactionOperations.wrong-principal principal for one of reaction operations is invalid
postingText.commentReactionOperations.wrong-principal principal for one of comment reaction operations is invalid

types.PrivateMediaFileInfo

Field Name Type Description
id str ID of the media file
hash str SHA-1 hash of the media file
path str virtual location of the media file, relative to the /media virtual page
mime_type str MIME type of the media
width int (optional) width of the media in pixels (None, if the media file is not an image or video)
height int (optional) height of the media in pixels (None, if the media file is not an image or video)
orientation int (optional) media orientation, the value should be interpreted like the orientation value present in JPEG EXIF data (None, if the media file is not an image or video)
size int size of the media file in bytes
posting_id str (optional) ID of the posting linked to the media
previews List[types.MediaFilePreviewInfo] (optional) list of media previews - downscaled versions of the media
operations types.PrivateMediaFileOperations (optional) the supported operations and the corresponding principals

types.ProfileAttributes

Field Name Type Description
full_name str (optional) node owner's full name
gender str (optional) node owner's gender
email str (optional) node owner's E-mail address
title str (optional) node title
bio_src str (optional) the source text of node owner's bio (arbitrary text)
bio_src_format types.SourceFormat (optional) format of the source text of node owner's bio, markdown by default; the list of available formats is returned in PostingFeatures
avatar_id str (optional) node owner's avatar ID
fundraisers List[types.FundraiserInfo] (optional) list of fundraisers - methods of giving a donation to the node owner
operations types.ProfileOperations (optional) the operations and the corresponding principals
Validation errors:
Code Description
profileAttributes.fullName.wrong-size the full name is too long
profileAttributes.gender.wrong-size the gender string is too long
profileAttributes.email.wrong-size the E-mail is too long
profileAttributes.email.wrong-email the E-mail is not a well-formed E-mail address
profileAttributes.title.wrong-size the title is too long
profileAttributes.bioSrc.wrong-size the bio is too long
profileAttributes.operations.wrong-principal principal for one of operations is invalid

types.ProfileInfo

Field Name Type Description
full_name str (optional) node owner's full name
gender str (optional) node owner's gender
email str (optional) node owner's E-mail address
title str (optional) node title
bio_src str (optional) the source text of node owner's bio (arbitrary text), may be absent if not requested
bio_src_format types.SourceFormat (optional) format of the source text of node owner's bio, markdown by default, may be absent if not requested; the list of available formats is returned in PostingFeatures
bio_html str (optional) HTML representation of node owner's bio
avatar types.AvatarInfo (optional) node owner's avatar
fundraisers List[types.FundraiserInfo] (optional) list of fundraisers - methods of giving a donation to the node owner
operations types.ProfileOperations (optional) the supported operations and the corresponding principals

types.PublicMediaFileInfo

Field Name Type Description
id str ID of the media file
path str virtual location of the media file, relative to the /media virtual page
width int (optional) width of the media in pixels (None, if the media file is not an image or video)
height int (optional) height of the media in pixels (None, if the media file is not an image or video)
orientation int (optional) media orientation, the value should be interpreted like the orientation value present in JPEG EXIF data (None, if the media file is not an image or video)
size int size of the media file in bytes

types.PushContent

Field Name Type Description
type types.PushContentType type of the notification
id str (optional) ID of the story (story-deleted notifications only)
story types.StoryInfo (optional) the story (story-added notifications only)
feed_status types.FeedWithStatus (optional) status of the feed (feed-updated notifications only)

types.PushRelayClientAttributes

Field Name Type Description
type types.PushRelayType type of the relay
client_id str ID/token of the client
lang str (optional) language of the messages
Validation errors:
Code Description
pushRelayClientAttributes.type.blank relay type is empty
pushRelayClientAttributes.type.unknown relay type is unknown
pushRelayClientAttributes.clientId.blank client ID is empty

types.ReactionAttributes

Field Name Type Description
negative bool True, if the reaction is negative, False, if positive
emoji int reaction code, usually interpreted by clients as emoji code point
operations types.ReactionOperations (optional) the operations and the corresponding principals

types.ReactionCreated

Field Name Type Description
reaction types.ReactionInfo (optional) details of the reaction created
totals types.ReactionTotalsInfo summary of reactions after the creation

types.ReactionDescription

Field Name Type Description
owner_name str (optional) reaction owner's node name
owner_full_name str (optional) reaction owner's full name
owner_gender str (optional) reaction owner's gender
owner_avatar types.AvatarDescription (optional) reaction owner's avatar
negative bool True, if the reaction is negative, False, if positive
emoji int reaction code, usually interpreted by clients as emoji code point
signature bytes (optional) the reaction owner signature (use Reaction fingerprint)
signature_version int (optional) signature version (i.e. fingerprint version)
operations types.ReactionOperations (optional) the operations and the corresponding principals
Validation errors:
Code Description
reactionDescription.ownerAvatar.mediaId.not-found owner's avatar is not found
reactionDescription.operations.wrong-principal principal for one of operations is invalid

types.ReactionsFilter

Field Name Type Description
owner_name str (optional) reaction owner's name
postings List[str] (optional) list of IDs of postings

types.ReactionInfo

Field Name Type Description
owner_name str (optional) reaction owner's node name
owner_full_name str (optional) reaction owner's full name
owner_gender str (optional) reaction owner's gender
owner_avatar types.AvatarImage (optional) reaction owner's avatar
posting_id str (optional) ID of the posting
posting_revision_id str (optional) ID of the posting revision, if relevant
comment_id str (optional) ID of the comment, if relevant
comment_revision_id str (optional) ID of the comment revision, if relevant
negative bool (optional) True, if the reaction is negative, False, if positive
emoji int (optional) reaction code, usually interpreted by clients as emoji code point
moment int (optional)
created_at Timestamp (optional) reaction creation timestamp - the real time when the reaction was created
deadline Timestamp (optional) if present, the reaction will be erased at this time
signature bytes (optional) the reaction owner signature (use Reaction fingerprint)
signature_version int (optional) signature version (i.e. fingerprint version)
operations types.ReactionOperations (optional) the supported operations and the corresponding principals
owner_operations types.ReactionOperations (optional) the supported operations and the corresponding principals as defined by the reaction's owner
senior_operations types.ReactionOperations (optional) the operations and the corresponding principals that are overridden by the reaction's "senior": the posting's owner in the case of reaction to a posting or the comment's owner in the case of reaction to a comment
major_operations types.ReactionOperations (optional) the operations and the corresponding principals that are overridden by the posting's owner ("major") in the case of reaction to a comment; not set in the case of reaction to a posting

types.ReactionsSliceInfo

Field Name Type Description
before int the slice contains all reactions before this moment, inclusive. May be the far future.
after int the slice contains all reactions after this moment, exclusive. May be the far past.
total int total number of reactions in the whole list
reactions List[types.ReactionInfo] the reactions

types.ReactionTotalInfo

Field Name Type Description
emoji int reaction code, usually interpreted by clients as emoji code point
total int (optional) total number of reactions with the given code
share float (optional) share the reactions with the given code stand from the total number of reactions (may be absent, if total is present)

types.ReactionTotalsFilter

Field Name Type Description
postings List[str] list of IDs of postings

types.ReactionTotalsInfo

Field Name Type Description
entry_id str ID of the entry
positive List[types.ReactionTotalInfo] (optional) summary of positive reactions
negative List[types.ReactionTotalInfo] (optional) summary of negative reactions

types.ReactionOverride

Field Name Type Description
operations types.ReactionOperations (optional) the supported operations and the corresponding principals
senior_operations types.ReactionOperations (optional) the operations and the corresponding principals that are overridden by the reaction's "senior": the posting's owner in the case of reaction to a posting or the comment's owner in the case of reaction to a comment
major_operations types.ReactionOperations (optional) the operations and the corresponding principals that are overridden by the posting's owner ("major") in the case of reaction to a comment; not set in the case of reaction to a posting
Validation errors:
Code Description
reactionOverride.operations.wrong-principal principal for one of operations is invalid
reactionOverride.seniorOperations.wrong-principal principal for one of senior operations is invalid
reactionOverride.majorOperations.wrong-principal principal for one of major operations is invalid

types.RegisteredNameSecret

Field Name Type Description
name str
mnemonic List[str] (optional) human-friendly mnemonic of the updating key
secret str (optional) base64-encoded secret of the updating key

types.RemoteFeed

Field Name Type Description
node_name str name of the node
feed_name str name of the feed on the node

types.RemoteMedia

Field Name Type Description
id str ID of the media file
hash str (optional) SHA-1 hash of the media file
digest str (optional) cryptographic digest of the media file

types.RemoteMediaInfo

Field Name Type Description
id str ID of the media file
hash str (optional) SHA-1 hash of the media file
digest str (optional) cryptographic digest of the media file

types.RemotePosting

Field Name Type Description
node_name str name of the node
posting_id str ID of the posting on the node

types.RemotePostingOrNode

Field Name Type Description
node_name str name of the node
posting_id str (optional) ID of the posting on the node

types.RemotePostingVerificationInfo

Field Name Type Description
id str asynchronous operation ID
node_name str
posting_id str
revision_id str (optional)
status types.VerificationStatus (optional) status of the operation
error_code str (optional) error code
error_message str (optional) human-readable error message

types.RemoteReactionVerificationInfo

Field Name Type Description
id str asynchronous operation ID
node_name str
posting_id str
reaction_owner_name str node name of the reaction's owner
status types.VerificationStatus (optional) status of the operation
error_code str (optional) error code
error_message str (optional) human-readable error message

types.RepliedTo

Field Name Type Description
id str ID of the comment
revision_id str (optional) ID of the comment revision
name str node name of the comment's owner
full_name str (optional) full name of the comment's owner
gender str (optional) gender of the comment's owner
avatar types.AvatarImage (optional) avatar of the comment's owner
heading str (optional) heading of the comment
digest bytes cryptographic digest of the comment (use Comment fingerprint)

types.Result

Field Name Type Description
error_code str error code
message str (optional) human-readable error message

types.SheriffMark

Field Name Type Description
sheriff_name str name of the sheriff that added the mark

types.SettingInfo

Field Name Type Description
name str name of the setting
value str (optional) value of the setting

types.SettingMetaAttributes

Field Name Type Description
name str name of the setting
default_value str (optional) default value of the setting (if absent or None, the built-in default value will be used)
privileged bool (optional) the setting should be privileged (if absent or None, the built-in value of the flag will be used)

types.SettingDescriptor

Field Name Type Description
name str name of the setting
type types.SettingType type of the setting
default_value str (optional) default value of the setting
internal bool (optional) the setting is internal - not displayed to the user
privileged bool (optional) the setting is privileged - may be changed by server owner only
title str (optional) human-friendly description of the setting
modifiers types.SettingTypeModifiers (optional) additional modifiers that may help to choose a proper UI component for the setting value and to validate the input; meaning of the modifiers depend on the setting type

types.SettingMetaInfo

Field Name Type Description
name str name of the setting
type types.SettingType type of the setting
default_value str (optional) default value of the setting
privileged bool (optional) the setting is privileged - may be changed by server owner only
title str human-friendly description of the setting
modifiers types.SettingTypeModifiers (optional) additional modifiers that may help to choose a proper UI component for the setting value and to validate the input; meaning of the modifiers depend on the setting type

types.SettingTypeModifiers

Field Name Type Description
format str (optional) preferred format of displaying the value
  • int:
    • size - data size in bytes/kilobytes/megabytes etc.
min str (optional) (int, Duration) minimal value
max str (optional) (int, Duration) maximal value
multiline bool (optional) (string) True, if the value is a multiline text
never bool (optional) (Duration) True, if value never is allowed
always bool (optional) (Duration) True, if value always is allowed
principals List[types.PrincipalFlag] (optional) (Principal) list of allowed principals

types.SheriffComplainDecisionText

Field Name Type Description
reject bool True, if the complaints in the group are to be rejected, False otherwise
decision_code types.SheriffOrderReason (optional) the decision
decision_details str (optional) detailed explanation of the decision in user-readable form
anonymous bool (optional) True, if the complaints' owners' names are not to be published, False otherwise
Validation errors:
Code Description
sheriffComplainDecisionText.decisionCode.blank decision code is not set
sheriffComplainDecisionText.decisionDetails.wrong-size decision details are too long

types.SheriffComplainGroupInfo

Field Name Type Description
id str
remote_node_name str name of the node the complaints are related to
remote_node_full_name str (optional) full name of the node the complaints are related to
remote_feed_name str name of the feed the complaints are related to
remote_posting_id str (optional) ID of the posting the complaints are related to
remote_posting_revision_id str (optional) ID of the posting's revision the complaints are related to
remote_posting_owner_name str (optional) posting owner's node name
remote_posting_owner_full_name str (optional) posting owner's full name
remote_posting_owner_gender str (optional) posting owner's gender
remote_posting_heading str (optional) heading of the posting
remote_comment_id str (optional) ID of the comment the complaints are related to
remote_comment_revision_id str (optional) ID of the comment's revision the complaints are related to
remote_comment_owner_name str (optional) comment owner's node name
remote_comment_owner_full_name str (optional) comment owner's full name
remote_comment_owner_gender str (optional) comment owner's gender
remote_comment_heading str (optional) heading of the comment
created_at Timestamp the group of complaints creation timestamp - the real time when the group was created
moment int moment of the group of complaints
status types.SheriffComplainStatus status of the group of complaints
decision_code types.SheriffOrderReason (optional) sheriff's decision
decision_details str (optional) detailed explanation of sheriff's decision in user-readable form
decided_at Timestamp (optional) sheriff's decision timestamp - the real time when the decision was made
anonymous bool (optional) True, if the complaints' owners' names are not published, False otherwise

types.SheriffComplainGroupsSliceInfo

Field Name Type Description
before int the slice contains all groups before this moment, inclusive. May be the far future.
after int the slice contains all groups after this moment, exclusive. May be the far past.
groups List[types.SheriffComplainGroupInfo] the groups
total int total number of groups
total_in_past int number of groups before this slice till the far past
total_in_future int number of groups after this slice till the far future

types.SheriffComplainInfo

Field Name Type Description
id str
owner_name str complaint owner's node name
owner_full_name str (optional) complaint owner's full name
owner_gender str (optional) complaint owner's gender
group types.SheriffComplainGroupInfo (optional) the group of complains this complaint belongs to
reason_code types.SheriffOrderReason reason of the complaint
reason_details str (optional) detailed explanation of reason of the complaint in user-readable form
anonymous_requested bool (optional) True, if the complaint's owner wants his name not to be published, False otherwise
created_at Timestamp complaint creation timestamp - the real time when the order was created

types.SheriffComplainText

Field Name Type Description
owner_full_name str (optional) complaint owner's full name
owner_gender str (optional) complaint owner's gender
node_name str name of the node the complaint is related to
full_name str (optional) full name of the node the complaint is related to
feed_name str name of the feed the complaint is related to
posting_id str (optional) ID of the posting the complaint is related to
posting_owner_name str (optional) posting owner's node name
posting_owner_full_name str (optional) posting owner's full name
posting_owner_gender str (optional) posting owner's gender
posting_heading str (optional) heading of the posting
comment_id str (optional) ID of the comment the complaint is related to
comment_owner_name str (optional) comment owner's node name
comment_owner_full_name str (optional) comment owner's full name
comment_owner_gender str (optional) comment owner's gender
comment_heading str (optional) heading of the comment
reason_code types.SheriffOrderReason (optional) reason of the complaint
reason_details str (optional) detailed explanation of reason of the complaint in user-readable form
anonymous bool (optional) True, if the complaint's owner wants his name not to be published, False otherwise
Validation errors:
Code Description
sheriffComplainText.ownerFullName.wrong-size owner's full name is too long
sheriffComplainText.ownerGender.wrong-size owner's gender is too long
sheriffComplainText.nodeName.blank node name is empty
sheriffComplainText.nodeName.wrong-size node name is too long
sheriffComplainText.fullName.wrong-size node's full name is too long
sheriffComplainText.feedName.blank feed name is empty
sheriffComplainText.feedName.wrong-size feed name is too long
sheriffComplainText.postingOwnerName.wrong-size posting owner's name is too long
sheriffComplainText.postingOwnerFullName.wrong-size posting owner's full name is too long
sheriffComplainText.postingOwnerGender.wrong-size posting owner's gender is too long
sheriffComplainText.postingHeading.wrong-size posting heading is too long
sheriffComplainText.postingId.wrong-size posting ID is too long
sheriffComplainText.commentOwnerName.wrong-size comment owner's name is too long
sheriffComplainText.commentOwnerFullName.wrong-size comment owner's full name is too long
sheriffComplainText.commentOwnerGender.wrong-size comment owner's gender is too long
sheriffComplainText.commentHeading.wrong-size comment heading is too long
sheriffComplainText.commentId.wrong-size comment ID is too long
sheriffComplainText.reasonDetails.wrong-size reason details are too long

types.SheriffOrderAttributes

Field Name Type Description
delete bool (optional) True, if the order is to cancel the previous order of this type, False otherwise
feed_name str name of the feed the order is related to
posting_id str (optional) ID of the posting the order is related to
comment_id str (optional) ID of the comment the order is related to
category types.SheriffOrderCategory category of the order
reason_code types.SheriffOrderReason (optional) reason of the order
reason_details str (optional) detailed explanation of reason of the order in user-readable form
Validation errors:
Code Description
sheriffOrderAttributes.feedName.blank feed name is empty
sheriffOrderAttributes.feedName.wrong-size feed name is too long
sheriffOrderAttributes.reasonDetails.wrong-size reason details are too long

types.SheriffOrderDetails

Field Name Type Description
id str
delete bool (optional) True, if the order is to cancel the previous order of this type, False otherwise
sheriff_name str node name of the sheriff
sheriff_avatar types.AvatarDescription (optional) sheriff's avatar
feed_name str name of the feed the order is related to
posting_id str (optional) ID of the posting the order is related to
comment_id str (optional) ID of the comment the order is related to
category types.SheriffOrderCategory category of the order
reason_code types.SheriffOrderReason (optional) reason of the order
reason_details str (optional) detailed explanation of reason of the order in user-readable form
created_at Timestamp order creation timestamp - the real time when the order was created
signature bytes the sheriff's signature (use SheriffOrder fingerprint)
signature_version int signature version (i.e. fingerprint version)
Validation errors:
Code Description
sheriffOrderDetails.id.blank ID is empty
sheriffOrderDetails.id.wrong-size ID is too long
sheriffOrderDetails.sheriffName.blank sheriff name is empty
sheriffOrderDetails.sheriffName.wrong-size sheriff name is too long
sheriffOrderDetails.sheriffAvatar.mediaId.not-found sheriff's avatar is not found
sheriffOrderDetails.feedName.blank feed name is empty
sheriffOrderDetails.feedName.wrong-size feed name is too long
sheriffOrderDetails.reasonDetails.wrong-size reason details are too long
sheriffOrderDetails.createdAt.out-of-range order creation timestamp is too far from the current timestamp

types.SheriffOrderInfo

Field Name Type Description
id str
delete bool (optional) True, if the order is to cancel the previous order of this type, False otherwise
sheriff_name str node name of the sheriff
node_name str name of the node the order was sent to
node_full_name str (optional) full name of the node the order was sent to
feed_name str name of the feed the order is related to
posting_id str (optional) ID of the posting the order is related to
posting_revision_id str (optional) ID of the posting's revision the order is related to
posting_owner_name str (optional) posting owner's node name
posting_owner_full_name str (optional) posting owner's full name
posting_owner_gender str (optional) posting owner's gender
posting_heading str (optional) heading of the posting
comment_id str (optional) ID of the comment the order is related to
comment_revision_id str (optional) ID of the comment's revision the order is related to
comment_owner_name str (optional) comment owner's node name
comment_owner_full_name str (optional) comment owner's full name
comment_owner_gender str (optional) comment owner's gender
comment_heading str (optional) heading of the comment
category types.SheriffOrderCategory category of the order
reason_code types.SheriffOrderReason (optional) reason of the order
reason_details str (optional) detailed explanation of reason of the order in user-readable form
created_at Timestamp order creation timestamp - the real time when the order was created
signature bytes the sheriff's signature (use SheriffOrder fingerprint)
signature_version int signature version (i.e. fingerprint version)
complain_group_id str (optional) ID of the groups of complaints that were the cause of the order

types.StoryAttributes

Field Name Type Description
feed_name str (optional) name of the feed
publish_at Timestamp (optional) story publication timestamp - the time the story must be published under in the feed
pinned bool (optional) True, if the story is pinned (should appear before any non-pinned story in the feed), False otherwise
viewed bool (optional) value of the viewed flag (None, if the flag is not changed)
read bool (optional) value of the read flag (None, if the flag is not changed)
satisfied bool (optional) value of the satisfied flag (None, if the flag is not changed)

types.StoryInfo

Field Name Type Description
id str
feed_name str name of the feed
story_type types.StoryType type of the story
created_at Timestamp story creation timestamp - the real time when the story was created
published_at Timestamp story publication timestamp - the time the story is published under in the feed
pinned bool (optional) True, if the story is pinned (should appear before any non-pinned story in the feed), False otherwise
moment int
viewed bool (optional) True, if the story has been viewed by node owner, False otherwise
read bool (optional) True, if the story has been read by node owner, False otherwise
satisfied bool (optional) if the story is associated with a user action (for example, it contains a form that should be submitted), this flag is set to True, if the action is done already, and False otherwise
summary_node_name str (optional) name of the node related to the summary of the story
summary_full_name str (optional) full name of the node related to the summary of the story
summary_avatar types.AvatarImage (optional) avatar of the summary of the story
summary str (optional) user-readable summary of the story - this field is deprecated in favor of summaryData
summary_data types.StorySummaryData (optional) details of the story; they are used by the client to build a user-readable summary of the story
posting types.PostingInfo (optional) the posting this story is about
posting_id str (optional) ID of the posting this story is about, used if the whole posting is not returned
comment types.CommentInfo (optional) the comment this story is about
comment_id str (optional) ID of the comment this story is about, used if the whole posting is not returned
remote_node_name str (optional) name of the node this story is about
remote_full_name str (optional) full name of the node this story is about
remote_posting_id str (optional) ID of the posting at remote node this story is about
remote_comment_id str (optional) ID of the comment at remote node this story is about
remote_media_id str (optional) ID of the media at remote node this story is about
operations types.StoryOperations (optional) the supported operations and the corresponding principals

types.StorySummaryData

Field Name Type Description
node types.StorySummaryNode (optional) a node
posting types.StorySummaryEntry (optional) a posting
comment types.StorySummaryEntry (optional) a comment
comments List[types.StorySummaryEntry] (optional) list of comments
total_comments int (optional) total number of comments
replied_to types.StorySummaryEntry (optional) the comment replied to
parent_posting types.StorySummaryEntry (optional) the parent posting of the media
reaction types.StorySummaryReaction (optional) a reaction
reactions List[types.StorySummaryReaction] (optional) list of reactions
total_reactions int (optional) total number of reactions
feed_name str (optional) name of a feed
subscription_reason types.SubscriptionReason (optional) subscription reason
friend_group types.StorySummaryFriendGroup (optional) a group of friends
blocked types.StorySummaryBlocked (optional) summary of blocking a user
sheriff types.StorySummarySheriff (optional) summary of an action of a sheriff
description str (optional) additional descriptive text

types.StorySummaryBlocked

Field Name Type Description
operations List[types.BlockedOperation] list of the operations blocked
period int (optional) the period of blocking in seconds

types.StorySummaryFriendGroup

Field Name Type Description
id str (optional) ID of the group of friends
title str (optional) title of the group of friends

types.StorySummaryEntry

Field Name Type Description
owner_name str (optional) entry owner's name
owner_full_name str (optional) entry owner's full name
owner_gender str (optional) entry owner's gender
heading str (optional) entry heading
sheriffs List[str] (optional) list of sheriffs supervising the entry
sheriff_marks List[types.SheriffMark] (optional) list of sheriff marks on the entry

types.StorySummaryNode

Field Name Type Description
owner_name str (optional) node owner's name
owner_full_name str (optional) node owner's full name
owner_gender str (optional) node owner's gender

types.StorySummaryReaction

Field Name Type Description
owner_name str (optional) reaction owner's name
owner_full_name str (optional) reaction owner's full name
owner_gender str (optional) reaction owner's gender
emoji int (optional) reaction code

types.StorySummarySheriff

Field Name Type Description
sheriff_name str name of the sheriff
order_id str (optional) ID of the sheriff's order
complain_id str (optional) ID of the complaint, if any

types.SubscriberDescription

Field Name Type Description
type types.SubscriptionType subscription type
feed_name str (optional) feed name, if the subscription type requires one
posting_id str (optional) posting ID, if the subscription type requires one
last_updated_at Timestamp (optional) timestamp of the latest known state of the object
operations types.SubscriberOperations (optional) the operations and the corresponding principals
Validation errors:
Code Description
subscriberDescription.type.blank type is empty
subscriberDescription.feedName.blank feed name is empty
subscriberDescription.feedName.not-found feed is not found
subscriberDescription.postingId.blank posting ID is empty
subscriberDescription.postingId.not-found posting is not found
subscriberDescription.ownerAvatar.mediaId.not-found subscriber's avatar is not found
subscriberDescription.operations.wrong-principal principal for one of operations is invalid

types.SubscriberInfo

Field Name Type Description
id str subscriber ID
type types.SubscriptionType subscription type
feed_name str (optional) feed name, if the subscription type requires one
posting_id str (optional) posting ID, if the subscription type requires one
node_name str name of the subscribed node
contact types.ContactInfo (optional) information known about the subscribed node
created_at Timestamp subscription creation timestamp
operations types.SubscriberOperations (optional) the supported operations and the corresponding principals
owner_operations types.SubscriberOperations (optional) the supported operations and the corresponding principals as defined by the subscriber
admin_operations types.SubscriberOperations (optional) the operations and the corresponding principals that are overridden by the node administrator

types.SubscriberOverride

Field Name Type Description
operations types.SubscriberOperations (optional) the supported operations and the corresponding principals
admin_operations types.SubscriberOperations (optional) the operations and the corresponding principals that are overridden by the node administrator
Validation errors:
Code Description
subscriberOverride.operations.wrong-principal principal for one of operations is invalid
subscriberOverride.adminOperations.wrong-principal principal for one of admin operations is invalid

types.SubscriptionDescription

Field Name Type Description
type types.SubscriptionType subscription type
feed_name str (optional) feed name on this node that receives notifications
remote_node_name str name of the node this node is subscribed to
remote_feed_name str (optional) feed name on the remote node, if the subscription type requires one
remote_posting_id str (optional) posting ID on the remote node, if the subscription type requires one
reason types.SubscriptionReason (optional) subscription reason
operations types.SubscriptionOperations (optional) the operations and the corresponding principals
Validation errors:
Code Description
subscriptionDescription.type.blank type is empty
subscriptionDescription.feedName.blank feed name is empty
subscriptionDescription.feedName.not-found feed is not found
subscriptionDescription.remoteSubscriberId.blank subscriber ID is empty
subscriptionDescription.remoteSubscriberId.wrong-size subscriber ID is too long
subscriptionDescription.remoteNodeName.blank node name is empty
subscriptionDescription.remoteNodeName.wrong-size node name is too long
subscriptionDescription.remoteAvatar.mediaId.not-found node avatar is not found
subscriptionDescription.remoteFeedName.wrong-size remote feed name is too long
subscriptionDescription.remotePostingId.wrong-size posting ID is too long
subscriptionDescription.reason.blank subscription reason is empty
subscriptionDescription.operations.wrong-principal principal for one of operations is invalid

types.SubscriptionFilter

Field Name Type Description
type types.SubscriptionType (optional) subscription type
feeds List[types.RemoteFeed] (optional) list of feeds
postings List[types.RemotePosting] (optional) list of postings

types.SubscriptionInfo

Field Name Type Description
id str subscription ID
type types.SubscriptionType subscription type
feed_name str (optional) feed name on this node that receives notifications
remote_node_name str name of the node this node is subscribed to
contact types.ContactInfo (optional) information known about the remote node
remote_feed_name str (optional) feed name on the remote node, if the subscription type requires one
remote_posting_id str (optional) posting ID on the remote node, if the subscription type requires one
created_at Timestamp subscription creation timestamp
reason types.SubscriptionReason subscription reason
operations types.SubscriptionOperations (optional) the supported operations and the corresponding principals

types.SubscriptionOverride

Field Name Type Description
operations types.SubscriptionOperations (optional) the supported operations and the corresponding principals
Validation errors:
Code Description
subscriptionOverride.operations.wrong-principal principal for one of operations is invalid

types.TokenAttributes

Field Name Type Description
login str
password str
auth_category int (optional) A bit mask describing which permissions should be granted to the token. If not set, all permissions of the administrator are granted. The bits have the following meaning:
  • other (0x0001) - any other permission not listed below;
  • view-media (0x0002) - view media files.
name str (optional) a user-readable name of the token
Validation errors:
Code Description
tokenAttributes.login.blank the login is empty
tokenAttributes.password.blank the password is empty

types.TokenInfo

Field Name Type Description
id str token ID (this is not the token, just an ID)
token str the token
name str (optional) a user-readable name of the token
permissions List[str] (optional) The list of permissions granted to the token. The values are:
  • other - any other permission not listed below;
  • view-media - view media files.
plugin_name str (optional) a plugin the token belongs to; if set, only this plugin may use the token
created_at Timestamp token creation timestamp
deadline Timestamp (optional) timestamp of the end of the token's life
last_used_at Timestamp (optional) timestamp of the last time the token was used
last_used_browser str (optional) name of the browser used by the latest user of the token
last_used_ip str (optional) IP address of the latest user of the token

types.TokenName

Field Name Type Description
name str (optional) a user-readable name of the token

types.UpdateInfo

Field Name Type Description
important bool (optional) True, if the update is important, False (the default) otherwise
description str (optional) description of the update

types.UserListInfo

Field Name Type Description
name str name of the user list
total int number of items in the user list

types.UserListItemAttributes

Field Name Type Description
node_name str the name of the node
Validation errors:
Code Description
userListItemAttributes.nodeName.blank node name is empty
userListItemAttributes.nodeName.wrong-size node name is too long

types.UserListItemInfo

Field Name Type Description
node_name str the name of the node
created_at Timestamp the node addition timestamp - the real time when the node was added to the list
moment int moment of the node

types.UserListSliceInfo

Field Name Type Description
list_name str the name of the list
before int the slice contains all items before this moment, inclusive. May be the far future.
after int the slice contains all items after this moment, exclusive. May be the far past.
items List[types.UserListItemInfo] the items
total int total number of items
total_in_past int number of items before this slice till the far past
total_in_future int number of items after this slice till the far future

types.WhoAmI

Field Name Type Description
node_name str (optional)
node_name_changing bool (optional) True if node name is about to be changed
full_name str (optional) node owner's full name
gender str (optional) node owner's gender
title str (optional) node title
avatar types.AvatarImage (optional) node owner's avatar


Operations

Read more about operations

types.CommentOperations

Field Name Default Description
view "public" view the comment
edit "owner" edit the comment
delete "private" delete the comment
view_reactions "public" view the comment's reactions
view_negative_reactions "public" view the comment's negative reactions
view_reaction_totals "public" view the number of the comment's reactions
view_negative_reaction_totals "public" view the number of the comment's negative reactions
view_reaction_ratios "public" view the relative number of different types of the comment's reactions
view_negative_reaction_ratios "public" view the relative number of different types of the comment's negative reactions
add_reaction "signed" add a reaction to the comment
add_negative_reaction "signed" add a negative reaction to the comment

types.ContactOperations

Field Name Default Description
view_feed_subscriber "public" see the subscriber information
view_feed_subscription "public" see the subscription information
view_friend "public" see the friend information
view_friend_of "public" see the friend-of information (this operation can be modified by admin only)
view_block "public" see the blocking information (this operation can be modified by admin only)
view_block_by "public" see the blocked-by information (this operation can be modified by admin only)

types.FeedOperations

Field Name Default Description
add "" add stories to the feed

types.FriendOperations

Field Name Default Description
view "public" view the membership of the node in the group of friends

types.FriendGroupOperations

Field Name Default Description
view "public" view the group of friends

types.NodeNameOperations

Field Name Default Description
manage "" any modification of the node name, prolonging it etc.

types.PeopleOperations

Field Name Default Description
view_subscribers "public" view the list of subscribers
view_subscriptions "public" view the list of subscriptions
view_friends "public" view the list of friends
view_friend_ofs "public" view the list of those who added this node to friends
view_blocked "public" view the list of blocked nodes
view_blocked_by "admin" view the list of those who blocked this node
view_subscribers_total "public" view the number of subscribers
view_subscriptions_total "public" view the number of subscriptions
view_friends_total "public" view the number of friends
view_friend_ofs_total "public" view the number of those who added this node to friends

types.PostingOperations

Field Name Default Description
view "public" view the posting
edit "owner" edit the posting
delete "private" delete the posting
view_comments "public" view the posting's comments
add_comment "signed" add a comment to the posting
override_comment "owner" override the permissions of the posting's comments
view_reactions "public" view the posting's reactions
view_negative_reactions "public" view the posting's negative reactions
view_reaction_totals "public" view the number of the posting's reactions
view_negative_reaction_totals "public" view the number of the posting's negative reactions
view_reaction_ratios "public" view the relative number of different types of the posting's reactions
view_negative_reaction_ratios "public" view the relative number of different types of the posting's negative reactions
add_reaction "signed" add a reaction to the posting
add_negative_reaction "signed" add a negative reaction to the posting
override_reaction "owner" override the permissions of the posting's reactions
override_comment_reaction "owner" override the permissions of the posting's comment's reactions

types.PrivateMediaFileOperations

Field Name Default Description
view "public" view the media file

types.ProfileOperations

Field Name Default Description
edit "" change the profile
view_email "" view the e-mail address in the profile

types.ReactionOperations

Field Name Default Description
view "public" view the reaction
delete "private" delete the reaction

types.StoryOperations

Field Name Default Description
edit "admin" update the story
delete "admin" delete the story

types.SubscriberOperations

Field Name Default Description
view "public" see the subscriber
delete "private" delete the subscriber (this operation cannot be modified or overridden)

types.SubscriptionOperations

Field Name Default Description
view "public" see the subscription
delete "admin" delete the subscription (this operation cannot be modified or overridden)


Enums

Enums are string literals. Every particular enum type is a set of allowed values you can choose from.

types.AskSubject

Value Description
"subscribe" "subscribe to me" - asking remote node to subscribe to this node
"friend" "add me to your friends" - asking remote node to add this node to friends

types.BlockedEntryOperation

Value Description
"addComment" add a comment
"addReaction" add a reaction

types.BlockedOperation

Value Description
"reaction" add reactions to entries on the node
"comment" add comments to postings on the node
"posting" add postings to the node
"visibility" be visible to the node
"instant" be visible in stories added to the instants feed of the node

types.BodyFormat

Value Description
"message" Body structure
"application" an application-specific structure

types.DraftType

Value Description
"new-posting" draft of a new posting
"posting-update" draft of an update to a posting
"new-comment" draft of a new comment
"comment-update" draft of an update to a comment

types.OperationStatus

Value Description
"waiting" the operation is waiting to be sent to the naming server
"added" the operation was accepted by the naming server
"started" the naming server started to proceed the operation
"succeeded" the operation completed successfully
"failed" the operation failed
"unknown" the operation status is unknown

types.PrincipalFlag

Value Description
"none"
"private"
"admin"
"owner"
"secret"
"senior"
"enigma"
"major"
"signed"
"subscribed"
"public"
"friends"
"unset"

types.PushContentType

Value Description
"story-added" a story was added to a feed
"story-deleted" a story was deleted from a feed
"feed-updated" feed status was updated

types.PushRelayType

Value Description
"fcm" Google Firebase Cloud Messaging (FCM) relay

types.SettingType

Value Description
"bool" boolean, may have value true or false
"int" integer
"string" string
"json" string representation of a JSON structure
"Duration" period of time, an non-negative integer followed by a single character designating a measurement unit:
  • s - seconds;
  • m - minutes;
  • h - hours;
  • d - days.
"PrivateKey" a private cryptographic key
"PublicKey" a public cryptographic key
"Timestamp" timestamp
"UUID" UUID
"Principal" principal

types.SheriffComplainStatus

Value Description
"posted" the group is just added
"prepared" automatic preprocessing is done
"prepare-failed" automatic preprocessing is failed
"not-found" the entry the group is related to is not found
"invalid-target" the entry the group is related to is specified incorrectly
"not-original" the posting the group is related to is a copy of the original posting
"not-sheriff" the entry the group is related to is not under supervision of the sheriff
"approved" the group is approved by the sheriff
"rejected" the group is rejected by the sheriff

types.SheriffOrderCategory

Value Description
"visibility" hide the feed or the entry

types.SheriffOrderReason

Value Description
"unlawful" violation of a law
"defamatory" defamatory content
"threat" contains a threat against a person
"spam" spam
"scam" fraudulent content
"malware" distribution of a malware
"copyright" copyright infringement
"impersonating" the author pretends to be someone else
"privacy" violation of someone's privacy
"other" any other reason

types.SourceFormat

Value Description
"plain-text" plain text with newlines and paragraphs delimited by empty line
"html" HTML-formatted text, the node may allow only limited set of tags
"markdown" text in Markdown format
"application" application-specific format

types.StoryType

Value Description
"asked-to-friend" a remote node asked to add it to friends
"asked-to-subscribe" a remote node asked to subscribe to it
"blocked-user" a remote node has blocked the user globally
"blocked-user-in-posting" a remote node has blocked the user in a posting
"comment-added" a comment was added under the user's posting
"comment-media-reaction-added-negative" a positive reaction was added to a media attached to a comment
"comment-media-reaction-added-positive" a positive reaction was added to a media attached to a comment
"comment-media-reaction-failed" a failed attempt to add a reaction to a media attached to a comment
"comment-post-task-failed" a failed attempt to post a comment
"comment-reaction-added-negative" a negative reaction was added to the user's comment
"comment-reaction-added-positive" a positive reaction was added to the user's comment
"comment-reaction-task-failed" a failed attempt to post a reaction to a comment
"comment-update-task-failed" a failed attempt to update a comment
"friend-added" a remote node has added the user to friends
"friend-deleted" a remote node has removed the user from friends
"friend-group-deleted" a remote group of friends, the user was a member of, has been deleted
"mention-comment" the user was mentioned in a comment
"mention-posting" the user was mentioned in a posting on another node
"posting-added" a posting was added; **stories of this type are used for feeds containing postings**
"posting-media-reaction-added-negative" a negative reaction was added to a media attached to a posting
"posting-media-reaction-added-positive" a positive reaction was added to a media attached to a posting
"posting-media-reaction-failed" a failed attempt to add a reaction to a media attached to a posting
"posting-post-task-failed" a failed attempt to create a posting
"posting-reaction-task-failed" a failed attempt to post a reaction to a posting
"posting-subscribe-task-failed" a failed attempt to subscribe to a posting
"posting-update-task-failed" a failed attempt to update a posting
"posting-updated" a posting was updated
"reaction-added-negative" a negative reaction was added to the user's posting
"reaction-added-positive" a positive reaction was added to the user's posting
"remote-comment-added" a comment was added under a posting the user is subscribed to
"reply-comment" a reply was added to the user's comment
"sheriff-complain-added" a new complaint was received
"sheriff-complain-decided" a decision was made on the user's complaint
"sheriff-marked" user's entry was marked by a sheriff
"sheriff-unmarked" user's entry was unmarked by a sheriff
"subscriber-added" another node subscribed to user's feed
"subscriber-deleted" another node unsubscribed from user's feed
"unblocked-user" a remote node has unblocked the user globally
"unblocked-user-in-posting" a remote node has unblocked the user in a posting

types.SubscriptionReason

Value Description
"user" node owner asked to subscribe
"mention" node name was mentioned
"comment" node owner commented the posting

types.SubscriptionType

Value Description
"feed" subscribe to new stories in the feed
"posting" subscribe to updates to the posting
"posting-comments" subscribe to new comments to the posting
"profile" subscribe to updates to the node profile
"user-list" subscribe to updates to the user list (its name is passed in feedName field)

types.VerificationStatus

Value Description
"running" the verification is pending
"correct" the signature is correct
"incorrect" the signature is incorrect
"error" the verification cannot be performed due to an error