Skip to main content

18.10 REST Webservice

REST Webservice Settings

From the CRM settings its possible to view the available web services (referred here as webservice, or REST webservice), to allow external applications to interact with the CRM itself, using the REST paradigm. A webservice is accessible by an URL address (referred here as endpoint), usually made by the URL address of the vte installation, followed by /restapi/v1/vtews/, and the method name associated to the endpoint of interest.

Once configured, it is possible to invoke the desired endpoint with HTTP requests to execute the requested actions.

webservice-rest-en.png

HTTP requests format

HTTP requests support the POST method only and the Basic authentication type, meaning the definition of Authorization defined as Basic <credentials>, where <credentials> is the Base64 encoding of the user name and the accesskey, separated by :.

Webservice requests are intended to return a response in JSON format: on success they return a status and the data computed by the endpoint, and on error they return the error code and relative description.

SelettoreUser utenteselector eand visualizzazioneaccess accesskey,keys, listalist moduliof emodules campiand utilizzabilifields views

TramiteBy l'appositausing picklist,the associatapicklist aassociated to NomeUser UtenteName, èit possibileis selezionarepossible l'utenteto interessato;select questothe permette,user, tramiteand pulsantithis appositi,allows, diwith visualizzarnerelated glibuttons, accesskeyto eview ithe moduliaccesskeys accessibiliand perthe leavailable richiestemodules dall'utenteto selezionato.do HTTP request with the selected user.

IlThe pulsantebutton associatoassociated awith Webservice accesskeyaccess key permetteallows dito mostrare,view, previoafter inserimentoentering dellaof propriaone's own password, glithe accesskeyaccess generatikeys dall'utente:generated questiby vengonothe usatiuser: perthose autorizzareare leused richiesteto aiauthorize webservice,webservices comerequests, osservatoas nelnoted paragrafoin the paragraph HTTP requests format. Note that to add more access keys, the user needs to enter in their preference page, and go to the section Formato richieste HTTP. Da notare che per aggiungere ulteriori accesskey, l'utente deve accedere alle proprio preferenze, nella sezione Configurazione servizi webWebservices, REST Api Configuration: sirefer rimandato allathe sezionesection dedicatadedicated allein preferenzethe utenteuser preferences page.

IlThe pulsantebutton associatoassociated awith ListaModules diand modulifields e campi utilizzabiliusable permetteallows dito visualizzareview l'elencothe deilist moduliof disponibilithe permodules l'utenteavailable eto ilthe lorouser nomeand interno,their dainternal usarename, nelleto richiesteuse aiin the webservice overequests richiesto.where needed.

PaginaREST DocumentazioneDocumentation RESTPage (OpenAPI)

CliccandoBy ilclicking pulsantethe associatobutton aassociated with Mostra DocumentazioneDisplay REST Documentation, èit possibileis accederepossible allato paginadisplay adibitathe allapage visualizzazionewhich deglilists endpointthe espostiendpoints dalexposed by the CRM. InizialmenteInitially vuota,empty, basteràclick cliccare suon Genera DocumentazioneGenerate OpenAPI Documentation perto ottenereget lathe definizionedefinition degliof endpointthe cheendpoints verràthat usatawill perbe laused lorofor impaginazione.their layout.

E'It quindiis possibilethen testarepossible ito singolitest endpointsingle premendoendpoints ilby pulsanteclicking the button Test Request, per l'endpoint e l'utente interessato, posto nel riquadro di esempio adiacente alla descrizione del metodo. L'utente si può selezionare tramite l'apposito selettore, posto centralmentelocated in altothe nellaexample pagina.box adjacent to the description of the method, for the desired endpoint and user. The user can be selected with the related selector, located centrally at the top of the page.

webservice-rest-openapi-it.pngwebservice-rest-openapi-en.png

Configurazione Web service esterni per utilizzo nei processi

Nella pagina delle impostazioni è possibile aggiungere client web service esterni, basati su Zapier (si rimanda al capitolo dedicato), o impostazioni personalizzate.

Una volta configurati e attivati, tramite il pulsante Aggiungi Client Webservice, possono essere visionati nella sezione Lista webservice client configurati, e utilizzati nei processi.