{"id":160117,"date":"2012-11-25T04:35:06","date_gmt":"2012-11-25T00:35:06","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=160117"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=160117","title":{"rendered":"<span class=\"post_title\">\u0418\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442 \u0434\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f Web API<\/span>"},"content":{"rendered":"<div class=\"content html_format\">   \t<a href=\"http:\/\/ru.wikipedia.org\/wiki\/%D0%92%D0%B5%D0%B1-%D1%81%D0%BB%D1%83%D0%B6%D0%B1%D0%B0\">\u0412\u0435\u0431-c\u0435\u0440\u0432\u0438\u0441<\/a> (\u0430\u043d\u0433\u043b. web service) \u2014 \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u0446\u0438\u0440\u0443\u0435\u043c\u0430\u044f \u0432\u0435\u0431-\u0430\u0434\u0440\u0435\u0441\u043e\u043c \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u043d\u0430\u044f \u0441\u0438\u0441\u0442\u0435\u043c\u0430 \u0441\u043e \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u043c\u0438 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0430\u043c\u0438. \u0412\u0435\u0431-\u0441\u043b\u0443\u0436\u0431\u044b \u043c\u043e\u0433\u0443\u0442 \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c \u0434\u0440\u0443\u0433 \u0441 \u0434\u0440\u0443\u0433\u043e\u043c \u0438 \u0441\u043e \u0441\u0442\u043e\u0440\u043e\u043d\u043d\u0438\u043c\u0438 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f\u043c\u0438 \u043f\u043e\u0441\u0440\u0435\u0434\u0441\u0442\u0432\u043e\u043c \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0439, \u043e\u0441\u043d\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u043d\u0430 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0451\u043d\u043d\u044b\u0445 \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b\u0430\u0445 (XML, JSON \u0438 \u0442. \u0434.). \u0412\u0435\u0431-\u0441\u043b\u0443\u0436\u0431\u0430 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0435\u0434\u0438\u043d\u0438\u0446\u0435\u0439 \u043c\u043e\u0434\u0443\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u043f\u0440\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0438 \u0441\u0435\u0440\u0432\u0438\u0441-\u043e\u0440\u0438\u0435\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0439 \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u044b \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f.<\/p>\n<p>  \u041e\u0434\u043d\u0438\u043c \u0438\u0437 \u043f\u043e\u0434\u0445\u043e\u0434\u043e\u0432 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0432\u0435\u0431 \u0441\u0435\u0440\u0432\u0438\u0441\u0430 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f rest. <br \/>  <a href=\"http:\/\/ru.wikipedia.org\/wiki\/REST\">Rest<\/a> (\u0441\u043e\u043a\u0440. \u0430\u043d\u0433\u043b. Representational State Transfer, \u00ab\u043f\u0435\u0440\u0435\u0434\u0430\u0447\u0430 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u044f \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u044f\u00bb) \u2014 \u0441\u0442\u0438\u043b\u044c \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u0438\u044f \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u044b \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u043e\u0433\u043e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f. \u0414\u0430\u043d\u043d\u044b\u0435 \u0432 REST \u0434\u043e\u043b\u0436\u043d\u044b \u043f\u0435\u0440\u0435\u0434\u0430\u0432\u0430\u0442\u044c\u0441\u044f \u0432 \u0432\u0438\u0434\u0435 \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u043e\u0433\u043e \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0430 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0445 \u0444\u043e\u0440\u043c\u0430\u0442\u043e\u0432 (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 HTML, XML, JSON). \u0421\u0435\u0442\u0435\u0432\u043e\u0439 \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b (\u043a\u0430\u043a \u0438 HTTP) \u0434\u043e\u043b\u0436\u0435\u043d \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0442\u044c \u043a\u044d\u0448\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435, \u043d\u0435 \u0434\u043e\u043b\u0436\u0435\u043d \u0437\u0430\u0432\u0438\u0441\u0435\u0442\u044c \u043e\u0442 \u0441\u0435\u0442\u0435\u0432\u043e\u0433\u043e \u0441\u043b\u043e\u044f, \u043d\u0435 \u0434\u043e\u043b\u0436\u0435\u043d \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0442\u044c \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043e \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0438 \u043c\u0435\u0436\u0434\u0443 \u043f\u0430\u0440\u0430\u043c\u0438 \u00ab\u0437\u0430\u043f\u0440\u043e\u0441-\u043e\u0442\u0432\u0435\u0442\u00bb. \u0423\u0442\u0432\u0435\u0440\u0436\u0434\u0430\u0435\u0442\u0441\u044f, \u0447\u0442\u043e \u0442\u0430\u043a\u043e\u0439 \u043f\u043e\u0434\u0445\u043e\u0434 \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0438\u0432\u0430\u0435\u0442 \u043c\u0430\u0441\u0448\u0442\u0430\u0431\u0438\u0440\u0443\u0435\u043c\u043e\u0441\u0442\u044c \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u0438 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0435\u0439 \u044d\u0432\u043e\u043b\u044e\u0446\u0438\u043e\u043d\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0441 \u043d\u043e\u0432\u044b\u043c\u0438 \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u0438\u044f\u043c\u0438.<\/p>\n<p>  <a name=\"habracut\"><\/a><br \/>  Django REST framework \u2014 \u0443\u0434\u043e\u0431\u043d\u044b\u0439 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442 \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 rest \u043e\u0441\u043d\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u043d\u0430 \u0438\u0434\u0435\u043e\u043b\u043e\u0433\u0438\u0438 \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a\u0430 Django. <\/p>\n<p>  \u0422\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u0438\u044f \u043a \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u044e:<br \/>  Python (2.6, 2.7)<br \/>  Django (1.3, 1.4, 1.5)<\/p>\n<p>  \u041f\u043e \u0436\u0435\u043b\u0430\u043d\u0438\u044e:<br \/>  <a href=\"http:\/\/pypi.python.org\/pypi\/Markdown\/\">Markdown<\/a><br \/>  <a href=\"http:\/\/pypi.python.org\/pypi\/PyYAML\">PyYAML<\/a><br \/>  <a href=\"https:\/\/github.com\/alex\/django-filter\">django-filter<\/a><\/p>\n<h5>\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430<\/h5>\n<p>  \u0423\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u0438\u0432\u044b\u0447\u043d\u043e\u0439 \u0434\u043b\u044f \u043d\u0430\u0441 \u043a\u043e\u043c\u0430\u043d\u0434\u043e\u0439 pip:  <\/p>\n<pre><code class=\"django\">pip install djangorestframework <\/code><\/pre>\n<p>  \u0418 \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u043f\u0430\u043a\u0435\u0442\u044b:  <\/p>\n<pre><code class=\"django\">pip install markdown   pip install pyyaml     pip install django-filter   <\/code><\/pre>\n<p>  \u0418\u043b\u0438 \u0436\u0435 \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u043a\u043b\u043e\u043d \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u0441 Github:  <\/p>\n<pre><code class=\"django\">git clone git@github.com:tomchristie\/django-rest-framework.git cd django-rest-framework pip install -r requirements.txt pip install -r optionals.txt <\/code><\/pre>\n<p>  \u041d\u0435 \u0437\u0430\u0431\u044b\u0432\u0430\u0435\u043c \u043f\u0440\u043e\u043f\u0438\u0441\u0430\u0442\u044c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0432 INSTALLED_APPS:  <\/p>\n<pre><code class=\"django\">INSTALLED_APPS = (     ...     'rest_framework',         ) <\/code><\/pre>\n<p>  \u0410 \u0442\u0430\u043a\u0436\u0435 \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0437\u0430\u043f\u0438\u0441\u044c \u0432 urls.py:  <\/p>\n<pre><code class=\"django\">urlpatterns = patterns('',     ...     url(r'^api-auth\/', include('rest_framework.urls', namespace='rest_framework')) ) <\/code><\/pre>\n<p>  Url \u043c\u043e\u0436\u043d\u043e \u0441\u0442\u0430\u0432\u0438\u0442\u044c \u043b\u044e\u0431\u043e\u0439 \u043d\u0430 \u0412\u0430\u0448 \u0432\u043a\u0443\u0441, \u0433\u043b\u0430\u0432\u043d\u043e\u0435 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0444\u0430\u0439\u043b \u0441 \u0443\u0440\u043b\u0430\u043c\u0438 rest framework (rest_framework.urls).<\/p>\n<h5>\u041f\u0440\u0438\u043c\u0435\u0440 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f<\/h5>\n<p>  \u0421\u043e\u0437\u0434\u0430\u0434\u0438\u043c API \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f\u043c\u0438 \u0438 \u0438\u0445 \u0433\u0440\u0443\u043f\u043f\u0430\u043c\u0438.<\/p>\n<h6>\u0414\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430 \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 Serializers, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c<\/h6>\n<p>  <\/p>\n<pre><code class=\"django\">from django.contrib.auth.models import User, Group, Permission from rest_framework import serializers  class UserSerializer(serializers.HyperlinkedModelSerializer):     class Meta:         model = User         fields = ('url', 'username', 'email', 'groups')  class GroupSerializer(serializers.HyperlinkedModelSerializer):     permissions = serializers.ManySlugRelatedField(         slug_field='codename',         queryset=Permission.objects.all()     )      class Meta:         model = Group         fields = ('url', 'name', 'permissions') <\/code><\/pre>\n<h6>\u041f\u0440\u043e\u043f\u0438\u0448\u0435\u043c views.py<\/h6>\n<p>  <\/p>\n<pre><code class=\"django\">from django.contrib.auth.models import User, Group from rest_framework import generics from rest_framework.decorators import api_view from rest_framework.reverse import reverse from rest_framework.response import Response from quickstart.serializers import UserSerializer, GroupSerializer  @api_view(['GET']) def api_root(request, format=None):     &quot;&quot;&quot;     The entry endpoint of our API.     &quot;&quot;&quot;     return Response({         'users': reverse('user-list', request=request),         'groups': reverse('group-list', request=request),     })  class UserList(generics.ListCreateAPIView):     &quot;&quot;&quot;     API endpoint that represents a list of users.     &quot;&quot;&quot;     model = User     serializer_class = UserSerializer  class UserDetail(generics.RetrieveUpdateDestroyAPIView):     &quot;&quot;&quot;     API endpoint that represents a single user.     &quot;&quot;&quot;     model = User     serializer_class = UserSerializer  class GroupList(generics.ListCreateAPIView):     &quot;&quot;&quot;     API endpoint that represents a list of groups.     &quot;&quot;&quot;     model = Group     serializer_class = GroupSerializer  class GroupDetail(generics.RetrieveUpdateDestroyAPIView):     &quot;&quot;&quot;     API endpoint that represents a single group.     &quot;&quot;&quot;     model = Group     serializer_class = GroupSerializer <\/code><\/pre>\n<p>  \u041c\u044b \u0441\u043e\u0437\u0434\u0430\u043b\u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u044e api_root, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0431\u0443\u0434\u0435\u0442 \u043e\u0442\u043f\u0440\u0430\u0432\u043d\u043e\u0439 \u0442\u043e\u0447\u043a\u043e\u0439 \u0434\u043b\u044f \u043d\u0430\u0448\u0435\u0433\u043e API. \u0418 \u0447\u0435\u0442\u044b\u0440\u0435 \u043a\u043b\u0430\u0441\u0441\u0430, \u0434\u043b\u044f \u0441\u0432\u044f\u0437\u0438 \u0441 \u043c\u043e\u0434\u0435\u043b\u044f\u043c\u0438 \u0438 \u0443\u043a\u0430\u0437\u0430\u043b\u0438 \u043a\u0430\u043a\u0438\u0435 serializers \u043d\u0443\u0436\u043d\u043e \u043f\u0440\u0438 \u044d\u0442\u043e\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c. <\/p>\n<h6>\u0414\u043e\u0431\u0430\u0432\u0438\u043c \u0441\u0441\u044b\u043b\u043a\u0438 \u0432 urls.py<\/h6>\n<p>  <\/p>\n<pre><code class=\"django\">from django.conf.urls import patterns, url, include from rest_framework.urlpatterns import format_suffix_patterns from quickstart.views import UserList, UserDetail, GroupList, GroupDetail  urlpatterns = patterns('quickstart.views',     url(r'^$', 'api_root'),     url(r'^users\/$', UserList.as_view(), name='user-list'),     url(r'^users\/(?P&lt;pk&gt;\\d+)\/$', UserDetail.as_view(), name='user-detail'),     url(r'^groups\/$', GroupList.as_view(), name='group-list'),     url(r'^groups\/(?P&lt;pk&gt;\\d+)\/$', GroupDetail.as_view(), name='group-detail'), )  # Format suffixes urlpatterns = format_suffix_patterns(urlpatterns, allowed=['json', 'api'])  # Default login\/logout views urlpatterns += patterns('',     url(r'^api-auth\/', include('rest_framework.urls', namespace='rest_framework')) ) <\/code><\/pre>\n<p>  \u0412\u0430\u0436\u043d\u044b\u0439 \u043c\u043e\u043c\u0435\u043d\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 user-detail \u0438 group-detail. \u0414\u043b\u044f \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u043e\u0439 \u0441\u0432\u044f\u0437\u0438 \u0441 views.py \u043d\u0443\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0438\u043c\u0435\u043d\u043e\u0432\u0430\u043d\u0438\u0435 \u0432\u0438\u0434\u0430 {modelname}-detail. <br \/>  \u0412 format_suffix_patterns \u043c\u044b \u0443\u043a\u0430\u0437\u0430\u043b\u0438 \u0441\u0443\u0444\u0438\u043a\u0441 \u0434\u043b\u044f \u043d\u0430\u0448\u0438\u0445 urls. <\/p>\n<h6>Settings<\/h6>\n<p>  <\/p>\n<pre><code class=\"django\">INSTALLED_APPS = (     ...     'rest_framework', )  REST_FRAMEWORK = {     'DEFAULT_PERMISSION_CLASSES': ('rest_framework.permissions.IsAdminUser',),     'PAGINATE_BY': 10 } <\/code><\/pre>\n<h6>\u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442<\/h6>\n<p>  \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f curl \u0432 \u043a\u043e\u043d\u0441\u043e\u043b\u0438 \u0438\u0441\u043f\u044b\u0442\u0430\u0435\u043c \u0447\u0442\u043e \u0436\u0435 \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u043e\u0441\u044c:  <\/p>\n<pre><code class=\"django\">bash: curl -H 'Accept: application\/json; indent=4' -u admin:password http:\/\/127.0.0.1:8000\/users\/  {     &quot;count&quot;: 2,      &quot;next&quot;: null,      &quot;previous&quot;: null,      &quot;results&quot;: [         {             &quot;email&quot;: &quot;admin@example.com&quot;,              &quot;groups&quot;: [],              &quot;url&quot;: &quot;http:\/\/127.0.0.1:8000\/users\/1\/&quot;,              &quot;username&quot;: &quot;admin&quot;         },          {             &quot;email&quot;: &quot;tom@example.com&quot;,              &quot;groups&quot;: [                ],              &quot;url&quot;: &quot;http:\/\/127.0.0.1:8000\/users\/2\/&quot;,              &quot;username&quot;: &quot;tom&quot;         }     ] } <\/code><\/pre>\n<p>  \u0412 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0435 \u043c\u043e\u0436\u043d\u043e \u0443\u0432\u0438\u0434\u0438\u0442\u044c \u0447\u0442\u043e \u0442\u043e \u043f\u043e\u0434\u043e\u0431\u043d\u043e\u0435:<br \/>  <img decoding=\"async\" src=\"http:\/\/habrastorage.org\/storage2\/467\/91c\/7d4\/46791c7d4b0bae81e7d0cf10b464f7a6.png\"\/><\/p>\n<p>  \u0421\u0441\u044b\u043b\u043a\u0438:<br \/>  <a href=\"http:\/\/django-rest-framework.org\/\">\u0421\u0430\u0439\u0442 \u043f\u0440\u043e\u0435\u043a\u0442\u0430<\/a><br \/>  <a href=\"https:\/\/github.com\/tomchristie\/django-rest-framework\">Github<\/a><\/p>\n<p>  P.S. \u0414\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 rest \u0432 django \u0435\u0441\u0442\u044c \u0435\u0449\u0435 \u043e\u0434\u043d\u043e \u043d\u0435 \u043f\u043b\u043e\u0445\u043e\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0438\u043c\u0435\u043d\u0443\u0435\u043c\u043e\u0435 \u043a\u0430\u043a <a href=\"https:\/\/bitbucket.org\/jespern\/django-piston\/wiki\/Home\">django-piston<\/a>. \u041f\u0440\u0438 \u0436\u0435\u043b\u0430\u043d\u0438\u0438 \u043c\u043e\u0436\u043d\u043e \u0438 \u043e \u043d\u0435\u043c \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c, \u0445\u043e\u0442\u044f \u0432 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0438 \u043e\u043d\u043e \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u043d\u0435 \u0441\u043b\u043e\u0436\u043d\u043e\u0435.    \t   \t<\/p>\n<div class=\"clear\"><\/div>\n<\/p><\/div>\n<p> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"http:\/\/habrahabr.ru\/post\/160117\/\"> http:\/\/habrahabr.ru\/post\/160117\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div class=\"content html_format\">   \t<a href=\"http:\/\/ru.wikipedia.org\/wiki\/%D0%92%D0%B5%D0%B1-%D1%81%D0%BB%D1%83%D0%B6%D0%B1%D0%B0\">\u0412\u0435\u0431-c\u0435\u0440\u0432\u0438\u0441<\/a> (\u0430\u043d\u0433\u043b. web service) \u2014 \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u0446\u0438\u0440\u0443\u0435\u043c\u0430\u044f \u0432\u0435\u0431-\u0430\u0434\u0440\u0435\u0441\u043e\u043c \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u043d\u0430\u044f \u0441\u0438\u0441\u0442\u0435\u043c\u0430 \u0441\u043e \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u043c\u0438 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0430\u043c\u0438. \u0412\u0435\u0431-\u0441\u043b\u0443\u0436\u0431\u044b \u043c\u043e\u0433\u0443\u0442 \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c \u0434\u0440\u0443\u0433 \u0441 \u0434\u0440\u0443\u0433\u043e\u043c \u0438 \u0441\u043e \u0441\u0442\u043e\u0440\u043e\u043d\u043d\u0438\u043c\u0438 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f\u043c\u0438 \u043f\u043e\u0441\u0440\u0435\u0434\u0441\u0442\u0432\u043e\u043c \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0439, \u043e\u0441\u043d\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u043d\u0430 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0451\u043d\u043d\u044b\u0445 \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b\u0430\u0445 (XML, JSON \u0438 \u0442. \u0434.). \u0412\u0435\u0431-\u0441\u043b\u0443\u0436\u0431\u0430 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0435\u0434\u0438\u043d\u0438\u0446\u0435\u0439 \u043c\u043e\u0434\u0443\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u043f\u0440\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0438 \u0441\u0435\u0440\u0432\u0438\u0441-\u043e\u0440\u0438\u0435\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0439 \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u044b \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f.<\/p>\n<p>  \u041e\u0434\u043d\u0438\u043c \u0438\u0437 \u043f\u043e\u0434\u0445\u043e\u0434\u043e\u0432 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0432\u0435\u0431 \u0441\u0435\u0440\u0432\u0438\u0441\u0430 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f rest. <br \/>  <a href=\"http:\/\/ru.wikipedia.org\/wiki\/REST\">Rest<\/a> (\u0441\u043e\u043a\u0440. \u0430\u043d\u0433\u043b. Representational State Transfer, \u00ab\u043f\u0435\u0440\u0435\u0434\u0430\u0447\u0430 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u044f \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u044f\u00bb) \u2014 \u0441\u0442\u0438\u043b\u044c \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u0438\u044f \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u044b \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u043e\u0433\u043e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f. \u0414\u0430\u043d\u043d\u044b\u0435 \u0432 REST \u0434\u043e\u043b\u0436\u043d\u044b \u043f\u0435\u0440\u0435\u0434\u0430\u0432\u0430\u0442\u044c\u0441\u044f \u0432 \u0432\u0438\u0434\u0435 \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u043e\u0433\u043e \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0430 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0445 \u0444\u043e\u0440\u043c\u0430\u0442\u043e\u0432 (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 HTML, XML, JSON). \u0421\u0435\u0442\u0435\u0432\u043e\u0439 \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b (\u043a\u0430\u043a \u0438 HTTP) \u0434\u043e\u043b\u0436\u0435\u043d \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0442\u044c \u043a\u044d\u0448\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435, \u043d\u0435 \u0434\u043e\u043b\u0436\u0435\u043d \u0437\u0430\u0432\u0438\u0441\u0435\u0442\u044c \u043e\u0442 \u0441\u0435\u0442\u0435\u0432\u043e\u0433\u043e \u0441\u043b\u043e\u044f, \u043d\u0435 \u0434\u043e\u043b\u0436\u0435\u043d \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0442\u044c \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043e \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0438 \u043c\u0435\u0436\u0434\u0443 \u043f\u0430\u0440\u0430\u043c\u0438 \u00ab\u0437\u0430\u043f\u0440\u043e\u0441-\u043e\u0442\u0432\u0435\u0442\u00bb. \u0423\u0442\u0432\u0435\u0440\u0436\u0434\u0430\u0435\u0442\u0441\u044f, \u0447\u0442\u043e \u0442\u0430\u043a\u043e\u0439 \u043f\u043e\u0434\u0445\u043e\u0434 \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0438\u0432\u0430\u0435\u0442 \u043c\u0430\u0441\u0448\u0442\u0430\u0431\u0438\u0440\u0443\u0435\u043c\u043e\u0441\u0442\u044c \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u0438 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0435\u0439 \u044d\u0432\u043e\u043b\u044e\u0446\u0438\u043e\u043d\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0441 \u043d\u043e\u0432\u044b\u043c\u0438 \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u0438\u044f\u043c\u0438.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-160117","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/160117","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=160117"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/160117\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=160117"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=160117"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=160117"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}