Logo Decentralized Social Network

moeralib/node

Functions

generateCarte(ownerName, signingKey, beginning, options)

Parameters:
ownerNamestring – name of the node authenticating with the carte
signingKeycrypto.KeyObject – the private signing key to sign the carte
beginningnumber – timestamp of the beginning of the carte's life
options?GenerateCarteOptions – carte options
Return value:
string – the carte

moeraRoot(url)

Convert partial node URL to a standardized form.

Parameters:
urlstring – partial URL
Return value:
string – standard URL

validateNodeSchema(schemaName, data)

Validates a data structure against the given JSON schema. In the process of validation, additional fields in the input that are absent in the schema are deleted.

Parameters:
schemaNamestring – the schema name (same as the validated structure name)
dataany – the data structure being validated
Return value:
{ valid: boolean; errors?: { message?: string }[] | null } – result of the validation and error messages

NodeAuth

Value Description
"none" No authentication.
"peer" Carte authentication.
"admin" Admin token authentication.
"root-admin" Root admin secret authentication.

GenerateCarteOptions

Interface containing optional parameters of a carte

ttl?

number – length of the carte's life, in seconds (10 minutes by default)

address?

string | null – if set, the carte is valid for authentication from the given IP address only

nodeName?

string | null – if set, the carte is valid for authentication on the specified node only

clientScope?

Scope[] | number – list of permissions granted to the carte

adminScope?

Scope[] | number – list of additional administrative permissions (of those granted to the carte's owner by the target node) granted to the carte

MoeraNodeError

Generic node error.

MoeraNodeError(name, message)

Parameters:
namestring – request name
messagestring – error message

MoeraNodeApiError

Node returned an error response.

errorCode

string – Error code.

MoeraNodeApiError(name, result)

Parameters:
namestring – request name
resultResult – node response

MoeraNodeConnectionError

Error while connecting the node.

MoeraNodeConnectionError(name)

Parameters:
messagestring – error message

MoeraNodeCallError

Missing context of the call (authentication parameters or node URL).

MoeraNodeCallError(name)

Parameters:
messagestring – error message

MoeraCartesError

Error obtaining valid cartes.

MoeraNodeCartesError(name)

Parameters:
messagestring – error message

MoeraCarteSource

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

MoeraCarteSource(node, clientScope, adminScope, targetNodeName)

Parameters:
nodeMoeraNode – node to get cartes from
clientScope?Scope[] | null – permissions to be granted to the cartes; if not set, all permissions of the cartes' owner are granted
adminScope?Scope[] | null – additional administrative permissions (of those granted to the cartes' owner by the target node) to be granted to the cartes
targetNodeName?string | null – if set, the cartes are valid for authentication on the specified node only

renew()

Force renewing the cached list of cartes.

getCarte()

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

Return value:
string – the carte

MoeraNode

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

root

string – API endpoint URL of the node.

MoeraNode(nodeUrl=null)

Parameters:
nodeUrl?string | null – node URL

General

General-purpose methods.

nodeUrl(url)

Set node URL.

Parameters:
urlstring

call(name, location, {params=null, method='GET', body=null, contentType=null, auth=true, schema, bodies=false, srcBodies=false})

Generic method for making node API requests.

Parameters:
namestring – request name (for error messages)
locationstring – request path
params?Partial<Record<string, string | number | boolean | null>> | null – query parameters, mapping name to value, None values are skipped
method?string – request method (one of 'GET', 'POST', 'PUT', 'DELETE')
body?Partial<Record<string, any>> | Partial<Record<string, any>>[] | Buffer | null – request body
contentType?string | null – content-type of the request body, when read from a file
auth?booleantrue to authenticate the request, false otherwise
schemastring – JSON schema name to validate the response, or "blob" if the result is Buffer
bodies?booleantrue to decode Body structures in the response, false otherwise
srcBodies?booleantrue to encode Body structures in the request, false otherwise
Return value:
Promise<any> – the decoded response

Authentication

Methods related to authentication.

rootSecret(secret)

Set root secret for authentication.

Parameters:
secretstring

token(token)

Set admin token for authentication.

Parameters:
tokenstring

carte(carte)

Set carte for authentication.

Parameters:
cartestring

carteSource(carteSource)

Set a source of cartes for authentication.

Parameters:
carteSource

authMethod(authMethod)

Select authentication method for the following requests.

Parameters:
authMethod

noAuth()

Switch off authentication for the following requests.

auth()

Select carte authentication for the following requests.

authAdmin()

Select admin token authentication for the following requests.

authRootAdmin()

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.

searchActivityReactions(filter)

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

Parameters:
filterActivityReactionFilter
Return value:
Promise<ActivityReactionInfo[]>
Authentication: read more
admin

Asynchronous Operations

Asynchronous operations pending or just finished on the node.

getRemotePostingVerificationStatus(id)

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

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

getRemoteReactionVerificationStatus(id)

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

Parameters:
idstring – asynchronous operation ID
Return value:
Promise<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.

getAvatars()

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

Parameters:
Return value:
Promise<AvatarInfo[]>
Authentication: read more
none

createAvatar(avatar)

Create a new avatar from a public media file that exists on the node. A new public media file is created for the avatar. If the 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:
avatarAvatarAttributes
Return value:
Promise<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

getAvatar(id)

Get an individual avatar.

Parameters:
idstring – avatar ID
Return value:
Promise<AvatarInfo>
Authentication: read more
none
Errors:
Code Description
avatar.not-found avatar is not found

deleteAvatar(id)

Delete an avatar.

Parameters:
idstring – avatar ID
Return value:
Promise<Result>
Authentication: read more
admin
Errors:
Code Description
avatar.not-found avatar is not found

reorderAvatars(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:
orderAvatarsOrdered
Return value:
Promise<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.

blockInstant(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:
instantBlockedInstantAttributes
Return value:
Promise<BlockedInstantInfo>
Authentication: read more
admin
Errors:
Code Description
entry.not-found entry is not found

getBlockedInstant(id)

Get details about the given blocked instant.

Parameters:
idstring – ID of the blocked instant
Return value:
Promise<BlockedInstantInfo>
Authentication: read more
admin
Errors:
Code Description
blocked-instant.not-found blocked instant is not found

unblockInstant(id)

Unblock the given instant.

Parameters:
idstring – ID of the blocked instant
Return value:
Promise<Result>
Authentication: read more
admin
Errors:
Code Description
blocked-instant.not-found blocked instant is not found

searchBlockedInstants(filter)

Search blocked instants by the given criteria.

Parameters:
filterBlockedInstantFilter
Return value:
Promise<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.

blockUser(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:
userBlockedUserAttributes
Return value:
Promise<BlockedUserInfo>
Authentication: read more
admin
Errors:
Code Description
entry.not-found entry is not found

getBlockedUser(id)

Get details about the given blocked user.

Parameters:
idstring – ID of the blocked user
Return value:
Promise<BlockedUserInfo>
Authentication: read more
optional
Errors:
Code Description
blocked-user.not-found blocked user is not found

unblockUser(id)

Unblock the given user.

Parameters:
idstring – ID of the blocked user
Return value:
Promise<Result>
Authentication: read more
admin
Errors:
Code Description
blocked-user.not-found blocked user is not found

searchBlockedUsers(filter)

Search blocked users by the given criteria.

Parameters:
filterBlockedUserFilter
Return value:
Promise<BlockedUserInfo[]>
Authentication: read more
optional

getBlockedUsersChecksums()

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:
Promise<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.

getBlockedByUser(id)

Get details about the given node that blocked this node.

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

searchBlockedByUsers(filter)

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

Parameters:
filterBlockedByUserFilter
Return value:
Promise<BlockedByUserInfo[]>
Authentication: read more
optional

Cartes

Cartes - cryptographic tokens used to authenticate on any node.

createCartes(attributes)

Create a set of cartes with the given attributes. Cartes in the sequence correspond to successive periods of time.

Parameters:
attributesCarteAttributes
Return value:
Promise<CarteSet>
Authentication: read more
admin

verifyCarte(clientCarte)

Verify if the given carte may be used for authentication on this node. Additionally, if clientName is provided, it is compared to the carte owner's name.

Parameters:
clientCarteClientCarte
Return value:
Promise<CarteVerificationInfo>
Authentication: read more
admin
Errors:
Code Description
carte.wrong-client carte authenticates a different node name

Comments

Comments to a posting.

getCommentsSlice(postingId, after=null, before=null, limit=null)

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 fewer comments than the given limit. The stories are always sorted by moment, ascending.

Parameters:
postingIdstring – ID of the posting
after?number – filter comments posted strongly after this moment
before?number – filter comments posted at or before this moment
limit?number – maximum number of comments returned
Return value:
Promise<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

createComment(postingId, 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 node signs the comment.

Parameters:
postingIdstring – ID of the posting
commentCommentText
Return value:
Promise<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

getComment(postingId, commentId, withSource=null)

Get an individual comment.

Parameters:
postingIdstring – ID of the posting
commentIdstring – ID of the comment
withSource?boolean – include source text of the comment
Return value:
Promise<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

updateAllComments(postingId, attributes)

Update operation overrides for all comments in the posting.

Parameters:
postingIdstring – ID of the posting
attributesCommentMassAttributes
Return value:
Promise<Result>
Authentication: read more
optional
Errors:
Code Description
posting.not-found there is no posting with the given ID

updateComment(postingId, commentId, comment)

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

Parameters:
postingIdstring – ID of the posting
commentIdstring – ID of the comment
commentCommentText
Return value:
Promise<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

deleteComment(postingId, commentId)

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:
postingIdstring – ID of the posting
commentIdstring – ID of the comment
Return value:
Promise<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

getPostingsAttachedToComment(postingId, commentId)

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

Parameters:
postingIdstring – ID of the posting
commentIdstring – ID of the comment
Return value:
Promise<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.

getCommentRevisions(postingId, commentId)

Get all revisions of the comment.

Parameters:
postingIdstring – ID of the posting
commentIdstring – ID of the comment
Return value:
Promise<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

getCommentRevision(postingId, commentId, id)

Get an individual revision of the comment.

Parameters:
postingIdstring – ID of the posting
commentIdstring – ID of the comment
idstring – ID of the revision
Return value:
Promise<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.

createCommentReaction(postingId, commentId, 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:
postingIdstring – ID of the posting
commentIdstring – ID of the comment
reactionReactionDescription
Return value:
Promise<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

updateCommentReaction(postingId, commentId, ownerName, reaction)

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

Parameters:
postingIdstring – ID of the posting
commentIdstring – ID of the comment
ownerNamestring – reaction owner node name
reactionReactionOverride
Return value:
Promise<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

getCommentReactionsSlice(postingId, commentId, negative=null, emoji=null, before=null, limit=null)

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 fewer reactions than the given limit. The reactions are always sorted by moment, descending.

Parameters:
postingIdstring – ID of the posting
commentIdstring – ID of the comment
negative?booleantrue, to filter negative reactions, false, to filter positive ones
emoji?number – filter by reaction code, usually interpreted by clients as emoji code point
before?number – filter reactions created at or before this moment
limit?number – maximum number of reactions returned
Return value:
Promise<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

getCommentReaction(postingId, commentId, ownerName)

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

Parameters:
postingIdstring – ID of the posting
commentIdstring – ID of the comment
ownerNamestring – reaction owner node name
Return value:
Promise<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

deleteAllCommentReactions(postingId, commentId)

Delete all reactions to the given comment.

Parameters:
postingIdstring – ID of the posting
commentIdstring – ID of the comment
Return value:
Promise<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

deleteCommentReaction(postingId, commentId, ownerName)

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

Parameters:
postingIdstring – ID of the posting
commentIdstring – ID of the comment
ownerNamestring – reaction owner node name
Return value:
Promise<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.

getCommentReactionTotals(postingId, commentId)

Get a summary of reactions to the comment given.

Parameters:
postingIdstring – ID of the posting
commentIdstring – ID of the comment
Return value:
Promise<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.

getContacts(query=null, limit=null)

Search for contacts matching the search query. Every space-delimited word in the query must match case-insensitively 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 fewer 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:
query?string – the search query
limit?number – maximum number of contacts returned
Return value:
Promise<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.

checkCredentials()

Check whether the credentials are initialized already.

Parameters:
Return value:
Promise<CredentialsCreated>
Authentication: read more
none

createCredentials(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:
credentialsCredentials
Return value:
Promise<Result>
Authentication: read more
none
Errors:
Code Description
credentials.already-created credentials are already created

updateCredentials(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:
credentialsCredentialsChange
Return value:
Promise<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

deleteCredentials()

Delete credentials.

Parameters:
Return value:
Promise<Result>
Authentication: read more
root admin

resetCredentials()

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 recovery of credentials. This token then may be used to change the credentials without knowing the password.

Parameters:
Return value:
Promise<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.

getDeletedPostings(page=null, limit=null)

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

Parameters:
page?number – page number, 0 by default
limit?number – page size (maximum number of postings returned), the default is defined by the node
Return value:
Promise<PostingInfo[]>
Authentication: read more
admin
Errors:
Code Description
page.invalid page parameter has an invalid value
limit.invalid limit parameter has an invalid value

getDeletedPosting(id)

Get an individual deleted posting.

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

restoreDeletedPosting(id)

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

Parameters:
idstring – ID of the posting
Return value:
Promise<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.

getDeletePostingRevisions(postingId, limit=null)

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

Parameters:
postingIdstring – ID of the posting
limit?number – maximum number of revisions returned
Return value:
Promise<PostingRevisionInfo[]>
Authentication: read more
optional
Errors:
Code Description
posting.not-found there is no posting with the given ID

getDeletedPostingRevision(postingId, id)

Get an individual revision of the deleted posting.

Parameters:
postingIdstring – ID of the posting
idstring – ID of the revision
Return value:
Promise<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

restoreDeletedPostingRevision(postingId, id)

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

Parameters:
postingIdstring – ID of the posting
idstring – ID of the revision
Return value:
Promise<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.

getDomains()

Get the list of registered domains.

Parameters:
Return value:
Promise<DomainInfo[]>
Authentication: read more
root admin

getDomain(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:
namestring – domain name
Return value:
Promise<DomainInfo>
Authentication: read more
root admin or none
Errors:
Code Description
domain.not-found there is no domain with the given hostname

createDomain(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:
domainDomainAttributes
Return value:
Promise<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

updateDomain(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:
namestring – domain's hostname
domainDomainAttributes
Return value:
Promise<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

deleteDomain(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:
namestring – domain name
Return value:
Promise<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

isDomainAvailable(nodeName)

Get an available domain name 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:
nodeNamestring – node name
Return value:
Promise<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.

getDrafts(draftType, nodeName, postingId=null, commentId=null, page=null, limit=null)

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

Parameters:
draftTypeDraftType – type of the drafts
nodeNamestring – name of the node the drafts are related to
postingId?string – ID of the posting, mandatory for all types, except new-posting
commentId?string – ID of the comment, mandatory for comment-update type
page?number – page number, 0 by default
limit?number – page size (maximum number of postings returned), the default is defined by the node
Return value:
Promise<DraftInfo[]>
Authentication: read more
admin
Errors:
Code Description
page.invalid page parameter has an invalid value
limit.invalid limit parameter has an invalid value

createDraft(draft)

Create a new draft from the text given.

Parameters:
draftDraftText
Return value:
Promise<DraftInfo>
Authentication: read more
admin

getDraft(id)

Get an individual draft.

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

updateDraft(id, draft)

Update the draft.

Parameters:
idstring – ID of the draft
draftDraftText
Return value:
Promise<DraftInfo>
Authentication: read more
admin
Errors:
Code Description
draft.not-found there is no draft with the given ID

deleteDraft(id)

Delete the draft.

Parameters:
idstring – ID of the draft
Return value:
Promise<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.

getFeatures()

Get information about features supported by the node.

Parameters:
Return value:
Promise<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.

getFeeds()

Get general information about all feeds accessible by client.

Parameters:
Return value:
Promise<FeedInfo[]>
Authentication: read more
admin or none

getFeedGeneral(feedName)

Get general information about the feed.

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

getFeedStatus(feedName)

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

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

updateFeedStatus(feedName, change)

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

Parameters:
feedNamestring – name of the feed
changeFeedStatusChange
Return value:
Promise<FeedStatus>
Authentication: read more
admin
Errors:
Code Description
feed.not-found there is no accessible feed with this name

getFeedSlice(feedName, after=null, before=null, limit=null)

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 fewer stories than the given limit. The stories are always sorted by moment, descending.

Parameters:
feedNamestring – name of the feed
after?number – filter stories posted strongly after this moment
before?number – filter stories posted at or before this moment
limit?number – maximum number of stories returned
Return value:
Promise<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.

getFriendGroups()

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

Parameters:
Return value:
Promise<FriendGroupInfo[]>
Authentication: read more
optional

getFriendGroup(id)

Get the information about the group of friends.

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

createFriendGroup(friendGroup)

Create a group of friends.

Parameters:
friendGroupFriendGroupDescription
Return value:
Promise<FriendGroupInfo>
Authentication: read more
admin

updateFriendGroup(id, friendGroup)

Update the details of the group of friends.

Parameters:
idstring – ID of the group of friends
friendGroupFriendGroupDescription
Return value:
Promise<FriendGroupInfo>
Authentication: read more
admin
Errors:
Code Description
friend-group.not-found the group of friends is not found

deleteFriendGroup(id)

Delete the group of friends.

Parameters:
idstring – ID of the group of friends
Return value:
Promise<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.

getFriends(groupId=null)

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

Parameters:
groupId?string – ID of a group of friends
Return value:
Promise<FriendInfo[]>
Authentication: read more
optional
Errors:
Code Description
friend-group.not-found the group of friends is not found

getFriend(name)

Get the friendship information for the node given.

Parameters:
namestring – name of the node
Return value:
Promise<FriendInfo>
Authentication: read more
optional

updateFriends(friends)

Update the friendship status of the nodes passed in the input. If some node 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 groups of friends that are not listed for it, the node is removed from them.

Parameters:
friendsFriendDescription[]
Return value:
Promise<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.

getFriendOfs()

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

Parameters:
Return value:
Promise<FriendOfInfo[]>
Authentication: read more
optional

getFriendOf(name)

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

Parameters:
namestring – name of the node
Return value:
Promise<FriendOfInfo>
Authentication: read more
optional

Grants

The node may grant administrative permissions (of a limited scope) on itself to other nodes.

getAllGrants()

Get the list of all nodes having administrative permissions on this node.

Parameters:
Return value:
Promise<GrantInfo[]>
Authentication: read more
admin

getGrant(nodeName)

Get information about the administrative permissions granted to the node.

Parameters:
nodeNamestring – name of the node
Return value:
Promise<GrantInfo>
Authentication: read more
admin

grantOrRevoke(nodeName, change)

Grant a set of administrative permissions to the node or revoke them.

Parameters:
nodeNamestring – name of the node
changeGrantChange
Return value:
Promise<GrantInfo>
Authentication: read more
admin
Errors:
Code Description
grant.name-not-registered node name is not registered yet

revokeAll(nodeName)

Revoke all administrative permissions granted to the node.

Parameters:
nodeNamestring – name of the node
Return value:
Promise<Result>
Authentication: read more
admin

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.

uploadAdminMedia(body, contentType)

Upload a new media file owned by the node admin. Content of the file is passed in the request body.

Parameters:
bodyBuffer
contentTypestring – content-type of body
Return value:
Promise<PrivateMediaFileInfo>
Authentication: read more
admin
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

uploadPrivateMedia(clientName, body, contentType)

Upload a new media file owned by the given node. Content of the file is passed in the request body.

Parameters:
clientNamestring – name of the node owning the media file
bodyBuffer
contentTypestring – content-type of body
Return value:
Promise<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

getPrivateMedia(id, width=null, download=null)

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

Parameters:
idstring – media file ID
width?number – 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
download?boolean – if true, the node will add Content-Disposition: attachment header to the output
Return value:
Promise<blob>
Authentication: read more
optional
Errors:
Code Description
media.not-found media file is not found

getPrivateMediaInfo(id)

Get media file details.

Parameters:
idstring – media file ID
Return value:
Promise<PrivateMediaFileInfo>
Authentication: read more
optional
Errors:
Code Description
media.not-found media file is not found

getPrivateMediaParentEntry(id)

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

Parameters:
idstring – media file ID
Return value:
Promise<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.

uploadPublicMedia(body, contentType)

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

Parameters:
bodyBuffer
contentTypestring – content-type of body
Return value:
Promise<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

getPublicMedia(id, width=null, download=null)

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

Parameters:
idstring – media file ID
width?number – 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
download?boolean – if true, the node will add Content-Disposition: attachment header to the output
Return value:
Promise<blob>
Authentication: read more
none
Errors:
Code Description
media.not-found media file is not found

getPublicMediaInfo(id)

Get media file details.

Parameters:
idstring – media file ID
Return value:
Promise<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.

getNodeName()

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

Parameters:
Return value:
Promise<NodeNameInfo>
Authentication: read more
admin or none

createNodeName(nameToRegister)

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). The words need to be written down and stored securely to be able to perform further operations with the name.

Parameters:
nameToRegisterNameToRegister
Return value:
Promise<RegisteredNameSecret>
Authentication: read more
admin
Errors:
Code Description
naming.operation-pending another operation with the node name is pending currently

updateNodeName(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:
secretRegisteredNameSecret
Return value:
Promise<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)

deleteNodeName()

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:
Promise<Result>
Authentication: read more
admin
Errors:
Code Description
naming.operation-pending another operation with the node name is pending currently

getStoredMnemonic()

Get the updating key mnemonic stored on the node.

Parameters:
Return value:
Promise<KeyMnemonic>
Authentication: read more
admin
Errors:
Code Description
not-found the mnemonic is not stored

storeMnemonic(mnemonic)

Store the updating key mnemonic on the node.

Parameters:
mnemonicKeyMnemonic
Return value:
Promise<Result>
Authentication: read more
admin

deleteStoredMnemonic()

Delete the updating key mnemonic stored on the node.

Parameters:
Return value:
Promise<Result>
Authentication: read more
admin

Notifications

Receiver of notifications from other nodes.

sendNotification(packet)

Accept a notification packet from another 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:
packetNotificationPacket
Return value:
Promise<Result>
Authentication: read more
signature
Errors:
Code Description
frozen not an error; the notification was accepted, but will not be processed immediately, because the node is frozen due to inactivity
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.

getPeopleGeneral()

Get general information about other nodes.

Parameters:
Return value:
Promise<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.

registerPlugin(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:
pluginPluginDescription
Return value:
Promise<PluginInfo>
Authentication: read more
root admin or admin
Errors:
Code Description
plugin.already-exists plugin with this name is already registered

getPlugins()

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

Parameters:
Return value:
Promise<PluginInfo[]>
Authentication: read more
optional

getPlugin(pluginName)

Get information about the plugin.

Parameters:
pluginNamestring – name of the plugin
Return value:
Promise<PluginInfo>
Authentication: read more
optional
Errors:
Code Description
plugin.unknown unknown plugin

unregisterPlugin(pluginName)

Unregister the plugin.

Parameters:
pluginNamestring – name of the plugin
Return value:
Promise<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.

createPosting(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 node signs the posting.

Parameters:
postingPostingText
Return value:
Promise<PostingInfo>
Authentication: read more
required or signature

updatePosting(id, posting)

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

Parameters:
idstring – ID of the posting
postingPostingText
Return value:
Promise<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

getPosting(id, withSource=null)

Get an individual posting.

Parameters:
idstring – ID of the posting
withSource?boolean – include source text of the posting
Return value:
Promise<PostingInfo>
Authentication: read more
optional
Errors:
Code Description
posting.not-found there is no posting with the given ID

deletePosting(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:
idstring – ID of the posting
Return value:
Promise<Result>
Authentication: read more
optional
Errors:
Code Description
posting.not-found there is no posting with the given ID

getPostingsAttachedToPosting(id)

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

Parameters:
idstring – ID of the posting
Return value:
Promise<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.

getPostingRevisions(postingId, limit=null)

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

Parameters:
postingIdstring – ID of the posting
limit?number – maximum number of revisions returned
Return value:
Promise<PostingRevisionInfo[]>
Authentication: read more
optional
Errors:
Code Description
posting.not-found there is no posting with the given ID

getPostingRevision(postingId, id)

Get an individual revision of the posting.

Parameters:
postingIdstring – ID of the posting
idstring – ID of the revision
Return value:
Promise<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

restorePostingRevision(postingId, id)

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

Parameters:
postingIdstring – ID of the posting
idstring – ID of the revision
Return value:
Promise<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.

createPostingReaction(postingId, 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:
postingIdstring – ID of the posting
reactionReactionDescription
Return value:
Promise<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

getPostingReactionsSlice(postingId, negative=null, emoji=null, before=null, limit=null)

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:
postingIdstring – ID of the posting
negative?booleantrue, to filter negative reactions, false, to filter positive ones
emoji?number – filter by reaction code, usually interpreted by clients as emoji code point
before?number – filter reactions created at or before this moment
limit?number – maximum number of reactions returned
Return value:
Promise<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

updatePostingReaction(postingId, ownerName, reaction)

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

Parameters:
postingIdstring – ID of the posting
ownerNamestring – reaction owner node name
reactionReactionOverride
Return value:
Promise<ReactionInfo>
Authentication: read more
optional
Errors:
Code Description
posting.not-found there is no posting with the given ID

getPostingReaction(postingId, ownerName)

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

Parameters:
postingIdstring – ID of the posting
ownerNamestring – reaction owner node name
Return value:
Promise<ReactionInfo>
Authentication: read more
optional
Errors:
Code Description
posting.not-found there is no posting with the given ID

deleteAllPostingReactions(postingId)

Delete all reactions to the given posting.

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

deletePostingReaction(postingId, ownerName)

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

Parameters:
postingIdstring – ID of the posting
ownerNamestring – reaction owner node name
Return value:
Promise<ReactionTotalsInfo>
Authentication: read more
optional
Errors:
Code Description
posting.not-found there is no posting with the given ID

searchPostingReactions(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:
filterReactionsFilter
Return value:
Promise<ReactionInfo[]>
Authentication: read more
optional

Posting Reaction Totals

Summary of reactions to a posting.

getPostingReactionTotals(postingId)

Get a summary of reactions to the posting given.

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

searchPostingReactionTotals(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:
filterReactionTotalsFilter
Return value:
Promise<ReactionTotalsInfo[]>
Authentication: read more
optional

Profile

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

getProfile(withSource=null)

Get the profile.

Parameters:
withSource?boolean – include source text of the bio
Return value:
Promise<ProfileInfo>
Authentication: read more
optional

updateProfile(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:
profileProfileAttributes
Return value:
Promise<ProfileInfo>
Authentication: read more
admin

Provider

Communication with the provider (owner of the server).

getDeleteNodeRequestStatus()

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

Parameters:
Return value:
Promise<DeleteNodeStatus>
Authentication: read more
admin

sendDeleteNodeRequest(deleteNodeText)

Send a request to the provider to delete the node.

Parameters:
deleteNodeTextDeleteNodeText
Return value:
Promise<DeleteNodeStatus>
Authentication: read more
admin

cancelDeleteNodeRequest()

Cancel the request to delete the node.

Parameters:
Return value:
Promise<DeleteNodeStatus>
Authentication: read more
admin

Proxy

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

proxyMedia(url)

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

Parameters:
urlstring
Return value:
Promise<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

proxyLinkPreview(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:
urlstring
Return value:
Promise<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.

registerAtPushRelay(attributes)

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

Parameters:
attributesPushRelayClientAttributes
Return value:
Promise<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.

askRemoteNode(nodeName, details)

Send a request to the remote node.

Parameters:
nodeNamestring – name of the remote node
detailsAskDescription
Return value:
Promise<Result>
Authentication: read more
admin

Remote Comments

Comments to postings located on other nodes.

createRemoteComment(nodeName, postingId, comment)

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

Parameters:
nodeNamestring – name of the remote node
postingIdstring – ID of the posting on the remote node
commentCommentSourceText
Return value:
Promise<Result>
Authentication: read more
admin

updateRemoteComment(nodeName, postingId, commentId, comment)

Update a comment to the posting on the remote node.

Parameters:
nodeNamestring – name of the remote node
postingIdstring – ID of the posting on the remote node
commentIdstring – ID of the comment on the remote node
commentCommentSourceText
Return value:
Promise<Result>
Authentication: read more
admin

deleteRemoteComment(nodeName, postingId, commentId)

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

Parameters:
nodeNamestring – name of the remote node
postingIdstring – ID of the posting on the remote node
commentIdstring – ID of the comment on the remote node
Return value:
Promise<Result>
Authentication: read more
admin

verifyRemoteComment(nodeName, postingId, commentId)

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

Parameters:
nodeNamestring – name of the remote node
postingIdstring – ID of the posting on the remote node
commentIdstring – ID of the comment on the remote node
Return value:
Promise<AsyncOperationCreated>
Authentication: read more
admin

Remote Comment Reactions

Reactions to comments located on other nodes.

createRemoteCommentReaction(nodeName, postingId, commentId, reaction)

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

Parameters:
nodeNamestring – name of the remote node
postingIdstring – ID of the posting on the remote node
commentIdstring – ID of the comment on the remote node
reactionReactionAttributes
Return value:
Promise<Result>
Authentication: read more
admin

deleteRemoteCommentReaction(nodeName, postingId, commentId)

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

Parameters:
nodeNamestring – name of the remote node
postingIdstring – ID of the posting on the remote node
commentIdstring – ID of the comment on the remote node
Return value:
Promise<Result>
Authentication: read more
admin

verifyRemoteCommentReaction(nodeName, postingId, commentId, ownerName)

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

Parameters:
nodeNamestring – name of the remote node
postingIdstring – ID of the posting on the remote node
commentIdstring – ID of the comment on the remote node
ownerNamestring – reaction owner node name
Return value:
Promise<AsyncOperationCreated>
Authentication: read more
admin

Remote Postings

Postings located on other nodes.

createRemotePosting(nodeName, posting)

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

Parameters:
nodeNamestring – name of the remote node
postingPostingSourceText
Return value:
Promise<Result>
Authentication: read more
admin

updateRemotePosting(nodeName, postingId, posting)

Update a posting on the remote node.

Parameters:
nodeNamestring – name of the remote node
postingIdstring – ID of the posting on the remote node
postingPostingSourceText
Return value:
Promise<Result>
Authentication: read more
admin

deleteRemotePosting(nodeName, postingId)

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

Parameters:
nodeNamestring – name of the remote node
postingIdstring – ID of the posting on the remote node
Return value:
Promise<Result>
Authentication: read more
admin

verifyRemotePosting(nodeName, id)

Verify the signature of the given posting.

Parameters:
nodeNamestring – name of the remote node
idstring – ID of the posting on the remote node
Return value:
Promise<AsyncOperationCreated>
Authentication: read more
admin

verifyRemotePostingRevision(nodeName, id, revisionId)

Verify the signature of the given revision of a posting.

Parameters:
nodeNamestring – name of the remote node
idstring – ID of the posting on the remote node
revisionIdstring – ID of the posting revision
Return value:
Promise<AsyncOperationCreated>
Authentication: read more
admin

Remote Posting Reactions

Reactions to postings located on other nodes.

createRemotePostingReaction(nodeName, postingId, reaction)

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

Parameters:
nodeNamestring – name of the remote node
postingIdstring – ID of the posting on the remote node
reactionReactionAttributes
Return value:
Promise<Result>
Authentication: read more
admin

deleteRemotePostingReaction(nodeName, postingId)

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

Parameters:
nodeNamestring – name of the remote node
postingIdstring – ID of the posting on the remote node
Return value:
Promise<Result>
Authentication: read more
admin

verifyRemotePostingReaction(nodeName, postingId, ownerName)

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

Parameters:
nodeNamestring – name of the remote node
postingIdstring – ID of the posting on the remote node
ownerNamestring – reaction owner node name
Return value:
Promise<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.

createRemoteSheriffOrder(nodeName, sheriffOrder)

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

Parameters:
nodeNamestring – name of the remote node
sheriffOrderSheriffOrderAttributes
Return value:
Promise<Result>
Authentication: read more
admin

getRemoteSheriffOrder(nodeName, id)

Get the details of the given sheriff's order

Parameters:
nodeNamestring – name of the remote node
idstring – ID of the order
Return value:
Promise<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.

updateSettings(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 a 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:
settingsSettingInfo[]
Return value:
Promise<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

getClientSettings(prefix=null)

Get all client settings, sorted by name.

Parameters:
prefix?string – filter settings whose names start with the given prefix, case-sensitive (client. prefix must be included)
Return value:
Promise<SettingInfo[]>
Authentication: read more
admin

getNodeSettings(prefix=null)

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

Parameters:
prefix?string – filter settings whose names start with the given prefix, case-sensitive
Return value:
Promise<SettingInfo[]>
Authentication: read more
admin

getNodeSettingsMetadata(prefix=null)

Get all node settings metadata, sorted by name.

Parameters:
prefix?string – filter settings whose names start with the given prefix, case-sensitive
Return value:
Promise<SettingMetaInfo[]>
Authentication: read more
admin

updateNodeSettingsMetadata(metadata)

Update node settings metadata, overriding built-in defaults.

Parameters:
metadataSettingMetaAttributes[]
Return value:
Promise<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.

getSheriffComplaintGroupsSlice(after=null, before=null, limit=null, status=null)

Get a slice of the list of groups of complaints, optionally filtered by status, delimited by the 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:
after?number – filter groups created strongly after this moment
before?number – filter groups created at or before this moment
limit?number – maximum number of groups returned
status?SheriffComplaintStatus – filter groups by status
Return value:
Promise<SheriffComplaintGroupsSliceInfo>
Authentication: read more
none
Errors:
Code Description
sheriff-complaint-groups.before-after-exclusive before and after parameters are mutually exclusive

getSheriffComplaintGroup(id)

Get details of the given group of complaints.

Parameters:
idstring – ID of the group of complaints
Return value:
Promise<SheriffComplaintGroupInfo>
Authentication: read more
none
Errors:
Code Description
sheriff-complaint-group.not-found

getSheriffComplaintsByGroup(id)

Get complaints included in the given group of complaints.

Parameters:
idstring – ID of the group of complaints
Return value:
Promise<SheriffComplaintInfo[]>
Authentication: read more
none
Errors:
Code Description
sheriff-complaint-group.not-found

updateSheriffComplaintGroup(id, decision)

Make a decision on the given group of complaints.

Parameters:
idstring – ID of the group of complaints
decisionSheriffComplaintDecisionText
Return value:
Promise<SheriffComplaintGroupInfo>
Authentication: read more
admin
Errors:
Code Description
sheriff-complaint-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.

createSheriffComplaint(complaint)

Send a complaint to the sheriff.

Parameters:
complaintSheriffComplaintText
Return value:
Promise<SheriffComplaintInfo>
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.

createSheriffOrder(sheriffOrder)

Receive and execute the sheriff's order.

Parameters:
sheriffOrderSheriffOrderDetails
Return value:
Promise<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.

getStory(id)

Get an individual story.

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

updateStory(id, story)

Update the story.

Parameters:
idstring – ID of the story
storyStoryAttributes
Return value:
Promise<StoryInfo>
Authentication: read more
admin
Errors:
Code Description
story.not-found there is no story with the given ID

deleteStory(id)

Delete the story.

Parameters:
idstring – ID of the story
Return value:
Promise<Result>
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.

getSubscribers(nodeName=null, type=null, feedName=null, entryId=null)

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

Parameters:
nodeName?string – filter by subscribed node name
type?SubscriptionType – filter by subscription type
feedName?string – filter by name of the feed subscribed to
entryId?string – filter by ID of the entry subscribed to
Return value:
Promise<SubscriberInfo[]>
Authentication: read more
optional

createSubscriber(subscriber)

Subscribe to a particular group of notifications.

Parameters:
subscriberSubscriberDescription
Return value:
Promise<SubscriberInfo>
Authentication: read more
required

getSubscriber(id)

Get an individual subscriber.

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

updateSubscriber(id, subscriber)

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

Parameters:
idstring – ID of the subscriber
subscriberSubscriberOverride
Return value:
Promise<SubscriberInfo>
Authentication: read more
required
Errors:
Code Description
subscriber.not-found there is no subscriber with the given ID

deleteSubscriber(id)

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

Parameters:
idstring – ID of the subscriber
Return value:
Promise<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.

getSubscriptions(nodeName=null, type=null)

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

Parameters:
nodeName?string – filter by node name
type?SubscriptionType – filter by subscription type
Return value:
Promise<SubscriptionInfo[]>
Authentication: read more
optional

createSubscription(subscription)

Register a subscription to notifications from a particular node.

Parameters:
subscriptionSubscriptionDescription
Return value:
Promise<SubscriptionInfo>
Authentication: read more
admin
Errors:
Code Description
subscription.already-exists an identical subscription already exists

updateSubscription(id, subscription)

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

Parameters:
idstring – ID of the subscription
subscriptionSubscriptionOverride
Return value:
Promise<SubscriptionInfo>
Authentication: read more
required
Errors:
Code Description
subscription.not-found there is no subscription with the given ID

deleteSubscription(id)

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

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

searchSubscriptions(filter)

Search for subscriptions by the given criteria.

Parameters:
filterSubscriptionFilter
Return value:
Promise<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.

getTokens()

Get the list of all existing tokens.

Parameters:
Return value:
Promise<TokenInfo[]>
Authentication: read more
admin

createToken(token)

Sign in and create a token.

Parameters:
tokenTokenAttributes
Return value:
Promise<TokenInfo>
Authentication: read more
none
Errors:
Code Description
credentials.not-created credentials are not created yet
credentials.login-incorrect login or password is incorrect

getTokenInfo(id)

Get information about the token.

Parameters:
idstring – ID of the token
Return value:
Promise<TokenInfo>
Authentication: read more
admin

updateToken(id, update)

Update the name or permissions of the token. It is not possible to grant token additional permissions with this request, but the granted permissions can be revoked.

Parameters:
idstring – ID of the token
updateTokenUpdate
Return value:
Promise<TokenInfo>
Authentication: read more
admin

deleteToken(id)

Delete the token.

Parameters:
idstring – ID of the token
Return value:
Promise<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.

getUserListGeneral(name)

Get the general information about the user list given.

Parameters:
namestring – the name of the list
Return value:
Promise<UserListInfo>
Authentication: read more
none

getUserListSlice(name, after=null, before=null, limit=null)

Get a slice of the user list, delimited by the 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 fewer items than the given limit. The items are always sorted by moment, descending.

Parameters:
namestring – the name of the list
after?number – filter items created strongly after this moment
before?number – filter items created at or before this moment
limit?number – maximum number of items returned
Return value:
Promise<UserListSliceInfo>
Authentication: read more
none
Errors:
Code Description
user-list-items.before-after-exclusive before and after parameters are mutually exclusive

getUserListItem(name, nodeName)

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

Parameters:
namestring – the name of the list
nodeNamestring – the node name to get information about
Return value:
Promise<UserListItemInfo>
Authentication: read more
none
Errors:
Code Description
user-list-item.not-found user list item is not found

createUserListItem(name, item)

Add a node to the user list.

Parameters:
namestring – the name of the list
itemUserListItemAttributes
Return value:
Promise<UserListItemInfo>
Authentication: read more
admin
Errors:
Code Description
user-list-item.already-exists node is in the user list already

deleteUserListItem(name, nodeName)

Delete a node from the user list

Parameters:
namestring – the name of the list
nodeNamestring – the node name to delete
Return value:
Promise<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.

whoAmI()

Get brief information about the node.

Parameters:
Return value:
Promise<WhoAmI>
Authentication: read more
none


Structures

AcceptedReactions

Field Name Type Description
positive string 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 string comma-separated list of codes of the negative reactions that are accepted (the format is the same as above)

ActivityReactionFilter

Field Name Type Description
postings? RemotePosting[] include only reactions to remote postings from this list

ActivityReactionInfo

Field Name Type Description
remoteNodeName string name of the remote node
remoteFullName? string full name of the remote node
remoteAvatar? AvatarImage avatar of the remote node
remotePostingId string ID of the posting on the remote node
negative boolean true, if the reaction is negative, false, if positive
emoji number reaction code, usually interpreted by clients as emoji code point
createdAt number reaction creation timestamp - the real time when the reaction was created

AskDescription

Field Name Type Description
subject AskSubject request subject
friendGroupId? string 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? string 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

AsyncOperationCreated

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

AvatarAttributes

Field Name Type Description
mediaId string ID of the public media file used as a source image
clipX number x coordinate of the top-left corner of the clipping square
clipY number y coordinate of the top-left corner of the clipping square
clipSize number size of the clipping square
avatarSize number size of the avatar to be created
rotate number rotation angle of the source image
shape? string shape of the avatar
ordinal? number 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)

AvatarDescription

Field Name Type Description
mediaId string ID of the public media file used as an avatar image
shape string shape of the avatar
optional? boolean 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

AvatarImage

Field Name Type Description
mediaId string ID of the media file
path string virtual location of the media file, relative to the /media virtual page
width? number width of the media in pixels (null, if the media file is not an image/video)
height? number height of the media in pixels (null, if the media file is not an image/video)
shape? string shape of the avatar

AvatarInfo

Field Name Type Description
id string ID of the avatar
mediaId string ID of the media file
path string virtual location of the media file, relative to the /media virtual page
width? number width of the media in pixels (null, if the media file is not an image/video)
height? number height of the media in pixels (null, if the media file is not an image/video)
shape? string shape of the avatar
ordinal number ordinal of the avatar

AvatarOrdinal

Field Name Type Description
id string ID of the avatar
ordinal number ordinal of the avatar

AvatarsOrdered

Field Name Type Description
ids string[] IDs of avatars

BlockedByUserFilter

Field Name Type Description
blockedOperations? BlockedOperation[] operations that are blocked
postings? RemotePostingOrNode[] the postings or whole nodes, where the node is blocked
strict? boolean 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

BlockedByUserInfo

Field Name Type Description
id string
blockedOperation BlockedOperation operation that is blocked
contact? ContactInfo information known about the blocking node
nodeName string name of the blocking node
postingId? string ID of the posting, where the node is blocked; null or absent, if the node is blocked globally
createdAt number blocking timestamp - the real time when the node was blocked
deadline? number unblocking timestamp - the real time when the node will be unblocked; null or absent, if the node is blocked permanently
reason? string reason of blocking

BlockedInstantAttributes

Field Name Type Description
storyType StoryType type of the story
entryId? string ID of the local entry the blocked story should be related to
remoteNodeName? string node name of the remote posting the blocked story should be related to
remotePostingId? string ID of the remote posting the blocked story should be related to
remoteOwnerName? string owner name of the remote object the blocked story should be related to
deadline? number unblocking timestamp - the real time when the story will be unblocked; null or absent, if the story is blocked permanently
Validation errors:
Code Description
blockedInstantAttributes.storyType.blank story type is not set

BlockedInstantFilter

Field Name Type Description
storyType StoryType type of the story
entryId? string ID of the local entry the blocked story should be related to
remoteNodeName? string node name of the remote posting the blocked story should be related to
remotePostingId? string ID of the remote posting the blocked story should be related to
remoteOwnerName? string owner name of the remote object the blocked story should be related to

BlockedInstantInfo

Field Name Type Description
id string
storyType StoryType type of the story
entryId? string ID of the local entry the blocked story should be related to
remoteNodeName? string node name of the remote posting the blocked story should be related to
remotePostingId? string ID of the remote posting the blocked story should be related to
remoteOwnerName? string owner name of the remote object the blocked story should be related to
createdAt number blocking timestamp - the real time when the story was blocked
deadline? number unblocking timestamp - the real time when the story will be unblocked; null or absent, if the story is blocked permanently

BlockedPostingInstantInfo

Field Name Type Description
id string
storyType StoryType type of the story
remoteOwnerName? string owner name of the remote object the blocked story should be related to
deadline? number unblocking timestamp - the real time when the story will be unblocked; null or absent, if the story is blocked permanently

BlockedUserAttributes

Field Name Type Description
blockedOperation BlockedOperation operation that is to be blocked
nodeName string name of the blocked node
entryId? string ID of the local entry, where the node is blocked; null or absent, if the node is blocked globally
entryNodeName? string node name of the remote posting, where the node is blocked; null or absent, if the node is blocked globally
entryPostingId? string ID of the remote posting, where the node is blocked; null or absent, if the node is blocked globally
deadline? number unblocking timestamp - the real time when the node will be unblocked; null or absent, if the node is blocked permanently
reasonSrc? string source text of the reason of blocking
reasonSrcFormat? SourceFormat 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

BlockedUserFilter

Field Name Type Description
blockedOperations? BlockedOperation[] operations that are blocked
nodeName? string name of the blocked node
entryId? string ID of the local entry, where the node is blocked; null or absent, if the node is blocked globally
entryNodeName? string node name of the remote posting, where the node is blocked; null or absent, if the node is blocked globally
entryPostingId? string ID of the remote posting, where the node is blocked; null or absent, if the node is blocked globally
strict? boolean 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

BlockedUserInfo

Field Name Type Description
id string
blockedOperation BlockedOperation operation that is blocked
nodeName string name of the blocked node
contact? ContactInfo information known about the blocked node
entryId? string ID of the local entry, where the node is blocked; null or absent, if the node is blocked globally
entryNodeName? string node name of the remote posting, where the node is blocked; null or absent, if the node is blocked globally
entryPostingId? string ID of the remote posting, where the node is blocked; null or absent, if the node is blocked globally
createdAt number blocking timestamp - the real time when the node was blocked
deadline? number unblocking timestamp - the real time when the node will be unblocked; null or absent, if the node is blocked permanently
reasonSrc? string source text of the reason of blocking
reasonSrcFormat? SourceFormat format of the source text of the reason of blocking, the list of available formats is returned in PostingFeatures
reason? string reason of blocking

BlockedUsersChecksums

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

Body

Field Name Type Description
subject? string the subject (plain text)
text? string the text (HTML)
linkPreviews? LinkPreview[] link previews

CarteAttributes

Field Name Type Description
clientScope? Scope[] permissions to be granted to the carte; if not set, all permissions of the carte's owner are granted
adminScope? Scope[] additional administrative permissions (of those granted to the carte's owner by the target node) to be granted to the carte
nodeName? string if set, the carte is valid for authentication on the specified node only
limit? number maximum number of sequential cartes to be returned; the node may decide to return fewer cartes than the given limit

CarteInfo

Field Name Type Description
carte string
beginning number timestamp of the beginning of the carte's life
deadline number timestamp of the end of the carte's life
nodeName? string if set, the carte is valid for authentication on the specified node only
clientScope? Scope[] the list of permissions granted to the carte
adminScope? Scope[] the list of additional administrative permissions (of those granted to the carte's owner by the target node) granted to the carte

CarteSet

Field Name Type Description
cartesIp? string the client IP address the cartes are bound to
cartes CarteInfo[] the cartes
createdAt number cartes creation timestamp

CarteVerificationInfo

Field Name Type Description
valid boolean true, if the carte can be accepted for authentication, false otherwise
clientName? string name of the node the carte authenticates
clientScope? Scope[] the list of permissions granted to the carte
adminScope? Scope[] the list of additional administrative permissions (of those granted to the carte's owner by the target node) granted to the carte
errorCode? string error code
errorMessage? string human-readable error message

ClientCarte

Field Name Type Description
clientName? string the node name the client (carte owner) wants to authenticate under
carte string the carte to verify
Validation errors:
Code Description
clientCarte.carte.blank carte is empty

ClientReactionInfo

Field Name Type Description
negative boolean true, if the reaction is negative, false, if positive
emoji number reaction code, usually interpreted by clients as emoji code point
createdAt number reaction creation timestamp - the real time when the reaction was created
deadline? number if present, the reaction will be erased at this time

CommentCreated

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

CommentInfo

Field Name Type Description
id string
ownerName string node name of the comment's owner
ownerFullName? string full name of the comment's owner
ownerGender? string gender of the comment's owner
ownerAvatar? AvatarImage avatar of the comment's owner
postingId string ID of the parent posting of the comment
postingRevisionId string ID of the revision of parent posting that was current when the comment was created
revisionId string ID of the current revision of the comment
totalRevisions number total number of revisions the comment has
bodyPreview? Body preview of the comment's body, a string representation of a JSON structure
bodySrc? Body the source text of the comment, a string representation of a JSON structure, may be absent if not requested
bodySrcHash string hash of the source text of the comment
bodySrcFormat? SourceFormat format of the source text of the comment, the list of available formats is returned in PostingFeatures
body Body body of the comment, a string representation of a JSON structure
bodyFormat? BodyFormat format of the body of the comment, may have any value meaningful for the client
media? MediaAttachment[] list of the media attached to the comment
heading string heading of the comment
repliedTo? RepliedTo information about the comment this comment is replying to
moment number
createdAt number comment creation timestamp - the real time when the comment was created
editedAt? number comment editing timestamp - the last time the comment was updated
deletedAt? number comment deletion timestamp - the time when the comment was deleted
revisionCreatedAt number creation timestamp of the current revision of the comment
deadline? number comment purging timestamp - the time when the deleted comment will be purged from the database
digest? string cryptographic digest of the comment (use Comment fingerprint)
signature? string the comment's owner signature (use Comment fingerprint)
signatureVersion? number signature version (i.e. fingerprint version)
operations? CommentOperations the supported operations and the corresponding principals
reactionOperations? ReactionOperations the operations and the corresponding principals that are overridden in reactions to the comment
ownerOperations? CommentOperations the supported operations and the corresponding principals as defined by the comment's owner
seniorOperations? CommentOperations the operations and the corresponding principals that are overridden by the posting's owner ("senior")
blockedOperations? BlockedEntryOperation[] operations on the comment that are blocked for the client
sheriffMarks? SheriffMark[] list of sheriff marks on the comment
acceptedReactions? AcceptedReactions types of reactions that the comment accepts
clientReaction? ClientReactionInfo details of the existing reaction (if any) of the client's owner
seniorReaction? ClientReactionInfo details of the existing reaction (if any) of the posting's owner ("senior") to the comment
reactions? ReactionTotalsInfo summary of reactions to the comment

CommentMassAttributes

Field Name Type Description
seniorOperations? CommentOperations 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

CommentRevisionInfo

Field Name Type Description
id string
postingRevisionId string ID of the posting revision that was actual at the moment of creation of this comment revision
bodyPreview? Body preview of the revision's body, a string representation of a JSON structure
bodySrcHash string hash of the source text of the revision
bodySrcFormat? SourceFormat format of the source text of the revision, the list of available formats is returned in PostingFeatures
body Body body of the revision, a string representation of a JSON structure
bodyFormat? BodyFormat format of the body of the revision, may have any value meaningful for the client
heading string heading of the revision
createdAt number revision creation timestamp - the real time when the revision was created
deletedAt? number revision deletion timestamp - the time when the revision was deleted
deadline? number revision deletion timestamp - the time when the revision will be deleted and the previous revision will take its place
digest? string cryptographic digest of the revision (use Comment fingerprint)
signature? string the comment's owner signature (use Comment fingerprint)
signatureVersion? number signature version (i.e. fingerprint version)
clientReaction? ClientReactionInfo details of the existing reaction (if any) of the client's owner
reactions? ReactionTotalsInfo summary of reactions to the revision

CommentsSliceInfo

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

CommentSourceText

Field Name Type Description
ownerAvatar? AvatarDescription avatar of the comment's owner
bodySrc? Body the source text of the comment, a string representation of a JSON structure
bodySrcFormat? SourceFormat format of the source text of the comment, plain-text by default; the list of available formats is returned in PostingFeatures
media? MediaWithDigest[] array of IDs and digests of private media to be attached to the comment
acceptedReactions? AcceptedReactions types of reactions that the comment accepts
repliedToId? string ID of the comment this comment is replying to
operations? CommentOperations the operations and the corresponding principals
seniorOperations? CommentOperations 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

CommentText

Field Name Type Description
ownerName? string node name of the comment's owner
ownerFullName? string full name of the comment's owner
ownerGender? string gender of the comment's owner
ownerAvatar? AvatarDescription avatar of the comment's owner
bodyPreview? Body preview of the comment's body, a string representation of a JSON structure
bodySrc? Body the source text of the comment, a string representation of a JSON structure
bodySrcFormat? SourceFormat format of the source text of the comment, plain-text by default; the list of available formats is returned in PostingFeatures
body? Body body of the comment, a string representation of a JSON structure
bodyFormat? BodyFormat format of the body of the comment, may have any value meaningful for the client
media? string[] array of IDs of private media to be attached to the comment
createdAt? number comment creation timestamp - the real time when the comment was created
acceptedReactions? AcceptedReactions types of reactions that the comment accepts
repliedToId? string ID of the comment this comment is replying to
signature? string the comment's owner signature (use Comment fingerprint)
signatureVersion? number signature version (i.e. fingerprint version)
operations? CommentOperations the operations and the corresponding principals
reactionOperations? ReactionOperations the operations and the corresponding principals that are overridden in reactions to the comment
seniorOperations? CommentOperations 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

CommentTotalInfo

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

ContactInfo

Field Name Type Description
nodeName string
fullName? string
gender? string
avatar? AvatarImage
closeness number closeness of the contact to the node, which is calculated from the number of reactions and comments and their age
hasFeedSubscriber? boolean the contact is subscribed to at least one of the node's feeds
hasFeedSubscription? boolean the node is subscribed to at least one of the contact's feeds
hasFriend? boolean the contact is a friend of the node
hasFriendOf? boolean the node is a friend of the contact
hasBlock? boolean the contact is blocked by the node
hasBlockBy? boolean the node is blocked by the contact
operations? ContactOperations the supported operations and the corresponding principals
ownerOperations? ContactOperations the supported operations and the corresponding principals as defined by the contact's owner
adminOperations? ContactOperations the operations and the corresponding principals that are overridden by the node administrator

Credentials

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

CredentialsChange

Field Name Type Description
token? string credentials reset token
oldPassword? string the current password
login string
password string
Validation errors:
Code Description
credentials.login.blank the login is empty
credentials.password.blank the password is empty

CredentialsCreated

Field Name Type Description
created boolean true if the credentials are initialized already, false otherwise

DeleteNodeStatus

Field Name Type Description
requested boolean true if the request is sent, false otherwise

DeleteNodeText

Field Name Type Description
message? string 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

DomainAttributes

Field Name Type Description
name? string domain's hostname or _default_ for the default domain
nodeId? string 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

DomainAvailable

Field Name Type Description
name string fully-qualified domain name

DomainInfo

Field Name Type Description
name string domain's hostname or _default_ for the default domain
nodeId string domain's node ID
createdAt number 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

DraftInfo

Field Name Type Description
id string
draftType DraftType type of the draft
receiverName string name of the node the draft is related to
receiverPostingId? string ID of the posting, set for all types, except new-posting
receiverCommentId? string ID of the comment, set for comment-update type
repliedToId? string ID of the comment replied to, set for comment drafts, if needed
createdAt number draft creation timestamp - the real time when the draft was created
editedAt? number draft editing timestamp - the last time the draft was updated
deadline? number draft purging timestamp - the time when the draft will be purged from the database, if not updated
ownerFullName? string full name of the posting's/comment's owner
ownerAvatar? AvatarImage avatar of the posting's/comment's owner
acceptedReactions? AcceptedReactions types of reactions that the posting accepts
bodySrc? Body the source text of the draft, a string representation of a JSON structure
bodySrcFormat? SourceFormat format of the source text of the draft, plain-text by default; the list of available formats is returned in PostingFeatures
body Body body of the draft, a string representation of a JSON structure
bodyFormat? BodyFormat format of the body of the draft
media? MediaAttachment[] list of the media attached to the draft
heading string heading of the draft
publishAt? number story publication timestamp - the time the story must be published under in the feed
updateInfo? UpdateInfo description of the update
operations? PostingOperations draft of the list of operations and the corresponding principals
commentOperations? CommentOperations draft of the list of operations and the corresponding principals that are overridden in the posting's comments, set for posting drafts, if needed

DraftText

Field Name Type Description
draftType DraftType type of the draft
receiverName string name of the node the draft is related to
receiverPostingId? string ID of the posting, mandatory for all types, except new-posting
receiverCommentId? string ID of the comment, mandatory for comment-update type
repliedToId? string ID of the comment replied to
ownerFullName? string full name of the posting's/comment's owner
ownerAvatar? AvatarDescription avatar of the posting's/comment's owner
acceptedReactions? AcceptedReactions types of reactions that the posting accepts
bodySrc? Body the source text of the draft, a string representation of a JSON structure
bodySrcFormat? SourceFormat format of the source text of the draft, plain-text by default; the list of available formats is returned in PostingFeatures
media? RemoteMedia[] list of the media attached to the draft, the media may be located on another node
publishAt? number story publication timestamp - the time the story must be published under in the feed
updateInfo? UpdateInfo description of the update
operations? PostingOperations draft of the list of operations and the corresponding principals
commentOperations? CommentOperations 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

EmailHint

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

EntryInfo

Field Name Type Description
posting? PostingInfo posting details, set if the entry is a posting
comment? CommentInfo comment details, set if the entry is a comment

Features

Field Name Type Description
posting PostingFeatures features of a posting
plugins? string[] list of names of plugins enabled for the node
feedWidth number width of the feed in pixels
friendGroups? FriendGroupsFeatures features of groups of friends
ask? AskSubject[] list of requests to the node owner that are accepted by the node
subscribed? boolean true, if the node is subscribed to the client, false otherwise

FeedInfo

Field Name Type Description
feedName string name of the feed
title? string title of the feed
total number total number of stories in the feed
firstCreatedAt? number creation timestamp of the earliest story in the feed
lastCreatedAt? number creation timestamp of the latest story in the feed
operations? FeedOperations the supported operations and the corresponding principals
sheriffs? string[] list of sheriffs supervising the feed
sheriffMarks? SheriffMark[] list of sheriff marks on the feed

FeedReference

Field Name Type Description
feedName string name of the feed
publishedAt number story publication timestamp - the time the story is published under in the feed
pinned? boolean true, if the story is pinned (should appear before any non-pinned story in the feed), false otherwise
moment number
storyId string ID of the story
operations? StoryOperations the supported operations and the corresponding principals for the story in the feed

FeedSliceInfo

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

FeedStatus

Field Name Type Description
total number total number of stories
totalPinned number total number of pinned stories
lastMoment? number moment of the most recent story
notViewed? number number of stories that have not been viewed yet, admin only
notRead? number number of stories that have not been read yet, admin only
notViewedMoment? number moment of the oldest non-viewed story, admin only
notReadMoment? number moment of the oldest non-read story, admin only

FeedStatusChange

Field Name Type Description
viewed? boolean new value of the viewed flag (null, if the flag is not changed)
read? boolean new value of the read flag (null, if the flag is not changed)
before number change flags for all stories before this moment, inclusive

FeedWithStatus

Field Name Type Description
feedName string name of the feed
notViewed number number of stories in the feed that have not been viewed yet
notRead number number of stories in the feed that have not been read yet

FriendDescription

Field Name Type Description
nodeName string name of the node
groups? FriendGroupAssignment[] 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

FriendGroupAssignment

Field Name Type Description
id string ID of the group of friends
operations? FriendOperations the operations and the corresponding principals

FriendGroupDescription

Field Name Type Description
title string title of the group of friends
operations? FriendGroupOperations 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

FriendGroupDetails

Field Name Type Description
id string ID of the group of friends
title? string title of the group of friends
addedAt number the friendship timestamp - the real time when the node was added to the group of friends
operations? FriendOperations list of the supported operations and the corresponding principals

FriendGroupInfo

Field Name Type Description
id string
title? string title of the group of friends
createdAt number the group creation timestamp - the real time when the group of friends was created
operations? FriendGroupOperations list of the supported operations and the corresponding principals

FriendGroupsFeatures

Field Name Type Description
available FriendGroupInfo[] list of groups of friends existing on the node
memberOf? FriendGroupDetails[] list of groups of friends the client is member of

FriendInfo

Field Name Type Description
nodeName string name of the node
contact? ContactInfo information about the node
groups? FriendGroupDetails[] groups of friends the node belongs to

FriendOfInfo

Field Name Type Description
remoteNodeName string name of the remote node
contact? ContactInfo information about the remote node
groups? FriendGroupDetails[] groups of friends on the remote node this node was added to

FundraiserInfo

Field Name Type Description
title string fundraiser title
qrCode? string text or URI to be encoded and displayed as QR-code
text? string arbitrary text to be displayed
href? string link to the fundraiser

GrantChange

Field Name Type Description
scope Scope[] a set of permissions to be granted or revoked
revoke boolean true if the permissions must be revoked, false if the permissions must be granted

GrantInfo

Field Name Type Description
nodeName string name of the node the permissions are granted to
scope Scope[] the set of administrative permissions granted to the node

KeyMnemonic

Field Name Type Description
mnemonic string[] the words

LinkPreview

Field Name Type Description
siteName? string name of the site
url? string canonical URL of the page
title? string title of the page
description? string description of the page
imageHash? string hash of the image presenting the page

LinkPreviewInfo

Field Name Type Description
siteName? string name of the site
url? string canonical URL of the page
title? string title of the page
description? string description of the page
imageUrl? string URL of the image presenting the page

MediaAttachment

Field Name Type Description
media? PrivateMediaFileInfo details of the attached media, may be absent if the media is not located on the node
remoteMedia? RemoteMediaInfo details of the media, if it is located on another node
embedded boolean true if the media is used in the body of the posting/comment, false otherwise

MediaFilePreviewInfo

Field Name Type Description
targetWidth number the width the preview was prepared for viewing at
directPath? string location of the media file, relative to the /media; points to a static image served directly from a filesystem; static images do not accept any query parameters including authentication parameters
width number actual width of the preview in pixels
height number actual height of the preview in pixels
original? boolean true if the preview is identical to the original media, false otherwise

MediaWithDigest

Field Name Type Description
id string ID of the media file
digest? string cryptographic digest of the media file

NameToRegister

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

NotificationPacket

Field Name Type Description
id string ID of the notification packet on the sending node (used to filter out duplicates)
nodeName string name of the sending node
fullName? string full name of the sending node
gender? string gender of the sending node
avatar? AvatarImage avatar of the sending node
createdAt number notification packet creation timestamp
type string notification type
notification string the notification, a string representation of a JSON structure (see Notifications page for details)
signature string the notification packet sender signature (use NotificationPacket fingerprint)
signatureVersion number signature version (i.e. fingerprint version)

NodeNameInfo

Field Name Type Description
name? string
operationStatus? OperationStatus status of the latest operation with the node name
operationStatusUpdated? number the last time the operation status was updated
operationErrorCode? string if the operation with the node name was failed, the code of the failure
operationErrorMessage? string if the operation with the node name was failed, the human-readable description of the failure
storedMnemonic? boolean true, if updating key mnemonic is being stored on the node, false otherwise
operations? NodeNameOperations the supported operations and the corresponding principals

PeopleGeneralInfo

Field Name Type Description
feedSubscribersTotal? number total number of subscribers of the node
feedSubscriptionsTotal? number total number of subscriptions of the node
friendsTotal? Partial> total number of friends in every group
friendOfsTotal? number total number of nodes that added this node to their friends
blockedTotal? number total number of blocked nodes
blockedByTotal? number total number of nodes that blocked this node
operations? PeopleOperations the supported operations and the corresponding principals

PluginContext

Field Name Type Description
rootAdmin boolean true, if the client has authenticated as root admin, false otherwise
admin boolean true, if the client has authenticated as node admin, false otherwise
authCategories string[] the list of permissions granted to the client, if it has authenticated as node admin; see TokenInfo.permissions for the list of possible values
clientName string node name of the client
remoteAddress string IP address of the client
userAgent string user agent (browser) used by the client
userAgentOs string operating system used by the client
nodeId string ID of the current node
nodeName string node name of the current node
domainName string domain name of the current node
originUrl string full URL of the request

PluginDescription

Field Name Type Description
name string a unique plugin name; can contain only small latin letters, digits or hyphen
title? string user-readable title of the plugin
description? string user-readable description of the purpose of the plugin
location? string URL of the plugin; used by the node to call the plugin API
acceptedEvents? string[] list of types of internal events the plugin wants to receive; Read more about internal events.
options? SettingDescriptor[] 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

PluginInfo

Field Name Type Description
nodeId string ID of the node this plugin is connected to
local boolean true if the plugin is enabled for a particular node only, false, if it is enabled for the whole server
name string a unique plugin name
title? string user-readable title of the plugin
description? string user-readable description of the purpose of the plugin
location? string URL of the plugin; used by the node to call the plugin API
acceptedEvents? string[] list of types of internal events the plugin wants to receive; Read more about internal events.
settings? SettingMetaInfo[] plugin settings to be added to the list of node settings
tokenId? string ID of the token used to authenticate the plugin

PostingFeatures

Field Name Type Description
post? boolean true if the client is allowed to create postings, false otherwise
subjectPresent boolean true if new postings are recommended to have a subject, false otherwise
sourceFormats SourceFormat[] list of source text formats the node understands
mediaMaxSize number maximal size of a media attachment in a post
imageRecommendedSize number maximal size of a compressed image in a post
imageRecommendedPixels number maximal resolution of a compressed image in a post (in pixels)
imageFormats string[] list of image formats (in MIME type form) the node understands

PostingInfo

Field Name Type Description
id string
revisionId string ID of the current revision of the posting
receiverRevisionId? string ID of the current revision of the original posting (for cached copies of remote postings only)
totalRevisions number total number of revisions the posting has
receiverName? string name of the node where the posting was published (for cached copies of remote postings only)
receiverFullName? string full name of the node where the posting was published (for cached copies of remote postings only)
receiverGender? string gender of the node where the posting was published (for cached copies of remote postings only)
receiverAvatar? AvatarImage avatar of the node where the posting was published (for cached copies of remote postings only)
receiverPostingId? string ID of the original posting (for cached copies of remote postings only)
parentMediaId? string ID of the media the posting is linked to, if any
ownerName string node name of the posting's owner
ownerFullName? string full name of the posting's owner
ownerGender? string gender of the posting's owner
ownerAvatar? AvatarImage avatar of the posting's owner
bodyPreview? Body preview of the posting's body, a string representation of a JSON structure
bodySrc? Body the source text of the posting, a string representation of a JSON structure, may be absent if not requested
bodySrcHash string hash of the source text of the posting
bodySrcFormat? SourceFormat format of the source text of the posting, the list of available formats is returned in PostingFeatures
body Body body of the posting, a string representation of a JSON structure
bodyFormat? BodyFormat format of the body of the posting, may have any value meaningful for the client
media? MediaAttachment[] list of the media attached to the posting
heading string heading of the posting
updateInfo? UpdateInfo description of the latest update
createdAt number posting creation timestamp - the real time when the posting was created
editedAt? number posting editing timestamp - the last time the posting was updated
deletedAt? number posting deletion timestamp - the time when the posting was deleted
receiverCreatedAt? number original posting creation timestamp (for cached copies of remote postings only)
receiverEditedAt? number original posting editing timestamp (for cached copies of remote postings only)
receiverDeletedAt? number original posting deletion timestamp (for cached copies of remote postings only)
revisionCreatedAt number creation timestamp of the current revision of the posting
receiverRevisionCreatedAt? number creation timestamp of the current revision of the original posting (for cached copies of remote postings only)
deadline? number posting purging timestamp - the time when the deleted posting will be purged from the database
digest? string cryptographic digest of the posting (use Posting fingerprint)
signature? string the posting's owner signature (use Posting fingerprint)
signatureVersion? number signature version (i.e. fingerprint version)
feedReferences? FeedReference[] array of references to the posting from stories in feeds
blockedInstants? BlockedPostingInstantInfo[] instants related to the posting that are blocked (for admin only)
operations? PostingOperations the supported operations and the corresponding principals
receiverOperations? PostingOperations the supported operations for the original posting and the corresponding principals (for cached copies of remote postings only)
commentOperations? CommentOperations the operations and the corresponding principals that are overridden in the posting's comments
reactionOperations? ReactionOperations the operations and the corresponding principals that are overridden in reactions to the posting
commentReactionOperations? ReactionOperations the operations and the corresponding principals that are overridden in reactions to the posting's comments
blockedOperations? BlockedEntryOperation[] operations on the posting that are blocked for the client
blockedCommentOperations? BlockedEntryOperation[] operations on the posting's comments that are blocked for the client
sheriffs? string[] list of sheriffs supervising the posting
sheriffMarks? SheriffMark[] list of sheriff marks on the posting
acceptedReactions? AcceptedReactions types of reactions that the posting accepts
clientReaction? ClientReactionInfo details of the existing reaction (if any) of the client's owner
reactions? ReactionTotalsInfo reactions summary of the posting
sources? PostingSourceInfo[] details of the sources the posting was received from (for cached copies of remote postings only)
totalComments? number total number of comments to the posting

PostingRevisionInfo

Field Name Type Description
id string
receiverId? string ID of the original revision (for cached copies of remote postings only)
bodyPreview? Body preview of the revision's body, a string representation of a JSON structure
bodySrcHash string hash of the source text of the revision
bodySrcFormat? SourceFormat format of the source text of the revision, the list of available formats is returned in PostingFeatures
body Body body of the revision, a string representation of a JSON structure
bodyFormat? BodyFormat format of the body of the revision
media? MediaAttachment[] list of the media attached to the revision
heading string heading of the revision
updateInfo? UpdateInfo description of the latest update
createdAt number revision creation timestamp - the real time when the revision was created
deletedAt? number revision deletion timestamp - the time when the revision was deleted
receiverCreatedAt? number original revision creation timestamp (for cached copies of remote postings only)
receiverDeletedAt? number original revision deletion timestamp (for cached copies of remote postings only)
digest? string cryptographic digest of the revision (use Posting fingerprint)
signature? string the revision's owner signature (use Posting fingerprint)
signatureVersion? number signature version (i.e. fingerprint version)
clientReaction? ClientReactionInfo details of the existing reaction (if any) of the client's owner
reactions? ReactionTotalsInfo reactions summary of the posting revision

PostingSourceInfo

Field Name Type Description
nodeName string name of the remote node
fullName? string full name of the remote node
avatar? AvatarImage avatar of the remote node
feedName string name of the feed on the remote node
postingId string ID of the posting on the remote node
createdAt number timestamp when the posting was received from this source

PostingSourceText

Field Name Type Description
ownerAvatar? AvatarDescription avatar of the posting's owner
bodySrc? Body the source text of the posting, a string representation of a JSON structure
bodySrcFormat? SourceFormat format of the source text of the posting, plain-text by default; the list of available formats is returned in PostingFeatures
media? MediaWithDigest[] array of IDs and digests of private media to be attached to the posting
acceptedReactions? AcceptedReactions types of reactions that the posting accepts
operations? PostingOperations the operations and the corresponding principals
commentOperations? CommentOperations the operations and the corresponding principals that are overridden in the posting's comments

PostingText

Field Name Type Description
ownerName? string node name of the posting's owner
ownerFullName? string full name of the posting's owner
ownerGender? string gender of the posting's owner
ownerAvatar? AvatarDescription avatar of the posting's owner
bodyPreview? Body preview of the posting's body, a string representation of a JSON structure
bodySrc? Body the source text of the posting, a string representation of a JSON structure
bodySrcFormat? SourceFormat format of the source text of the posting, plain-text by default; the list of available formats is returned in PostingFeatures
body? Body body of the posting, a string representation of a JSON structure
bodyFormat? BodyFormat format of the body of the posting, may have any value meaningful for the client
media? string[] array of IDs of private media to be attached to the posting
createdAt? number posting creation timestamp - the real time when the posting was created
acceptedReactions? AcceptedReactions types of reactions that the posting accepts
publications? StoryAttributes[] list of publications in feeds that must be made after creating the posting (for new postings only)
updateInfo? UpdateInfo description of the update
signature? string the posting's owner signature (use Posting fingerprint)
signatureVersion? number signature version (i.e. fingerprint version)
operations? PostingOperations the operations and the corresponding principals
commentOperations? CommentOperations the operations and the corresponding principals that are overridden in the posting's comments
reactionOperations? ReactionOperations the operations and the corresponding principals that are overridden in reactions to the posting
commentReactionOperations? ReactionOperations 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

PrivateMediaFileInfo

Field Name Type Description
id string ID of the media file
hash string SHA-1 hash of the media file
path string virtual location of the media file, relative to the /media virtual page
directPath? string location of the media file, relative to the /media; points to a static image served directly from a filesystem; static images do not accept any query parameters including authentication parameters
mimeType string MIME type of the media
width? number width of the media in pixels (null, if the media file is not an image or video)
height? number height of the media in pixels (null, if the media file is not an image or video)
orientation? number media orientation, the value should be interpreted like the orientation value present in JPEG EXIF data (null, if the media file is not an image or video)
size number size of the media file in bytes
postingId? string ID of the posting linked to the media
previews? MediaFilePreviewInfo[] list of media previews - downscaled versions of the media
operations? PrivateMediaFileOperations the supported operations and the corresponding principals

ProfileAttributes

Field Name Type Description
fullName? string node owner's full name
gender? string node owner's gender
email? string node owner's E-mail address
title? string node title
bioSrc? string the source text of node owner's bio (arbitrary text)
bioSrcFormat? SourceFormat format of the source text of node owner's bio, markdown by default; the list of available formats is returned in PostingFeatures
avatarId? string node owner's avatar ID
fundraisers? FundraiserInfo[] list of fundraisers - methods of giving a donation to the node owner
operations? ProfileOperations 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

ProfileInfo

Field Name Type Description
fullName? string node owner's full name
gender? string node owner's gender
email? string node owner's E-mail address
title? string node title
bioSrc? string the source text of node owner's bio (arbitrary text), may be absent if not requested
bioSrcFormat? SourceFormat 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
bioHtml? string HTML representation of node owner's bio
avatar? AvatarInfo node owner's avatar
fundraisers? FundraiserInfo[] list of fundraisers - methods of giving a donation to the node owner
operations? ProfileOperations the supported operations and the corresponding principals

PublicMediaFileInfo

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

PushContent

Field Name Type Description
type PushContentType type of the notification
id? string ID of the story (story-deleted notifications only)
story? StoryInfo the story (story-added notifications only)
feedStatus? FeedWithStatus status of the feed (feed-updated notifications only)

PushRelayClientAttributes

Field Name Type Description
type PushRelayType type of the relay
clientId string ID/token of the client
lang? string 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

ReactionAttributes

Field Name Type Description
negative boolean true, if the reaction is negative, false, if positive
emoji number reaction code, usually interpreted by clients as emoji code point
operations? ReactionOperations the operations and the corresponding principals

ReactionCreated

Field Name Type Description
reaction? ReactionInfo details of the reaction created
totals ReactionTotalsInfo summary of reactions after the creation

ReactionDescription

Field Name Type Description
ownerName? string reaction owner's node name
ownerFullName? string reaction owner's full name
ownerGender? string reaction owner's gender
ownerAvatar? AvatarDescription reaction owner's avatar
negative boolean true, if the reaction is negative, false, if positive
emoji number reaction code, usually interpreted by clients as emoji code point
signature? string the reaction owner signature (use Reaction fingerprint)
signatureVersion? number signature version (i.e. fingerprint version)
operations? ReactionOperations 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

ReactionsFilter

Field Name Type Description
ownerName? string reaction owner's name
postings? string[] list of IDs of postings

ReactionInfo

Field Name Type Description
ownerName? string reaction owner's node name
ownerFullName? string reaction owner's full name
ownerGender? string reaction owner's gender
ownerAvatar? AvatarImage reaction owner's avatar
postingId? string ID of the posting
postingRevisionId? string ID of the posting revision, if relevant
commentId? string ID of the comment, if relevant
commentRevisionId? string ID of the comment revision, if relevant
negative? boolean true, if the reaction is negative, false, if positive
emoji? number reaction code, usually interpreted by clients as emoji code point
moment? number
createdAt? number reaction creation timestamp - the real time when the reaction was created
deadline? number if present, the reaction will be erased at this time
signature? string the reaction owner signature (use Reaction fingerprint)
signatureVersion? number signature version (i.e. fingerprint version)
operations? ReactionOperations the supported operations and the corresponding principals
ownerOperations? ReactionOperations the supported operations and the corresponding principals as defined by the reaction's owner
seniorOperations? ReactionOperations 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
majorOperations? ReactionOperations 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

ReactionsSliceInfo

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

ReactionTotalInfo

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

ReactionTotalsFilter

Field Name Type Description
postings string[] list of IDs of postings

ReactionTotalsInfo

Field Name Type Description
entryId string ID of the entry
positive? ReactionTotalInfo[] summary of positive reactions
negative? ReactionTotalInfo[] summary of negative reactions

ReactionOverride

Field Name Type Description
operations? ReactionOperations the supported operations and the corresponding principals
seniorOperations? ReactionOperations 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
majorOperations? ReactionOperations 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

RegisteredNameSecret

Field Name Type Description
name string
mnemonic? string[] human-friendly mnemonic of the updating key
secret? string base64-encoded secret of the updating key

RemoteFeed

Field Name Type Description
nodeName string name of the node
feedName string name of the feed on the node

RemoteMedia

Field Name Type Description
id string ID of the media file
hash? string SHA-1 hash of the media file
digest? string cryptographic digest of the media file

RemoteMediaInfo

Field Name Type Description
id string ID of the media file
hash? string SHA-1 hash of the media file
digest? string cryptographic digest of the media file

RemotePosting

Field Name Type Description
nodeName string name of the node
postingId string ID of the posting on the node

RemotePostingOrNode

Field Name Type Description
nodeName string name of the node
postingId? string ID of the posting on the node

RemotePostingVerificationInfo

Field Name Type Description
id string asynchronous operation ID
nodeName string
postingId string
revisionId? string
status? VerificationStatus status of the operation
errorCode? string error code
errorMessage? string human-readable error message

RemoteReactionVerificationInfo

Field Name Type Description
id string asynchronous operation ID
nodeName string
postingId string
reactionOwnerName string node name of the reaction's owner
status? VerificationStatus status of the operation
errorCode? string error code
errorMessage? string human-readable error message

RepliedTo

Field Name Type Description
id string ID of the comment
revisionId? string ID of the comment revision
name string node name of the comment's owner
fullName? string full name of the comment's owner
gender? string gender of the comment's owner
avatar? AvatarImage avatar of the comment's owner
heading? string heading of the comment
digest string cryptographic digest of the comment (use Comment fingerprint)

Result

Field Name Type Description
errorCode string error code
message? string human-readable error message

SheriffMark

Field Name Type Description
sheriffName string name of the sheriff that added the mark

SettingInfo

Field Name Type Description
name string name of the setting
value? string value of the setting

SettingMetaAttributes

Field Name Type Description
name string name of the setting
defaultValue? string default value of the setting (if absent or null, the built-in default value will be used)
privileged? boolean the setting should be privileged (if absent or null, the built-in value of the flag will be used)

SettingDescriptor

Field Name Type Description
name string name of the setting
type SettingType type of the setting
defaultValue? string default value of the setting
internal? boolean the setting is internal - not displayed to the user
privileged? boolean the setting is privileged - may be changed by server owner only
title? string human-friendly description of the setting
modifiers? SettingTypeModifiers additional modifiers that may help to choose a proper UI component for the setting value and to validate the input; the meaning of the modifiers depends on the setting type

SettingMetaInfo

Field Name Type Description
name string name of the setting
type SettingType type of the setting
defaultValue? string default value of the setting
privileged? boolean the setting is privileged - may be changed by server owner only
title string human-friendly description of the setting
modifiers? SettingTypeModifiers additional modifiers that may help to choose a proper UI component for the setting value and to validate the input; the meaning of the modifiers depends on the setting type

SettingTypeModifiers

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

SheriffComplaintDecisionText

Field Name Type Description
reject boolean true, if the complaints in the group are to be rejected, false otherwise
decisionCode? SheriffOrderReason the decision
decisionDetails? string detailed explanation of the decision in user-readable form
anonymous? boolean true, if the complaints' owners' names are not to be published, false otherwise
Validation errors:
Code Description
sheriffComplaintDecisionText.decisionCode.blank decision code is not set
sheriffComplaintDecisionText.decisionDetails.wrong-size decision details are too long

SheriffComplaintGroupInfo

Field Name Type Description
id string
remoteNodeName string name of the node the complaints are related to
remoteNodeFullName? string full name of the node the complaints are related to
remoteFeedName string name of the feed the complaints are related to
remotePostingId? string ID of the posting the complaints are related to
remotePostingRevisionId? string ID of the posting's revision the complaints are related to
remotePostingOwnerName? string posting owner's node name
remotePostingOwnerFullName? string posting owner's full name
remotePostingOwnerGender? string posting owner's gender
remotePostingHeading? string heading of the posting
remoteCommentId? string ID of the comment the complaints are related to
remoteCommentRevisionId? string ID of the comment's revision the complaints are related to
remoteCommentOwnerName? string comment owner's node name
remoteCommentOwnerFullName? string comment owner's full name
remoteCommentOwnerGender? string comment owner's gender
remoteCommentHeading? string heading of the comment
createdAt number the group of complaints creation timestamp - the real time when the group was created
moment number moment of the group of complaints
status SheriffComplaintStatus status of the group of complaints
decisionCode? SheriffOrderReason sheriff's decision
decisionDetails? string detailed explanation of sheriff's decision in user-readable form
decidedAt? number sheriff's decision timestamp - the real time when the decision was made
anonymous? boolean true, if the complaints' owners' names are not published, false otherwise

SheriffComplaintGroupsSliceInfo

Field Name Type Description
before number the slice contains all groups before this moment, inclusive. May be the far future.
after number the slice contains all groups after this moment, exclusive. May be the far past.
groups SheriffComplaintGroupInfo[] the groups
total number total number of groups
totalInPast number number of groups before this slice till the far past
totalInFuture number number of groups after this slice till the far future

SheriffComplaintInfo

Field Name Type Description
id string
ownerName string complaint owner's node name
ownerFullName? string complaint owner's full name
ownerGender? string complaint owner's gender
group? SheriffComplaintGroupInfo the group of complaints this complaint belongs to
reasonCode SheriffOrderReason reason of the complaint
reasonDetails? string detailed explanation of reason of the complaint in user-readable form
anonymousRequested? boolean true, if the complaint's owner wants his name not to be published, false otherwise
createdAt number complaint creation timestamp - the real time when the order was created

SheriffComplaintText

Field Name Type Description
ownerFullName? string complaint owner's full name
ownerGender? string complaint owner's gender
nodeName string name of the node the complaint is related to
fullName? string full name of the node the complaint is related to
feedName string name of the feed the complaint is related to
postingId? string ID of the posting the complaint is related to
postingOwnerName? string posting owner's node name
postingOwnerFullName? string posting owner's full name
postingOwnerGender? string posting owner's gender
postingHeading? string heading of the posting
commentId? string ID of the comment the complaint is related to
commentOwnerName? string comment owner's node name
commentOwnerFullName? string comment owner's full name
commentOwnerGender? string comment owner's gender
commentHeading? string heading of the comment
reasonCode? SheriffOrderReason reason of the complaint
reasonDetails? string detailed explanation of reason of the complaint in user-readable form
anonymous? boolean true, if the complaint's owner wants his name not to be published, false otherwise
Validation errors:
Code Description
sheriffComplaintText.ownerFullName.wrong-size owner's full name is too long
sheriffComplaintText.ownerGender.wrong-size owner's gender is too long
sheriffComplaintText.nodeName.blank node name is empty
sheriffComplaintText.nodeName.wrong-size node name is too long
sheriffComplaintText.fullName.wrong-size node's full name is too long
sheriffComplaintText.feedName.blank feed name is empty
sheriffComplaintText.feedName.wrong-size feed name is too long
sheriffComplaintText.postingOwnerName.wrong-size posting owner's name is too long
sheriffComplaintText.postingOwnerFullName.wrong-size posting owner's full name is too long
sheriffComplaintText.postingOwnerGender.wrong-size posting owner's gender is too long
sheriffComplaintText.postingHeading.wrong-size posting heading is too long
sheriffComplaintText.postingId.wrong-size posting ID is too long
sheriffComplaintText.commentOwnerName.wrong-size comment owner's name is too long
sheriffComplaintText.commentOwnerFullName.wrong-size comment owner's full name is too long
sheriffComplaintText.commentOwnerGender.wrong-size comment owner's gender is too long
sheriffComplaintText.commentHeading.wrong-size comment heading is too long
sheriffComplaintText.commentId.wrong-size comment ID is too long
sheriffComplaintText.reasonDetails.wrong-size reason details are too long

SheriffOrderAttributes

Field Name Type Description
delete? boolean true, if the order is to cancel the previous order of this type, false otherwise
feedName string name of the feed the order is related to
postingId? string ID of the posting the order is related to
commentId? string ID of the comment the order is related to
category SheriffOrderCategory category of the order
reasonCode? SheriffOrderReason reason of the order
reasonDetails? string 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

SheriffOrderDetails

Field Name Type Description
id string
delete? boolean true, if the order is to cancel the previous order of this type, false otherwise
sheriffName string node name of the sheriff
sheriffAvatar? AvatarDescription sheriff's avatar
feedName string name of the feed the order is related to
postingId? string ID of the posting the order is related to
commentId? string ID of the comment the order is related to
category SheriffOrderCategory category of the order
reasonCode? SheriffOrderReason reason of the order
reasonDetails? string detailed explanation of reason of the order in user-readable form
createdAt number order creation timestamp - the real time when the order was created
signature string the sheriff's signature (use SheriffOrder fingerprint)
signatureVersion number 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

SheriffOrderInfo

Field Name Type Description
id string
delete? boolean true, if the order is to cancel the previous order of this type, false otherwise
sheriffName string node name of the sheriff
nodeName string name of the node the order was sent to
nodeFullName? string full name of the node the order was sent to
feedName string name of the feed the order is related to
postingId? string ID of the posting the order is related to
postingRevisionId? string ID of the posting's revision the order is related to
postingOwnerName? string posting owner's node name
postingOwnerFullName? string posting owner's full name
postingOwnerGender? string posting owner's gender
postingHeading? string heading of the posting
commentId? string ID of the comment the order is related to
commentRevisionId? string ID of the comment's revision the order is related to
commentOwnerName? string comment owner's node name
commentOwnerFullName? string comment owner's full name
commentOwnerGender? string comment owner's gender
commentHeading? string heading of the comment
category SheriffOrderCategory category of the order
reasonCode? SheriffOrderReason reason of the order
reasonDetails? string detailed explanation of reason of the order in user-readable form
createdAt number order creation timestamp - the real time when the order was created
signature string the sheriff's signature (use SheriffOrder fingerprint)
signatureVersion number signature version (i.e. fingerprint version)
complaintGroupId? string ID of the groups of complaints that were the cause of the order

StoryAttributes

Field Name Type Description
feedName? string name of the feed
publishAt? number story publication timestamp - the time the story must be published under in the feed
pinned? boolean true, if the story is pinned (should appear before any non-pinned story in the feed), false otherwise
viewed? boolean value of the viewed flag (null, if the flag is not changed)
read? boolean value of the read flag (null, if the flag is not changed)
satisfied? boolean value of the satisfied flag (null, if the flag is not changed)

StoryInfo

Field Name Type Description
id string
feedName string name of the feed
storyType StoryType type of the story
createdAt number story creation timestamp - the real time when the story was created
publishedAt number story publication timestamp - the time the story is published under in the feed
pinned? boolean true, if the story is pinned (should appear before any non-pinned story in the feed), false otherwise
moment number
viewed? boolean true, if the story has been viewed by node owner, false otherwise
read? boolean true, if the story has been read by node owner, false otherwise
satisfied? boolean 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
summaryNodeName? string name of the node related to the summary of the story
summaryFullName? string full name of the node related to the summary of the story
summaryAvatar? AvatarImage avatar of the summary of the story
summary? string user-readable summary of the story - this field is deprecated in favor of summaryData
summaryData? StorySummaryData details of the story; they are used by the client to build a user-readable summary of the story
posting? PostingInfo the posting this story is about
postingId? string ID of the posting this story is about, used if the whole posting is not returned
comment? CommentInfo the comment this story is about
commentId? string ID of the comment this story is about, used if the whole posting is not returned
remoteNodeName? string name of the node this story is about
remoteFullName? string full name of the node this story is about
remotePostingId? string ID of the posting at remote node this story is about
remoteCommentId? string ID of the comment at remote node this story is about
remoteMediaId? string ID of the media at remote node this story is about
operations? StoryOperations the supported operations and the corresponding principals

StorySummaryData

Field Name Type Description
node? StorySummaryNode a node
posting? StorySummaryEntry a posting
comment? StorySummaryEntry a comment
comments? StorySummaryEntry[] list of comments
totalComments? number total number of comments
repliedTo? StorySummaryEntry the comment replied to
parentPosting? StorySummaryEntry the parent posting of the media
reaction? StorySummaryReaction a reaction
reactions? StorySummaryReaction[] list of reactions
totalReactions? number total number of reactions
feedName? string name of a feed
subscriptionReason? SubscriptionReason subscription reason
friendGroup? StorySummaryFriendGroup a group of friends
blocked? StorySummaryBlocked summary of blocking a user
sheriff? StorySummarySheriff summary of an action of a sheriff
description? string additional descriptive text
clicks? StorySummaryPageClicks[] list of pages with number of clicks on each of them

StorySummaryBlocked

Field Name Type Description
operations BlockedOperation[] list of the operations blocked
period? number the period of blocking in seconds

StorySummaryFriendGroup

Field Name Type Description
id? string ID of the group of friends
title? string title of the group of friends

StorySummaryEntry

Field Name Type Description
ownerName? string entry owner's name
ownerFullName? string entry owner's full name
ownerGender? string entry owner's gender
heading? string entry heading
sheriffs? string[] list of sheriffs supervising the entry
sheriffMarks? SheriffMark[] list of sheriff marks on the entry

StorySummaryNode

Field Name Type Description
ownerName? string node owner's name
ownerFullName? string node owner's full name
ownerGender? string node owner's gender

StorySummaryPageClicks

Field Name Type Description
heading? string page heading, null for the blog itself
href string page URL
clicks number number of clicks on the page

StorySummaryReaction

Field Name Type Description
ownerName? string reaction owner's name
ownerFullName? string reaction owner's full name
ownerGender? string reaction owner's gender
emoji? number reaction code

StorySummarySheriff

Field Name Type Description
sheriffName string name of the sheriff
orderId? string ID of the sheriff's order
complaintId? string ID of the complaint, if any

SubscriberDescription

Field Name Type Description
type SubscriptionType subscription type
feedName? string feed name, if the subscription type requires one
postingId? string posting ID, if the subscription type requires one
lastUpdatedAt? number timestamp of the latest known state of the object
operations? SubscriberOperations 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

SubscriberInfo

Field Name Type Description
id string subscriber ID
type SubscriptionType subscription type
feedName? string feed name, if the subscription type requires one
postingId? string posting ID, if the subscription type requires one
nodeName string name of the subscribed node
contact? ContactInfo information known about the subscribed node
createdAt number subscription creation timestamp
operations? SubscriberOperations the supported operations and the corresponding principals
ownerOperations? SubscriberOperations the supported operations and the corresponding principals as defined by the subscriber
adminOperations? SubscriberOperations the operations and the corresponding principals that are overridden by the node administrator

SubscriberOverride

Field Name Type Description
operations? SubscriberOperations the supported operations and the corresponding principals
adminOperations? SubscriberOperations 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

SubscriptionDescription

Field Name Type Description
type SubscriptionType subscription type
feedName? string the name of the feed on this node that receives notifications
remoteNodeName string the name of the node this node is subscribed to
remoteFeedName? string the name of the feed on the remote node, if the subscription type requires one
remotePostingId? string posting ID on the remote node, if the subscription type requires one
reason? SubscriptionReason subscription reason
operations? SubscriptionOperations 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

SubscriptionFilter

Field Name Type Description
type? SubscriptionType subscription type
feeds? RemoteFeed[] list of feeds
postings? RemotePosting[] list of postings

SubscriptionInfo

Field Name Type Description
id string subscription ID
type SubscriptionType subscription type
feedName? string feed name on this node that receives notifications
remoteNodeName string name of the node this node is subscribed to
contact? ContactInfo information known about the remote node
remoteFeedName? string feed name on the remote node, if the subscription type requires one
remotePostingId? string posting ID on the remote node, if the subscription type requires one
createdAt number subscription creation timestamp
reason SubscriptionReason subscription reason
operations? SubscriptionOperations the supported operations and the corresponding principals

SubscriptionOverride

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

TokenAttributes

Field Name Type Description
login string
password string
permissions? Scope[] a bit mask describing which permissions should be granted to the token; if not set, all permissions of the administrator are granted.
name? string 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

TokenInfo

Field Name Type Description
id string token ID (this is not the token, just an ID)
token string the token
name? string a user-readable name of the token
permissions? Scope[] the list of permissions granted to the token
pluginName? string a plugin the token belongs to; if set, only this plugin may use the token
createdAt number token creation timestamp
deadline? number timestamp of the end of the token's life
lastUsedAt? number timestamp of the last time the token was used
lastUsedBrowser? string name of the browser used by the latest user of the token
lastUsedIp? string IP address of the latest user of the token

TokenUpdate

Field Name Type Description
name? string a user-readable name of the token
permissions? Scope[] a bit mask describing which permissions should be granted to the token; if not set, the token permissions are left untouched

UpdateInfo

Field Name Type Description
important? boolean true, if the update is important, false (the default) otherwise
description? string description of the update

UserListInfo

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

UserListItemAttributes

Field Name Type Description
nodeName string 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

UserListItemInfo

Field Name Type Description
nodeName string the name of the node
createdAt number the node addition timestamp - the real time when the node was added to the list
moment number moment of the node

UserListSliceInfo

Field Name Type Description
listName string the name of the list
before number the slice contains all items before this moment, inclusive. May be the far future.
after number the slice contains all items after this moment, exclusive. May be the far past.
items UserListItemInfo[] the items
total number total number of items
totalInPast number number of items before this slice till the far past
totalInFuture number number of items after this slice till the far future

WhoAmI

Field Name Type Description
nodeName? string
nodeNameChanging? boolean true if node name is about to be changed
fullName? string node owner's full name
gender? string node owner's gender
title? string node title
avatar? AvatarImage node owner's avatar
frozen? boolean true if the node is frozen due to inactivity, false (the default) otherwise


Operations

Read more about operations

CommentOperations

Field Name Default Description
view "public" view the comment
edit "owner" edit the comment
delete "private" delete the comment
viewReactions "public" view the comment's reactions
viewNegativeReactions "public" view the comment's negative reactions
viewReactionTotals "public" view the number of the comment's reactions
viewNegativeReactionTotals "public" view the number of the comment's negative reactions
viewReactionRatios "public" view the relative number of different types of the comment's reactions
viewNegativeReactionRatios "public" view the relative number of different types of the comment's negative reactions
addReaction "signed" add a reaction to the comment
addNegativeReaction "signed" add a negative reaction to the comment

ContactOperations

Field Name Default Description
viewFeedSubscriber "public" see the subscriber information
viewFeedSubscription "public" see the subscription information
viewFriend "public" see the friend information
viewFriendOf "public" see the friend-of information (this operation can be modified by admin only)
viewBlock "public" see the blocking information (this operation can be modified by admin only)
viewBlockBy "public" see the blocked-by information (this operation can be modified by admin only)

FeedOperations

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

FriendOperations

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

FriendGroupOperations

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

NodeNameOperations

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

PeopleOperations

Field Name Default Description
viewSubscribers "public" view the list of subscribers
viewSubscriptions "public" view the list of subscriptions
viewFriends "public" view the list of friends
viewFriendOfs "public" view the list of those who added this node to friends
viewBlocked "public" view the list of blocked nodes
viewBlockedBy "admin" view the list of those who blocked this node
viewSubscribersTotal "public" view the number of subscribers
viewSubscriptionsTotal "public" view the number of subscriptions
viewFriendsTotal "public" view the number of friends
viewFriendOfsTotal "public" view the number of those who added this node to friends

PostingOperations

Field Name Default Description
view "public" view the posting
edit "owner" edit the posting
delete "private" delete the posting
viewComments "public" view the posting's comments
addComment "signed" add a comment to the posting
overrideComment "owner" override the permissions of the posting's comments
viewReactions "public" view the posting's reactions
viewNegativeReactions "public" view the posting's negative reactions
viewReactionTotals "public" view the number of the posting's reactions
viewNegativeReactionTotals "public" view the number of the posting's negative reactions
viewReactionRatios "public" view the relative number of different types of the posting's reactions
viewNegativeReactionRatios "public" view the relative number of different types of the posting's negative reactions
addReaction "signed" add a reaction to the posting
addNegativeReaction "signed" add a negative reaction to the posting
overrideReaction "owner" override the permissions of the posting's reactions
overrideCommentReaction "owner" override the permissions of the posting's comment's reactions

PrivateMediaFileOperations

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

ProfileOperations

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

ReactionOperations

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

StoryOperations

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

SubscriberOperations

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

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.

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

BlockedEntryOperation

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

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

BodyFormat

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

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

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

PrincipalFlag

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

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

PushRelayType

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

Scope

Value Description
"none" no permissions
"identify" allow to identify under the corresponding node name
"other" other permissions
"view-media" view any media file
"view-content" view any content (posts, comments, reactions), except media files
"add-post" create posts owned by the node
"update-post" modify posts owned by the node
"add-comment" create comments owned by the node
"update-comment" modify comments owned by the node
"react" create and delete reactions owned by the node
"delete-own-content" delete any content owned by the node
"delete-others-content" delete any content not owned by the node, but stored on it
"view-people" view all contacts of the node
"block" block and unblock people
"friend" add and remove friends and friend groups
"remote-identify" create cartes for authentication on other nodes
"drafts" use drafts
"view-feeds" view all feeds and status of stories in them
"update-feeds" modify status of stories in feeds
"name" update the name of the node
"plugins" administrate plugins
"view-profile" view all fields of the profile
"update-profile" change the profile
"sheriff" use sheriff's powers
"view-settings" view the node settings
"update-settings" modify the node settings
"subscribe" subscribe and unsubscribe to feeds
"tokens" manage authentication tokens
"user-lists" modify lists of users
"grant" grant administrative permission on this node to other nodes
"upload-public-media" upload a public media file
"upload-private-media" upload a private media file
"view-all" all view-only permissions
"all" all permissions

SearchEngine

Value Description
"google" Google

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

SheriffComplaintStatus

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

SheriffOrderCategory

Value Description
"visibility" hide the feed or the entry

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

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

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
"defrosting" the node's owner has connected to it after long inactivity and the node is leaving the frozen state
"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
"reminder-avatar" reminder for the user to set an avatar
"reminder-email" reminder for the user to set an email
"reminder-full-name" reminder for the user to set a full name
"reminder-sheriff-allow" reminder for the user to allow access for Google Play sheriff
"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
"search-report" visits from search engines report
"sheriff-complaint-added" a new complaint was received
"sheriff-complaint-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

SubscriptionReason

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

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)

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