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

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

दर्शक

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

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

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

अनुमति वाले अनुरोध

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

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

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

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

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

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

  1. ऐप्लिकेशन बनाने के बाद, उसे Google API (एपीआई) कंसोल का इस्तेमाल करके, रजिस्टर किया जाता है. इसके बाद, Google आपको क्लाइंट आईडी और क्लाइंट सीक्रेट जैसी जानकारी देगा. इस जानकारी की ज़रूरत आपको बाद में पड़ेगी.
  2. Google API (एपीआई) कंसोल में 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 अनुरोध की ऐटम एंट्री में, कॉपी करने के लिए साइट के साइट फ़ीड पर ले जाने वाला rel='source' वाला <link> शामिल करें. कॉपी की गई किसी भी साइट पर यह लिंक होगा. यहां किसी साइट की कॉपी बनाने का उदाहरण दिया गया है:

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 में कैटगरी का मेटा डेटा होता है. यह आपके डोमेन में साइटों को कैटगरी में बांटने के लिए उपयोगी होता है. कैटगरी का मेटा डेटा जोड़ने या अपडेट करने के लिए, अपनी साइट एंट्री के उस 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 पैरामीटर तय किया जाना चाहिए. अगर पैरामीटर मौजूद नहीं है, तो webAddressMapping को साइट एंट्री (GET) में नहीं लौटाया जाएगा या किसी एंट्री से मैपिंग अपडेट करते/हटाते समय (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_ENT_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 हेडर भेजना होगा. साथ ही, उसमें अनुमति वाले अनुरोध में मिले टोकन का रेफ़रंस देना होगा.

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

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

कॉन्टेंट वापस लाया जा रहा है

कॉन्टेंट फ़ीड में, Sites के मौजूदा कॉन्टेंट को सूची में शामिल किया जाता है. इस यूआरएल पर एक प्रमाणित 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>

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

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

ऐटम के सामान्य एलिमेंट की जानकारी पाने के लिए, Google डेटा प्रोटोकॉल रेफ़रंस देखें. क्लासिक 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 क्वेरी पैरामीटर और क्लासिक 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 बनाता है, जिसमें पेज के मुख्य हिस्से के लिए कुछ एक्सएचटीएमएल शामिल होता है. साथ ही, यह हेडिंग के टाइटल को 'नया वेबपेज टाइटल' पर सेट करता है:

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

उदाहरण के तौर पर, सर्वर 'Custom_Page2' को स्वीकार करेगा.

सबपेज बनाना

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

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

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>

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

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

इस उदाहरण में, फ़ाइलकैबिनेट के बारे में जानकारी देने वाले मौजूदा पेज टेंप्लेट से एक नया 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

फ़ाइल के कॉन्टेंट को <atom:entry> के साथ जोड़ने के लिए, POST का मुख्य हिस्सा एक MIME अनुरोध होना चाहिए. इसमें अटैचमेंट का मेटाडेटा शामिल होना चाहिए. यह बताने के लिए कि अटैचमेंट कहां बनाया जाएगा, <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 में मौजूद किसी फ़ोल्डर में अटैचमेंट अपलोड करने के लिए, ऐसी कैटगरी शामिल करें जिसमें 'टर्म' एट्रिब्यूट की वैल्यू फ़ोल्डर के नाम पर सेट हो:

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

वेब अटैचमेंट

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

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

यह उदाहरण, फ़ाइल कैबिनेट के तहत webattachment बनाता है, जिसका रेफ़रंस FILECABINET_ENTRY_ID आईडी से किया जाता है. इसका टाइटल और (ज़रूरी नहीं) ब्यौरा 'Googleलोगो' और 'अच्छे रंग' पर सेट है.

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' पर मौजूद इमेज पर ले जाता है.

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



कॉन्टेंट अपडेट किया जा रहा है

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

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

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

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

किसी एंट्री का मेटाडेटा या एचटीएमएल कॉन्टेंट अपडेट करने के लिए, एंट्री के 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="Decription"/>
    <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 लिंक का इस्तेमाल किया गया है.

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

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 साइट से किसी आइटम को हटाने के लिए, पहले एंट्री को फिर से पाएं, फिर एंट्री के edit यूआरएल पर DELETE अनुरोध भेजें. यह वही यूआरएल है जिसका इस्तेमाल किसी आइटम के मेटाडेटा या एचटीएमएल कॉन्टेंट को अपडेट करते समय किया जाता है.

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 हेडर शामिल करें जिसमें मूल एंट्री की ETag वैल्यू शामिल हो. <entry> एलिमेंट के gd:etag एट्रिब्यूट की जांच करके, मूल एंट्री की ETag वैल्यू तय की जा सकती है.

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

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

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



अटैचमेंट डाउनलोड किए जा रहे हैं

आपको अटैचमेंट की एंट्री मिलने के बाद, एंट्री के <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 फ़ीड

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

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

भूमिकाएं

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

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

स्कोप

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

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

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

"न्योता" के बारे में जानकारी.

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

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

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

एसीएल फ़ीड को वापस पाया जा रहा है

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

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 और ACL एंट्री के फ़ीड के साथ जवाब देगा:

<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 अनुरोध भेजें.

ध्यान दें: शेयर करने की कुछ ACL तभी संभव हो सकते हैं जब डोमेन को ऐसी अनुमतियों की अनुमति देने के लिए कॉन्फ़िगर किया गया हो (उदाहरण के लिए अगर 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>

"न्योता" के दायरे से उपयोगकर्ताओं को न्योता देना

अगर ऐसे उपयोगकर्ताओं को जोड़ा जाता है जिनके पास 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 सिर्फ़ डोमेन1.com के साथ पूरी साइट शेयर कर सकता है, डोमेन2.com के साथ नहीं. जो साइटें G Suite डोमेन (उदाहरण के लिए, http://sites.google.com/site/siteB) पर होस्ट नहीं की गई हैं, वे डोमेन को न्योता नहीं भेज सकतीं.

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

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

<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 हेडर शामिल हो. हेडर में, सूची या एंट्री के ETag के बारे में बताएं. यह आपको <feed> एलिमेंट या <entry> एलिमेंट के gd:etag एट्रिब्यूट में दिखेगा.

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

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

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

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

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

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

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

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

डालने की कार्रवाइयों को छोड़कर, बैच फ़ीड में हर कार्रवाई में एक <id> एलिमेंट होता है. यह एलिमेंट, अनुरोध करने वाले उस यूआरएल जैसा ही है जिसका इस्तेमाल आम तौर पर, कॉन्टेंट फ़ीड को अपडेट करने, मिटाने या उसकी क्वेरी करने के लिए किया जाता है. उदाहरण के लिए, अगर किसी बदलाव को अपडेट किया जा रहा है, तो उस एंट्री के लिए <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>

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