Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Customer Service forum

Resource Not Found (404) when query for all Cases records in Dynamics 365 v9.0 with Web API

(0) ShareShare
ReportReport
Posted on by

I thought this should be very trivial and simple but it is not at least not in my case.  

Note:  I am able to get records for accounts and contacts from the same organization but not cases entity for some reason.

For info:

  1.    I got a trail Dynamics 365 instance, fromheaven.crm.dynamics.com and would like to use it to try out the Web APIs. 
  2.    I am following the Web API Basic Operations Sample (C#).  Everything works fine and I am able to completely run the sample code in order to create, delete, update account or contact.  Therefore, the authentication is definitely working.
  3. Then I try to change the code to fetch records for Cases.  That is where the problem starts.  The piece of code is super simple:

           HttpResponseMessage retrieveResponse1 = await httpClient.GetAsync("fromheaven.crm.dynamics.com/.../cases");

    if (retrieveResponse1.StatusCode == HttpStatusCode.OK) { ...}

4. The retrieveResponse1.StatusCode is always 404 with ReaonPhrase: "Not Found".  However, if I change the URL to fetch contacts (https://fromheaven.crm.dynamics.com/api/data/v9.0/contacts) or account (https://fromheaven.crm.dynamics.com/api/data/v9.0/accounts), then it works perfectly.

5.  You can see from below snapshot that my trail instance does have this entity type and have data as well.

0815.Capture.PNG

Why does the call always return 404?  Can anyone shed some light?

Thanks

Categories:
  • Suggested answer
    Robert Lin Profile Picture
    on at
    RE: Resource Not Found (404) when query for all Cases records in Dynamics 365 v9.0 with Web API

    Apparently, I should have use incidents instead of cases.  The entity set name is incidents for case entity type.  Duh!

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

November Spotlight Star - Khushbu Rajvi

Congratulations to a top community star!

Forum Structure Changes Coming on 11/8!

In our never-ending quest to help the Dynamics 365 Community members get answers faster …

Dynamics 365 Community Platform update – Oct 28

Welcome to the next edition of the Community Platform Update. This is a status …

Leaderboard > Customer Service

Featured topics

Product updates

Dynamics 365 release plans