question

jonathan avatar image
jonathan asked Brock Allen commented

Is there metadata that can be used to generate a client proxy for the REST API?

I am trying to avoid the grunt work of manual coding. With SOAP services for example it is very easy to generate a proxy that allows you to interact with the service. With REST, it is not explicitly part of the standard, but there are examples of companies creating metadata services for their REST services that allow for the creation of a proxy with coding.

Here is an example of what I am talking about: http://reynders.co/2013/03/10/creatin...

Does clover have anything like this to save me some code time?

Thank you, Jonathan

10 |2000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Jacob Abrams avatar image
Jacob Abrams answered Brock Allen commented

I'm not too familiar with this stuff but this endpoint might help you: http GET https://www.clover.com/api_docs/

2 comments
10 |2000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Brock Allen avatar image Brock Allen commented ·

Is there a way to get more detail from that request? Is there a programatic way to get the full swagger specification for Clover's API?

0 Likes 0 ·
Brock Allen avatar image Brock Allen commented ·

I found that adding the API onto the end of that gives the detailed swagger 1.2 information. For instance: https://www.clover.com/v3/api/api_doc...

0 Likes 0 ·
jonathan avatar image
jonathan answered

So after checking the results from the api, I noticed that the api docs provides the json response in Swagger version 1.2 format. I was able to modify a tool called dotswaggen to read the content and output a c# proxy for each of the urls. I will test when I have access to the sandbox, but it looks promising.

10 |2000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Welcome to the
Clover Developer Community