प्रोटोकॉल गाइड

Google Sites के क्लासिक वर्शन का API, आपके ऐप्लिकेशन को Google साइट में मौजूद कॉन्टेंट को ऐक्सेस करने, पब्लिश करने, और उसमें बदलाव करने की अनुमति देता है. इसके अलावा, आपका ऐप्लिकेशन हाल की गतिविधि की सूची का अनुरोध कर सकता है, revisionhistory को फ़ेच कर सकता है, और अटैचमेंट और फ़ाइलों को अपलोड/डाउनलोड कर सकता है.

ऑडियंस

इस दस्तावेज़ में यह माना गया है कि आपको Google Data APIs प्रोटोकॉल के बारे में सामान्य जानकारी है.

यह दस्तावेज़ उन प्रोग्रामर के लिए है जो ऐसे क्लाइंट ऐप्लिकेशन लिखना चाहते हैं जो Google Sites के साथ इंटरैक्ट कर सकें. इसमें रॉ एक्सएमएल/एचटीटीपी का इस्तेमाल करके, डेटा एपीआई के साथ सामान्य इंटरैक्शन के उदाहरण दिए गए हैं. साथ ही, इनके बारे में जानकारी भी दी गई है. इस दस्तावेज़ को पढ़ने के बाद, हमारी क्लाइंट लाइब्रेरी का इस्तेमाल करके, एपीआई से इंटरैक्ट करने के बारे में ज़्यादा जाना जा सकता है. इसके लिए, बाईं ओर मौजूद नेविगेशन बार में दी गई अन्य गाइड में, भाषा के हिसाब से दिए गए उदाहरण पढ़ें.

इस गाइड में मौजूद कॉन्टेंट के रेफ़रंस के लिए, रेफ़रंस गाइड देखें.

अनुरोधों को अनुमति देना

जब आपका ऐप्लिकेशन, उपयोगकर्ता के ऐसे डेटा को ऐक्सेस करने का अनुरोध करता है जो सार्वजनिक नहीं है, तो उसे अनुमति वाला टोकन शामिल करना होगा. इस टोकन से Google आपके ऐप्लिकेशन की पहचान भी करता है.

अनुमति देने के प्रोटोकॉल के बारे में जानकारी

अनुरोधों को अनुमति देने के लिए, आपके ऐप्लिकेशन में OAuth 2.0 का इस्तेमाल किया जाना चाहिए. अनुमति देने वाले दूसरे प्रोटोकॉल इस्तेमाल नहीं किए जा सकते. अगर आपका ऐप्लिकेशन Google से साइन इन करने की सुविधा इस्तेमाल करता है, तो अनुमति देने से जुड़े कुछ पहलुओं को Google आपके लिए खुद मैनेज करता है.

OAuth 2.0 से अनुरोधों को अनुमति देना

उपयोगकर्ता के गैर-सार्वजनिक डेटा के लिए, Google Sites Data API को भेजे गए सभी अनुरोधों के लिए अनुमति किसी ऐसे उपयोगकर्ता को देनी चाहिए जिसके पास ऐसा करने का अधिकार हो.

OAuth 2.0 के लिए अनुमति देने की प्रक्रिया या "तरीका" अलग-अलग हो सकता है. यह इस बात पर निर्भर करता है कि ऐप्लिकेशन किस तरह का है. सभी तरह के ऐप्लिकेशन के लिए नीचे दी गई सामान्य प्रक्रिया लागू होती है:

  1. ऐप्लिकेशन बनाने के बाद, उसे Google API Console का इस्तेमाल करके, रजिस्टर किया जाता है. इसके बाद, Google आपको क्लाइंट आईडी और क्लाइंट सीक्रेट जैसी जानकारी देगा.
  2. Google API Console में Google Sites Data API को चालू करें. (अगर एपीआई को 'API कंसोल' की सूची में नहीं जोड़ा गया है, तो यह चरण छोड़ दें.)
  3. जब आपके ऐप्लिकेशन को उपयोगकर्ता के डेटा को ऐक्सेस करने की ज़रूरत होती है, तब वह Google से, डेटा के खास लिंक का अनुरोध करता है.
  4. Google, उपयोगकर्ता को सहमति वाली स्क्रीन दिखाता है, जिसमें उनसे आपके ऐप्लिकेशन को उनके कुछ डेटा को ऐक्सेस करने की अनुमति मांगी जाती है.
  5. अगर उपयोगकर्ता इसकी अनुमति दे देता है, तो Google आपके ऐप्लिकेशन को कुछ समय के लिए इस्तेमाल किए जा सकने वाला ऐक्सेस टोकन देता है.
  6. आपका ऐप्लिकेशन, ऐक्सेस टोकन से उपयोगकर्ता के डेटा को ऐक्सेस करने का अनुरोध करता है.
  7. अगर Google को पता चलता है कि आपका अनुरोध और टोकन मान्य है, तो वह आपके ऐप्लिकेशन को अनुरोध किए गए डेटा का ऐक्सेस दे देता है.

कुछ तरीकों में दूसरे चरण भी शामिल हो सकते हैं, जैसे कि रिफ़्रेश टोकन इस्तेमाल करके, नया ऐक्सेस टोकन पाना. अलग-अलग तरह के ऐप्लिकेशन के लिए डेटा ऐक्सेस करने के तरीकों के बारे में ज़्यादा जानकारी पाने के लिए, Google का OAuth 2.0 दस्तावेज़ पढ़ें.

यहां Google Sites Data API के लिए, OAuth 2.0 का इस्तेमाल करके अनुमति के लिए अनुरोध करने के बारे में जानकारी दी गई है:

https://sites.google.com/feeds/

OAuth 2.0 का इस्तेमाल करके, डेटा ऐक्सेस करने का अनुरोध करने के लिए, आपके ऐप्लिकेशन को अनुरोध के तरीके की जानकारी देनी होगी. साथ ही, वह जानकारी भी देनी होगी जो आपको ऐप्लिकेशन रजिस्टर करते समय, Google से मिली थी, जैसे कि क्लाइंट आईडी और क्लाइंट सीक्रेट.

वापस सबसे ऊपर जाएं

वर्शन तय करना

Google Sites Data API को किए जाने वाले हर अनुरोध में, वर्शन 1.4 के बारे में जानकारी दी जानी चाहिए. वर्शन नंबर तय करने के लिए, GData-Version एचटीटीपी हेडर का इस्तेमाल करें:

GData-Version: 1.4

इसके अलावा, अगर एचटीटीपी हेडर सेट नहीं किए जा सकते, तो यूआरएल में v=1.4 को क्वेरी पैरामीटर के तौर पर सेट किया जा सकता है. हालांकि, जहां भी हो सके वहां एचटीटीपी हेडर का इस्तेमाल करना बेहतर होता है.

ध्यान दें: क्लाइंट लाइब्रेरी, वर्शन हेडर अपने-आप उपलब्ध कराती हैं. इसलिए, क्लाइंट लाइब्रेरी का इस्तेमाल करते समय, v=1.4 क्वेरी पैरामीटर का इस्तेमाल न करें.

वापस सबसे ऊपर जाएं

साइट फ़ीड

साइट फ़ीड का इस्तेमाल, उन Google साइटों को लिस्ट करने के लिए किया जा सकता है जिनका मालिकाना हक किसी उपयोगकर्ता के पास है या जिनके लिए उसके पास देखने की अनुमतियां हैं. इसका इस्तेमाल, किसी मौजूदा साइट का टाइटल बदलने के लिए भी किया जा सकता है. G Suite डोमेन के लिए, इसका इस्तेमाल पूरी साइट बनाने या कॉपी करने के लिए भी किया जा सकता है.

लिस्टिंग वाली साइटें

किसी उपयोगकर्ता के पास जिन साइटों का ऐक्सेस है उनकी सूची पाने के लिए, पुष्टि किया गया GET अनुरोध इस यूआरएल पर भेजें:

https://sites.google.com/feeds/site/domainName
फ़ीड पैरामीटरब्यौरा
domainName'site' या G Suite के होस्ट किए गए डोमेन का डोमेन (जैसे, example.com).

जवाब में, साइटों की सूची वाला फ़ीड शामिल होगा:

GET /feeds/site/domainName HTTP/1.1
Host: sites.google.com
GData-Version: 1.4
Authorization: <your authorization header here>

HTTP/1.1 200 OK

<feed xmlns="http://www.w3.org/2005/Atom" xmlns:openSearch="http://a9.com/-/spec/opensearch/1.1/"
    xmlns:gAcl="http://schemas.google.com/acl/2007" xmlns:sites="http://schemas.google.com/sites/2008"
    xmlns:gs="http://schemas.google.com/spreadsheets/2006" xmlns:dc="http://purl.org/dc/terms"
    xmlns:batch="http://schemas.google.com/gdata/batch" xmlns:gd="http://schemas.google.com/g/2005"
    xmlns:thr="http://purl.org/syndication/thread/1.0">
<id>https://sites.google.com/feeds/site/site</id>
<updated>2009-12-02T17:47:34.406Z</updated>
<title>Site</title>
<link rel="http://schemas.google.com/g/2005#feed" type="application/atom+xml"
    href="https://sites.google.com/feeds/site/site"/>
<link rel="http://schemas.google.com/g/2005#post" type="application/atom+xml"
    href="https://sites.google.com/feeds/feeds/site/domainName"/>
<link rel="self" type="application/atom+xml" href="https://sites.google.com/feeds/site/domainName"/>
<link rel="next" type="application/atom+xml" href="https://sites.google.com/feeds/site/domainName/?start-index=2"/>
<generator version="1" uri="http://sites.google.com/">Google Sites</generator>
<openSearch:startIndex>1</openSearch:startIndex>
<entry gd:etag="W/&quot;CkUAQH4_eil7I2A9WxNaFk4.&quot;">
  <id>https://sites.google.com/feeds/site/site/myTestSite</id>
  <updated>2009-12-01T01:17:21.042Z</updated>
  <app:edited xmlns:app="http://www.w3.org/2007/app">2009-12-01T01:17:21.042Z</app:edited>
  <title>myTestSite</title>
  <summary/>
  <link rel="alternate" type="text/html" href="http://sites.google.com/site/myTestSite/"/>
  <link rel="http://schemas.google.com/acl/2007#accessControlList" type="application/atom+xml"
      href="https://sites.google.com/feeds/acl/site/domainName/myTestSite"/>
  <link rel="self" type="application/atom+xml" href="https://sites.google.com/feeds/site/domainName/myTestSite"/>
  <link rel="edit" type="application/atom+xml" href="https://sites.google.com/feeds/site/domainName/myTestSite"/>
  <sites:siteName>myTestSite</sites:siteName>
  <sites:theme>default</sites:theme>
</entry>
<entry gd:etag="W/&quot;DkQGQHczfA9WxNaFk4.&quot;">
  <id>https://sites.google.com/feeds/site/domainName/myOtherTestSite</id>
  <updated>2009-12-01T02:25:21.987Z</updated>
  <app:edited xmlns:app="http://www.w3.org/2007/app">2009-12-01T02:25:21.987Z</app:edited>
  <title>myOtherTestSite</title>
  <summary>A new site to hold memories</summary>
  <category scheme="http://schemas.google.com/sites/2008#tag" term="Memories Site"/>
  <link rel="alternate" type="text/html" href="http://sites.google.com/site/myOtherTestSite"/>
  <link rel="http://schemas.google.com/acl/2007#accessControlList" type="application/atom+xml"
      href="https://sites.google.com/feeds/acl/site/domainName/myOtherTestSite"/>
  <link rel="self" type="application/atom+xml" href="https://sites.google.com/feeds/site/domainName/myOtherTestSite"/>
  <link rel="edit" type="application/atom+xml" href="https://sites.google.com/feeds/site/domainName/myOtherTestSite"/>
  <sites:siteName>myOtherTestSite</sites:siteName>
  <sites:theme>iceberg</sites:theme>
</entry>
...
</feed>

साइटों को वर्णमाला के क्रम में दिखाया जाता है.

नई साइटें बनाना

ध्यान दें: यह सुविधा सिर्फ़ G Suite डोमेन के लिए उपलब्ध है.

नई साइटें उपलब्ध कराने के लिए, साइट फ़ीड को एचटीटीपी POST किया जा सकता है. उदाहरण के लिए:

POST /feeds/site/example.com HTTP/1.1
Host: sites.google.com
GData-Version: 1.4
Authorization: <your authorization header here>

<entry xmlns="http://www.w3.org/2005/Atom" xmlns:sites="http://schemas.google.com/sites/2008">
  <title>Source Site</title>
  <summary>A new site to hold memories</summary>
  <sites:theme>slate</sites:theme>
</entry>

ऊपर दिए गए अनुरोध से, G Suite डोमेन example.com के तहत 'स्लेट' थीम वाली एक नई Google साइट बन जाएगी. साइट का यूआरएल http://sites.google.com/a/example.com/source-site/ होगा.

अगर साइट बन जाती है, तो सर्वर 201 Created के साथ जवाब देगा. जवाब की एंट्री में, सर्वर से जोड़े गए एलिमेंट शामिल होंगे. जैसे, साइट का लिंक, साइट के एसीएल फ़ीड का लिंक, साइट का नाम, टाइटल, और खास जानकारी.

<entry xmlns="http://www.w3.org/2005/Atom" xmlns:gAcl="http://schemas.google.com/acl/2007"
    xmlns:sites="http://schemas.google.com/sites/2008" xmlns:gs="http://schemas.google.com/spreadsheets/2006"
    xmlns:dc="http://purl.org/dc/terms" xmlns:batch="http://schemas.google.com/gdata/batch"
    xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr="http://purl.org/syndication/thread/1.0"
    gd:etag="W/&quot;DEECR38l7I2A9WxNaF0Q.&quot;">
  <id>https://sites.google.com/feeds/site/example.com/source-site</id>
  <updated>2009-12-02T23:31:06.184Z</updated>
  <app:edited xmlns:app="http://www.w3.org/2007/app">2009-12-02T23:31:06.184Z</app:edited>
  <title>New Test Site</title>
  <summary>A new site to hold memories</summary>
  <link rel="alternate" type="text/html" href="http://sites.google.com/a/example.com/source-site/"/>
  <link rel="http://schemas.google.com/acl/2007#accessControlList" type="application/atom+xml"
      href="https://sites.google.com/feeds/acl/site/example.com/source-site"/>
  <link rel="self" type="application/atom+xml" href="https://sites.google.com/feeds/site/example.com/source-site"/>
  <link rel="edit" type="application/atom+xml" href="https://sites.google.com/feeds/site/example.com/source-site"/>
  <sites:siteName>source-site</sites:siteName>
  <sites:theme>slate</sites:theme>
</entry>

किसी साइट को कॉपी करना

ध्यान दें: यह सुविधा सिर्फ़ G Suite डोमेन के लिए उपलब्ध है.

किसी मौजूदा साइट को डुप्लीकेट करने का तरीका वही है जो नई साइट बनाने का है. हालांकि, POST अनुरोध की ऐटम एंट्री में, <link> को शामिल करें. इसमें rel='source', कॉपी की जाने वाली साइट के साइट फ़ीड की ओर इशारा करता है. जिस साइट को कॉपी किया गया है उसके पास यह लिंक होगा. किसी साइट को डुप्लीकेट करने का उदाहरण यहां दिया गया है:

POST /feeds/site/example.com HTTP/1.1
Host: sites.google.com
GData-Version: 1.4
Authorization: <your authorization header here>

<entry xmlns="http://www.w3.org/2005/Atom">
  <link rel="http://schemas.google.com/sites/2008#source" type="application/atom+xml"
      href="https://sites.google.com/feeds/site/example.com/source-site"/>
  <title>Copy of New Test Site</title>
  <summary>A newer site to hold memories</summary>
</entry>

ऊपर दिए गए अनुरोध से, http://sites.google.com/a/example.com/source-site/ पर मौजूद साइट कॉपी हो जाएगी.

अहम जानकारी:

  • सिर्फ़ उन साइटों और साइट टेंप्लेट को कॉपी किया जा सकता है जिनका मालिकाना हक पुष्टि किए गए उपयोगकर्ता के पास है.
  • साइट टेंप्लेट को भी कॉपी किया जा सकता है. अगर Google Sites की सेटिंग वाले पेज पर, "इस साइट को एक टेंप्लेट के तौर पर पब्लिश करें" सेटिंग पर सही का निशान लगा है, तो इसका मतलब है कि साइट एक टेंप्लेट है.
  • आपके पास किसी दूसरी साइट को कॉपी करने का विकल्प होता है. हालांकि, इसके लिए ज़रूरी है कि आपको सोर्स साइट पर मालिक के तौर पर शामिल किया गया हो.

किसी साइट का मेटाडेटा अपडेट करना

किसी साइट के टाइटल या खास जानकारी को अपडेट करने के लिए, साइट की एंट्री के edit लिंक पर एचटीटीपी PUT भेजें. उदाहरण के लिए, यहां दिए गए उदाहरण में, पिछली साइट के टाइटल को New Test Site2 और उसके ब्यौरे को Newer description में अपडेट किया जाएगा.

PUT /feeds/site/example.com/source-site HTTP/1.1
Host: sites.google.com
GData-Version: 1.4
Authorization: <your authorization header here>

<entry xmlns="http://www.w3.org/2005/Atom" xmlns:gAcl="http://schemas.google.com/acl/2007"
    xmlns:sites="http://schemas.google.com/sites/2008" xmlns:gs="http://schemas.google.com/spreadsheets/2006"
    xmlns:dc="http://purl.org/dc/terms" xmlns:batch="http://schemas.google.com/gdata/batch"
    xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr="http://purl.org/syndication/thread/1.0"
    gd:etag="W/&quot;DEECR38l7I2A9WxNaF0Q.&quot;">
  <id>https://sites.google.com/feeds/site/example.com/source-site</id>
  <updated>2009-12-02T23:31:06.184Z</updated>
  <app:edited xmlns:app="http://www.w3.org/2007/app">2009-12-02T23:31:06.184Z</app:edited>
  <title>New Test Site2</title>
  <summary>Newer description</summary>
  <category scheme="http://schemas.google.com/sites/2008#tag" term="Category"/>
  <link rel="alternate" type="text/html" href="http://sites.google.com/a/example.com/source-site/"/>
  <link rel="http://schemas.google.com/acl/2007#accessControlList" type="application/atom+xml"
      href="https://sites.google.com/feeds/acl/site/example.com/source-site"/>
  <link rel="self" type="application/atom+xml" href="https://sites.google.com/feeds/site/example.com/source-site"/>
  <link rel="edit" type="application/atom+xml" href="https://sites.google.com/feeds/site/example.com/source-site"/>
  <sites:siteName>source-site</sites:siteName>
</entry>

कैटगरी जोड़ना

ध्यान दें: यह सुविधा सिर्फ़ G Suite डोमेन के लिए उपलब्ध है.

G Suite for your Domain की साइटों में कैटगरी का मेटा डेटा शामिल होता है. यह आपके डोमेन में साइटों को कैटगरी के हिसाब से व्यवस्थित करने के लिए काम का होता है. कैटेगरी का मेटा डेटा जोड़ने या अपडेट करने के लिए, अपनी साइट की एंट्री के edit लिंक पर एचटीटीपी PUT भेजें. इसमें category टैग शामिल होना चाहिए. यहां दिए गए उदाहरण में बोल्ड की गई लाइन देखें:

PUT /feeds/site/example.com/source-site HTTP/1.1
Host: sites.google.com
GData-Version: 1.4
Authorization: <your authorization header here>

<entry xmlns="http://www.w3.org/2005/Atom" xmlns:gAcl="http://schemas.google.com/acl/2007"
    xmlns:sites="http://schemas.google.com/sites/2008" xmlns:gs="http://schemas.google.com/spreadsheets/2006"
    xmlns:dc="http://purl.org/dc/terms" xmlns:batch="http://schemas.google.com/gdata/batch"
    xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr="http://purl.org/syndication/thread/1.0"
    gd:etag="W/&quot;DEECR38l7I2A9WxNaF0Q.&quot;">
  <id>https://sites.google.com/feeds/site/example.com/source-site</id>
  <updated>2009-12-02T23:31:06.184Z</updated>
  <app:edited xmlns:app="http://www.w3.org/2007/app">2009-12-02T23:31:06.184Z</app:edited>
  <title>My Team website</title>
  <summary>This site contains contact information and a summary of major efforts our team owns</summary>
  <category scheme="http://schemas.google.com/sites/2008#tag" term="Team Site"/>
  <link rel="alternate" type="text/html" href="http://sites.google.com/a/example.com/my-team-site/"/>
  <link rel="http://schemas.google.com/acl/2007#accessControlList" type="application/atom+xml"
      href="https://sites.google.com/feeds/acl/site/example.com/my-team-site"/>
  <link rel="self" type="application/atom+xml" href="https://sites.google.com/feeds/site/example.com/my-team-site"/>
  <link rel="edit" type="application/atom+xml" href="https://sites.google.com/feeds/site/example.com/my-team-site"/>
  <sites:siteName>my-team-site</sites:siteName>
</entry>

इस उदाहरण में, किसी मौजूदा साइट में बदलाव करने और "टीम साइट" कैटगरी जोड़ने का तरीका बताया गया है.

अतिरिक्त <category> टैग जोड़कर, एक से ज़्यादा कैटगरी भी जोड़ी जा सकती हैं. यहां दिए गए उदाहरण में, बोल्ड की गई लाइनें देखें:

PUT /feeds/site/example.com/my-team-site HTTP/1.1
Host: sites.google.com
GData-Version: 1.4
Authorization: <your authorization header here>

<entry xmlns="http://www.w3.org/2005/Atom" xmlns:gAcl="http://schemas.google.com/acl/2007"
    xmlns:sites="http://schemas.google.com/sites/2008" xmlns:gs="http://schemas.google.com/spreadsheets/2006"
    xmlns:dc="http://purl.org/dc/terms" xmlns:batch="http://schemas.google.com/gdata/batch"
    xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr="http://purl.org/syndication/thread/1.0"
    gd:etag="W/&quot;DEECR38l7I2A9WxNaF0Q.&quot;">
  <id>https://sites.google.com/feeds/site/example.com/my-team-site</id>
  <updated>2009-12-02T23:31:06.184Z</updated>
  <app:edited xmlns:app="http://www.w3.org/2007/app">2009-12-02T23:31:06.184Z</app:edited>
  <title>My Team website</title>
  <summary>This site contains contact information and a summary of major efforts our team owns</summary>
  <category scheme="http://schemas.google.com/sites/2008#tag" term="Team Site/">
  <category scheme="http://schemas.google.com/sites/2008#tag" term="Legal Department/">
  <link rel="alternate" type="text/html" href="http://sites.google.com/a/example.com/my-team-site/"/>
  <link rel="http://schemas.google.com/acl/2007#accessControlList" type="application/atom+xml"
      href="https://sites.google.com/feeds/acl/site/example.com/my-team-site"/>
  <link rel="self" type="application/atom+xml" href="https://sites.google.com/feeds/site/example.com/my-team-site"/>
  <link rel="edit" type="application/atom+xml" href="https://sites.google.com/feeds/site/example.com/my-team-site"/>
  <sites:siteName>my-team-site</sites:siteName>
</entry>

इस उदाहरण में, दो कैटगरी जोड़ी गई हैं: "टीम साइट" और "कानूनी विभाग"

वेब पते की मैपिंग

वेब पते की मैपिंग की मदद से, Sites के उपयोगकर्ता अपने डोमेन को Google साइट से मैप कर सकते हैं. उदाहरण के लिए, http://sites.google.com/a/domain.com/mysite के बजाय http://www.mydomainsite.com का इस्तेमाल किया जा सकता है. आपकी साइट कहां होस्ट की गई है, इसके आधार पर किसी साइट के वेब पते की मैपिंग में मैन्युअल तरीके से बदलाव किया जा सकता है. ज़्यादा जानकारी के लिए, हमारे सहायता केंद्र का लेख देखें.

किसी साइट के वेब पते की मैपिंग फ़ेच करना

किसी साइट के लिए वेब पते की मैपिंग वापस पाने के लिए, with-mappings=true पैरामीटर के साथ साइट एंट्री/फ़ीड फ़ेच करें:

GET /feeds/site/domainName?with-mappings=true HTTP/1.1
Host: sites.google.com
GData-Version: 1.4
Authorization: <your authorization header here>

HTTP/1.1 200 OK

<feed xmlns="http://www.w3.org/2005/Atom" xmlns:openSearch="http://a9.com/-/spec/opensearch/1.1/"
    xmlns:gAcl="http://schemas.google.com/acl/2007" xmlns:sites="http://schemas.google.com/sites/2008"
    xmlns:gs="http://schemas.google.com/spreadsheets/2006" xmlns:dc="http://purl.org/dc/terms"
    xmlns:batch="http://schemas.google.com/gdata/batch" xmlns:gd="http://schemas.google.com/g/2005"
    xmlns:thr="http://purl.org/syndication/thread/1.0">
...
<entry gd:etag="W/&quot;DkQGQHczfA9WxNaFk4.&quot;">
  <id>https://sites.google.com/feeds/site/domainName/myOtherTestSite</id>
  <updated>2009-12-01T02:25:21.987Z</updated>
  <app:edited xmlns:app="http://www.w3.org/2007/app">2009-12-01T02:25:21.987Z</app:edited>
  <title>myOtherTestSite</title>
  <summary>A new site to hold memories</summary>
  <link rel="alternate" type="text/html" href="http://sites.google.com/site/myOtherTestSite"/>
  <link rel="http://schemas.google.com/acl/2007#accessControlList" type="application/atom+xml"
      href="https://sites.google.com/feeds/acl/site/domainName/myOtherTestSite"/>
  <link rel="self" type="application/atom+xml" href="https://sites.google.com/feeds/site/domainName/myOtherTestSite"/>
  <link rel="edit" type="application/atom+xml" href="https://sites.google.com/feeds/site/domainName/myOtherTestSite"/>
  <link rel='webAddressMapping' href='http://www.mysitemapping.com'>
  <link rel='webAddressMapping' href='http://www.mysitemapping2.com'>
  <link rel='webAddressMapping' href='http://www.myothermapping.org'>
</entry>
...
</feed>

मौजूदा मैपिंग, rel='webAddressMapping' वाले link के तौर पर दिखेंगी. उदाहरण के लिए, ऊपर दिए गए उदाहरण में तीन webAddressMapping हैं, जो साइट http://sites.google.com/site/myOtherTestSite की ओर इशारा करते हैं.

वेब पते की मैपिंग में बदलाव करना

ध्यान दें: वेब पते की मैपिंग के साथ काम करते समय, सभी GET/POST/PUT कार्रवाइयों में with-mappings=true पैरामीटर के बारे में बताना चाहिए. अगर पैरामीटर मौजूद नहीं है, तो साइट की एंट्री (GET) में webAddressMappings नहीं दिखेंगे. इसके अलावा, किसी एंट्री से मैपिंग को अपडेट/हटाते (PUT) समय भी इस पर विचार नहीं किया जाएगा.

मैपिंग जोड़ने, अपडेट करने या मिटाने के लिए, नई साइटें बनाते समय या किसी साइट के मेटाडेटा को अपडेट करते समय, ऐसे लिंक को सिर्फ़ तय करें, बदलें या हटाएं. साइट फ़ीड यूआरआई में with-mappings=true पैरामीटर शामिल होना चाहिए. ध्यान दें: पते की मैपिंग अपडेट करने के लिए, आपको साइट एडमिन होना चाहिए. अगर साइट को G Suite पर होस्ट किया गया है, तो आपको डोमेन एडमिन होना चाहिए.

उदाहरण के लिए, यहां दिए गए अनुरोध में http://www.mysitemapping.com मैपिंग को http://www.my-new-sitemapping.com पर अपडेट किया गया है. साथ ही, एंट्री से लिंक हटाकर http://www.mysitemapping2.com को हटाया गया है:

PUT /feeds/site/domainName?with-mappings=true HTTP/1.1
Host: sites.google.com
GData-Version: 1.4
Authorization: <your authorization header here>

<entry gd:etag="W/&quot;DkQGQHczfA9WxNaFk4.&quot;">
  <id>https://sites.google.com/feeds/site/domainName/myOtherTestSite</id>
  <updated>2009-12-01T02:25:21.987Z</updated>
  <app:edited xmlns:app="http://www.w3.org/2007/app">2009-12-01T02:25:21.987Z</app:edited>
  <title>myOtherTestSite</title>
  <summary>A new site to hold memories</summary>
  <link rel="alternate" type="text/html" href="http://sites.google.com/site/myOtherTestSite"/>
  <link rel="http://schemas.google.com/acl/2007#accessControlList" type="application/atom+xml"
      href="https://sites.google.com/feeds/acl/site/domainName/myOtherTestSite"/>
  <link rel="self" type="application/atom+xml" href="https://sites.google.com/feeds/site/domainName/myOtherTestSite"/>
  <link rel="edit" type="application/atom+xml" href="https://sites.google.com/feeds/site/domainName/myOtherTestSite"/>
  <link rel='webAddressMapping' href='www.my-new-sitemapping.com'>
  <!-- missing mapping2 will be deleted -->
  <link rel='webAddressMapping' href='http://www.myothermapping.org'>
</entry>

ध्यान दें कि साइट बनाते/कॉपी करते समय भी, वेब पते की मैपिंग तय की जा सकती है.

वापस सबसे ऊपर जाएं

गतिविधि फ़ीड

गतिविधि फ़ीड को फ़ेच करके, किसी साइट पर हाल ही में की गई गतिविधि (बदलाव) की जानकारी पाई जा सकती है. गतिविधि फ़ीड में मौजूद हर एंट्री में, साइट में किए गए बदलाव की जानकारी होती है.

गतिविधि फ़ीड के बारे में क्वेरी करने के लिए, गतिविधि फ़ीड के यूआरएल पर एचटीटीपी GET भेजें:

https://sites.google.com/feeds/activity/domainName/siteName
फ़ीड पैरामीटरब्यौरा
domainName'site' या G Suite के होस्ट किए गए डोमेन का डोमेन (जैसे, example.com).
siteNameआपकी साइट का वेबस्पेस नाम.यह साइट के यूआरएल में मौजूद होता है. उदाहरण के लिए, myCoolSite.

अनुरोध और जवाब का उदाहरण:

GET /feeds/activity/site/siteName HTTP/1.1
Host: sites.google.com
GData-Version: 1.4
Authorization: <your authorization header here>

HTTP/1.1 200 OK

<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xmlns:openSearch="http://a9.com/-/spec/opensearch/1.1/">
<id>https://sites.google.com/feeds/activity/site/siteName</id>
<updated>2009-09-10T05:24:23.120Z</updated>
<title>Activity</title>
<link rel="alternate" type="text/html" href="http://sites.google.com/site/siteName/system/app/pages/recentChanges"/>
<link rel="http://schemas.google.com/g/2005#feed" type="application/atom+xml"
  href="https://sites.google.com/feeds/activity/site/siteName"/>
<link rel="self" type="application/atom+xml"
  href="https://sites.google.com/feeds/activity/site/siteName"/>
<generator version="1" uri="http://sites.google.com">Google Sites</generator>
<openSearch:startIndex>1</openSearch:startIndex>
<entry xmlns:gd="http://schemas.google.com/g/2005" gd:etag="W/&quot;CU4GQ3szfSl7ImA9WxNRFUg.&quot;">
<id>https://sites.google.com/feeds/activity/site/siteName/940375996952876062</id>
<updated>2009-09-10T03:38:42.585Z</updated>
<category scheme="http://schemas.google.com/g/2005#kind" term="http://schemas.google.com/sites/2008#deletion" label="deletion"/>
<title>home</title>
<summary type="xhtml">
  <div xmlns="http://www.w3.org/1999/xhtml">User deleted <a href="http://sites.google.com/site/siteName/home">home</a>
</div>
</summary>
<link rel="http://schemas.google.com/sites/2008#revision" type="application/atom+xml"
  href="https://sites.google.com/feeds/revision/site/siteName/5409745539831916487"/>
<link rel="http://schemas.google.com/sites/2008#current" type="application/atom+xml"
  href="https://sites.google.com/feeds/content/site/siteName/5409745539831916487"/>
<link rel="self" type="application/atom+xml"
  href="https://sites.google.com/feeds/activity/site/siteName/940375996952876062"/>
<author>
  <name>User</name>
  <email>user@gmail.com</email>
</author>
</entry>
<entry xmlns:gd="http://schemas.google.com/g/2005" gd:etag="W/&quot;CU8DQn45fyl7ImA9WxNRFUg.&quot;">
  <id>https://sites.google.com/feeds/activity/site/siteName/7165439066235480082</id>
  <updated>2009-09-10T03:37:53.027Z</updated>
  <category scheme="http://schemas.google.com/g/2005#kind"
    term="http://schemas.google.com/sites/2008#edit" label="edit"/>
  <title>home</title>
  <summary type="xhtml">
    <div xmlns="http://www.w3.org/1999/xhtml">User2 edited <a href="http://sites.google.com/site/siteName/home">home</a>
  </div>
  </summary>
  <link rel="http://schemas.google.com/sites/2008#revision" type="application/atom+xml"
    href="https://sites.google.com/feeds/revision/site/siteName/5409745539831916487"/>
  <link rel="http://schemas.google.com/sites/2008#current" type="application/atom+xml"
    href="https://sites.google.com/feeds/content/site/siteName/5409745539831916487"/>
  <link rel="self" type="application/atom+xml"
    href="https://sites.google.com/feeds/activity/site/siteName/7165439066235480082"/>
  <author>
    <name>User</name>
    <email>user@gmail.com</email>
  </author>
</entry>
<entry xmlns:gd="http://schemas.google.com/g/2005" gd:etag="W/&quot;CU8AR3s4cSl7ImA9WxNRFUg.&quot;">
  <id>https://sites.google.com/feeds/activity/site/siteName/127448462987345884</id>
  <updated>2009-09-10T03:37:26.539Z</updated>
  <category scheme="http://schemas.google.com/g/2005#kind"
    term="http://schemas.google.com/sites/2008#creation" label="creation"/>
  <title>home</title>
  <summary type="xhtml">
    <div xmlns="http://www.w3.org/1999/xhtml">User3 created <a href="http://sites.google.com/site/siteName/home">home</a>
  </div>
  </summary>
  <link rel="http://schemas.google.com/sites/2008#revision" type="application/atom+xml"
    href="https://sites.google.com/feeds/revision/site/siteName/5409745539831916487"/>
  <link rel="http://schemas.google.com/sites/2008#current" type="application/atom+xml"
    href="https://sites.google.com/feeds/content/site/siteName/5409745539831916487"/>
  <link rel="self" type="application/atom+xml"
    href="https://sites.google.com/feeds/activity/site/siteName/127448462987345884"/>
  <author>
    <name>User3</name>
    <email>user3@gmail.com</email>
  </author>
</entry>
</feed>

ध्यान दें: इस फ़ीड को ऐक्सेस करने के लिए, यह ज़रूरी है कि आप साइट के सहयोगी या मालिक हों. आपके क्लाइंट को सही Authorization हेडर भेजना होगा. साथ ही, अनुरोधों को अनुमति देना में मिले टोकन का रेफ़रंस देना होगा.

वापस सबसे ऊपर जाएं

बदलाव का फ़ीड

किसी भी कॉन्टेंट एंट्री के लिए, बदलाव का इतिहास पाने के लिए, एंट्री के बदलाव वाले लिंक पर एचटीटीपी GET भेजें:

https://sites.google.com/feeds/revision/domainName/siteName/CONTENT_ENTRY_ID
फ़ीड पैरामीटरब्यौरा
domainName'site' या G Suite के होस्ट किए गए डोमेन का डोमेन (जैसे, example.com).
siteNameआपकी साइट का वेबस्पेस नाम.यह साइट के यूआरएल में मौजूद होता है. उदाहरण के लिए, myCoolSite.

किसी पेज/टिप्पणी/अटैचमेंट/सूची आइटम के लिए बदलावों का लिंक ढूंढने के लिए, पहले उसके CONTENT_ENTRY_ID का इस्तेमाल करके, कॉन्टेंट फ़ीड से एंट्री पाएं. फिर से पाई गई एंट्री में, बदलाव वाले फ़ीड का <atom:link> शामिल होगा. उदाहरण के लिए:

<link rel="http://schemas.google.com/sites/2008#revision" type="application/atom+xml"
    href="https://sites.google.com/feeds/revision/domainName/siteName/CONTENT_ENTRY_ID"/>

अनुरोध और जवाब का उदाहरण:

GET /feeds/revision/domainName/siteName/CONTENT_ENTRY_ID HTTP/1.1
Host: sites.google.com
GData-Version: 1.4
Authorization: <your authorization header here>

HTTP/1.1 200 OK

<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xmlns:openSearch="http://a9.com/-/spec/opensearch/1.1/"
    xmlns:sites="http://schemas.google.com/sites/2008" xmlns:gs="http://schemas.google.com/spreadsheets/2006"
    xmlns:dc="http://purl.org/dc/terms" xmlns:batch="http://schemas.google.com/gdata/batch"
    xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr="http://purl.org/syndication/thread/1.0">
<id>https://sites.google.com/feeds/revision/domainName/siteName/CONTENT_ENTRY_ID</id>
<updated>2009-09-10T04:33:35.337Z</updated>
<title>Revisions</title>
<link rel="http://schemas.google.com/g/2005#feed" type="application/atom+xml"
    href="https://sites.google.com/feeds/revision/domainName/siteName/CONTENT_ENTRY_ID"/>
<link rel="self" type="application/atom+xml"
    href="https://sites.google.com/feeds/revision/domainName/siteName/CONTENT_ENTRY_ID"/>
<generator version="1" uri="http://sites.google.com">Google Sites</generator>
<openSearch:startIndex>1</openSearch:startIndex>
<entry gd:etag="W/&quot;CU4GQmA9WxNRFUg.&quot;">
  <id>https://sites.google.com/feeds/revision/domainName/siteName/CONTENT_ENTRY_ID/2</id>
  <updated>2009-09-10T03:38:42.045Z</updated>
  <category scheme="http://schemas.google.com/g/2005#kind"
      term="http://schemas.google.com/sites/2008#webpage" label="webpage"/>
  <title>Home</title>
  <content type="xhtml">
    <div xmlns="http://www.w3.org/1999/xhtml">Latest content here</div>
  </content>
  <link rel="alternate" type="text/html"
    href="http://sites.google.com/domainName/siteName/CONTENT_ENTRY_ID/system/app/pages/admin/compare?wuid=wuid%3Agx%3A4f67c7&amp;rev1=2"/>
  <link rel="self" type="application/atom+xml" href="https://sites.google.com/feeds/revision/domainName/siteName/CONTENT_ENTRY_ID/2"/>
  <author>
    <name>User</name>
    <email>user@gmail.com</email>
  </author>
  <sites:pageName>home</sites:pageName>
  <sites:revision>2</sites:revision>
</entry>
<entry gd:etag="W/&quot;CU8DQ388eSl7ImA9WxNRFUg.&quot;">
  <id>https://sites.google.com/feeds/revision/domainName/siteName/CONTENT_ENTRY_ID/1</id>
  <updated>2009-09-10T03:37:52.171Z</updated>
  <category scheme="http://schemas.google.com/g/2005#kind"
      term="http://schemas.google.com/sites/2008#webpage" label="webpage"/>
  <title>Home</title>
  <content type="xhtml">
    <div xmlns="http://www.w3.org/1999/xhtml">Older content here</div>
  </content>
  <link rel="alternate" type="text/html"
    href="http://sites.google.com/domainName/siteName/CONTENT_ENTRY_ID/system/app/pages/admin/compare?wuid=wuid%3Agx%3A4bc7&amp;rev1=1"/>
  <link rel="self" type="application/atom+xml"
    href="https://sites.google.com/feeds/revision/domainName/siteName/CONTENT_ENTRY_ID/1"/>
  <author>
    <name>User</name>
    <email>user@gmail.com</email>
  </author>
  <sites:pageName>home</sites:pageName>
  <sites:revision>1</sites:revision>
</entry>
</feed>

ध्यान दें: इस फ़ीड को ऐक्सेस करने के लिए, यह ज़रूरी है कि आप साइट के सहयोगी या मालिक हों. आपके क्लाइंट को सही Authorization हेडर भेजना होगा. साथ ही, अनुरोधों को अनुमति देना में मिले टोकन का रेफ़रंस देना होगा.

वापस सबसे ऊपर जाएं

कॉन्टेंट फ़ीड

कॉन्टेंट वापस पाना

कॉन्टेंट फ़ीड में, साइट के मौजूदा कॉन्टेंट की सूची होती है. पुष्टि किया गया GET अनुरोध, इस यूआरएल पर भेजें:

https://sites.google.com/feeds/content/domainName/siteName
फ़ीड पैरामीटरब्यौरा
domainName'site' या G Suite के होस्ट किए गए डोमेन का डोमेन (जैसे, example.com).
siteNameआपकी साइट का वेबस्पेस नाम.यह साइट के यूआरएल में मौजूद होता है. उदाहरण के लिए, myCoolSite.

नतीजे के तौर पर, एक ऐसा फ़ीड मिलता है जिसमें साइट पर मौजूद कॉन्टेंट एंट्री के पहले पेज की सूची होती है. फ़ीड में मौजूद हर एंट्री, अलग-अलग तरह के कॉन्टेंट की एंट्री को दिखाएगी. जैसे, webpage, filecabinet, attachment, comment वगैरह. <category scheme="http://schemas.google.com/g/2005#kind"> एलिमेंट से एंट्री के टाइप का पता चलता है. kind एट्रिब्यूट की वैल्यू की सूची देखने के लिए, रेफ़रंस गाइड देखें.

ध्यान दें: इस फ़ीड के लिए पुष्टि करना ज़रूरी हो सकता है या नहीं भी हो सकता. यह साइट की शेयर करने की अनुमतियों पर निर्भर करता है. अगर साइट सार्वजनिक नहीं है, तो आपके क्लाइंट को सही Authorization हेडर (ऊपर दिए गए उदाहरण में दिखाया गया है) भेजना होगा. साथ ही, अनुरोधों को अनुमति देना में मिले टोकन का रेफ़रंस देना होगा.

GET /feeds/content/domainName/siteName HTTP/1.1
Host: sites.google.com
GData-Version: 1.4
Authorization: <your authorization header here>

HTTP/1.1 200 OK

<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xmlns:openSearch="http://a9.com/-/spec/opensearch/1.1/"
  xmlns:sites="http://schemas.google.com/sites/2008" xmlns:gs="http://schemas.google.com/spreadsheets/2006"
  xmlns:dc="http://purl.org/dc/terms" xmlns:batch="http://schemas.google.com/gdata/batch"
  xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr="http://purl.org/syndication/thread/1.0">
<id>https://sites.google.com/feeds/content/domainName/siteName</id>
<updated>2009-08-31T01:39:20.286Z</updated>
<title>Content</title>
<link rel="http://schemas.google.com/g/2005#feed" type="application/atom+xml"
    href="https://sites.google.com/feeds/content/domainName/siteName"/>
<link rel="http://schemas.google.com/g/2005#post" type="application/atom+xml"
    href="https://sites.google.com/feeds/content/domainName/siteName"/>
<link rel="self" type="application/atom+xml"
    href="https://sites.google.com/feeds/content/domainName/siteName"/>
<link rel="http://schemas.google.com/g/2005#batch" type="application/atom+xml"
    href="https://sites.google.com/feeds/content/domainName/siteName/batch""/>
<link rel="next" type="application/atom+xml" href="https://sites.google.com/feeds/content/domainName/siteName/?start-index=2"/>
<generator version="1" uri="http://sites.google.com">Google Sites</generator>
<openSearch:startIndex>1</openSearch:startIndex>
<entry gd:etag="W/&quot;Ck8GQXk7fil7ImA9WxNSFk0.&quot;">
  <id>https://sites.google.com/feeds/content/domainName/siteName/7322156894</id>
  <updated>2009-08-30T02:53:40.706Z</updated>
  <app:edited xmlns:app="http://www.w3.org/2007/app">2009-08-30T02:53:40.706Z</app:edited>
  <category scheme="http://schemas.google.com/g/2005#kind"
      term="http://schemas.google.com/sites/2008#webpage" label="webpage"/>
  <title>Subpage</title>
  <content type="xhtml">
    <div xmlns="http://www.w3.org/1999/xhtml">Page html content here</div>
  </content>
  <link rel="http://schemas.google.com/sites/2008#parent" type="application/atom+xml"
      href="https://sites.google.com/feeds/content/domainName/siteName/6492205817"/>
  <link rel="alternate" type="text"
      href="http://sites.google.com/site/siteName/subpage"/>
  <link rel="http://schemas.google.com/sites/2008#revision" type="application/atom+xml"
      href="https://sites.google.com/feeds/revision/domainName/siteName/7322156894"/>
  <link rel="self" type="application/atom+xml"
      href="https://sites.google.com/feeds/content/domainName/siteName/7322156894"/>
  <link rel="edit" type="application/atom+xml"
      href="https://sites.google.com/feeds/content/domainName/siteName/7322156894"/>
  <author>
    <name>User</name>
    <email>user@gmail.com</email>
  </author>
  <sites:pageName>subpage</sites:pageName>
  <sites:revision>5</sites:revision>
</entry>
<entry gd:etag="W/&quot;CkMBQH08fCl7ImA9WxNSFk0.&quot;">
  <id>https://sites.google.com/feeds/content/domainName/siteName/5930635231</id>
  <updated>2009-08-30T02:47:31.374Z</updated>
  <app:edited xmlns:app="http://www.w3.org/2007/app">2009-08-30T02:47:31.374Z</app:edited>
  <category scheme="http://schemas.google.com/g/2005#kind"
      term="http://schemas.google.com/sites/2008#listitem" label="listpage"/>
  <title/>
  <link rel="http://schemas.google.com/sites/2008#parent" type="application/atom+xml"
      href="https://sites.google.com/feeds/content/domainName/siteName/5930635231"/>
  <link rel="http://schemas.google.com/sites/2008#revision" type="application/atom+xml"
      href="https://sites.google.com/feeds/revision/domainName/siteName/5930635231"/>
  <link rel="self" type="application/atom+xml"
      href="https://sites.google.com/feeds/content/domainName/siteName/5930635231"/>
  <link rel="edit" type="application/atom+xml"
      href="https://sites.google.com/feeds/content/domainName/siteName/5930635231"/>
  <author>
    <name>User</name>
    <email>user@gmail.com</email>
  </author>
  <sites:revision>1</sites:revision>
  <gs:field index="A" name="Issue/Feature">Implement cool feature X</gs:field>
  <gs:field index="B" name="Priority">P2</gs:field>
  <gs:field index="C" name="Owner"/>
  <gs:field index="D" name="Resolved"/>
</entry>
<entry gd:etag="W/&quot;AkYHQ3ozcCl7ImA9WxJaE08.&quot;">
  <id>https://sites.google.com/feeds/content/domainName/siteName/1265948545471894517</id>
  <updated>2009-08-03T19:35:32.488Z</updated>
  <app:edited xmlns:app="http://www.w3.org/2007/app">2009-08-03T19:35:32.488Z</app:edited>
  <category scheme="http://schemas.google.com/g/2005#kind"
      term="http://schemas.google.com/sites/2008#filecabinet" label="filecabinet"/>
  <title>files</title>
  <content type="xhtml">
    <div xmlns="http://www.w3.org/1999/xhtml">Page html content here</div>
  </content>
  <link rel="alternate" type="text"
      href="https://sites.google.com/domainName/siteName/files"/>
  <link rel="http://schemas.google.com/sites/2008#revision" type="application/atom+xml"
      href="https://sites.google.com/feeds/revision/domainName/siteName/12671894517"/>
  <link rel="self" type="application/atom+xml"
      href="https://sites.google.com/feeds/content/domainName/siteName/12671894517"/>
  <link rel="edit" type="application/atom+xml"
      href="https://sites.google.com/feeds/content/domainName/siteName/12671894517"/>
  <author>
    <name>User</name>
    <email>user@gmail.com</email>
  </author>
  <gd:feedLink href="httpn://sites.google.com/feeds/content/domainName/siteName?parent=12671894517"/>
  <sites:pageName>files</sites:pageName>
  <sites:revision>1</sites:revision>
</entry>
...
</feed>

ध्यान दें: ये सिर्फ़ शुरुआती कुछ नतीजे हैं. पूरे कॉन्टेंट फ़ीड में पेज के हिसाब से जाने के लिए, फ़ीड के 'next' लिंक पर जाएं:

<link rel="next" type="application/atom+xml" href="https://sites.google.com/feeds/content/domainName/siteName/?start-index=2"/>

Atom के सामान्य एलिमेंट के बारे में जानने के लिए, Google Data Protocol का रेफ़रंस देखें. क्लासिक Sites API के लिए खास मायने रखने वाले एलिमेंट के बारे में यहां बताया गया है. कुछ तरह की एंट्री में अतिरिक्त प्रॉपर्टी होंगी, जो यहां नहीं दी गई हैं. हालांकि, अन्य एंट्री में ये प्रॉपर्टी नहीं होंगी. उदाहरण के लिए, listitem एंट्री में <gs:field> एलिमेंट हो सकते हैं, जबकि webpage एंट्री में नहीं.

एलिमेंटब्यौरा
<content ...>इनर टेक्स्ट, पेज की एचटीएमएल बॉडी होती है. कुछ एंट्री (जैसे, अटैचमेंट) के लिए, इस एलिमेंट में src एट्रिब्यूट होगा. यह एट्रिब्यूट, फ़ाइल की ओर इशारा करेगा.
<link rel="alternate" ...>Google Sites में मौजूद पेज या आइटम का लिंक.
<link rel="http://schemas.google.com/sites/2008#revision" ...>href एट्रिब्यूट, एंट्री के संशोधन फ़ीड के बारे में बताता है.
<link rel="http://schemas.google.com/sites/2008#parent" ...>href एट्रिब्यूट, एंट्री की पैरंट एंट्री के बारे में बताता है.
<link rel="http://schemas.google.com/sites/2008#template" ...>href एट्रिब्यूट, एंट्री के टेंप्लेट पेज पर ले जाता है.
<category scheme="http://schemas.google.com/g/2005#kind" ...>label, एंट्री का टाइप है.
<category term="http://schemas.google.com/g/2005#template" ...>label=template का मतलब है कि एंट्री एक टेंप्लेट है.
<gd:feedLink>href एट्रिब्यूट, एंट्री के पैरंट के बच्चों की ओर इशारा करता है.
<sites:pageName>पेज का वेबस्पेस नाम; यह पेज के यूआरएल में मौजूद नाम से मेल खाता है.
<sites:revision>मौजूदा वर्शन नंबर.

कॉन्टेंट फ़ीड की क्वेरी के उदाहरण

Google Data API के कुछ स्टैंडर्ड क्वेरी पैरामीटर और Classic Sites API के लिए खास तौर पर बनाए गए पैरामीटर का इस्तेमाल करके, कॉन्टेंट फ़ीड खोजा जा सकता है. ज़्यादा जानकारी और इस्तेमाल किए जा सकने वाले पैरामीटर की पूरी सूची के लिए, रेफ़रंस गाइड देखें.

किसी खास तरह की एंट्री वापस पाना

सिर्फ़ किसी खास तरह की एंट्री फ़ेच करने के लिए, kind पैरामीटर का इस्तेमाल करें. इस उदाहरण में, सिर्फ़ webpage एंट्री दिखाई गई हैं:

GET /feeds/content/domainName/siteName?kind=webpage

एक से ज़्यादा एंट्री टाइप दिखाने के लिए, हर kind को ',' से अलग करें. इस उदाहरण में, filecabinet और listpage एंट्री दिखाई गई हैं:

GET /feeds/content/domainName/siteName?kind=filecabinet,listpage

इसके अलावा, kind पैरामीटर के बजाय, Google डेटा /-/category क्वेरी के लिए स्टैंडर्ड फ़ॉर्मैट का इस्तेमाल किया जा सकता है:

GET /feeds/content/domainName/siteName/-/filecabinet|listpage

पेज टेंप्लेट वापस लाए जा रहे हैं

इस उदाहरण में, सिर्फ़ template पेजों को दिखाया गया है:

GET /feeds/content/domainName/siteName/-/template

सभी एंट्री टाइप वापस पाने और template पेजों को शामिल करने के लिए, इसका इस्तेमाल करें:

GET /feeds/content/domainName/siteName/-/template|-template

पाथ के हिसाब से पेज वापस लाना

अगर आपको Google साइट में किसी पेज का रिलेटिव पाथ पता है, तो उस पेज को फ़ेच करने के लिए path पैरामीटर का इस्तेमाल किया जा सकता है. इस उदाहरण में, http://sites.google.com/site/siteName/path/to/the/page पर मौजूद पेज दिखेगा:

GET /feeds/content/domainName/siteName?path=/path/to/the/page

किसी पैरंट पेज के नीचे मौजूद सभी एंट्री वापस पाना

अगर आपको किसी पेज का एंट्री आईडी पता है, तो parent पैरामीटर का इस्तेमाल करके उसकी सभी चाइल्ड एंट्री (अगर कोई हो) फ़ेच की जा सकती हैं:

GET /feeds/content/domainName/siteName?parent=CONTENT_ENTRY_ID

इसमें ड्राफ़्ट या मिटाई गई एंट्री भी शामिल हैं

ड्राफ़्ट या मिटाई गई एंट्री शामिल करने के लिए, क्रमशः include-drafts या include-deleted पैरामीटर का इस्तेमाल करें. इस उदाहरण में, कॉन्टेंट फ़ीड में ड्राफ़्ट की गई एंट्री शामिल हैं:

GET /feeds/content/domainName/siteName?include-drafts=true

पूरे टेक्स्ट की खोज

किसी साइट के पूरे कॉन्टेंट में खोजने के लिए, q पैरामीटर का इस्तेमाल करके फ़ुल-टेक्स्ट खोज करें:

GET /feeds/content/domainName/siteName?q=Text%20I%20am%20looking%20for

वापस सबसे ऊपर जाएं



कॉन्टेंट बनाना

कॉन्टेंट फ़ीड को एचटीटीपी POST भेजकर, नया कॉन्टेंट (वेबपेज, लिस्टपेज, फ़ाइलकैबिनेट पेज, सूचना वाले पेज वगैरह) बनाया जा सकता है:

https://sites.google.com/feeds/content/domainName/siteName

जिन एंट्री टाइप के लिए इस पैरामीटर का इस्तेमाल किया जा सकता है उनकी सूची देखने के लिए, रेफ़रंस गाइड में kind पैरामीटर देखें.

नए आइटम / पेज बनाना

इस उदाहरण में, साइट के टॉप-लेवल के तहत एक नया webpage बनाया गया है. इसमें पेज के मुख्य हिस्से के लिए कुछ XHTML शामिल है. साथ ही, हेडिंग के टाइटल को 'New WebPage Title' पर सेट किया गया है:

POST /feeds/content/domainName/siteName HTTP/1.1
Host: sites.google.com
GData-Version: 1.4
Authorization: <your authorization header here>
Content-Length: 328
Content-Type: application/atom+xml

<entry xmlns="http://www.w3.org/2005/Atom">
  <category scheme="http://schemas.google.com/g/2005#kind"
      term="http://schemas.google.com/sites/2008#webpage" label="webpage"/>
  <title>New Webpage Title</title>
  <content type="xhtml">
    <div xmlns="http://www.w3.org/1999/xhtml">HTML body goes here</div>
  </content>
</entry>

अगर अनुरोध पूरा हो जाता है, तो सर्वर 201 Created और एंट्री की कॉपी के साथ जवाब देता है.

कस्टम यूआरएल पाथ के तहत आइटम/पेज बनाना

डिफ़ॉल्ट रूप से, पिछले उदाहरण को यूआरएल http://sites.google.com/domainName/siteName/new-webpage-title के तहत बनाया जाएगा. साथ ही, इसका पेज हेडिंग 'New Webpage Title' होगा. इसका मतलब है कि यूआरएल के लिए, <atom:title> को new-webpage-title के तौर पर सामान्य किया जाता है. किसी पेज के यूआरएल पाथ को पसंद के मुताबिक बनाने के लिए, <sites:pageName> एलिमेंट सेट किया जा सकता है.

इस उदाहरण में, 'फ़ाइल स्टोरेज' पेज हेडिंग वाला एक नया filecabinet बनाया गया है. हालांकि, <sites:pageName> एलिमेंट तय करके, पेज को http://sites.google.com/domainName/siteName/files यूआरएल के तहत बनाया गया है.

POST /feeds/content/domainName/siteName HTTP/1.1
Host: sites.google.com
GData-Version: 1.4
Authorization: <your authorization header here>
Content-Length: 393
Content-Type: application/atom+xml

<entry xmlns="http://www.w3.org/2005/Atom" xmlns:sites="http://schemas.google.com/sites/2008">
  <category scheme="http://schemas.google.com/g/2005#kind"
      term="http://schemas.google.com/sites/2008#filecabinet" label="filecabinet"/>
  <title>File Storage</title>
  <content type="xhtml">
    <div xmlns="http://www.w3.org/1999/xhtml">A list of files is below.</div>
  </content>
  <sites:pageName>files</sites:pageName>
</entry>

सर्वर, किसी पेज के यूआरएल पाथ का नाम तय करने के लिए, प्राथमिकता के इन नियमों का इस्तेमाल करता है:

  1. अगर मौजूद है, तो <sites:pageName>. a-z, A-Z, 0-9, -, _ की शर्तों को पूरा करना ज़रूरी है.
  2. <atom:title>, अगर pageName मौजूद नहीं है, तो इसे null नहीं होना चाहिए. सामान्य बनाने का मतलब है कि सफ़ेद जगह को ट्रिम करके '-' में बदलना और a-z, A-Z, 0-9, -, _ से मेल न खाने वाले वर्णों को हटाना.

उदाहरण के लिए, सर्वर 'Custom_Page2' को स्वीकार कर लेगा.

सबपेज बनाना

किसी पैरंट पेज के नीचे सबपेज (चाइल्ड पेज) बनाने के लिए, अपनी नई ऐटम एंट्री में <link rel="http://schemas.google.com/sites/2008#parent"> शामिल करें. लिंक के href एट्रिब्यूट को पैरंट एंट्री के सेल्फ़ लिंक पर सेट करें.

इस उदाहरण में, एंट्री आईडी PARENT_ENTRY_ID वाले पैरंट सूचना पेज के नीचे, 'सूचना' हेडिंग वाला नया announcement बनाया गया है. इसमें पेज के मुख्य हिस्से के लिए XHTML कॉन्टेंट भी शामिल है:

POST /feeds/content/domainName/siteName HTTP/1.1
Host: sites.google.com
GData-Version: 1.4
Authorization: <your authorization header here>
Content-Length: 470
Content-Type: application/atom+xml

<entry xmlns="http://www.w3.org/2005/Atom">
  <category scheme="http://schemas.google.com/g/2005#kind"
      term="http://schemas.google.com/sites/2008#announcement" label="announcement"/>
  <link rel="http://schemas.google.com/sites/2008#parent" type="application/atom+xml"
      href="https://sites.google.com/feeds/content/domainName/siteName/PARENT_ENTRY_ID"/>
  <title>announcement</title>
  <content type="xhtml">
    <div xmlns="http://www.w3.org/1999/xhtml">This weekend. My place.</div>
  </content>
</entry>

पेज के टेंप्लेट

पेज टेंप्लेट बनाना

पेज टेंप्लेट बनाने की प्रोसेस, नए आइटम/पेज बनाने और सबपेज बनाने की प्रोसेस जैसी ही होती है. इसमें सिर्फ़ category को जोड़ा जाता है. साथ ही, टर्म और लेबल को क्रमशः 'http://schemas.google.com/g/2005#template' और 'template' पर सेट किया जाता है.

इस उदाहरण में, एक नया webpage टेंप्लेट बनाया गया है.

POST /feeds/content/domainName/siteName HTTP/1.1
Host: sites.google.com
GData-Version: 1.4
Authorization: <your authorization header here>
Content-Length: 464
Content-Type: application/atom+xml

<entry xmlns="http://www.w3.org/2005/Atom" xmlns:sites="http://schemas.google.com/sites/2008">
  <category scheme="http://schemas.google.com/g/2005#kind"
      term="http://schemas.google.com/sites/2008#webpage" label="webpage"/>
  <category scheme="http://schemas.google.com/g/2005#labels" term="http://schemas.google.com/g/2005#template" label="template"/>
  <title>Webpage Template</title>
  <content type="xhtml">
    <div xmlns="http://www.w3.org/1999/xhtml">This weekend. My place.</div>
  </content>
</entry>

टेंप्लेट से पेज बनाना

पेज टेंप्लेट बनाने की तरह ही, किसी टेंप्लेट से नया पेज बनाया जा सकता है. इसके लिए, <link> को शामिल करें. इसमें rel='http://schemas.google.com/sites/2008#template' होता है. यह पेज टेंप्लेट के सेल्फ़ लिंक की ओर इशारा करता है.

इस उदाहरण में, मौजूदा पेज टेंप्लेट से एक नया filecabinet पेज बनाया गया है. यह पेज टेंप्लेट, फ़ाइल कैबिनेट को तय करता है.

POST /feeds/content/domainName/siteName HTTP/1.1
Host: sites.google.com
GData-Version: 1.4
Authorization: <your authorization header here>
Content-Length: 464
Content-Type: application/atom+xml

<entry xmlns="http://www.w3.org/2005/Atom" xmlns:sites="http://schemas.google.com/sites/2008">
  <category scheme="http://schemas.google.com/g/2005#kind"
      term="http://schemas.google.com/sites/2008#filecabinet" label="filecabinet"/>
  <title>File Cabinet Page From Template</title>
  <link rel='http://schemas.google.com/sites/2008#template' type='application/atom+xml'
    href='https://sites.google.com/feeds/content/domainName/siteName/ENTRY_ID'/>
</entry>

ध्यान दें: टेंप्लेट में <category> तय किए जाने के बावजूद, आपको अपनी एंट्री में इसे शामिल करना होगा. यह भी ध्यान दें कि अगर आपने <content> एलिमेंट शामिल किया है, तो सर्वर उसे अस्वीकार कर देगा.

फ़ाइलें अपलोड की जा रही हैं

Google Sites की तरह ही, इस एपीआई की मदद से फ़ाइल केबिनेट पेजों और पैरंट पेजों पर अटैचमेंट अपलोड किए जा सकते हैं.

किसी पैरंट के लिए अटैचमेंट अपलोड करने के लिए, कॉन्टेंट फ़ीड के यूआरएल पर एचटीटीपी POST अनुरोध भेजें:

https://sites.google.com/feeds/content/domainName/siteName

POST का मुख्य हिस्सा, MIME मल्टीपार्ट अनुरोध होना चाहिए, ताकि फ़ाइल के कॉन्टेंट को <atom:entry> के साथ जोड़ा जा सके. इसमें अटैचमेंट का मेटाडेटा शामिल होता है. <atom:entry> को पैरंट एंट्री के सेल्फ़ लिंक का रेफ़रंस देना चाहिए, ताकि यह तय किया जा सके कि अटैचमेंट कहां बनाया जाएगा. ज़्यादा जानकारी के लिए, सबपेज बनाना लेख पढ़ें.

अटैचमेंट अपलोड हो रहे हैं

यहां आईडी PARENT_ENTRY_ID वाले फ़ाइल कैबिनेट में PDF फ़ाइल अपलोड करने का उदाहरण दिया गया है. अटैचमेंट, 'PDF फ़ाइल' टाइटल और 'एचआर पैकेट' (ज़रूरी नहीं) जानकारी के साथ बनाया जाएगा.

POST /feeds/content/domainName/siteName HTTP/1.1
Host: sites.google.com
GData-Version: 1.4
Authorization: <your authorization header here>
Content-Length: 7221984
Content-Type: multipart/related; boundary=END_OF_PART
--END_OF_PART
Content-Type: application/atom+xml

<entry xmlns="http://www.w3.org/2005/Atom">
  <category scheme="http://schemas.google.com/g/2005#kind"
          term="http://schemas.google.com/sites/2008#attachment" label="attachment"/>
  <link rel="http://schemas.google.com/sites/2008#parent" type="application/atom+xml"
        href="https://sites.google.com/feeds/content/domainName/siteName/PARENT_ENTRY_ID"/>
  <title>PDF File</title>
  <summary>HR packet</summary>
</entry>

--END_OF_PART
Content-Type: application/pdf

... pdf contents here ...

--END_OF_PART--

अपलोड पूरा होने पर, सर्वर 201 Created और नई अटैचमेंट एंट्री की कॉपी के साथ जवाब देगा.

किसी फ़ोल्डर में अटैचमेंट अपलोड करना

filecabinet में मौजूद किसी मौजूदा फ़ोल्डर में अटैचमेंट अपलोड करने के लिए, 'term' एट्रिब्यूट को फ़ोल्डर के नाम पर सेट करके, एक कैटगरी शामिल करें:

<category scheme="http://schemas.google.com/sites/2008#folder" term="FolderName">

वेब अटैचमेंट

वेब अटैचमेंट, खास तरह के अटैचमेंट होते हैं. असल में, ये वेब पर मौजूद अन्य फ़ाइलों के लिंक होते हैं. इन्हें फ़ाइल कैबिनेट की लिस्टिंग में जोड़ा जा सकता है. यह सुविधा, Google Sites के यूज़र इंटरफ़ेस (यूआई) में 'यूआरएल से फ़ाइल जोड़ें' अपलोड करने के तरीके के जैसी है.

ध्यान दें: वेब अटैचमेंट सिर्फ़ फ़ाइल कैबिनेट में बनाए जा सकते हैं. इन्हें अन्य तरह के पेजों पर अपलोड नहीं किया जा सकता.

इस उदाहरण में, आईडी FILECABINET_ENTRY_ID से रेफ़र किए गए फ़ाइलकैबिनेट में webattachment बनाया गया है. इसके टाइटल को 'GoogleLogo' और जानकारी को 'nice colors' पर सेट किया गया है. जानकारी देना ज़रूरी नहीं है.

POST /feeds/content/domainName/siteName HTTP/1.1
Host: sites.google.com
GData-Version: 1.4
Authorization: <your authorization header here>
Content-Type: application/atom+xml
Content-Length: 531

<entry xmlns="http://www.w3.org/2005/Atom">
  <category scheme="http://schemas.google.com/g/2005#kind"
          term="http://schemas.google.com/sites/2008#webattachment" label="webattachment"/>
  <link rel="http://schemas.google.com/sites/2008#parent" type="application/atom+xml"
        href="https://sites.google.com/feeds/content/domainName/siteName/FILECABINET_ENTRY_ID"/>
  <title>GoogleLogo</title>
  <summary>nice colors</summary>
  <content type="image/gif" src="http://www.google.com/images/logo.gif"></content>
</entry>

POST, उपयोगकर्ता के फ़ाइलकैबिनेट में एक लिंक बनाता है. यह लिंक, 'http://www.google.com/images/logo.gif' पर मौजूद इमेज पर ले जाता है.

वापस सबसे ऊपर जाएं



कॉन्टेंट अपडेट करना

किसी भी पेज के मेटाडेटा (टाइटल, pageName वगैरह) और पेज के कॉन्टेंट में बदलाव किया जा सकता है. इसके लिए, PUT लिंक पर सिर्फ़ एक PUT अनुरोध करना होगा.edit अनुरोध के मुख्य हिस्से में, अपडेट किए गए पेज के बारे में बताने वाली एक ऐटम एंट्री होनी चाहिए. इस नियम का अपवाद अटैचमेंट एंट्री है. इसमें एंट्री का इस्तेमाल सिर्फ़ अटैचमेंट के मेटाडेटा को अपडेट करने के लिए किया जा सकता है. अटैच की गई फ़ाइल का कॉन्टेंट बदलने के लिए, PUT अनुरोध के मुख्य हिस्से में रॉ डेटा शामिल करें. यह अनुरोध अटैचमेंट के edit-media लिंक पर किया जाना चाहिए. एमआईएमई मल्टीपार्ट अनुरोध का इस्तेमाल करके, मेटाडेटा और अटैच की गई फ़ाइल के कॉन्टेंट, दोनों को एक साथ अपडेट किया जा सकता है.

यह पुष्टि करने के लिए कि आपका अपडेट, किसी दूसरे क्लाइंट के बदलावों को नहीं बदलता है, मूल एंट्री की ईटैग वैल्यू शामिल करें. इसके लिए, एचटीटीपी If-Match हेडर में ईटैग वैल्यू दें या अपडेट की गई एंट्री में, मूल एंट्री का gd:etag एट्रिब्यूट शामिल करें. मूल एंट्री की ETag वैल्यू का पता लगाने के लिए, <entry> एलिमेंट के gd:etag एट्रिब्यूट की जांच करें. मीडिया एंट्री के लिए, मीडिया का ईटैग edit-media लिंक के gd:etag एट्रिब्यूट में उपलब्ध हो सकता है.

अगर आपको एंट्री को अपडेट करना है, भले ही किसी और व्यक्ति ने उसे वापस पाने के बाद अपडेट किया हो, तो If-Match: * का इस्तेमाल करें और ईटैग शामिल न करें. ईटैग के बारे में ज़्यादा जानने के लिए, Google Data APIs की रेफ़रंस गाइड देखें.

किसी आइटम का मेटाडेटा या एचटीएमएल कॉन्टेंट अपडेट करना

किसी एंट्री के मेटाडेटा या एचटीएमएल कॉन्टेंट को अपडेट करने के लिए, एंट्री के edit लिंक पर एचटीटीपी PUT भेजें.

यहां listpage एंट्री (इसके आईडी ENTRY_ID से दिखाई गई है) को अपडेट करने का उदाहरण दिया गया है. इसमें ये बदलाव किए गए हैं:

  • टाइटल को बदलकर 'अपडेट किया गया कॉन्टेंट' कर दिया गया है
  • अपडेट किया गया एचटीएमएल कॉन्टेंट
  • सूची के पहले कॉलम का हेडिंग बदलकर 'मालिक' कर दिया गया है
  • पेज के यूआरएल पाथ में <sites:pageName> एलिमेंट से बदलाव किया जाता है
PUT /feeds/content/domainName/siteName/ENTRY_ID
Host: sites.google.com
GData-Version: 1.4
Authorization: <your authorization header here>
Content-Length: 816
Content-Type: application/atom+xml

<entry xmlns="http://www.w3.org/2005/Atom" xmlns:sites="http://schemas.google.com/sites/2008"
    xmlns:gs="http://schemas.google.com/spreadsheets/2006" xmlns:gd="http://schemas.google.com/g/2005"
    gd:etag="W/&quot;CEEBRn0ymA9WxJWEUw.&quot;">
  <category scheme="http://schemas.google.com/g/2005#kind"
      term="http://schemas.google.com/sites/2008#listpage" label="listpage"/>
  <title>Updated Title</title>
  <content type="xhtml">
    <div xmlns="http://www.w3.org/1999/xhtml">Updated Content</div>
  </content>
  <gs:worksheet name="listpage"/>
  <gs:header row="1"/>
  <gs:data startRow="2">
    <gs:column index="A" name="Owner"/>
    <gs:column index="B" name="Description"/>
    <gs:column index="C" name="Completed"/>
  </gs:data>
  <sites:pageName>newPagePath</sites:pageName>
</entry>

ध्यान दें: सर्वर से मिले जवाब में, ऊपर दिए गए उदाहरण से ज़्यादा एलिमेंट शामिल होंगे.

अटैचमेंट के कॉन्टेंट को बदलना

अटैचमेंट के कॉन्टेंट को बदलने का उदाहरण यहां दिया गया है. हालांकि, इसके मेटाडेटा में कोई बदलाव नहीं किया गया है. अनुरोध में नया कॉन्टेंट शामिल है. इसलिए, अटैचमेंट एंट्री के edit-media लिंक का इस्तेमाल किया जाता है.

PUT /feeds/media/content/domainName/siteName/ATTACHMENT_ENTRY_ID
Host: sites.google.com
GData-Version: 1.4
Authorization: <your authorization header here>
Content-Length: 70581
Content-Type: application/msword

... doc contents here ...

अटैचमेंट का मेटाडेटा और कॉन्टेंट अपडेट करना

यहां एक साथ अटैचमेंट के मेटाडेटा और उसके कॉन्टेंट, दोनों को अपडेट करने का उदाहरण दिया गया है. अटैचमेंट का नाम बदलकर 'नया टाइटल' कर दिया जाएगा. साथ ही, इसके कॉन्टेंट को .zip फ़ाइल के कॉन्टेंट से बदल दिया जाएगा. अनुरोध में नई फ़ाइल का कॉन्टेंट शामिल है. इसलिए, अटैचमेंट एंट्री के edit-media लिंक का इस्तेमाल किया जाता है.

ध्यान दें कि मेटाडेटा के लिए ईटैग शामिल करने से, मीडिया कॉन्टेंट के लिए भी If-Match मिल जाता है. ऐसा इसलिए होता है, क्योंकि मीडिया कॉन्टेंट में कोई भी बदलाव करने पर, मेटाडेटा का ईटैग बदल जाता है.

PUT /feeds/media/content/domainName/siteName/ATTACHMENT_ENTRY_ID
Host: sites.google.com
GData-Version: 1.4
Authorization: <your authorization header here>
Content-Type: multipart/related; boundary="END_OF_PART"
--END_OF_PART
Content-Type: application/atom+xml

<?xml version='1.0' encoding='UTF-8'?>
<entry xmlns="http://www.w3.org/2005/Atom" xmlns:gd="http://schemas.google.com/g/2005" gd:etag="BxAaTxRZAyp7ImBq">
  <link rel="http://schemas.google.com/sites/2008#parent" type="application/atom+xml"
        href="https://sites.google.com/feeds/content/domainName/siteName/ATTACHMENT_ENTRY_ID"/>
  <title>New Title</title>
</entry>

--END_OF_PART
Content-Type: application/zip

... zip contents here ...

--END_OF_PART

वापस सबसे ऊपर जाएं



कॉन्टेंट मिटाना

Google साइट से किसी आइटम को हटाने के लिए, पहले एंट्री वापस पाएं. इसके बाद, एंट्री के DELETE यूआरएल पर edit अनुरोध भेजें. इस यूआरएल का इस्तेमाल तब भी किया जाता है, जब किसी आइटम के मेटाडेटा या एचटीएमएल कॉन्टेंट को अपडेट किया जाता है.

DELETE /feeds/content/domainName/siteName/ENTRY_ID
Host: sites.google.com
GData-Version: 1.4
Authorization: <your authorization header here>
If-Match: <ETag or * here>

अगर एंट्री मिटा दी जाती है, तो सर्वर एचटीटीपी 200 OK के साथ जवाब देता है.

अगर आपको यह पक्का करना है कि आपने ऐसी एंट्री न मिटाई हो जिसे आपने वापस पाने के बाद किसी दूसरे क्लाइंट ने बदल दिया है, तो एचटीटीपी If-Match हेडर शामिल करें. इसमें ओरिजनल एंट्री की ईटैग वैल्यू शामिल होती है. <entry> एलिमेंट के gd:etag एट्रिब्यूट की जांच करके, ओरिजनल एंट्री की ईटैग वैल्यू का पता लगाया जा सकता है.

अगर आपको एंट्री मिटानी है, भले ही किसी और व्यक्ति ने उसे वापस पाने के बाद अपडेट किया हो, तो If-Match: * का इस्तेमाल करें और ईटैग शामिल न करें. (इस मामले में, आपको एंट्री मिटाने से पहले उसे वापस लाने की ज़रूरत नहीं है.)

ईटैग के बारे में ज़्यादा जानने के लिए, Google Data APIs की रेफ़रंस गाइड देखें.

वापस सबसे ऊपर जाएं



अटैचमेंट डाउनलोड करना

अटैचमेंट की एंट्री मिलने के बाद, फ़ाइल डाउनलोड की जा सकती है. इसके लिए, एंट्री के <content> src लिंक पर पुष्टि किया गया एचटीटीपी GET भेजें. किसी PDF के कॉन्टेंट लिंक का उदाहरण:

<content type="application/pdf"
  src="http://502377765-a-google-com-s-sites.googlegroups.com/feeds/media/content/domainName/siteName/678942036"/>

वापस सबसे ऊपर जाएं

ACL फ़ीड

शेयर करने की अनुमतियों (एसीएल) के बारे में खास जानकारी

एसीएल फ़ीड में मौजूद हर एसीएल एंट्री, किसी इकाई की ऐक्सेस भूमिका को दिखाती है. यह इकाई कोई उपयोगकर्ता, उपयोगकर्ताओं का ग्रुप, डोमेन या डिफ़ॉल्ट ऐक्सेस (जो कि सार्वजनिक साइट होती है) हो सकती है. एंट्री सिर्फ़ उन इकाइयों के लिए दिखेंगी जिनके पास साफ़ तौर पर ऐक्सेस है. Google Sites के यूज़र इंटरफ़ेस (यूआई) की शेयर करने वाली स्क्रीन में, "ऐक्सेस वाले लोग" पैनल में मौजूद हर ईमेल पते के लिए एक एंट्री दिखेगी. इसलिए, डोमेन एडमिन को नहीं दिखाया जाएगा. भले ही, उनके पास किसी साइट का ऐक्सेस हो.

भूमिकाएं

भूमिका एलिमेंट, किसी इकाई के ऐक्सेस लेवल को दिखाता है. gAcl:role एलिमेंट की ये चार वैल्यू हो सकती हैं:

  • रीडर — दर्शक (रीड-ओनली ऐक्सेस के बराबर).
  • writer — यह एक सहयोगी होता है. इसके पास पढ़ने/लिखने का ऐक्सेस होता है.
  • मालिक — आम तौर पर साइट एडमिन (पढ़ने/लिखने के ऐक्सेस के बराबर).

स्कोप

स्कोप एलिमेंट, उस इकाई को दिखाता है जिसके पास यह ऐक्सेस लेवल है. gAcl:scope एलिमेंट पांच तरह के हो सकते हैं:

  • user — यह एक ईमेल पते की वैल्यू है.उदाहरण के लिए, "user@gmail.com".
  • group — Google ग्रुप का ईमेल पता, जैसे कि "group@domain.com".
  • domain — G Suite डोमेन का नाम, जैसे कि "domain.com".
  • invite — ऐसा उपयोगकर्ता जिसे साइट का न्योता भेजा गया है, लेकिन उसे अभी तक साइट की एसीएल में नहीं जोड़ा गया है. (gdata 1.3 या इससे कम वर्शन के लिए उपलब्ध नहीं है.)
  • default — "default" टाइप का सिर्फ़ एक स्कोप होता है, जिसकी कोई वैल्यू नहीं होती (जैसे, <gAcl:scope type="default">). यह स्कोप, सार्वजनिक साइट पर किसी भी उपयोगकर्ता के पास डिफ़ॉल्ट रूप से मौजूद ऐक्सेस को कंट्रोल करता है.

ध्यान दें: डोमेन को gAcl:role वैल्यू के तौर पर "मालिक" का ऐक्सेस नहीं दिया जा सकता. उन्हें सिर्फ़ रीडर या राइटर के तौर पर ऐक्सेस दिया जा सकता है.

"invite" स्कोप के बारे में जानकारी.

जब Google खाता न रखने वाले एक या उससे ज़्यादा उपयोगकर्ताओं को एसीएल में जोड़ा जाता है, तब एपीआई न्योते का स्कोप दिखाता है. एपीआई, एम्बेड किए गए टोकन के साथ एक यूआरएल दिखाता है. आपको यह यूआरएल, न्योता पाए हुए उपयोगकर्ताओं को देना होगा, ताकि वे न्योता स्वीकार कर सकें.

न्योता भेजने के इस तरीके से, Google खाते का इस्तेमाल न करने वाले लोगों को न्योता भेजा जा सकता है. इसके लिए, आपको यह जानने की ज़रूरत नहीं होती कि वे कौनसा ईमेल पता इस्तेमाल करना चाहते हैं. जब तक उपयोगकर्ता, एम्बेड किए गए टोकन वाले न्योते के यूआरएल पर क्लिक करते हैं, तब तक वे अपनी पसंद के किसी भी ईमेल पते का इस्तेमाल करके, ऐक्सेस के लिए साइन अप कर सकते हैं. इसके अलावा, कई उपयोगकर्ता इस यूआरएल का इस्तेमाल करके न्योता स्वीकार कर सकते हैं. इसलिए, यह यूआरएल तब काम आ सकता है, जब आपको किसी एक उपयोगकर्ता या उपयोगकर्ताओं के ग्रुप को न्योता भेजना हो.

ध्यान दें: "न्योता" स्कोप, सिर्फ़ gdata के वर्शन 1.4 और इसके बाद के वर्शन में उपलब्ध है. अगर आपने 1.3 या इससे कम वर्शन के बारे में साफ़ तौर पर बताया है, तो यह काम नहीं करेगा.

एसीएल फ़ीड को फिर से खोला जा रहा है

एसीएल फ़ीड का इस्तेमाल, किसी साइट को शेयर करने की अनुमतियों को कंट्रोल करने के लिए किया जा सकता है. इसे इस यूआरआई के ज़रिए ऐक्सेस किया जा सकता है:

https://sites.google.com/feeds/acl/site/domainName/siteName
फ़ीड पैरामीटरब्यौरा
domainName'site' या G Suite के होस्ट किए गए डोमेन का डोमेन (जैसे, example.com).
siteNameआपकी साइट का वेबस्पेस नाम.यह साइट के यूआरएल में मौजूद होता है. उदाहरण के लिए, myCoolSite.

ध्यान दें कि साइट फ़ीड में मौजूद हर एंट्री में, इस फ़ीड का लिंक होता है:

 <link rel="http://schemas.google.com/acl/2007#accessControlList" type="application/atom+xml"
      href="https://sites.google.com/feeds/acl/site/domainName/siteName"/>

किसी साइट को शेयर करने की अनुमतियां पाने के लिए, एसीएल फ़ीड यूआरआई को एचटीटीपी GET अनुरोध भेजें:

GET /feeds/acl/site/domainName/siteName HTTP/1.1
Host: sites.google.com
GData-Version: 1.4
Authorization: <your authorization header here>

सर्वर, 200 OK और एसीएल एंट्री का फ़ीड देगा:

<feed xmlns="http://www.w3.org/2005/Atom" xmlns:openSearch="http://a9.com/-/spec/opensearch/1.1/"
    xmlns:gAcl="http://schemas.google.com/acl/2007" xmlns:sites="http://schemas.google.com/sites/2008"
    xmlns:gs="http://schemas.google.com/spreadsheets/2006" xmlns:dc="http://purl.org/dc/terms"
    xmlns:batch="http://schemas.google.com/gdata/batch" xmlns:gd="http://schemas.google.com/g/2005"
    xmlns:thr="http://purl.org/syndication/thread/1.0">
<id>https://sites.google.com/feeds/acl/site/domainName/siteName</id>
<updated>2009-12-03T22:01:05.963Z</updated>
<category scheme="http://schemas.google.com/g/2005#kind" term="http://schemas.google.com/acl/2007#accessRule"/>
<title>Acl</title>
<link rel="http://schemas.google.com/g/2005#feed" type="application/atom+xml"
    href="https://sites.google.com/feeds/acl/site/domainName/siteName"/>
<link rel="http://schemas.google.com/g/2005#post" type="application/atom+xml"
    href="https://sites.google.com/feeds/acl/site/domainName/siteName"/>
<link rel="self" type="application/atom+xml"
    href="https://sites.google.com/feeds/acl/site/domainName/siteName"/>
<generator version="1" uri="http://sites.google.com">Google Sites</generator>
<openSearch:startIndex>1</openSearch:startIndex>
<entry>
  <id>https://sites.google.com/feeds/acl/site/domainName/siteName/user%3AuserA%40gmail.com</id>
  <updated>2009-12-03T22:01:05.963Z</updated>
  <app:edited xmlns:app="http://www.w3.org/2007/app">2009-12-03T22:01:05.963Z</app:edited>
  <category scheme="http://schemas.google.com/g/2005#kind" term="http://schemas.google.com/acl/2007#accessRule"/>
  <link rel="self" type="application/atom+xml"
      href="https://sites.google.com/feeds/acl/site/domainName/siteName/user%3AuserA%40google.com"/>
  <link rel="edit" type="application/atom+xml"
      href="https://sites.google.com/feeds/acl/site/domainName/siteName/user%3AuserA%40google.com"/>
  <gAcl:scope type="user" value="userA@google.com"/>
  <gAcl:role value="owner"/>
</entry>
<entry>
  <id>https://sites.google.com/feeds/acl/site/domainName/siteName/user%3AuserB%40gmail.com</id>
  <updated>2009-12-03T22:01:05.963Z</updated>
  <app:edited xmlns:app="http://www.w3.org/2007/app">2009-12-03T22:01:05.963Z</app:edited>
  <category scheme="http://schemas.google.com/g/2005#kind" term="http://schemas.google.com/acl/2007#accessRule"/>
  <link rel="self" type="application/atom+xml"
      href="https://sites.google.com/feeds/acl/site/domainName/siteName/user%3AuserB%40gmail.com"/>
  <link rel="edit" type="application/atom+xml"
      href="https://sites.google.com/feeds/acl/site/domainName/siteName/user%3AuserB%40gmail.com"/>
  <gAcl:scope type="user" value="userB@gmail.com"/>
  <gAcl:role value="writer"/>
</entry>
<entry>
  <id>https://sites.google.com/feeds/acl/site/domainName/siteName/user%3AuserC%40gmail.com</id>
  <updated>2009-12-03T22:01:05.963Z</updated>
  <app:edited xmlns:app="http://www.w3.org/2007/app">2009-12-03T22:01:05.963Z</app:edited>
  <category scheme="http://schemas.google.com/g/2005#kind" term="http://schemas.google.com/acl/2007#accessRule"/>
  <link rel="self" type="application/atom+xml"
      href="https://sites.google.com/feeds/acl/site/domainName/siteName/user%3AuserC%40gmail.com"/>
  <link rel="edit" type="application/atom+xml"
      href="https://sites.google.com/feeds/acl/site/domainName/siteName/user%3AuserC%40gmail.com"/>
  <gAcl:scope type="user" value="userC@gmail.com"/>
  <gAcl:role value="reader"/>
</entry>
...
</feed>

वापस सबसे ऊपर जाएं

साइट शेयर करना

एसीएल फ़ीड, GET, POST, और PUT अनुरोधों को स्वीकार करता है. एसीएल फ़ीड में नई भूमिका डालने के लिए, साइट के एसीएल फ़ीड को POST अनुरोध भेजें.

ध्यान दें: शेयर करने से जुड़ी कुछ एसीएल (ऐक्सेस कंट्रोल लिस्ट) सिर्फ़ तब लागू हो सकती हैं, जब डोमेन को इस तरह से कॉन्फ़िगर किया गया हो कि ऐसी अनुमतियां दी जा सकें. उदाहरण के लिए, अगर G Suite डोमेन के लिए, डोमेन से बाहर शेयर करने की सुविधा चालू है, तो ऐसा किया जा सकता है.

इस उदाहरण में, साइट पर एक नया सहयोगी (लेखक) जोड़ा गया है:

POST /feeds/acl/site/domainName/siteName HTTP/1.1
Host: sites.google.com
GData-Version: 1.4
Authorization: <your authorization header here>

<entry xmlns="http://www.w3.org/2005/Atom" xmlns:gAcl='http://schemas.google.com/acl/2007'>
  <category scheme='http://schemas.google.com/g/2005#kind'
    term='http://schemas.google.com/acl/2007#accessRule'/>
  <gAcl:role value='writer'/>
  <gAcl:scope type='user' value='new_writer@example.com'/>
</entry>

डेटा डालने पर, 201 Created और नई एंट्री वापस कर दी जाती है:

<entry>
  <id>https://sites.google.com/feeds/acl/site/domainName/siteName/user%3Anew_writer%40example.com</id>
  <updated>2009-12-03T22:01:05.963Z</updated>
  <app:edited xmlns:app="http://www.w3.org/2007/app">2009-12-03T22:01:05.963Z</app:edited>
  <category scheme="http://schemas.google.com/g/2005#kind" term="http://schemas.google.com/acl/2007#accessRule"/>
  <link rel="self" type="application/atom+xml"
      href="https://sites.google.com/feeds/acl/site/domainName/siteName/user%3Anew_writer%40example.com"/>
  <link rel="edit" type="application/atom+xml"
      href="https://sites.google.com/feeds/acl/site/domainName/siteName/user%3Anew_writer%40example.com"/>
  <gAcl:role value='writer'/>
  <gAcl:scope type='user' value='new_writer@example.com'/>
</entry>

"invite" स्कोप का इस्तेमाल करके उपयोगकर्ताओं को न्योता भेजना

अगर आपने ऐसे उपयोगकर्ताओं को जोड़ा है जिनके पास Google खाते नहीं हैं, तो एपीआई एक यूआरएल दिखाता है. आपको यह यूआरएल उन उपयोगकर्ताओं को देना होगा जिन्हें आपको न्योता भेजना है. यूआरएल पर क्लिक करने के बाद, वे किसी मौजूदा खाते से साइन इन करके या नया खाता बनाकर, साइट को ऐक्सेस कर पाएंगे.

न्योता स्वीकार होने पर, 201 Created और एक नई एंट्री मिलती है. इसमें वह यूआरएल शामिल होता है जिसे आपको उपयोगकर्ता को भेजना होता है:

<entry>
  <id>https://sites.google.com/feeds/acl/site/domainName/siteName/user%3Anew_invite%40example.com</id>
  <updated>2009-12-03T22:01:05.963Z</updated>
  <app:edited xmlns:app="http://www.w3.org/2007/app">2009-12-03T22:01:05.963Z</app:edited>
  <category scheme="http://schemas.google.com/g/2005#kind" term="http://schemas.google.com/acl/2007#accessRule"/>
  <link rel="http://schemas.google.com/sites/2008#invite" type="text/html"href="domainName/siteName?invite=inviteToken"/>
  <link rel="self" type="application/atom+xml"
      href="https://sites.google.com/feeds/acl/site/domainName/siteName/user%3Anew_invite%40example.com"/>
  <link rel="edit" type="application/atom+xml"
      href="https://sites.google.com/feeds/acl/site/domainName/siteName/user%3Anew_invite%40example.com"/>
  <gAcl:role value='writer'/>
  <gAcl:scope type='invite' value='new_invite%40example.com'/>
</entry>

ग्रुप और डोमेन लेवल पर शेयर करना

किसी साइट को एक उपयोगकर्ता के साथ शेयर करने की तरह ही, किसी साइट को Google ग्रुप या G Suite डोमेन के साथ शेयर किया जा सकता है. ज़रूरी scope वैल्यू यहां दी गई हैं.

ग्रुप के ईमेल पते के साथ शेयर करना:

<gAcl:scope type="group" value="group@example.com"/>

पूरे डोमेन के साथ शेयर करने पर:

<gAcl:scope type="domain" value="example.com"/>

डोमेन लेवल पर शेयर करने की सुविधा सिर्फ़ G Suite डोमेन के लिए उपलब्ध है. साथ ही, यह सुविधा सिर्फ़ उस डोमेन के लिए उपलब्ध है जिस पर साइट होस्ट की गई है. उदाहरण के लिए, http://sites.google.com/a/domain1.com/siteA सिर्फ़ domain1.com के साथ पूरी साइट शेयर कर सकता है, domain2.com के साथ नहीं. G Suite डोमेन पर होस्ट नहीं की गई साइटें (जैसे कि http://sites.google.com/site/siteB) डोमेन को न्योता नहीं भेज सकतीं.

शेयर करने की अनुमतियों में बदलाव करना

किसी एसीएल एंट्री को अपडेट करने के लिए, एंट्री में ज़रूरी बदलाव करें. इसके बाद, एंट्री के edit लिंक पर एचटीटीपी PUT अनुरोध भेजें. यह लिंक, <link> एलिमेंट होता है. इसके 'rel' एट्रिब्यूट की वैल्यू 'edit' पर सेट होती है. पिछले उदाहरण के लिए, वह लिंक यह है:

<link rel='edit' type='application/atom+xml'
    href='https://sites.google.com/feeds/acl/site/domainName/siteName/user%3Anew_writer%40example.com'/>

नीचे दिए गए स्निपेट में, new_writer@gmail.com की भूमिका को बदलकर 'रीडर' कर दिया गया है:

PUT /feeds/acl/site/domainName/siteName/user%3Anew_writer%40example.com HTTP/1.1
Host: sites.google.com
GData-Version: 1.4
Authorization: <your authorization header here>

<entry xmlns="http://www.w3.org/2005/Atom" xmlns:gAcl='http://schemas.google.com/acl/2007'>
  <category scheme='http://schemas.google.com/g/2005#kind' term='http://schemas.google.com/acl/2007#accessRule'/>
  <gAcl:role value='reader'/>
  <gAcl:scope type='user' value='new_writer@gmail.com'/>
</entry>

शेयर करने की अनुमतियां हटाना

इस उपयोगकर्ता के लिए अनुमतियां हटाने के लिए, उसी edit लिंक पर DELETE अनुरोध करें जिसका इस्तेमाल PUT अनुरोध के लिए किया गया था:

DELETE /feeds/acl/site/domainName/siteName/user%3Anew_writer%40example.com HTTP/1.1
Host: sites.google.com
GData-Version: 1.4
Authorization: <your authorization header here>

सर्वर, 200 OK के साथ जवाब देगा.

वापस सबसे ऊपर जाएं

खास विषय

किसी फ़ीड या एंट्री को फिर से पाना

अगर आपको पहले से फ़ेच किया गया कोई फ़ीड या एंट्री फिर से फ़ेच करनी है, तो ज़्यादा बेहतर तरीके से फ़ेच किया जा सकता है. इसके लिए, सर्वर को यह निर्देश दें कि वह सूची या एंट्री सिर्फ़ तब भेजे, जब उसे पिछली बार फ़ेच करने के बाद उसमें कोई बदलाव हुआ हो.

शर्त के हिसाब से डेटा पाने के लिए, एचटीटीपी GET अनुरोध भेजें. इसमें एचटीटीपी If-None-Match हेडर शामिल होना चाहिए. हेडर में, सूची या एंट्री का ईटैग डालें. यह आपको <feed> एलिमेंट या <entry> एलिमेंट के gd:etag एट्रिब्यूट में मिल सकता है.

साइट फ़ीड का इस्तेमाल करने का उदाहरण:

GET /feeds/site/domainName/myOtherTestSite/
GData-Version: 1.4
If-None-Match: W/"Ck8GQXk7fil7ImA9WxNSFk0."

जब सर्वर को यह अनुरोध मिलता है, तो वह यह जांच करता है कि आपने जिस आइटम का अनुरोध किया है उसका ईटैग, आपके दिए गए ईटैग के बराबर है या नहीं. अगर ईटैग मेल खाते हैं, तो इसका मतलब है कि आइटम में कोई बदलाव नहीं हुआ है. ऐसे में, सर्वर एचटीटीपी 304 Not Modified स्टेटस कोड या एचटीटीपी 412 Precodition Failed स्टेटस कोड दिखाता है. इन दोनों स्टेटस कोड से पता चलता है कि आपने जिस आइटम को पहले ही वापस पा लिया है वह अप-टू-डेट है.

अगर ईटैग मैच नहीं करते हैं, तो इसका मतलब है कि आपने पिछली बार अनुरोध करने के बाद से आइटम में बदलाव किया है. इसलिए, सर्वर आइटम को वापस भेज देता है.

ईटैग के बारे में ज़्यादा जानने के लिए, Google Data APIs की रेफ़रंस गाइड देखें.

बैच प्रोसेसिंग

बैच अनुरोधों की मदद से, आपका क्लाइंट हर कार्रवाई को अलग-अलग सबमिट करने के बजाय, एक ही अनुरोध में कई कार्रवाइयां कर सकता है.

सर्वर, अनुरोध किए गए बदलावों में से ज़्यादा से ज़्यादा बदलाव करेगा. साथ ही, स्थिति की जानकारी देगा. इस जानकारी का इस्तेमाल करके, हर कार्रवाई के सफल या असफल होने का आकलन किया जा सकता है. Google Data API में बैच प्रोसेसिंग के बारे में ज़्यादा जानने के लिए, Google Data API के साथ बैच प्रोसेसिंग लेख पढ़ें

बैच फ़ीड में मौजूद हर ऑपरेशन में <id> एलिमेंट होता है. हालांकि, insert ऑपरेशन में यह एलिमेंट नहीं होता. यह एलिमेंट, उस अनुरोध यूआरएल के जैसा ही होता है जिसका इस्तेमाल आम तौर पर कॉन्टेंट फ़ीड को अपडेट करने, मिटाने या क्वेरी करने के लिए किया जाता है. उदाहरण के लिए, अगर आपको किसी बदलाव को अपडेट करना है, तो <id> एट्रिब्यूट की वैल्यू को उस एंट्री के edit लिंक पर सेट करें जिसमें बदलाव किया गया है. इसका इस्तेमाल, टारगेट एंट्री की पहचान करने के लिए किया जाता है. नई एंट्री में <id> एलिमेंट नहीं हैं, क्योंकि इन्हें अब तक नहीं बनाया गया है. इसके बजाय, <batch:id> में स्ट्रिंग वैल्यू तय की जा सकती है. यह वैल्यू, सर्वर के जवाब में दिखेगी और इसका इस्तेमाल, मिलती-जुलती एंट्री ढूंढने के लिए किया जाएगा.

बैच अनुरोध करने के लिए, बैच फ़ीड बनाएं और फ़ीड के बैच लिंक पर एचटीटीपी POST भेजें:

<link rel="http://schemas.google.com/g/2005#batch" type="application/atom+xml"
    href="https://sites.google.com/feeds/content/site/siteName/batch"/>

यहां दिए गए उदाहरण में, वेबपेज की एंट्री को क्वेरी करने, डालने, अपडेट करने, और मिटाने का तरीका बताया गया है:

POST /feeds/content/site/siteName/batch HTTP/1.1
Host: sites.google.com
Accept: */*
If-Match: *
GData-Version: 1.4
Authorization: <your authorization header here>

<feed xmlns="http://www.w3.org/2005/Atom" xmlns:sites="http://schemas.google.com/sites/2008"
      xmlns:gd="http://schemas.google.com/g/2005" xmlns:batch='http://schemas.google.com/gdata/batch'>
  <entry>
    <id>https://sites.google.com/feeds/content/site/siteName/ENTRY_ID1</id>
    <batch:operation type="query"/>
  </entry>
  <entry>
    <batch:id>1</batch:id>
    <batch:operation type='insert'/>
    <category scheme="http://schemas.google.com/g/2005#kind"
        term="http://schemas.google.com/sites/2008#webpage" label="webpage"/>
    <title>New Webpage1</title>
    <content type="xhtml">
      <div xmlns="http://www.w3.org/1999/xhtml">HTML body goes here</div>
    </content>
  </entry>
  <entry gd:etag="&quot;YDgpeyI.&quot;">
    <id>https://sites.google.com/feeds/content/site/siteName/ENTRY_ID2</id>
    <batch:operation type='update'/>
    <category scheme="http://schemas.google.com/g/2005#kind"
        term="http://schemas.google.com/sites/2008#webpage" label="webpage"/>
    <title>Updated Title for Webpage2</title>
    ...
    <batch:operaation type="update"/>
  </entry>
  <entry gd:etag="&quot;YassseyI.&quot;">
    <id>https://sites.google.com/feeds/content/site/siteName/ENTRY_ID3</id>
    <batch:operation type='delete'/>
  </entry>
</feed>

जवाब के तौर पर मिले फ़ीड में, हर ऑपरेशन के लिए एक नतीजे की एंट्री होगी:

 
<feed xmlns="http://www.w3.org/2005/Atom" xmlns:openSearch="http://a9.com/-/spec/opensearch/1.1/"
    xmlns:sites="http://schemas.google.com/sites/2008" xmlns:gs="http://schemas.google.com/spreadsheets/2006"
    xmlns:dc="http://purl.org/dc/terms" xmlns:batch="http://schemas.google.com/gdata/batch"
    xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr="http://purl.org/syndication/thread/1.0">
<id>https://sites.google.com/feeds/content/site/siteName/ENTRY_ID1</id>
<updated>2009-11-10T22:44:08.369Z</updated>
<title>Batch Feed</title>
<entry gd:etag="&quot;YDgpsdfeyI.&quot;">
  <id>https://sites.google.com/feeds/content/site/siteName/ENTRY_ID1</id>
  <published>2009-08-31T04:42:45.251Z</published>
  <updated>2009-10-25T22:46:13.729Z</updated>
  <app:edited xmlns:app="http://www.w3.org/2007/app">2009-10-25T22:46:13.671Z</app:edited>
  <category scheme="http://schemas.google.com/g/2005#kind"
      term="http://schemas.google.com/sites/2008#webpage" label="webpage"/>
  <title>Page Title</title>
  ...
  <batch:status code="200" reason="Success"/>
  <batch:operation type="query"/>
</entry>
<entry gd:etag="&quot;YDsseyI.&quot;">
  <id>https://sites.google.com/feeds/content/site/siteName/ENTRY_ID4</id>
  <published>2009-11-10T22:44:08.531Z</published>
  <updated>2009-11-10T22:44:08.560Z</updated>
  <app:edited xmlns:app="http://www.w3.org/2007/app">2009-11-10T22:44:08.531Z</app:edited>
  <category scheme="http://schemas.google.com/g/2005#kind" term="http://schemas.google.com/sites/2008#webpage" label="webpage"/>
  <title>New Webpage1</title>
  <content type="xhtml">
    <div xmlns="http://www.w3.org/1999/xhtml">
    <table cellspacing="0" class="sites-layout-name-one-column sites-layout-hbox">
      <tbody>
        <tr>
          <td class="sites-layout-tile sites-tile-name-content-1">
            <div>HTML body goes here</div>
          </td>
        </tr>
      </tbody>
    </table>
  </div>
</content>
...
<batch:id>1</batch:id>
<batch:status code="201" reason="Created"/>
<batch:operation type="insert"/>
</entry>
<entry gd:etag="&quot;YDkpeyI.&quot;">
  <id>https://sites.google.com/feeds/content/site/siteName/ENTRY_ID2</id>
  <updated>2009-11-10T22:44:09.296Z</updated>
  <title>Updated Title for Webpage2</title>
  ...
  <sites:pageName>updated-title-for-webpage2</sites:pageName>
  <sites:revision>5</sites:revision>
  <batch:status code="200" reason="Success"/>
  <batch:operation type="update"/>
</entry>
<entry>
  <id>https://sites.google.com/feeds/content/site/siteName/ENTRY_ID3</id>
  <title>Deleted</title>
  <content>Deleted</content>
  <batch:status code="200" reason="Success"/>
  <batch:operation type="delete"/>
</entry>
</feed>

वापस सबसे ऊपर जाएं