Primavera Web API Characteristics
The term API means "Application Programming Interface" and traditionally refers to an "application layer" that somehow exposes an application's business logic in a uniform way, so that it can be used by all external applications that want to interact with that application. In the context of a web application, this translates into a layer of web services that client applications can use to obtain and/or update the application's data. These services may come with different names, shapes and formats, but nowadays it is common for them to take the shape of a REST API. For more information on good practices and concepts, please see https://restfulapi.net/ REST stands for "Representational State Transfer" and is a design standard used to create APIs that use the HTTP protocol to communicate. The article describing this "standard" can be found at http://www.ics.uci.edu/~fielding/pubs/dissertation/rest_arch_style.htm. The HTTP protocol is an excellent platform to support an API because all modern devices with a connection to the Internet today already use it. In essence, HTTP is a request/response system. The client (the external application) sends a request to a specific endpoint and that endpoint (the API) issues a response. There are several aspects of the HTTP protocol that are important in the context of a Web API: In a REST API, resources are usually the entities provided by the application (customer, item, supplier, order, etc.). The verb sent in the request tells the API which operation should be performed on the entity. For example, a GET indicates that you want to retrieve an entity's data. A POST means that you want to create a new entity. It is usual to use implicit REST API conventions to facilitate their use in a uniform way for all entities. Here are some examples of possible API addresses and requests: The Web API for cloud products follows, therefore, the Web API REST logic and provides access to all system entities, allowing you to perform all operations on these entities (create, update, remove, view and list). To use the Web API, the following conditions must be met: Endpoints The Jasmin Web API provides service endpoints in a specific route format. Base URL: The route always has the same structure, with the following variable elements: Example: The GET, POST or DELETE operations (verbs) are available for each endpoint. More information: What are Web API endpoints? Examples of Endpoints As is natural in REST Web APIs, the URL and request parameters depend on the operation to be performed. Below you can find some concrete examples for the sales order entity (resource): Input Parameters As noted above, the endpoints of Web API require account identification and customer subscription for all requests. Other parameters must be provided in order depending on the endpoint and the specific operation. In some cases, these parameters need to be specified in the request headers (for example, authentication information). In other cases, they must be specified in the endpoint URL (such as the entity identifier to obtain it in a GET or the page number and size in entity list queries). Finally, there are other cases, such as creating an entity, where the data must be provided in JSON format in the message body. The Web API reference documentation specifies the exact request parameters for each case. Results The results returned for each request depending on the type of request and the entity concerned. For certain requests, such as eliminating an entity, the result will only be a status code. In most cases, a status code and the response data will be returned in the message body. For example, the result of an entity query using its key will include the whole entity in JSON format. More information: Format of requests and responses Authentication The Web API requires authentication for all requests. The authentication method used is the OAuth 2.0 standard.What is an API?
What is a REST API?
Resource Verb Result Status Code /products GET List of products 200 (OK) /products?colour=red GET List of products with the color red 200 (OK) /products POST Create a product 201 (Created) /products/81 GET Retrieve data on the product with id 81 200 (OK) /products/81 PUT Update product with id 81 204 (No Content) /products/81 DELETE Remove product with id 81 204 (No Content) PRIMAVERA Web API
https:///api/{account}/{subscription}/{module}/{resource}/
https:///api/9999/9999-9999/sales/invoice/
https:///api/{tenant}/{subscription}/sales/orders
https:///api/{tenant}/{subscription}/sales/orders
https:///api/{tenant}/{subscription}/sales/orders
https:///api/{tenant}/{subscription}/sales/orders/53c4ee41-bd16-41f9-a348-3b24cbb4d8c8
https:///api/{tenant}/{subscription}/sales/orders/ECL/2017/12
https:///api/{tenant}/{subscription}/sales/orders/ECL/2017/12
login para deixar a sua opinião.