pinpoint-apm/pinpoint · warning · ResponseStatusException
Missing argument: applicationId / serviceName / ruleId
Error message
Missing argument: applicationId / serviceName / ruleId
What it means
WebhookController.getWebhook requires at least one of three query parameters — applicationId (bound to applicationName), serviceName, or ruleId — to scope the lookup. When all three are absent or empty, the controller rejects the request with HTTP 400 to avoid returning the entire webhook table.
Source
Thrown at webhook/src/main/java/com/navercorp/pinpoint/web/webhook/controller/WebhookController.java:81
@DeleteMapping()
public Response deleteWebhook(@RequestBody Webhook webhook) {
if (!StringUtils.hasText(webhook.getWebhookId())) {
logger.info("Missing argument: webhookId");
throw new ResponseStatusException(HttpStatus.BAD_REQUEST, "Missing argument: webhook.id");
}
webhookService.deleteWebhook(webhook);
return SimpleResponse.ok();
}
@GetMapping()
public List<Webhook> getWebhook(@RequestParam(value=APPLICATION_ID, required=false) String applicationName,
@RequestParam(value=SERVICE_NAME, required=false) String serviceName,
@RequestParam(value=ALARM_RULE_ID, required=false) String ruleId) {
if (!StringUtils.hasText(applicationName) && !StringUtils.hasText(serviceName) && !StringUtils.hasText(ruleId)) {
logger.info("Missing argument: applicationId/serviceName/ruleId");
throw new ResponseStatusException(HttpStatus.BAD_REQUEST, "Missing argument: applicationId / serviceName / ruleId");
}
if (StringUtils.hasText(ruleId)) {
return webhookService.selectWebhookByRuleId(ruleId);
}
if (StringUtils.hasText(applicationName)) {
return webhookService.selectWebhookByApplicationName(applicationName);
}
return webhookService.selectWebhookByServiceName(serviceName);
}
@PutMapping()
public Response updateWebhook(@RequestBody Webhook webhook) {
if (!StringUtils.hasText(webhook.getWebhookId()) || !StringUtils.hasText(webhook.getUrl()) ||
!(StringUtils.hasText(webhook.getApplicationName()) || StringUtils.hasText(webhook.getServiceName()))) {View on GitHub (pinned to 744c3d3075)
Solutions
- Add at least one filter parameter: ?ruleId=<alarmRuleId>, ?applicationId=<appId>, or ?serviceName=<name>
- Use ruleId when you want webhooks attached to a specific alarm rule
- Use applicationId+serviceName together when listing all webhooks for an application
- Check your HTTP client is not stripping empty-looking but meaningful query parameters
Example fix
// before GET /webhook // after GET /webhook?applicationId=myApp&serviceName=myService
Defensive patterns
Strategy: validation
Validate before calling
boolean hasFilter = hasText(applicationId) || hasText(serviceName) || hasText(ruleId); if (!hasFilter) throw new IllegalArgumentException("Provide at least one of applicationId, serviceName, ruleId"); Type guard
function canQueryWebhooks(p) { return Boolean(p.applicationId?.trim() || p.serviceName?.trim() || p.ruleId?.trim()); } Try / catch
try { return api.getWebhooks(params); } catch (HttpClientErrorException.BadRequest e) { if (e.getResponseBodyAsString().contains("Missing argument: applicationId")) { /* add a required filter param */ } throw e; } Prevention
- Always pass ruleId when filtering by alarm rule; otherwise pass applicationId+serviceName together
- Never rely on default/empty query parameters — build the query string conditionally
- Document required filter combos in your API wrapper
- Test the no-filter call in staging to fail fast
When it happens
Trigger: GET /webhook with no query string; GET /webhook?applicationId= (empty value); passing only unknown parameter names so every @RequestParam resolves to null.
Common situations: Client code forgetting that applicationId maps to the parameter APPLICATION_ID value; users browsing the API in a browser without adding filters; frontends that omit empty-string filters instead of the whole parameter set, plus a logic bug where all filters end up blank.
Understand the failure class
Background: "missing required argument" and "the following required arguments were not provided": what required-argument errors mean and how to fix them — this error's family across 20 libraries.
Related errors
- Missing arguments: webhook.url and applicationId/serviceName
- Missing argument: webhook.id
- Missing arguments: webhook.id, webhook.url, applicationId/se
- there should be ruleId and webhookId to insert webhookSendIn
- Either webhookId or ruleId is needed to get webhook send inf
AI-assisted analysis of pinpoint-apm/pinpoint@744c3d3075 (2026-09-07).
Data as JSON: /api/errors/47c3a62aab033f76.
Report an issue: GitHub.