Interaction

Mark News Seen

curl -i -X POST "https://example.ziik.io/api/news/123/seen"
  -H "Authorization: Bearer aaaaaaaaa.bbbbbbbbb.cccccccccc"

The above command returns 204 No Content on success

HTTP/1.0 204 No Content

This endpoint marks a news as seen for the current user.

HTTP Request

POST https://example.ziik.io/api/news/123/seen

Request Parameters

None

Permissions Required

  • Read access to the news (See "Get Single News")

Get Users Who Have Seen A News

curl "https://example.ziik.io/api/news/124/seen"
  -H "Authorization: Bearer aaaaaaaaa.bbbbbbbbb.cccccccccc"

The above command returns JSON structured like this:

{
  "data": [
    {
      "timestamp": 1540467737,
      "user": {
        "content_type": "user",
        "id": 2,
        "name": "Ellsworth Walsh",
        "first_name": "Ellsworth",
        "last_name": "Walsh",
        "title": "Chemical Engineer",
        "avatar": null,
        "active": true,
        "unit": {
          "content_type": "unit",
          "id": 1,
          "name": "HQ",
          "level": 0,
          "unit_type": "unit",
          "url": "api/units/1"
        },
        "url": "api/users/2"
      }
    }
  ]
}

This endpoint returns users, who have seen a news

HTTP Request

GET https://example.ziik.io/api/news/ID/seen

URL Parameters

ParameterTypeDescription
IDIntegerThe ID of the news

Permissions Required

  • Edit access to the news (See "Edit News")

Confirm Read News

curl -i -X POST "https://example.ziik.io/api/news/123/read"
  -H "Authorization: Bearer aaaaaaaaa.bbbbbbbbb.cccccccccc"

The above command returns 204 No Content on success

HTTP/1.0 204 No Content

This endpoint confirms a news read for the current user.

HTTP Request

POST https://example.ziik.io/api/news/123/read

Request Parameters

None

Permissions Required

  • Read access to the news (See "Get Single News")

Get Confirmed Readers of a News

curl "https://example.ziik.io/api/news/124/read"
  -H "Authorization: Bearer aaaaaaaaa.bbbbbbbbb.cccccccccc"

The above command returns JSON structured like this:

{
  "data": [
    {
      "timestamp": 1540467737,
      "user": {
        "content_type": "user",
        "id": 2,
        "name": "Ellsworth Walsh",
        "first_name": "Ellsworth",
        "last_name": "Walsh",
        "title": "Chemical Engineer",
        "avatar": null,
        "active": true,
        "unit": {
          "content_type": "unit",
          "id": 1,
          "name": "HQ",
          "level": 0,
          "unit_type": "unit",
          "url": "api/units/1"
        },
        "url": "api/users/2"
      }
    }
  ]
}

This endpoint returns users, who have confirmed read a news

HTTP Request

GET https://example.ziik.io/api/news/ID/read

URL Parameters

ParameterTypeDescription
IDIntegerThe ID of the news

Permissions Required

  • Edit access to the news (See "Edit News")

Get Non-confirmed Readers of a News

curl "https://example.ziik.io/api/news/124/unread"
  -H "Authorization: Bearer aaaaaaaaa.bbbbbbbbb.cccccccccc"

The above command returns JSON structured like this:

{
  "data": [
    {
      "timestamp": null,
      "user": {
        "content_type": "user",
        "id": 2,
        "name": "Ellsworth Walsh",
        "first_name": "Ellsworth",
        "last_name": "Walsh",
        "title": "Chemical Engineer",
        "avatar": null,
        "active": true,
        "unit": {
          "content_type": "unit",
          "id": 1,
          "name": "HQ",
          "level": 0,
          "unit_type": "unit",
          "url": "api/units/1"
        },
        "url": "api/users/2"
      }
    }
  ]
}

This endpoint returns users, who have NOT confirmed read a news, but should

HTTP Request

GET https://example.ziik.io/api/news/ID/unread

URL Parameters

ParameterTypeDescription
IDIntegerThe ID of the news

Permissions Required

  • Edit access to the news (See "Edit News")

Bookmark News

curl -i -X POST "https://example.ziik.io/api/news/123/bookmark"
  -H "Authorization: Bearer aaaaaaaaa.bbbbbbbbb.cccccccccc"

The above command returns 204 No Content on success

HTTP/1.0 204 No Content

This endpoint bookmarks a news for the current user.

HTTP Request

POST https://example.ziik.io/api/news/123/bookmark

Request Parameters

None

Permissions Required

  • Read access to the news (See "Get Single News")

Un-bookmark News

curl -i -X DELETE "https://example.ziik.io/api/news/123/bookmark"
  -H "Authorization: Bearer aaaaaaaaa.bbbbbbbbb.cccccccccc"

The above command returns 204 No Content on success

HTTP/1.0 204 No Content

This endpoint removes a bookmark for a news for the current user.

HTTP Request

DELETE https://example.ziik.io/api/news/123/bookmark

Request Parameters

None

Permissions Required

  • Read access to the news (See "Get Single News")

Like News

curl -i -X POST "https://example.ziik.io/api/news/123/like"
  -H "Authorization: Bearer aaaaaaaaa.bbbbbbbbb.cccccccccc"

The above command returns 204 No Content on success

HTTP/1.0 204 No Content

This endpoint marks a news as liked for the current user.

HTTP Request

POST https://example.ziik.io/api/news/123/like

Request Parameters

None

Permissions Required

  • Read access to the news (See "Get Single News")

Un-like News

curl -i -X DELETE "https://example.ziik.io/api/news/123/like"
  -H "Authorization: Bearer aaaaaaaaa.bbbbbbbbb.cccccccccc"

The above command returns 204 No Content on success

HTTP/1.0 204 No Content

This endpoint removes a like on a news for the current user.

HTTP Request

DELETE https://example.ziik.io/api/news/123/like

Request Parameters

None

Permissions Required

  • Read access to the news (See "Get Single News")

Get Likers of a News

curl "https://example.ziik.io/api/news/124/like"
  -H "Authorization: Bearer aaaaaaaaa.bbbbbbbbb.cccccccccc"

The above command returns JSON structured like this:

{
  "data": [
    {
      "timestamp": 1540467737,
      "user": {
        "content_type": "user",
        "id": 2,
        "name": "Ellsworth Walsh",
        "first_name": "Ellsworth",
        "last_name": "Walsh",
        "title": "Chemical Engineer",
        "avatar": null,
        "active": true,
        "unit": {
          "content_type": "unit",
          "id": 1,
          "name": "HQ",
          "level": 0,
          "unit_type": "unit",
          "url": "api/units/1"
        },
        "url": "api/users/2"
      }
    }
  ]
}

This endpoint returns users, who have liked a news

HTTP Request

GET https://example.ziik.io/api/news/ID/like

URL Parameters

ParameterTypeDescription
IDIntegerThe ID of the news

Permissions Required

  • Read access to the news (See "Get Single News")