What is a Resource?

Understand what a Resource is and how Resources are used in Data Connectors to interact with their data sources.

What is a Resource?

A Data Connector uses Resources to interact with the data source to which it is configured. In this context, a Resource is configured to specify how the Data Connector interacts with its data source. For a Resource to perform its configured action, the Data Connector must first successfully authenticate with its data source.

If the data source is an API, a Resource calls an endpoint to get, post, put, update, or delete content that the API's endpoint expects. To understand how to successfully interact with that endpoint's method, parameters, and/or potential error codes from that endpoint, refer to that API's documentation provided by the REST(ful) service provider.

If the data source is a Simple Object Access Protocol (SOAP) service, a Resource performs an operation as specified in that SOAP service's XML WSDL file. The WSDL file specifies both how each SOAP operation functions, but also documents that WSDL if the SOAP service provider included XML elements for each operator to its use.

What is a REST Service Method?

How a REST-type Data Connector's Resource interacts with a data source endpoint is called a method. When a Data Connector interacts with a third-party REST(ful) API's endpoint, that endpoint expects a method from which the Data Connector's Resource interacts with that endpoint. A Data Connector may use any of the following methods to interact with a REST(ful) API endpoint:

  • GET: The GET method retrieves a resource from the data source.

  • POST: The POST method creates a resource in the data source.

  • PUT: The PUT method does one of the following:

    • Update: The PUT method may update data an existing resource in the data source.

    • Create: The PUT method may create a resource in the data source.

  • PATCH: The PATCH method partially modifies an existing resource.

  • DELETE: The DELETE method removes an existing resource from the data source.

A third-party API's endpoint may also expect specific parameters from the Data Connector's Resource to properly interact with that endpoint. Those parameters and their settings ideally are documented in that third-party API's documentation so you understand what an endpoint expects in the interaction. Parameters are added at the end of the base URL used to connect with that data source's endpoint and ideally would also be documented in that third-party API's documentation. How to configure parameter settings to interact with an endpoint/method is outside the scope of this documentation.

View this ProcessMaker API documentation to quickly view how to use our RESTful API without testing API endpoints.

Collections also have Resources with which a Data Connector interacts with records in that Collection. Resources for a Collection use similar methods as do REST(ful) services.

What is a SOAP Service Operation?

A SOAP Web service operation defines how a SOAP action functions. SOAP service operations are defined in that service's XML-formatted WSDL file. To use a SOAP service, it is mandatory to understand how to read XML. A SOAP service's WSDL file not only defines the supported operations and their corresponding parameters, but also document for each operation if the SOAP service provider included it.

See this SOAP Web services tutorial for an introduction to SOAP and how to read a SOAP service's XML WSDL file.

REST Resources for Collections

A Collection automatically creates a Data Connector when it is created. Data Connectors created from a Collection by default have the same name as the Collection that it references.

Data Connectors created from Collections have the following REST Resources to interact with that Collection.

Resource

Purpose

Method

ListAll

Get a list of all records in that Collection.

GET

GetRecord

Get a record in that Collection by its record id.

GET

CreateRecord

Create a new record in that Collection.

POST

DeleteRecord

Delete a record from that Collection by its record id.

DELETE

UpdateRecord

Update a record in that Collection by its record id.

PUT

TruncateCollection

Delete all records in that Collection.

DELETE

pageWhat is a Data Connector?pageManage Data ConnectorspageView Data ConnectorspageCreate a New Data ConnectorpageSearch for a Data ConnectorpageEdit a REST-Type Data ConnectorpageDelete a Data ConnectorpageExample: Data Connector Provides Options in a Select List Control

Last updated

© Copyright 2000-2024 ProcessMaker Inc. All rights reserved.