Skip to content

Get-Check

SYNOPSIS

Get details about one or more Healthchecks checks by UUID, slug, or tag.

SYNTAX

__AllParameterSets

Get-Check [-ApiKey] <string> [-BaseUrl] <string> [[-Slug] <string>] [[-Tag] <string[]>] [[-UUID] <string>] [<CommonParameters>]

ALIASES

None

DESCRIPTION

Retrieves information about checks from a Healthchecks instance using the API v3. You can query by UUID (for a single check), by slug, or by one or more tags. If UUID is specified, Slug and Tag must not be used.

EXAMPLES

EXAMPLE 1

Get-Check -ApiKey $apiKey -BaseUrl "https://checks.example.com" -UUID "f618072a-7bde-4eee-af63-71a77c5723bc"

Retrieves the check with the specified UUID.

EXAMPLE 2

Get-Check -ApiKey $apiKey -BaseUrl "https://checks.example.com" -Tag "prod","db"

Retrieves all checks with the tags "prod" and "db".

PARAMETERS

-ApiKey

The Healthchecks API key for authentication.

Type: System.String
DefaultValue: ''
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
  Position: 0
  IsRequired: true
  ValueFromPipeline: false
  ValueFromPipelineByPropertyName: false
  ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''

-BaseUrl

The base URL of the Healthchecks instance (e.g., https://checks.example.com).

Type: System.String
DefaultValue: ''
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
  Position: 1
  IsRequired: true
  ValueFromPipeline: false
  ValueFromPipelineByPropertyName: false
  ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''

-Slug

(Optional) The slug of the check to retrieve.

Type: System.String
DefaultValue: ''
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
  Position: 2
  IsRequired: false
  ValueFromPipeline: false
  ValueFromPipelineByPropertyName: false
  ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''

-Tag

(Optional) One or more tags to filter checks by. Accepts an array of strings.

Type: System.String[]
DefaultValue: ''
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
  Position: 3
  IsRequired: false
  ValueFromPipeline: false
  ValueFromPipelineByPropertyName: false
  ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''

-UUID

(Optional) The UUID of the check to retrieve. If specified, Slug and Tag must not be used.

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

None

OUTPUTS

PSCustomObject with Url, StatusCode, StatusMessage, Checks, and Success properties

Returns a PSCustomObject with the following properties: - Url - StatusCode - StatusMessage - Checks - Success

NOTES

If UUID is specified, do not specify Slug or Tag. All parameters except ApiKey and BaseUrl are optional.