Test-APITCGAPIKey

SYNOPSIS

Test the APITCG API key

SYNTAX

Test (Default)

Test-APITCGAPIKey [[-BaseUri] <string>]

ALIASES

This cmdlet has the following aliases,

  • None

DESCRIPTION

The Test-APITCGAPIKey cmdlet tests the base URI & API key that are defined by the Add-APITCGBaseURI & Add-APITCGAPIKey cmdlets

Helpful when needing to validate general functionality or when using deployment tools

The test makes a single GET request to the /api/tcgs?limit=1 endpoint. A successful request counts as 1 request against the monthly request quota of the API key (Free plan = 1,000 requests per month), failed requests do not count

A 200 status code means the base URI & API key are valid. A 401 status code means the API key was not accepted. The rate limit of the response is part of the result

EXAMPLES

EXAMPLE 1

Test-APITCGAPIKey

Tests the base URI & API key that are defined by the Add-APITCGBaseURI & Add-APITCGAPIKey cmdlets

EXAMPLE 2

Test-APITCGAPIKey -BaseUri https://apitcg.gateway.example.org

Tests the defined base URI & the API key that was defined by the Add-APITCGAPIKey cmdlet

The full test uri in this example is: https://apitcg.gateway.example.org/api/tcgs?limit=1

PARAMETERS

-BaseUri

Define the base URI for the APITCG API connection

By default the value used is the one defined by the Add-APITCGBaseURI function

Type: System.String
DefaultValue: $APITCGModuleBaseUri
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
  Position: 0
  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

OUTPUTS

NOTES

N/A