Shared Workflows

List Shared Workflows

SDK Method

SharedWorkflow.list()

Return Object

SharedWorkflow[]

Authorization Requirement

Available to all authenticated keys or sessions.

Additional Arguments

Example Request

import SharedWorkflow from 'files.com/lib/models/SharedWorkflow.js';
import * as FilesErrors from 'files.com/lib/Errors.js';

try {
  const sharedWorkflows = await SharedWorkflow.list();
  for (const sharedWorkflow of sharedWorkflows) {
    // Operate on sharedWorkflow
  }
} catch (err) {
  if (err instanceof FilesErrors.NotAuthenticatedError) {
    console.error(`Authentication Error Occurred (${err.constructor.name}): ${err.error}`);
  } else if (err instanceof FilesErrors.FilesError) {
    console.error(`Unknown Error Occurred (${err.constructor.name}): ${err.error}`);
  } else {
    throw err;
  }
}

Show Shared Workflow

SDK Method

SharedWorkflow.find()

Return Object

SharedWorkflow

Authorization Requirement

Available to all authenticated keys or sessions.

Method Arguments

ArgumentDescription
id
int64
Required
Shared Workflow ID.

Example Request

import SharedWorkflow from 'files.com/lib/models/SharedWorkflow.js';
import * as FilesErrors from 'files.com/lib/Errors.js';

try {
  const sharedWorkflow = await SharedWorkflow.find(id);
  // Operate on sharedWorkflow
} catch (err) {
  if (err instanceof FilesErrors.NotAuthenticatedError) {
    console.error(`Authentication Error Occurred (${err.constructor.name}): ${err.error}`);
  } else if (err instanceof FilesErrors.FilesError) {
    console.error(`Unknown Error Occurred (${err.constructor.name}): ${err.error}`);
  } else {
    throw err;
  }
}

The SharedWorkflow Object

Some of the methods above return a SharedWorkflow object. The attributes of this object are listed below.

AttributeDescription
id
int64
Shared Workflow ID.
name
string
Name displayed to recipients.
description
string
Description displayed to recipients.
submission_revision
string
Revision required when submitting a Shared Workflow run.
form_fields
array(object)
Current custom questions in display order.