Version 2 of the workflows API exposes some new features and changes in our data structure. The original API remains unchanged for consumers that may not require the new changes.


NOTE: TeamBox will not expose this API unless Windows Authentication (for the TeamBox API Service) and the "EnableV2Api" config setting is enabled.


Changes:

  • All the content and meta data of workflows are exposed on GET operations
  • It is now possible to include workspaces in POST operations
  • Added support  for workflow PUT operations
  • Template functionality
  • Workspace properties have been converted to JSON


Workspace data transfer object (WorkspaceDTO hereinafter):

{
  id: Number,
  name: String,
  description: String,
  doNotShare: Boolean,
  workspaceType: Number,
  properties: [
    { name: "presentationMode", value: "True | False" },
    { name: "pathURL", value: String },
    { name: "parameters", value: String },
    { name: "windowHandlingEnabled", value: "True | False" },
    { name: "processName", value: String },
    { name: "windowTitle", value: String },
    { name: "windowTitleSearch", value: String },
    { name: "windowCloseBehaviour", value: "Close | DoNotClose | Minimize" },
    { name: "workingDir", value: String },
    { name: "checkout", value: "True | False" },
    { name: "handleAsSharepoint", value: "True | False" }
  ],
  templateName: String,
  templateDescription: String,
  variables: [
    {
      name: String,
      fieldName: String,
      fieldDescription: String,
      value: String
    }
  ]
}


Step data transfer object (StepDTO hereinafter):

{
  id: Number,
  name: String,
  description: String,
  // for step post operations, the sequence number is used to define the position of the step within the specified workflow (zero-based index).
  // a step with sequence number of -1 or a number that is out of range of the step array will receive the last position
  sequenceNumber: Number,
  workspaces: WorkspaceDTO[],
  environmentLayoutMap: [
    {
      key: {
        id: Number,
        name: String,
        description: String,
        screens: ["x, y, width, height"],
        layouts: [
          {
            id: Number,
            name: String,
            description: String,
            displays: ["x, y, width, height"]
          }
        ]
      },
      value: {
        {
          id: Number,
          name: String,
          description: String,
          displays: ["x, y, width, height"]
        }
      }
    }
  ]
}


Session variable data transfer object (SessionVariableDTO hereinafter):

{
  name: String;
  fieldName: String;
  fieldDescription: String;
  value: String;
  required: Boolean;
}


Workflow data transfer object (WorkflowDTO hereinafter):

{
  id: Number,
  name: String,
  description: String,
  workflowLibraryId: Number,
  createdBy: String, // read-only
  createdDate: String, // read-only
  modifiedBy: String, // read-only
  modifiedDate: String, // read-only
  deletedBy: String, // read-only
  deletedDate: String, // read-only
  isDeleted: Boolean, // read-only
  steps: StepDTO[],
  actions: [
    {
      key: "Publisher",
      value: "user:domain\\user;machine:domain\\machine"
    },
    {
      key: "Conference",
      value: "sip:address"
    }
  ],
  sessionVariables: SessionVariableDTO[],
  suppressSessionDlgWhenDefault: Boolean // don't show the session data dialog when all variables have default values
}


Requests:

URIMethod
Body
Response
Content-type
https://localhost:8086/eraconnect/v2/workflows
GET
N/A
WorkflowDTO[]application/json
https://localhost:8086/eraconnect/v2/workflows/{id}
PUT
WorkflowDTO
WorkflowDTO
application/json
https://localhost:8086/eraconnect/v2/workflows
POST
WorkflowDTO
WorkflowDTO
application/json
https://localhost:8086/eraconnect/v2/workflows/{id}
GET
N/A
WorkflowDTO
application/json
https://localhost:8086/eraconnect/v2/workflows/selected
GET
N/A
WorkflowDTO
application/json
https://localhost:8086/eraconnect/v2/workflows/{id}/steps
POST
StepDTO
StepDTO
application/json
https://localhost:8086/eraconnect/v2/workflows/steps/selected
GET
N/A
StepDTO
application/json