Classification Failed

Not applicable

While taking Lesson 1 (Rewrite Target using JavaScript) of Part 5 in Create and Manage Api's, I’m getting “Classification failed for host gmanikandan-test.apigee.net” while trying to access http://gmanikandan-test.apigee.net/v1/humor/joke?apikey=1ymmcNLnGhPPa38DGTMuCpiKlVAyGSrt&jokeid=3229...

My Organization name is gmanikandan and It's successfully deployed in test environment. Please suggest on this.

Solved Solved
1 7 1,818
2 ACCEPTED SOLUTIONS

Please check the base path for the API Proxy. If you send in a request to a base path that is not known, you will receive the "classification failed" message.

Example:

$ curl -i http://gmanikandan-test.apigee.net/v1/DOESNOTEXIST
HTTP/1.1 404 Not Found
Content-Type: application/json; charset=UTF-8
Content-Length: 128

{
  "fault": {
    "faultstring": "Classification failed for host gmanikandan-test.apigee.net",
    "detail": {
      "code": "CLASSIFICATION_FAILED"
    }
  }
}

View solution in original post

Hi Manikandan,

Your proxy base path appears to be /api. This means the base path of all APIs available from this proxy will be http://gmanikandan-test.apigee.net/api

You are trying to invoke the API by accessing http://gmanikandan-test.apigee.net/v1/humor/joke .

You can see that the two do not match. You must either invoke it as

http://gmanikandan-test.apigee.net/api/joke

or, convert your API proxy to use /v1/humor as the base path, instead of /api.

Does this make sense?

View solution in original post

7 REPLIES 7

Not applicable

Did you try running a trace to see if the call hits the message processors. It might be failing at the Routers or the Message processors.

Can you share more details

Please check the base path for the API Proxy. If you send in a request to a base path that is not known, you will receive the "classification failed" message.

Example:

$ curl -i http://gmanikandan-test.apigee.net/v1/DOESNOTEXIST
HTTP/1.1 404 Not Found
Content-Type: application/json; charset=UTF-8
Content-Length: 128

{
  "fault": {
    "faultstring": "Classification failed for host gmanikandan-test.apigee.net",
    "detail": {
      "code": "CLASSIFICATION_FAILED"
    }
  }
}

Not applicable
@Srividya Annapragada

I tried in Trace as well. It just gives 404.

146-404-in-trace.png

Let me know what other info you would require to help me fix this.

Not applicable

@Dino

Please refer the below screenshot showing the base path for the API Proxy.

147-api-base-path.png

Let me know if you would require any more info to help me.

Hi Manikandan,

Your proxy base path appears to be /api. This means the base path of all APIs available from this proxy will be http://gmanikandan-test.apigee.net/api

You are trying to invoke the API by accessing http://gmanikandan-test.apigee.net/v1/humor/joke .

You can see that the two do not match. You must either invoke it as

http://gmanikandan-test.apigee.net/api/joke

or, convert your API proxy to use /v1/humor as the base path, instead of /api.

Does this make sense?

Not applicable
@Dino

I tried changing the API proxy to use /v1/humor as the base path instead of /api, but still the same error 😞

Not applicable

I had the same problem and solve it, redeploying the service because it was the right path.