Skip to main content
POST
/
workflow
/
v2beta1
/
workflows
/
{workflowId}
/
states
cURL
curl --request POST \
  --url https://aodocs.altirnao.com/api/workflow/v2beta1/workflows/{workflowId}/states \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "applyActionToDocuments": "DO_NOTHING",
  "checkOutSettings": {
    "addValidatorToPermissions": true,
    "applyPreviousVersionPermissions": true,
    "draftActionPrefix": "<string>",
    "permissions": [
      {
        "displayName": "<string>",
        "kind": "<string>",
        "role": "READER",
        "thumbnailPictureUrl": "<string>",
        "type": "ANYONE",
        "value": "<string>",
        "withLink": true
      }
    ]
  },
  "classReadOnlyDocumentsNotCheckedOut": "DISABLED",
  "createdTime": "2023-11-07T05:31:56Z",
  "customActions": [
    {
      "event": "ON_STATE_ENTER_BEFORE_TRANSITION",
      "id": "<string>",
      "kind": "<string>",
      "name": "<string>",
      "params": {},
      "scriptId": "<string>",
      "scriptName": "<string>"
    }
  ],
  "description": "<string>",
  "displayFlags": [
    "HIDDEN_FROM_WORKFLOW_TASKS"
  ],
  "draftDocuments": true,
  "hiddenFields": [
    {
      "id": "<string>",
      "name": "<string>"
    }
  ],
  "id": "<string>",
  "kind": "<string>",
  "lastModifiedTime": "2023-11-07T05:31:56Z",
  "mandatoryFields": [
    {
      "id": "<string>",
      "name": "<string>"
    }
  ],
  "name": "<string>",
  "name_i18n": "<string>",
  "notifications": {
    "actionEmail": {
      "customEmail": {
        "bodyTemplate": "<string>",
        "layout": "NO_LAYOUT",
        "senderTemplate": "<string>",
        "subjectTemplate": "<string>"
      },
      "templateEmail": {
        "id": "<string>",
        "name": "<string>"
      }
    },
    "notificationEmail": {
      "customEmail": {
        "bodyTemplate": "<string>",
        "layout": "NO_LAYOUT",
        "senderTemplate": "<string>",
        "subjectTemplate": "<string>"
      },
      "templateEmail": {
        "id": "<string>",
        "name": "<string>"
      }
    },
    "notifyHumanActionPerformer": true,
    "recipients": [
      {
        "classId": "<string>",
        "className": "<string>",
        "description": "<string>",
        "displayName": "<string>",
        "displayName_i18n": "<string>",
        "thumbnailPictureUrl": "<string>",
        "type": "USER",
        "value": "<string>"
      }
    ]
  },
  "permissions": [
    {
      "displayName": "<string>",
      "kind": "<string>",
      "role": "READER",
      "thumbnailPictureUrl": "<string>",
      "type": "ANYONE",
      "value": "<string>",
      "withLink": true
    }
  ],
  "readOnlyDocumentsNotCheckedOut": true,
  "readOnlyFields": [
    {
      "id": "<string>",
      "name": "<string>"
    }
  ],
  "resetDocumentPermissions": true,
  "transitions": [
    {
      "createNewDocumentVersion": true,
      "createdTime": "2023-11-07T05:31:56Z",
      "discardCheckedOutDocument": true,
      "elapsedTime": {
        "amount": 123,
        "unit": "MINUTE"
      },
      "fixedTime": "2023-11-07T05:31:56Z",
      "humanAction": {
        "actionId": "<string>",
        "appliedName": "<string>",
        "appliedName_i18n": "<string>",
        "commentPlaceholderText": "<string>",
        "commentPlaceholderText_i18n": "<string>",
        "mandatoryComment": true,
        "name": "<string>",
        "name_i18n": "<string>",
        "performer": {
          "classId": "<string>",
          "className": "<string>",
          "description": "<string>",
          "displayName": "<string>",
          "displayName_i18n": "<string>",
          "thumbnailPictureUrl": "<string>",
          "type": "USER",
          "value": "<string>"
        },
        "reminders": [
          {
            "audience": "PENDING",
            "condition": {
              "params": {},
              "scriptId": "<string>",
              "scriptName": "<string>"
            },
            "emailTemplateId": "<string>",
            "id": "<string>",
            "name": "<string>"
          }
        ],
        "validateByAll": true
      },
      "id": "<string>",
      "kind": "<string>",
      "lastModifiedTime": "2023-11-07T05:31:56Z",
      "propertyData": {
        "operator": "EQUAL_TO",
        "personValue": {
          "classId": "<string>",
          "className": "<string>",
          "description": "<string>",
          "displayName": "<string>",
          "displayName_i18n": "<string>",
          "thumbnailPictureUrl": "<string>",
          "type": "USER",
          "value": "<string>"
        },
        "propertyId": "<string>",
        "value": "<string>"
      },
      "propertyTime": "<string>",
      "relativeTime": {
        "after": true,
        "amount": 123,
        "propertyId": "<string>",
        "unit": "MINUTE"
      },
      "targetStateId": "<string>",
      "targetStateName": "<string>",
      "targetStateName_i18n": "<string>",
      "transitionType": "NORMAL"
    }
  ]
}
'
{
  "applyActionToDocuments": "DO_NOTHING",
  "checkOutSettings": {
    "addValidatorToPermissions": true,
    "applyPreviousVersionPermissions": true,
    "draftActionPrefix": "<string>",
    "permissions": [
      {
        "displayName": "<string>",
        "kind": "<string>",
        "role": "READER",
        "thumbnailPictureUrl": "<string>",
        "type": "ANYONE",
        "value": "<string>",
        "withLink": true
      }
    ]
  },
  "classReadOnlyDocumentsNotCheckedOut": "DISABLED",
  "createdTime": "2023-11-07T05:31:56Z",
  "customActions": [
    {
      "event": "ON_STATE_ENTER_BEFORE_TRANSITION",
      "id": "<string>",
      "kind": "<string>",
      "name": "<string>",
      "params": {},
      "scriptId": "<string>",
      "scriptName": "<string>"
    }
  ],
  "description": "<string>",
  "displayFlags": [
    "HIDDEN_FROM_WORKFLOW_TASKS"
  ],
  "draftDocuments": true,
  "hiddenFields": [
    {
      "id": "<string>",
      "name": "<string>"
    }
  ],
  "id": "<string>",
  "kind": "<string>",
  "lastModifiedTime": "2023-11-07T05:31:56Z",
  "mandatoryFields": [
    {
      "id": "<string>",
      "name": "<string>"
    }
  ],
  "name": "<string>",
  "name_i18n": "<string>",
  "notifications": {
    "actionEmail": {
      "customEmail": {
        "bodyTemplate": "<string>",
        "layout": "NO_LAYOUT",
        "senderTemplate": "<string>",
        "subjectTemplate": "<string>"
      },
      "templateEmail": {
        "id": "<string>",
        "name": "<string>"
      }
    },
    "notificationEmail": {
      "customEmail": {
        "bodyTemplate": "<string>",
        "layout": "NO_LAYOUT",
        "senderTemplate": "<string>",
        "subjectTemplate": "<string>"
      },
      "templateEmail": {
        "id": "<string>",
        "name": "<string>"
      }
    },
    "notifyHumanActionPerformer": true,
    "recipients": [
      {
        "classId": "<string>",
        "className": "<string>",
        "description": "<string>",
        "displayName": "<string>",
        "displayName_i18n": "<string>",
        "thumbnailPictureUrl": "<string>",
        "type": "USER",
        "value": "<string>"
      }
    ]
  },
  "permissions": [
    {
      "displayName": "<string>",
      "kind": "<string>",
      "role": "READER",
      "thumbnailPictureUrl": "<string>",
      "type": "ANYONE",
      "value": "<string>",
      "withLink": true
    }
  ],
  "readOnlyDocumentsNotCheckedOut": true,
  "readOnlyFields": [
    {
      "id": "<string>",
      "name": "<string>"
    }
  ],
  "resetDocumentPermissions": true,
  "transitions": [
    {
      "createNewDocumentVersion": true,
      "createdTime": "2023-11-07T05:31:56Z",
      "discardCheckedOutDocument": true,
      "elapsedTime": {
        "amount": 123,
        "unit": "MINUTE"
      },
      "fixedTime": "2023-11-07T05:31:56Z",
      "humanAction": {
        "actionId": "<string>",
        "appliedName": "<string>",
        "appliedName_i18n": "<string>",
        "commentPlaceholderText": "<string>",
        "commentPlaceholderText_i18n": "<string>",
        "mandatoryComment": true,
        "name": "<string>",
        "name_i18n": "<string>",
        "performer": {
          "classId": "<string>",
          "className": "<string>",
          "description": "<string>",
          "displayName": "<string>",
          "displayName_i18n": "<string>",
          "thumbnailPictureUrl": "<string>",
          "type": "USER",
          "value": "<string>"
        },
        "reminders": [
          {
            "audience": "PENDING",
            "condition": {
              "params": {},
              "scriptId": "<string>",
              "scriptName": "<string>"
            },
            "emailTemplateId": "<string>",
            "id": "<string>",
            "name": "<string>"
          }
        ],
        "validateByAll": true
      },
      "id": "<string>",
      "kind": "<string>",
      "lastModifiedTime": "2023-11-07T05:31:56Z",
      "propertyData": {
        "operator": "EQUAL_TO",
        "personValue": {
          "classId": "<string>",
          "className": "<string>",
          "description": "<string>",
          "displayName": "<string>",
          "displayName_i18n": "<string>",
          "thumbnailPictureUrl": "<string>",
          "type": "USER",
          "value": "<string>"
        },
        "propertyId": "<string>",
        "value": "<string>"
      },
      "propertyTime": "<string>",
      "relativeTime": {
        "after": true,
        "amount": 123,
        "propertyId": "<string>",
        "unit": "MINUTE"
      },
      "targetStateId": "<string>",
      "targetStateName": "<string>",
      "targetStateName_i18n": "<string>",
      "transitionType": "NORMAL"
    }
  ]
}

Authorizations

Authorization
string
header
required

The access token received from the authorization server in the OAuth 2.0 flow.

Path Parameters

workflowId
string
required

The ID of the workflow

Query Parameters

domain
string

The G Suite domain

securityCode
string

The security code

Body

application/json
applyActionToDocuments
enum<string>

(Deprecated) The action to apply when entering the workflow state

Available options:
DO_NOTHING,
NEW_VERSION,
CHECK_IN,
DISCARD,
CHECK_OUT
checkOutSettings
object
classReadOnlyDocumentsNotCheckedOut
enum<string>

The mode that defined whether documents are read-only if not checked-out at the document class level

Available options:
DISABLED,
OPTIONAL,
MANDATORY
createdTime
string<date-time>

The time at which the workflow state was created

customActions
object[]

The list of custom actions to apply on the workflow state

description
string

The description of the workflow state

displayFlags
enum<string>[]

The flags to control display of the workflow state in the application (HIDDEN_FROM_? where ? = WORKFLOW_TASKS, BROWSEBY or VIEW_FILTERS)

Available options:
HIDDEN_FROM_WORKFLOW_TASKS,
HIDDEN_FROM_BROWSEBY,
HIDDEN_FROM_VIEW_FILTERS
draftDocuments
boolean

Whether the workflow state is a draft state

hiddenFields
object[]

The list of fields to be hidden in the workflow state (id is read/write, name is readonly)

id
string

The ID of the workflow state

kind
string
lastModifiedTime
string<date-time>

The time at which the workflow state was last modified

mandatoryFields
object[]

The list of fields to be mandatory in the workflow state (id is read/write, name is readonly)

name
string

The name of the workflow state

name_i18n
string

The internationalized name of the workflow state

notifications
object
permissions
object[]

The list of permissions when inheriting them from the workflow state

readOnlyDocumentsNotCheckedOut
boolean

The mode to control whether the documents are read-only if not checked-out

readOnlyFields
object[]

The list of fields to be read-only in the workflow state (id is read/write, name is readonly)

resetDocumentPermissions
boolean

Whether to reset explicit permissions when entering the workflow state

transitions
object[]

The list of workflow transitions from this workflow state

Response

200 - application/json

A ApiWorkflowState response

applyActionToDocuments
enum<string>

(Deprecated) The action to apply when entering the workflow state

Available options:
DO_NOTHING,
NEW_VERSION,
CHECK_IN,
DISCARD,
CHECK_OUT
checkOutSettings
object
classReadOnlyDocumentsNotCheckedOut
enum<string>

The mode that defined whether documents are read-only if not checked-out at the document class level

Available options:
DISABLED,
OPTIONAL,
MANDATORY
createdTime
string<date-time>

The time at which the workflow state was created

customActions
object[]

The list of custom actions to apply on the workflow state

description
string

The description of the workflow state

displayFlags
enum<string>[]

The flags to control display of the workflow state in the application (HIDDEN_FROM_? where ? = WORKFLOW_TASKS, BROWSEBY or VIEW_FILTERS)

Available options:
HIDDEN_FROM_WORKFLOW_TASKS,
HIDDEN_FROM_BROWSEBY,
HIDDEN_FROM_VIEW_FILTERS
draftDocuments
boolean

Whether the workflow state is a draft state

hiddenFields
object[]

The list of fields to be hidden in the workflow state (id is read/write, name is readonly)

id
string

The ID of the workflow state

kind
string
lastModifiedTime
string<date-time>

The time at which the workflow state was last modified

mandatoryFields
object[]

The list of fields to be mandatory in the workflow state (id is read/write, name is readonly)

name
string

The name of the workflow state

name_i18n
string

The internationalized name of the workflow state

notifications
object
permissions
object[]

The list of permissions when inheriting them from the workflow state

readOnlyDocumentsNotCheckedOut
boolean

The mode to control whether the documents are read-only if not checked-out

readOnlyFields
object[]

The list of fields to be read-only in the workflow state (id is read/write, name is readonly)

resetDocumentPermissions
boolean

Whether to reset explicit permissions when entering the workflow state

transitions
object[]

The list of workflow transitions from this workflow state