ProjectWise WSG icon

ProjectWise WSG

Comprehensive ProjectWise WSG API using OpenAPI architecture

Overview

The ProjectWise WSG node provides a comprehensive interface to interact with the Bentley ProjectWise Web Services Gateway (WSG) API. It enables users to perform various operations on ProjectWise resources, such as searching projects or documents, and making generic WSG requests.

Specifically, the Search Projects operation allows querying ProjectWise projects using OData parameters like filtering, selecting specific fields, ordering, and including related entities. This is useful for retrieving project metadata, filtering projects by criteria, or integrating ProjectWise project data into workflows.

Common scenarios:

  • Automating retrieval of project lists based on custom filters.
  • Extracting specific project attributes or relationships for reporting.
  • Integrating ProjectWise project data with other systems or dashboards.
  • Dynamically querying projects with sorting and pagination.

Example:
A user wants to get all projects created after a certain date, including their full path and environment attributes, ordered by name descending. They can configure the filter, select options, and additional flags accordingly in this node.


Properties

Name Meaning
Select Fields and relationships to select from the Project resource.
Filter OData filter expression to narrow down the search results.
Relationships Specific WSG relationships to include in the response (multi-select).
Additional Options Collection of optional parameters:
- Order By Field(s) to order results by, supports ascending/descending (e.g., Name, CreatedDate desc).
- Include Environment Attributes Boolean flag to include DocumentEnvironment relationships automatically.
- Include Full Path Boolean flag to include the absolute path (Path.AbsolutePath) in the results.

These properties map directly to OData query parameters and control the shape and scope of the returned project data.


Output

The node outputs an array of JSON objects representing ProjectWise projects matching the search criteria. Each item contains the project data fields requested via the Select property, filtered and ordered as specified.

If relationships are included, those related entities appear nested within each project object.

The output does not include binary data; it is purely JSON structured data representing project metadata and related information.


Dependencies

  • Requires connection to a Bentley ProjectWise WSG API endpoint.
  • Needs credentials providing:
    • The WSG server URL.
    • Datasource name or ID.
    • Authentication details (either Basic Auth with username/password or Bearer token).
  • Uses OData protocol conventions for querying.
  • Relies on internal helper modules for request handling and datasource resolution.
  • Requires proper configuration of the API credentials in n8n to authenticate requests.

Troubleshooting

  • Datasource Not Found Error:
    If the specified datasource name cannot be resolved to an ID, ensure the datasource exists on the WSG server and the name is correct. Check available datasources via the API or UI.

  • Authentication Failures:
    Verify that the provided credentials are valid and have sufficient permissions. For Basic Auth, confirm username and password; for token-based auth, ensure the token is current.

  • Invalid OData Query Errors:
    Malformed filter or select expressions may cause errors. Validate OData syntax and supported fields.

  • Missing Endpoint Parameter (for generic requests):
    When using generic WSG requests, the endpoint parameter must be set; otherwise, the node throws an error.

  • Network or Server Errors:
    Check connectivity to the WSG server URL and ensure the server is reachable.

  • Handling Failures:
    The node supports continuing on failure; if enabled, errors per item will be returned as JSON with error messages instead of stopping execution.


Links and References


This summary is based solely on static analysis of the provided source code and property definitions.

Discussion