<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 02:58:46 UTC 2024

It is possible to restrict the fields that are returned in this document by specifying the 'field' parameter in your request.
For example, to request only the issue key and summary append 'field=key&field=summary' to the URL of your request.
-->
<rss version="0.92" >
<channel>
    <title>MongoDB Jira</title>
    <link>https://jira.mongodb.org</link>
    <description>This file is an XML representation of an issue</description>
    <language>en-us</language>    <build-info>
        <version>9.7.1</version>
        <build-number>970001</build-number>
        <build-date>13-04-2023</build-date>
    </build-info>


<item>
            <title>[SERVER-2030] Better REST api query </title>
                <link>https://jira.mongodb.org/browse/SERVER-2030</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;Doing field by field isn&apos;t great so we should deprecate.&lt;/p&gt;

&lt;p&gt;Should add&lt;/p&gt;

&lt;p&gt;GET /db/collection&lt;br/&gt;
with &lt;/p&gt;
{x : 1 } 
&lt;p&gt;in the body&lt;/p&gt;</description>
                <environment></environment>
        <key id="13558">SERVER-2030</key>
            <summary>Better REST api query </summary>
                <type id="4" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14710&amp;avatarType=issuetype">Improvement</type>
                                            <priority id="3" iconUrl="https://jira.mongodb.org/images/icons/priorities/major.svg">Major - P3</priority>
                        <status id="6" iconUrl="https://jira.mongodb.org/images/icons/statuses/closed.png" description="The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.">Closed</status>
                    <statusCategory id="3" key="done" colorName="success"/>
                                    <resolution id="9">Done</resolution>
                                        <assignee username="backlog-server-platform">DO NOT USE - Backlog - Platform Team</assignee>
                                    <reporter username="eliot">Eliot Horowitz</reporter>
                        <labels>
                            <label>neweng</label>
                    </labels>
                <created>Fri, 29 Oct 2010 13:39:58 +0000</created>
                <updated>Fri, 7 Jul 2017 18:40:13 +0000</updated>
                            <resolved>Fri, 7 Jul 2017 18:40:13 +0000</resolved>
                                                                    <component>HTTP Console</component>
                                        <votes>6</votes>
                                    <watches>9</watches>
                                                                                                                <comments>
                            <comment id="963007" author="radutoader" created="Fri, 10 Jul 2015 09:38:40 +0000"  >&lt;p&gt;Hi,&lt;br/&gt;
This isn&apos;t fixed event I have the mongod version : &lt;br/&gt;
db version v2.4.9&lt;br/&gt;
Fri Jul 10 12:30:34.190 git version: nogitversion&lt;/p&gt;

&lt;p&gt;It&apos;s not usefull if I cannot search for objects which have a string id / key and cannot find them.&lt;br/&gt;
also the url : &quot;db/collection/id&quot; does not work either, it returns all elements in my collection&lt;/p&gt;
</comment>
                            <comment id="207416" author="ihristov" created="Wed, 5 Dec 2012 20:54:04 +0000"  >&lt;p&gt;Seems like there is not much of a motivation to improve the build-int REST API. Thus I would like to point that better REST API will definitely make MongoDB much easier to place in new projects as proof of concept and later switch to more powerful REST API. One great advantage of using MongoDB built-in API is that you can serve the content directly without having to bother with installing anything else bug MongoDB. In addition, it would be nice to have a MongoDB REST API module which we can install / enable if needed in contrast to have the logic built-in the core server. This will also facilitate contributing to this module only.&lt;/p&gt;</comment>
                            <comment id="140397" author="ehershey" created="Fri, 6 Jul 2012 17:08:37 +0000"  >&lt;p&gt;Same question here.... I can&apos;t search for hex encoded _id values in other records - &lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;http://127.0.0.1:28017/test/apps/?filter_room_id=4ff63758cf1d77f51c000000&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://127.0.0.1:28017/test/apps/?filter_room_id=4ff63758cf1d77f51c000000&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Should be querying with &lt;/p&gt;
{ &quot;room_id&quot; : &quot;4ff63758cf1d77f51c000000&quot; }

&lt;p&gt;but is truncating the ID: &lt;/p&gt;

&lt;p&gt;{&lt;br/&gt;
  &quot;offset&quot; : 0,&lt;br/&gt;
  &quot;rows&quot;: [&lt;/p&gt;

&lt;p&gt;  ],&lt;/p&gt;

&lt;p&gt;  &quot;total_rows&quot; : 0 ,&lt;br/&gt;
  &quot;query&quot; : &lt;/p&gt;
{ &quot;room_id&quot; : 4 }
&lt;p&gt; ,&lt;br/&gt;
  &quot;millis&quot; : 0&lt;br/&gt;
}&lt;/p&gt;</comment>
                            <comment id="99726" author="michael1047" created="Fri, 16 Mar 2012 20:22:59 +0000"  >&lt;p&gt;If I&apos;m trying to search for &lt;/p&gt;
{&quot;sym&quot;:&quot;500TEST&quot;}
&lt;p&gt;, how do I force the api to use quotes?&lt;br/&gt;
The following swallows &quot;TEST&quot; and uses 500 with no quotes:&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;http://localhost:28017/cache/entry/?filter_rec.sym=500TEST&amp;amp;limit=100&amp;amp;jsonp=?&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://localhost:28017/cache/entry/?filter_rec.sym=500TEST&amp;amp;limit=100&amp;amp;jsonp=?&lt;/a&gt;&lt;br/&gt;
Here&apos;s what&apos;s returned.  (notice that 500TEST is converted to 500.&lt;br/&gt;
?({&lt;br/&gt;
  &quot;offset&quot; : 0,&lt;br/&gt;
  &quot;rows&quot;: [&lt;/p&gt;

&lt;p&gt;  ],&lt;/p&gt;

&lt;p&gt;  &quot;total_rows&quot; : 0 ,&lt;br/&gt;
  &quot;query&quot; : &lt;/p&gt;
{ &quot;rec.sym&quot; : 500 }
&lt;p&gt; ,&lt;br/&gt;
  &quot;millis&quot; : 156&lt;br/&gt;
}&lt;br/&gt;
)&lt;/p&gt;

&lt;p&gt;Any help is greatly appreciated. &lt;img class=&quot;emoticon&quot; src=&quot;https://jira.mongodb.org/images/icons/emoticons/smile.png&quot; height=&quot;16&quot; width=&quot;16&quot; align=&quot;absmiddle&quot; alt=&quot;&quot; border=&quot;0&quot;/&gt;&lt;/p&gt;</comment>
                            <comment id="22179" author="remonvv" created="Sat, 8 Jan 2011 01:43:23 +0000"  >&lt;p&gt;Speaking as someone that designs RESTful WS APIs for a living I would much appreciate if this could follow RESTful WS best practices as closely as possible. As such you should not use a POST for a query. A query should be implemented using the GET http verb, updates/upserts as PUT, inserts as POST, remove as DELETE, etc. Make sure URI design and HTTP status code usage is proper too please.&lt;/p&gt;

&lt;p&gt;The query parameter as in your first suggestion seems a good start. URI composition should include database name, collection name and optionally field name, e.g. :&lt;/p&gt;

&lt;p&gt;find(criteria, fields) : GET http(s)://&lt;span class=&quot;error&quot;&gt;&amp;#91;host&amp;#93;&lt;/span&gt;:&lt;span class=&quot;error&quot;&gt;&amp;#91;port&amp;#93;&lt;/span&gt;/&lt;span class=&quot;error&quot;&gt;&amp;#91;database&amp;#93;&lt;/span&gt;/&lt;span class=&quot;error&quot;&gt;&amp;#91;collection&amp;#93;&lt;/span&gt;/?criteria=&lt;span class=&quot;error&quot;&gt;&amp;#91;criteria&amp;#93;&lt;/span&gt;&amp;amp;fields=&lt;span class=&quot;error&quot;&gt;&amp;#91;fields&amp;#93;&lt;/span&gt;&lt;br/&gt;
count(criteria) : GET http(s)://&lt;span class=&quot;error&quot;&gt;&amp;#91;host&amp;#93;&lt;/span&gt;:&lt;span class=&quot;error&quot;&gt;&amp;#91;port&amp;#93;&lt;/span&gt;/&lt;span class=&quot;error&quot;&gt;&amp;#91;database&amp;#93;&lt;/span&gt;/&lt;span class=&quot;error&quot;&gt;&amp;#91;collection&amp;#93;&lt;/span&gt;/count?criteria=&lt;span class=&quot;error&quot;&gt;&amp;#91;criteria&amp;#93;&lt;/span&gt;&lt;br/&gt;
update(criteria, objNew, upsert, multiple) : PUT http(s)://&lt;span class=&quot;error&quot;&gt;&amp;#91;host&amp;#93;&lt;/span&gt;:&lt;span class=&quot;error&quot;&gt;&amp;#91;port&amp;#93;&lt;/span&gt;/&lt;span class=&quot;error&quot;&gt;&amp;#91;database&amp;#93;&lt;/span&gt;/&lt;span class=&quot;error&quot;&gt;&amp;#91;collection&amp;#93;&lt;/span&gt;/?criteria=&lt;span class=&quot;error&quot;&gt;&amp;#91;criteria&amp;#93;&lt;/span&gt;&amp;amp;upsert=&lt;span class=&quot;error&quot;&gt;&amp;#91;upsert&amp;#93;&lt;/span&gt;&amp;amp;multiple=&lt;span class=&quot;error&quot;&gt;&amp;#91;multiple&amp;#93;&lt;/span&gt; with objNew as the PUT body.&lt;/p&gt;

&lt;p&gt;I would also suggest allowing the typical GET/PUT by id, in mongo&apos;s case the _id field so that :&lt;/p&gt;

&lt;p&gt;find({_id: id}) : GET http(s)://&lt;span class=&quot;error&quot;&gt;&amp;#91;host&amp;#93;&lt;/span&gt;:&lt;span class=&quot;error&quot;&gt;&amp;#91;port&amp;#93;&lt;/span&gt;/&lt;span class=&quot;error&quot;&gt;&amp;#91;database&amp;#93;&lt;/span&gt;/&lt;span class=&quot;error&quot;&gt;&amp;#91;collection&amp;#93;&lt;/span&gt;/&lt;span class=&quot;error&quot;&gt;&amp;#91;id&amp;#93;&lt;/span&gt;&lt;br/&gt;
update({_id: id}, objNew) : PUT http(s)://&lt;span class=&quot;error&quot;&gt;&amp;#91;host&amp;#93;&lt;/span&gt;:&lt;span class=&quot;error&quot;&gt;&amp;#91;port&amp;#93;&lt;/span&gt;/&lt;span class=&quot;error&quot;&gt;&amp;#91;database&amp;#93;&lt;/span&gt;/&lt;span class=&quot;error&quot;&gt;&amp;#91;collection&amp;#93;&lt;/span&gt;/&lt;span class=&quot;error&quot;&gt;&amp;#91;id&amp;#93;&lt;/span&gt;&lt;/p&gt;

&lt;p&gt;work as they should.&lt;/p&gt;

&lt;p&gt;I&apos;m happy to create a draft design if someone is interested.&lt;/p&gt;
</comment>
                            <comment id="20092" author="eliot" created="Sat, 6 Nov 2010 14:13:28 +0000"  >&lt;p&gt;Correct.&lt;br/&gt;
We can&apos;t really improve the old method of querying as it doesn&apos;t work.&lt;br/&gt;
We&apos;re going to try to get this in 1.7, but the 1.7.x means if could slip.&lt;/p&gt;</comment>
                            <comment id="20090" author="vak" created="Sat, 6 Nov 2010 07:59:12 +0000"  >&lt;p&gt;Issue &lt;a href=&quot;http://jira.mongodb.org/browse/SERVER-1800&quot; class=&quot;external-link&quot; rel=&quot;nofollow&quot;&gt;http://jira.mongodb.org/browse/SERVER-1800&lt;/a&gt; is already closed and this one isn&apos;t yet implemented. &lt;br/&gt;
Does it mean that REST API isn&apos;t working as such in 1.6 and will not be until 1.7?&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10011">
                    <name>Depends</name>
                                                                <inwardlinks description="is depended on by">
                                        <issuelink>
            <issuekey id="71490">SERVER-9327</issuekey>
        </issuelink>
                            </inwardlinks>
                                    </issuelinktype>
                            <issuelinktype id="10010">
                    <name>Duplicate</name>
                                                                <inwardlinks description="is duplicated by">
                                        <issuelink>
            <issuekey id="72877">SERVER-9440</issuekey>
        </issuelink>
                            </inwardlinks>
                                    </issuelinktype>
                            <issuelinktype id="10012">
                    <name>Related</name>
                                            <outwardlinks description="related to">
                                        <issuelink>
            <issuekey id="111048">SERVER-12730</issuekey>
        </issuelink>
                            </outwardlinks>
                                                        </issuelinktype>
                    </issuelinks>
                <attachments>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                <customfield id="customfield_10050" key="com.atlassian.jira.toolkit:comments">
                        <customfieldname># Replies</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>7.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                <customfield id="customfield_10055" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>Date of 1st Reply</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Sat, 6 Nov 2010 07:59:12 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        8 years, 31 weeks, 5 days ago
    
                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_18254" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname>Dependencies</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue><![CDATA[]]></customfieldvalue>


                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_15850" key="com.atlassian.jira.plugins.jira-development-integration-plugin:devsummary">
                        <customfieldname>Development</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        <customfield id="customfield_10057" key="com.atlassian.jira.toolkit:lastusercommented">
                        <customfieldname>Last comment by Customer</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>true</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                            <customfield id="customfield_10056" key="com.atlassian.jira.toolkit:lastupdaterorcommenter">
                        <customfieldname>Last commenter</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>andrew.morrow@mongodb.com</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_11151" key="com.atlassian.jira.toolkit:LastCommentDate">
                        <customfieldname>Last public comment date</customfieldname>
                        <customfieldvalues>
                            8 years, 31 weeks, 5 days ago
                        </customfieldvalues>
                    </customfield>
                                                                                                                        <customfield id="customfield_10000" key="com.atlassian.jira.plugin.system.customfieldtypes:radiobuttons">
                        <customfieldname>Old_Backport</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="10000"><![CDATA[No]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_10051" key="com.atlassian.jira.toolkit:participants">
                        <customfieldname>Participants</customfieldname>
                        <customfieldvalues>
                                        <customfieldvalue>backlog-server-platform</customfieldvalue>
            <customfieldvalue>ehershey</customfieldvalue>
            <customfieldvalue>eliot</customfieldvalue>
            <customfieldvalue>ihristov</customfieldvalue>
            <customfieldvalue>michael1047</customfieldvalue>
            <customfieldvalue>radutoader</customfieldvalue>
            <customfieldvalue>remonvv</customfieldvalue>
            <customfieldvalue>vak</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hrpc7z:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|hrah53:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10558" key="com.pyxis.greenhopper.jira:gh-global-rank">
                        <customfieldname>Rank (Obsolete)</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>4764</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                            <customfield id="customfield_23361" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname>Requested By</customfieldname>
                        <customfieldvalues>
                                

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                <customfield id="customfield_10053" key="com.atlassian.jira.ext.charting:timeinstatus">
                        <customfieldname>Time In Status</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        <customfield id="customfield_22870" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname>Triagers</customfieldname>
                        <customfieldvalues>
                                

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_14350" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>serverRank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|ht0qrj:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                    </customfields>
    </item>
</channel>
</rss>