Entries

The Entries API provides a range of actions for manipulating entries within Unet.


Basic information

Base URI

Scopes

  • entries_read
  • entries_write

Endpoints

RESOURCE_URI — URI is obtained from token exchange point.
TARGET_RESOURCE_URI — URI is obtained from the "sites/" or the "contacts/" endpoint.

Prefix Endpoint Description
RESOURCE_URI entries/ Getting a list of entries
RESOURCE_URI entries/add/ Adding an entry
RESOURCE_URI entries/ID Retrieving entry details
RESOURCE_URI entries/ID/comments/ Getting a list of entry comments
RESOURCE_URI entries/ID/comments/add/ Adding a comment for the entry
RESOURCE_URI entries/ID/rating/ Getting a list of entry ratings
RESOURCE_URI entries/ID/rating/add/ Adding a rating for the entry
RESOURCE_URI entries/ID/edit/ Editing an entry
RESOURCE_URI entries/ID/delete/ Deleting an entry
RESOURCE_URI entries/categories/ Getting a list of categories
RESOURCE_URI entries/categories/add/ Adding a category
RESOURCE_URI entries/categories/ID Retrieving category details
RESOURCE_URI entries/categories/ID/edit/ Editing a category
RESOURCE_URI entries/categories/ID/sort/ Sorting a category
RESOURCE_URI entries/categories/ID/delete/ Deleting a category

+Getting a list of entries

Endpoint

Scopes

  • entries_read

Request

Response


+Retrieving entry details

Endpoint

Scopes

  • entries_read

Request

Response


+Adding an entry

Endpoint

Scopes

  • entries_write

Request

Response


+Editing an entry

Endpoint

Scopes

  • entries_write

Request

Response


+Deleting an entry

Endpoint

Scopes

  • entries_write

Request

  • No specific request params

Response

  • No specific responce params

+Getting a list of categories

Endpoint

Scopes

  • entries_read

Request

  • No specific request params

Response


+Retrieving category details

Endpoint

Scopes

  • entries_read

Request

  • No specific request params

Response


+Adding a category

Endpoint

Scopes

  • entries_write

Request

Response


+Editing a category

Endpoint

Scopes

  • entries_write

Request

Response


+Sorting a category

Endpoint

Scopes

  • entries_write

Request

Response


+Deleting a category

Endpoint

Scopes

  • entries_write

Request

  • No specific request params

Response

  • No specific responce params

Definitions

EntriesListRequest

Name Description

limit (o)
unsigned integer

Number of items expected in response.

cursor (o)
string

The value of the next_cursor / prev_cursor parameter from the responce.
Should be empty to get the first set (page) of elements.

category_id (o)
unsigned integer

Category ID whose items are requested.

author_uid (o)
unsigned integer

User ID whose items are requested.

fields (o)
object

@EntriesItemFields
Read more about the Fields model.

EntriesListResponse

Name Description

items[]
object

@EntriesItemResponse

limit
unsigned integer

Number of returned items (items per page).

next_cursor
string

URL for the next portion of items (next page).
Empty if there is no items for the next portion.

prev_cursor
string

URL for the previous portion of items (previous page).
Empty if there is no items for the previous portion.

total_count
unsigned integer

Total number of items.

EntriesItemRequest

Name Description

fields (o)
object

@EntriesItemFields
Read more about the Fields model.

EntriesItemResponse

Name Description

id
unsigned integer

Entry ID.

category_id
unsigned integer

Category ID.

author_uid
unsigned integer

ID of the user who added the entry.

publish_time
timestamp

Publish time.

title
string

Entry title.

message ?
string

HTML formatted text of the entry.

access ?
object

@EntriesAccessModel

can_comment ?
boolean

true if there is permission to comment the entry.

can_edit ?
boolean

true if there is permission to edit the entry.

can_share ?
boolean

true if there is permission to share the entry.

is_pending ?
boolean

Flag that describes whether the entry is pending approval.

rating ?
object

RatingModel

comments_count ?
unsigned integer

Total number of comments for the entry.

shares_count ?
unsigned integer

Total number of sharings.

tags[] ?
string

The list of tags.

attachments ?
object

AttachmentStructure

EntriesAddRequest

Name Description

category_id
unsigned integer

Not available for use in Profile.

title
string

Entry title.

message (r)
string

Entry text (HTML formatted).

disable_comments
boolean

true if the comment function must be disabled for the entry.

access
object

@EntriesAccessModel

publish_at
string

Date and time of publication of the entry.
Format: ISO 8601.
Not available for use in Profile.

attachments[]
object

AttachmentsConfiguration

tags[]
string

The list of tags.
Separated by commas.

EntriesCategoriesAddRequest

Name Description

title
string

Category name.

access
object

@EntriesAccessModel

EntriesCategoriesResponse

Name Description

items[]
object

@EntriesCategoriesItemResponse

EntriesCategoriesItemResponse

Name Description

id
unsigned integer

Category ID.

title
string

Category name.

items_count
unsigned integer

Number of entries in the category.

access
object

@EntriesAccessModel

sort
unsigned integer

Sorting value.

EntriesCategoriesItemSortRequest

Name Description

after_item (r)
unsigned integer

Category ID, after which the target category must be placed.
Specify "0" to place first.

EntriesCategoriesItemSortResponse

Name Description

sort
unsigned integer

Sorting value.

EntriesAccessModel

Name Description

mode
string

Possible values:

  • any
  • members
  • member_groups
  • admins

member_groups
unsigned integer

Bitmask with member groups IDs
Present only if mode is member_groups

EntriesItemFields

  • id
  • category_id
  • author_uid
  • publish_time
  • title
  • message ?
  • access ?
  • can_comment ?
  • can_edit ?
  • can_share ?
  • is_pending ?
  • rating ?
  • comments_count ?
  • shares_count ?
  • tags ?
  • attachments ?