jsdelivr / globalping

A global network of probes to run network tests like ping, traceroute and DNS resolve
https://globalping.io
270 stars 33 forks source link

Creating a measurement using Globalping API with HttpOptions is not successful #535

Closed piquark6046 closed 3 months ago

piquark6046 commented 3 months ago

Screencast from 2024-08-01 10-52-49.webm

I think that there is a bug on your backend side because I checked with https://www.jsdelivr.com/docs/api.globalping.io#post-/v1/measurements to find my error but not found.

MartinKolarik commented 3 months ago

Hey, HttpOptions is just the name of the type, the request format is:

measurementOptions: {
  request: { ... }
}
alexey-yarmosh commented 3 months ago

For "Bad Request" errors API responds with the details of the problem, which is useful in your and similar cases:

{
  "error": {
    "type": "validation_error",
    "message": "Parameter validation failed.",
    "params": {
      "measurementOptions.HttpOptions": "\"measurementOptions.HttpOptions\" is not allowed"
    }
  },
  "links": {
    "documentation": "https://www.jsdelivr.com/docs/api.globalping.io#post-/v1/measurements"
  }
}
piquark6046 commented 3 months ago

OK. Thanks.