Get Webhook API broken

https://circleci.com/docs/api/v2/index.html?utm_source=google&utm_medium=sem&utm_campaign=sem-google-dg--emea-en-dsa-tROAS-auth-brand&utm_term=g_-_c__dsa_&utm_content=&gclid=CjwKCAjwhJukBhBPEiwAniIcNe4drSK2GAb_tEKOGM9vWOllsP_7WdBrZLtyaDQ-gM7KOC6nzDVJfxoCtPsQAvD_BwE#operation/getWorkflowById

guys - your api is broken.

do you even have monitoring around your API to alert if something doesn’t work?

I keep getting this
{:message “You must log in first.”}

I can use all your other api’s - common, you do CI/CD and you don’t implement proper monitoring and observability>?

1 Like

Hi @thecloudstudent-vt,

Thank you for reporting this issue. I am escalating it internally, and will update this thread when I have more information.

If you have a more specific concern regarding your account, I would ask that you open a support ticket and we can take a deeper look:
https://support.circleci.com/hc/en-us/requests/new

Hi @thecloudstudent-vt,

Upon further investigation, we did not find anything that was broken in regards to this api endpoint.

Could you confirm for me which form of authentication you were using for the api request?

I tested both of the following (personal api token/basic) and was able to get a valid response:

curl --request GET \
  --url https://circleci.com/api/v2/workflow/webhook-id-goes-here \
  --header "circle-token: $CIRCLECI_TOKEN"

and

curl --request GET \
  --url https://circleci.com/api/v2/webhook/webhook-id-goes-here \
  --header "Authorization: Basic $(echo -n $CIRCLECI_TOKEN | base64)"

thanks Aaron,

I need to list the webhooks

so I can delete the webhook that was created with the same name - again, why would this be even possible - to create webhooks or any features with the same name??

I am using this

> curl --request GET \
>   --url 'https://circleci.com/api/v2/webhook?scope-id=<my project id>&scope-type=project' \
>   --header 'authorization: <my circle ci token>'
import base64

conn = http.client.HTTPSConnection("circleci.com")

# Encode the username and password using base64

auth_value = base64.b64encode(f"<token>".encode()).decode()

headers = { 'authorization': f"Basic {auth_value}" }

conn.request("GET", "/api/v2/webhook?scope-id=SOME_STRING_VALUE&scope-type=SOME_STRING_VALUE", headers=headers)

res = conn.getresponse()

data = res.read()

print(data.decode("utf-8"))

solution - guys, write better docs - please

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.