'What is the correct post request body for AWS Codepipeline webhook?

I have a codepipeline webhook defined below:

webhooks:
- arn: arn:aws:codepipeline:eu-west-1:$$$:webhook:codepipeline-webhook-test-staging
  definition:
    authentication: UNAUTHENTICATED
    authenticationConfiguration: {}
    filters:
    - jsonPath: $.ref
      matchEquals: refs/heads/{Branch}
    name: codepipeline-webhook-test-staging
    targetAction: Source
    targetPipeline: test-staging-pipeline
  tags: []
  url: https://eu-west-1.webhooks.aws/

I want the pipeline to fire whenever there is a post request to that url. I've tried posting with no body which returns http 200 but the pipeline hasn't triggered and I've tried different permutations of the following:

{
    "ref": "staging"
}
or
{
    "ref": "refs/heads/staging"
}

What is the correct json body to trigger the pipeline?



Solution 1:[1]

@gshpychka's answer worked for me:

Set the filter to matchEquals: refs/heads/staging

Thanks!

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Custard