Skip to main content

Overview

The List Datalinks web script returns all configured datalink definitions from the Alfresco repository. This web script is implemented as a Java-backed web script that retrieves registered datalink configurations.

Endpoint

url
string
/aqua/datalink/v1/list

HTTP Method

GET

Authentication

User authentication is required to access this endpoint.

Request

URL Structure

GET /alfresco/service/aqua/datalink/v1/list
No request parameters are required.

Response

Success Response

Status Code: 200 OK Content-Type: application/json

Response Schema

Returns a JSON array of datalink configurations. Each datalink object contains:
name
string
The name of the datalink
aspectPropertyName
string
The Alfresco aspect property name where datalink data is stored
columns
array
Array of column definitions for the datalink
name
string
Column name
primaryKey
boolean
Whether this column is the primary key
connectorRest
object
REST connector configuration for external data source
url
string
External API endpoint URL
searchParam
string
Query parameter name for search
authentication
object
Authentication configuration
type
string
Authentication type (e.g., “basic”)
username
string
Username for basic auth
password
string
Password for basic auth

Example Response

[
  {
    "name": "Customer Datalink",
    "aspectPropertyName": "aqua:customerData",
    "columns": [
      {
        "name": "customerId",
        "primaryKey": true
      },
      {
        "name": "customerName",
        "primaryKey": false
      }
    ],
    "connectorRest": {
      "url": "https://api.example.com/customers",
      "searchParam": "q",
      "authentication": {
        "type": "basic",
        "username": "apiuser",
        "password": "apipass"
      }
    }
  }
]

Implementation Details

The web script is implemented in the Java class GetListDataLinkWebScript:
public class GetListDataLinkWebScript extends AbstractWebScript {
    
    private RegisterDataLink registerDataLink;
    
    @Override
    public void execute(WebScriptRequest req, WebScriptResponse res) throws IOException {
        res.setContentType(Format.JSON.mimetype());
        res.getWriter().write(registerDataLink.getDataLinks().toString());
        res.getWriter().flush();
    }
}

Error Responses

401
error
Unauthorized - User authentication required
500
error
Internal Server Error - Server error occurred while retrieving datalinks

Usage

This web script is typically called by the Angular services (VenziaDatalinkApiService) to retrieve the list of available datalinks for display in the UI.

See Also

Build docs developers (and LLMs) love