Announcement

Method: get

Authorization is required.

Request

HTTP request

GET https://<YOUR_DOMAIN>/api/v1/en_US/announcement/{announcementId}

Parameters

property value description
announcementId integer The announcement's ID

Request body

Do not supply a request body with this method.

Response

If successful, this method returns a response JSON with the following structure:

{
  "success": true,
  "message": "Laborum Lorem proident nisi voluptate eiusmod.",
  "timestamp": "2014-03-03T23:20:23Z",
  "errors": {},
  "object": {
    "id": 1,
    "type": "announcement",
    "group": {
      "id": "dd72a18c-f58b-46e2-8cfb-c84a2ea5ee01",
      "name": "aliquip",
      "slug": "Home",
      "thumbUrl": "http://demo.hivesocialnow.com/logo/72_635267855582630000.png",
      "url": "http://demo.hivesocialnow.com/Home/"
    },
    "title": "Non ea proident et sunt veniam duis id exercitation reprehenderit.",
    "content": "Ex nulla nisi est ipsum amet proident ut dolore irure et veniam. Magna ad officia excepteur ullamco non culpa dolor sint. Ipsum dolor occaecat in laborum cupidatat laboris ex culpa nulla exercitation labore tempor. Laboris deserunt id sit pariatur culpa aliquip ullamco laboris quis exercitation qui voluptate.\r\nEa duis veniam pariatur sunt culpa aliqua duis culpa esse consectetur adipisicing. Duis quis ullamco elit do consectetur fugiat cupidatat proident cupidatat magna esse elit. Quis irure cillum pariatur quis minim eiusmod id consectetur irure. Sit velit deserunt fugiat tempor consectetur dolor ex fugiat mollit excepteur fugiat ut. Qui do pariatur consectetur labore adipisicing ut mollit. Voluptate incididunt duis culpa nulla sint consequat voluptate mollit proident sit magna proident cillum. Est ad pariatur excepteur elit exercitation velit irure eu tempor.\r\n",
    "date": "2014-03-03T23:20:23Z",
    "createdOn": "2014-03-03T23:20:23Z",
    "author": {
      "id": "02efb8e5-a95b-436f-a8bf-178907cf73d4",
      "alias": "nisi dolore",
      "extendedAlias": "minim amet commodo minim nisi",
      "slug": "Home",
      "avatarUrl": "http://demo.hivesocialnow.com/bigavatar/bc7fbf51-7930-4550-98b0-6a3ff6111ebe.jpg",
      "url": "http://demo.hivesocialnow.com/blog/GeorgiRaykov/site/profile/"
    },
    "url": "/event/permalink",
    "accessWarnings": []
  }
}

The general response properties are described on the Response format page. Here are the list of the specific properties for this method.

property value description
id integer the id of the record
author object some common properties of the user that created the record: id, alias, extendedAlias, slug, avatarUrl, url (of the profile page)
group object some common properties of the group in which the record was created: id, name, slug, thumbUrl, url (of the group home page)
title string the records title
content string the record contents in HTML
date date the announcement date in ISO 8601 format and UTC time zone
url string the records permalink URL

Method: list

Authorization is required.

Request

HTTP request

GET https://<YOUR_DOMAIN>/api/v1/en_US/announcement/list/{groupId}?offset={offset}&pageSize={pageSize}&filter={filter}

Parameters

property value description
groupId guid The announcements group's ID
offset integer Needed for the infinite scroll functionality. It is the ID of the last presented item to the user. After the request list is generated the system will skip all records from the beginning up to the record with the provided ID (including it). The next batch of records will be returned in the response.
pageSize integer How many records to be returned by the system. Usually 15
filter string Query string to be looked for when filtering the records

Request body

Do not supply a request body with this method.

Response

If successful, this method returns a response JSON with the following structure:

{
  "success": true,
  "message": "Laborum magna dolore excepteur irure eu.",
  "timestamp": "2014-03-03T23:20:23Z",
  "errors": {},
  "object": {
    "offset": "0",
    "announcements": [
      {
        "id": 1,
        "type": "announcement",
        "group": {
          "id": "a7c874f1-c2dd-4b5c-b7c1-758addd0a037",
          "name": "consectetur",
          "slug": "Home",
          "thumbUrl": "http://demo.hivesocialnow.com/logo/72_635267855582630000.png",
          "url": "http://demo.hivesocialnow.com/Home/"
        },
        "title": "Eiusmod magna ullamco esse pariatur culpa Lorem sint aliqua reprehenderit consectetur aute nisi enim ullamco.",
        "content": "Eu aliqua nisi aute aliquip proident sunt magna. Sint ullamco id est in dolore. Veniam culpa culpa labore est nulla ullamco. Reprehenderit ipsum consequat voluptate quis laboris aliquip sint nulla anim enim fugiat incididunt est fugiat. Est dolore nostrud occaecat do est mollit id. Dolore aliquip voluptate dolor proident reprehenderit qui occaecat enim qui cillum quis anim ipsum.\r\nEsse ea sint aliquip excepteur ad exercitation in sit excepteur. Voluptate laborum aliqua ullamco excepteur ullamco incididunt reprehenderit labore voluptate laborum labore sit elit. Consequat elit proident velit occaecat ut consequat amet non enim veniam.\r\n",
        "date": "2014-03-03T23:20:23Z",
        "createdOn": "2014-03-03T23:20:23Z",
        "author": {
          "id": "11eda6e0-3c4b-4800-b1cc-3e4d44c3bb59",
          "alias": "incididunt ad",
          "extendedAlias": "in in ea aliquip velit",
          "slug": "Home",
          "avatarUrl": "http://demo.hivesocialnow.com/bigavatar/bc7fbf51-7930-4550-98b0-6a3ff6111ebe.jpg",
          "url": "http://demo.hivesocialnow.com/blog/GeorgiRaykov/site/profile/"
        },
        "url": "/event/permalink",
        "accessWarnings": []
      }
    ]
  }
}

The general response properties are described on the Response format page. Here are the list of the specific properties for this method.

property value description
the response properties are described in the "get" method or in the general response format

Method: create

Authorization is required.

Request

HTTP request

POST https://<YOUR_DOMAIN>/api/v1/en_US/announcement

Parameters

Do not supply a request parameters with this method.

Request body

property value description
groupId guid In which group to create the record
date date What is the announcement date in ISO 8601 string and UTC time zone
title string The announcement title
content string The announcement contents HTML

Response

If successful, this method returns a response JSON with the following structure:

{
  "timestamp": "2014-03-03T23:20:23Z",
  "success": false,
  "message": "The announcement was not created. Validation error occured!",
  "errors": [
    {
      "key": "date",
      "value": "2014-04-19T07:22Z",
      "message": "Date is required"
    },
    {
      "key": "title",
      "value": "",
      "message": "Title is required"
    }
  ],
  "object": {
    "id": 14,
    "type": "announcement",
    "group": {
      "id": "8be39a95-d963-414f-af81-677ded27d95e",
      "name": "qui",
      "slug": "Home",
      "thumbUrl": "http://demo.hivesocialnow.com/logo/72_635267855582630000.png",
      "url": "http://demo.hivesocialnow.com/Home/"
    },
    "title": "Aliqua cupidatat id commodo sint id est duis consectetur.",
    "content": "Aliqua cupidatat dolor adipisicing laboris non irure non ullamco. Laborum ipsum amet labore id est cillum consectetur adipisicing exercitation. Enim nulla non laborum magna eiusmod. Aliquip ad nulla irure ullamco ex sunt eiusmod proident culpa culpa est.\r\nOfficia excepteur laboris occaecat aliqua nulla culpa aliqua esse nulla aliqua sint. Ea culpa nulla magna sit officia adipisicing magna cillum. Nostrud deserunt in incididunt elit voluptate eu et consectetur nostrud dolor adipisicing non. Culpa nostrud quis eu ad. Consectetur dolore Lorem tempor eu. Esse laboris aliquip culpa dolore ea commodo elit velit magna. Esse labore elit deserunt sit amet do laborum commodo sint reprehenderit elit duis enim.\r\n",
    "date": "2014-03-03T23:20:23Z",
    "createdOn": "2014-03-03T23:20:23Z",
    "author": {
      "id": "17a5666c-0d5c-4092-96ed-17b0bf0ce3d3",
      "alias": "proident qui",
      "extendedAlias": "consequat ullamco dolor reprehenderit officia",
      "slug": "Home",
      "avatarUrl": "http://demo.hivesocialnow.com/bigavatar/bc7fbf51-7930-4550-98b0-6a3ff6111ebe.jpg",
      "url": "http://demo.hivesocialnow.com/blog/GeorgiRaykov/site/profile/"
    },
    "url": "/event/permalink",
    "accessWarnings": []
  }
}

The general response properties are described on the Response format page. Here are the list of the specific properties for this method.

property value description
success Boolean Whether the requested operation is successful or not
message String Human readable error information
errors List (object) List of validation errors, if any. The "key" property value is matched to one of the record's fields
object object The object that caused the validation errors or that was created. Have in mind that, if the server requires string trimming or data manipulation after the user submission, it is applied in this object. In this way the returned object can differe from the posted one.

Method: update

Authorization is required.

Request

HTTP request

PUT https://<YOUR_DOMAIN>/api/v1/en_US/announcement/{announcementId}

Parameters

property value description
announcementId integer The id of the updated record

Request body

property value description
groupId guid In which group the record is
date date What is the announcement date in ISO 8601 string and UTC time zone
title string The announcement title
content string The announcement contents HTML

Response

If successful, this method returns a response JSON with the following structure:

{
  "timestamp": "2014-03-03T23:20:23Z",
  "success": false,
  "message": "The announcement was not created. Validation error occured!",
  "errors": [
    {
      "key": "date",
      "value": "2014-04-19T07:22Z",
      "message": "Date is required"
    },
    {
      "key": "title",
      "value": "",
      "message": "Title is required"
    }
  ],
  "object": {
    "id": 14,
    "type": "announcement",
    "group": {
      "id": "8be39a95-d963-414f-af81-677ded27d95e",
      "name": "qui",
      "slug": "Home",
      "thumbUrl": "http://demo.hivesocialnow.com/logo/72_635267855582630000.png",
      "url": "http://demo.hivesocialnow.com/Home/"
    },
    "title": "Aliqua cupidatat id commodo sint id est duis consectetur.",
    "content": "Aliqua cupidatat dolor adipisicing laboris non irure non ullamco. Laborum ipsum amet labore id est cillum consectetur adipisicing exercitation. Enim nulla non laborum magna eiusmod. Aliquip ad nulla irure ullamco ex sunt eiusmod proident culpa culpa est.\r\nOfficia excepteur laboris occaecat aliqua nulla culpa aliqua esse nulla aliqua sint. Ea culpa nulla magna sit officia adipisicing magna cillum. Nostrud deserunt in incididunt elit voluptate eu et consectetur nostrud dolor adipisicing non. Culpa nostrud quis eu ad. Consectetur dolore Lorem tempor eu. Esse laboris aliquip culpa dolore ea commodo elit velit magna. Esse labore elit deserunt sit amet do laborum commodo sint reprehenderit elit duis enim.\r\n",
    "date": "2014-03-03T23:20:23Z",
    "createdOn": "2014-03-03T23:20:23Z",
    "author": {
      "id": "17a5666c-0d5c-4092-96ed-17b0bf0ce3d3",
      "alias": "proident qui",
      "extendedAlias": "consequat ullamco dolor reprehenderit officia",
      "slug": "Home",
      "avatarUrl": "http://demo.hivesocialnow.com/bigavatar/bc7fbf51-7930-4550-98b0-6a3ff6111ebe.jpg",
      "url": "http://demo.hivesocialnow.com/blog/GeorgiRaykov/site/profile/"
    },
    "url": "/event/permalink",
    "accessWarnings": []
  }
}

The general response properties are described on the Response format page. Here are the list of the specific properties for this method.

property value description
success Boolean Whether the requested operation is successful or not
message String Human readable error information
errors List (object) List of validation errors, if any. The "key" property value is matched to one of the record's fields
object object The object that caused the validation errors or the object that was updated. Have in mind that, if the server requires string trimming or data manipulation after the user submission, it is applied in this object. In this way the returned object can differe from the posted one.

Method: delete

Authorization is required.

Request

HTTP request

DELETE https://<YOUR_DOMAIN>/api/v1/en_US/announcement/{announcementId}

Parameters

property value description
announcementId integer The id of the deleted record

Request body

Do not supply a request body with this method.

Response

If successful, this method returns a response JSON with the following structure:

{
  "timestamp": "2014-03-03T23:20:23Z",
  "success": true,
  "message": "The announcement was not created. Validation error occured!",
  "errors": [],
  "object": {
    "id": 14,
    "type": "announcement",
    "group": {
      "id": "8be39a95-d963-414f-af81-677ded27d95e",
      "name": "qui",
      "slug": "Home",
      "thumbUrl": "http://demo.hivesocialnow.com/logo/72_635267855582630000.png",
      "url": "http://demo.hivesocialnow.com/Home/"
    },
    "title": "Aliqua cupidatat id commodo sint id est duis consectetur.",
    "content": "Aliqua cupidatat dolor adipisicing laboris non irure non ullamco. Laborum ipsum amet labore id est cillum consectetur adipisicing exercitation. Enim nulla non laborum magna eiusmod. Aliquip ad nulla irure ullamco ex sunt eiusmod proident culpa culpa est.\r\nOfficia excepteur laboris occaecat aliqua nulla culpa aliqua esse nulla aliqua sint. Ea culpa nulla magna sit officia adipisicing magna cillum. Nostrud deserunt in incididunt elit voluptate eu et consectetur nostrud dolor adipisicing non. Culpa nostrud quis eu ad. Consectetur dolore Lorem tempor eu. Esse laboris aliquip culpa dolore ea commodo elit velit magna. Esse labore elit deserunt sit amet do laborum commodo sint reprehenderit elit duis enim.\r\n",
    "date": "2014-03-03T23:20:23Z",
    "createdOn": "2014-03-03T23:20:23Z",
    "author": {
      "id": "17a5666c-0d5c-4092-96ed-17b0bf0ce3d3",
      "alias": "proident qui",
      "extendedAlias": "consequat ullamco dolor reprehenderit officia",
      "slug": "Home",
      "avatarUrl": "http://demo.hivesocialnow.com/bigavatar/bc7fbf51-7930-4550-98b0-6a3ff6111ebe.jpg",
      "url": "http://demo.hivesocialnow.com/blog/GeorgiRaykov/site/profile/"
    },
    "url": "/event/permalink",
    "accessWarnings": []
  }
}

The general response properties are described on the Response format page. Here are the list of the specific properties for this method.

property value description
success Boolean Whether the requested operation is successful or not
message String Human readable error information
errors List (object) This list very rarely contains records during delete method processing
object object The object that was deleted