REST API URLs - guidelines for PUT and POST methods - api

I am working on RESTful API where the resource will be used to create and update user details.
/users
PUT
-POST
Manageuser/{usedId}/users
-PUT
What are the best practices for RESTful API URLs? Any guidelines for when to use path parameters in URLs?

Related

What's the quickest way to get an OpenAPI spec for existing web service

I have a running web server that uses restful API as its backend, wondering what is the most effective way to get the OpenAPI spec with the full set of APIs
just exploring ideas

What is the difference between HTTP API and REST API resource types in design center?

I having been trying to find the difference between HTTP API and REST API resource types but not getting the clear difference. When and how should one use HTTP API ? A use case would be really appreciated.
A "REST API" (Representational state transfer) is an API that follows a certain architectural style, based on HTTP verbs (get, post, etc.). A REST API is always HTTP based.
An "HTTP API" simply only says that the HTTP protocol is used. A HTTP API doesn't necessarily have to be a REST API if it doesn't follow REST architectural styles.
You could say that a HTTP API could be any interface that you connect to over HTTP whereas REST API is only a subset of that group, that adheres to stricter rules.
In Exchange (not necessarily in Design Center), the REST APIs refer to APIs that are defined (using RAML or OAS) and implemented with MuleSoft tools (AnypointStudio) and published to Exchange, where as HTTP APIs refers to RESTful APIs that are created using other 3rd party tools whose HTTP/S URLs can be registered as assets within Exchange. HTTP APIs can also refer to a temporary placeholder created by a private Exchange user for future management of that endpoint (via API Manager).

Publishing an API without any existing backend API for it

I linked some existing back-end APIs to the API Publisher.
Due to some reasons, I need to create an API without any existing back-end API for it in a specific route (for example in .../myAPI/ path). The API should do something and then return a response to user.
how can I do this using WSO2 API manager? Do I need to write a handler for it? Thanks for any help.

CakePHP and RESTful with PhoneGap

I have built a cakephp site with RESTFul calls. Happy to say these calls work when using curl from another php site. (This is all testing at the moment)
The next stage is setting up authorization, from my understand I'd be looking at either basic or digest loging to make RESTful calls.
I'd like to build a phonegap app, that requires login. Would RESTful calls to CakePHP be the way to go. i.e making a RESTful API for my site?
I'd like to provide an API key. How would this key be secured in a phonegap app?
How secure is phonegap in general? If the files for an app are css, html, js can't the app be broken into and the files revealed
Just looking for general advice and a direction to continue researching.
I believe what you need would be a stateless authentication system. CakePHP comes with 2 built in. Take a look at this example

REST API versioning using AWS

After going trough this link on API versioning, i am trying to adapt the version through the headers and deploy it of AWS, but it looks like AWS does not support any custom verndor specific MIME types(link here)
Any idea how to achieve the versioning in this scenario where you do not have control over the MIME type...or any insights on how to do API versioning when using AWS?
My suggestion for cloud based service is "v1.api.mysite.com". It provides good flexibility. More details and reasoning here - http://timanovsky.wordpress.com/2013/01/28/api-versioning-scheme-for-cloud-rest-services/