1<html><body> 2<style> 3 4body, h1, h2, h3, div, span, p, pre, a { 5 margin: 0; 6 padding: 0; 7 border: 0; 8 font-weight: inherit; 9 font-style: inherit; 10 font-size: 100%; 11 font-family: inherit; 12 vertical-align: baseline; 13} 14 15body { 16 font-size: 13px; 17 padding: 1em; 18} 19 20h1 { 21 font-size: 26px; 22 margin-bottom: 1em; 23} 24 25h2 { 26 font-size: 24px; 27 margin-bottom: 1em; 28} 29 30h3 { 31 font-size: 20px; 32 margin-bottom: 1em; 33 margin-top: 1em; 34} 35 36pre, code { 37 line-height: 1.5; 38 font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace; 39} 40 41pre { 42 margin-top: 0.5em; 43} 44 45h1, h2, h3, p { 46 font-family: Arial, sans serif; 47} 48 49h1, h2, h3 { 50 border-bottom: solid #CCC 1px; 51} 52 53.toc_element { 54 margin-top: 0.5em; 55} 56 57.firstline { 58 margin-left: 2 em; 59} 60 61.method { 62 margin-top: 1em; 63 border: solid 1px #CCC; 64 padding: 1em; 65 background: #EEE; 66} 67 68.details { 69 font-weight: bold; 70 font-size: 14px; 71} 72 73</style> 74 75<h1><a href="analytics_v3.html">Google Analytics API</a> . <a href="analytics_v3.management.html">management</a> . <a href="analytics_v3.management.webproperties.html">webproperties</a></h1> 76<h2>Instance Methods</h2> 77<p class="toc_element"> 78 <code><a href="#get">get(accountId, webPropertyId)</a></code></p> 79<p class="firstline">Gets a web property to which the user has access.</p> 80<p class="toc_element"> 81 <code><a href="#insert">insert(accountId, body)</a></code></p> 82<p class="firstline">Create a new property if the account has fewer than 20 properties. Web properties are visible in the Google Analytics interface only if they have at least one profile.</p> 83<p class="toc_element"> 84 <code><a href="#list">list(accountId, max_results=None, start_index=None)</a></code></p> 85<p class="firstline">Lists web properties to which the user has access.</p> 86<p class="toc_element"> 87 <code><a href="#patch">patch(accountId, webPropertyId, body)</a></code></p> 88<p class="firstline">Updates an existing web property. This method supports patch semantics.</p> 89<p class="toc_element"> 90 <code><a href="#update">update(accountId, webPropertyId, body)</a></code></p> 91<p class="firstline">Updates an existing web property.</p> 92<h3>Method Details</h3> 93<div class="method"> 94 <code class="details" id="get">get(accountId, webPropertyId)</code> 95 <pre>Gets a web property to which the user has access. 96 97Args: 98 accountId: string, Account ID to retrieve the web property for. (required) 99 webPropertyId: string, ID to retrieve the web property for. (required) 100 101Returns: 102 An object of the form: 103 104 { # JSON template for an Analytics web property. 105 "websiteUrl": "A String", # Website url for this web property. 106 "kind": "analytics#webproperty", # Resource type for Analytics WebProperty. 107 "name": "A String", # Name of this web property. 108 "created": "A String", # Time this web property was created. 109 "defaultProfileId": "A String", # Default view (profile) ID. 110 "level": "A String", # Level for this web property. Possible values are STANDARD or PREMIUM. 111 "updated": "A String", # Time this web property was last modified. 112 "profileCount": 42, # View (Profile) count for this web property. 113 "internalWebPropertyId": "A String", # Internal ID for this web property. 114 "childLink": { # Child link for this web property. Points to the list of views (profiles) for this web property. 115 "href": "A String", # Link to the list of views (profiles) for this web property. 116 "type": "analytics#profiles", # Type of the parent link. Its value is "analytics#profiles". 117 }, 118 "industryVertical": "A String", # The industry vertical/category selected for this web property. 119 "starred": True or False, # Indicates whether this web property is starred or not. 120 "parentLink": { # Parent link for this web property. Points to the account to which this web property belongs. 121 "href": "A String", # Link to the account for this web property. 122 "type": "analytics#account", # Type of the parent link. Its value is "analytics#account". 123 }, 124 "permissions": { # Permissions the user has for this web property. 125 "effective": [ # All the permissions that the user has for this web property. These include any implied permissions (e.g., EDIT implies VIEW) or inherited permissions from the parent account. 126 "A String", 127 ], 128 }, 129 "id": "A String", # Web property ID of the form UA-XXXXX-YY. 130 "selfLink": "A String", # Link for this web property. 131 "accountId": "A String", # Account ID to which this web property belongs. 132 }</pre> 133</div> 134 135<div class="method"> 136 <code class="details" id="insert">insert(accountId, body)</code> 137 <pre>Create a new property if the account has fewer than 20 properties. Web properties are visible in the Google Analytics interface only if they have at least one profile. 138 139Args: 140 accountId: string, Account ID to create the web property for. (required) 141 body: object, The request body. (required) 142 The object takes the form of: 143 144{ # JSON template for an Analytics web property. 145 "websiteUrl": "A String", # Website url for this web property. 146 "kind": "analytics#webproperty", # Resource type for Analytics WebProperty. 147 "name": "A String", # Name of this web property. 148 "created": "A String", # Time this web property was created. 149 "defaultProfileId": "A String", # Default view (profile) ID. 150 "level": "A String", # Level for this web property. Possible values are STANDARD or PREMIUM. 151 "updated": "A String", # Time this web property was last modified. 152 "profileCount": 42, # View (Profile) count for this web property. 153 "internalWebPropertyId": "A String", # Internal ID for this web property. 154 "childLink": { # Child link for this web property. Points to the list of views (profiles) for this web property. 155 "href": "A String", # Link to the list of views (profiles) for this web property. 156 "type": "analytics#profiles", # Type of the parent link. Its value is "analytics#profiles". 157 }, 158 "industryVertical": "A String", # The industry vertical/category selected for this web property. 159 "starred": True or False, # Indicates whether this web property is starred or not. 160 "parentLink": { # Parent link for this web property. Points to the account to which this web property belongs. 161 "href": "A String", # Link to the account for this web property. 162 "type": "analytics#account", # Type of the parent link. Its value is "analytics#account". 163 }, 164 "permissions": { # Permissions the user has for this web property. 165 "effective": [ # All the permissions that the user has for this web property. These include any implied permissions (e.g., EDIT implies VIEW) or inherited permissions from the parent account. 166 "A String", 167 ], 168 }, 169 "id": "A String", # Web property ID of the form UA-XXXXX-YY. 170 "selfLink": "A String", # Link for this web property. 171 "accountId": "A String", # Account ID to which this web property belongs. 172 } 173 174 175Returns: 176 An object of the form: 177 178 { # JSON template for an Analytics web property. 179 "websiteUrl": "A String", # Website url for this web property. 180 "kind": "analytics#webproperty", # Resource type for Analytics WebProperty. 181 "name": "A String", # Name of this web property. 182 "created": "A String", # Time this web property was created. 183 "defaultProfileId": "A String", # Default view (profile) ID. 184 "level": "A String", # Level for this web property. Possible values are STANDARD or PREMIUM. 185 "updated": "A String", # Time this web property was last modified. 186 "profileCount": 42, # View (Profile) count for this web property. 187 "internalWebPropertyId": "A String", # Internal ID for this web property. 188 "childLink": { # Child link for this web property. Points to the list of views (profiles) for this web property. 189 "href": "A String", # Link to the list of views (profiles) for this web property. 190 "type": "analytics#profiles", # Type of the parent link. Its value is "analytics#profiles". 191 }, 192 "industryVertical": "A String", # The industry vertical/category selected for this web property. 193 "starred": True or False, # Indicates whether this web property is starred or not. 194 "parentLink": { # Parent link for this web property. Points to the account to which this web property belongs. 195 "href": "A String", # Link to the account for this web property. 196 "type": "analytics#account", # Type of the parent link. Its value is "analytics#account". 197 }, 198 "permissions": { # Permissions the user has for this web property. 199 "effective": [ # All the permissions that the user has for this web property. These include any implied permissions (e.g., EDIT implies VIEW) or inherited permissions from the parent account. 200 "A String", 201 ], 202 }, 203 "id": "A String", # Web property ID of the form UA-XXXXX-YY. 204 "selfLink": "A String", # Link for this web property. 205 "accountId": "A String", # Account ID to which this web property belongs. 206 }</pre> 207</div> 208 209<div class="method"> 210 <code class="details" id="list">list(accountId, max_results=None, start_index=None)</code> 211 <pre>Lists web properties to which the user has access. 212 213Args: 214 accountId: string, Account ID to retrieve web properties for. Can either be a specific account ID or '~all', which refers to all the accounts that user has access to. (required) 215 max_results: integer, The maximum number of web properties to include in this response. 216 start_index: integer, An index of the first entity to retrieve. Use this parameter as a pagination mechanism along with the max-results parameter. 217 218Returns: 219 An object of the form: 220 221 { # A web property collection lists Analytics web properties to which the user has access. Each resource in the collection corresponds to a single Analytics web property. 222 "username": "A String", # Email ID of the authenticated user 223 "kind": "analytics#webproperties", # Collection type. 224 "items": [ # A list of web properties. 225 { # JSON template for an Analytics web property. 226 "websiteUrl": "A String", # Website url for this web property. 227 "kind": "analytics#webproperty", # Resource type for Analytics WebProperty. 228 "name": "A String", # Name of this web property. 229 "created": "A String", # Time this web property was created. 230 "defaultProfileId": "A String", # Default view (profile) ID. 231 "level": "A String", # Level for this web property. Possible values are STANDARD or PREMIUM. 232 "updated": "A String", # Time this web property was last modified. 233 "profileCount": 42, # View (Profile) count for this web property. 234 "internalWebPropertyId": "A String", # Internal ID for this web property. 235 "childLink": { # Child link for this web property. Points to the list of views (profiles) for this web property. 236 "href": "A String", # Link to the list of views (profiles) for this web property. 237 "type": "analytics#profiles", # Type of the parent link. Its value is "analytics#profiles". 238 }, 239 "industryVertical": "A String", # The industry vertical/category selected for this web property. 240 "starred": True or False, # Indicates whether this web property is starred or not. 241 "parentLink": { # Parent link for this web property. Points to the account to which this web property belongs. 242 "href": "A String", # Link to the account for this web property. 243 "type": "analytics#account", # Type of the parent link. Its value is "analytics#account". 244 }, 245 "permissions": { # Permissions the user has for this web property. 246 "effective": [ # All the permissions that the user has for this web property. These include any implied permissions (e.g., EDIT implies VIEW) or inherited permissions from the parent account. 247 "A String", 248 ], 249 }, 250 "id": "A String", # Web property ID of the form UA-XXXXX-YY. 251 "selfLink": "A String", # Link for this web property. 252 "accountId": "A String", # Account ID to which this web property belongs. 253 }, 254 ], 255 "itemsPerPage": 42, # The maximum number of resources the response can contain, regardless of the actual number of resources returned. Its value ranges from 1 to 1000 with a value of 1000 by default, or otherwise specified by the max-results query parameter. 256 "previousLink": "A String", # Link to previous page for this web property collection. 257 "startIndex": 42, # The starting index of the resources, which is 1 by default or otherwise specified by the start-index query parameter. 258 "nextLink": "A String", # Link to next page for this web property collection. 259 "totalResults": 42, # The total number of results for the query, regardless of the number of results in the response. 260 }</pre> 261</div> 262 263<div class="method"> 264 <code class="details" id="patch">patch(accountId, webPropertyId, body)</code> 265 <pre>Updates an existing web property. This method supports patch semantics. 266 267Args: 268 accountId: string, Account ID to which the web property belongs (required) 269 webPropertyId: string, Web property ID (required) 270 body: object, The request body. (required) 271 The object takes the form of: 272 273{ # JSON template for an Analytics web property. 274 "websiteUrl": "A String", # Website url for this web property. 275 "kind": "analytics#webproperty", # Resource type for Analytics WebProperty. 276 "name": "A String", # Name of this web property. 277 "created": "A String", # Time this web property was created. 278 "defaultProfileId": "A String", # Default view (profile) ID. 279 "level": "A String", # Level for this web property. Possible values are STANDARD or PREMIUM. 280 "updated": "A String", # Time this web property was last modified. 281 "profileCount": 42, # View (Profile) count for this web property. 282 "internalWebPropertyId": "A String", # Internal ID for this web property. 283 "childLink": { # Child link for this web property. Points to the list of views (profiles) for this web property. 284 "href": "A String", # Link to the list of views (profiles) for this web property. 285 "type": "analytics#profiles", # Type of the parent link. Its value is "analytics#profiles". 286 }, 287 "industryVertical": "A String", # The industry vertical/category selected for this web property. 288 "starred": True or False, # Indicates whether this web property is starred or not. 289 "parentLink": { # Parent link for this web property. Points to the account to which this web property belongs. 290 "href": "A String", # Link to the account for this web property. 291 "type": "analytics#account", # Type of the parent link. Its value is "analytics#account". 292 }, 293 "permissions": { # Permissions the user has for this web property. 294 "effective": [ # All the permissions that the user has for this web property. These include any implied permissions (e.g., EDIT implies VIEW) or inherited permissions from the parent account. 295 "A String", 296 ], 297 }, 298 "id": "A String", # Web property ID of the form UA-XXXXX-YY. 299 "selfLink": "A String", # Link for this web property. 300 "accountId": "A String", # Account ID to which this web property belongs. 301 } 302 303 304Returns: 305 An object of the form: 306 307 { # JSON template for an Analytics web property. 308 "websiteUrl": "A String", # Website url for this web property. 309 "kind": "analytics#webproperty", # Resource type for Analytics WebProperty. 310 "name": "A String", # Name of this web property. 311 "created": "A String", # Time this web property was created. 312 "defaultProfileId": "A String", # Default view (profile) ID. 313 "level": "A String", # Level for this web property. Possible values are STANDARD or PREMIUM. 314 "updated": "A String", # Time this web property was last modified. 315 "profileCount": 42, # View (Profile) count for this web property. 316 "internalWebPropertyId": "A String", # Internal ID for this web property. 317 "childLink": { # Child link for this web property. Points to the list of views (profiles) for this web property. 318 "href": "A String", # Link to the list of views (profiles) for this web property. 319 "type": "analytics#profiles", # Type of the parent link. Its value is "analytics#profiles". 320 }, 321 "industryVertical": "A String", # The industry vertical/category selected for this web property. 322 "starred": True or False, # Indicates whether this web property is starred or not. 323 "parentLink": { # Parent link for this web property. Points to the account to which this web property belongs. 324 "href": "A String", # Link to the account for this web property. 325 "type": "analytics#account", # Type of the parent link. Its value is "analytics#account". 326 }, 327 "permissions": { # Permissions the user has for this web property. 328 "effective": [ # All the permissions that the user has for this web property. These include any implied permissions (e.g., EDIT implies VIEW) or inherited permissions from the parent account. 329 "A String", 330 ], 331 }, 332 "id": "A String", # Web property ID of the form UA-XXXXX-YY. 333 "selfLink": "A String", # Link for this web property. 334 "accountId": "A String", # Account ID to which this web property belongs. 335 }</pre> 336</div> 337 338<div class="method"> 339 <code class="details" id="update">update(accountId, webPropertyId, body)</code> 340 <pre>Updates an existing web property. 341 342Args: 343 accountId: string, Account ID to which the web property belongs (required) 344 webPropertyId: string, Web property ID (required) 345 body: object, The request body. (required) 346 The object takes the form of: 347 348{ # JSON template for an Analytics web property. 349 "websiteUrl": "A String", # Website url for this web property. 350 "kind": "analytics#webproperty", # Resource type for Analytics WebProperty. 351 "name": "A String", # Name of this web property. 352 "created": "A String", # Time this web property was created. 353 "defaultProfileId": "A String", # Default view (profile) ID. 354 "level": "A String", # Level for this web property. Possible values are STANDARD or PREMIUM. 355 "updated": "A String", # Time this web property was last modified. 356 "profileCount": 42, # View (Profile) count for this web property. 357 "internalWebPropertyId": "A String", # Internal ID for this web property. 358 "childLink": { # Child link for this web property. Points to the list of views (profiles) for this web property. 359 "href": "A String", # Link to the list of views (profiles) for this web property. 360 "type": "analytics#profiles", # Type of the parent link. Its value is "analytics#profiles". 361 }, 362 "industryVertical": "A String", # The industry vertical/category selected for this web property. 363 "starred": True or False, # Indicates whether this web property is starred or not. 364 "parentLink": { # Parent link for this web property. Points to the account to which this web property belongs. 365 "href": "A String", # Link to the account for this web property. 366 "type": "analytics#account", # Type of the parent link. Its value is "analytics#account". 367 }, 368 "permissions": { # Permissions the user has for this web property. 369 "effective": [ # All the permissions that the user has for this web property. These include any implied permissions (e.g., EDIT implies VIEW) or inherited permissions from the parent account. 370 "A String", 371 ], 372 }, 373 "id": "A String", # Web property ID of the form UA-XXXXX-YY. 374 "selfLink": "A String", # Link for this web property. 375 "accountId": "A String", # Account ID to which this web property belongs. 376 } 377 378 379Returns: 380 An object of the form: 381 382 { # JSON template for an Analytics web property. 383 "websiteUrl": "A String", # Website url for this web property. 384 "kind": "analytics#webproperty", # Resource type for Analytics WebProperty. 385 "name": "A String", # Name of this web property. 386 "created": "A String", # Time this web property was created. 387 "defaultProfileId": "A String", # Default view (profile) ID. 388 "level": "A String", # Level for this web property. Possible values are STANDARD or PREMIUM. 389 "updated": "A String", # Time this web property was last modified. 390 "profileCount": 42, # View (Profile) count for this web property. 391 "internalWebPropertyId": "A String", # Internal ID for this web property. 392 "childLink": { # Child link for this web property. Points to the list of views (profiles) for this web property. 393 "href": "A String", # Link to the list of views (profiles) for this web property. 394 "type": "analytics#profiles", # Type of the parent link. Its value is "analytics#profiles". 395 }, 396 "industryVertical": "A String", # The industry vertical/category selected for this web property. 397 "starred": True or False, # Indicates whether this web property is starred or not. 398 "parentLink": { # Parent link for this web property. Points to the account to which this web property belongs. 399 "href": "A String", # Link to the account for this web property. 400 "type": "analytics#account", # Type of the parent link. Its value is "analytics#account". 401 }, 402 "permissions": { # Permissions the user has for this web property. 403 "effective": [ # All the permissions that the user has for this web property. These include any implied permissions (e.g., EDIT implies VIEW) or inherited permissions from the parent account. 404 "A String", 405 ], 406 }, 407 "id": "A String", # Web property ID of the form UA-XXXXX-YY. 408 "selfLink": "A String", # Link for this web property. 409 "accountId": "A String", # Account ID to which this web property belongs. 410 }</pre> 411</div> 412 413</body></html>