I am trying to setup an application that will allow management of Topology through a Web API to allow the automated creation and mapping of publications.
I can manually use the topology commands through Powershell but want to achieve the same through a .Net API.
Powershell commands are working on this environment and am able to do the equivalent calls I am attempting in the code
Tridion.TopologyManager.Client is the .dll that allows communication to the client and is used by the Powershell commands.
What I am unsure of is the endpoint that this should be connecting to.
There is the SDL Web Topology Manager site setup in out Dev environment on port 81 (http://localhost:81)
When I use this as the base I am getting errors that the client cant connect. This is the error I am getting when attempting to list Websites.
An error occurred while processing this request.
at Microsoft.OData.Client.DataServiceRequest.Execute[TElement](DataServiceContext context, QueryComponents queryComponents)
at Microsoft.OData.Client.DataServiceQuery`1.Execute()
at Microsoft.OData.Client.DataServiceQuery`1.GetEnumerator()
at SJP.Tridion.QualificationImport.TopologyService.GetMapping()
at SJP.Tridion.QualificationImport.Program.TopologySetup()
When attemptint o create website or mapping the client is not throwing any errors but not making any ammends to the topology.
_client.AddToWebsites(new WebsiteData()
{
Id = websiteId,
CdEnvironmentId = cdEnvironmentId,
BaseUrls = baseUrls
});
I am able to use the http://localhost:81/ttmhealth/check which is returning a 200 OK response.
Wondering if anyone has had any success in using this client. And specifically what the expected endpoint should be.
Example Code setting up the client
var url = "http://localhost:81"
var serviceUrl = new System.Uri(url);
_client = new TopologyManagerClient(serviceUrl);
Tridion Version
- SDL Web Content Manager Build 9.0.0
- SDL Web Content Manager Explorer - Build 9.0.0.0
- SDL Web Experience Manager - Build 9.0.0.0
- Update Version - 0
Chris