Using Swagger Code Generation
Use swagger-codegen to generate client code.
Important: Changes to the Cherwell REST API may require you
to regenerate Swagger code after you upgrade to a new version of CSM. If you
receive errors in your API calls after you upgrade, follow the guidance in this
article to regenerate client code.
Follow this process:
Sample Authenticated Request
var service = new ServiceApi(baseuri);
var tokenResponse = service.ServiceToken("password", clientid, "", username, password, "", "Internal");
var searchesApi = new SearchesApi(Baseuri);
searchesApi.DefaultHeader.Add("Authorization", "Bearer " + tokenResponse.AccessToken);
var searchItemResponse = searchesApi.SearchesGetSearchItemsV1(null);