Add-GitHubBaseUri
SYNOPSIS
Sets the base uri of the GitHub API
SYNTAX
__AllParameterSets
Add-GitHubBaseUri [-BaseUri] <string> [-UploadUri <string>]
ALIASES
This cmdlet has the following aliases,
- Get-GHAddBaseUri
DESCRIPTION
The Add-GitHubBaseUri function sets the base uri that every request is sent to. The default is https://api.github.com
For GitHub Enterprise Server use the api url of the server, for example https://github.example.com/api/v3 (the path is kept, a trailing slash is removed). When the path ends in /api/v3 & -UploadUri is not used the upload uri becomes https://github.example.com/api/uploads
For GitHub Enterprise Cloud with data residency use https://api.
Only absolute https uris without a query or fragment are accepted
EXAMPLES
EXAMPLE 1
Add-GitHubBaseUri -BaseUri 'https://github.example.com/api/v3'
Sets the base uri for a GitHub Enterprise Server
EXAMPLE 2
'https://api.octocorp.ghe.com' | Add-GitHubBaseUri -UploadUri 'https://uploads.octocorp.ghe.com'
The base uri is passed in from the pipeline
PARAMETERS
-BaseUri
Base uri of the API
Type: System.String
DefaultValue: ''
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
Position: 0
IsRequired: true
ValueFromPipeline: true
ValueFromPipelineByPropertyName: false
ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''
-UploadUri
Uri used for release asset uploads
Defaults to https://uploads.github.com (or the derived GitHub Enterprise Server upload uri)
Type: System.String
DefaultValue: ''
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
Position: Named
IsRequired: false
ValueFromPipeline: false
ValueFromPipelineByPropertyName: false
ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''
CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.
INPUTS
System.String
{{ Fill in the Description }}
OUTPUTS
NOTES
Aliases: Get-GHAddBaseUri
The tokens are only sent to the host of the base uri & the upload uri