CircleCI API v2 POST request is giving error

So, I tried with both Python and Curl following this article:
https://circleci.com/docs/api/v2/index.html#operation/listWorkflowsByPipelineId

curl --request POST \
  --url https://circleci.com/api/v2/project/gh/abc/xyz/pipeline \
  --header 'authorization: xxxx' \
  --header 'content-type: application/json' \
  --data '{"parameters":{"USE_RUNNER_AGENT": true, "TAGS": "'tf_init,eks_application'"},"branch": "dev"}'

Error:


                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
curl: (35) schannel: next InitializeSecurityContext failed: Unknown error (0x80092012) - The revocation function was unable to check revocation for the certificate.

Python:

import requests
import json

headers = {"authorization": "XXXX",
            "Content-type": "application/json"}
data = {"branch": "fmdev",
        "tag": "(tf_init,eks_application)",
        "parameters":  {"USE_RUNNER_AGENT": True},
        }
post_url = f"https://circleci.com/api/v2/project/gh/abc/xyz/pipeline "
print(f"Data: {data}, URL: {post_url}")
r = requests.post(
        post_url,
        headers=headers,
        data=json.dumps(data),
        timeout=60,
        verify=False
    )
print(r.status_code)
print(r.json)

Getting 404 as response code for the python code.
Note: I have entered the relevant values in place of abc & xyz.

Unknown error (0x80092012)

This ‘unknown’ error is in fact a well known error for curl as it is trying to check the status of the https certificate used by the system providing the end point.

The solution is to set the command line option switch --ssl-no-revoke on curl.

I do not know Python and so can not comment on the structure of the request that you are using.

The header needs to have Circle-Token instead of authorization. Somehow, it is not mentioned in the doc.