-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
+ added content exploration methods and tests
- Loading branch information
Andrey Sluzhivoy
committed
Apr 9, 2024
1 parent
3bd3764
commit f33d041
Showing
8 changed files
with
864 additions
and
88 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,144 @@ | ||
# Get-TableauContentSearch | ||
|
||
## SYNOPSIS | ||
Get content search results | ||
|
||
## SYNTAX | ||
|
||
``` | ||
Get-TableauContentSearch [[-Terms] <String[]>] [[-Filter] <String[]>] [[-OrderBy] <String[]>] [-All] | ||
[[-Limit] <Int32>] [-ProgressAction <ActionPreference>] [<CommonParameters>] | ||
``` | ||
|
||
## DESCRIPTION | ||
Searches across all supported content types for objects relevant to the search expression specified in the querystring of the request URI. | ||
|
||
## EXAMPLES | ||
|
||
### EXAMPLE 1 | ||
``` | ||
$results = Get-TableauContentSearch -Terms sales -Filter type:eq:workbook -Limit 5 | ||
``` | ||
|
||
## PARAMETERS | ||
|
||
### -Terms | ||
(Optional) One or more terms the search uses as the basis for which items are relevant to return. | ||
The items may be of any supported content type. | ||
The relevance may be assessed based on any element of a given item. | ||
If no terms are supplied, then results will be based filtering and page size limits. | ||
|
||
```yaml | ||
Type: String[] | ||
Parameter Sets: (All) | ||
Aliases: | ||
|
||
Required: False | ||
Position: 1 | ||
Default value: None | ||
Accept pipeline input: False | ||
Accept wildcard characters: False | ||
``` | ||
### -Filter | ||
(Optional) An expression to filter the response using one of the following parameters, or a combination of expressions separated by a comma: | ||
- type, e.g. | ||
type:eq:workbook, type:in:\[workbook,datasource\] | ||
- ownerId, e.g. | ||
ownerId:in:\[akhil,fred,alice\] | ||
- modifiedTime, using eq, lte, gte, gt operators. | ||
```yaml | ||
Type: String[] | ||
Parameter Sets: (All) | ||
Aliases: | ||
|
||
Required: False | ||
Position: 2 | ||
Default value: None | ||
Accept pipeline input: False | ||
Accept wildcard characters: False | ||
``` | ||
### -OrderBy | ||
(Optional) The sorting method for items returned, based on the popularity of the item. | ||
You can sort based on: | ||
hitsTotal - The number of times a content item has been viewed since it was created. | ||
hitsSmallSpanTotal The number of times viewed in the last month. | ||
hitsMediumSpanTotal The number of times viewed in the last three months. | ||
hitsLargeSpanTotal The number of times viewed in the last twelve months. | ||
downstreamWorkbookCount The number workbooks in a given project. | ||
```yaml | ||
Type: String[] | ||
Parameter Sets: (All) | ||
Aliases: | ||
|
||
Required: False | ||
Position: 3 | ||
Default value: None | ||
Accept pipeline input: False | ||
Accept wildcard characters: False | ||
``` | ||
### -All | ||
(Switch) When this parameter is provided, the search results are iterated for all pages | ||
(until the search is exhausted, that is when "next" pointer in the results is empty). | ||
```yaml | ||
Type: SwitchParameter | ||
Parameter Sets: (All) | ||
Aliases: | ||
|
||
Required: False | ||
Position: Named | ||
Default value: False | ||
Accept pipeline input: False | ||
Accept wildcard characters: False | ||
``` | ||
### -Limit | ||
(Optional) The number of search results to return. | ||
The default is 10. | ||
```yaml | ||
Type: Int32 | ||
Parameter Sets: (All) | ||
Aliases: | ||
|
||
Required: False | ||
Position: 4 | ||
Default value: 10 | ||
Accept pipeline input: False | ||
Accept wildcard characters: False | ||
``` | ||
### -ProgressAction | ||
{{ Fill ProgressAction Description }} | ||
```yaml | ||
Type: ActionPreference | ||
Parameter Sets: (All) | ||
Aliases: proga | ||
|
||
Required: False | ||
Position: Named | ||
Default value: None | ||
Accept pipeline input: False | ||
Accept wildcard characters: False | ||
``` | ||
### CommonParameters | ||
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). | ||
## INPUTS | ||
## OUTPUTS | ||
### System.Management.Automation.PSObject | ||
## NOTES | ||
## RELATED LINKS | ||
[https://help.tableau.com/current/api/rest_api/en-us/REST/TAG/index.html#tag/Content-Exploration-Methods/operation/ContentExplorationService_getSearch](https://help.tableau.com/current/api/rest_api/en-us/REST/TAG/index.html#tag/Content-Exploration-Methods/operation/ContentExplorationService_getSearch) | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,116 @@ | ||
# Get-TableauContentSuggestion | ||
|
||
## SYNOPSIS | ||
Get content Suggestions | ||
|
||
## SYNTAX | ||
|
||
``` | ||
Get-TableauContentSuggestion [-Terms] <String> [[-Filter] <String[]>] [[-Luid] <String[]>] [[-Limit] <Int32>] | ||
[-ProgressAction <ActionPreference>] [<CommonParameters>] | ||
``` | ||
|
||
## DESCRIPTION | ||
Returns a specified number of suggestions for auto-completion of user input as they type. | ||
You can specify content types of suggestions and prioritize recently viewed content. | ||
|
||
## EXAMPLES | ||
|
||
### EXAMPLE 1 | ||
``` | ||
$results = Get-TableauContentSuggestion -Terms regional | ||
``` | ||
|
||
## PARAMETERS | ||
|
||
### -Terms | ||
The term that is matched to find suggestions. | ||
|
||
```yaml | ||
Type: String | ||
Parameter Sets: (All) | ||
Aliases: | ||
|
||
Required: True | ||
Position: 1 | ||
Default value: None | ||
Accept pipeline input: False | ||
Accept wildcard characters: False | ||
``` | ||
### -Filter | ||
(Optional) A filter to restrict suggestions to specified content types, e.g. | ||
type:eq:workbook | ||
```yaml | ||
Type: String[] | ||
Parameter Sets: (All) | ||
Aliases: | ||
|
||
Required: False | ||
Position: 2 | ||
Default value: None | ||
Accept pipeline input: False | ||
Accept wildcard characters: False | ||
``` | ||
### -Luid | ||
(Optional) A comma separated list of luids that will be prioritized in scoring of content items matched to suggest. | ||
```yaml | ||
Type: String[] | ||
Parameter Sets: (All) | ||
Aliases: | ||
|
||
Required: False | ||
Position: 3 | ||
Default value: None | ||
Accept pipeline input: False | ||
Accept wildcard characters: False | ||
``` | ||
### -Limit | ||
(Optional) The number of suggestions to return. | ||
The default is 10. | ||
```yaml | ||
Type: Int32 | ||
Parameter Sets: (All) | ||
Aliases: | ||
|
||
Required: False | ||
Position: 4 | ||
Default value: 10 | ||
Accept pipeline input: False | ||
Accept wildcard characters: False | ||
``` | ||
### -ProgressAction | ||
{{ Fill ProgressAction Description }} | ||
```yaml | ||
Type: ActionPreference | ||
Parameter Sets: (All) | ||
Aliases: proga | ||
|
||
Required: False | ||
Position: Named | ||
Default value: None | ||
Accept pipeline input: False | ||
Accept wildcard characters: False | ||
``` | ||
### CommonParameters | ||
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). | ||
## INPUTS | ||
## OUTPUTS | ||
### System.Management.Automation.PSObject | ||
## NOTES | ||
## RELATED LINKS | ||
[https://help.tableau.com/current/api/rest_api/en-us/REST/TAG/index.html#tag/Content-Exploration-Methods/operation/ContentExploration_getSuggestions](https://help.tableau.com/current/api/rest_api/en-us/REST/TAG/index.html#tag/Content-Exploration-Methods/operation/ContentExploration_getSuggestions) | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
# Get-TableauContentUsage | ||
|
||
## SYNOPSIS | ||
Get content usage statistics | ||
|
||
## SYNTAX | ||
|
||
``` | ||
Get-TableauContentUsage [-Content] <Hashtable[]> [-ProgressAction <ActionPreference>] [<CommonParameters>] | ||
``` | ||
|
||
## DESCRIPTION | ||
Gets usage statistics for one or multiple content items, specified by LUID and content type (workbook, datasource, flow). | ||
|
||
## EXAMPLES | ||
|
||
### EXAMPLE 1 | ||
``` | ||
$results = Get-TableauContentUsage -Content @{type='workbooks';luid=$id} | ||
``` | ||
|
||
### EXAMPLE 2 | ||
``` | ||
$results = Get-TableauContentUsage -Content @{type='workbooks';luid=$wbid},@{type='datasources';luid=$dsid} | ||
``` | ||
|
||
## PARAMETERS | ||
|
||
### -Content | ||
An array of hashtables, containing at least one item, each of those should have the following keys: | ||
- type: workbook, datasource, flow | ||
- luid: the LUID of the content | ||
|
||
```yaml | ||
Type: Hashtable[] | ||
Parameter Sets: (All) | ||
Aliases: | ||
|
||
Required: True | ||
Position: 1 | ||
Default value: None | ||
Accept pipeline input: False | ||
Accept wildcard characters: False | ||
``` | ||
### -ProgressAction | ||
{{ Fill ProgressAction Description }} | ||
```yaml | ||
Type: ActionPreference | ||
Parameter Sets: (All) | ||
Aliases: proga | ||
|
||
Required: False | ||
Position: Named | ||
Default value: None | ||
Accept pipeline input: False | ||
Accept wildcard characters: False | ||
``` | ||
### CommonParameters | ||
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). | ||
## INPUTS | ||
## OUTPUTS | ||
### System.Management.Automation.PSObject | ||
## NOTES | ||
If the Content parameter contains one element, the GET request is sent (GetUsageStats). | ||
If the Content parameter contains more than one element, the POST request is sent (BatchGetUsage). | ||
## RELATED LINKS | ||
[https://help.tableau.com/current/api/rest_api/en-us/REST/TAG/index.html#tag/Content-Exploration-Methods/operation/UsageStatsService_GetUsageStats](https://help.tableau.com/current/api/rest_api/en-us/REST/TAG/index.html#tag/Content-Exploration-Methods/operation/UsageStatsService_GetUsageStats) | ||
[https://help.tableau.com/current/api/rest_api/en-us/REST/TAG/index.html#tag/Content-Exploration-Methods/operation/UsageStatsService_BatchGetUsage](https://help.tableau.com/current/api/rest_api/en-us/REST/TAG/index.html#tag/Content-Exploration-Methods/operation/UsageStatsService_BatchGetUsage) | ||
Oops, something went wrong.