Skip to main content

Notifications

Finance forum

Web API in Local VM

(0) ShareShare
ReportReport
Posted on by 486

Is possible to do CRUD using Web API in D365FO's local VM? I'd like to do CRUD through D365 data entities, is it possible?

  • RE: Web API in Local VM

    You cannot use WM's IP address directly because D365FO OneBox environments (I guess this is what you mean with local WM) uses HTTPS and request address has to be the same as the one in the certificate.

    But you can add a line to windows's hosts.txt file and redirect D365's "usnconeboxax1aos.cloud.onebox.dynamics.com" address to the IP of your WM.

    Then from that computer, you can call any D365FO web service of that One Box WM.

    Sample "hosts.txt" file with a WM address of 190.1.1.1

    # Copyright (c) 1993-2009 Microsoft Corp.

    #

    # This is a sample HOSTS file used by Microsoft TCP/IP for Windows.

    #

    # This file contains the mappings of IP addresses to host names. Each

    # entry should be kept on an individual line. The IP address should

    # be placed in the first column followed by the corresponding host name.

    # The IP address and the host name should be separated by at least one

    # space.

    #

    # Additionally, comments (such as these) may be inserted on individual

    # lines or following the machine name denoted by a '#' symbol.

    #

    # For example:

    #

    #      102.54.94.97     rhino.acme.com          # source server

    #       38.25.63.10     x.acme.com              # x client host

    # localhost name resolution is handled within DNS itself.

    # 127.0.0.1       localhost

    # ::1            localhost

    190.1.1.1             usnconeboxax1aos.cloud.onebox.dynamics.com

  • Gepoy Profile Picture
    Gepoy 486 on at
    RE: Web API in Local VM

    Thanks to all of you, now I having a clear view of OData endpoints and Web API.

  • Gepoy Profile Picture
    Gepoy 486 on at
    RE: Web API in Local VM

    Thanks Sukrut, I read on the documents and I am thinking of how can a third-party application can do CRUD? 

  • Verified answer
    Sukrut Parab Profile Picture
    Sukrut Parab 71,673 Moderator on at
    RE: Web API in Local VM

    Odata protocol is based on REST. Did you looked at the below link ?

    docs.microsoft.com/.../odata

  • Gepoy Profile Picture
    Gepoy 486 on at
    RE: Web API in Local VM

    So, how can this OData endpoints be accessible in cloud? Through Web API?

  • Verified answer
    Pete Alberts Profile Picture
    Pete Alberts 3,542 on at
    RE: Web API in Local VM

    I am not sure what you mean. If you are asking if OData endpoints are only for local VM's: Definitely no... I merely mentioned that it is possible to test OData endpoints on a local VM.

    For a VM with a public URL you can call from anywhere. For instance from your PC. A local VM (without public URL) you have to call from the VM itself.

    I think your questions will be answered if you just get going. I find Postman the easiest way: Install postman on your VM and try to make a simple call. There are quite a few setup steps. I can assist you with that.

  • Suggested answer
    Sukrut Parab Profile Picture
    Sukrut Parab 71,673 Moderator on at
    RE: Web API in Local VM

    By default all your entities  which are public are deployed on odata endpoint .You can  access those in cloud version using following URL

    [Your organization's root URL]/data/

    More details you can get  in standard documentation

    docs.microsoft.com/.../odata

  • Gepoy Profile Picture
    Gepoy 486 on at
    RE: Web API in Local VM

    Hi Pete,

    OData endpoint is intended only for local VM? If yes, how am I able to work this thing in cloud?

  • Suggested answer
    Pete Alberts Profile Picture
    Pete Alberts 3,542 on at
    RE: Web API in Local VM

    Hi Gecel

    I do most of my OData endpoint testing on a local VM of mine. So it is definitely possible. As Blue Wang mentioned - you don't have a public URL. So you need to call from the VM itself. Thus if it is for testing purposes, it is not a problem at all. Further than that I don't know.

  • Blue Wang Profile Picture
    Blue Wang on at
    RE: Web API in Local VM

    Hi Gecel,

    Personal point of view: You can't.

    Programming with Web API requires authenticating the identity protocol, then programming with the HTTP request sent and ODATA, and passing a unique URL.

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

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,969 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 230,842 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans