• Post category:Форумы
  • Запись изменена:28.10.2022

POST api/2.0/community/forum/topic/{topicid}

Для этой функции требуется аутентификация. 
Описание Добавляет пост в выбранную тему с темой поста и содержанием, указанными в запросе. Параметры
НазваниеОписаниеТипПример
topicid
sent in url
Идентификатор темыномер1234
parentPostId
sent in body
Идентификатор родительского постаномер1234
subject
sent in body
Тема поста (обязательно)строковыйтекст
content
sent in body
Текст постастроковыйтекст
Пример
POST api/2.0/community/forum/topic/1234
Host: yourportal.r7-office.ru
Content-Type: application/json
Accept: application/json

{
  "parentPostId": 1234,
  "subject": "some text",
  "content": "some text"
}
Возвращает Новый пост Пример ответа
application/json
{
  "status": 0,
  "response": {
    "id": 123,
    "subject": "Sample subject",
    "text": "Post text",
    "created": "2022-10-03T19:03:27.5140733Z",
    "updated": "2022-10-03T19:03:27.5140733Z",
    "createdBy": {
      "id": "00000000-0000-0000-0000-000000000000",
      "displayName": "Mike Zanyatski",
      "title": "Manager",
      "avatarSmall": "url to small avatar",
      "profileUrl": ""
    },
    "threadTitle": null,
    "attachments": [
      {
        "name": "picture.jpg",
        "contentType": "image\/jpeg",
        "created": "2022-10-03T19:03:27.5140733Z",
        "updated": "2022-10-03T19:03:27.5140733Z",
        "size": 122345,
        "path": "url to file"
      }
    ]
  }
}
text/xml
<result>
  <status>0</status>
  <response>
    <id>123</id>
    <subject>Sample subject</subject>
    <text>Post text</text>
    <created>2022-10-03T19:03:27.5140733Z</created>
    <updated>2022-10-03T19:03:27.5140733Z</updated>
    <createdBy>
      <id>00000000-0000-0000-0000-000000000000</id>
      <displayName>Mike Zanyatski</displayName>
      <title>Manager</title>
      <avatarSmall>url to small avatar</avatarSmall>
      <profileUrl></profileUrl>
    </createdBy>
    <threadTitle />
    <attachments>
      <name>picture.jpg</name>
      <contentType>image/jpeg</contentType>
      <created>2022-10-03T19:03:27.5140733Z</created>
      <updated>2022-10-03T19:03:27.5140733Z</updated>
      <size>122345</size>
      <path>url to file</path>
    </attachments>
  </response>
</result>
Была ли полезна статья?
Позвольте нам стать лучше