{"record":{"id":"e205327b82f122d2","repo":"SonarSource/sonarqube","slug":"the-web-service-s-doesn-t-exist-anymore-please","errorCode":null,"errorMessage":"The web service '%s' doesn't exist anymore, please read its documentation to use alternatives","messagePattern":"The web service '(.+?)' doesn't exist anymore, please read its documentation to use alternatives","errorType":"http","errorClass":"ServerException","httpStatus":410,"severity":"error","filePath":"server/sonar-webserver-ws/src/main/java/org/sonar/server/ws/RemovedWebServiceHandler.java","lineNumber":40,"sourceCode":"import com.google.common.io.Resources;\nimport java.net.URL;\nimport org.sonar.api.server.ws.Request;\nimport org.sonar.api.server.ws.RequestHandler;\nimport org.sonar.api.server.ws.Response;\nimport org.sonar.server.exceptions.ServerException;\n\nimport static java.net.HttpURLConnection.HTTP_GONE;\n\n/**\n * Used to declare web services that are removed\n */\npublic enum RemovedWebServiceHandler implements RequestHandler {\n\n  INSTANCE;\n\n  @Override\n  public void handle(Request request, Response response) {\n    throw new ServerException(HTTP_GONE, String.format(\"The web service '%s' doesn't exist anymore, please read its documentation to use alternatives\", request.getPath()));\n  }\n\n  public URL getResponseExample() {\n    return Resources.getResource(RemovedWebServiceHandler.class, \"removed-ws-example.json\");\n  }\n}\n","sourceCodeStart":22,"sourceCodeEnd":47,"githubUrl":"https://github.com/SonarSource/sonarqube/blob/184c821202192afc1c599fc912d0889b69fffa53/server/sonar-webserver-ws/src/main/java/org/sonar/server/ws/RemovedWebServiceHandler.java#L22-L47","documentation":"Thrown by RemovedWebServiceHandler when a client calls a web service path that has been deliberately removed from SonarQube. It answers with HTTP 410 (Gone) and tells the caller to read the web service documentation to find replacements, since removed endpoints are kept registered only to return this response.","triggerScenarios":"Hitting any deprecated-and-removed WS path, e.g. legacy api/issues endpoints (api/issues/plan, api/issues/set_severity), old api/pcs, or other endpoints dropped in an upgrade; older SonarQube scanners or third-party clients still calling them.","commonSituations":"After upgrading SonarQube, older CI scripts or plugins call endpoints removed in the new version; copied example code from outdated blog posts; monitoring tools polling removed endpoints.","solutions":["Open ${SONAR_URL}/api_documentation (web_service documentation) on your instance and find the replacement endpoint.","Check the release/upgrade notes for the version you upgraded to and migrate scripts to successor APIs (e.g. quality gate status endpoints replacing removed issue endpoints).","Upgrade SonarQube scanners/clients that hard-code the removed path."],"exampleFix":"// before\ncurl -u $TOKEN \"$SONAR/api/issues/set_severity?issue=...\" // 410 Gone\n// after\n# removed WS; use current API, e.g. set tags/severity via modern endpoints\ncurl -u $TOKEN -X POST \"$SONAR/api/issues/do_transition?issue=...&transition=confirm\"","handlingStrategy":"try-catch","validationCode":"# detect removed endpoints against the live docs before calling\ncurl -su \"$TOKEN\" \"$SONAR/api/documentation/webservices\" | grep -q \"$PATH\" || echo \"endpoint may be removed\"","typeGuard":null,"tryCatchPattern":"Response resp = client.execute(request);\nif (resp.code() == 410) {\n  throw new UnsupportedOperationException(\"Endpoint removed; consult SonarQube API docs for the replacement\");\n}","preventionTips":["Review upgrade notes for removed web services before each SonarQube upgrade.","Generate integrations from the instance's own /api_documentation, not outdated snippets.","Pin scanner/client versions until migration is complete."],"tags":["removed-endpoint","http-410","web-api","deprecation"],"backgroundTag":"deprecated-api-usage","analyzedSha":"184c821202192afc1c599fc912d0889b69fffa53","analyzedAt":"2026-09-09T12:23:51.573Z","contentChangedAt":"2026-09-09T12:23:51.573Z","schemaVersion":2},"datasetVersion":"2026-09-17T15:17:12.973Z"}