2

I am building application which has to communicate with Tridion OData Service. I would like to avoid configuring the url of odata servce inside of web.config file and to use Discovery Service.

Can some one give steps how I can use Discovery Service?

2

Based on what I know, if you hit the Discovery Service url: http://discovery-service-hostname:port/discovery.svc/Environment/ you should be able to get a list of all the capabilities for that environment.

You should be able to pick and choose services from there on.

For example if you are looking for the ContentService, after hitting the url http://discovery-service-hostname:port/discovery.svc/Environment/ContentServiceCapability look for the metadata node URI to get the service uri :)

| improve this answer | |
  • I understand what you are saying, but I cannot find real instructions how to add it to my custom application. For example, which dlls I should add as references, under which name url of discovery service should be inside of web.config, how to call odata api.... – Ljiljana Eric Feb 24 '16 at 13:26
1

A guide to setting up the discovery service can be found in the SDL documentation. Here is the link to the single server scenario: http://docs.sdl.com/LiveContent/content/en-US/SDL%20Web-v1/GUID-A85849F8-3E3E-4C09-8C41-FE0AEE55C1BB

The provided SDL DLLs/JARs will automatically (based on configuration files) utilize the oData webservice based on what is configured in the discovery service.

If you want to call the oData service directly from your code, I think the discovery service will not really help you, except for allow you to discover the URL as mentioned by @Kunal.

| improve this answer | |
1

Assuming you want to access the microservices from a .NET or Java (web) application: you can use the Content Interaction Libraries (CIL):

http://docs.sdl.com/LiveContent/content/en-US/SDL%20Web-v1/GUID-5B3405F0-DD30-4998-88F0-49E77FA3B628

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.