< Back

Get-ConfluenceAttachment

Mon Jan 13, 2020 4:29 am

NAME Get-ConfluenceAttachment



SYNOPSIS

Retrieve the child Attachments of a given wiki Page.





SYNTAX

Get-Attachment [-PageID] <Int32[]> -ApiUri <Uri> [-Credential <PSCredential>] [-Certificate <X509Certificate>]

[-FileNameFilter <String>] [-MediaTypeFilter <String>] [-PageSize <Int32>] [-Skip <UInt64>] [-First <UInt64>]

[-IncludeTotalCount] [<CommonParameters>]





DESCRIPTION

Return all Attachments directly below the given Page.





PARAMETERS

-ApiUri <Uri>

The URi of the API interface. Value can be set persistently with Set-ConfluenceInfo.



Required? true

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-Credential <PSCredential>

Confluence's credentials for authentication. Value can be set persistently with Set-ConfluenceInfo.



Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-Certificate <X509Certificate>

Certificate for authentication.



Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-PageID <Int32[]>

Return attachments for a list of page IDs.



Required? true

Position? 1

Default value None

Accept pipeline input? True (ByPropertyName, ByValue)

Accept wildcard characters? false



-FileNameFilter <String>

Filter results by filename (case sensitive). Does not support wildcards (*).



Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-MediaTypeFilter <String>

Filter results by media type (case insensitive).



Does not support wildcards (*).



Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-PageSize <Int32>

Maximum number of results to fetch per call.



This setting can be tuned to get better performance according to the load on the server.



> Warning: too high of a PageSize can cause a timeout on the request.



Required? false

Position? named

Default value 25

Accept pipeline input? False

Accept wildcard characters? false



-Skip <UInt64>

Controls how many things will be skipped before starting output.



Defaults to 0.



Required? false

Position? named

Default value 0

Accept pipeline input? False

Accept wildcard characters? false



-First <UInt64>

> NOTE: Not yet implemented.



Indicates how many items to return.



Required? false

Position? named

Default value 18446744073709551615

Accept pipeline input? False

Accept wildcard characters? false



-IncludeTotalCount [<SwitchParameter>]

> NOTE: Not yet implemented.



Causes an extra output of the total count at the beginning.



Note this is actually a uInt64, but with a custom string representation.



Required? false

Position? named

Default value False

Accept pipeline input? False

Accept wildcard characters? false



<CommonParameters>

This cmdlet supports the common parameters: Verbose, Debug,

ErrorAction, ErrorVariable, WarningAction, WarningVariable,

OutBuffer, PipelineVariable, and OutVariable. For more information, see

about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).



INPUTS



OUTPUTS

ConfluencePS.Attachment







NOTES





Confluence uses hierarchy to help organize content. This command is meant to help provide the intended context

from the command line.



-------------------------- EXAMPLE 1 --------------------------



Get-ConfluenceAttachment -PageID 123456

Get-ConfluencePage -PageID 123456 | Get-ConfluenceAttachment



Two different methods to return all Attachments directly below Page 123456. Both examples should return identical

results.

-------------------------- EXAMPLE 2 --------------------------



Get-ConfluenceAttachment -PageID 123456, 234567

Get-ConfluencePage -PageID 123456, 234567 | Get-ConfluenceAttachment



Similar to the previous example, this shows two different methods to return the Attachments of multiple pages.

Both examples should return identical results.

-------------------------- EXAMPLE 3 --------------------------



Get-ConfluenceAttachment -PageID 123456 -FileNameFilter "test.png"



Returns the Attachment called test.png from Page 123456 if it exists.

-------------------------- EXAMPLE 4 --------------------------



Get-ConfluenceAttachment -PageID 123456 -MediaTypeFilter "image/png"



Returns any attachments of mime type image/png from Page 123456.



RELATED LINKS

Online Version: https://atlassianps.org/docs/Confluence ... ttachment/

https://github.com/AtlassianPS/ConfluencePS https://github.com/AtlassianPS/ConfluencePS