HTTP 404 error "Object not found" returned from a switch that supports multiple REST API versions (10.04 and later)
Symptom
支持多个REST API版本的一个开关returns response code 404 and the response body contains the following text string:
Object not found
Cause
The resource does not exist in the system. The URI in the request is incorrect for the version of the REST API specified in the request.
Action
Verify the URI of the resource and retry the request.
The schema for resources accessed through the REST v1 API can differ from the schema for the resources accessed through the REST v10.04 API.
For example, a REST request with the following URI will fail because the interfaces collection does not exist in the REST v1 API:
/rest/v1/system/interfaces/lag50
The correct URI for the
lag50
resource in the REST v1 API is the following:/rest/v1/system/ports/lag50