-
Type: Task
-
Resolution: Fixed
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: API, Cloud Manager, Code Examples, Ops Manager
-
Labels:
-
0.2
Within the Restore Jobs section of the Cloud Manager API documentation (as well as it's child sections), various examples depict the endpoint as:
/groups/{GROUP-ID}/clusters/{CLUSTER-ID}/restorejobs
However, the restorejobs portion of the endpoint should include an uppercase "J": restoreJobs.
Attempts to call the endpoints using the lowercase restorejobs result in the following RESOURCE_NOT_FOUND error:
$ curl --user "$CLOUD_USERNAME:$CLOUD_API_KEY" --digest --header "Accept: application/json" --header "Content-Type: application/json" --include --request GET "https://cloud.mongodb.com/api/public/v1.0/groups/5a4cf4fedf9db10bdc849d4a/clusters/5a4cf7a94e6581190d3dad1f/restorejobs?pretty=true" HTTP/1.1 401 Unauthorized Date: Wed, 03 Jan 2018 15:44:37 GMT WWW-Authenticate: Digest realm="MMS Public API", domain="", nonce="lF/HUP84T4bsOdDhzpNkk/uBbxz2nSsm", algorithm=MD5, qop="auth", stale=false Content-Type: application/json;charset=ISO-8859-1 Content-Length: 106 HTTP/1.1 404 Not Found Date: Wed, 03 Jan 2018 15:44:37 GMT Content-Length: 335 Content-Type: application/json { "detail" : "Cannot find resource /api/public/v1.0/groups/5a4cf4fedf9db10bdc849d4a/clusters/5a4cf7a94e6581190d3dad1f/restorejobs.", "error" : 404, "errorCode" : "RESOURCE_NOT_FOUND", "parameters" : [ "/api/public/v1.0/groups/5a4cf4fedf9db10bdc849d4a/clusters/5a4cf7a94e6581190d3dad1f/restorejobs" ], "reason" : "Not Found" }
The same API call, using the uppercase "J" succeeds as follows:
$ curl --user "$CLOUD_USERNAME:$CLOUD_API_KEY" --digest --header "Accept: application/json" --header "Content-Type: application/json" --include --request GET "https://cloud.mongodb.com/api/public/v1.0/groups/5a4cf4fedf9db10bdc849d4a/clusters/5a4cf7a94e6581190d3dad1f/restoreJobs?pretty=true" HTTP/1.1 401 Unauthorized Date: Wed, 03 Jan 2018 16:44:40 GMT WWW-Authenticate: Digest realm="MMS Public API", domain="", nonce="rBuSfaW7O2n0uf+DjaUurQoJRahjltD0", algorithm=MD5, qop="auth", stale=false Content-Type: application/json;charset=ISO-8859-1 Content-Length: 106 HTTP/1.1 200 OK Date: Wed, 03 Jan 2018 16:44:40 GMT Content-Length: 258 Content-Type: application/json Strict-Transport-Security: max-age=300 { "links" : [ { "href" : "https://cloud.mongodb.com/api/public/v1.0/groups/5a4cf4fedf9db10bdc849d4a/clusters/5a4cf7a94e6581190d3dad1f/restoreJobs?pretty=true&pageNum=1&itemsPerPage=100", "rel" : "self" } ], "results" : [ ], "totalCount" : 0 }
As such, the examples within the documentation should be updated to accurately reflect the uppercase "J" in restoreJobs.