SharePoint server REST: Find folder by attribute












1















I am developing an integration between several systems and in one point I have to find the files inside a folder using the SharePoint REST API. The data I have to look for the folder is the List were it is and an attribute named "Código de material". I am by no means a SharePoint expert. So, I am sorry beforehand for the terms mistakes.



my folder screenshot



I have been trying with a few REST method but to no avail. For example:



https://sharepointserver.com/_api/lists/getbytitle('MyListName')/items?$filter=C%C3%B3digo%20de%20Material=%27000000000000401426%27


returns this error message



<m:error xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata">
<m:code>-1, Microsoft.SharePoint.Client.InvalidClientQueryException</m:code>
<m:message xml:lang="es-ES">La expresión "Código de Material='000000000000401426'" no es válida.</m:message>
</m:error>


What would be the correct way to filter a list by a given folder attribute?



FWIW I am using Java but the question is about the REST call really.










share|improve this question





























    1















    I am developing an integration between several systems and in one point I have to find the files inside a folder using the SharePoint REST API. The data I have to look for the folder is the List were it is and an attribute named "Código de material". I am by no means a SharePoint expert. So, I am sorry beforehand for the terms mistakes.



    my folder screenshot



    I have been trying with a few REST method but to no avail. For example:



    https://sharepointserver.com/_api/lists/getbytitle('MyListName')/items?$filter=C%C3%B3digo%20de%20Material=%27000000000000401426%27


    returns this error message



    <m:error xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata">
    <m:code>-1, Microsoft.SharePoint.Client.InvalidClientQueryException</m:code>
    <m:message xml:lang="es-ES">La expresión "Código de Material='000000000000401426'" no es válida.</m:message>
    </m:error>


    What would be the correct way to filter a list by a given folder attribute?



    FWIW I am using Java but the question is about the REST call really.










    share|improve this question



























      1












      1








      1








      I am developing an integration between several systems and in one point I have to find the files inside a folder using the SharePoint REST API. The data I have to look for the folder is the List were it is and an attribute named "Código de material". I am by no means a SharePoint expert. So, I am sorry beforehand for the terms mistakes.



      my folder screenshot



      I have been trying with a few REST method but to no avail. For example:



      https://sharepointserver.com/_api/lists/getbytitle('MyListName')/items?$filter=C%C3%B3digo%20de%20Material=%27000000000000401426%27


      returns this error message



      <m:error xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata">
      <m:code>-1, Microsoft.SharePoint.Client.InvalidClientQueryException</m:code>
      <m:message xml:lang="es-ES">La expresión "Código de Material='000000000000401426'" no es válida.</m:message>
      </m:error>


      What would be the correct way to filter a list by a given folder attribute?



      FWIW I am using Java but the question is about the REST call really.










      share|improve this question
















      I am developing an integration between several systems and in one point I have to find the files inside a folder using the SharePoint REST API. The data I have to look for the folder is the List were it is and an attribute named "Código de material". I am by no means a SharePoint expert. So, I am sorry beforehand for the terms mistakes.



      my folder screenshot



      I have been trying with a few REST method but to no avail. For example:



      https://sharepointserver.com/_api/lists/getbytitle('MyListName')/items?$filter=C%C3%B3digo%20de%20Material=%27000000000000401426%27


      returns this error message



      <m:error xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata">
      <m:code>-1, Microsoft.SharePoint.Client.InvalidClientQueryException</m:code>
      <m:message xml:lang="es-ES">La expresión "Código de Material='000000000000401426'" no es válida.</m:message>
      </m:error>


      What would be the correct way to filter a list by a given folder attribute?



      FWIW I am using Java but the question is about the REST call really.







      sharepoint-server rest sharepoint-rest-api






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Dec 18 '18 at 10:47









      love thakker

      7571726




      7571726










      asked Dec 18 '18 at 10:18









      AverroesAverroes

      1104




      1104






















          1 Answer
          1






          active

          oldest

          votes


















          3














          This should work:



          https://sharepointserver.com/_api/lists/getbytitle('MyListName')/items?$filter=C_x00f3_digo_x0020_de_x0020_Mate%20eq%20%27000000000000401426%27


          You need to use internal column name in the query.






          share|improve this answer























            Your Answer








            StackExchange.ready(function() {
            var channelOptions = {
            tags: "".split(" "),
            id: "232"
            };
            initTagRenderer("".split(" "), "".split(" "), channelOptions);

            StackExchange.using("externalEditor", function() {
            // Have to fire editor after snippets, if snippets enabled
            if (StackExchange.settings.snippets.snippetsEnabled) {
            StackExchange.using("snippets", function() {
            createEditor();
            });
            }
            else {
            createEditor();
            }
            });

            function createEditor() {
            StackExchange.prepareEditor({
            heartbeatType: 'answer',
            autoActivateHeartbeat: false,
            convertImagesToLinks: false,
            noModals: true,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: null,
            bindNavPrevention: true,
            postfix: "",
            imageUploader: {
            brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
            contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
            allowUrls: true
            },
            onDemand: true,
            discardSelector: ".discard-answer"
            ,immediatelyShowMarkdownHelp:true
            });


            }
            });














            draft saved

            draft discarded


















            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsharepoint.stackexchange.com%2fquestions%2f254503%2fsharepoint-server-rest-find-folder-by-attribute%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown

























            1 Answer
            1






            active

            oldest

            votes








            1 Answer
            1






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes









            3














            This should work:



            https://sharepointserver.com/_api/lists/getbytitle('MyListName')/items?$filter=C_x00f3_digo_x0020_de_x0020_Mate%20eq%20%27000000000000401426%27


            You need to use internal column name in the query.






            share|improve this answer




























              3














              This should work:



              https://sharepointserver.com/_api/lists/getbytitle('MyListName')/items?$filter=C_x00f3_digo_x0020_de_x0020_Mate%20eq%20%27000000000000401426%27


              You need to use internal column name in the query.






              share|improve this answer


























                3












                3








                3







                This should work:



                https://sharepointserver.com/_api/lists/getbytitle('MyListName')/items?$filter=C_x00f3_digo_x0020_de_x0020_Mate%20eq%20%27000000000000401426%27


                You need to use internal column name in the query.






                share|improve this answer













                This should work:



                https://sharepointserver.com/_api/lists/getbytitle('MyListName')/items?$filter=C_x00f3_digo_x0020_de_x0020_Mate%20eq%20%27000000000000401426%27


                You need to use internal column name in the query.







                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered Dec 18 '18 at 10:39









                Slaven SemperSlaven Semper

                1,4761833




                1,4761833






























                    draft saved

                    draft discarded




















































                    Thanks for contributing an answer to SharePoint Stack Exchange!


                    • Please be sure to answer the question. Provide details and share your research!

                    But avoid



                    • Asking for help, clarification, or responding to other answers.

                    • Making statements based on opinion; back them up with references or personal experience.


                    To learn more, see our tips on writing great answers.




                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function () {
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsharepoint.stackexchange.com%2fquestions%2f254503%2fsharepoint-server-rest-find-folder-by-attribute%23new-answer', 'question_page');
                    }
                    );

                    Post as a guest















                    Required, but never shown





















































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown

































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown







                    Popular posts from this blog

                    Wiesbaden

                    Marschland

                    Dieringhausen