{"id":475226,"date":"2025-09-17T07:05:24","date_gmt":"2025-09-17T07:05:24","guid":{"rendered":"https:\/\/savepearlharbor.com\/?p=475226"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=475226","title":{"rendered":"\u0428\u043f\u0430\u0440\u0433\u0430\u043b\u043a\u0430 \u043f\u043e \u043f\u0440\u043e\u0435\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044e REST API"},"content":{"rendered":"<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<figure class=\"\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/40\/0q\/_y\/400q_yfcmzelltchjatnf033rpg.jpeg\" sizes=\"(max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/webt\/40\/0q\/_y\/400q_yfcmzelltchjatnf033rpg.jpeg 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/webt\/40\/0q\/_y\/400q_yfcmzelltchjatnf033rpg.jpeg 781w\" loading=\"lazy\" decode=\"async\"\/><\/figure>\n<h3>\u0412\u0432\u0435\u0434\u0435\u043d\u0438\u0435<\/h3>\n<p>\u041f\u0440\u0438\u0432\u0435\u0442, \u0425\u0430\u0431\u0440! \u041a\u0430\u0436\u0434\u044b\u0439 \u0440\u0430\u0437, \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u044f \u043d\u043e\u0432\u044b\u0439 \u044d\u043d\u0434\u043f\u043e\u0438\u043d\u0442, \u044f \u043b\u043e\u0432\u0438\u043b \u0441\u0435\u0431\u044f \u043d\u0430 \u043c\u044b\u0441\u043b\u0438: \u00ab\u0410 \u043a\u0430\u043a \u043d\u0430\u0437\u0432\u0430\u0442\u044c \u043c\u0430\u0440\u0448\u0440\u0443\u0442?\u00bb. \u041a\u0430\u0437\u0430\u043b\u043e\u0441\u044c, \u0447\u0442\u043e \u0433\u0434\u0435-\u0442\u043e \u0435\u0441\u0442\u044c \u0437\u0430\u043a\u043e\u043d\u044b \u0438 \u043f\u0440\u0430\u0432\u0438\u043b\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u043e\u043c\u043e\u0433\u0430\u044e\u0442 \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c API \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e. \u0421\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0435\u043c \u044f \u043d\u0430\u0442\u043a\u043d\u0443\u043b\u0441\u044f \u043d\u0430 \u0434\u0438\u0430\u0433\u0440\u0430\u043c\u043c\u044b \u043f\u043e \u043f\u0440\u043e\u0435\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044e, \u043f\u0440\u043e\u0447\u0438\u0442\u0430\u043b \u043a\u043d\u0438\u0433\u0443 <strong>JJ Geewax \u2014 API Design Patterns (\u0414\u0436\u0435\u0439\u2011\u0414\u0436\u0435\u0439 \u0413\u0438\u0432\u0430\u043a\u0441)<\/strong>, \u0438\u0437\u0443\u0447\u0438\u043b \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0430\u0446\u0438\u0438 \u043e\u0442 \u043a\u0440\u0443\u043f\u043d\u044b\u0445 \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u0439 \u0438 \u043f\u043e\u043d\u044f\u043b \u0432\u0430\u0436\u043d\u0443\u044e \u043c\u044b\u0441\u043b\u044c: <strong>\u043f\u0440\u043e\u0435\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 API \u2014 \u044d\u0442\u043e \u0442\u0430\u043a\u0430\u044f \u0436\u0435 \u043e\u0431\u043b\u0430\u0441\u0442\u044c \u0437\u043d\u0430\u043d\u0438\u0439 \u0441\u043e \u0441\u0432\u043e\u0438\u043c\u0438 \u043f\u0440\u0438\u043d\u0446\u0438\u043f\u0430\u043c\u0438 \u0438 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u0430\u043c\u0438<\/strong>.<\/p>\n<p>\u0421\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u0435 \u044d\u0442\u0438\u043c \u043f\u0440\u0430\u0432\u0438\u043b\u0430\u043c \u0434\u0430\u0451\u0442 \u043f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442:<\/p>\n<ul>\n<li>\n<p>API \u0441\u0442\u0430\u043d\u043e\u0432\u044f\u0442\u0441\u044f \u0443\u0434\u043e\u0431\u043d\u044b\u043c\u0438 \u0434\u043b\u044f \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u043e\u0432 \u0431\u043b\u0430\u0433\u043e\u0434\u0430\u0440\u044f \u0435\u0434\u0438\u043d\u043e\u043e\u0431\u0440\u0430\u0437\u043d\u044b\u043c \u043f\u0430\u0442\u0442\u0435\u0440\u043d\u0430\u043c \u0438 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u0430\u043c \u0432\u0435\u0431\u0430.<\/p>\n<\/li>\n<li>\n<p>\u0411\u0438\u0437\u043d\u0435\u0441\u2011\u043b\u043e\u0433\u0438\u043a\u0443 \u0438 \u0441\u0430\u043c API \u043b\u0435\u0433\u0447\u0435 \u043f\u0435\u0440\u0435\u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c.<\/p>\n<\/li>\n<li>\n<p>\u0418\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 \u043e\u0441\u0442\u0430\u0451\u0442\u0441\u044f \u043f\u043e\u043d\u044f\u0442\u043d\u044b\u043c \u0438 \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u0443\u0435\u043c\u044b\u043c \u0434\u043b\u044f \u0432\u043d\u0435\u0448\u043d\u0438\u0445 \u043a\u043b\u0438\u0435\u043d\u0442\u043e\u0432.<\/p>\n<\/li>\n<\/ul>\n<p>\u041e\u0434\u043d\u0430\u043a\u043e \u0432\u043e\u0437\u043d\u0438\u043a\u0430\u0435\u0442 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430: \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u044b \u0435\u0441\u0442\u044c, \u043d\u043e \u043e\u043d\u0438 \u0440\u0430\u0437\u043d\u044b\u0435. \u041c\u043d\u043e\u0433\u0438\u0435 \u0438\u0437 \u043d\u0438\u0445 \u043a\u0440\u0430\u0441\u0438\u0432\u044b \u043d\u0430 \u0431\u0443\u043c\u0430\u0433\u0435, \u043d\u043e \u043d\u0435\u043f\u043e\u043d\u044f\u0442\u043d\u043e, \u043a\u0430\u043a \u0438\u0445 \u043f\u0440\u0438\u043c\u0435\u043d\u0438\u0442\u044c \u0432 \u043e\u0431\u044b\u0447\u043d\u043e\u043c CRUD\u2011\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0438 \u0431\u0435\u0437 \u0441\u043b\u043e\u0436\u043d\u043e\u0439 \u0431\u0438\u0437\u043d\u0435\u0441\u2011\u043b\u043e\u0433\u0438\u043a\u0438.<\/p>\n<p><strong>\u0426\u0435\u043b\u044c \u0441\u0442\u0430\u0442\u044c\u0438<\/strong> \u2014 \u0434\u0430\u0442\u044c \u043a\u043e\u043c\u043f\u0430\u043a\u0442\u043d\u0443\u044e \u0448\u043f\u0430\u0440\u0433\u0430\u043b\u043a\u0443 \u043f\u043e \u043f\u0440\u043e\u0435\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044e API \u0434\u043b\u044f \u043f\u0440\u043e\u0441\u0442\u044b\u0445 CRUD\u2011\u0441\u0435\u0440\u0432\u0438\u0441\u043e\u0432 \u0438 \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u044c \u0445\u043e\u0434 \u043c\u044b\u0441\u043b\u0435\u0439, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043f\u0440\u043e\u0435\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u0438 \u043e\u0441\u043c\u044b\u0441\u043b\u0435\u043d\u043d\u043e.<\/p>\n<hr\/>\n<h3>\u0427\u0430\u0441\u0442\u044c 1. \u0412\u0441\u0451 \u043d\u0430\u0447\u0438\u043d\u0430\u0435\u0442\u0441\u044f \u0441 \u0434\u043e\u043c\u0435\u043d\u0430 \u0438 \u043a\u043e\u0434\u0430<\/h3>\n<p>\u0412 \u0445\u043e\u0440\u043e\u0448\u0435\u043c API \u0441\u043d\u0430\u0447\u0430\u043b\u0430 \u043f\u0440\u043e\u0435\u043a\u0442\u0438\u0440\u0443\u044e\u0442\u0441\u044f <strong>\u0440\u0435\u0441\u0443\u0440\u0441\u044b<\/strong> \u0438 <strong>\u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435<\/strong> \u0441 \u043d\u0438\u043c\u0438. \u0415\u0441\u043b\u0438 \u0434\u043e\u043c\u0435\u043d\u043d\u0430\u044f \u043c\u043e\u0434\u0435\u043b\u044c \u0438 \u0435\u0451 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438 \u044f\u0441\u043d\u044b, HTTP\u2011\u0441\u043b\u043e\u0439 \u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0441\u044f \u043f\u0440\u043e\u0441\u0442\u044b\u043c \u0438 \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u0443\u0435\u043c\u044b\u043c.<\/p>\n<figure class=\"\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/4h\/e-\/yb\/4he-ybcbejo-ds_phftgrltbv4w.png\" sizes=\"(max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/webt\/4h\/e-\/yb\/4he-ybcbejo-ds_phftgrltbv4w.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/webt\/4h\/e-\/yb\/4he-ybcbejo-ds_phftgrltbv4w.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/figure>\n<h4>\u041c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u044b\u0439 \u0441\u043b\u043e\u0432\u0430\u0440\u044c \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0439<\/h4>\n<p>\u0427\u0442\u043e\u0431\u044b \u0434\u043e\u0441\u0442\u0438\u0447\u044c \u043e\u0436\u0438\u0434\u0430\u0435\u043c\u043e\u0433\u043e \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430, \u043e\u043f\u0438\u0440\u0430\u0435\u043c\u0441\u044f \u043d\u0430 \u043f\u044f\u0442\u044c \u0431\u0430\u0437\u043e\u0432\u044b\u0445 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0439 \u0432 \u0431\u0438\u0437\u043d\u0435\u0441\u2011\u043b\u043e\u0433\u0438\u043a\u0435:<\/p>\n<ul>\n<li>\n<p><strong>GetResource<\/strong> \u2014 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u044b\u0439 \u0440\u0435\u0441\u0443\u0440\u0441.<\/p>\n<\/li>\n<li>\n<p><strong>ListResources<\/strong> \u2014 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u043a\u043e\u043b\u043b\u0435\u043a\u0446\u0438\u044e \u0440\u0435\u0441\u0443\u0440\u0441\u043e\u0432 (\u0441 \u0444\u0438\u043b\u044c\u0442\u0440\u0430\u043c\u0438\/\u0441\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u043a\u043e\u0439\/\u043f\u0430\u0433\u0438\u043d\u0430\u0446\u0438\u0435\u0439).<\/p>\n<\/li>\n<li>\n<p><strong>CreateResource<\/strong> \u2014 \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0440\u0435\u0441\u0443\u0440\u0441.<\/p>\n<\/li>\n<li>\n<p><strong>UpdateResource<\/strong> \u2014 \u0438\u0437\u043c\u0435\u043d\u0438\u0442\u044c \u0440\u0435\u0441\u0443\u0440\u0441 (\u0447\u0430\u0441\u0442\u0438\u0447\u043d\u043e \u0438\u043b\u0438 \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e).<\/p>\n<\/li>\n<li>\n<p><strong>DeleteResource<\/strong> \u2014 \u0443\u0434\u0430\u043b\u0438\u0442\u044c \u0440\u0435\u0441\u0443\u0440\u0441.<\/p>\n<\/li>\n<\/ul>\n<p>\u0427\u0435\u0433\u043e <strong>\u043d\u0435<\/strong> \u0434\u043e\u043b\u0436\u043d\u043e \u0431\u044b\u0442\u044c: <code>GetByOrganization<\/code>, <code>GetByUser<\/code>, <code>Insert<\/code>, <code>Upsert<\/code>, <code>DeleteAll<\/code>, <code>FindOrCreate<\/code>, <code>ArchiveOldResources<\/code> \u0438 \u0442. \u0434.<br \/> \u0412\u0441\u044f \u0432\u0430\u0440\u0438\u0430\u0442\u0438\u0432\u043d\u043e\u0441\u0442\u044c \u2014 <strong>\u0432 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430\u0445<\/strong>, \u0430 \u043d\u0435 \u0432 \u043d\u043e\u0432\u044b\u0445 \u0438\u043c\u0435\u043d\u0430\u0445 \u043c\u0435\u0442\u043e\u0434\u043e\u0432.<\/p>\n<ul>\n<li>\n<p>\u0415\u0434\u0438\u043d\u043e\u043e\u0431\u0440\u0430\u0437\u043d\u044b\u0439 \u043d\u0435\u0439\u043c\u0438\u043d\u0433 \u0434\u0435\u043b\u0430\u0435\u0442 \u043d\u0430\u0432\u0438\u0433\u0430\u0446\u0438\u044e \u0432 \u043a\u043e\u0434\u0435 \u043e\u0447\u0435\u0432\u0438\u0434\u043d\u043e\u0439.<\/p>\n<\/li>\n<li>\n<p>\u0424\u0438\u043b\u044c\u0442\u0440 \u0432\u043c\u0435\u0441\u0442\u043e <code>GetBy*<\/code> \u0443\u0431\u0438\u0440\u0430\u0435\u0442 \u0434\u0443\u0431\u043b\u0438 \u0438 \u0432\u0437\u0440\u044b\u0432 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0430 \u044d\u043d\u0434\u043f\u043e\u0438\u043d\u0442\u043e\u0432.<\/p>\n<\/li>\n<\/ul>\n<hr\/>\n<h3>\u0427\u0430\u0441\u0442\u044c 2. \u0421\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0435 \u043c\u0435\u0442\u043e\u0434\u044b API<\/h3>\n<p>\u042d\u0442\u043e \u0442\u0435 \u043c\u0435\u0442\u043e\u0434\u044b, \u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0441\u0442\u043e\u0438\u0442 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u0432 \u043f\u0435\u0440\u0432\u0443\u044e \u043e\u0447\u0435\u0440\u0435\u0434\u044c.<\/p>\n<figure class=\"\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/dt\/ge\/xw\/dtgexwzmchm5bgvytcmo2cuipie.png\" sizes=\"(max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/webt\/dt\/ge\/xw\/dtgexwzmchm5bgvytcmo2cuipie.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/webt\/dt\/ge\/xw\/dtgexwzmchm5bgvytcmo2cuipie.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/figure>\n<h4>\u0420\u0435\u0441\u0443\u0440\u0441: Resource<\/h4>\n<p>\u041c\u043e\u0434\u0435\u043b\u044c \u0434\u043b\u044f \u043f\u0440\u0438\u043c\u0435\u0440\u0430:<\/p>\n<pre><code class=\"json\">{  \"id\": \"guid\",  \"title\": \"string\",  \"status\": \"active|archived|draft\"}<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:87px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<h3>1) \u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435<\/h3>\n<p><strong>POST <\/strong><code><strong>\/v1\/resources<\/strong><\/code><br \/> \u0422\u0435\u043b\u043e \u0437\u0430\u043f\u0440\u043e\u0441\u0430:<\/p>\n<pre><code class=\"json\">{ \"title\": \"New resource\", \"status\": \"draft\" }<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<p>\u041e\u0442\u0432\u0435\u0442 <strong>201<\/strong> + \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u044b\u0439 \u0440\u0435\u0441\u0443\u0440\u0441:<\/p>\n<pre><code class=\"json\">{ \"id\": \"guid\", \"title\": \"New resource\", \"status\": \"draft\" }<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<h3>2) \u041f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u0435 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e\u0433\u043e \u0440\u0435\u0441\u0443\u0440\u0441\u0430<\/h3>\n<p><strong>GET <\/strong><code><strong>\/v1\/resources\/{id}<\/strong><\/code><br \/> \u041e\u0442\u0432\u0435\u0442 <strong>200<\/strong> + \u0440\u0435\u0441\u0443\u0440\u0441; <strong>404<\/strong> \u2014 \u043d\u0435 \u043d\u0430\u0439\u0434\u0435\u043d.<\/p>\n<h3>3) \u041f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u0435 \u0432\u0441\u0435\u0445 \u0440\u0435\u0441\u0443\u0440\u0441\u043e\u0432<\/h3>\n<p><strong>GET <\/strong><code><strong>\/v1\/resources<\/strong><\/code><br \/> \u041e\u0442\u0432\u0435\u0442 <strong>200<\/strong>:<\/p>\n<pre><code class=\"json\">{  \"resources\": [    { \"id\": \"guid\", \"title\": \"New resource\", \"status\": \"draft\" }  ]}<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<p>\u0412\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u043c <strong>\u043e\u0431\u044a\u0435\u043a\u0442, \u0430 \u043d\u0435 \u00ab\u0433\u043e\u043b\u044b\u0439 \u043c\u0430\u0441\u0441\u0438\u0432\u00bb<\/strong> \u2014 \u0442\u0430\u043a \u043f\u0440\u043e\u0449\u0435 \u0440\u0430\u0441\u0448\u0438\u0440\u044f\u0442\u044c \u043a\u043e\u043d\u0442\u0440\u0430\u043a\u0442 (\u043c\u0435\u0442\u0430\u0434\u0430\u043d\u043d\u044b\u0435, \u043f\u0430\u0433\u0438\u043d\u0430\u0446\u0438\u044f \u0438 \u0442. \u0434.).<br \/> \u041f\u0440\u0438 \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0438\u0438 \u0440\u0435\u0441\u0443\u0440\u0441\u043e\u0432 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u043c <strong>200<\/strong> \u0438 \u043f\u0443\u0441\u0442\u0443\u044e \u043a\u043e\u043b\u043b\u0435\u043a\u0446\u0438\u044e.<\/p>\n<h3>4) \u041f\u043e\u043b\u043d\u0430\u044f \u0437\u0430\u043c\u0435\u043d\u0430 (replace)<\/h3>\n<p><strong>PUT <\/strong><code><strong>\/v1\/resources\/{id}<\/strong><\/code><br \/> \u0422\u0435\u043b\u043e \u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u2014 \u043f\u043e\u043b\u043d\u043e\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0440\u0435\u0441\u0443\u0440\u0441\u0430 (\u0432\u0441\u0451, \u0447\u0442\u043e \u0434\u043e\u043b\u0436\u043d\u043e \u043e\u0441\u0442\u0430\u0442\u044c\u0441\u044f \u0432 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0438 \u043f\u043e\u0441\u043b\u0435 \u0437\u0430\u043c\u0435\u043d\u044b):<\/p>\n<pre><code class=\"json\">{ \"title\": \"Updated\", \"status\": \"active\" }<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<p>\u041a\u043e\u0434\u044b \u043e\u0442\u0432\u0435\u0442\u0430:<\/p>\n<ul>\n<li>\n<p><strong>201<\/strong> \u2014 \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u044b\u0439 \u0440\u0435\u0441\u0443\u0440\u0441 (\u0435\u0441\u043b\u0438 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u043c \u043a\u043b\u0438\u0435\u043d\u0442\u0443 \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u0441\u043e \u0441\u0432\u043e\u0438\u043c \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440\u043e\u043c; \u0438\u043d\u0430\u0447\u0435 \u2014 <strong>404<\/strong>).<\/p>\n<\/li>\n<li>\n<p><strong>200<\/strong> \u2014 \u0430\u043a\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0439 \u0440\u0435\u0441\u0443\u0440\u0441 (\u0435\u0441\u043b\u0438 \u043e\u043d \u0431\u044b\u043b \u0438 \u043c\u044b \u0435\u0433\u043e \u0437\u0430\u043c\u0435\u043d\u0438\u043b\u0438).<\/p>\n<\/li>\n<\/ul>\n<p>\u0415\u0441\u043b\u0438 \u043f\u043e\u043b\u0435 \u043d\u0435 \u043f\u0440\u0438\u0441\u043b\u0430\u043d\u043e, \u043e\u043d\u043e \u0434\u043e\u043b\u0436\u043d\u043e \u043f\u0440\u0438\u043d\u044f\u0442\u044c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e.<\/p>\n<h3>5) \u0427\u0430\u0441\u0442\u0438\u0447\u043d\u043e\u0435 \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0435<\/h3>\n<p><strong>PATCH <\/strong><code><strong>\/v1\/resources\/{id}<\/strong><\/code><br \/> \u0422\u0435\u043b\u043e \u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u2014 \u0442\u043e\u043b\u044c\u043a\u043e \u0438\u0437\u043c\u0435\u043d\u044f\u0435\u043c\u044b\u0435 \u043f\u043e\u043b\u044f:<\/p>\n<pre><code class=\"json\">{ \"status\": \"archived\" }<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<p>\u041e\u0442\u0432\u0435\u0442 <strong>200<\/strong> \u2014 \u0430\u043a\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0439 \u0440\u0435\u0441\u0443\u0440\u0441; <strong>404<\/strong> \u2014 \u043d\u0435 \u043d\u0430\u0439\u0434\u0435\u043d.<\/p>\n<h3>6) \u0423\u0434\u0430\u043b\u0435\u043d\u0438\u0435<\/h3>\n<p><strong>DELETE <\/strong><code><strong>\/v1\/resources\/{id}<\/strong><\/code><br \/> \u041e\u0442\u0432\u0435\u0442 <strong>204<\/strong> (\u0431\u0435\u0437 \u0442\u0435\u043b\u0430).<\/p>\n<h4>\u0420\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0430\u0446\u0438\u0438 \u043f\u043e \u0440\u0430\u0437\u0434\u0435\u043b\u0443<\/h4>\n<ul>\n<li>\n<p>\u0412\u0441\u0435\u0433\u0434\u0430 <strong>\u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0435<\/strong> \u0447\u0438\u0441\u043b\u043e \u0441\u0443\u0449\u043d\u043e\u0441\u0442\u0438 \u0432 \u043f\u0443\u0442\u044f\u0445: <code>\/resources<\/code>.<\/p>\n<\/li>\n<li>\n<p>\u0414\u043b\u044f \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0445 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0439 \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440 \u2014 <strong>\u0442\u043e\u043b\u044c\u043a\u043e \u0432 \u043f\u0443\u0442\u0438<\/strong>: <code>\/resources\/{id}<\/code>.<\/p>\n<\/li>\n<li>\n<p>\u0412\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u043c <strong>\u043f\u043e\u043b\u043d\u044b\u0439 \u0440\u0435\u0441\u0443\u0440\u0441<\/strong> \u043d\u0430 POST\/PUT\/PATCH \u2014 \u0442\u0430\u043a \u043f\u0440\u043e\u0449\u0435 \u0434\u0435\u0431\u0430\u0436\u0438\u0442\u044c, \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0438 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0442\u044c.<\/p>\n<\/li>\n<\/ul>\n<hr\/>\n<h3>\u0427\u0430\u0441\u0442\u044c 3. \u0420\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u0435 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0445 \u043c\u0435\u0442\u043e\u0434\u043e\u0432<\/h3>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u0443\u0441\u0438\u043b\u0438\u043c \u0431\u0430\u0437\u043e\u0432\u044b\u0435 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438 \u2014 <strong>\u0431\u0435\u0437 \u0440\u0430\u0437\u043c\u043d\u043e\u0436\u0435\u043d\u0438\u044f \u044d\u043d\u0434\u043f\u043e\u0438\u043d\u0442\u043e\u0432 \u0438 \u0432\u0435\u0440\u0441\u0438\u0439<\/strong>.<\/p>\n<figure class=\"\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/4n\/f5\/9g\/4nf59g16ww5ozbt55liryt345s0.png\" sizes=\"(max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/webt\/4n\/f5\/9g\/4nf59g16ww5ozbt55liryt345s0.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/webt\/4n\/f5\/9g\/4nf59g16ww5ozbt55liryt345s0.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/figure>\n<h4>\u041f\u0430\u0433\u0438\u043d\u0430\u0446\u0438\u044f<\/h4>\n<p>\u0421\u0430\u043c\u0430\u044f \u043f\u0440\u043e\u0441\u0442\u0430\u044f \u0438 \u0440\u0430\u0441\u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0451\u043d\u043d\u0430\u044f \u2014 <strong>offset\u2011based<\/strong>. \u041f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b: <code>skip<\/code>, <code>take<\/code> (\u0441\u0438\u043d\u043e\u043d\u0438\u043c\u044b: <code>offset<\/code>, <code>limit<\/code>).<\/p>\n<p><strong>GET<\/strong> <code>\/v1\/resources?skip=20&amp;take=10<\/code> \u2014 \u043f\u0440\u043e\u043f\u0443\u0441\u043a\u0430\u0435\u043c 20, \u0431\u0435\u0440\u0451\u043c 10.<br \/> \u041e\u0442\u0432\u0435\u0442:<\/p>\n<pre><code class=\"json\">{  \"resources\": [    { \"id\": \"guid\", \"title\": \"...\" }  ],  \"total\": 350}<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<ul>\n<li>\n<p><code>total<\/code> \u0432 \u043e\u0442\u0432\u0435\u0442\u0435 \u043f\u043e\u043c\u043e\u0433\u0430\u0435\u0442 \u043a\u043b\u0438\u0435\u043d\u0442\u0443 \u043f\u043e\u043d\u044f\u0442\u044c, \u0435\u0441\u0442\u044c \u043b\u0438 \u0441\u043c\u044b\u0441\u043b \u0442\u044f\u043d\u0443\u0442\u044c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b.<\/p>\n<\/li>\n<li>\n<p>\u0421\u043e\u0440\u0442\u0438\u0440\u0443\u0435\u043c \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0445\u043e\u0442\u044f \u0431\u044b \u043f\u043e \u0434\u0430\u0442\u0435 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u044f, \u0435\u0441\u043b\u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u043d\u0435 \u0443\u043a\u0430\u0437\u0430\u043b \u0438\u043d\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0442\u044c <strong>\u0434\u0435\u0442\u0435\u0440\u043c\u0438\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0435<\/strong> \u0434\u0430\u043d\u043d\u044b\u0435.<\/p>\n<\/li>\n<li>\n<p>\u041e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u0444\u0438\u043a\u0441\u0438\u0440\u0443\u0435\u043c <strong>\u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u044b\u0439 <\/strong><code><strong>take<\/strong><\/code>.<\/p>\n<\/li>\n<li>\n<p>\u0415\u0441\u043b\u0438 \u0432\u044b\u0431\u043e\u0440\u043a\u0430 \u043d\u0435\u0441\u0442\u0430\u0431\u0438\u043b\u044c\u043d\u0430, \u043e\u0433\u0440\u043e\u043c\u043d\u0430, \u0441 \u0442\u044f\u0436\u0451\u043b\u043e\u0439 \u0441\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u043a\u043e\u0439 \u2014 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c <strong>cursor\u2011based<\/strong> \u043f\u0430\u0433\u0438\u043d\u0430\u0446\u0438\u044e.<\/p>\n<\/li>\n<\/ul>\n<p>\u0421\u043c. \u0442\u0430\u043a\u0436\u0435:<\/p>\n<ul>\n<li>\n<p>Microsoft REST API Guidelines \u2014 collections: <a href=\"https:\/\/github.com\/microsoft\/api-guidelines\/blob\/vNext\/azure\/Guidelines.md#collections\" rel=\"noopener noreferrer nofollow\">https:\/\/github.com\/microsoft\/api-guidelines\/blob\/vNext\/azure\/Guidelines.md#collections<\/a><\/p>\n<\/li>\n<li>\n<p>Google API Design Guide \u2014 Standard methods: List: <a href=\"https:\/\/google.aip.dev\/132\" rel=\"noopener noreferrer nofollow\">https:\/\/google.aip.dev\/132<\/a><\/p>\n<\/li>\n<\/ul>\n<h4>\u0424\u0438\u043b\u044c\u0442\u0440\u0430\u0446\u0438\u044f<\/h4>\n<p>\u0427\u0442\u043e\u0431\u044b \u043d\u0435 \u0443\u0445\u043e\u0434\u0438\u0442\u044c \u0432 \u043f\u0430\u0440\u0441\u0438\u043d\u0433, \u0431\u0435\u0440\u0451\u043c \u043f\u0440\u044f\u043c\u043e\u0439 \u043f\u0443\u0442\u044c: <strong>\u044f\u0432\u043d\u044b\u0435 query\u2011\u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b<\/strong> \u043d\u0430 \u043a\u0430\u0436\u0434\u044b\u0439 \u0444\u0438\u043b\u044c\u0442\u0440.<\/p>\n<p>\u0421\u0443\u0444\u0444\u0438\u043a\u0441\u044b \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u043e\u0432:<\/p>\n<ul>\n<li>\n<p><code>_eq<\/code> (\u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e, \u043c\u043e\u0436\u043d\u043e \u043e\u043f\u0443\u0441\u0442\u0438\u0442\u044c), <code>_ne<\/code>, <code>_lt<\/code>, <code>_gt<\/code>, <code>_lte<\/code>, <code>_gte<\/code><\/p>\n<\/li>\n<li>\n<p><code>_in<\/code>, <code>_nin<\/code> \u2014 \u0434\u043b\u044f \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432<\/p>\n<\/li>\n<\/ul>\n<p>\u0414\u043b\u044f \u0432\u043b\u043e\u0436\u0435\u043d\u043d\u044b\u0445 \u043f\u043e\u043b\u0435\u0439 \u2014 \u00ab\u043f\u043b\u043e\u0441\u043a\u0438\u0435\u00bb \u0438\u043c\u0435\u043d\u0430: <code>meta_created_at_gte=...<\/code><\/p>\n<p>\u041f\u0440\u0438\u043c\u0435\u0440\u044b:<\/p>\n<pre><code>GET \/v1\/resources?status_in=active,draftGET \/v1\/resources?title_eq=DesignGET \/v1\/resources?meta_created_at_gte=2023-01-01&amp;meta_created_at_lte=2023-06-01<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<ul>\n<li>\n<p>\u0414\u043b\u044f \u0444\u0438\u043b\u044c\u0442\u0440\u0430\u0446\u0438\u0438 \u043f\u043e \u0432\u043b\u043e\u0436\u0435\u043d\u043d\u044b\u043c \u043c\u0430\u0441\u0441\u0438\u0432\u0430\u043c \u0441\u043b\u043e\u0436\u043d\u044b\u0445 \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432 (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, <code>resource.users=[{...}]<\/code>) \u043b\u0443\u0447\u0448\u0435 <strong>\u043d\u0435<\/strong> \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c query\u2011\u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b, \u0430 \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u044b\u0432\u0430\u0442\u044c <strong>\u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0439 \u043c\u0435\u0442\u043e\u0434 \u043f\u043e\u0438\u0441\u043a\u0430 \u0441 POST\u2011\u0442\u0435\u043b\u043e\u043c<\/strong>.<\/p>\n<\/li>\n<li>\n<p>\u041d\u0435\u0438\u0437\u0432\u0435\u0441\u0442\u043d\u044b\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u2014 \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e <strong>\u0438\u0433\u043d\u043e\u0440\u0438\u0440\u0443\u0435\u043c<\/strong>.<\/p>\n<\/li>\n<li>\n<p>\u0414\u043b\u044f \u043f\u043e\u043b\u043d\u043e\u0442\u0435\u043a\u0441\u0442\u043e\u0432\u043e\u0433\u043e \u043f\u043e\u0438\u0441\u043a\u0430 \u043b\u0443\u0447\u0448\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 <code>search<\/code>.<\/p>\n<\/li>\n<\/ul>\n<p>\u0421 \u043f\u0440\u043e\u0434\u0432\u0438\u043d\u0443\u0442\u043e\u0439 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0435\u0439 \u0447\u0435\u0440\u0435\u0437 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 <code>filter<\/code> \u043c\u043e\u0436\u043d\u043e \u043e\u0437\u043d\u0430\u043a\u043e\u043c\u0438\u0442\u044c\u0441\u044f \u043f\u043e \u0441\u0441\u044b\u043b\u043a\u0430\u043c:<\/p>\n<ul>\n<li>\n<p>Microsoft REST API Guidelines \u2014 filter: <a href=\"https:\/\/github.com\/microsoft\/api-guidelines\/blob\/vNext\/azure\/Guidelines.md#filter\" rel=\"noopener noreferrer nofollow\">https:\/\/github.com\/microsoft\/api-guidelines\/blob\/vNext\/azure\/Guidelines.md#filter<\/a><\/p>\n<\/li>\n<li>\n<p>Google API Design Guide \u2014 Filtering: <a href=\"https:\/\/google.aip.dev\/160\" rel=\"noopener noreferrer nofollow\">https:\/\/google.aip.dev\/160<\/a><\/p>\n<\/li>\n<\/ul>\n<h4>\u0421\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u043a\u0430<\/h4>\n<p>\u041f\u0440\u043e\u0441\u0442\u043e\u0439 \u0432\u0430\u0440\u0438\u0430\u043d\u0442 \u2014 \u043d\u0435 \u043f\u0430\u0440\u0441\u0438\u0442\u044c \u0435\u0434\u0438\u043d\u044b\u0439 <code>orderby<\/code>, \u0430 \u0434\u0435\u0440\u0436\u0430\u0442\u044c \u0441\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u043a\u0438 \u0432 <strong>\u044f\u0432\u043d\u044b\u0445 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445<\/strong>.<br \/> <code>created_at_sort=asc|desc<\/code>, <code>title_sort=asc|desc<\/code>. \u041e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0438\u0435 \u2014 \u043f\u043e\u043b\u0435 \u043d\u0435 \u0443\u0447\u0430\u0441\u0442\u0432\u0443\u0435\u0442.<\/p>\n<p>\u041f\u0440\u0438\u043c\u0435\u0440\u044b:<\/p>\n<pre><code>GET \/v1\/resources?created_at_sort=ascGET \/v1\/resources?created_at_sort=asc&amp;title_sort=desc<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<p>\u0421\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u043a\u0430 \u0447\u0435\u0440\u0435\u0437 \u043e\u0434\u0438\u043d query\u2011\u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0430 \u043f\u043e \u0441\u0441\u044b\u043b\u043a\u0430\u043c:<\/p>\n<ul>\n<li>\n<p>Microsoft REST API Guidelines \u2014 orderby: <a href=\"https:\/\/github.com\/microsoft\/api-guidelines\/blob\/vNext\/azure\/Guidelines.md#orderby\" rel=\"noopener noreferrer nofollow\">https:\/\/github.com\/microsoft\/api-guidelines\/blob\/vNext\/azure\/Guidelines.md#orderby<\/a><\/p>\n<\/li>\n<li>\n<p>Google API Design Guide \u2014 List: <a href=\"https:\/\/google.aip.dev\/132\" rel=\"noopener noreferrer nofollow\">https:\/\/google.aip.dev\/132<\/a><\/p>\n<\/li>\n<\/ul>\n<blockquote>\n<p>\u0418\u041c\u0425\u041e: \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 <code>orderby<\/code>\/<code>filter<\/code> \u2014 \u044d\u0442\u043e \u043f\u0430\u0440\u0441\u0438\u043d\u0433 \u0438 \u0441\u0432\u044f\u0437\u043a\u0430 \u0441 \u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u0435\u0439 \u043c\u043e\u0434\u0435\u043b\u044c\u044e, \u0447\u0442\u043e \u0434\u0435\u043b\u0430\u0442\u044c \u0432 \u043a\u0430\u0436\u0434\u043e\u043c \u043c\u0438\u043a\u0440\u043e\u0441\u0435\u0440\u0432\u0438\u0441\u0435 \u043d\u0430\u043a\u043b\u0430\u0434\u043d\u043e; \u044f\u0432\u043d\u044b\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u0434\u0435\u043b\u0430\u044e\u0442 \u043a\u043e\u043d\u0442\u0440\u0430\u043a\u0442 \u043e\u0447\u0435\u0432\u0438\u0434\u043d\u044b\u043c \u0438 \u0443\u043f\u0440\u043e\u0449\u0430\u044e\u0442 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044e.<\/p>\n<\/blockquote>\n<h4>\u041c\u044f\u0433\u043a\u043e\u0435 \u0443\u0434\u0430\u043b\u0435\u043d\u0438\u0435 (soft delete)<\/h4>\n<p>\u041e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u043c \u0435\u0434\u0438\u043d\u0443\u044e \u0441\u0445\u0435\u043c\u0443: \u0441\u0442\u0430\u0442\u0443\u0441 \u0443\u0434\u0430\u043b\u0451\u043d\u043d\u043e\u0441\u0442\u0438 \u0445\u0440\u0430\u043d\u0438\u043c \u0432 \u043a\u043e\u043b\u043e\u043d\u043a\u0435, \u0430 \u043d\u0435 \u0432 \u043d\u043e\u0432\u044b\u0445 \u0442\u0430\u0431\u043b\u0438\u0446\u0430\u0445.<br \/> \u041c\u043e\u0434\u0435\u043b\u044c: \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u043f\u043e\u043b\u0435 <code>deleted_at: string|null<\/code>.<\/p>\n<ul>\n<li>\n<p><strong>\u0423\u0434\u0430\u043b\u0438\u0442\u044c (\u0432 \u0430\u0440\u0445\u0438\u0432)<\/strong> \u2014 <code>DELETE \/v1\/resources\/{id}<\/code> \u2192 <strong>204<\/strong> (\u043f\u0440\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u043c <code>deleted_at<\/code>).<\/p>\n<\/li>\n<li>\n<p><strong>\u0412\u043e\u0441\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c<\/strong> \u2014 <code>PATCH \/v1\/resources\/{id}\/restore<\/code> \u2192 <strong>200<\/strong> (\u0441\u0442\u0430\u0432\u0438\u043c <code>deleted_at = null<\/code> \u0438 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u043c \u0440\u0435\u0441\u0443\u0440\u0441).<\/p>\n<\/li>\n<li>\n<p><strong>\u0421\u043f\u0438\u0441\u043e\u043a \u0441 \u0443\u0434\u0430\u043b\u0451\u043d\u043d\u044b\u043c\u0438<\/strong> \u2014 <code>GET \/v1\/resources?include_deleted=true<\/code>.<\/p>\n<\/li>\n<\/ul>\n<p>\u041e\u0442\u0432\u0435\u0442 (\u043f\u0440\u0438\u043c\u0435\u0440):<\/p>\n<pre><code class=\"json\">{  \"resources\": [    { \"id\": \"guid\", \"title\": \"...\", \"deleted_at\": null },    { \"id\": \"guid\", \"title\": \"...\", \"deleted_at\": \"2024-11-12T10:36:15Z\" }  ],  \"total\": 100}<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<ul>\n<li>\n<p><strong>\u041f\u043e\u043b\u043d\u043e\u0435 \u0443\u0434\u0430\u043b\u0435\u043d\u0438\u0435 (\u043f\u043e\u0434\u0442\u0432\u0435\u0440\u0436\u0434\u0430\u0435\u043c \u044f\u0432\u043d\u043e)<\/strong> \u2014 <code>DELETE \/v1\/resources\/{id}?force=true<\/code> \u2192 <strong>204<\/strong>. \u041f\u043e\u043b\u0435\u0437\u043d\u043e \u0434\u043b\u044f \u00ab\u0443\u0434\u0430\u043b\u0438\u0442\u044c \u0438\u0437 \u0430\u0440\u0445\u0438\u0432\u0430\/\u043d\u0430\u0432\u0441\u0435\u0433\u0434\u0430\u00bb.<\/p>\n<\/li>\n<\/ul>\n<h4>\u0427\u0430\u0441\u0442\u0438\u0447\u043d\u043e\u0435 \u0438\u0437\u0432\u043b\u0435\u0447\u0435\u043d\u0438\u0435 \u043f\u043e\u043b\u0435\u0439 (fields)<\/h4>\n<p>\u041f\u0440\u043e\u0441\u0442\u043e\u0433\u043e \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u043d\u0435\u0442: \u043d\u0443\u0436\u043d\u0430 \u0440\u0430\u0437\u0431\u043e\u0440\u043a\u0430 \u0441\u0442\u0440\u043e\u043a\u0438 \u0438 \u0434\u0438\u043d\u0430\u043c\u0438\u0447\u0435\u0441\u043a\u0430\u044f \u0441\u0431\u043e\u0440\u043a\u0430 \u043e\u0442\u0432\u0435\u0442\u0430. \u0415\u0441\u043b\u0438 \u044d\u0442\u043e \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043d\u0443\u0436\u043d\u043e \u2014 \u0432\u044b \u0434\u0435\u043b\u0430\u0435\u0442\u0435 \u0447\u0442\u043e-\u0442\u043e \u0441\u043b\u043e\u0436\u043d\u0435\u0435 CRUD \u0438 \u0441\u0442\u043e\u0438\u0442 \u043e\u043f\u0438\u0440\u0430\u0442\u044c\u0441\u044f \u043d\u0430 \u0433\u0430\u0439\u0434\u043b\u0430\u0439\u043d\u044b:<\/p>\n<ul>\n<li>\n<p>Microsoft REST API Guidelines \u2014 select query: <a href=\"https:\/\/github.com\/microsoft\/api-guidelines\/blob\/vNext\/azure\/Guidelines.md#query-options\" rel=\"noopener noreferrer nofollow\">https:\/\/github.com\/microsoft\/api-guidelines\/blob\/vNext\/azure\/Guidelines.md#query-options<\/a><\/p>\n<\/li>\n<li>\n<p>Google API Design Guide \u2014 Partial responses: <a href=\"https:\/\/google.aip.dev\/157#field-masks-parameter\" rel=\"noopener noreferrer nofollow\">https:\/\/google.aip.dev\/157#field-masks-parameter<\/a><\/p>\n<\/li>\n<\/ul>\n<p>\u041f\u0440\u0438\u043c\u0435\u0440\u044b:<\/p>\n<pre><code>GET \/v1\/resources?fields=id,titleGET \/v1\/resources\/{id}?fields=id,status<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<p>\u041e\u0442\u0432\u0435\u0442 (\u0434\u043b\u044f \u0441\u043f\u0438\u0441\u043a\u0430):<\/p>\n<pre><code class=\"json\">{  \"resources\": [    { \"id\": \"guid\", \"title\": \"...\" }  ],  \"total\": 123}<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<h4>\u041f\u0440\u0438\u043c\u0435\u0440\u044b \u00ab\u0432\u0441\u0451 \u0432\u043c\u0435\u0441\u0442\u0435\u00bb<\/h4>\n<p><strong>\u0421\u043f\u0438\u0441\u043e\u043a \u0441 \u043f\u0430\u0433\u0438\u043d\u0430\u0446\u0438\u0435\u0439, \u0444\u0438\u043b\u044c\u0442\u0440\u0430\u043c\u0438, \u0441\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u043a\u043e\u0439 \u0438 \u0443\u0441\u0435\u0447\u0451\u043d\u043d\u044b\u043c\u0438 \u043f\u043e\u043b\u044f\u043c\u0438<\/strong><\/p>\n<pre><code>GET \/v1\/resources?skip=10&amp;take=5&amp;status_in=active,draft&amp;created_at_sort=desc&amp;fields=id,title&amp;include_deleted=false<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<pre><code class=\"json\">{  \"resources\": [    { \"id\": \"guid1\", \"title\": \"Design Guide\" },    { \"id\": \"guid2\", \"title\": \"API Patterns\" }  ],  \"total\": 100}<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<p><strong>\u041c\u044f\u0433\u043a\u043e\u0435 \u0443\u0434\u0430\u043b\u0435\u043d\u0438\u0435 \/ \u0432\u043e\u0441\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0435 \/ \u0444\u043e\u0440\u0441\u2011\u0443\u0434\u0430\u043b\u0435\u043d\u0438\u0435<\/strong><\/p>\n<pre><code>DELETE \/v1\/resources\/{id}           \u2192 204PATCH  \/v1\/resources\/{id}\/restore   \u2192 200 (\u0442\u0435\u043b\u043e)DELETE \/v1\/resources\/{id}?force=true \u2192 204<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<hr\/>\n<h3>\u0427\u0430\u0441\u0442\u044c 4. \u041f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0435 \u043c\u0435\u0442\u043e\u0434\u044b \u0438 \u043f\u0430\u043a\u0435\u0442\u043d\u044b\u0435 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438<\/h3>\n<p>\u0421\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0445 <code>GET\/POST\/PUT\/PATCH\/DELETE<\/code> \u0445\u0432\u0430\u0442\u0430\u0435\u0442 \u043d\u0430 ~80% CRUD. \u041e\u0441\u0442\u0430\u0432\u0448\u0438\u0435\u0441\u044f ~20% \u2014 <strong>\u0434\u043e\u043c\u0435\u043d\u043d\u044b\u0435 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f<\/strong>, \u043a\u043e\u0442\u043e\u0440\u044b\u0435:<\/p>\n<ul>\n<li>\n<p>\u043c\u0435\u043d\u044f\u044e\u0442 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u0440\u0435\u0441\u0443\u0440\u0441\u0430 \u043d\u0435 \u043a\u0430\u043a \u00ab\u043f\u043e\u043b\u043d\u0430\u044f\/\u0447\u0430\u0441\u0442\u0438\u0447\u043d\u0430\u044f \u0437\u0430\u043c\u0435\u043d\u0430\u00bb (\u043f\u0440\u0438\u043c\u0435\u0440: \u00ab\u043f\u043e\u0434\u0442\u0432\u0435\u0440\u0434\u0438\u0442\u044c\u00bb, \u00ab\u043e\u0442\u043c\u0435\u043d\u0438\u0442\u044c\u00bb, \u00ab\u043f\u0440\u0438\u043c\u0435\u043d\u0438\u0442\u044c \u0441\u043a\u0438\u0434\u043a\u0443\u00bb);<\/p>\n<\/li>\n<li>\n<p>\u0437\u0430\u043f\u0443\u0441\u043a\u0430\u044e\u0442 \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u0435 (\u043f\u0440\u0438\u043c\u0435\u0440: \u00ab\u043f\u043e\u0441\u0447\u0438\u0442\u0430\u0442\u044c \u0442\u0430\u0440\u0438\u0444\u00bb);<\/p>\n<\/li>\n<li>\n<p>\u043d\u0435 \u0441\u043e\u0437\u0434\u0430\u044e\u0442 \u043d\u043e\u0432\u044b\u0439 \u0440\u0435\u0441\u0443\u0440\u0441 \u043d\u0430\u043f\u0440\u044f\u043c\u0443\u044e, \u043d\u043e \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u044f\u0442 \u044d\u0444\u0444\u0435\u043a\u0442 (\u043f\u0440\u0438\u043c\u0435\u0440: \u00ab\u043f\u0440\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u0440\u0435\u0441\u0443\u0440\u0441\u00bb).<\/p>\n<\/li>\n<\/ul>\n<figure class=\"\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/lo\/l0\/_7\/lol0_7yhrmeotgfooi5thdizclk.png\" sizes=\"(max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/webt\/lo\/l0\/_7\/lol0_7yhrmeotgfooi5thdizclk.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/webt\/lo\/l0\/_7\/lol0_7yhrmeotgfooi5thdizclk.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/figure>\n<h4>\u041f\u0440\u0430\u0432\u0438\u043b\u0430<\/h4>\n<ul>\n<li>\n<p><strong>\u0413\u043b\u0430\u0433\u043e\u043b \u043f\u043e\u0441\u043b\u0435 <\/strong><code><strong>{id}<\/strong><\/code>: <code>POST \/v1\/resources\/{id}\/apply-discount<\/code>.<\/p>\n<\/li>\n<li>\n<p>\u041c\u0435\u0442\u043e\u0434 \u2014 \u0447\u0430\u0449\u0435 <strong>POST<\/strong> (\u0435\u0441\u0442\u044c \u043f\u043e\u0431\u043e\u0447\u043d\u044b\u0439 \u044d\u0444\u0444\u0435\u043a\u0442).<\/p>\n<\/li>\n<li>\n<p><strong>\u0418\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f<\/strong>: \u0432\u044b\u0447\u0438\u0441\u043b\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u043c\u0435\u0442\u043e\u0434\u044b \u0438 \u0441\u0447\u0451\u0442\u0447\u0438\u043a\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043d\u0435 \u043c\u0435\u043d\u044f\u044e\u0442 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u2192 <strong>GET<\/strong>.<\/p>\n<\/li>\n<\/ul>\n<h4>\u041f\u0440\u0438\u043c\u0435\u0440\u044b \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0445 \u043c\u0435\u0442\u043e\u0434\u043e\u0432<\/h4>\n<p><strong>\u0423\u0432\u0435\u043b\u0438\u0447\u0435\u043d\u0438\u0435 \u0441\u0447\u0435\u0442\u0447\u0438\u043a\u0430 \u043f\u0440\u043e\u0441\u043c\u043e\u0442\u0440\u0430 \u0440\u0435\u0441\u0443\u0440\u0441\u0430 (\u0435\u0441\u0442\u044c \u043f\u043e\u0431\u043e\u0447\u043d\u044b\u0439 \u044d\u0444\u0444\u0435\u043a\u0442 \u0437\u0430\u043f\u0438\u0441\u0438 \u0432 \u043b\u043e\u0433\/\u043c\u0435\u0442\u0440\u0438\u043a\u0443)<\/strong><\/p>\n<pre><code>POST \/v1\/resources\/{id}\/view<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<p><strong>\u0421\u0447\u0451\u0442\u0447\u0438\u043a\u0438 (\u0431\u0435\u0437 \u043f\u043e\u0431\u043e\u0447\u043d\u043e\u0433\u043e \u044d\u0444\u0444\u0435\u043a\u0442\u0430)<\/strong><\/p>\n<p>\u041f\u0443\u0431\u043b\u0438\u0447\u043d\u044b\u0435:<\/p>\n<pre><code>GET \/v1\/resources\/countGET \/v1\/users\/{user-id}\/resources\/count<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<p>\u0412\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u0438\u0435 (\u043d\u0430 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u0445 \u0440\u0435\u0441\u0443\u0440\u0441\u0430\u0445):<\/p>\n<pre><code>GET \/_internal\/resources\/countGET \/_internal\/organizations\/{organization-id}\/resources\/countGET \/_internal\/organizations\/{organization-id}\/users\/{user-id}\/resources\/count<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<p><strong>\u0420\u0430\u0441\u0447\u0451\u0442 \u0441\u0442\u043e\u0438\u043c\u043e\u0441\u0442\u0438 (\u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u0435, \u0431\u0435\u0437 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u044f)<\/strong><\/p>\n<pre><code>POST \/v1\/resources\/calculate<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<p>\u0422\u0435\u043b\u043e:<\/p>\n<pre><code class=\"json\">{ \"destination\": \"New York\", \"deliverySpeed\": \"express\" }<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<p>\u041e\u0442\u0432\u0435\u0442 <strong>200<\/strong>:<\/p>\n<pre><code class=\"json\">{ \"price\": 42.50, \"currency\": \"USD\", \"eta_days\": 2 }<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<p><strong>\u041f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u0435 \u0441\u043a\u0438\u0434\u043a\u0438 (\u043c\u0443\u0442\u0430\u0446\u0438\u044f)<\/strong><\/p>\n<pre><code>POST \/v1\/resources\/{id}\/apply-discount<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<p>\u0422\u0435\u043b\u043e:<\/p>\n<pre><code class=\"json\">{ \"discount_\u0441ode\": \"SUMMER21\" }<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<h3>\u041f\u0430\u043a\u0435\u0442\u043d\u044b\u0435 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438 (batch)<\/h3>\n<p>\u0421\u043d\u0438\u0436\u0430\u044e\u0442 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u043a API, \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044e\u0442 \u0441\u043e\u0433\u043b\u0430\u0441\u043e\u0432\u0430\u043d\u043d\u043e \u043c\u0435\u043d\u044f\u0442\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0440\u0435\u0441\u0443\u0440\u0441\u043e\u0432 \u0438 \u0443\u043f\u0440\u043e\u0449\u0430\u044e\u0442 \u043a\u043b\u0438\u0435\u043d\u0442\u0441\u043a\u0443\u044e \u043b\u043e\u0433\u0438\u043a\u0443.<\/p>\n<p><strong>\u041e\u0431\u0449\u0438\u0435 \u043f\u0440\u0438\u043d\u0446\u0438\u043f\u044b<\/strong><\/p>\n<ul>\n<li>\n<p>\u041e\u0434\u043d\u043e\u0442\u0438\u043f\u043d\u043e\u0441\u0442\u044c \u0432\u043d\u0443\u0442\u0440\u0438 \u0437\u0430\u043f\u0440\u043e\u0441\u0430: \u043d\u0435 \u0441\u043c\u0435\u0448\u0438\u0432\u0430\u0435\u043c \u00ab\u0441\u043e\u0437\u0434\u0430\u0442\u044c\u00bb \u0438 \u00ab\u0443\u0434\u0430\u043b\u0438\u0442\u044c\u00bb.<\/p>\n<\/li>\n<li>\n<p>\u0410\u0442\u043e\u043c\u0430\u0440\u043d\u043e\u0441\u0442\u044c: \u043b\u0438\u0431\u043e \u0432\u0441\u0451, \u043b\u0438\u0431\u043e \u043d\u0438\u0447\u0435\u0433\u043e.<\/p>\n<\/li>\n<li>\n<p>\u041b\u0438\u043c\u0438\u0442\u044b: \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0438\u0432\u0430\u0435\u043c \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432 \u0438 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u043c \u043f\u043e\u043d\u044f\u0442\u043d\u0443\u044e \u043e\u0448\u0438\u0431\u043a\u0443 <strong>413 Payload Too Large<\/strong> \u0441 \u043f\u043e\u0434\u0441\u043a\u0430\u0437\u043a\u043e\u0439.<\/p>\n<\/li>\n<\/ul>\n<p><strong>\u041c\u0430\u0441\u0441\u043e\u0432\u043e\u0435 \u0447\u0442\u0435\u043d\u0438\u0435<\/strong><\/p>\n<p>\u0427\u0430\u0441\u0442\u044b\u0439 \u0430\u043d\u0442\u0438\u2011\u043f\u0430\u0442\u0442\u0435\u0440\u043d:<\/p>\n<pre><code>GET \/v1\/resources\/batch?ids=1&amp;ids=2&amp;...<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<p>\u0420\u0438\u0441\u043a \u2014 \u043b\u0438\u043c\u0438\u0442 \u0434\u043b\u0438\u043d\u044b URL \u043f\u0440\u0438 \u0431\u043e\u043b\u044c\u0448\u0438\u0445 \u0431\u0430\u0442\u0447\u0430\u0445. \u041b\u0443\u0447\u0448\u0435 \u0442\u0430\u043a:<\/p>\n<pre><code>POST \/v1\/resources\/batch-get<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<p>\u0422\u0435\u043b\u043e:<\/p>\n<pre><code class=\"json\">{ \"ids\": [\"guid-1\", \"guid-2\"] }<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<p>\u041e\u0442\u0432\u0435\u0442 <strong>200<\/strong>:<\/p>\n<pre><code class=\"json\">{  \"resources\": [    { \"id\": \"guid-1\", \"title\": \"A\", \"status\": \"draft\" },    { \"id\": \"guid-2\", \"title\": \"B\", \"status\": \"active\" }  ]}<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<blockquote>\n<p>\u041c\u0430\u0441\u0441\u0438\u0432 \u0431\u0435\u0437 \u043e\u0431\u0451\u0440\u0442\u043a\u0438 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0438\u0432\u0430\u0435\u0442 \u043d\u0430\u0441 \u2014 \u0444\u043e\u0440\u043c\u0430\u0442 \u0441 <strong>\u043e\u0431\u044a\u0435\u043a\u0442\u043e\u043c<\/strong> \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0444\u043b\u0430\u0433\u0438 (<code>idempotency<\/code>, <code>force<\/code> \u0438 \u0434\u0440.).<\/p>\n<\/blockquote>\n<p><strong>\u041c\u0430\u0441\u0441\u043e\u0432\u043e\u0435 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435<\/strong><\/p>\n<pre><code>POST \/v1\/resources\/batch<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<p>\u0422\u0435\u043b\u043e:<\/p>\n<pre><code class=\"json\">{  \"resources\": [    { \"title\": \"A\", \"status\": \"draft\" },    { \"title\": \"B\", \"status\": \"active\" }  ]}<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<p>\u041e\u0442\u0432\u0435\u0442 <strong>201<\/strong>:<\/p>\n<pre><code class=\"json\">{  \"resources\": [    { \"id\": \"guid-1\", \"title\": \"A\", \"status\": \"draft\" },    { \"id\": \"guid-2\", \"title\": \"B\", \"status\": \"active\" }  ]}<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<p><strong>Batch\u2011\u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0435<\/strong><\/p>\n<pre><code>PUT \/v1\/resources\/batch<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<p>\u0422\u0435\u043b\u043e:<\/p>\n<pre><code class=\"json\">{  \"resources\": [    { \"id\": \"guid-1\", \"status\": \"active\", \"title\": \"API Patterns\" },    { \"id\": \"guid-2\", \"status\": \"active\", \"title\": \"Design Guide\" }  ]}<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<p><strong>Batch\u2011\u0443\u0434\u0430\u043b\u0435\u043d\u0438\u0435<\/strong><\/p>\n<pre><code>POST \/v1\/resources\/batch-delete<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<p>\u0422\u0435\u043b\u043e:<\/p>\n<pre><code class=\"json\">{  \"ids\": [\"guid-1\", \"guid-2\"],  \"force\": false}<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<p>\u041e\u0442\u0432\u0435\u0442 <strong>200<\/strong>.<br \/> \u0421\u043e\u0433\u043b\u0430\u0441\u043d\u043e <strong>RFC 9110<\/strong> \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u0435\u0442\u0441\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c <strong>POST \u0441 \u0442\u0435\u043b\u043e\u043c<\/strong>, \u0432\u043c\u0435\u0441\u0442\u043e <code>DELETE<\/code>.<\/p>\n<hr\/>\n<h3>\u0427\u0430\u0441\u0442\u044c 5. \u041a\u0440\u0438\u0442\u0438\u043a\u0430<\/h3>\n<figure class=\"\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/nw\/ux\/7l\/nwux7loia20llbr437zznwi-abq.png\" sizes=\"(max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/webt\/nw\/ux\/7l\/nwux7loia20llbr437zznwi-abq.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/webt\/nw\/ux\/7l\/nwux7loia20llbr437zznwi-abq.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/figure>\n<p><strong>\u0421\u0442\u043e\u0438\u0442 \u043b\u0438 \u043d\u0430 POST\/PUT\/PATCH \u0432\u0441\u0435\u0433\u0434\u0430 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0442\u044c \u0432\u0435\u0441\u044c \u0440\u0435\u0441\u0443\u0440\u0441, \u0435\u0441\u043b\u0438 \u0441\u0435\u0440\u0432\u0435\u0440 \u0443\u0436\u0435 \u043f\u0440\u0438\u043d\u044f\u043b \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0438 \u043d\u0430 \u043a\u043b\u0438\u0435\u043d\u0442\u0435 \u0435\u0441\u0442\u044c \u0430\u043a\u0442\u0443\u0430\u043b\u044c\u043d\u0430\u044f \u0432\u0435\u0440\u0441\u0438\u044f?<\/strong><br \/> \u0414\u0430. \u0412 \u043e\u0431\u044b\u0447\u043d\u044b\u0445 CRUD\u2011\u0441\u0435\u0440\u0432\u0438\u0441\u0430\u0445 \u044d\u0442\u043e \u0443\u043f\u0440\u043e\u0449\u0430\u0435\u0442 \u0436\u0438\u0437\u043d\u044c: \u043c\u0435\u043d\u044c\u0448\u0435 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432, \u043b\u0435\u0433\u0447\u0435 \u0434\u0435\u0431\u0430\u0436\u0438\u0442\u044c \u0438 \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c.<\/p>\n<p><strong>\u041d\u0435 \u0443\u043f\u0440\u0451\u043c\u0441\u044f \u043b\u0438 \u043c\u044b \u0432 \u043b\u0438\u043c\u0438\u0442\u044b \u043f\u043e \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0443\/\u0434\u043b\u0438\u043d\u0435 query\u2011\u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432? \u042d\u0442\u043e \u043d\u0435 \u0441\u0442\u0430\u043d\u0435\u0442 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u043e\u0439 \u0434\u043b\u044f \u0444\u0438\u043b\u044c\u0442\u0440\u0430\u0446\u0438\u0438 \u0438 \u0441\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u043a\u0438?<\/strong><br \/> \u0414\u043b\u044f \u0442\u0438\u043f\u0438\u0447\u043d\u043e\u0433\u043e CRUD \u0441 \u0434\u0435\u0441\u044f\u0442\u043a\u043e\u043c \u044f\u0432\u043d\u044b\u0445 \u0444\u0438\u043b\u044c\u0442\u0440\u043e\u0432 \u043f\u0440\u043e\u0431\u043b\u0435\u043c \u043d\u0435\u0442. \u041a\u043e\u0433\u0434\u0430 \u043a\u0440\u0438\u0442\u0435\u0440\u0438\u0435\u0432 \u043c\u043d\u043e\u0433\u043e \u2014 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u043c\u0435\u0442\u043e\u0434 <strong>POST<\/strong> \u0438 \u043f\u0435\u0440\u0435\u0434\u0430\u0451\u043c \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u0432 \u0442\u0435\u043b\u0435.<\/p>\n<hr\/>\n<h3>\u0417\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435<\/h3>\n<p>\u042f \u043d\u0430\u043c\u0435\u0440\u0435\u043d\u043d\u043e \u043d\u0435 \u043a\u0430\u0441\u0430\u043b\u0441\u044f \u0432 \u0441\u0442\u0430\u0442\u044c\u0435 \u0442\u0435\u043c \u0438\u0434\u0435\u043c\u043f\u043e\u0442\u0435\u043d\u0442\u043d\u043e\u0441\u0442\u0438, ETag, \u0432\u0435\u0440\u0441\u0438\u043e\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0438 \u0434\u0440\u0443\u0433\u0438\u0445 \u0430\u0441\u043f\u0435\u043a\u0442\u043e\u0432 \u2014 \u043e \u043d\u0438\u0445 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u043e \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0432 \u043e\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0445 \u0433\u0430\u0439\u0434\u043b\u0430\u0439\u043d\u0430\u0445. \u0426\u0435\u043b\u044c \u0431\u044b\u043b\u0430 \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u044c \u0445\u043e\u0434 \u043c\u044b\u0441\u043b\u0435\u0439 \u0438 \u0447\u0442\u043e <strong>80% \u0437\u0430\u0434\u0430\u0447 \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u043a\u0440\u044b\u0442\u044c \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u0438\u043c \u0438 \u043f\u043e\u043d\u044f\u0442\u043d\u044b\u043c \u043d\u0430\u0431\u043e\u0440\u043e\u043c \u043f\u0440\u0430\u0432\u0438\u043b<\/strong>. \u041f\u0440\u0438\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u044f\u0441\u044c \u0438\u0445, \u0432\u044b \u0441\u043d\u0438\u0436\u0430\u0435\u0442\u0435 \u0440\u0438\u0441\u043a\u0438 \u0434\u0443\u0431\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f, \u043e\u0431\u043b\u0435\u0433\u0447\u0430\u0435\u0442\u0435 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0443 \u0438 \u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442\u0435 \u043f\u0440\u043e\u0441\u0442\u043e\u0440 \u0434\u043b\u044f \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u044f. \u041e\u0441\u0442\u0430\u043b\u044c\u043d\u044b\u0435 20% \u0441\u043b\u0443\u0447\u0430\u0435\u0432 \u043f\u043e\u0442\u0440\u0435\u0431\u0443\u044e\u0442 \u043e\u0441\u043e\u0437\u043d\u0430\u043d\u043d\u044b\u0445 \u0440\u0435\u0448\u0435\u043d\u0438\u0439 \u2014 \u0438 \u0437\u0434\u0435\u0441\u044c \u043f\u043e\u043b\u0435\u0437\u043d\u043e \u0441\u0432\u0435\u0440\u044f\u0442\u044c\u0441\u044f \u0441 \u0438\u043d\u0434\u0443\u0441\u0442\u0440\u0438\u0430\u043b\u044c\u043d\u044b\u043c\u0438 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u0430\u043c\u0438.<\/p>\n<p>\u0415\u0441\u043b\u0438 \u0443 \u0432\u0430\u0441 \u0435\u0441\u0442\u044c \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0430\u0446\u0438\u0438, \u043a\u0430\u043a \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u044d\u0442\u0443 \u0441\u0442\u0430\u0442\u044c\u044e \u0435\u0449\u0451 \u043f\u0440\u0430\u043a\u0442\u0438\u0447\u043d\u0435\u0435 \u0438 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u0435\u0435 \u2014 <strong>\u043d\u0430\u043f\u0438\u0448\u0438\u0442\u0435 \u0432 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u044f\u0445 \u0438\u043b\u0438 \u043c\u043d\u0435 \u0432 \u043f\u0440\u043e\u0444\u0438\u043b\u044c<\/strong>. \u041f\u043e \u043c\u0435\u0440\u0435 \u043d\u0430\u043a\u043e\u043f\u043b\u0435\u043d\u0438\u044f \u0444\u0438\u0434\u0431\u044d\u043a\u0430 \u0434\u043e\u043f\u043e\u043b\u043d\u044e \u0440\u0430\u0437\u0434\u0435\u043b\u044b.<\/p>\n<hr\/>\n<h3>\u041f\u043e\u043b\u0435\u0437\u043d\u044b\u0435 \u0441\u0441\u044b\u043b\u043a\u0438<\/h3>\n<ul>\n<li>\n<p><strong>RFC 9110 \u2014 HTTP Semantics (\u043c\u0435\u0442\u043e\u0434\u044b, \u043a\u043e\u0434\u044b, \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043a\u0438)<\/strong><br \/> <a href=\"https:\/\/datatracker.ietf.org\/doc\/html\/rfc9110\" rel=\"noopener noreferrer nofollow\">https:\/\/datatracker.ietf.org\/doc\/html\/rfc9110<\/a><\/p>\n<\/li>\n<li>\n<p><strong>RFC 5789 \u2014 \u043c\u0435\u0442\u043e\u0434 PATCH<\/strong><br \/> <a href=\"https:\/\/datatracker.ietf.org\/doc\/html\/rfc5789\" rel=\"noopener noreferrer nofollow\">https:\/\/datatracker.ietf.org\/doc\/html\/rfc5789<\/a><\/p>\n<\/li>\n<li>\n<p><strong>Google API Design Guide<\/strong><br \/> <a href=\"https:\/\/cloud.google.com\/apis\/design\/\" rel=\"noopener noreferrer nofollow\">https:\/\/cloud.google.com\/apis\/design\/<\/a><\/p>\n<\/li>\n<li>\n<p><strong>Microsoft REST API Guidelines<\/strong><br \/> <a href=\"https:\/\/github.com\/microsoft\/api-guidelines\/blob\/vNext\/azure\/Guidelines.md\" rel=\"noopener noreferrer nofollow\">https:\/\/github.com\/microsoft\/api-guidelines\/blob\/vNext\/azure\/Guidelines.md<\/a><\/p>\n<\/li>\n<\/ul>\n<\/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=\"https:\/\/habr.com\/ru\/articles\/947410\/\">https:\/\/habr.com\/ru\/articles\/947410\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u0412\u0432\u0435\u0434\u0435\u043d\u0438\u0435\u041f\u0440\u0438\u0432\u0435\u0442, \u0425\u0430\u0431\u0440! \u041a\u0430\u0436\u0434\u044b\u0439 \u0440\u0430\u0437, \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u044f \u043d\u043e\u0432\u044b\u0439 \u044d\u043d\u0434\u043f\u043e\u0438\u043d\u0442, \u044f \u043b\u043e\u0432\u0438\u043b \u0441\u0435\u0431\u044f \u043d\u0430 \u043c\u044b\u0441\u043b\u0438: \u00ab\u0410 \u043a\u0430\u043a \u043d\u0430\u0437\u0432\u0430\u0442\u044c \u043c\u0430\u0440\u0448\u0440\u0443\u0442?\u00bb. \u041a\u0430\u0437\u0430\u043b\u043e\u0441\u044c, \u0447\u0442\u043e \u0433\u0434\u0435-\u0442\u043e \u0435\u0441\u0442\u044c \u0437\u0430\u043a\u043e\u043d\u044b \u0438 \u043f\u0440\u0430\u0432\u0438\u043b\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u043e\u043c\u043e\u0433\u0430\u044e\u0442 \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c API \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e. \u0421\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0435\u043c \u044f \u043d\u0430\u0442\u043a\u043d\u0443\u043b\u0441\u044f \u043d\u0430 \u0434\u0438\u0430\u0433\u0440\u0430\u043c\u043c\u044b \u043f\u043e \u043f\u0440\u043e\u0435\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044e, \u043f\u0440\u043e\u0447\u0438\u0442\u0430\u043b \u043a\u043d\u0438\u0433\u0443 JJ Geewax \u2014 API Design Patterns (\u0414\u0436\u0435\u0439\u2011\u0414\u0436\u0435\u0439 \u0413\u0438\u0432\u0430\u043a\u0441), \u0438\u0437\u0443\u0447\u0438\u043b \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0430\u0446\u0438\u0438 \u043e\u0442 \u043a\u0440\u0443\u043f\u043d\u044b\u0445 \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u0439 \u0438 \u043f\u043e\u043d\u044f\u043b \u0432\u0430\u0436\u043d\u0443\u044e \u043c\u044b\u0441\u043b\u044c: \u043f\u0440\u043e\u0435\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 API \u2014 \u044d\u0442\u043e \u0442\u0430\u043a\u0430\u044f \u0436\u0435 \u043e\u0431\u043b\u0430\u0441\u0442\u044c \u0437\u043d\u0430\u043d\u0438\u0439 \u0441\u043e \u0441\u0432\u043e\u0438\u043c\u0438 \u043f\u0440\u0438\u043d\u0446\u0438\u043f\u0430\u043c\u0438 \u0438 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u0430\u043c\u0438.\u0421\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u0435 \u044d\u0442\u0438\u043c \u043f\u0440\u0430\u0432\u0438\u043b\u0430\u043c \u0434\u0430\u0451\u0442 \u043f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442:API \u0441\u0442\u0430\u043d\u043e\u0432\u044f\u0442\u0441\u044f \u0443\u0434\u043e\u0431\u043d\u044b\u043c\u0438 \u0434\u043b\u044f \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u043e\u0432 \u0431\u043b\u0430\u0433\u043e\u0434\u0430\u0440\u044f \u0435\u0434\u0438\u043d\u043e\u043e\u0431\u0440\u0430\u0437\u043d\u044b\u043c \u043f\u0430\u0442\u0442\u0435\u0440\u043d\u0430\u043c \u0438 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u0430\u043c \u0432\u0435\u0431\u0430.\u0411\u0438\u0437\u043d\u0435\u0441\u2011\u043b\u043e\u0433\u0438\u043a\u0443 \u0438 \u0441\u0430\u043c API \u043b\u0435\u0433\u0447\u0435 \u043f\u0435\u0440\u0435\u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c.\u0418\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 \u043e\u0441\u0442\u0430\u0451\u0442\u0441\u044f \u043f\u043e\u043d\u044f\u0442\u043d\u044b\u043c \u0438 \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u0443\u0435\u043c\u044b\u043c \u0434\u043b\u044f \u0432\u043d\u0435\u0448\u043d\u0438\u0445 \u043a\u043b\u0438\u0435\u043d\u0442\u043e\u0432.\u041e\u0434\u043d\u0430\u043a\u043e \u0432\u043e\u0437\u043d\u0438\u043a\u0430\u0435\u0442 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430: \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u044b \u0435\u0441\u0442\u044c, \u043d\u043e \u043e\u043d\u0438 \u0440\u0430\u0437\u043d\u044b\u0435. \u041c\u043d\u043e\u0433\u0438\u0435 \u0438\u0437 \u043d\u0438\u0445 \u043a\u0440\u0430\u0441\u0438\u0432\u044b \u043d\u0430 \u0431\u0443\u043c\u0430\u0433\u0435, \u043d\u043e \u043d\u0435\u043f\u043e\u043d\u044f\u0442\u043d\u043e, \u043a\u0430\u043a \u0438\u0445 \u043f\u0440\u0438\u043c\u0435\u043d\u0438\u0442\u044c \u0432 \u043e\u0431\u044b\u0447\u043d\u043e\u043c CRUD\u2011\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0438 \u0431\u0435\u0437 \u0441\u043b\u043e\u0436\u043d\u043e\u0439 \u0431\u0438\u0437\u043d\u0435\u0441\u2011\u043b\u043e\u0433\u0438\u043a\u0438.\u0426\u0435\u043b\u044c \u0441\u0442\u0430\u0442\u044c\u0438 \u2014 \u0434\u0430\u0442\u044c \u043a\u043e\u043c\u043f\u0430\u043a\u0442\u043d\u0443\u044e \u0448\u043f\u0430\u0440\u0433\u0430\u043b\u043a\u0443 \u043f\u043e \u043f\u0440\u043e\u0435\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044e API \u0434\u043b\u044f \u043f\u0440\u043e\u0441\u0442\u044b\u0445 CRUD\u2011\u0441\u0435\u0440\u0432\u0438\u0441\u043e\u0432 \u0438 \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u044c \u0445\u043e\u0434 \u043c\u044b\u0441\u043b\u0435\u0439, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043f\u0440\u043e\u0435\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u0438 \u043e\u0441\u043c\u044b\u0441\u043b\u0435\u043d\u043d\u043e.\u0427\u0430\u0441\u0442\u044c 1. \u0412\u0441\u0451 \u043d\u0430\u0447\u0438\u043d\u0430\u0435\u0442\u0441\u044f \u0441 \u0434\u043e\u043c\u0435\u043d\u0430 \u0438 \u043a\u043e\u0434\u0430\u0412 \u0445\u043e\u0440\u043e\u0448\u0435\u043c API \u0441\u043d\u0430\u0447\u0430\u043b\u0430 \u043f\u0440\u043e\u0435\u043a\u0442\u0438\u0440\u0443\u044e\u0442\u0441\u044f \u0440\u0435\u0441\u0443\u0440\u0441\u044b \u0438 \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435 \u0441 \u043d\u0438\u043c\u0438. \u0415\u0441\u043b\u0438 \u0434\u043e\u043c\u0435\u043d\u043d\u0430\u044f \u043c\u043e\u0434\u0435\u043b\u044c \u0438 \u0435\u0451 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438 \u044f\u0441\u043d\u044b, HTTP\u2011\u0441\u043b\u043e\u0439 \u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0441\u044f \u043f\u0440\u043e\u0441\u0442\u044b\u043c \u0438 \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u0443\u0435\u043c\u044b\u043c.\u041c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u044b\u0439 \u0441\u043b\u043e\u0432\u0430\u0440\u044c \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0439\u0427\u0442\u043e\u0431\u044b \u0434\u043e\u0441\u0442\u0438\u0447\u044c \u043e\u0436\u0438\u0434\u0430\u0435\u043c\u043e\u0433\u043e \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430, \u043e\u043f\u0438\u0440\u0430\u0435\u043c\u0441\u044f \u043d\u0430 \u043f\u044f\u0442\u044c \u0431\u0430\u0437\u043e\u0432\u044b\u0445 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0439 \u0432 \u0431\u0438\u0437\u043d\u0435\u0441\u2011\u043b\u043e\u0433\u0438\u043a\u0435:GetResource \u2014 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u044b\u0439 \u0440\u0435\u0441\u0443\u0440\u0441.ListResources \u2014 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u043a\u043e\u043b\u043b\u0435\u043a\u0446\u0438\u044e \u0440\u0435\u0441\u0443\u0440\u0441\u043e\u0432 (\u0441 \u0444\u0438\u043b\u044c\u0442\u0440\u0430\u043c\u0438\/\u0441\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u043a\u043e\u0439\/\u043f\u0430\u0433\u0438\u043d\u0430\u0446\u0438\u0435\u0439).CreateResource \u2014 \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0440\u0435\u0441\u0443\u0440\u0441.UpdateResource \u2014 \u0438\u0437\u043c\u0435\u043d\u0438\u0442\u044c \u0440\u0435\u0441\u0443\u0440\u0441 (\u0447\u0430\u0441\u0442\u0438\u0447\u043d\u043e \u0438\u043b\u0438 \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e).DeleteResource \u2014 \u0443\u0434\u0430\u043b\u0438\u0442\u044c \u0440\u0435\u0441\u0443\u0440\u0441.\u0427\u0435\u0433\u043e \u043d\u0435 \u0434\u043e\u043b\u0436\u043d\u043e \u0431\u044b\u0442\u044c: GetByOrganization, GetByUser, Insert, Upsert, DeleteAll, FindOrCreate, ArchiveOldResources \u0438 \u0442. \u0434. \u0412\u0441\u044f \u0432\u0430\u0440\u0438\u0430\u0442\u0438\u0432\u043d\u043e\u0441\u0442\u044c \u2014 \u0432 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430\u0445, \u0430 \u043d\u0435 \u0432 \u043d\u043e\u0432\u044b\u0445 \u0438\u043c\u0435\u043d\u0430\u0445 \u043c\u0435\u0442\u043e\u0434\u043e\u0432.\u0415\u0434\u0438\u043d\u043e\u043e\u0431\u0440\u0430\u0437\u043d\u044b\u0439 \u043d\u0435\u0439\u043c\u0438\u043d\u0433 \u0434\u0435\u043b\u0430\u0435\u0442 \u043d\u0430\u0432\u0438\u0433\u0430\u0446\u0438\u044e \u0432 \u043a\u043e\u0434\u0435 \u043e\u0447\u0435\u0432\u0438\u0434\u043d\u043e\u0439.\u0424\u0438\u043b\u044c\u0442\u0440 \u0432\u043c\u0435\u0441\u0442\u043e GetBy* \u0443\u0431\u0438\u0440\u0430\u0435\u0442 \u0434\u0443\u0431\u043b\u0438 \u0438 \u0432\u0437\u0440\u044b\u0432 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0430 \u044d\u043d\u0434\u043f\u043e\u0438\u043d\u0442\u043e\u0432.\u0427\u0430\u0441\u0442\u044c 2. \u0421\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0435 \u043c\u0435\u0442\u043e\u0434\u044b API\u042d\u0442\u043e \u0442\u0435 \u043c\u0435\u0442\u043e\u0434\u044b, \u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0441\u0442\u043e\u0438\u0442 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u0432 \u043f\u0435\u0440\u0432\u0443\u044e \u043e\u0447\u0435\u0440\u0435\u0434\u044c.\u0420\u0435\u0441\u0443\u0440\u0441: Resource\u041c\u043e\u0434\u0435\u043b\u044c \u0434\u043b\u044f \u043f\u0440\u0438\u043c\u0435\u0440\u0430:{  &#171;id&#187;: &#171;guid&#187;,  &#171;title&#187;: &#171;string&#187;,  &#171;status&#187;: &#171;active|archived|draft&#187;}1) \u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435POST \/v1\/resources \u0422\u0435\u043b\u043e \u0437\u0430\u043f\u0440\u043e\u0441\u0430:{ &#171;title&#187;: &#171;New resource&#187;, &#171;status&#187;: &#171;draft&#187; }\u041e\u0442\u0432\u0435\u0442 201 + \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u044b\u0439 \u0440\u0435\u0441\u0443\u0440\u0441:{ &#171;id&#187;: &#171;guid&#187;, &#171;title&#187;: &#171;New resource&#187;, &#171;status&#187;: &#171;draft&#187; }2) \u041f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u0435 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e\u0433\u043e \u0440\u0435\u0441\u0443\u0440\u0441\u0430GET \/v1\/resources\/{id} \u041e\u0442\u0432\u0435\u0442 200 + \u0440\u0435\u0441\u0443\u0440\u0441; 404 \u2014 \u043d\u0435 \u043d\u0430\u0439\u0434\u0435\u043d.3) \u041f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u0435 \u0432\u0441\u0435\u0445 \u0440\u0435\u0441\u0443\u0440\u0441\u043e\u0432GET \/v1\/resources \u041e\u0442\u0432\u0435\u0442 200:{  &#171;resources&#187;: [    { &#171;id&#187;: &#171;guid&#187;, &#171;title&#187;: &#171;New resource&#187;, &#171;status&#187;: &#171;draft&#187; }  ]}\u0412\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u043c \u043e\u0431\u044a\u0435\u043a\u0442, \u0430 \u043d\u0435 \u00ab\u0433\u043e\u043b\u044b\u0439 \u043c\u0430\u0441\u0441\u0438\u0432\u00bb \u2014 \u0442\u0430\u043a \u043f\u0440\u043e\u0449\u0435 \u0440\u0430\u0441\u0448\u0438\u0440\u044f\u0442\u044c \u043a\u043e\u043d\u0442\u0440\u0430\u043a\u0442 (\u043c\u0435\u0442\u0430\u0434\u0430\u043d\u043d\u044b\u0435, \u043f\u0430\u0433\u0438\u043d\u0430\u0446\u0438\u044f \u0438 \u0442. \u0434.). \u041f\u0440\u0438 \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0438\u0438 \u0440\u0435\u0441\u0443\u0440\u0441\u043e\u0432 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u043c 200 \u0438 \u043f\u0443\u0441\u0442\u0443\u044e \u043a\u043e\u043b\u043b\u0435\u043a\u0446\u0438\u044e.4) \u041f\u043e\u043b\u043d\u0430\u044f \u0437\u0430\u043c\u0435\u043d\u0430 (replace)PUT \/v1\/resources\/{id} \u0422\u0435\u043b\u043e \u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u2014 \u043f\u043e\u043b\u043d\u043e\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0440\u0435\u0441\u0443\u0440\u0441\u0430 (\u0432\u0441\u0451, \u0447\u0442\u043e \u0434\u043e\u043b\u0436\u043d\u043e \u043e\u0441\u0442\u0430\u0442\u044c\u0441\u044f \u0432 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0438 \u043f\u043e\u0441\u043b\u0435 \u0437\u0430\u043c\u0435\u043d\u044b):{ &#171;title&#187;: &#171;Updated&#187;, &#171;status&#187;: &#171;active&#187; }\u041a\u043e\u0434\u044b \u043e\u0442\u0432\u0435\u0442\u0430:201 \u2014 \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u044b\u0439 \u0440\u0435\u0441\u0443\u0440\u0441 (\u0435\u0441\u043b\u0438 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u043c \u043a\u043b\u0438\u0435\u043d\u0442\u0443 \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u0441\u043e \u0441\u0432\u043e\u0438\u043c \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440\u043e\u043c; \u0438\u043d\u0430\u0447\u0435 \u2014 404).200 \u2014 \u0430\u043a\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0439 \u0440\u0435\u0441\u0443\u0440\u0441 (\u0435\u0441\u043b\u0438 \u043e\u043d \u0431\u044b\u043b \u0438 \u043c\u044b \u0435\u0433\u043e \u0437\u0430\u043c\u0435\u043d\u0438\u043b\u0438).\u0415\u0441\u043b\u0438 \u043f\u043e\u043b\u0435 \u043d\u0435 \u043f\u0440\u0438\u0441\u043b\u0430\u043d\u043e, \u043e\u043d\u043e \u0434\u043e\u043b\u0436\u043d\u043e \u043f\u0440\u0438\u043d\u044f\u0442\u044c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e.5) \u0427\u0430\u0441\u0442\u0438\u0447\u043d\u043e\u0435 \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0435PATCH \/v1\/resources\/{id} \u0422\u0435\u043b\u043e \u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u2014 \u0442\u043e\u043b\u044c\u043a\u043e \u0438\u0437\u043c\u0435\u043d\u044f\u0435\u043c\u044b\u0435 \u043f\u043e\u043b\u044f:{ &#171;status&#187;: &#171;archived&#187; }\u041e\u0442\u0432\u0435\u0442 200 \u2014 \u0430\u043a\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0439 \u0440\u0435\u0441\u0443\u0440\u0441; 404 \u2014 \u043d\u0435 \u043d\u0430\u0439\u0434\u0435\u043d.6) \u0423\u0434\u0430\u043b\u0435\u043d\u0438\u0435DELETE \/v1\/resources\/{id} \u041e\u0442\u0432\u0435\u0442 204 (\u0431\u0435\u0437 \u0442\u0435\u043b\u0430).\u0420\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0430\u0446\u0438\u0438 \u043f\u043e \u0440\u0430\u0437\u0434\u0435\u043b\u0443\u0412\u0441\u0435\u0433\u0434\u0430 \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0435 \u0447\u0438\u0441\u043b\u043e \u0441\u0443\u0449\u043d\u043e\u0441\u0442\u0438 \u0432 \u043f\u0443\u0442\u044f\u0445: \/resources.\u0414\u043b\u044f \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0445 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0439 \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440 \u2014 \u0442\u043e\u043b\u044c\u043a\u043e \u0432 \u043f\u0443\u0442\u0438: \/resources\/{id}.\u0412\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u043c \u043f\u043e\u043b\u043d\u044b\u0439 \u0440\u0435\u0441\u0443\u0440\u0441 \u043d\u0430 POST\/PUT\/PATCH \u2014 \u0442\u0430\u043a \u043f\u0440\u043e\u0449\u0435 \u0434\u0435\u0431\u0430\u0436\u0438\u0442\u044c, \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0438 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0442\u044c.\u0427\u0430\u0441\u0442\u044c 3. \u0420\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u0435 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0445 \u043c\u0435\u0442\u043e\u0434\u043e\u0432\u0422\u0435\u043f\u0435\u0440\u044c \u0443\u0441\u0438\u043b\u0438\u043c \u0431\u0430\u0437\u043e\u0432\u044b\u0435 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438 \u2014 \u0431\u0435\u0437 \u0440\u0430\u0437\u043c\u043d\u043e\u0436\u0435\u043d\u0438\u044f \u044d\u043d\u0434\u043f\u043e\u0438\u043d\u0442\u043e\u0432 \u0438 \u0432\u0435\u0440\u0441\u0438\u0439.\u041f\u0430\u0433\u0438\u043d\u0430\u0446\u0438\u044f\u0421\u0430\u043c\u0430\u044f \u043f\u0440\u043e\u0441\u0442\u0430\u044f \u0438 \u0440\u0430\u0441\u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0451\u043d\u043d\u0430\u044f \u2014 offset\u2011based. \u041f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b: skip, take (\u0441\u0438\u043d\u043e\u043d\u0438\u043c\u044b: offset, limit).GET \/v1\/resources?skip=20&amp;take=10 \u2014 \u043f\u0440\u043e\u043f\u0443\u0441\u043a\u0430\u0435\u043c 20, \u0431\u0435\u0440\u0451\u043c 10. \u041e\u0442\u0432\u0435\u0442:{  &#171;resources&#187;: [    { &#171;id&#187;: &#171;guid&#187;, &#171;title&#187;: &#171;&#8230;&#187; }  ],  &#171;total&#187;: 350}total \u0432 \u043e\u0442\u0432\u0435\u0442\u0435 \u043f\u043e\u043c\u043e\u0433\u0430\u0435\u0442 \u043a\u043b\u0438\u0435\u043d\u0442\u0443 \u043f\u043e\u043d\u044f\u0442\u044c, \u0435\u0441\u0442\u044c \u043b\u0438 \u0441\u043c\u044b\u0441\u043b \u0442\u044f\u043d\u0443\u0442\u044c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b.\u0421\u043e\u0440\u0442\u0438\u0440\u0443\u0435\u043c \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0445\u043e\u0442\u044f \u0431\u044b \u043f\u043e \u0434\u0430\u0442\u0435 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u044f, \u0435\u0441\u043b\u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u043d\u0435 \u0443\u043a\u0430\u0437\u0430\u043b \u0438\u043d\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0442\u044c \u0434\u0435\u0442\u0435\u0440\u043c\u0438\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435.\u041e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u0444\u0438\u043a\u0441\u0438\u0440\u0443\u0435\u043c \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u044b\u0439 take.\u0415\u0441\u043b\u0438 \u0432\u044b\u0431\u043e\u0440\u043a\u0430 \u043d\u0435\u0441\u0442\u0430\u0431\u0438\u043b\u044c\u043d\u0430, \u043e\u0433\u0440\u043e\u043c\u043d\u0430, \u0441 \u0442\u044f\u0436\u0451\u043b\u043e\u0439 \u0441\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u043a\u043e\u0439 \u2014 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c cursor\u2011based \u043f\u0430\u0433\u0438\u043d\u0430\u0446\u0438\u044e.\u0421\u043c. \u0442\u0430\u043a\u0436\u0435:Microsoft REST API Guidelines \u2014 collections: https:\/\/github.com\/microsoft\/api-guidelines\/blob\/vNext\/azure\/Guidelines.md#collectionsGoogle API Design Guide \u2014 Standard methods: List: https:\/\/google.aip.dev\/132\u0424\u0438\u043b\u044c\u0442\u0440\u0430\u0446\u0438\u044f\u0427\u0442\u043e\u0431\u044b \u043d\u0435 \u0443\u0445\u043e\u0434\u0438\u0442\u044c \u0432 \u043f\u0430\u0440\u0441\u0438\u043d\u0433, \u0431\u0435\u0440\u0451\u043c \u043f\u0440\u044f\u043c\u043e\u0439 \u043f\u0443\u0442\u044c: \u044f\u0432\u043d\u044b\u0435 query\u2011\u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u043d\u0430 \u043a\u0430\u0436\u0434\u044b\u0439 \u0444\u0438\u043b\u044c\u0442\u0440.\u0421\u0443\u0444\u0444\u0438\u043a\u0441\u044b \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u043e\u0432:_eq (\u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e, \u043c\u043e\u0436\u043d\u043e \u043e\u043f\u0443\u0441\u0442\u0438\u0442\u044c), _ne, _lt, _gt, _lte, _gte_in, _nin \u2014 \u0434\u043b\u044f \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u0414\u043b\u044f \u0432\u043b\u043e\u0436\u0435\u043d\u043d\u044b\u0445 \u043f\u043e\u043b\u0435\u0439 \u2014 \u00ab\u043f\u043b\u043e\u0441\u043a\u0438\u0435\u00bb \u0438\u043c\u0435\u043d\u0430: meta_created_at_gte=&#8230;\u041f\u0440\u0438\u043c\u0435\u0440\u044b:GET \/v1\/resources?status_in=active,draftGET \/v1\/resources?title_eq=DesignGET \/v1\/resources?meta_created_at_gte=2023-01-01&amp;meta_created_at_lte=2023-06-01\u0414\u043b\u044f \u0444\u0438\u043b\u044c\u0442\u0440\u0430\u0446\u0438\u0438 \u043f\u043e \u0432\u043b\u043e\u0436\u0435\u043d\u043d\u044b\u043c \u043c\u0430\u0441\u0441\u0438\u0432\u0430\u043c \u0441\u043b\u043e\u0436\u043d\u044b\u0445 \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432 (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, resource.users=[{&#8230;}]) \u043b\u0443\u0447\u0448\u0435 \u043d\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c query\u2011\u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b, \u0430 \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u044b\u0432\u0430\u0442\u044c \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0439 \u043c\u0435\u0442\u043e\u0434 \u043f\u043e\u0438\u0441\u043a\u0430 \u0441 POST\u2011\u0442\u0435\u043b\u043e\u043c.\u041d\u0435\u0438\u0437\u0432\u0435\u0441\u0442\u043d\u044b\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u2014 \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u0438\u0433\u043d\u043e\u0440\u0438\u0440\u0443\u0435\u043c.\u0414\u043b\u044f \u043f\u043e\u043b\u043d\u043e\u0442\u0435\u043a\u0441\u0442\u043e\u0432\u043e\u0433\u043e \u043f\u043e\u0438\u0441\u043a\u0430 \u043b\u0443\u0447\u0448\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 search.\u0421 \u043f\u0440\u043e\u0434\u0432\u0438\u043d\u0443\u0442\u043e\u0439 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0435\u0439 \u0447\u0435\u0440\u0435\u0437 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 filter \u043c\u043e\u0436\u043d\u043e \u043e\u0437\u043d\u0430\u043a\u043e\u043c\u0438\u0442\u044c\u0441\u044f \u043f\u043e \u0441\u0441\u044b\u043b\u043a\u0430\u043c:Microsoft REST API Guidelines \u2014 filter: https:\/\/github.com\/microsoft\/api-guidelines\/blob\/vNext\/azure\/Guidelines.md#filterGoogle API Design Guide \u2014 Filtering: https:\/\/google.aip.dev\/160\u0421\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u043a\u0430\u041f\u0440\u043e\u0441\u0442\u043e\u0439 \u0432\u0430\u0440\u0438\u0430\u043d\u0442 \u2014 \u043d\u0435 \u043f\u0430\u0440\u0441\u0438\u0442\u044c \u0435\u0434\u0438\u043d\u044b\u0439 orderby, \u0430 \u0434\u0435\u0440\u0436\u0430\u0442\u044c \u0441\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u043a\u0438 \u0432 \u044f\u0432\u043d\u044b\u0445 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445. created_at_sort=asc|desc, title_sort=asc|desc. \u041e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0438\u0435 \u2014 \u043f\u043e\u043b\u0435 \u043d\u0435 \u0443\u0447\u0430\u0441\u0442\u0432\u0443\u0435\u0442.\u041f\u0440\u0438\u043c\u0435\u0440\u044b:GET \/v1\/resources?created_at_sort=ascGET \/v1\/resources?created_at_sort=asc&amp;title_sort=desc\u0421\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u043a\u0430 \u0447\u0435\u0440\u0435\u0437 \u043e\u0434\u0438\u043d query\u2011\u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0430 \u043f\u043e \u0441\u0441\u044b\u043b\u043a\u0430\u043c:Microsoft REST API Guidelines \u2014 orderby: https:\/\/github.com\/microsoft\/api-guidelines\/blob\/vNext\/azure\/Guidelines.md#orderbyGoogle API Design Guide \u2014 List: https:\/\/google.aip.dev\/132\u0418\u041c\u0425\u041e: \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 orderby\/filter \u2014 \u044d\u0442\u043e \u043f\u0430\u0440\u0441\u0438\u043d\u0433 \u0438 \u0441\u0432\u044f\u0437\u043a\u0430 \u0441 \u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u0435\u0439 \u043c\u043e\u0434\u0435\u043b\u044c\u044e, \u0447\u0442\u043e \u0434\u0435\u043b\u0430\u0442\u044c \u0432 \u043a\u0430\u0436\u0434\u043e\u043c \u043c\u0438\u043a\u0440\u043e\u0441\u0435\u0440\u0432\u0438\u0441\u0435 \u043d\u0430\u043a\u043b\u0430\u0434\u043d\u043e; \u044f\u0432\u043d\u044b\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u0434\u0435\u043b\u0430\u044e\u0442 \u043a\u043e\u043d\u0442\u0440\u0430\u043a\u0442 \u043e\u0447\u0435\u0432\u0438\u0434\u043d\u044b\u043c \u0438 \u0443\u043f\u0440\u043e\u0449\u0430\u044e\u0442 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044e.\u041c\u044f\u0433\u043a\u043e\u0435 \u0443\u0434\u0430\u043b\u0435\u043d\u0438\u0435 (soft delete)\u041e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u043c \u0435\u0434\u0438\u043d\u0443\u044e \u0441\u0445\u0435\u043c\u0443: \u0441\u0442\u0430\u0442\u0443\u0441 \u0443\u0434\u0430\u043b\u0451\u043d\u043d\u043e\u0441\u0442\u0438 \u0445\u0440\u0430\u043d\u0438\u043c \u0432 \u043a\u043e\u043b\u043e\u043d\u043a\u0435, \u0430 \u043d\u0435 \u0432 \u043d\u043e\u0432\u044b\u0445 \u0442\u0430\u0431\u043b\u0438\u0446\u0430\u0445. \u041c\u043e\u0434\u0435\u043b\u044c: \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u043f\u043e\u043b\u0435 deleted_at: string|null.\u0423\u0434\u0430\u043b\u0438\u0442\u044c (\u0432 \u0430\u0440\u0445\u0438\u0432) \u2014 DELETE \/v1\/resources\/{id} \u2192 204 (\u043f\u0440\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u043c deleted_at).\u0412\u043e\u0441\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u2014 PATCH \/v1\/resources\/{id}\/restore \u2192 200 (\u0441\u0442\u0430\u0432\u0438\u043c deleted_at = null \u0438 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u043c \u0440\u0435\u0441\u0443\u0440\u0441).\u0421\u043f\u0438\u0441\u043e\u043a \u0441 \u0443\u0434\u0430\u043b\u0451\u043d\u043d\u044b\u043c\u0438 \u2014 GET \/v1\/resources?include_deleted=true.\u041e\u0442\u0432\u0435\u0442 (\u043f\u0440\u0438\u043c\u0435\u0440):{  &#171;resources&#187;: [    { &#171;id&#187;: &#171;guid&#187;, &#171;title&#187;: &#171;&#8230;&#187;, &#171;deleted_at&#187;: null },    { &#171;id&#187;: &#171;guid&#187;, &#171;title&#187;: &#171;&#8230;&#187;, &#171;deleted_at&#187;: &#171;2024-11-12T10:36:15Z&#187; }  ],  &#171;total&#187;: 100}\u041f\u043e\u043b\u043d\u043e\u0435 \u0443\u0434\u0430\u043b\u0435\u043d\u0438\u0435 (\u043f\u043e\u0434\u0442\u0432\u0435\u0440\u0436\u0434\u0430\u0435\u043c \u044f\u0432\u043d\u043e) \u2014 DELETE \/v1\/resources\/{id}?force=true \u2192 204. \u041f\u043e\u043b\u0435\u0437\u043d\u043e \u0434\u043b\u044f \u00ab\u0443\u0434\u0430\u043b\u0438\u0442\u044c \u0438\u0437 \u0430\u0440\u0445\u0438\u0432\u0430\/\u043d\u0430\u0432\u0441\u0435\u0433\u0434\u0430\u00bb.\u0427\u0430\u0441\u0442\u0438\u0447\u043d\u043e\u0435 \u0438\u0437\u0432\u043b\u0435\u0447\u0435\u043d\u0438\u0435 \u043f\u043e\u043b\u0435\u0439 (fields)\u041f\u0440\u043e\u0441\u0442\u043e\u0433\u043e \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u043d\u0435\u0442: \u043d\u0443\u0436\u043d\u0430 \u0440\u0430\u0437\u0431\u043e\u0440\u043a\u0430 \u0441\u0442\u0440\u043e\u043a\u0438 \u0438 \u0434\u0438\u043d\u0430\u043c\u0438\u0447\u0435\u0441\u043a\u0430\u044f \u0441\u0431\u043e\u0440\u043a\u0430 \u043e\u0442\u0432\u0435\u0442\u0430. \u0415\u0441\u043b\u0438 \u044d\u0442\u043e \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043d\u0443\u0436\u043d\u043e \u2014 \u0432\u044b \u0434\u0435\u043b\u0430\u0435\u0442\u0435 \u0447\u0442\u043e-\u0442\u043e \u0441\u043b\u043e\u0436\u043d\u0435\u0435 CRUD \u0438 \u0441\u0442\u043e\u0438\u0442 \u043e\u043f\u0438\u0440\u0430\u0442\u044c\u0441\u044f \u043d\u0430 \u0433\u0430\u0439\u0434\u043b\u0430\u0439\u043d\u044b:Microsoft REST API Guidelines \u2014 select query: https:\/\/github.com\/microsoft\/api-guidelines\/blob\/vNext\/azure\/Guidelines.md#query-optionsGoogle API Design Guide \u2014 Partial responses: https:\/\/google.aip.dev\/157#field-masks-parameter\u041f\u0440\u0438\u043c\u0435\u0440\u044b:GET \/v1\/resources?fields=id,titleGET \/v1\/resources\/{id}?fields=id,status\u041e\u0442\u0432\u0435\u0442 (\u0434\u043b\u044f \u0441\u043f\u0438\u0441\u043a\u0430):{  &#171;resources&#187;: [    { &#171;id&#187;: &#171;guid&#187;, &#171;title&#187;: &#171;&#8230;&#187; }  ],  &#171;total&#187;: 123}\u041f\u0440\u0438\u043c\u0435\u0440\u044b \u00ab\u0432\u0441\u0451 \u0432\u043c\u0435\u0441\u0442\u0435\u00bb\u0421\u043f\u0438\u0441\u043e\u043a \u0441 \u043f\u0430\u0433\u0438\u043d\u0430\u0446\u0438\u0435\u0439, \u0444\u0438\u043b\u044c\u0442\u0440\u0430\u043c\u0438, \u0441\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u043a\u043e\u0439 \u0438 \u0443\u0441\u0435\u0447\u0451\u043d\u043d\u044b\u043c\u0438 \u043f\u043e\u043b\u044f\u043c\u0438GET \/v1\/resources?skip=10&amp;take=5&amp;status_in=active,draft&amp;created_at_sort=desc&amp;fields=id,title&amp;include_deleted=false{  &#171;resources&#187;: [    { &#171;id&#187;: &#171;guid1&#187;, &#171;title&#187;: &#171;Design Guide&#187; },    { &#171;id&#187;: &#171;guid2&#187;, &#171;title&#187;: &#171;API Patterns&#187; }  ],  &#171;total&#187;: 100}\u041c\u044f\u0433\u043a\u043e\u0435 \u0443\u0434\u0430\u043b\u0435\u043d\u0438\u0435 \/ \u0432\u043e\u0441\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0435 \/ \u0444\u043e\u0440\u0441\u2011\u0443\u0434\u0430\u043b\u0435\u043d\u0438\u0435DELETE \/v1\/resources\/{id}           \u2192 204PATCH  \/v1\/resources\/{id}\/restore   \u2192 200 (\u0442\u0435\u043b\u043e)DELETE \/v1\/resources\/{id}?force=true \u2192 204\u0427\u0430\u0441\u0442\u044c 4. \u041f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0435 \u043c\u0435\u0442\u043e\u0434\u044b \u0438 \u043f\u0430\u043a\u0435\u0442\u043d\u044b\u0435 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438\u0421\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0445 GET\/POST\/PUT\/PATCH\/DELETE \u0445\u0432\u0430\u0442\u0430\u0435\u0442 \u043d\u0430 ~80% CRUD. \u041e\u0441\u0442\u0430\u0432\u0448\u0438\u0435\u0441\u044f ~20% \u2014 \u0434\u043e\u043c\u0435\u043d\u043d\u044b\u0435 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f, \u043a\u043e\u0442\u043e\u0440\u044b\u0435:\u043c\u0435\u043d\u044f\u044e\u0442 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u0440\u0435\u0441\u0443\u0440\u0441\u0430 \u043d\u0435 \u043a\u0430\u043a \u00ab\u043f\u043e\u043b\u043d\u0430\u044f\/\u0447\u0430\u0441\u0442\u0438\u0447\u043d\u0430\u044f \u0437\u0430\u043c\u0435\u043d\u0430\u00bb (\u043f\u0440\u0438\u043c\u0435\u0440: \u00ab\u043f\u043e\u0434\u0442\u0432\u0435\u0440\u0434\u0438\u0442\u044c\u00bb, \u00ab\u043e\u0442\u043c\u0435\u043d\u0438\u0442\u044c\u00bb, \u00ab\u043f\u0440\u0438\u043c\u0435\u043d\u0438\u0442\u044c \u0441\u043a\u0438\u0434\u043a\u0443\u00bb);\u0437\u0430\u043f\u0443\u0441\u043a\u0430\u044e\u0442 \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u0435 (\u043f\u0440\u0438\u043c\u0435\u0440: \u00ab\u043f\u043e\u0441\u0447\u0438\u0442\u0430\u0442\u044c \u0442\u0430\u0440\u0438\u0444\u00bb);\u043d\u0435 \u0441\u043e\u0437\u0434\u0430\u044e\u0442 \u043d\u043e\u0432\u044b\u0439 \u0440\u0435\u0441\u0443\u0440\u0441 \u043d\u0430\u043f\u0440\u044f\u043c\u0443\u044e, \u043d\u043e \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u044f\u0442 \u044d\u0444\u0444\u0435\u043a\u0442 (\u043f\u0440\u0438\u043c\u0435\u0440: \u00ab\u043f\u0440\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u0440\u0435\u0441\u0443\u0440\u0441\u00bb).\u041f\u0440\u0430\u0432\u0438\u043b\u0430\u0413\u043b\u0430\u0433\u043e\u043b \u043f\u043e\u0441\u043b\u0435 {id}: POST \/v1\/resources\/{id}\/apply-discount.\u041c\u0435\u0442\u043e\u0434 \u2014 \u0447\u0430\u0449\u0435 POST (\u0435\u0441\u0442\u044c \u043f\u043e\u0431\u043e\u0447\u043d\u044b\u0439 \u044d\u0444\u0444\u0435\u043a\u0442).\u0418\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f: \u0432\u044b\u0447\u0438\u0441\u043b\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u043c\u0435\u0442\u043e\u0434\u044b \u0438 \u0441\u0447\u0451\u0442\u0447\u0438\u043a\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043d\u0435 \u043c\u0435\u043d\u044f\u044e\u0442 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u2192 GET.\u041f\u0440\u0438\u043c\u0435\u0440\u044b \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0445 \u043c\u0435\u0442\u043e\u0434\u043e\u0432\u0423\u0432\u0435\u043b\u0438\u0447\u0435\u043d\u0438\u0435 \u0441\u0447\u0435\u0442\u0447\u0438\u043a\u0430 \u043f\u0440\u043e\u0441\u043c\u043e\u0442\u0440\u0430 \u0440\u0435\u0441\u0443\u0440\u0441\u0430 (\u0435\u0441\u0442\u044c \u043f\u043e\u0431\u043e\u0447\u043d\u044b\u0439 \u044d\u0444\u0444\u0435\u043a\u0442 \u0437\u0430\u043f\u0438\u0441\u0438 \u0432 \u043b\u043e\u0433\/\u043c\u0435\u0442\u0440\u0438\u043a\u0443)POST \/v1\/resources\/{id}\/view\u0421\u0447\u0451\u0442\u0447\u0438\u043a\u0438 (\u0431\u0435\u0437 \u043f\u043e\u0431\u043e\u0447\u043d\u043e\u0433\u043e \u044d\u0444\u0444\u0435\u043a\u0442\u0430)\u041f\u0443\u0431\u043b\u0438\u0447\u043d\u044b\u0435:GET \/v1\/resources\/countGET \/v1\/users\/{user-id}\/resources\/count\u0412\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u0438\u0435 (\u043d\u0430 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u0445 \u0440\u0435\u0441\u0443\u0440\u0441\u0430\u0445):GET \/_internal\/resources\/countGET \/_internal\/organizations\/{organization-id}\/resources\/countGET \/_internal\/organizations\/{organization-id}\/users\/{user-id}\/resources\/count\u0420\u0430\u0441\u0447\u0451\u0442 \u0441\u0442\u043e\u0438\u043c\u043e\u0441\u0442\u0438 (\u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u0435, \u0431\u0435\u0437 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u044f)POST \/v1\/resources\/calculate\u0422\u0435\u043b\u043e:{ &#171;destination&#187;: &#171;New York&#187;, &#171;deliverySpeed&#187;: &#171;express&#187; }\u041e\u0442\u0432\u0435\u0442 200:{ &#171;price&#187;: 42.50, &#171;currency&#187;: &#171;USD&#187;, &#171;eta_days&#187;: 2 }\u041f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u0435 \u0441\u043a\u0438\u0434\u043a\u0438 (\u043c\u0443\u0442\u0430\u0446\u0438\u044f)POST \/v1\/resources\/{id}\/apply-discount\u0422\u0435\u043b\u043e:{ &#171;discount_\u0441ode&#187;: &#171;SUMMER21&#187; }\u041f\u0430\u043a\u0435\u0442\u043d\u044b\u0435 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438 (batch)\u0421\u043d\u0438\u0436\u0430\u044e\u0442 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u043a API, \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044e\u0442 \u0441\u043e\u0433\u043b\u0430\u0441\u043e\u0432\u0430\u043d\u043d\u043e \u043c\u0435\u043d\u044f\u0442\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0440\u0435\u0441\u0443\u0440\u0441\u043e\u0432 \u0438 \u0443\u043f\u0440\u043e\u0449\u0430\u044e\u0442 \u043a\u043b\u0438\u0435\u043d\u0442\u0441\u043a\u0443\u044e \u043b\u043e\u0433\u0438\u043a\u0443.\u041e\u0431\u0449\u0438\u0435 \u043f\u0440\u0438\u043d\u0446\u0438\u043f\u044b\u041e\u0434\u043d\u043e\u0442\u0438\u043f\u043d\u043e\u0441\u0442\u044c \u0432\u043d\u0443\u0442\u0440\u0438 \u0437\u0430\u043f\u0440\u043e\u0441\u0430: \u043d\u0435 \u0441\u043c\u0435\u0448\u0438\u0432\u0430\u0435\u043c \u00ab\u0441\u043e\u0437\u0434\u0430\u0442\u044c\u00bb \u0438 \u00ab\u0443\u0434\u0430\u043b\u0438\u0442\u044c\u00bb.\u0410\u0442\u043e\u043c\u0430\u0440\u043d\u043e\u0441\u0442\u044c: \u043b\u0438\u0431\u043e \u0432\u0441\u0451, \u043b\u0438\u0431\u043e \u043d\u0438\u0447\u0435\u0433\u043e.\u041b\u0438\u043c\u0438\u0442\u044b: \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0438\u0432\u0430\u0435\u043c \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432 \u0438 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u043c \u043f\u043e\u043d\u044f\u0442\u043d\u0443\u044e \u043e\u0448\u0438\u0431\u043a\u0443 413 Payload Too Large \u0441 \u043f\u043e\u0434\u0441\u043a\u0430\u0437\u043a\u043e\u0439.\u041c\u0430\u0441\u0441\u043e\u0432\u043e\u0435 \u0447\u0442\u0435\u043d\u0438\u0435\u0427\u0430\u0441\u0442\u044b\u0439 \u0430\u043d\u0442\u0438\u2011\u043f\u0430\u0442\u0442\u0435\u0440\u043d:GET \/v1\/resources\/batch?ids=1&amp;ids=2&amp;&#8230;\u0420\u0438\u0441\u043a \u2014 \u043b\u0438\u043c\u0438\u0442 \u0434\u043b\u0438\u043d\u044b URL \u043f\u0440\u0438 \u0431\u043e\u043b\u044c\u0448\u0438\u0445 \u0431\u0430\u0442\u0447\u0430\u0445. \u041b\u0443\u0447\u0448\u0435 \u0442\u0430\u043a:POST \/v1\/resources\/batch-get\u0422\u0435\u043b\u043e:{ &#171;ids&#187;: [&#171;guid-1&#187;, &#171;guid-2&#187;] }\u041e\u0442\u0432\u0435\u0442 200:{  &#171;resources&#187;: [    { &#171;id&#187;: &#171;guid-1&#187;, &#171;title&#187;: &#171;A&#187;, &#171;status&#187;: &#171;draft&#187; },    { &#171;id&#187;:&#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-475226","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/475226","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=475226"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/475226\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=475226"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=475226"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=475226"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}