ByteChef LogoByteChef

Liferay

Liferay is an open-source digital experience platform for enterprise content management (ECM) and portal development.

Categories: Productivity and Collaboration

Type: liferay/v1


Connections

Version: 1

OAuth2

Properties

NameLabelTypeDescriptionRequired
clientIdClient IDSTRINGtrue
clientSecretClient SecretSTRINGtrue

API Key

Properties

NameLabelTypeDescriptionRequired
keyKeySTRINGtrue
valueValueSTRINGtrue
addToAdd toSTRING
Options HEADER, QUERY_PARAMETERS
true

Bearer Token

Properties

NameLabelTypeDescriptionRequired
tokenTokenSTRINGtrue

Basic Auth

Properties

NameLabelTypeDescriptionRequired
usernameUsernameSTRINGtrue
passwordPasswordSTRINGtrue

Connection Setup

API Key

Bearer Token

  1. Click on Open Application Menu.
  2. Navigate to Settings → APIs to generate an access token.
  3. Choose the duration (e.g. 30 days, 6 months, 1 year, or indefinite) for when the access token expires.
  4. Click Generate Token.
  5. To use the new token, click Copy and paste it into Bytechef connection.

Basic Auth

  1. Use your username and password to create Liferay connection in Bytechef.

OAuth

  1. Navigate to your Liferay portal.
  2. Click this icon to open Applications Menu.
  3. Click on Control Panel
  4. Click on OAuth 2 Administration
  5. Click on New
  6. Enter name of your OAuth application.
  7. Enter a redirect URI, e.g., https://app.bytechef.io/callback, http://127.0.0.1:5173/callback
  8. Enable Trusted Application.
  9. Click on Save
  10. Here you can see your Client ID and Client Secret.
  11. Click on Scopes
  12. Click on Liferay.Headless.Discovery.OpenAPI
  13. Enable scopes you need.
  14. Click on Save
  15. Done 🚀

Actions

Headless Request

Name: headlessRequest

Executes a Liferay Headless API action using the configured endpoint.

Properties

NameLabelTypeDescriptionRequired
applicationApplicationSTRINGLiferay REST Application you want to use.true
endpointEndpointSTRING
Depends On application
API endpoint where requests are sent.true
propertiesDYNAMIC_PROPERTIES
Depends On application, endpoint
false

Example JSON Structure

{
  "label" : "Headless Request",
  "name" : "headlessRequest",
  "parameters" : {
    "application" : "",
    "endpoint" : "",
    "properties" : { }
  },
  "type" : "liferay/v1/headlessRequest"
}

Output

The output for this action is dynamic and may vary depending on the input parameters. To determine the exact structure of the output, you need to execute the action.

JSON WS Services

Name: jsonWsRequest

Sends a JSON-based HTTP request to a configured external web service endpoint.

Properties

NameLabelTypeDescriptionRequired
contextNameContext NameSTRING
Options portal, account, asset, assetlist, audit, backgroundtask, batchengine, blogs, calendar, comment, commerce, contact, ct, ddl, ddm, depot, dispatch, fragment, journal, kaleo, kaleoforms, kb, layout, layoututilitypage, listtype, marketplace, mb, notification, oauthclient, object, portallanguageoverride, redirect, remoteapp, sap, savedcontententry, segments, sharing, sitenavigation, stylebook, sxp, translation, trash, wiki
Context name of JSON web service you want to use.true
serviceService IDINTEGER
Depends On contextName
ID of the service you want to access.true
parametersDYNAMIC_PROPERTIES
Depends On service
true

Example JSON Structure

{
  "label" : "JSON WS Services",
  "name" : "jsonWsRequest",
  "parameters" : {
    "contextName" : "",
    "service" : 1,
    "parameters" : { }
  },
  "type" : "liferay/v1/jsonWsRequest"
}

Output

The output for this action is dynamic and may vary depending on the input parameters. To determine the exact structure of the output, you need to execute the action.

Find Context Name and Service ID

To find the Context Name, click here.

To find the Service ID, click here.

What to do if your action is not listed here?

If this component doesn't have the action you need, you can use Custom Action to create your own. Custom Actions empower you to define HTTP requests tailored to your specific requirements, allowing for greater flexibility in integrating with external services or APIs.

To create a Custom Action, simply specify the desired HTTP method, path, and any necessary parameters. This way, you can extend the functionality of your component beyond the predefined actions, ensuring that you can meet all your integration needs effectively.


Additional Instructions

How to find the Application

  • Method 1: Via API

Use the GET /o/openapi/openapi.json endpoint to retrieve a list of all applications.

  • *Method 2: Via UI

Go to [server]:[port]/o/api, click on REST Applications and there you have a list of all applications.

How to find the Endpoint

  • Method 1: Via API

Use the GET /o/APPLICATION/openapi.json" endpoint to retrieve a list of all endpoints in specific application.

  • *Method 2: Via UI

Go to [server]:[port]/o/api, choose the REST Application you want and there you have a list of all endpoints. If endpoint starts with a version, you need to remove that part. For example if endpoint is /v1.0/accounts, your need to use /accounts.

How to find the Context Name

  • *Method 1: Via UI

Go to [server]:[port]/api/jsonws, click on Context Name and there you have a list of all contexts.

How to find the Service ID

  • Method 1: Via API

Use the GET "/api/jsonws?contextName=CONTEXT_NAME&discover="" endpoint to retrieve a list of all service IDs in specific context.

How is this guide?

Last updated on

On this page