Skip to content

Instantly share code, notes, and snippets.

@tiry
Last active September 18, 2020 18:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tiry/6d245a8dbffc72377c750fc9554fc706 to your computer and use it in GitHub Desktop.
Save tiry/6d245a8dbffc72377c750fc9554fc706 to your computer and use it in GitHub Desktop.

Nuxeo API - Using, Integrating, Extending

Training: Nuxeo API

DISLAIMER - the training needs to be addressed globally, the point of this paragraph is just to provide the highlights of what is likely to be the most important aspects regarding API

For anyone participating in the workshops listed bellow it is crital to have a basic knowledge about Nuxeo API.

  • REST resource endpoint
    • Document, Users, Tasks, Workflows ...
    • introspection (DocTypes, Schemas, ...)
  • Marshallers, Adapters and Enrichers
  • Automation
    • Operation
    • Chains
    • Scripting
    • Async adapter
  • Bulk Action Framework
  • Stream importer

For this I would suggest a mixed approach:

  • 3h overview to help people getting started
  • 1h lab to install a local Nuxeo
  • some time of "self training" spent on university + API playground

Hands-on workshops / Spikes

Here the idea is to identify a few use cases and for each of them implement a simple spike to understand how it can be some with Nuxeo.

For this, we do not need to have a very detailed busines case, we just need to understand what kind of integration we need to do since the goal is just to get familar with Nuxeo API and the principles of the integration.

WS1: Calling an existing application from Nuxeo

Context

Retention rules are defined and stored inside an external application running in AWS but exposing a REST API.

The goal is to be able, from Nuxeo, to fetch the information and apply the needed actions to the corresponding Nuxeo documents.

Spike Skeleton

Focussing purely on the technical aspects we can list the main tasks:

  • authenticate with the external application
    • use OAuth 2?
  • create an Automation Operation to call the external application
  • use the Automation Operation
    • listener, Bulk Action Framework, Workflow ...

WS2: Bulk API and batch import

Context

Expose a end-point to do bulk data injection inside Nuxeo

Spike Skeleton

  • define an input format
  • write a nuxeo-stream producer
  • define an injection pipeline
  • do an import

WS3: RestAPI and rendition/previews

Context

Some applications will need to display documents/files comming from Nuxeo.

We can consider several approaches for that:

  • use a rendition via REST API
  • use a preview adapter on the REST API
  • use a UI components

Spike Skeleton

  • select one une case
    • target application
    • target format
  • build / adjust a previewer / rendition if needed
  • handle authentication propagation
  • display the rendition/preview the target Application

WS4: SSO and User provisioning

Context

The idea is to prototype the integration with "IM Connect" portal for the user provisioning and authentication part.

  • authenticate via the IDP
  • ensure user preprovisioning (no JIT provisioning like it is often the case in SAML)

Spike Skeleton

  • SAML configuration with lazy user sync
    • including user attribute mapping
  • define the preprovisioning approach
    • SCIM
    • custom API
    • nuxeo REST API
    • Strean / Bulk processing
  • implement a prototype

WS5: Call for an external Async service

Context

The typical use case would be to integrate the existing AI service of IM inside a Nuxeo pipeline.

Spike Skeleton

  • implement an Automation Operation to do the call the same way we do with Nuxeo AI and AWS Lambda
    • store call context
    • expose a webhook/callback endpoint
    • resume processing via stream
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment