Skip to content

Confluence returned HTTP error 400 - BadRequest #175

@rjdlobik

Description

@rjdlobik

Description

I'm also receiving a 400 bad request when attempting to retrieve a page by label. I've included the request and response below:

$response = Get-ConfluencePage -Label 'noarchive-single'

WARNING: Confluence returned HTTP error 400 - BadRequest
Invoke-Method : Could not parse cql : type=page AND label=noarchive-single
At C:\Program Files\WindowsPowerShell\Modules\ConfluencePS\2.5.0\ConfluencePS.psm1:772 char:17

            Invoke-Method @iwParameters
            ~~~~~~~~~~~~~~~~~~~~~~~~~~~
CategoryInfo : InvalidResult: ({"statusCode":4...:"Bad Request"}:String) [Invoke-Method], ArgumentException
FullyQualifiedErrorId : InvalidResponse.Status400,Invoke-Method

Steps To Reproduce

Run this from the command prompt. Any label with a "-" in it will not work.

Get-ConfluencePage -Label 'noarchive-single'

Expected behavior

Content to be returned from the web service.

PS H:\> Get-Module ConfluencePS -ListAvailable | Select Name, Version

Name         Version
----         -------
ConfluencePS 2.5.0

Possible Solution

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions