• Post category:События
  • Запись изменена:28.10.2022

PUT api/2.0/community/event/{feedid}

Для этой функции требуется аутентификация. 

Описание
Обновляет выбранное событие, изменяя название, содержание и/или тип события, указанные в запросе.

Параметры

Название Описание Тип Пример
feedid

sent in url
Feed ID номер 1234
title

sent in body
Новое название события строковый текст
content

sent in body
Новый содержание события строковый текст
type

sent in body
Новый тип события (News|Order|Advert|Poll) None, News, Order, Advert, AllNews, Poll, All
Пример
PUT api/2.0/community/event/1234
Host: yourportal.r7-office.ru
Content-Type: application/json
Accept: application/json

{
  "title": "some text",
  "content": "some text",
  "type": "none"
}

Возвращает
Список событий

Пример ответа

application/json

{
  "status": 0,
  "response": {
    "id": 10,
    "title": "Sample news",
    "created": "2022-10-03T19:03:27.4923433Z",
    "updated": "2022-10-03T19:03:27.4923433Z",
    "type": 1,
    "createdBy": {
      "id": "00000000-0000-0000-0000-000000000000",
      "displayName": "Mike Zanyatski",
      "title": "Manager",
      "avatarSmall": "url to small avatar",
      "profileUrl": ""
    },
    "text": "Text of feed",
    "poll": {
      "pollType": 0,
      "endDate": "2022-10-03T19:03:27.4923433Z",
      "startDate": "2022-10-03T19:03:27.4923433Z",
      "voted": false,
      "votes": [
        {
          "id": 133,
          "name": "Variant 1",
          "votes": 100
        }
      ]
    }
  }
}

text/xml

<result>
  <status>0</status>
  <response>
    <id>10</id>
    <title>Sample news</title>
    <created>2022-10-03T19:03:27.4923433Z</created>
    <updated>2022-10-03T19:03:27.4923433Z</updated>
    <type>1</type>
    <createdBy>
      <id>00000000-0000-0000-0000-000000000000</id>
      <displayName>Mike Zanyatski</displayName>
      <title>Manager</title>
      <avatarSmall>url to small avatar</avatarSmall>
      <profileUrl></profileUrl>
    </createdBy>
    <text>Text of feed</text>
    <poll>
      <pollType>0</pollType>
      <endDate>2022-10-03T19:03:27.4923433Z</endDate>
      <startDate>2022-10-03T19:03:27.4923433Z</startDate>
      <voted>false</voted>
      <votes>
        <id>133</id>
        <name>Variant 1</name>
        <votes>100</votes>
      </votes>
    </poll>
  </response>
</result>