DatasourceRest Lightning Web Component ReadMe (Managed Package)

For the managed package runtime, this page contains a DatasourceRest LWC ReadMe for each Vlocity release.

Managed Package app icon This information is for Omnistudio for Managed Packages. For Omnistudio on standard runtime, see Omnistudio Help.

Vlocity Insurance and Health Winter '20 and Vlocity CME Spring '20

The DatasourceRest Lightning Web Component extends the Datasource Lightning Web Component with additional features for data fetched from a REST web data source.

Available c-datasource-rest Attribute

Attribute

Value

Type

Required

Description

methodtype

GET, POST (Default: GET)

string

yes

Specifies request method type.

subtype

web, namedcredential (Default: web)

string

yes

Specifies type of rest.

headers

JSON

string

 

Provides headers sent along with the request.

payload

 

string

 

Provides data sent along with the request.

endpoint

 

string

yes

Provides the REST URL.

namedcredential

 

string

 

If subtype is namedcredential, specifies the named credential from your org.

Example c-datasource-rest Component

<!--headers = { "Content-Type": "application/json", "accept": "application/json" } -->
<c-datasource-rest
  theme="slds"
  methodtype="GET"
  subtype="web"
  headers="{headers}"
  channel="restweb"
  endpoint="https://jsonplaceholder.typicode.com/users"
  debug="true"
></c-datasource-rest>

<c-datasource-rest
  theme="slds"
  methodtype="GET"
  subtype="namedcredential"
  channel="restnamed"
  namedcredential="test"
  headers="{headers}"
  endpoint="posts"
  debug="true"
></c-datasource-rest>

Vlocity Insurance and Health Summer '19 and Vlocity CME Fall '19

The DatasourceRest Lightning Web Component extends the Datasource Lightning Web Component with additional features for data fetched from a REST web data source.

Available c-datasource-rest Attribute

Attribute

Value

Type

Required

Description

methodtype

GET, POST (Default: GET)

string

yes

Specifies request method type.

subtype

web, namedcredential (Default: web)

string

yes

Specifies type of rest.

headers

JSON

string

 

Provides headers sent along with the request.

payload

 

string

 

Provides data sent along with the request.

endpoint

 

string

yes

Provides the REST URL.

namedcredential

 

string

 

If subtype is namedcredential, specifies the named credential from your org.

Example c-datasource-rest Component

<!--headers == { "Content-Type": "application/json", "accept": "application/json" } -->
<c-datasource-rest
  theme="slds"
  methodtype="GET"
  subtype="web"
  headers="{headers}"
  channel="restweb"
  endpoint="https://jsonplaceholder.typicode.com/users"
  debug="true"
></c-datasource-rest>

<c-datasource-rest
  theme="slds"
  methodtype="GET"
  subtype="namedcredential"
  channel="restnamed"
  namedcredential="test"
  headers="{headers}"
  endpoint="posts"
  debug="true"
></c-datasource-rest>