Is there any solution for generating the restfual api code both for client and server - api

The functions for operating the restful api is quite same. Is there any project that can generate the source code for different platform such android,ios and backend stuff.

I suggest you to use API description languages such Swagger ou RAML.
After having described your RESTful application with a language like this, you will be able to generate things like server skelekons and client sdks with different technologies and languages. You can even generate documentations.
With Swagger, swagger-codegen will do that. swagger-ui may also interest you for the documentation part.
To finish, I would like to mention the Restlet studio that allows to define graphically and quickly the structure of RESTful applications and generate then the corresponding Swagger and RAML contents. The APISpark plaform provides a mecanism to introspect Restlet applications and generate the corresponding contents with these languages. It also allow you to generate a set of server skelekons and client sdks.
Hope it helps you.

I will suggest you to use Spring RESTful webservices starter kit. Which will manage your back-end with centralized database. Also Spring has its own android libs to communicate with REST Apis.

Related

Does exist a universal tool to describe different APIs (REST, WebSocket, gRPC, custom framework)?

My project uses different protocols to communicate with other services:
REST API
WebSocket (STOMP)
gRPC
own framework build over gRPC.
I need a tool, or a bunch of tools, which allow me to generate documentation for the APIs. In the best scenario, it's a maven plugin that generates a report with all APIs.
We use Swagger to describe the REST API. It has poor export options and needs a lot of annotations in the code, but describes the API well and offer the test machine.
Alternatively, Spring RestDocs (AsciiDoctor) could be used for the REST API describing. It offers a better format for reporting, but we prefer Swagger.
That's all I found for the REST API. But I didn't find anything for describing WebSocket API, gRPC and the custom framework.
I will be very grateful for any help and ideas to solve the problem.

Generating documentation for a Datasnap RESTful API

I've been looking for a way to include an auto-generated documentation endpoint to an existing Delphi Datasnap RESTful API.
Can it be done? Are there annotations or external tools I can use?
Where would I begin, how would I proceed? If not from within Delphi itself, can I integrate with e.g. Swagger?
It seems somewhat anachronistic to build a RESTful API without offering a documentation endpoint these days...
Any and all information that could help me in the right direction would be greatly appreciated.
Using Swagger, via YAML has just been added to Delphi through EMS, the latest RESTful API development option in Delphi.
https://delphiaball.co.uk/2016/04/22/swagger-yaml-delphi/
Its based on Attributes that are added to the API end points as they are defined and that in turn creates the YAML to import into Swagger.

web api support in all type of apps

We want to use Web API for inter-operable purposes. i mean our web api can be exposed and used in different type of apps ( Asp.net mvc, php, android, windows store/phone and ios).
We are not using wcf and prefer web api. Will it be a good choice ? we just need http and https.
Please guide the best.
if you only need support http protocol yes, web api is an excellent option, web api has a lot of features that can help you to build robust http services, and yes, I mean is a good choice.
be careful when you build yours web api service, use best practices, security in your service, and think in rest architecture, not only simple web services and you will have a true rest service
If you want to read more about this (to have a good base, not the final or only way to do this), see the rest maturity model and json api.
WCF is the best way when you need to support others protocols that only http.
Regards

What online REST API workbenches are available?

When creating a site/script to be on the client end of a RESTful API, what tools are available to create a "workbench" to explore the API, examining headers and responses while working through the design? Preferably one(s) that allow you to enter a custom endpoint, and create sample requests to see the responses. I recall seeing one nice workbench before, but its name has escaped me.
Re-found the one I remembered: The Apigee Console is a great interface for playing around with an existing API or building your own.
Mashery's I/O Docs is an open source workbench that you can deploy yourself on a Node.js server with Redis for storage.
If you have the wadl file of the ReST Services, you can load it in SOAP UI and use it.
EditedAnother much simpler tool Rest Client

Auto-generate an API Explorer for WCF services

If you have ever used the Flickr API, you'll be familiar with their API Explorer. It is an awesome tool, that allows you to view the documentation for each API method, and the killer feature, being the execution of that API method (with a form to populate any request parameters). It even picks up when you are logged in, and completes the authentication part on your behalf. Gowalla has a similar API Explorer that is also really good.
Are there are tools for WCF that will auto-generate such an API Explorer, free or commercial?
Currently, we use Fiddler to build the JSON requests, but I would like to publish these service contracts, and allow potential developers to play around with them via a web based API explorer.
I am aware of the WCF Web HTTP Service Help Page, which I am using (and is awesome), but it is the API Explorer part that I am interested in.
You may want to look at I/O Docs - an open-sourced interactive documentation system for RESTful web APIs that any API owner can use to deploy for their own documentation. It runs on Node.js and uses Redis as a data store.
https://github.com/mashery/iodocs
Example: developer.klout.com/iodocs, developer.rottentomatoes.com/iodocs
It uses JSON schema based files to define API endpoints, method and parameters. Based on these JSON files, it generates a client interface that developers can use to learn and explore your API. API calls can be executed directly from the documentation interface, producing formatted responses.
It's Open-sourced, so you can be assured of regular updates and improvements. In fact this past weekend, Brandon West from SendGrid (who use I/O docs to power their documentation), created and open sourced the UI to create/edit the JSON schema files for I/O Docs. So you don't have to manually create the JSON files anymore.
https://github.com/brandonmwest/iodoctor
Not exactly what you were looking for, but....
WCF provides something called the WCF Test Client, for this purpose.
If you install Visual Studio, you get it. For example, for VS2008, installed in the usual place, you can find the WCF Test Client (WcfTestClient.exe) in the following location:
C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\
Take a look at Apigee: http://apigee.com/