Skip to content

Commit e7bb918

Browse files
authored
docs: document sites endpoint (#1764)
1 parent a194b03 commit e7bb918

1 file changed

Lines changed: 128 additions & 7 deletions

File tree

docs/api-ref.md

Lines changed: 128 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4997,7 +4997,7 @@ Source file: models/site_item.py
49974997

49984998
### SiteAuthConfiguration class
49994999

5000-
The `SiteAuthConfiguration` class contains the attributes for the authentication configuration on Tableau Cloud. This class represents the authentication configuration information returned when using the `sites.list_authentication_configurations` method.
5000+
The `SiteAuthConfiguration` class contains the attributes for the authentication configuration on Tableau Cloud. This class represents the authentication configuration information returned when using the `sites.list_auth_configurations` method.
50015001

50025002
**Attributes**
50035003

@@ -5017,7 +5017,7 @@ Attribute | Description
50175017
# sign in, etc.
50185018

50195019
# Get authentication configurations for the current site
5020-
auth_configs = server.sites.list_authentication_configurations()
5020+
auth_configs = server.sites.list_auth_configurations()
50215021

50225022
# Display configuration details
50235023
for config in auth_configs:
@@ -5324,15 +5324,15 @@ server.sites.delete('9a8b7c6d-5e4f-3a2b-1c0d-9e8f7a6b5c4d')
53245324
<br>
53255325
<br>
53265326

5327-
#### sites.list_authentication_configurations
5327+
#### sites.list_auth_configurations
53285328

53295329
```py
5330-
sites.list_authentication_configurations()
5330+
sites.list_auth_configurations()
53315331
```
53325332

53335333
Lists the authentication configurations for the current site.
53345334

5335-
REST API: [List Authentication Configurations for the current Site](https://help.tableau.com/current/api/rest_api/en-us/REST/rest_api_ref_site.htm#list_authentication_configurations_site)
5335+
REST API: [List Authentication Configurations for the current Site](https://help.tableau.com/current/api/rest_api/en-us/REST/rest_api_ref_site.htm#list_auth_configurations_site)
53365336

53375337
**Returns**
53385338

@@ -5345,7 +5345,7 @@ Returns a list of authentication configurations for the current site.
53455345
# server = TSC.Server('https://MY-SERVER')
53465346
# sign in, etc.
53475347

5348-
auth_configs = server.sites.list_authentication_configurations()
5348+
auth_configs = server.sites.list_auth_configurations()
53495349
for config in auth_configs:
53505350
print(f"IDP Configuration ID: {config.idp_configuration_id}")
53515351
print(f"Name: {config.idp_configuration_name}")
@@ -5356,6 +5356,127 @@ for config in auth_configs:
53565356
<br>
53575357
<br>
53585358

5359+
#### sites.get_by_content_url
5360+
5361+
```py
5362+
sites.get_by_content_url(content_url)
5363+
```
5364+
5365+
Returns the site with the specified content URL.
5366+
5367+
REST API: [Query Site](https://help.tableau.com/current/api/rest_api/en-us/REST/rest_api_ref_site.htm#query_site){:target="_blank"}
5368+
5369+
**Parameters**
5370+
5371+
Name | Description
5372+
:--- | :---
5373+
`content_url` | The `content_url` for the site to query. This is the `contentUrl` value in the REST API and corresponds to the portion of the URL after `/site/` (for example, `"MarketingTeam"`). Use an empty string for the default site.
5374+
5375+
**Returns**
5376+
5377+
Returns a `SiteItem`.
5378+
5379+
**Version**
5380+
5381+
Version 2.0 and later. See [REST API versions](https://help.tableau.com/current/api/rest_api/en-us/REST/rest_api_concepts_versions.htm).
5382+
5383+
**Example**
5384+
5385+
```py
5386+
site = server.sites.get_by_content_url('MarketingTeam')
5387+
print(site.id, site.name)
5388+
```
5389+
5390+
<br>
5391+
<br>
5392+
5393+
#### sites.encrypt_extracts
5394+
5395+
```py
5396+
sites.encrypt_extracts(site_id)
5397+
```
5398+
5399+
Encrypts all extracts on the specified site.
5400+
5401+
REST API: [Encrypt Extracts](https://help.tableau.com/current/api/rest_api/en-us/REST/rest_api_ref_extract_and_encryption.htm#encrypt_extracts){:target="_blank"}
5402+
5403+
**Parameters**
5404+
5405+
Name | Description
5406+
:--- | :---
5407+
`site_id` | The identifier (`id`) for the site on which to encrypt all extracts.
5408+
5409+
**Version**
5410+
5411+
Version 3.5 and later. See [REST API versions](https://help.tableau.com/current/api/rest_api/en-us/REST/rest_api_concepts_versions.htm).
5412+
5413+
**Example**
5414+
5415+
```py
5416+
server.sites.encrypt_extracts(server.site_id)
5417+
```
5418+
5419+
<br>
5420+
<br>
5421+
5422+
#### sites.decrypt_extracts
5423+
5424+
```py
5425+
sites.decrypt_extracts(site_id)
5426+
```
5427+
5428+
Decrypts all extracts on the specified site.
5429+
5430+
REST API: [Decrypt Extracts](https://help.tableau.com/current/api/rest_api/en-us/REST/rest_api_ref_extract_and_encryption.htm#decrypt_extracts){:target="_blank"}
5431+
5432+
**Parameters**
5433+
5434+
Name | Description
5435+
:--- | :---
5436+
`site_id` | The identifier (`id`) for the site on which to decrypt all extracts.
5437+
5438+
**Version**
5439+
5440+
Version 3.5 and later. See [REST API versions](https://help.tableau.com/current/api/rest_api/en-us/REST/rest_api_concepts_versions.htm).
5441+
5442+
**Example**
5443+
5444+
```py
5445+
server.sites.decrypt_extracts(server.site_id)
5446+
```
5447+
5448+
<br>
5449+
<br>
5450+
5451+
#### sites.re_encrypt_extracts
5452+
5453+
```py
5454+
sites.re_encrypt_extracts(site_id)
5455+
```
5456+
5457+
Re-encrypts all extracts on the specified site using new encryption keys.
5458+
5459+
REST API: [Reencrypt Extracts](https://help.tableau.com/current/api/rest_api/en-us/REST/rest_api_ref_extract_and_encryption.htm#reencrypt_extracts){:target="_blank"}
5460+
5461+
**Parameters**
5462+
5463+
Name | Description
5464+
:--- | :---
5465+
`site_id` | The identifier (`id`) for the site on which to re-encrypt all extracts.
5466+
5467+
**Version**
5468+
5469+
Version 3.5 and later. See [REST API versions](https://help.tableau.com/current/api/rest_api/en-us/REST/rest_api_concepts_versions.htm).
5470+
5471+
**Example**
5472+
5473+
```py
5474+
server.sites.re_encrypt_extracts(server.site_id)
5475+
```
5476+
5477+
<br>
5478+
<br>
5479+
53595480
---
53605481

53615482

@@ -5965,7 +6086,7 @@ Name | Description
59656086
`name` | The name of the user. This attribute is required when you are creating a `UserItem` instance.
59666087
`site_role` | The role the user has on the site. This attribute is required if you are creating a `UserItem` instance. See *User Roles* below for details.
59676088
`groups` | The groups that the user belongs to. You must run the populate_groups method to add the groups to the `UserItem`.
5968-
`idp_configuration_id` | Tableau Cloud only. The authentication method for the user. To find the idp_configuration_id value, use sites.list_authentication_configurations method. **Important: Use idp_configuration_id or auth_setting, but not both.**
6089+
`idp_configuration_id` | Tableau Cloud only. The authentication method for the user. To find the idp_configuration_id value, use sites.list_auth_configurations method. **Important: Use idp_configuration_id or auth_setting, but not both.**
59696090

59706091

59716092
**User Auth**

0 commit comments

Comments
 (0)