diff --git a/helpcenter.r7-office.ru/Web/Controls/Common/BaseHeader/BaseHeader.ascx b/helpcenter.r7-office.ru/Web/Controls/Common/BaseHeader/BaseHeader.ascx index b2f3e7638..d273faba6 100644 --- a/helpcenter.r7-office.ru/Web/Controls/Common/BaseHeader/BaseHeader.ascx +++ b/helpcenter.r7-office.ru/Web/Controls/Common/BaseHeader/BaseHeader.ascx @@ -17,6 +17,7 @@
  • ">Плагины
  • ">Сервер
  • +
  • ">Community
  • diff --git a/helpcenter.r7-office.ru/Web/Controls/Help/Portals/Auth.ascx b/helpcenter.r7-office.ru/Web/Controls/Help/Portals/Auth.ascx new file mode 100644 index 000000000..e583d46a2 --- /dev/null +++ b/helpcenter.r7-office.ru/Web/Controls/Help/Portals/Auth.ascx @@ -0,0 +1,94 @@ +<%@ Control Language="C#" Inherits="BaseContentUserControls" %> + + + +
    +

    + How to pass authentication? +

    + +

    One needs to perform several easy steps to pass authentication:

    +
      +
    1. Send POST request, containing two parameters: userName and password, to the ">api/2.0/authentication address + +
      Authentication Request
      +
      +POST /api/2.0/authentication.json HTTP/1.1
      +Host: yourportal.onlyoffice.com
      +Content-Type: application/json
      +Accept: application/json
      +
      +{
      +    "userName": "yourusername",
      +    "password": "yourpassword"
      +}
      +
      +
      Please note, that you have to enter your own portal address to the Host: yourportal.onlyoffice.com line instead of yourportal.onlyoffice.com address.
      + +
      Response
      +
      +HTTP/1.1 201 Created
      +Cache-Control: private
      +Content-Type: application/json; charset=utf-8
      +{
      +    "count": 1,
      +    "response": {
      +        "expires": "2010-07-07T17:06:03.5845502+03:00",
      +        "token": "sdjhfskjdhkqy739459234"
      +    },
      +    "status": 0,
      +    "statusCode": 201
      +}
      +
      +
    2. + +
    3. In case authentication is successful, a token which will look like sdjhfskjdhkqy739459234 will be received
    4. +
    5. Use this token every time you call API methods inserting it to the HTTP Header: Authorization + +
      Sample API Request
      +
      +GET api/2.0/people/@self.json HTTP/1.1
      +Host: yourportal.onlyoffice.com
      +Accept: application/json
      +Authorization:sdjhfskjdhkqy739459234
      +
      + +
      Please note, that you have to enter your own portal address to the Host: yourportal.onlyoffice.com line instead of yourportal.onlyoffice.com address.
      +
    6. +
    + +
    C# authentication request example
    +
    +var request = System.Net.WebRequest.Create("https://yourportal.onlyoffice.com/api/2.0/authentication.json");
    +request.Method = "POST";
    +request.ContentType = "application/json";
    +
    +var body = "{\"userName\":\"yourusername\",\"password\":\"yourpassword\"}";
    +var data = System.Text.Encoding.UTF8.GetBytes(body);
    +
    +request.ContentLength = data.Length;
    +using (var stream = request.GetRequestStream())
    +{
    +    stream.Write(data, 0, data.Length);
    +}
    +
    +var response = (System.Net.HttpWebResponse)request.GetResponse();
    +var responseString = new StreamReader(response.GetResponseStream()).ReadToEnd();
    +
    +
    Please note, that you have to enter your own portal address to the yourportal.onlyoffice.com line instead of yourportal.onlyoffice.com address.
    + +
    cURL authentication request example
    +
    +curl --request POST --header "Content-Type: application/json" --data "{\"username\":\"yourusername\",\"password\":\"yourpassword\"}" "https://yourportal.onlyoffice.com/api/2.0/authentication.json"
    +
    +
    Please note, that you have to enter your own portal address to the yourportal.onlyoffice.com line instead of yourportal.onlyoffice.com address.
    + +
    \ No newline at end of file diff --git a/helpcenter.r7-office.ru/Web/Controls/Help/Portals/Basic.ascx b/helpcenter.r7-office.ru/Web/Controls/Help/Portals/Basic.ascx new file mode 100644 index 000000000..a9cab3077 --- /dev/null +++ b/helpcenter.r7-office.ru/Web/Controls/Help/Portals/Basic.ascx @@ -0,0 +1,74 @@ +<%@ Control Language="C#" Inherits="BaseContentUserControls" %> + + + +
    +

    + Basic concepts +

    +

    Introduction +

    +

    + The ONLYOFFICE Community Server API is implemented as REST over HTTP using GET/POST/PUT/DELETE. + All the resources, like posts or comments, have their own URLs and are designed to be manipulated in isolation. +

    +

    Authentication +

    +

    + Authentication in the ONLYOFFICE Community Server API is managed via the HTTP authentication, i.e. every request must include the Authorization HTTP header. + For information and examples please visit the ">Authentication section. +

    +

    Making requests +

    +

    + To identify the request and response format please make sure that both the Content-Type and Accept headers are set to application/json. + Any API method can be called stating the format for the response (json or xml). +

    +

    + Example:
    + api/2.0/people/@self can be called both as api/2.0/people/@self.json - then the format of the returned media is = JSON + and api/2.0/people/@self.xml - then the format of the returned media is = XML. +

    +

    + By default the XML format is used for the response if no format is specified in the request (e.g. api/2.0/people/@self will return XML media). +

    +

    Responses +

    +

    + If a request succeeds, it will return a status code in the 200 range and, in case no format was specified in the request, an XML-formatted response. + Note that, in general, if a request causes a new record to be created (like a new post, or comment, etc.), the response will use the "201 Created" status. + Any other successful operation (like a successful query, delete, or update) will return a 200 status code. +

    +

    + If a request fails, a non-200 status code will be returned, possibly with error information in XML format as the response content. + For instance, if a requested record could not be found, the HTTP response might look something like: +

    +
    HTTP/1.1 404 Not Found
    +

    Rate limiting +

    +

    + You can perform up to 500 requests per 10 second period from the same IP address for the same account. + If you exceed this limit, a 503 response for the subsequent requests will be received. + Check the Retry-After header to see how many seconds to wait before you try again. +

    +

    Conventions used in this documentation +

    +

    + The following notation is used in the documentation:
    + {text}: states for the text that should be replaced by your own data (ID, search query, etc.) +

    +

    Support +

    +

    + You can ask our developers at dev.onlyoffice.org (registration required). +

    + +
    \ No newline at end of file diff --git a/helpcenter.r7-office.ru/Web/Controls/Help/Portals/Batch.ascx b/helpcenter.r7-office.ru/Web/Controls/Help/Portals/Batch.ascx new file mode 100644 index 000000000..ae4e2302e --- /dev/null +++ b/helpcenter.r7-office.ru/Web/Controls/Help/Portals/Batch.ascx @@ -0,0 +1,125 @@ +<%@ Control Language="C#" Inherits="BaseContentUserControls" %> + + + +
    +

    + Batching requests +

    + +

    + The standard version of the ONLYOFFICE API is designed to make it really + easy to get data for an individual object and to browse connections between objects. + It also includes a limited ability to retrieve data for several objects in a single request. +

    +

    + If your application needs the ability to access significant amounts of data in a + single go - or you need to make changes to several objects at once, it is often + more efficient to batch your queries rather than make multiple individual HTTP requests. +

    +

    + To enable this, the ONLYOFFICE API supports request batching which allows you to pass instructions + for several operations in a single HTTP request. You can also specify dependencies + between related operations (described in the Batch requests containing multiple methods section below). ONLYOFFICE will process + each of your independent operations in parallel and will process your dependent + operations sequentially. Once all operations have been completed, a consolidated + response will be passed back to you and the HTTP connection will be closed. +

    + +

    Making a simple batched request

    + +

    + The batch API takes in an array of logical HTTP requests represented as JSON arrays + - each request has a method (corresponding to HTTP method GET/PUT/POST/DELETE etc), + a relativeUrl (the portion of the URL after yourportal.onlyoffice.com), optional headers + array (corresponding to HTTP headers) and an optional body (for POST and PUT requests). + The batch API returns an array of logical HTTP responses represented as JSON arrays + - each response has a status code, an optional headers array and an optional body + (which is a JSON encoded string). +

    +

    + To make batched requests, you build a JSON object which describes each individual + operation you'd like to perform and POST this to the ONLYOFFICE API endpoint + at /api/2.0/batch. The following example gets the current + user's profile information and the user group in a single request: +

    + +
    +batch = [
    +    {
    +        "method": "GET",
    +        "relativeUrl": "/api/2.0/people/@self"
    +    },
    +    {
    +        "method": "GET",
    +        "relativeUrl": "/api/2.0/group/@self"
    +    }
    +]
    +
    + +

    + Once both operations have been completed, ONLYOFFICE sends a response which encapsulates + the result of all the operations. For each operation, the response includes a status + code, header information, and the body. These are equivalent to the response you + could expect from each operation if performed as raw requests against the ONLYOFFICE + API. The body field contains a string encoded JSON object: +

    +

    + For the above request, the expected response would be of the form: +

    + +
    +{
    +    "count": 1,
    +    "startIndex": 0,
    +    "status": 0,
    +    "statusCode": 200,
    +    "response": [
    +        {
    +            "status": 200,
    +            "headers": {
    +                "x-AspNet-Version": "2.0.50727",
    +                "access-Control-Allow-Origin": "*",
    +                "cache-Control": "private, max-age=0",
    +                "content-Type": "application/json; charset=UTF-8"
    +            },
    +            "data": "{\"count\": 1, \"startIndex\": 0, \"status\": 0, \"statusCode\": 200, \"response\": {\"id\": \"293bb997-28d8-4be0-8547-6eb50add1f3c\", \"userName\": \"Mike.Zanyatski\", \"firstName\": \"Mike\", \"lastName\": \"Zanyatski\", \"email\": \"mike@gmail.com\", \"birthday\": \"1974-05-16T05:00:00.0000000+05:00\", \"sex\": \"male\", \"status\": 1, \"terminated\": null, \"department\": \"Sample group\", \"workFrom\": \"2007-10-09T05:00:00.0000000+05:00\", \"location\": \"\", \"notes\": \"\", \"displayName\": \"Mike Zanyatski\", \"title\": \"Manager\", \"contacts\": [], \"groups\": [{\"id\": \"eeb47881-6330-4b6d-8a32-82366d4caf27\", \"name\": \"Sample group\", \"manager\": \"Jake.Zazhitski\"}], \"avatarMedium\": \"/data/0/userphotos/eeb47881-6330-4b6d-8a32-82366d4caf27_size_48-48.jpeg\", \"avatar\": \"/data/0/userphotos/eeb47881-6330-4b6d-8a32-82366d4caf27_size_82-82.jpeg\", \"avatarSmall\": \"/data/0/userphotos/eeb47881-6330-4b6d-8a32-82366d4caf27_size_32-32.jpeg\"}}"
    +        }
    +    ]
    +}
    +
    + +

    Batch requests containing multiple methods

    + +

    + It is possible to combine operations that would normally use different HTTP methods + into a single batch request. While GET and DELETE operations + must only have a relativeUrl and a method field, POST + and PUT operations may contain an optional body field. + This should be formatted as a raw HTTP POST body string, similar to a URL query + string. The following example gets information on the current contact and updates + the contact information for the contact with the selected ID in a single operation: +

    + +
    +batch = [
    +    {
    +        "method": "GET",
    +        "relativeUrl": "/api/2.0/people/@self"
    +    },
    +    {
    +        "method": "POST",
    +        "relativeUrl": "/api/2.0/people/{userid}/contacts", 
    +        "body": "contacts[0].Type=skype&contacts[0].Value=skypename&contacts[1].Type=msn&contacts[1].Value=msn_login"
    +    }
    +]
    +
    +
    \ No newline at end of file diff --git a/helpcenter.r7-office.ru/Web/Controls/Help/Portals/Faq.ascx b/helpcenter.r7-office.ru/Web/Controls/Help/Portals/Faq.ascx new file mode 100644 index 000000000..1113c70de --- /dev/null +++ b/helpcenter.r7-office.ru/Web/Controls/Help/Portals/Faq.ascx @@ -0,0 +1,42 @@ +<%@ Control Language="C#" Inherits="BaseContentUserControls" %> + + + +
    +

    + Frequently Asked Questions +

    + +
    What is the date/time format used in the response to the requests?
    +

    + The response to the requests use the Roundtrip format: 2008-04-10T06:30:00.0000000-07:00. +
    Where -07:00 is UTC offset which is set on the portal. + In case the portal uses UTC time without any offset the date/time format in the response will be the following: + 2008-04-10T06:30:00.0000000Z. +
    As for the request, only date can be send in it: 2008-04-10 +
    +
    + If you use the date/time in URL request, colons must be avoided and replaced by hyphens: 2008-04-10T06-30-00.000Z. +
    Please note that the UTC date and time without the offset are used in this case. +

    + +
    How to get json or xml format?
    +

    + You can get json or xml format adding .json or .xml to the request or pointing the request content-type in application/json or text/xml. +
    E.g.: + ">api/2.0/people.json +

    + +
    Is the response data pagination supported?
    +

    + Yes. see the ">Request Filtering section. +

    +
    \ No newline at end of file diff --git a/helpcenter.r7-office.ru/Web/Controls/Help/Portals/Filters.ascx b/helpcenter.r7-office.ru/Web/Controls/Help/Portals/Filters.ascx new file mode 100644 index 000000000..ff48ebaf1 --- /dev/null +++ b/helpcenter.r7-office.ru/Web/Controls/Help/Portals/Filters.ascx @@ -0,0 +1,77 @@ +<%@ Control Language="C#" Inherits="BaseContentUserControls" %> + + + +
    +

    + Request filtering +

    + +

    + Every request to the API supports a certain number of parameters sent in the URL +
    + I.e. the request ">api/2.0/people can be appended with several parameters, + for example ">api/2.0/people?startIndex=10&count=25 +

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    ParameterDescription
    countNumber of the elements returned.
    startIndexThe number of elements to be skipped in the beginning. Used for response data pagination.
    sortBySort by field name.
    sortOrder + Sorting direction. Can be "descending" or "ascending". For example, used together with sortBy:
    + ">api/2.0/people?sortBy=userName&sortOrder=descending +
    filterByFilter results by field name.
    filterOpFiltering operation. Can be one of the following: "contains","equals","startsWith","present"
    filterValue + Filter value. For example, used together with filterBy and filterOp:
    + ">api/2.0/people?filterBy=userName&filterOp=startsWith&filterValue=Alex +
    updatedSinceReturns the values updated or created since a certain period of time.
    +
    \ No newline at end of file diff --git a/helpcenter.r7-office.ru/Web/Controls/Help/SideMenu/portals.ascx b/helpcenter.r7-office.ru/Web/Controls/Help/SideMenu/portals.ascx new file mode 100644 index 000000000..a798e5af7 --- /dev/null +++ b/helpcenter.r7-office.ru/Web/Controls/Help/SideMenu/portals.ascx @@ -0,0 +1,17 @@ +<%@ Control Language="C#" %> + + \ No newline at end of file diff --git a/helpcenter.r7-office.ru/Web/Controls/Help/VariousControls/HelpLinks/PortalsLinks.ascx b/helpcenter.r7-office.ru/Web/Controls/Help/VariousControls/HelpLinks/PortalsLinks.ascx new file mode 100644 index 000000000..ad0a77bdb --- /dev/null +++ b/helpcenter.r7-office.ru/Web/Controls/Help/VariousControls/HelpLinks/PortalsLinks.ascx @@ -0,0 +1,7 @@ +<%@ Control Language="C#" %> +<%@ Register Namespace="TeamLab.Controls" Assembly="__Code" TagPrefix="cc" %> + \ No newline at end of file diff --git a/helpcenter.r7-office.ru/Web/Masters/PortalsList.master b/helpcenter.r7-office.ru/Web/Masters/PortalsList.master new file mode 100644 index 000000000..5e4ef231c --- /dev/null +++ b/helpcenter.r7-office.ru/Web/Masters/PortalsList.master @@ -0,0 +1,17 @@ +<%@ Master Language="C#" MasterPageFile="~/Masters/ArticleListPage.master" %> + +<%@ Register Namespace="TeamLab.Controls" Assembly="__Code" TagPrefix="cc" %> + + + + + + + + + + + + + + diff --git a/helpcenter.r7-office.ru/Web/portals/Batch.aspx b/helpcenter.r7-office.ru/Web/portals/Batch.aspx new file mode 100644 index 000000000..b0c91299a --- /dev/null +++ b/helpcenter.r7-office.ru/Web/portals/Batch.aspx @@ -0,0 +1,15 @@ +<%@ Page Title="" Language="C#" MasterPageFile="~/Masters/PortalsList.master" %> +<%@ Register Namespace="TeamLab.Controls" Assembly="__Code" TagPrefix="cc" %> + + + + + +
    ">Community server
    +
    + + + + +
    + \ No newline at end of file diff --git a/helpcenter.r7-office.ru/Web/portals/Faq.aspx b/helpcenter.r7-office.ru/Web/portals/Faq.aspx new file mode 100644 index 000000000..5aa52ca03 --- /dev/null +++ b/helpcenter.r7-office.ru/Web/portals/Faq.aspx @@ -0,0 +1,15 @@ +<%@ Page Title="" Language="C#" MasterPageFile="~/Masters/PortalsList.master" %> +<%@ Register Namespace="TeamLab.Controls" Assembly="__Code" TagPrefix="cc" %> + + + + + +
    ">Community server
    +
    + + + + +
    + \ No newline at end of file diff --git a/helpcenter.r7-office.ru/Web/portals/Filters.aspx b/helpcenter.r7-office.ru/Web/portals/Filters.aspx new file mode 100644 index 000000000..5ab273b90 --- /dev/null +++ b/helpcenter.r7-office.ru/Web/portals/Filters.aspx @@ -0,0 +1,15 @@ +<%@ Page Title="" Language="C#" MasterPageFile="~/Masters/PortalsList.master" %> +<%@ Register Namespace="TeamLab.Controls" Assembly="__Code" TagPrefix="cc" %> + + + + + +
    ">Community server
    +
    + + + + +
    + \ No newline at end of file diff --git a/helpcenter.r7-office.ru/Web/portals/auth.aspx b/helpcenter.r7-office.ru/Web/portals/auth.aspx new file mode 100644 index 000000000..9445fdccd --- /dev/null +++ b/helpcenter.r7-office.ru/Web/portals/auth.aspx @@ -0,0 +1,15 @@ +<%@ Page Title="" Language="C#" MasterPageFile="~/Masters/PortalsList.master" %> +<%@ Register Namespace="TeamLab.Controls" Assembly="__Code" TagPrefix="cc" %> + + + + + +
    ">Community server
    +
    + + + + +
    + \ No newline at end of file diff --git a/helpcenter.r7-office.ru/Web/portals/index.aspx b/helpcenter.r7-office.ru/Web/portals/index.aspx new file mode 100644 index 000000000..01c87b688 --- /dev/null +++ b/helpcenter.r7-office.ru/Web/portals/index.aspx @@ -0,0 +1,15 @@ +<%@ Page Title="" Language="C#" MasterPageFile="~/Masters/PortalsList.master" %> +<%@ Register Namespace="TeamLab.Controls" Assembly="__Code" TagPrefix="cc" %> + + + + + +
    ">Community server
    +
    + + + + +
    + \ No newline at end of file