-
Notifications
You must be signed in to change notification settings - Fork 0
views
APIs are typically used to access some resource. Examples of resources are Users, Forms etc. There are several ways in vhich to access the resources.
It varies based on the type of the resource. The type of access is referred to as the View of the resource that is requested. There are two types of views
Most of the resources being accessed will have multiple instances in the system. For example, there will be multiple users, forms etc. Most of these resources will require an API for dealing with them in bulk. An example will be an API to get the list of all the users in the system. Another example would be an API to download the results of the processed forms. This will be called a List View since we are dealing with a list of resources. List view of an API will provide a JSON representation of a collection (or list) of the resources. In most cases, the JSON representation may not be a comprehensive representation of the resource. The objective of the List View is to provide the most important aspects of the resource. This will be at the minimum the unique ID of each resource which may be used to get more information about the resource using the Detail View
List views of all APIs are accessed using the following format (the example uses GET, but the same is valid for POST and DELETE also)
GET https://secure.glyphx.in/<resource name>/`
# List view for forms would be
GET https://glyphx.in/forms/
Detail View provides the comprehensive information about a single resource in a JSON format. The details to be provided in the view is up to the resource. This view is used to read, write or delete a single resource.
List views of all APIs are accessed using the following format (the example uses GET, but the same is valid for POST and DELETE also)
GET https://secure.glyphx.in/<resource name>/<resource id>