Restore Workflow Version

Restores a specific version of a Workflow to its active state.

PUT
/v2/manage/workflows/{workflowId}/versions/{version}

Restores a specific version of a Workflow to its active state.

Authorization

M2MBearerToken
AuthorizationBearer <token>

M2M Token for authentication

In: header

Path Parameters

workflowId*string

The ID of the workflow.

version*string

The version identifier to delete.

Response Body

application/json

application/json

application/json

application/json

application/json

curl -X PUT "https://api.loginradius.com/v2/manage/workflows/1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef/versions/v1.0.0"
{
  "Data": {
    "tree": {
      "entryNodeId": "start",
      "nodes": {
        "property1": {
          "id": "node1",
          "type": "decision",
          "connections": [
            {
              "property1": "string",
              "property2": "string"
            }
          ]
        },
        "property2": {
          "id": "node1",
          "type": "decision",
          "connections": [
            {
              "property1": "string",
              "property2": "string"
            }
          ]
        }
      }
    },
    "nodes": {
      "property1": {
        "id": "node1",
        "type": "action",
        "nodes": [
          {
            "id": "child1",
            "UID": "UID123",
            "type": "child",
            "childType": "form",
            "data": {},
            "formnodeprops": {
              "choiceFieldType": "single",
              "choices": [
                {
                  "value": "option1",
                  "text": "Option 1"
                }
              ],
              "attributeMapping": "attr1",
              "defaultChoice": "option1"
            }
          }
        ],
        "output": [
          {}
        ],
        "data": {},
        "selected": false
      },
      "property2": {
        "id": "node1",
        "type": "action",
        "nodes": [
          {
            "id": "child1",
            "UID": "UID123",
            "type": "child",
            "childType": "form",
            "data": {},
            "formnodeprops": {
              "choiceFieldType": "single",
              "choices": [
                {
                  "value": "option1",
                  "text": "Option 1"
                }
              ],
              "attributeMapping": "attr1",
              "defaultChoice": "option1"
            }
          }
        ],
        "output": [
          {}
        ],
        "data": {},
        "selected": false
      }
    },
    "innerNodes": {
      "property1": {
        "id": "inner1",
        "UID": "UID456",
        "type": "inner",
        "childType": "form",
        "data": {},
        "formnodeprops": {
          "choiceFieldType": "multiple",
          "choices": [
            {
              "value": "option2",
              "text": "Option 2"
            }
          ],
          "attributeMapping": "attr2",
          "defaultChoice": "option2"
        }
      },
      "property2": {
        "id": "inner1",
        "UID": "UID456",
        "type": "inner",
        "childType": "form",
        "data": {},
        "formnodeprops": {
          "choiceFieldType": "multiple",
          "choices": [
            {
              "value": "option2",
              "text": "Option 2"
            }
          ],
          "attributeMapping": "attr2",
          "defaultChoice": "option2"
        }
      }
    },
    "policies": {
      "property1": [
        {}
      ],
      "property2": [
        {}
      ]
    },
    "versionId": "v1.0.0",
    "createdDate": "2024-06-17T12:34:56Z",
    "description": "Initial version of the workflow"
  }
}
{
  "ErrorCode": 8191,
  "Message": "Invalid workflow id",
  "Description": "Invalid workflow id, Please provide valid workflow id."
}

{
  "ErrorCode": 8023,
  "Message": "Failed to restore workflow version",
  "Description": "Failed to restore the workflow version. Please try again."
}

{
  "Message": "Workflow config not found.",
  "Description": "Workflow config not found, Please configure the workflow config.",
  "ErrorCode": 8033
}

{
  "Message": "Operation failed due to an internal error.",
  "Description": "An unknown internal error occurred, please try again in a few minutes or contact your system administrator.",
  "ErrorCode": 7909
}