Developers LinkApi

Consume

These are our Consume commands.

SDKs to consume Components and other entities.

Consume Pre-Built Component

Use a Pre-Built Component in your project.

const products = await linkapi.component.request('componentName', {
        httpMethod: 'POST',
        resource: 'example/{id}',
        urlParams: { id: '123' },
        queryString: {}, // optional
        credentials: {}, // optional
        headers: {}, // optional,
        body: {} // optional
});
Command (parameters)
Description

componentName

Represents the internalName registered on the Component.

httpMethod

Which HTTP method that would be used.

resource

The Resource URL to be called.

urlParams

Use when there is dynamic parameters on the Resouce URL. For example:
resource: 'users/{id}'
resource: 'example/{id}'
urlParams: { id: '123' }

Querystring

Send additional info via QueryString

Credentials

At the moment of creation of your Component, you set the Authentication Type. Once inside LinkApi, the consume follows some rules:

  • If you send the credentials in the Consume, they will be used,
  • If not, we will search for a registered credential inside the Tenant,
  • If none of the criterias meet, the test credential will be used.

Consume Private Component

Use a Private Component in your project.

const products = await linkapi.component.request('componentName', {
        httpMethod: 'GET',
        resource: 'products',
        urlParams: {},
        queryString: {},
        credentials: {},
});

Consume Function

Consume a Function to your project from Packages.

const result = await linkapi.function.execute('my-function', 'param1');

name

Represents the file name of your Function.

origin

Accepts project or package.

Consume Data-Transformation

Consume a Data-Transformation to use in your project.

const result = await linkapi.dt.transform('example-linkapi-payload', 'param1', '...', 'paramN');

Consume


These are our Consume commands.

Suggested Edits are limited on API Reference Pages

You can only suggest edits to Markdown body content, but not to the API spec.