[SERVER-9440] Trying to use the Simple Rest Interface Created: 23/Apr/13  Updated: 09/Jul/16  Resolved: 29/Apr/13

Status: Closed
Project: Core Server
Component/s: Querying
Affects Version/s: 2.4.3
Fix Version/s: None

Type: Question Priority: Major - P3
Reporter: Carlos Montero Assignee: Stennie Steneker (Inactive)
Resolution: Duplicate Votes: 0
Labels: mongo-cr, rest, simple-rest, simple-rest-interface
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Linux CentOS


Issue Links:
Duplicate
duplicates SERVER-2030 Better REST api query Closed
Participants:

 Description   

Hi everybody,

I'm trying the next request:

http://myurl:28017/test/skus/?filter_skuId=1-333-15

And I receive the next output:

{
"offset" : 0,
"rows": [

],

"total_rows" : 0 ,
"query" :

{ "skuId" : 1 }

,
"millis" : 0
}

I do have a document with the skuId = 1-333-15. If you see the query it says "query" :

{ "skuId" : 1 }

although I'm passing the value 1-333-15.

Am I missing something? does I have to pass the value in a specific way? how can I pass that value?

Thanks!



 Comments   
Comment by Stennie Steneker (Inactive) [ 29/Apr/13 ]

Hi Carlos,

The simple REST interface has a number of limitations, and currently makes some values difficult to query for. Your value "1-333-15" is being incorrectly truncated at the first non-numeric character; this is a known issue and there is a tracking ticket SERVER-2030 which you can upvote/watch for an improved API.

For a more complete RESTful API I would suggest using one of the alternative HTTP Interfaces listed in the MongoDB documentation.

Regards,
Stephen

Generated at Thu Feb 08 03:20:25 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.