Workflow API for Cloud Foundry

DataExport

/v1/export

Requests the export of workflow definitions metadata, form definitions metadata, workflow instances, and task instances. The file and data structures used are subject to change. Roles permitted to execute this operation: - Global roles: WorkflowTenantOperator - Scope: DATA_EXPORT


/v1/export

Usage

curl -X GET "https://sandbox.api.sap.com/workflow-service/rest/v1/export"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.DataExportApi;

import java.io.File;
import java.util.*;

public class DataExportApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        
        // Configure OAuth2 access token for authorization: Oauth2_AuthorizationCode
        OAuth Oauth2_AuthorizationCode = (OAuth) defaultClient.getAuthentication("Oauth2_AuthorizationCode");
        Oauth2_AuthorizationCode.setAccessToken("YOUR ACCESS TOKEN");

        // Configure OAuth2 access token for authorization: Oauth2_ClientCredentials
        OAuth Oauth2_ClientCredentials = (OAuth) defaultClient.getAuthentication("Oauth2_ClientCredentials");
        Oauth2_ClientCredentials.setAccessToken("YOUR ACCESS TOKEN");

        DataExportApi apiInstance = new DataExportApi();
        try {
            apiInstance.v1ExportGet();
        } catch (ApiException e) {
            System.err.println("Exception when calling DataExportApi#v1ExportGet");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.DataExportApi;

public class DataExportApiExample {

    public static void main(String[] args) {
        DataExportApi apiInstance = new DataExportApi();
        try {
            apiInstance.v1ExportGet();
        } catch (ApiException e) {
            System.err.println("Exception when calling DataExportApi#v1ExportGet");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure OAuth2 access token for authorization: (authentication scheme: Oauth2_AuthorizationCode)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];

// Configure OAuth2 access token for authorization: (authentication scheme: Oauth2_ClientCredentials)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];


DataExportApi *apiInstance = [[DataExportApi alloc] init];

// Data Export
[apiInstance v1ExportGetWithCompletionHandler: 
              ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var WorkflowApiForCloudFoundry = require('workflow_api_for_cloud_foundry');
var defaultClient = WorkflowApiForCloudFoundry.ApiClient.instance;

// Configure OAuth2 access token for authorization: Oauth2_AuthorizationCode
var Oauth2_AuthorizationCode = defaultClient.authentications['Oauth2_AuthorizationCode'];
Oauth2_AuthorizationCode.accessToken = "YOUR ACCESS TOKEN"

// Configure OAuth2 access token for authorization: Oauth2_ClientCredentials
var Oauth2_ClientCredentials = defaultClient.authentications['Oauth2_ClientCredentials'];
Oauth2_ClientCredentials.accessToken = "YOUR ACCESS TOKEN"

var api = new WorkflowApiForCloudFoundry.DataExportApi()

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.v1ExportGet(callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class v1ExportGetExample
    {
        public void main()
        {
            
            // Configure OAuth2 access token for authorization: Oauth2_AuthorizationCode
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
            // Configure OAuth2 access token for authorization: Oauth2_ClientCredentials
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new DataExportApi();

            try
            {
                // Data Export
                apiInstance.v1ExportGet();
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling DataExportApi.v1ExportGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: Oauth2_AuthorizationCode
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
// Configure OAuth2 access token for authorization: Oauth2_ClientCredentials
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new Swagger\Client\Api\DataExportApi();

try {
    $api_instance->v1ExportGet();
} catch (Exception $e) {
    echo 'Exception when calling DataExportApi->v1ExportGet: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::DataExportApi;

# Configure OAuth2 access token for authorization: Oauth2_AuthorizationCode
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
# Configure OAuth2 access token for authorization: Oauth2_ClientCredentials
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::SwaggerClient::DataExportApi->new();

eval { 
    $api_instance->v1ExportGet();
};
if ($@) {
    warn "Exception when calling DataExportApi->v1ExportGet: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: Oauth2_AuthorizationCode
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure OAuth2 access token for authorization: Oauth2_ClientCredentials
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.DataExportApi()

try: 
    # Data Export
    api_instance.v1ExportGet()
except ApiException as e:
    print("Exception when calling DataExportApi->v1ExportGet: %s\n" % e)

Parameters

Responses

Status: 200 - Returns all data related to workflow instances and task instances as well as the latest version of all workflow definitions and form definitions as a .zip-file. The exported file and data structures are subject to change. For more information, see the product documentation at: https://help.sap.com/viewer/e157c391253b4ecd93647bf232d18a83/Cloud/en-US/5df7521ad6f74a24b84ab448fb58c66b.html.

Status: 401 - Unauthorized. You have not provided valid authentication credentials to access the resource.

{error=unauthorized, error_description=Full authentication is required to access this resource.}

Status: 403 - Access forbidden. You have not the required permissions to access the resource.

{error={message=User does not have sufficient privileges.}}

Status: 429 - You cannot run concurrent requests of this type for the current account. Please retry later.

Status: 500 - Internal server error. The operation you requested led to an error during execution.

{error={code=bpm.workflowruntime.rest.internal.server.error, message=Internal server error, logId=f29a5719-3342-4a4a-8a3d-5ddd5253159e}}

Status: 503 - The limit of concurrent requests of this type has been exceeded. Please retry later.


Forms

/v1/forms/{formId}

Undeploys all versions of an existing form. Roles permitted to execute this operation: - Global roles: WorkflowTenantOperator - Scope: FORM_DEFINITION_UNDEPLOY


/v1/forms/{formId}

Usage

curl -X DELETE "https://sandbox.api.sap.com/workflow-service/rest/v1/forms/{formId}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.FormsApi;

import java.io.File;
import java.util.*;

public class FormsApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        
        // Configure OAuth2 access token for authorization: Oauth2_AuthorizationCode
        OAuth Oauth2_AuthorizationCode = (OAuth) defaultClient.getAuthentication("Oauth2_AuthorizationCode");
        Oauth2_AuthorizationCode.setAccessToken("YOUR ACCESS TOKEN");

        // Configure OAuth2 access token for authorization: Oauth2_ClientCredentials
        OAuth Oauth2_ClientCredentials = (OAuth) defaultClient.getAuthentication("Oauth2_ClientCredentials");
        Oauth2_ClientCredentials.setAccessToken("YOUR ACCESS TOKEN");

        FormsApi apiInstance = new FormsApi();
        String formId = formId_example; // String | The ID of the form you want to undeploy. The ID is at most 255 characters long.
        try {
            apiInstance.v1FormsFormIdDelete(formId);
        } catch (ApiException e) {
            System.err.println("Exception when calling FormsApi#v1FormsFormIdDelete");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.FormsApi;

public class FormsApiExample {

    public static void main(String[] args) {
        FormsApi apiInstance = new FormsApi();
        String formId = formId_example; // String | The ID of the form you want to undeploy. The ID is at most 255 characters long.
        try {
            apiInstance.v1FormsFormIdDelete(formId);
        } catch (ApiException e) {
            System.err.println("Exception when calling FormsApi#v1FormsFormIdDelete");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure OAuth2 access token for authorization: (authentication scheme: Oauth2_AuthorizationCode)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];

// Configure OAuth2 access token for authorization: (authentication scheme: Oauth2_ClientCredentials)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];

String *formId = formId_example; // The ID of the form you want to undeploy. The ID is at most 255 characters long.

FormsApi *apiInstance = [[FormsApi alloc] init];

// Delete a form.
[apiInstance v1FormsFormIdDeleteWith:formId
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var WorkflowApiForCloudFoundry = require('workflow_api_for_cloud_foundry');
var defaultClient = WorkflowApiForCloudFoundry.ApiClient.instance;

// Configure OAuth2 access token for authorization: Oauth2_AuthorizationCode
var Oauth2_AuthorizationCode = defaultClient.authentications['Oauth2_AuthorizationCode'];
Oauth2_AuthorizationCode.accessToken = "YOUR ACCESS TOKEN"

// Configure OAuth2 access token for authorization: Oauth2_ClientCredentials
var Oauth2_ClientCredentials = defaultClient.authentications['Oauth2_ClientCredentials'];
Oauth2_ClientCredentials.accessToken = "YOUR ACCESS TOKEN"

var api = new WorkflowApiForCloudFoundry.FormsApi()

var formId = formId_example; // {String} The ID of the form you want to undeploy. The ID is at most 255 characters long.


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.v1FormsFormIdDelete(formId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class v1FormsFormIdDeleteExample
    {
        public void main()
        {
            
            // Configure OAuth2 access token for authorization: Oauth2_AuthorizationCode
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
            // Configure OAuth2 access token for authorization: Oauth2_ClientCredentials
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new FormsApi();
            var formId = formId_example;  // String | The ID of the form you want to undeploy. The ID is at most 255 characters long.

            try
            {
                // Delete a form.
                apiInstance.v1FormsFormIdDelete(formId);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling FormsApi.v1FormsFormIdDelete: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: Oauth2_AuthorizationCode
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
// Configure OAuth2 access token for authorization: Oauth2_ClientCredentials
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new Swagger\Client\Api\FormsApi();
$formId = formId_example; // String | The ID of the form you want to undeploy. The ID is at most 255 characters long.

try {
    $api_instance->v1FormsFormIdDelete($formId);
} catch (Exception $e) {
    echo 'Exception when calling FormsApi->v1FormsFormIdDelete: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::FormsApi;

# Configure OAuth2 access token for authorization: Oauth2_AuthorizationCode
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
# Configure OAuth2 access token for authorization: Oauth2_ClientCredentials
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::SwaggerClient::FormsApi->new();
my $formId = formId_example; # String | The ID of the form you want to undeploy. The ID is at most 255 characters long.

eval { 
    $api_instance->v1FormsFormIdDelete(formId => $formId);
};
if ($@) {
    warn "Exception when calling FormsApi->v1FormsFormIdDelete: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: Oauth2_AuthorizationCode
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure OAuth2 access token for authorization: Oauth2_ClientCredentials
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.FormsApi()
formId = formId_example # String | The ID of the form you want to undeploy. The ID is at most 255 characters long.

try: 
    # Delete a form.
    api_instance.v1FormsFormIdDelete(formId)
except ApiException as e:
    print("Exception when calling FormsApi->v1FormsFormIdDelete: %s\n" % e)

Parameters

Path parameters
Name Description
formId*

Responses

Status: 204 - The request was successful and the form definition was deleted.

Status: 401 - Unauthorized. You have not provided valid authentication credentials to access the resource.

{error=unauthorized, error_description=Full authentication is required to access this resource.}

Status: 403 - Access forbidden. You have not the required permissions to access the resource.

{error={message=User does not have sufficient privileges.}}

Status: 404 - Form definition not found. Either the payload did not contain a definitionId property or the specified ID was incorrect.

{error={code=bpm.formruntime.definition.not.found, message=Form definition not found, logId=1c4daaf5-eb3f-4ff5-8b13-aa32a47bb07d}}

Status: 429 - You have reached the usage limits that are configured for your tenant. You are performing too many requests or consume too many resources.

{error={code=bpm.workflowruntime.rate.limit.exceeded, message=Your tenant is performing too many requests.}}

Status: 500 - Internal server error. The operation you requested led to an error during execution.

{error={code=bpm.workflowruntime.rest.internal.server.error, message=Internal server error, logId=f29a5719-3342-4a4a-8a3d-5ddd5253159e}}

/v1/forms/{formId}/revisions/{revisionId}/model

Retrieves the form model with the specified form ID and revision. Roles permitted to execute this operation: - Global roles (retrieve start and task forms): WorkflowViewer, WorkflowAdmin, WorkflowDeveloper - Global roles (retrieve start forms only): WorkflowInitiator - Scope: FORM_DEFINITION_GET_MODEL


/v1/forms/{formId}/revisions/{revisionId}/model

Usage

curl -X GET "https://sandbox.api.sap.com/workflow-service/rest/v1/forms/{formId}/revisions/{revisionId}/model"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.FormsApi;

import java.io.File;
import java.util.*;

public class FormsApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        
        // Configure OAuth2 access token for authorization: Oauth2_AuthorizationCode
        OAuth Oauth2_AuthorizationCode = (OAuth) defaultClient.getAuthentication("Oauth2_AuthorizationCode");
        Oauth2_AuthorizationCode.setAccessToken("YOUR ACCESS TOKEN");

        // Configure OAuth2 access token for authorization: Oauth2_ClientCredentials
        OAuth Oauth2_ClientCredentials = (OAuth) defaultClient.getAuthentication("Oauth2_ClientCredentials");
        Oauth2_ClientCredentials.setAccessToken("YOUR ACCESS TOKEN");

        FormsApi apiInstance = new FormsApi();
        String formId = formId_example; // String | The ID of the form for which the model should be retrieved.
        String revisionId = revisionId_example; // String | The revision of the form for which the model should be retrieved.
        try {
            FormModel result = apiInstance.v1FormsFormIdRevisionsRevisionIdModelGet(formId, revisionId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling FormsApi#v1FormsFormIdRevisionsRevisionIdModelGet");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.FormsApi;

public class FormsApiExample {

    public static void main(String[] args) {
        FormsApi apiInstance = new FormsApi();
        String formId = formId_example; // String | The ID of the form for which the model should be retrieved.
        String revisionId = revisionId_example; // String | The revision of the form for which the model should be retrieved.
        try {
            FormModel result = apiInstance.v1FormsFormIdRevisionsRevisionIdModelGet(formId, revisionId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling FormsApi#v1FormsFormIdRevisionsRevisionIdModelGet");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure OAuth2 access token for authorization: (authentication scheme: Oauth2_AuthorizationCode)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];

// Configure OAuth2 access token for authorization: (authentication scheme: Oauth2_ClientCredentials)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];

String *formId = formId_example; // The ID of the form for which the model should be retrieved.
String *revisionId = revisionId_example; // The revision of the form for which the model should be retrieved.

FormsApi *apiInstance = [[FormsApi alloc] init];

// Retrieve form model by ID and revision.
[apiInstance v1FormsFormIdRevisionsRevisionIdModelGetWith:formId
    revisionId:revisionId
              completionHandler: ^(FormModel output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var WorkflowApiForCloudFoundry = require('workflow_api_for_cloud_foundry');
var defaultClient = WorkflowApiForCloudFoundry.ApiClient.instance;

// Configure OAuth2 access token for authorization: Oauth2_AuthorizationCode
var Oauth2_AuthorizationCode = defaultClient.authentications['Oauth2_AuthorizationCode'];
Oauth2_AuthorizationCode.accessToken = "YOUR ACCESS TOKEN"

// Configure OAuth2 access token for authorization: Oauth2_ClientCredentials
var Oauth2_ClientCredentials = defaultClient.authentications['Oauth2_ClientCredentials'];
Oauth2_ClientCredentials.accessToken = "YOUR ACCESS TOKEN"

var api = new WorkflowApiForCloudFoundry.FormsApi()

var formId = formId_example; // {String} The ID of the form for which the model should be retrieved.

var revisionId = revisionId_example; // {String} The revision of the form for which the model should be retrieved.


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.v1FormsFormIdRevisionsRevisionIdModelGet(formId, revisionId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class v1FormsFormIdRevisionsRevisionIdModelGetExample
    {
        public void main()
        {
            
            // Configure OAuth2 access token for authorization: Oauth2_AuthorizationCode
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
            // Configure OAuth2 access token for authorization: Oauth2_ClientCredentials
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new FormsApi();
            var formId = formId_example;  // String | The ID of the form for which the model should be retrieved.
            var revisionId = revisionId_example;  // String | The revision of the form for which the model should be retrieved.

            try
            {
                // Retrieve form model by ID and revision.
                FormModel result = apiInstance.v1FormsFormIdRevisionsRevisionIdModelGet(formId, revisionId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling FormsApi.v1FormsFormIdRevisionsRevisionIdModelGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: Oauth2_AuthorizationCode
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
// Configure OAuth2 access token for authorization: Oauth2_ClientCredentials
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new Swagger\Client\Api\FormsApi();
$formId = formId_example; // String | The ID of the form for which the model should be retrieved.
$revisionId = revisionId_example; // String | The revision of the form for which the model should be retrieved.

try {
    $result = $api_instance->v1FormsFormIdRevisionsRevisionIdModelGet($formId, $revisionId);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling FormsApi->v1FormsFormIdRevisionsRevisionIdModelGet: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::FormsApi;

# Configure OAuth2 access token for authorization: Oauth2_AuthorizationCode
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
# Configure OAuth2 access token for authorization: Oauth2_ClientCredentials
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::SwaggerClient::FormsApi->new();
my $formId = formId_example; # String | The ID of the form for which the model should be retrieved.
my $revisionId = revisionId_example; # String | The revision of the form for which the model should be retrieved.

eval { 
    my $result = $api_instance->v1FormsFormIdRevisionsRevisionIdModelGet(formId => $formId, revisionId => $revisionId);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling FormsApi->v1FormsFormIdRevisionsRevisionIdModelGet: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: Oauth2_AuthorizationCode
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure OAuth2 access token for authorization: Oauth2_ClientCredentials
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.FormsApi()
formId = formId_example # String | The ID of the form for which the model should be retrieved.
revisionId = revisionId_example # String | The revision of the form for which the model should be retrieved.

try: 
    # Retrieve form model by ID and revision.
    api_response = api_instance.v1FormsFormIdRevisionsRevisionIdModelGet(formId, revisionId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling FormsApi->v1FormsFormIdRevisionsRevisionIdModelGet: %s\n" % e)

Parameters

Path parameters
Name Description
formId*
revisionId*

Responses

Status: 200 - The deployed form definition model.

{id=com.sap.bpm.demo.approvalform, name=ApprovalForm, revision=1.0, type=task, readOnly=false, content=[{id=title, type=string, label=Title, readOnly=false, value=${context.product}, constraints=[{required=false}]}, {id=price, type=string, label=Price, readOnly=false, value=${context.price}, constraints=[{required=false}]}], decisions=[{id=approve, text=Approve, decisionType=positive}, {id=reject, text=Reject, decisionType=negative}]}

Status: 401 - Unauthorized. You have not provided valid authentication credentials to access the resource.

{error=unauthorized, error_description=Full authentication is required to access this resource.}

Status: 403 - Access forbidden. You have not the required permissions to access the resource.

{error={message=User does not have sufficient privileges.}}

Status: 404 - Either the specified form definition, the specified version within that definition, or the JSON model for that definition version was not found.

{error={code=bpm.formruntime.definition.not.found, message=Form definition not found, logId=381a4f5-eb3f-4c3a-89b0-ca32a47bb517}}

Status: 429 - You have reached the usage limits that are configured for your tenant. You are performing too many requests or consume too many resources.

{error={code=bpm.workflowruntime.rate.limit.exceeded, message=Your tenant is performing too many requests.}}

Status: 500 - Internal server error. The operation you requested led to an error during execution.

{error={code=bpm.workflowruntime.rest.internal.server.error, message=Internal server error, logId=f29a5719-3342-4a4a-8a3d-5ddd5253159e}}

/v1/forms/{formId}/versions/{versionNumber}/model

Retrieves the model of the specified version of the specified form definition. Roles permitted to execute this operation: - Global roles: WorkflowViewer, WorkflowAdmin, WorkflowDeveloper - Scope: FORM_DEFINITION_GET_MODEL


/v1/forms/{formId}/versions/{versionNumber}/model

Usage

curl -X GET "https://sandbox.api.sap.com/workflow-service/rest/v1/forms/{formId}/versions/{versionNumber}/model"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.FormsApi;

import java.io.File;
import java.util.*;

public class FormsApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        
        // Configure OAuth2 access token for authorization: Oauth2_AuthorizationCode
        OAuth Oauth2_AuthorizationCode = (OAuth) defaultClient.getAuthentication("Oauth2_AuthorizationCode");
        Oauth2_AuthorizationCode.setAccessToken("YOUR ACCESS TOKEN");

        // Configure OAuth2 access token for authorization: Oauth2_ClientCredentials
        OAuth Oauth2_ClientCredentials = (OAuth) defaultClient.getAuthentication("Oauth2_ClientCredentials");
        Oauth2_ClientCredentials.setAccessToken("YOUR ACCESS TOKEN");

        FormsApi apiInstance = new FormsApi();
        String formId = formId_example; // String | The form ID for which the model should be retrieved. The form definition ID is at most 255 characters long.
        String versionNumber = versionNumber_example; // String | The version number for which the model should be retrieved. The version number consists of 1 - 10 digits.
        try {
            FormModel result = apiInstance.v1FormsFormIdVersionsVersionNumberModelGet(formId, versionNumber);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling FormsApi#v1FormsFormIdVersionsVersionNumberModelGet");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.FormsApi;

public class FormsApiExample {

    public static void main(String[] args) {
        FormsApi apiInstance = new FormsApi();
        String formId = formId_example; // String | The form ID for which the model should be retrieved. The form definition ID is at most 255 characters long.
        String versionNumber = versionNumber_example; // String | The version number for which the model should be retrieved. The version number consists of 1 - 10 digits.
        try {
            FormModel result = apiInstance.v1FormsFormIdVersionsVersionNumberModelGet(formId, versionNumber);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling FormsApi#v1FormsFormIdVersionsVersionNumberModelGet");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure OAuth2 access token for authorization: (authentication scheme: Oauth2_AuthorizationCode)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];

// Configure OAuth2 access token for authorization: (authentication scheme: Oauth2_ClientCredentials)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];

String *formId = formId_example; // The form ID for which the model should be retrieved. The form definition ID is at most 255 characters long.
String *versionNumber = versionNumber_example; // The version number for which the model should be retrieved. The version number consists of 1 - 10 digits.

FormsApi *apiInstance = [[FormsApi alloc] init];

// Retrieve form model by ID and version number.
[apiInstance v1FormsFormIdVersionsVersionNumberModelGetWith:formId
    versionNumber:versionNumber
              completionHandler: ^(FormModel output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var WorkflowApiForCloudFoundry = require('workflow_api_for_cloud_foundry');
var defaultClient = WorkflowApiForCloudFoundry.ApiClient.instance;

// Configure OAuth2 access token for authorization: Oauth2_AuthorizationCode
var Oauth2_AuthorizationCode = defaultClient.authentications['Oauth2_AuthorizationCode'];
Oauth2_AuthorizationCode.accessToken = "YOUR ACCESS TOKEN"

// Configure OAuth2 access token for authorization: Oauth2_ClientCredentials
var Oauth2_ClientCredentials = defaultClient.authentications['Oauth2_ClientCredentials'];
Oauth2_ClientCredentials.accessToken = "YOUR ACCESS TOKEN"

var api = new WorkflowApiForCloudFoundry.FormsApi()

var formId = formId_example; // {String} The form ID for which the model should be retrieved. The form definition ID is at most 255 characters long.

var versionNumber = versionNumber_example; // {String} The version number for which the model should be retrieved. The version number consists of 1 - 10 digits.


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.v1FormsFormIdVersionsVersionNumberModelGet(formId, versionNumber, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class v1FormsFormIdVersionsVersionNumberModelGetExample
    {
        public void main()
        {
            
            // Configure OAuth2 access token for authorization: Oauth2_AuthorizationCode
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
            // Configure OAuth2 access token for authorization: Oauth2_ClientCredentials
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new FormsApi();
            var formId = formId_example;  // String | The form ID for which the model should be retrieved. The form definition ID is at most 255 characters long.
            var versionNumber = versionNumber_example;  // String | The version number for which the model should be retrieved. The version number consists of 1 - 10 digits.

            try
            {
                // Retrieve form model by ID and version number.
                FormModel result = apiInstance.v1FormsFormIdVersionsVersionNumberModelGet(formId, versionNumber);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling FormsApi.v1FormsFormIdVersionsVersionNumberModelGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: Oauth2_AuthorizationCode
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
// Configure OAuth2 access token for authorization: Oauth2_ClientCredentials
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new Swagger\Client\Api\FormsApi();
$formId = formId_example; // String | The form ID for which the model should be retrieved. The form definition ID is at most 255 characters long.
$versionNumber = versionNumber_example; // String | The version number for which the model should be retrieved. The version number consists of 1 - 10 digits.

try {
    $result = $api_instance->v1FormsFormIdVersionsVersionNumberModelGet($formId, $versionNumber);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling FormsApi->v1FormsFormIdVersionsVersionNumberModelGet: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::FormsApi;

# Configure OAuth2 access token for authorization: Oauth2_AuthorizationCode
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
# Configure OAuth2 access token for authorization: Oauth2_ClientCredentials
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::SwaggerClient::FormsApi->new();
my $formId = formId_example; # String | The form ID for which the model should be retrieved. The form definition ID is at most 255 characters long.
my $versionNumber = versionNumber_example; # String | The version number for which the model should be retrieved. The version number consists of 1 - 10 digits.

eval { 
    my $result = $api_instance->v1FormsFormIdVersionsVersionNumberModelGet(formId => $formId, versionNumber => $versionNumber);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling FormsApi->v1FormsFormIdVersionsVersionNumberModelGet: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: Oauth2_AuthorizationCode
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure OAuth2 access token for authorization: Oauth2_ClientCredentials
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.FormsApi()
formId = formId_example # String | The form ID for which the model should be retrieved. The form definition ID is at most 255 characters long.
versionNumber = versionNumber_example # String | The version number for which the model should be retrieved. The version number consists of 1 - 10 digits.

try: 
    # Retrieve form model by ID and version number.
    api_response = api_instance.v1FormsFormIdVersionsVersionNumberModelGet(formId, versionNumber)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling FormsApi->v1FormsFormIdVersionsVersionNumberModelGet: %s\n" % e)

Parameters

Path parameters
Name Description
formId*
versionNumber*

Responses

Status: 200 - The deployed form definition model.

{id=com.sap.bpm.demo.approvalform, name=ApprovalForm, revision=1.0, type=task, readOnly=false, content=[{id=title, type=string, label=Title, readOnly=false, value=${context.product}, constraints=[{required=false}]}, {id=price, type=string, label=Price, readOnly=false, value=${context.price}, constraints=[{required=false}]}], decisions=[{id=approve, text=Approve, decisionType=positive}, {id=reject, text=Reject, decisionType=negative}]}

Status: 401 - Unauthorized. You have not provided valid authentication credentials to access the resource.

{error=unauthorized, error_description=Full authentication is required to access this resource.}

Status: 403 - Access forbidden. You have not the required permissions to access the resource.

{error={message=User does not have sufficient privileges.}}

Status: 404 - Either the specified form definition, the specified version within that definition, or the JSON model for that definition version was not found.

{error={code=bpm.formruntime.definition.not.found, message=Form definition not found, logId=381a4f5-eb3f-4c3a-89b0-ca32a47bb517}}

Status: 429 - You have reached the usage limits that are configured for your tenant. You are performing too many requests or consume too many resources.

{error={code=bpm.workflowruntime.rate.limit.exceeded, message=Your tenant is performing too many requests.}}

Status: 500 - Internal server error. The operation you requested led to an error during execution.

{error={code=bpm.workflowruntime.rest.internal.server.error, message=Internal server error, logId=f29a5719-3342-4a4a-8a3d-5ddd5253159e}}

/v1/forms

Retrieves a list of the latest version of each revision of each deployed form definition. The request can be parameterized. The results are sorted by the 'createdAt' attribute in descending order. Roles permitted to execute this operation: - Global roles: WorkflowViewer, WorkflowAdmin, WorkflowDeveloper - Scope: FORM_DEFINITION_GET


/v1/forms

Usage

curl -X GET "https://sandbox.api.sap.com/workflow-service/rest/v1/forms?$skip=&$top=&$inlinecount=&type="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.FormsApi;

import java.io.File;
import java.util.*;

public class FormsApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        
        // Configure OAuth2 access token for authorization: Oauth2_AuthorizationCode
        OAuth Oauth2_AuthorizationCode = (OAuth) defaultClient.getAuthentication("Oauth2_AuthorizationCode");
        Oauth2_AuthorizationCode.setAccessToken("YOUR ACCESS TOKEN");

        // Configure OAuth2 access token for authorization: Oauth2_ClientCredentials
        OAuth Oauth2_ClientCredentials = (OAuth) defaultClient.getAuthentication("Oauth2_ClientCredentials");
        Oauth2_ClientCredentials.setAccessToken("YOUR ACCESS TOKEN");

        FormsApi apiInstance = new FormsApi();
        Integer $skip = 56; // Integer | Specify the number of records you want to skip from the beginning.
You can skip at most 4000 records. To indicate a result range that starts, for example, at 1001, combine the $skip with the $top parameter.
If not specified, no records are skipped.
Refer also to the $top parameter.
        Integer $top = 56; // Integer | Specify the number of records you want to show.
You can get at most 1000 records per API call. To indicate a result range that starts, for example, at 1001, combine the $top with the $skip parameter.
If not specified, 100 records are returned.
Refer also to the $skip parameter.
        String $inlinecount = $inlinecount_example; // String | Specify whether the total count of the form definitions should be returned as the value of the X-Total-Count response header.
To enable the header, use the 'allpages' setting. To disable the header, use the 'none' setting. The values are case-sensitive.
        String type = type_example; // String | Specify whether the response should be filtered by the form type. The values are case-sensitive.
        try {
            array[FormMetadata] result = apiInstance.v1FormsGet($skip, $top, $inlinecount, type);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling FormsApi#v1FormsGet");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.FormsApi;

public class FormsApiExample {

    public static void main(String[] args) {
        FormsApi apiInstance = new FormsApi();
        Integer $skip = 56; // Integer | Specify the number of records you want to skip from the beginning.
You can skip at most 4000 records. To indicate a result range that starts, for example, at 1001, combine the $skip with the $top parameter.
If not specified, no records are skipped.
Refer also to the $top parameter.
        Integer $top = 56; // Integer | Specify the number of records you want to show.
You can get at most 1000 records per API call. To indicate a result range that starts, for example, at 1001, combine the $top with the $skip parameter.
If not specified, 100 records are returned.
Refer also to the $skip parameter.
        String $inlinecount = $inlinecount_example; // String | Specify whether the total count of the form definitions should be returned as the value of the X-Total-Count response header.
To enable the header, use the 'allpages' setting. To disable the header, use the 'none' setting. The values are case-sensitive.
        String type = type_example; // String | Specify whether the response should be filtered by the form type. The values are case-sensitive.
        try {
            array[FormMetadata] result = apiInstance.v1FormsGet($skip, $top, $inlinecount, type);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling FormsApi#v1FormsGet");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure OAuth2 access token for authorization: (authentication scheme: Oauth2_AuthorizationCode)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];

// Configure OAuth2 access token for authorization: (authentication scheme: Oauth2_ClientCredentials)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];

Integer *$skip = 56; // Specify the number of records you want to skip from the beginning.
You can skip at most 4000 records. To indicate a result range that starts, for example, at 1001, combine the $skip with the $top parameter.
If not specified, no records are skipped.
Refer also to the $top parameter. (optional) (default to 0)
Integer *$top = 56; // Specify the number of records you want to show.
You can get at most 1000 records per API call. To indicate a result range that starts, for example, at 1001, combine the $top with the $skip parameter.
If not specified, 100 records are returned.
Refer also to the $skip parameter. (optional) (default to 100)
String *$inlinecount = $inlinecount_example; // Specify whether the total count of the form definitions should be returned as the value of the X-Total-Count response header.
To enable the header, use the 'allpages' setting. To disable the header, use the 'none' setting. The values are case-sensitive. (optional) (default to none)
String *type = type_example; // Specify whether the response should be filtered by the form type. The values are case-sensitive. (optional)

FormsApi *apiInstance = [[FormsApi alloc] init];

// Retrieve all form definitions
[apiInstance v1FormsGetWith:$skip
    $top:$top
    $inlinecount:$inlinecount
    type:type
              completionHandler: ^(array[FormMetadata] output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var WorkflowApiForCloudFoundry = require('workflow_api_for_cloud_foundry');
var defaultClient = WorkflowApiForCloudFoundry.ApiClient.instance;

// Configure OAuth2 access token for authorization: Oauth2_AuthorizationCode
var Oauth2_AuthorizationCode = defaultClient.authentications['Oauth2_AuthorizationCode'];
Oauth2_AuthorizationCode.accessToken = "YOUR ACCESS TOKEN"

// Configure OAuth2 access token for authorization: Oauth2_ClientCredentials
var Oauth2_ClientCredentials = defaultClient.authentications['Oauth2_ClientCredentials'];
Oauth2_ClientCredentials.accessToken = "YOUR ACCESS TOKEN"

var api = new WorkflowApiForCloudFoundry.FormsApi()

var opts = { 
  '$skip': 56, // {Integer} Specify the number of records you want to skip from the beginning.
You can skip at most 4000 records. To indicate a result range that starts, for example, at 1001, combine the $skip with the $top parameter.
If not specified, no records are skipped.
Refer also to the $top parameter.
  '$top': 56, // {Integer} Specify the number of records you want to show.
You can get at most 1000 records per API call. To indicate a result range that starts, for example, at 1001, combine the $top with the $skip parameter.
If not specified, 100 records are returned.
Refer also to the $skip parameter.
  '$inlinecount': $inlinecount_example, // {String} Specify whether the total count of the form definitions should be returned as the value of the X-Total-Count response header.
To enable the header, use the 'allpages' setting. To disable the header, use the 'none' setting. The values are case-sensitive.
  'type': type_example // {String} Specify whether the response should be filtered by the form type. The values are case-sensitive.
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.v1FormsGet(opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class v1FormsGetExample
    {
        public void main()
        {
            
            // Configure OAuth2 access token for authorization: Oauth2_AuthorizationCode
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
            // Configure OAuth2 access token for authorization: Oauth2_ClientCredentials
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new FormsApi();
            var $skip = 56;  // Integer | Specify the number of records you want to skip from the beginning.
You can skip at most 4000 records. To indicate a result range that starts, for example, at 1001, combine the $skip with the $top parameter.
If not specified, no records are skipped.
Refer also to the $top parameter. (optional)  (default to 0)
            var $top = 56;  // Integer | Specify the number of records you want to show.
You can get at most 1000 records per API call. To indicate a result range that starts, for example, at 1001, combine the $top with the $skip parameter.
If not specified, 100 records are returned.
Refer also to the $skip parameter. (optional)  (default to 100)
            var $inlinecount = $inlinecount_example;  // String | Specify whether the total count of the form definitions should be returned as the value of the X-Total-Count response header.
To enable the header, use the 'allpages' setting. To disable the header, use the 'none' setting. The values are case-sensitive. (optional)  (default to none)
            var type = type_example;  // String | Specify whether the response should be filtered by the form type. The values are case-sensitive. (optional) 

            try
            {
                // Retrieve all form definitions
                array[FormMetadata] result = apiInstance.v1FormsGet($skip, $top, $inlinecount, type);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling FormsApi.v1FormsGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: Oauth2_AuthorizationCode
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
// Configure OAuth2 access token for authorization: Oauth2_ClientCredentials
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new Swagger\Client\Api\FormsApi();
$$skip = 56; // Integer | Specify the number of records you want to skip from the beginning.
You can skip at most 4000 records. To indicate a result range that starts, for example, at 1001, combine the $skip with the $top parameter.
If not specified, no records are skipped.
Refer also to the $top parameter.
$$top = 56; // Integer | Specify the number of records you want to show.
You can get at most 1000 records per API call. To indicate a result range that starts, for example, at 1001, combine the $top with the $skip parameter.
If not specified, 100 records are returned.
Refer also to the $skip parameter.
$$inlinecount = $inlinecount_example; // String | Specify whether the total count of the form definitions should be returned as the value of the X-Total-Count response header.
To enable the header, use the 'allpages' setting. To disable the header, use the 'none' setting. The values are case-sensitive.
$type = type_example; // String | Specify whether the response should be filtered by the form type. The values are case-sensitive.

try {
    $result = $api_instance->v1FormsGet($$skip, $$top, $$inlinecount, $type);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling FormsApi->v1FormsGet: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::FormsApi;

# Configure OAuth2 access token for authorization: Oauth2_AuthorizationCode
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
# Configure OAuth2 access token for authorization: Oauth2_ClientCredentials
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::SwaggerClient::FormsApi->new();
my $$skip = 56; # Integer | Specify the number of records you want to skip from the beginning.
You can skip at most 4000 records. To indicate a result range that starts, for example, at 1001, combine the $skip with the $top parameter.
If not specified, no records are skipped.
Refer also to the $top parameter.
my $$top = 56; # Integer | Specify the number of records you want to show.
You can get at most 1000 records per API call. To indicate a result range that starts, for example, at 1001, combine the $top with the $skip parameter.
If not specified, 100 records are returned.
Refer also to the $skip parameter.
my $$inlinecount = $inlinecount_example; # String | Specify whether the total count of the form definitions should be returned as the value of the X-Total-Count response header.
To enable the header, use the 'allpages' setting. To disable the header, use the 'none' setting. The values are case-sensitive.
my $type = type_example; # String | Specify whether the response should be filtered by the form type. The values are case-sensitive.

eval { 
    my $result = $api_instance->v1FormsGet($skip => $$skip, $top => $$top, $inlinecount => $$inlinecount, type => $type);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling FormsApi->v1FormsGet: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: Oauth2_AuthorizationCode
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure OAuth2 access token for authorization: Oauth2_ClientCredentials
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.FormsApi()
$skip = 56 # Integer | Specify the number of records you want to skip from the beginning.
You can skip at most 4000 records. To indicate a result range that starts, for example, at 1001, combine the $skip with the $top parameter.
If not specified, no records are skipped.
Refer also to the $top parameter. (optional) (default to 0)
$top = 56 # Integer | Specify the number of records you want to show.
You can get at most 1000 records per API call. To indicate a result range that starts, for example, at 1001, combine the $top with the $skip parameter.
If not specified, 100 records are returned.
Refer also to the $skip parameter. (optional) (default to 100)
$inlinecount = $inlinecount_example # String | Specify whether the total count of the form definitions should be returned as the value of the X-Total-Count response header.
To enable the header, use the 'allpages' setting. To disable the header, use the 'none' setting. The values are case-sensitive. (optional) (default to none)
type = type_example # String | Specify whether the response should be filtered by the form type. The values are case-sensitive. (optional)

try: 
    # Retrieve all form definitions
    api_response = api_instance.v1FormsGet($skip=$skip, $top=$top, $inlinecount=$inlinecount, type=type)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling FormsApi->v1FormsGet: %s\n" % e)

Parameters

Query parameters
Name Description
$skip
$top
$inlinecount
type

Responses

Status: 200 - Returns a list of deployed form definitions.

[{id=com.sap.bpm.demo.LeaveRequestForm, name=Leave Request Form, version=4, revision=Release, type=start, createdBy=UserId1, createdAt=2018-05-09T11:42:27.524Z, workflowDefinitions=[{id=LeaveRequestWorkflow}]}, {id=com.sap.bpm.demo.LeaveRequestForm, name=Leave Request Form, version=2, revision=Draft, type=start, createdBy=UserId1, createdAt=2018-05-06T14:32:24.324Z, workflowDefinitions=[{id=LeaveRequestWorkflow}]}, {id=com.sap.bpm.demo.OrderingForm, name=Ordering Form, version=3, revision=1.0, type=task, createdBy=UserId13, createdAt=2018-05-04T23:07:04.003Z}]

Status: 401 - Unauthorized. You have not provided valid authentication credentials to access the resource.

{error=unauthorized, error_description=Full authentication is required to access this resource.}

Status: 403 - Access forbidden. You have not the required permissions to access the resource.

{error={message=User does not have sufficient privileges.}}

Status: 429 - You have reached the usage limits that are configured for your tenant. You are performing too many requests or consume too many resources.

{error={code=bpm.workflowruntime.rate.limit.exceeded, message=Your tenant is performing too many requests.}}

Status: 500 - Internal server error. The operation you requested led to an error during execution.

{error={code=bpm.workflowruntime.rest.internal.server.error, message=Internal server error, logId=f29a5719-3342-4a4a-8a3d-5ddd5253159e}}

Jobs

/v1/jobs/{jobId}

Tracks the status of API requests, which the server executed asynchronously. Roles permitted to execute this operation: - Global roles: WorkflowTenantOperator - Scope: JOB_STATUS_GET


/v1/jobs/{jobId}

Usage

curl -X GET "https://sandbox.api.sap.com/workflow-service/rest/v1/jobs/{jobId}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.JobsApi;

import java.io.File;
import java.util.*;

public class JobsApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        
        // Configure OAuth2 access token for authorization: Oauth2_AuthorizationCode
        OAuth Oauth2_AuthorizationCode = (OAuth) defaultClient.getAuthentication("Oauth2_AuthorizationCode");
        Oauth2_AuthorizationCode.setAccessToken("YOUR ACCESS TOKEN");

        // Configure OAuth2 access token for authorization: Oauth2_ClientCredentials
        OAuth Oauth2_ClientCredentials = (OAuth) defaultClient.getAuthentication("Oauth2_ClientCredentials");
        Oauth2_ClientCredentials.setAccessToken("YOUR ACCESS TOKEN");

        JobsApi apiInstance = new JobsApi();
        String jobId = jobId_example; // String | The ID of the job for which you check the status.
Typically, the ID has been retrieved from another API request that was processed asynchronously.
The ID is at most 36 characters long.
        try {
            Job result = apiInstance.v1JobsJobIdGet(jobId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling JobsApi#v1JobsJobIdGet");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.JobsApi;

public class JobsApiExample {

    public static void main(String[] args) {
        JobsApi apiInstance = new JobsApi();
        String jobId = jobId_example; // String | The ID of the job for which you check the status.
Typically, the ID has been retrieved from another API request that was processed asynchronously.
The ID is at most 36 characters long.
        try {
            Job result = apiInstance.v1JobsJobIdGet(jobId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling JobsApi#v1JobsJobIdGet");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure OAuth2 access token for authorization: (authentication scheme: Oauth2_AuthorizationCode)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];

// Configure OAuth2 access token for authorization: (authentication scheme: Oauth2_ClientCredentials)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];

String *jobId = jobId_example; // The ID of the job for which you check the status.
Typically, the ID has been retrieved from another API request that was processed asynchronously.
The ID is at most 36 characters long.

JobsApi *apiInstance = [[JobsApi alloc] init];

// Retrieve Job status
[apiInstance v1JobsJobIdGetWith:jobId
              completionHandler: ^(Job output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var WorkflowApiForCloudFoundry = require('workflow_api_for_cloud_foundry');
var defaultClient = WorkflowApiForCloudFoundry.ApiClient.instance;

// Configure OAuth2 access token for authorization: Oauth2_AuthorizationCode
var Oauth2_AuthorizationCode = defaultClient.authentications['Oauth2_AuthorizationCode'];
Oauth2_AuthorizationCode.accessToken = "YOUR ACCESS TOKEN"

// Configure OAuth2 access token for authorization: Oauth2_ClientCredentials
var Oauth2_ClientCredentials = defaultClient.authentications['Oauth2_ClientCredentials'];
Oauth2_ClientCredentials.accessToken = "YOUR ACCESS TOKEN"

var api = new WorkflowApiForCloudFoundry.JobsApi()

var jobId = jobId_example; // {String} The ID of the job for which you check the status.
Typically, the ID has been retrieved from another API request that was processed asynchronously.
The ID is at most 36 characters long.


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.v1JobsJobIdGet(jobId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class v1JobsJobIdGetExample
    {
        public void main()
        {
            
            // Configure OAuth2 access token for authorization: Oauth2_AuthorizationCode
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
            // Configure OAuth2 access token for authorization: Oauth2_ClientCredentials
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new JobsApi();
            var jobId = jobId_example;  // String | The ID of the job for which you check the status.
Typically, the ID has been retrieved from another API request that was processed asynchronously.
The ID is at most 36 characters long.

            try
            {
                // Retrieve Job status
                Job result = apiInstance.v1JobsJobIdGet(jobId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling JobsApi.v1JobsJobIdGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: Oauth2_AuthorizationCode
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
// Configure OAuth2 access token for authorization: Oauth2_ClientCredentials
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new Swagger\Client\Api\JobsApi();
$jobId = jobId_example; // String | The ID of the job for which you check the status.
Typically, the ID has been retrieved from another API request that was processed asynchronously.
The ID is at most 36 characters long.

try {
    $result = $api_instance->v1JobsJobIdGet($jobId);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling JobsApi->v1JobsJobIdGet: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::JobsApi;

# Configure OAuth2 access token for authorization: Oauth2_AuthorizationCode
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
# Configure OAuth2 access token for authorization: Oauth2_ClientCredentials
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::SwaggerClient::JobsApi->new();
my $jobId = jobId_example; # String | The ID of the job for which you check the status.
Typically, the ID has been retrieved from another API request that was processed asynchronously.
The ID is at most 36 characters long.

eval { 
    my $result = $api_instance->v1JobsJobIdGet(jobId => $jobId);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling JobsApi->v1JobsJobIdGet: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: Oauth2_AuthorizationCode
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure OAuth2 access token for authorization: Oauth2_ClientCredentials
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.JobsApi()
jobId = jobId_example # String | The ID of the job for which you check the status.
Typically, the ID has been retrieved from another API request that was processed asynchronously.
The ID is at most 36 characters long.

try: 
    # Retrieve Job status
    api_response = api_instance.v1JobsJobIdGet(jobId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling JobsApi->v1JobsJobIdGet: %s\n" % e)

Parameters

Path parameters
Name Description
jobId*

Responses

Status: 200 - Returns the status of the job

{status=ERRONEOUS, details={instancesInitial=432, instancesLeft=89}, error={code=bpm.workflowruntime.scheduler.error, message=An unspecified error occurred. Contact support citing logId af07a8d9-f899-4ed8-abb2-7667bf2ae53d and provide steps to reproduce., logId=af07a8d9-f899-4ed8-abb2-7667bf2ae53d}}

Status: 401 - Unauthorized. You have not provided valid authentication credentials to access the resource.

{error=unauthorized, error_description=Full authentication is required to access this resource.}

Status: 404 - Job not found. You may have provided an incorrect job ID or the job may have already completed.

{error={code=bpm.workflowruntime.rest.job.not.found, message=Job not found, logId=dc68239e-3ad4-442a-8343-cc197f69d05f}}

Status: 429 - You have reached the usage limits that are configured for your tenant. You are performing too many requests or consume too many resources.

{error={code=bpm.workflowruntime.rate.limit.exceeded, message=Your tenant is performing too many requests.}}

Messages

/v1/messages

Sends a message to a set of workflow instances for consumption in intermediate message events. The message is identified by the name specified in the workflow model (request body parameter 'definitionId') and parameters identifying the workflow instances that should consume the message. The message is consumed by the workflow instances that match the following criteria: * The instance can be a specific match when using its workflow instance ID (request body parameter 'workflowInstanceId'). Or the instance is a generic match when using the ID of the workflow model together with the business key (request body parameters 'workflowDefinitionId' respectively 'businessKey'). You can either use the specific or generic match but not both in the same call. * The workflow instance is not in the SUSPENDED state. * The workflow instance currently waits at the intermediate message event referring to the specified message. The business key of a workflow instance matches if the business key specified in the request body is the same. Roles permitted to execute this operation: - Global roles: WorkflowMessageSender - Scope: MESSAGE_SEND


/v1/messages

Usage

curl -X POST "https://sandbox.api.sap.com/workflow-service/rest/v1/messages"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.MessagesApi;

import java.io.File;
import java.util.*;

public class MessagesApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        
        // Configure OAuth2 access token for authorization: Oauth2_AuthorizationCode
        OAuth Oauth2_AuthorizationCode = (OAuth) defaultClient.getAuthentication("Oauth2_AuthorizationCode");
        Oauth2_AuthorizationCode.setAccessToken("YOUR ACCESS TOKEN");

        // Configure OAuth2 access token for authorization: Oauth2_ClientCredentials
        OAuth Oauth2_ClientCredentials = (OAuth) defaultClient.getAuthentication("Oauth2_ClientCredentials");
        Oauth2_ClientCredentials.setAccessToken("YOUR ACCESS TOKEN");

        MessagesApi apiInstance = new MessagesApi();
        SendMessagePayload body = ; // SendMessagePayload | Specify the request body according to the given schema.
The length of the request body is limited to ensure optimal operation of the service.
        try {
            array[ConsumingWorkflowInstance] result = apiInstance.v1MessagesPost(body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling MessagesApi#v1MessagesPost");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.MessagesApi;

public class MessagesApiExample {

    public static void main(String[] args) {
        MessagesApi apiInstance = new MessagesApi();
        SendMessagePayload body = ; // SendMessagePayload | Specify the request body according to the given schema.
The length of the request body is limited to ensure optimal operation of the service.
        try {
            array[ConsumingWorkflowInstance] result = apiInstance.v1MessagesPost(body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling MessagesApi#v1MessagesPost");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure OAuth2 access token for authorization: (authentication scheme: Oauth2_AuthorizationCode)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];

// Configure OAuth2 access token for authorization: (authentication scheme: Oauth2_ClientCredentials)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];

SendMessagePayload *body = ; // Specify the request body according to the given schema.
The length of the request body is limited to ensure optimal operation of the service.

MessagesApi *apiInstance = [[MessagesApi alloc] init];

// Send message
[apiInstance v1MessagesPostWith:body
              completionHandler: ^(array[ConsumingWorkflowInstance] output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var WorkflowApiForCloudFoundry = require('workflow_api_for_cloud_foundry');
var defaultClient = WorkflowApiForCloudFoundry.ApiClient.instance;

// Configure OAuth2 access token for authorization: Oauth2_AuthorizationCode
var Oauth2_AuthorizationCode = defaultClient.authentications['Oauth2_AuthorizationCode'];
Oauth2_AuthorizationCode.accessToken = "YOUR ACCESS TOKEN"

// Configure OAuth2 access token for authorization: Oauth2_ClientCredentials
var Oauth2_ClientCredentials = defaultClient.authentications['Oauth2_ClientCredentials'];
Oauth2_ClientCredentials.accessToken = "YOUR ACCESS TOKEN"

var api = new WorkflowApiForCloudFoundry.MessagesApi()

var body = ; // {SendMessagePayload} Specify the request body according to the given schema.
The length of the request body is limited to ensure optimal operation of the service.


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.v1MessagesPost(body, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class v1MessagesPostExample
    {
        public void main()
        {
            
            // Configure OAuth2 access token for authorization: Oauth2_AuthorizationCode
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
            // Configure OAuth2 access token for authorization: Oauth2_ClientCredentials
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new MessagesApi();
            var body = new SendMessagePayload(); // SendMessagePayload | Specify the request body according to the given schema.
The length of the request body is limited to ensure optimal operation of the service.

            try
            {
                // Send message
                array[ConsumingWorkflowInstance] result = apiInstance.v1MessagesPost(body);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling MessagesApi.v1MessagesPost: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: Oauth2_AuthorizationCode
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
// Configure OAuth2 access token for authorization: Oauth2_ClientCredentials
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new Swagger\Client\Api\MessagesApi();
$body = ; // SendMessagePayload | Specify the request body according to the given schema.
The length of the request body is limited to ensure optimal operation of the service.

try {
    $result = $api_instance->v1MessagesPost($body);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling MessagesApi->v1MessagesPost: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::MessagesApi;

# Configure OAuth2 access token for authorization: Oauth2_AuthorizationCode
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
# Configure OAuth2 access token for authorization: Oauth2_ClientCredentials
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::SwaggerClient::MessagesApi->new();
my $body = WWW::SwaggerClient::Object::SendMessagePayload->new(); # SendMessagePayload | Specify the request body according to the given schema.
The length of the request body is limited to ensure optimal operation of the service.

eval { 
    my $result = $api_instance->v1MessagesPost(body => $body);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling MessagesApi->v1MessagesPost: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: Oauth2_AuthorizationCode
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure OAuth2 access token for authorization: Oauth2_ClientCredentials
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.MessagesApi()
body =  # SendMessagePayload | Specify the request body according to the given schema.
The length of the request body is limited to ensure optimal operation of the service.

try: 
    # Send message
    api_response = api_instance.v1MessagesPost(body)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling MessagesApi->v1MessagesPost: %s\n" % e)

Parameters

Body parameters
Name Description
body *

Specify the request body according to the given schema. The length of the request body is limited to ensure optimal operation of the service.

Responses

Status: 200 - Returns a list of workflow instance IDs that consumed the message.

[{id=c4f2-4066-0ba1-ee8393107bc2}, {id=fef2-5066-1ba1-fe8393107ef5}]

Status: 401 - Unauthorized. You have not provided valid authentication credentials to access the resource.

{error=unauthorized, error_description=Full authentication is required to access this resource.}

Status: 403 - Access forbidden. You have not the required permissions to access the resource.

{error={message=User does not have sufficient privileges.}}

Status: 409 - The operation could not be executed because of another activity in the background. Please try again later.

{error={message=The operation could not be executed because of another activity in the background. Please try again later., logId=04a14146-dea3-493f-892c-3cb1dea7b122}}

Status: 422 - The message was not consumed by the intermediate message event. Please see the messages API to verify that your message meets the requirements for successful consumption.

{error={code=bpm.workflowruntime.rest.message.no.match, message=No matching workflow instance found for message, logId=dc68239e-3ad4-442a-8343-cc197f69d05f}}

Status: 429 - You have reached the usage limits that are configured for your tenant. You are performing too many requests or consume too many resources.

{error={code=bpm.workflowruntime.rate.limit.exceeded, message=Your tenant is performing too many requests.}}

Status: 500 - Internal server error. The operation you requested led to an error during execution.

{error={code=bpm.workflowruntime.rest.internal.server.error, message=Internal server error, logId=f29a5719-3342-4a4a-8a3d-5ddd5253159e}}

Purge

/v1/purge

Completely erases all workflow definitions, all workflow instances, and all form definitions. Roles permitted to execute this operation: - Global roles: WorkflowTenantOperator - Scope: DATA_PURGE


/v1/purge

Usage

curl -X POST "https://sandbox.api.sap.com/workflow-service/rest/v1/purge"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.PurgeApi;

import java.io.File;
import java.util.*;

public class PurgeApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        
        // Configure OAuth2 access token for authorization: Oauth2_AuthorizationCode
        OAuth Oauth2_AuthorizationCode = (OAuth) defaultClient.getAuthentication("Oauth2_AuthorizationCode");
        Oauth2_AuthorizationCode.setAccessToken("YOUR ACCESS TOKEN");

        // Configure OAuth2 access token for authorization: Oauth2_ClientCredentials
        OAuth Oauth2_ClientCredentials = (OAuth) defaultClient.getAuthentication("Oauth2_ClientCredentials");
        Oauth2_ClientCredentials.setAccessToken("YOUR ACCESS TOKEN");

        PurgeApi apiInstance = new PurgeApi();
        try {
            apiInstance.v1PurgePost();
        } catch (ApiException e) {
            System.err.println("Exception when calling PurgeApi#v1PurgePost");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.PurgeApi;

public class PurgeApiExample {

    public static void main(String[] args) {
        PurgeApi apiInstance = new PurgeApi();
        try {
            apiInstance.v1PurgePost();
        } catch (ApiException e) {
            System.err.println("Exception when calling PurgeApi#v1PurgePost");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure OAuth2 access token for authorization: (authentication scheme: Oauth2_AuthorizationCode)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];

// Configure OAuth2 access token for authorization: (authentication scheme: Oauth2_ClientCredentials)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];


PurgeApi *apiInstance = [[PurgeApi alloc] init];

// Purge instances and definitions
[apiInstance v1PurgePostWithCompletionHandler: 
              ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var WorkflowApiForCloudFoundry = require('workflow_api_for_cloud_foundry');
var defaultClient = WorkflowApiForCloudFoundry.ApiClient.instance;

// Configure OAuth2 access token for authorization: Oauth2_AuthorizationCode
var Oauth2_AuthorizationCode = defaultClient.authentications['Oauth2_AuthorizationCode'];
Oauth2_AuthorizationCode.accessToken = "YOUR ACCESS TOKEN"

// Configure OAuth2 access token for authorization: Oauth2_ClientCredentials
var Oauth2_ClientCredentials = defaultClient.authentications['Oauth2_ClientCredentials'];
Oauth2_ClientCredentials.accessToken = "YOUR ACCESS TOKEN"

var api = new WorkflowApiForCloudFoundry.PurgeApi()

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.v1PurgePost(callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class v1PurgePostExample
    {
        public void main()
        {
            
            // Configure OAuth2 access token for authorization: Oauth2_AuthorizationCode
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
            // Configure OAuth2 access token for authorization: Oauth2_ClientCredentials
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new PurgeApi();

            try
            {
                // Purge instances and definitions
                apiInstance.v1PurgePost();
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling PurgeApi.v1PurgePost: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: Oauth2_AuthorizationCode
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
// Configure OAuth2 access token for authorization: Oauth2_ClientCredentials
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new Swagger\Client\Api\PurgeApi();

try {
    $api_instance->v1PurgePost();
} catch (Exception $e) {
    echo 'Exception when calling PurgeApi->v1PurgePost: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::PurgeApi;

# Configure OAuth2 access token for authorization: Oauth2_AuthorizationCode
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
# Configure OAuth2 access token for authorization: Oauth2_ClientCredentials
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::SwaggerClient::PurgeApi->new();

eval { 
    $api_instance->v1PurgePost();
};
if ($@) {
    warn "Exception when calling PurgeApi->v1PurgePost: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: Oauth2_AuthorizationCode
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure OAuth2 access token for authorization: Oauth2_ClientCredentials
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.PurgeApi()

try: 
    # Purge instances and definitions
    api_instance.v1PurgePost()
except ApiException as e:
    print("Exception when calling PurgeApi->v1PurgePost: %s\n" % e)

Parameters

Responses

Status: 202 - The request is successful and the purge operation will be performed asynchronously. The response will include the header 'Location' that points to a dedicated resource. You can use this resource to track the status of the purge operation.

Name Type Format Description
Location String Relative URL that points to a job resource. Use this resource to track the status of the purge operation.

Status: 303 - A purge operation is already running. The response will include the header 'Location' that points to a job resource which you can use to track the status of the purge operation. Depending on your web client you may be automatically redirected to this resource and receive the status of the purge operation as the result of your request.

Name Type Format Description
Location String Relative URL that points to a job resource. Using this resource you can track the status of the purge operation.

Status: 401 - Unauthorized. You have not provided valid authentication credentials to access the resource.

{error=unauthorized, error_description=Full authentication is required to access this resource.}

Status: 403 - Access forbidden. You have not the required permissions to access the resource.

{error={message=User does not have sufficient privileges.}}

Status: 429 - You have reached the usage limits that are configured for your tenant. You are performing too many requests or consume too many resources.

{error={code=bpm.workflowruntime.rate.limit.exceeded, message=Your tenant is performing too many requests.}}

Status: 500 - Internal server error. The operation you requested led to an error during execution.

{error={code=bpm.workflowruntime.rest.internal.server.error, message=Internal server error, logId=f29a5719-3342-4a4a-8a3d-5ddd5253159e}}

TaskDefinitions

/v1/task-definitions

Retrieves task definitions by query parameters. A task definition is identified by the ID of the respective activity within a workflow definition (for example, usertask1) and the workflow definition ID. The workflow definition ID is version independent. That means, this API assumes that task definitions are semantically the same if they span several workflow versions and therefore have the same identifier. The latest workflow definition version is expected to contain the leading property values of the task definition. At the moment, filtering is limited to the $skip and $top parameters for paging through the available task definitions. The returned task definitions are sorted in descending order of their creation time. Roles permitted to execute this operation: - Global roles: WorkflowViewer, WorkflowAdmin - Scope: TASK_DEFINITION_GET


/v1/task-definitions

Usage

curl -X GET "https://sandbox.api.sap.com/workflow-service/rest/v1/task-definitions?$skip=&$top=&$inlinecount=&$expand="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.TaskDefinitionsApi;

import java.io.File;
import java.util.*;

public class TaskDefinitionsApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        
        // Configure OAuth2 access token for authorization: Oauth2_AuthorizationCode
        OAuth Oauth2_AuthorizationCode = (OAuth) defaultClient.getAuthentication("Oauth2_AuthorizationCode");
        Oauth2_AuthorizationCode.setAccessToken("YOUR ACCESS TOKEN");

        // Configure OAuth2 access token for authorization: Oauth2_ClientCredentials
        OAuth Oauth2_ClientCredentials = (OAuth) defaultClient.getAuthentication("Oauth2_ClientCredentials");
        Oauth2_ClientCredentials.setAccessToken("YOUR ACCESS TOKEN");

        TaskDefinitionsApi apiInstance = new TaskDefinitionsApi();
        String acceptLanguage = acceptLanguage_example; // String | Provide a preferred language. If a translation is available, relevant texts are returned in this language.
        Integer $skip = 56; // Integer | The number of records you want to skip from the beginning.
You can skip at most 4000 records. To indicate a result range that starts, for example, at 1001, combine the $skip with the $top parameter.
If not specified, no records are skipped. You can use this parameter only once.
Refer also to the $top parameter.
        Integer $top = 56; // Integer | The number of records you want to show.
You can get at most 1000 records per API call. To indicate a result range that starts, for example, at 1001, combine the $top with the $skip parameter.
If not specified, 100 records are returned. You can use this parameter only once.
Refer also to the $skip parameter.
        String $inlinecount = $inlinecount_example; // String | Specify whether the total count of the task definitions should be returned as a value of the X-Total-Count response header.
To enable the header, use the 'allpages' setting. To disable the header, use the 'none' setting.
The values are case-sensitive. You can use this parameter only once.
        String $expand = $expand_example; // String | You can request custom task attributes to become part of the task output by specifying the value 'attributeDefinitions' for the '$expand' parameter.
Otherwise, if the '$expand' parameter is not specified, the 'attributeDefinitions' field is not included into the output. Note that labels as well as the order of the custom task attributes in which they are returned, are taken from the latest versions of the workflow definitions where the corresponding task definition exists.
        try {
            TaskDefinitionList result = apiInstance.v1TaskDefinitionsGet(acceptLanguage, $skip, $top, $inlinecount, $expand);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling TaskDefinitionsApi#v1TaskDefinitionsGet");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.TaskDefinitionsApi;

public class TaskDefinitionsApiExample {

    public static void main(String[] args) {
        TaskDefinitionsApi apiInstance = new TaskDefinitionsApi();
        String acceptLanguage = acceptLanguage_example; // String | Provide a preferred language. If a translation is available, relevant texts are returned in this language.
        Integer $skip = 56; // Integer | The number of records you want to skip from the beginning.
You can skip at most 4000 records. To indicate a result range that starts, for example, at 1001, combine the $skip with the $top parameter.
If not specified, no records are skipped. You can use this parameter only once.
Refer also to the $top parameter.
        Integer $top = 56; // Integer | The number of records you want to show.
You can get at most 1000 records per API call. To indicate a result range that starts, for example, at 1001, combine the $top with the $skip parameter.
If not specified, 100 records are returned. You can use this parameter only once.
Refer also to the $skip parameter.
        String $inlinecount = $inlinecount_example; // String | Specify whether the total count of the task definitions should be returned as a value of the X-Total-Count response header.
To enable the header, use the 'allpages' setting. To disable the header, use the 'none' setting.
The values are case-sensitive. You can use this parameter only once.
        String $expand = $expand_example; // String | You can request custom task attributes to become part of the task output by specifying the value 'attributeDefinitions' for the '$expand' parameter.
Otherwise, if the '$expand' parameter is not specified, the 'attributeDefinitions' field is not included into the output. Note that labels as well as the order of the custom task attributes in which they are returned, are taken from the latest versions of the workflow definitions where the corresponding task definition exists.
        try {
            TaskDefinitionList result = apiInstance.v1TaskDefinitionsGet(acceptLanguage, $skip, $top, $inlinecount, $expand);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling TaskDefinitionsApi#v1TaskDefinitionsGet");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure OAuth2 access token for authorization: (authentication scheme: Oauth2_AuthorizationCode)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];

// Configure OAuth2 access token for authorization: (authentication scheme: Oauth2_ClientCredentials)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];

String *acceptLanguage = acceptLanguage_example; // Provide a preferred language. If a translation is available, relevant texts are returned in this language. (optional)
Integer *$skip = 56; // The number of records you want to skip from the beginning.
You can skip at most 4000 records. To indicate a result range that starts, for example, at 1001, combine the $skip with the $top parameter.
If not specified, no records are skipped. You can use this parameter only once.
Refer also to the $top parameter. (optional) (default to 0)
Integer *$top = 56; // The number of records you want to show.
You can get at most 1000 records per API call. To indicate a result range that starts, for example, at 1001, combine the $top with the $skip parameter.
If not specified, 100 records are returned. You can use this parameter only once.
Refer also to the $skip parameter. (optional) (default to 100)
String *$inlinecount = $inlinecount_example; // Specify whether the total count of the task definitions should be returned as a value of the X-Total-Count response header.
To enable the header, use the 'allpages' setting. To disable the header, use the 'none' setting.
The values are case-sensitive. You can use this parameter only once. (optional) (default to none)
String *$expand = $expand_example; // You can request custom task attributes to become part of the task output by specifying the value 'attributeDefinitions' for the '$expand' parameter.
Otherwise, if the '$expand' parameter is not specified, the 'attributeDefinitions' field is not included into the output. Note that labels as well as the order of the custom task attributes in which they are returned, are taken from the latest versions of the workflow definitions where the corresponding task definition exists. (optional)

TaskDefinitionsApi *apiInstance = [[TaskDefinitionsApi alloc] init];

// Retrieve definitions by query parameters
[apiInstance v1TaskDefinitionsGetWith:acceptLanguage
    $skip:$skip
    $top:$top
    $inlinecount:$inlinecount
    $expand:$expand
              completionHandler: ^(TaskDefinitionList output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var WorkflowApiForCloudFoundry = require('workflow_api_for_cloud_foundry');
var defaultClient = WorkflowApiForCloudFoundry.ApiClient.instance;

// Configure OAuth2 access token for authorization: Oauth2_AuthorizationCode
var Oauth2_AuthorizationCode = defaultClient.authentications['Oauth2_AuthorizationCode'];
Oauth2_AuthorizationCode.accessToken = "YOUR ACCESS TOKEN"

// Configure OAuth2 access token for authorization: Oauth2_ClientCredentials
var Oauth2_ClientCredentials = defaultClient.authentications['Oauth2_ClientCredentials'];
Oauth2_ClientCredentials.accessToken = "YOUR ACCESS TOKEN"

var api = new WorkflowApiForCloudFoundry.TaskDefinitionsApi()

var opts = { 
  'acceptLanguage': acceptLanguage_example, // {String} Provide a preferred language. If a translation is available, relevant texts are returned in this language.
  '$skip': 56, // {Integer} The number of records you want to skip from the beginning.
You can skip at most 4000 records. To indicate a result range that starts, for example, at 1001, combine the $skip with the $top parameter.
If not specified, no records are skipped. You can use this parameter only once.
Refer also to the $top parameter.
  '$top': 56, // {Integer} The number of records you want to show.
You can get at most 1000 records per API call. To indicate a result range that starts, for example, at 1001, combine the $top with the $skip parameter.
If not specified, 100 records are returned. You can use this parameter only once.
Refer also to the $skip parameter.
  '$inlinecount': $inlinecount_example, // {String} Specify whether the total count of the task definitions should be returned as a value of the X-Total-Count response header.
To enable the header, use the 'allpages' setting. To disable the header, use the 'none' setting.
The values are case-sensitive. You can use this parameter only once.
  '$expand': $expand_example // {String} You can request custom task attributes to become part of the task output by specifying the value 'attributeDefinitions' for the '$expand' parameter.
Otherwise, if the '$expand' parameter is not specified, the 'attributeDefinitions' field is not included into the output. Note that labels as well as the order of the custom task attributes in which they are returned, are taken from the latest versions of the workflow definitions where the corresponding task definition exists.
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.v1TaskDefinitionsGet(opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class v1TaskDefinitionsGetExample
    {
        public void main()
        {
            
            // Configure OAuth2 access token for authorization: Oauth2_AuthorizationCode
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
            // Configure OAuth2 access token for authorization: Oauth2_ClientCredentials
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new TaskDefinitionsApi();
            var acceptLanguage = acceptLanguage_example;  // String | Provide a preferred language. If a translation is available, relevant texts are returned in this language. (optional) 
            var $skip = 56;  // Integer | The number of records you want to skip from the beginning.
You can skip at most 4000 records. To indicate a result range that starts, for example, at 1001, combine the $skip with the $top parameter.
If not specified, no records are skipped. You can use this parameter only once.
Refer also to the $top parameter. (optional)  (default to 0)
            var $top = 56;  // Integer | The number of records you want to show.
You can get at most 1000 records per API call. To indicate a result range that starts, for example, at 1001, combine the $top with the $skip parameter.
If not specified, 100 records are returned. You can use this parameter only once.
Refer also to the $skip parameter. (optional)  (default to 100)
            var $inlinecount = $inlinecount_example;  // String | Specify whether the total count of the task definitions should be returned as a value of the X-Total-Count response header.
To enable the header, use the 'allpages' setting. To disable the header, use the 'none' setting.
The values are case-sensitive. You can use this parameter only once. (optional)  (default to none)
            var $expand = $expand_example;  // String | You can request custom task attributes to become part of the task output by specifying the value 'attributeDefinitions' for the '$expand' parameter.
Otherwise, if the '$expand' parameter is not specified, the 'attributeDefinitions' field is not included into the output. Note that labels as well as the order of the custom task attributes in which they are returned, are taken from the latest versions of the workflow definitions where the corresponding task definition exists. (optional) 

            try
            {
                // Retrieve definitions by query parameters
                TaskDefinitionList result = apiInstance.v1TaskDefinitionsGet(acceptLanguage, $skip, $top, $inlinecount, $expand);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling TaskDefinitionsApi.v1TaskDefinitionsGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: Oauth2_AuthorizationCode
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
// Configure OAuth2 access token for authorization: Oauth2_ClientCredentials
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new Swagger\Client\Api\TaskDefinitionsApi();
$acceptLanguage = acceptLanguage_example; // String | Provide a preferred language. If a translation is available, relevant texts are returned in this language.
$$skip = 56; // Integer | The number of records you want to skip from the beginning.
You can skip at most 4000 records. To indicate a result range that starts, for example, at 1001, combine the $skip with the $top parameter.
If not specified, no records are skipped. You can use this parameter only once.
Refer also to the $top parameter.
$$top = 56; // Integer | The number of records you want to show.
You can get at most 1000 records per API call. To indicate a result range that starts, for example, at 1001, combine the $top with the $skip parameter.
If not specified, 100 records are returned. You can use this parameter only once.
Refer also to the $skip parameter.
$$inlinecount = $inlinecount_example; // String | Specify whether the total count of the task definitions should be returned as a value of the X-Total-Count response header.
To enable the header, use the 'allpages' setting. To disable the header, use the 'none' setting.
The values are case-sensitive. You can use this parameter only once.
$$expand = $expand_example; // String | You can request custom task attributes to become part of the task output by specifying the value 'attributeDefinitions' for the '$expand' parameter.
Otherwise, if the '$expand' parameter is not specified, the 'attributeDefinitions' field is not included into the output. Note that labels as well as the order of the custom task attributes in which they are returned, are taken from the latest versions of the workflow definitions where the corresponding task definition exists.

try {
    $result = $api_instance->v1TaskDefinitionsGet($acceptLanguage, $$skip, $$top, $$inlinecount, $$expand);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling TaskDefinitionsApi->v1TaskDefinitionsGet: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::TaskDefinitionsApi;

# Configure OAuth2 access token for authorization: Oauth2_AuthorizationCode
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
# Configure OAuth2 access token for authorization: Oauth2_ClientCredentials
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::SwaggerClient::TaskDefinitionsApi->new();
my $acceptLanguage = acceptLanguage_example; # String | Provide a preferred language. If a translation is available, relevant texts are returned in this language.
my $$skip = 56; # Integer | The number of records you want to skip from the beginning.
You can skip at most 4000 records. To indicate a result range that starts, for example, at 1001, combine the $skip with the $top parameter.
If not specified, no records are skipped. You can use this parameter only once.
Refer also to the $top parameter.
my $$top = 56; # Integer | The number of records you want to show.
You can get at most 1000 records per API call. To indicate a result range that starts, for example, at 1001, combine the $top with the $skip parameter.
If not specified, 100 records are returned. You can use this parameter only once.
Refer also to the $skip parameter.
my $$inlinecount = $inlinecount_example; # String | Specify whether the total count of the task definitions should be returned as a value of the X-Total-Count response header.
To enable the header, use the 'allpages' setting. To disable the header, use the 'none' setting.
The values are case-sensitive. You can use this parameter only once.
my $$expand = $expand_example; # String | You can request custom task attributes to become part of the task output by specifying the value 'attributeDefinitions' for the '$expand' parameter.
Otherwise, if the '$expand' parameter is not specified, the 'attributeDefinitions' field is not included into the output. Note that labels as well as the order of the custom task attributes in which they are returned, are taken from the latest versions of the workflow definitions where the corresponding task definition exists.

eval { 
    my $result = $api_instance->v1TaskDefinitionsGet(acceptLanguage => $acceptLanguage, $skip => $$skip, $top => $$top, $inlinecount => $$inlinecount, $expand => $$expand);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling TaskDefinitionsApi->v1TaskDefinitionsGet: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: Oauth2_AuthorizationCode
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure OAuth2 access token for authorization: Oauth2_ClientCredentials
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.TaskDefinitionsApi()
acceptLanguage = acceptLanguage_example # String | Provide a preferred language. If a translation is available, relevant texts are returned in this language. (optional)
$skip = 56 # Integer | The number of records you want to skip from the beginning.
You can skip at most 4000 records. To indicate a result range that starts, for example, at 1001, combine the $skip with the $top parameter.
If not specified, no records are skipped. You can use this parameter only once.
Refer also to the $top parameter. (optional) (default to 0)
$top = 56 # Integer | The number of records you want to show.
You can get at most 1000 records per API call. To indicate a result range that starts, for example, at 1001, combine the $top with the $skip parameter.
If not specified, 100 records are returned. You can use this parameter only once.
Refer also to the $skip parameter. (optional) (default to 100)
$inlinecount = $inlinecount_example # String | Specify whether the total count of the task definitions should be returned as a value of the X-Total-Count response header.
To enable the header, use the 'allpages' setting. To disable the header, use the 'none' setting.
The values are case-sensitive. You can use this parameter only once. (optional) (default to none)
$expand = $expand_example # String | You can request custom task attributes to become part of the task output by specifying the value 'attributeDefinitions' for the '$expand' parameter.
Otherwise, if the '$expand' parameter is not specified, the 'attributeDefinitions' field is not included into the output. Note that labels as well as the order of the custom task attributes in which they are returned, are taken from the latest versions of the workflow definitions where the corresponding task definition exists. (optional)

try: 
    # Retrieve definitions by query parameters
    api_response = api_instance.v1TaskDefinitionsGet(acceptLanguage=acceptLanguage, $skip=$skip, $top=$top, $inlinecount=$inlinecount, $expand=$expand)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling TaskDefinitionsApi->v1TaskDefinitionsGet: %s\n" % e)

Parameters

Header parameters
Name Description
Accept-Language
Query parameters
Name Description
$skip
$top
$inlinecount
$expand

Responses

Status: 200 - Returns a list of task definitions.

[{id=usertask1@myfirstworkflow, name=Approve Onboarding, createdAt=2017-03-08T17:26:51.643Z}, {id=usertask2@myfirstworkflow, name=Confirm Equipment of Onboardee, createdAt=2017-03-08T17:26:51.643Z}]

Status: 400 - Incorrect format or structure of the provided request body.

{error={code=bpm.workflowruntime.rest.content.format.invalid, message=Unable to parse the request content because it has an unexpected format or structure. The content has to be JSON and follow the documented data structure., logId=e329b2a4-cac7-44d7-b5c5-0494e6fbad5a}}

Status: 401 - Unauthorized. You have not provided valid authentication credentials to access the resource.

{error=unauthorized, error_description=Full authentication is required to access this resource.}

Status: 403 - Access forbidden. You have not the required permissions to access the resource.

{error={message=User does not have sufficient privileges.}}

Status: 429 - You have reached the usage limits that are configured for your tenant. You are performing too many requests or consume too many resources.

{error={code=bpm.workflowruntime.rate.limit.exceeded, message=Your tenant is performing too many requests.}}

Status: 500 - Internal server error. The operation you requested led to an error during execution.

{error={code=bpm.workflowruntime.rest.internal.server.error, message=Internal server error, logId=f29a5719-3342-4a4a-8a3d-5ddd5253159e}}

UserTaskInstances

/v1/task-instances

Retrieves user task instances by parameters. If no parameters are specified, all instances with status READY, RESERVED, CANCELED, or COMPLETED are returned. Parameters for different attributes of the instance are evaluated using the logical 'and' operator. If a parameter is specified multiple times, results are matched using the logical 'or' operator, unless noted otherwise. Empty parameters are treated as if they were not specified. By default, returned tasks are sorted by creation time in ascending order. Roles permitted to execute this operation: - Global roles: WorkflowViewer, WorkflowAdmin - Instance-specific roles: viewerUsers, viewerGroups, adminUsers, adminGroups [Prerequisite: You are assigned to the WorkflowParticipant global role.] - Scope: TASK_GET


/v1/task-instances

Usage

curl -X GET "https://sandbox.api.sap.com/workflow-service/rest/v1/task-instances?$skip=&$top=&$inlinecount=&$expand=&$orderby=&workflowInstanceId=&workflowDefinitionId=&processor=&id=&activityId=&description=&subject=&createdAt=&createdFrom=&createdUpTo=&claimedAt=&claimedFrom=&claimedUpTo=&completedAt=&completedFrom=&completedUpTo=&lastChangedAt=&lastChangedFrom=&lastChangedUpTo=&dueDate=&dueDateFrom=&dueDateUpTo=&priority=&status=&recipientUsers=&recipientGroups=&containsText=&attributes.ExampleCustomAttribute=&definitionId="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.UserTaskInstancesApi;

import java.io.File;
import java.util.*;

public class UserTaskInstancesApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        
        // Configure OAuth2 access token for authorization: Oauth2_AuthorizationCode
        OAuth Oauth2_AuthorizationCode = (OAuth) defaultClient.getAuthentication("Oauth2_AuthorizationCode");
        Oauth2_AuthorizationCode.setAccessToken("YOUR ACCESS TOKEN");

        // Configure OAuth2 access token for authorization: Oauth2_ClientCredentials
        OAuth Oauth2_ClientCredentials = (OAuth) defaultClient.getAuthentication("Oauth2_ClientCredentials");
        Oauth2_ClientCredentials.setAccessToken("YOUR ACCESS TOKEN");

        UserTaskInstancesApi apiInstance = new UserTaskInstancesApi();
        String acceptLanguage = acceptLanguage_example; // String | Provide a preferred language. If a translation is available, relevant texts are returned in this language.
        Integer $skip = 56; // Integer | The number of records you want to skip from the beginning.
You can skip at most 4000 records. To indicate a result range that starts, for example, at 1001, combine the $skip with the $top parameter.
If not specified, no records are skipped. You can use this parameter only once.
Refer also to the $top parameter.
        Integer $top = 56; // Integer | The number of records you want to show.
You can get at most 1000 records per API call. To indicate a result range that starts, for example, at 1001, combine the $top with the $skip parameter.
If not specified, 100 records are returned. You can use this parameter only once.
Refer also to the $skip parameter.
        String $inlinecount = $inlinecount_example; // String | Specify whether the total count of the task instances, which match the search criteria, should be returned as a value
of the X-Total-Count response header. To enable the header, use the 'allpages' setting. To disable the header, use the 'none' setting.
The values are case-sensitive. You can use this parameter only once.
        String $expand = $expand_example; // String | You can request custom task attributes to become part of the task output by specifying the value 'attributes' for the '$expand' parameter.
Otherwise, if the '$expand' parameter is not specified, the 'attributes' field is not included into task output. Note that labels as well as the order of the custom task attributes in which they are returned, are taken from the latest versions of the workflow definitions where these attributes are present.

        String $orderby = $orderby_example; // String | The attribute and direction by which tasks are sorted. The sort attribute and direction are separated by a space.
The parameter value is case-sensitive. You can only specify one ordering parameter, which contains attribute and direction.
To stabilize the order of tasks the implicit second ordering parameter 'createdAt asc' is applied.

 * claimedAt asc - Ascending, task claim time from the oldest to the most recent, tasks with status READY (not yet claimed) first.
 * claimedAt desc - Descending, from the most recently claimed tasks to the oldest ones, tasks with status READY (not yet claimed) last.
 * completedAt asc - Ascending, task completion or cancelation time from the oldest to the most recent, not yet COMPLETED tasks first.
 * completedAt desc - Descending, from the most recently COMPLETED or CANCELED tasks to the oldest ones, not yet COMPLETED tasks last.
 * createdAt asc - Ascending, task creation time from the oldest to the most recent.
 * createdAt desc - Descending, from the most recently created tasks to the oldest ones.
 * lastChangedAt asc - Ascending, task last change time from the oldest to the most recent.
 * lastChangedAt desc - Descending, from the most recently changed tasks to the oldest ones.
 * dueDate asc - Ascending, tasks due date from the oldest to the most distant in future ones, tasks without due date first.
 * dueDate desc - Descending, tasks due date from the most distant in future to the oldest ones, tasks without due date last.
 * subject asc - Ascending, from A to Z case-sensitive.
 * subject desc - Descending, from Z to A case-sensitive.
 * description asc - Ascending, from A to Z case-sensitive, tasks without description first.
 * description desc - Descending, from Z to A case-sensitive, tasks without description last.
 * activityId asc - Ascending, from A to Z case-sensitive.
 * activityId desc - Descending, from Z to A case-sensitive.
 * id asc - Ascending, from A to Z case-sensitive.
 * id desc - Descending, from Z to A case-sensitive.
 * processor asc - Ascending, from A to Z case-sensitive, tasks without processor first.
 * processor desc - Descending, from Z to A case-sensitive, tasks without processor last.
 * workflowDefinitionId asc - Ascending, from A to Z case-sensitive.
 * workflowDefinitionId desc - Descending, from Z to A case-sensitive.
 * workflowInstanceId asc - Ascending, from A to Z case-sensitive.
 * workflowInstanceId desc - Descending, from Z to A case-sensitive.
 * priority asc - Ascending, tasks priority from lowest to highest.
 * priority desc - Descending, tasks priority from highest to lowest.
        String workflowInstanceId = workflowInstanceId_example; // String | The workflow instance ID for which the user task instances are returned. The workflow instance ID is 36 characters long.
        String workflowDefinitionId = workflowDefinitionId_example; // String | The workflow definition ID for which the user task instances are returned.
        String processor = processor_example; // String | The processor of the user task instance.
        String id = id_example; // String | The unique ID of the user task instance. The user task instance ID is 36 characters long.
        String activityId = activityId_example; // String | The activityId of the user task instance. This field represents the ID of the user task definition.
        String description = description_example; // String | The description of the user task instance in UTF-8 encoding. You must not specify texts that contain commas with this parameter.
        String subject = subject_example; // String | The subject of the user task instance in UTF-8 encoding. You must not specify texts that contain commas with this parameter.
        String createdAt = createdAt_example; // String | Time when the user task instance has been created.
Evaluated using the logical 'or' operator with the values of the 'createdFrom' and 'createdUpTo' parameters if they are specified.

Supports two date formats:
1. yyyy-MM-dd'T'HH:mm:ss.SSS'Z'
2. yyyyMMddHHmmss.SSS

        String createdFrom = createdFrom_example; // String | The start time (inclusive) of the time range when the user task instance was created.
Must be less or equal to the value of the 'createdUpTo' parameter if the latter is specified.
Evaluated using the logical 'or' operator with the value of the 'createdAt' parameter if the latter is specified.

Supports two date formats:
1. yyyy-MM-dd'T'HH:mm:ss.SSS'Z'
2. yyyyMMddHHmmss.SSS

        String createdUpTo = createdUpTo_example; // String | The end time (inclusive) of the time range when the user task instance was created.
Must be greater or equal to the value of the 'createdFrom' parameter if the latter is specified.
Evaluated using the logical 'or' operator with the value of the 'createdAt' parameter if the latter is specified.

Supports two date formats:
1. yyyy-MM-dd'T'HH:mm:ss.SSS'Z'
2. yyyyMMddHHmmss.SSS

        String claimedAt = claimedAt_example; // String | Time when the user task instance was claimed.
Evaluated using the logical 'or' operator with the values of the 'claimedFrom' and 'claimedUpTo' parameters if they are specified.

Supports two date formats:
1. yyyy-MM-dd'T'HH:mm:ss.SSS'Z'
2. yyyyMMddHHmmss.SSS

        String claimedFrom = claimedFrom_example; // String | The start time (inclusive) of the time range when the user task instance was claimed.
Must be less or equal to the value of the 'claimedUpTo' parameter if the latter is specified.
Evaluated using the logical 'or' operator with the value of the 'claimedAt' parameter if the latter is specified.

Supports two date formats:
1. yyyy-MM-dd'T'HH:mm:ss.SSS'Z'
2. yyyyMMddHHmmss.SSS

        String claimedUpTo = claimedUpTo_example; // String | The end time (inclusive) of the time range when the user task instance was claimed.
Must be greater or equal to the value of the 'claimedFrom' parameter if the latter is specified.
Evaluated using the logical 'or' operator with the value of the 'claimedAt' parameter if the latter is specified.

Supports two date formats:
1. yyyy-MM-dd'T'HH:mm:ss.SSS'Z'
2. yyyyMMddHHmmss.SSS

        String completedAt = completedAt_example; // String | Time when the user task instance was COMPLETED or CANCELED.
Evaluated using the logical 'or' operator with the values of the 'completedFrom' and 'completedUpTo' parameters if they are specified.

Supports two date formats:
1. yyyy-MM-dd'T'HH:mm:ss.SSS'Z'
2. yyyyMMddHHmmss.SSS

        String completedFrom = completedFrom_example; // String | The start time (inclusive) of the time range when the user task instance was COMPLETED or CANCELED.
Must be less or equal to the value of the 'completedUpTo' parameter if the latter is specified.
Evaluated using the logical 'or' operator with the value of the 'completedAt' parameter if the latter is specified.

Supports two date formats:
1. yyyy-MM-dd'T'HH:mm:ss.SSS'Z'
2. yyyyMMddHHmmss.SSS

        String completedUpTo = completedUpTo_example; // String | The end time (inclusive) of the time range when the user task instance was COMPLETED or CANCELED.
Must be greater or equal to the value of the 'completedFrom' parameter if the latter is specified.
Evaluated using the logical 'or' operator with the value of the 'completedAt' parameter if the latter is specified.

Supports two date formats:
1. yyyy-MM-dd'T'HH:mm:ss.SSS'Z'
2. yyyyMMddHHmmss.SSS

        String lastChangedAt = lastChangedAt_example; // String | Time when the user task instance has been changed for the last time.
Evaluated using the logical 'or' operator with the values of the 'lastChangedFrom' and 'lastChangedTo' parameters if they are specified.

Supports two date formats:
1. yyyy-MM-dd'T'HH:mm:ss.SSS'Z'
2. yyyyMMddHHmmss.SSS

        String lastChangedFrom = lastChangedFrom_example; // String | The start time (inclusive) of the time range when the user task instance was changed for the last time.
Must be less or equal to the value of the 'lastChangedUpTo' parameter if the latter is specified.
Evaluated using the logical 'or' operator with the value of the 'lastChangedAt' parameter if the latter is specified.

Supports two date formats:
1. yyyy-MM-dd'T'HH:mm:ss.SSS'Z'
2. yyyyMMddHHmmss.SSS

        String lastChangedUpTo = lastChangedUpTo_example; // String | The end time (inclusive) of the time range when the user task instance was changed for the last time.
Must be greater or equal to the value of the 'lastChangedFrom' parameter if the latter is specified.
Evaluated using the logical 'or' operator with the value of the 'lastChangedAt' parameter if the latter is specified.

Supports two date formats:
1. yyyy-MM-dd'T'HH:mm:ss.SSS'Z'
2. yyyyMMddHHmmss.SSS

        String dueDate = dueDate_example; // String | The due date of the user task instance.
Evaluated using the logical 'or' operator with the values of the 'dueDateFrom' and 'dueDateUpTo' parameters if they are specified.

Supports two date formats:
1. yyyy-MM-dd'T'HH:mm:ss.SSS'Z'
2. yyyyMMddHHmmss.SSS

        String dueDateFrom = dueDateFrom_example; // String | The start time (inclusive) of the due date time range for the user task instance.
Must be less or equal to the value of the 'dueDateUpTo' parameter if the latter is specified.
Evaluated using the logical 'or' operator with the value of the 'dueDate' parameter if the latter is specified.

Supports two date formats:
1. yyyy-MM-dd'T'HH:mm:ss.SSS'Z'
2. yyyyMMddHHmmss.SSS

        String dueDateUpTo = dueDateUpTo_example; // String | The end time (inclusive) of the due date time range for the user task instance.
Must be greater or equal to the 'dueDateFrom' parameter if the latter is specified.
Evaluated using the logical 'or' operator with the value of the 'dueDate' parameter if the latter is specified.

Supports two date formats:
1. yyyy-MM-dd'T'HH:mm:ss.SSS'Z'
2. yyyyMMddHHmmss.SSS

        String priority = priority_example; // String | The priority of the user task instance.
The values are case-insensitive.

        String status = status_example; // String | The status of the user task instance.
The values are case-insensitive.

        String recipientUsers = recipientUsers_example; // String | The users who must be among the recipient users of the user task instance. A user task instance has to match at least one of the recipient users specified.
Specify the users by repeating this parameter multiple times, with one user each.

        String recipientGroups = recipientGroups_example; // String | The groups which must be among the recipient groups of the user task instance. A user task instance has to match at least one of the recipient groups specified.
Specify the groups by repeating this parameter multiple times, with one user each.

        String containsText = containsText_example; // String | Text, which should be contained in at least one of the following fields of the user task instance:

 * subject
 * description
 * activityId
 * id
 * processor
 * workflowDefinitionId
 * workflowInstanceId

Performed filtering is case-insensitive. You must not use this parameter more than once.

        String attributes.ExampleCustomAttribute = attributes.ExampleCustomAttribute_example; // String | Example of a parameter that filters task instances by the value of the custom task attribute with the ID 'ExampleCustomAttribute'.
You can specify parameters for other attributes in an analogous way.
If you specify a parameter several times, the logical operators apply as outlined in the overall description of this API.
If custom task attributes with different IDs are present in the URL, only tasks which contain all of them with the values specified will be returned as a response to the request.
If a query by custom task attributes matches too many task definitions, you have to limit the query further. Refer, for example, to parameter 'definitionId'.

        String definitionId = definitionId_example; // String | The definition ID of the user task.
It consists of the ID of the task defined in the workflow definition (task definition ID) as well as the workflow definition ID delimited by an '@' sign.
For optimal performance, specify this parameter when searching for tasks by custom task attributes.
If the custom task attribute IDs from the query match more than 50 task definitions, you have to specify one or more task definition IDs when searching for tasks by custom task attributes.

        try {
            array[TaskInstance] result = apiInstance.v1TaskInstancesGet(acceptLanguage, $skip, $top, $inlinecount, $expand, $orderby, workflowInstanceId, workflowDefinitionId, processor, id, activityId, description, subject, createdAt, createdFrom, createdUpTo, claimedAt, claimedFrom, claimedUpTo, completedAt, completedFrom, completedUpTo, lastChangedAt, lastChangedFrom, lastChangedUpTo, dueDate, dueDateFrom, dueDateUpTo, priority, status, recipientUsers, recipientGroups, containsText, attributes.ExampleCustomAttribute, definitionId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling UserTaskInstancesApi#v1TaskInstancesGet");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.UserTaskInstancesApi;

public class UserTaskInstancesApiExample {

    public static void main(String[] args) {
        UserTaskInstancesApi apiInstance = new UserTaskInstancesApi();
        String acceptLanguage = acceptLanguage_example; // String | Provide a preferred language. If a translation is available, relevant texts are returned in this language.
        Integer $skip = 56; // Integer | The number of records you want to skip from the beginning.
You can skip at most 4000 records. To indicate a result range that starts, for example, at 1001, combine the $skip with the $top parameter.
If not specified, no records are skipped. You can use this parameter only once.
Refer also to the $top parameter.
        Integer $top = 56; // Integer | The number of records you want to show.
You can get at most 1000 records per API call. To indicate a result range that starts, for example, at 1001, combine the $top with the $skip parameter.
If not specified, 100 records are returned. You can use this parameter only once.
Refer also to the $skip parameter.
        String $inlinecount = $inlinecount_example; // String | Specify whether the total count of the task instances, which match the search criteria, should be returned as a value
of the X-Total-Count response header. To enable the header, use the 'allpages' setting. To disable the header, use the 'none' setting.
The values are case-sensitive. You can use this parameter only once.
        String $expand = $expand_example; // String | You can request custom task attributes to become part of the task output by specifying the value 'attributes' for the '$expand' parameter.
Otherwise, if the '$expand' parameter is not specified, the 'attributes' field is not included into task output. Note that labels as well as the order of the custom task attributes in which they are returned, are taken from the latest versions of the workflow definitions where these attributes are present.

        String $orderby = $orderby_example; // String | The attribute and direction by which tasks are sorted. The sort attribute and direction are separated by a space.
The parameter value is case-sensitive. You can only specify one ordering parameter, which contains attribute and direction.
To stabilize the order of tasks the implicit second ordering parameter 'createdAt asc' is applied.

 * claimedAt asc - Ascending, task claim time from the oldest to the most recent, tasks with status READY (not yet claimed) first.
 * claimedAt desc - Descending, from the most recently claimed tasks to the oldest ones, tasks with status READY (not yet claimed) last.
 * completedAt asc - Ascending, task completion or cancelation time from the oldest to the most recent, not yet COMPLETED tasks first.
 * completedAt desc - Descending, from the most recently COMPLETED or CANCELED tasks to the oldest ones, not yet COMPLETED tasks last.
 * createdAt asc - Ascending, task creation time from the oldest to the most recent.
 * createdAt desc - Descending, from the most recently created tasks to the oldest ones.
 * lastChangedAt asc - Ascending, task last change time from the oldest to the most recent.
 * lastChangedAt desc - Descending, from the most recently changed tasks to the oldest ones.
 * dueDate asc - Ascending, tasks due date from the oldest to the most distant in future ones, tasks without due date first.
 * dueDate desc - Descending, tasks due date from the most distant in future to the oldest ones, tasks without due date last.
 * subject asc - Ascending, from A to Z case-sensitive.
 * subject desc - Descending, from Z to A case-sensitive.
 * description asc - Ascending, from A to Z case-sensitive, tasks without description first.
 * description desc - Descending, from Z to A case-sensitive, tasks without description last.
 * activityId asc - Ascending, from A to Z case-sensitive.
 * activityId desc - Descending, from Z to A case-sensitive.
 * id asc - Ascending, from A to Z case-sensitive.
 * id desc - Descending, from Z to A case-sensitive.
 * processor asc - Ascending, from A to Z case-sensitive, tasks without processor first.
 * processor desc - Descending, from Z to A case-sensitive, tasks without processor last.
 * workflowDefinitionId asc - Ascending, from A to Z case-sensitive.
 * workflowDefinitionId desc - Descending, from Z to A case-sensitive.
 * workflowInstanceId asc - Ascending, from A to Z case-sensitive.
 * workflowInstanceId desc - Descending, from Z to A case-sensitive.
 * priority asc - Ascending, tasks priority from lowest to highest.
 * priority desc - Descending, tasks priority from highest to lowest.
        String workflowInstanceId = workflowInstanceId_example; // String | The workflow instance ID for which the user task instances are returned. The workflow instance ID is 36 characters long.
        String workflowDefinitionId = workflowDefinitionId_example; // String | The workflow definition ID for which the user task instances are returned.
        String processor = processor_example; // String | The processor of the user task instance.
        String id = id_example; // String | The unique ID of the user task instance. The user task instance ID is 36 characters long.
        String activityId = activityId_example; // String | The activityId of the user task instance. This field represents the ID of the user task definition.
        String description = description_example; // String | The description of the user task instance in UTF-8 encoding. You must not specify texts that contain commas with this parameter.
        String subject = subject_example; // String | The subject of the user task instance in UTF-8 encoding. You must not specify texts that contain commas with this parameter.
        String createdAt = createdAt_example; // String | Time when the user task instance has been created.
Evaluated using the logical 'or' operator with the values of the 'createdFrom' and 'createdUpTo' parameters if they are specified.

Supports two date formats:
1. yyyy-MM-dd'T'HH:mm:ss.SSS'Z'
2. yyyyMMddHHmmss.SSS

        String createdFrom = createdFrom_example; // String | The start time (inclusive) of the time range when the user task instance was created.
Must be less or equal to the value of the 'createdUpTo' parameter if the latter is specified.
Evaluated using the logical 'or' operator with the value of the 'createdAt' parameter if the latter is specified.

Supports two date formats:
1. yyyy-MM-dd'T'HH:mm:ss.SSS'Z'
2. yyyyMMddHHmmss.SSS

        String createdUpTo = createdUpTo_example; // String | The end time (inclusive) of the time range when the user task instance was created.
Must be greater or equal to the value of the 'createdFrom' parameter if the latter is specified.
Evaluated using the logical 'or' operator with the value of the 'createdAt' parameter if the latter is specified.

Supports two date formats:
1. yyyy-MM-dd'T'HH:mm:ss.SSS'Z'
2. yyyyMMddHHmmss.SSS

        String claimedAt = claimedAt_example; // String | Time when the user task instance was claimed.
Evaluated using the logical 'or' operator with the values of the 'claimedFrom' and 'claimedUpTo' parameters if they are specified.

Supports two date formats:
1. yyyy-MM-dd'T'HH:mm:ss.SSS'Z'
2. yyyyMMddHHmmss.SSS

        String claimedFrom = claimedFrom_example; // String | The start time (inclusive) of the time range when the user task instance was claimed.
Must be less or equal to the value of the 'claimedUpTo' parameter if the latter is specified.
Evaluated using the logical 'or' operator with the value of the 'claimedAt' parameter if the latter is specified.

Supports two date formats:
1. yyyy-MM-dd'T'HH:mm:ss.SSS'Z'
2. yyyyMMddHHmmss.SSS

        String claimedUpTo = claimedUpTo_example; // String | The end time (inclusive) of the time range when the user task instance was claimed.
Must be greater or equal to the value of the 'claimedFrom' parameter if the latter is specified.
Evaluated using the logical 'or' operator with the value of the 'claimedAt' parameter if the latter is specified.

Supports two date formats:
1. yyyy-MM-dd'T'HH:mm:ss.SSS'Z'
2. yyyyMMddHHmmss.SSS

        String completedAt = completedAt_example; // String | Time when the user task instance was COMPLETED or CANCELED.
Evaluated using the logical 'or' operator with the values of the 'completedFrom' and 'completedUpTo' parameters if they are specified.

Supports two date formats:
1. yyyy-MM-dd'T'HH:mm:ss.SSS'Z'
2. yyyyMMddHHmmss.SSS

        String completedFrom = completedFrom_example; // String | The start time (inclusive) of the time range when the user task instance was COMPLETED or CANCELED.
Must be less or equal to the value of the 'completedUpTo' parameter if the latter is specified.
Evaluated using the logical 'or' operator with the value of the 'completedAt' parameter if the latter is specified.

Supports two date formats:
1. yyyy-MM-dd'T'HH:mm:ss.SSS'Z'
2. yyyyMMddHHmmss.SSS

        String completedUpTo = completedUpTo_example; // String | The end time (inclusive) of the time range when the user task instance was COMPLETED or CANCELED.
Must be greater or equal to the value of the 'completedFrom' parameter if the latter is specified.
Evaluated using the logical 'or' operator with the value of the 'completedAt' parameter if the latter is specified.

Supports two date formats:
1. yyyy-MM-dd'T'HH:mm:ss.SSS'Z'
2. yyyyMMddHHmmss.SSS

        String lastChangedAt = lastChangedAt_example; // String | Time when the user task instance has been changed for the last time.
Evaluated using the logical 'or' operator with the values of the 'lastChangedFrom' and 'lastChangedTo' parameters if they are specified.

Supports two date formats:
1. yyyy-MM-dd'T'HH:mm:ss.SSS'Z'
2. yyyyMMddHHmmss.SSS

        String lastChangedFrom = lastChangedFrom_example; // String | The start time (inclusive) of the time range when the user task instance was changed for the last time.
Must be less or equal to the value of the 'lastChangedUpTo' parameter if the latter is specified.
Evaluated using the logical 'or' operator with the value of the 'lastChangedAt' parameter if the latter is specified.

Supports two date formats:
1. yyyy-MM-dd'T'HH:mm:ss.SSS'Z'
2. yyyyMMddHHmmss.SSS

        String lastChangedUpTo = lastChangedUpTo_example; // String | The end time (inclusive) of the time range when the user task instance was changed for the last time.
Must be greater or equal to the value of the 'lastChangedFrom' parameter if the latter is specified.
Evaluated using the logical 'or' operator with the value of the 'lastChangedAt' parameter if the latter is specified.

Supports two date formats:
1. yyyy-MM-dd'T'HH:mm:ss.SSS'Z'
2. yyyyMMddHHmmss.SSS

        String dueDate = dueDate_example; // String | The due date of the user task instance.
Evaluated using the logical 'or' operator with the values of the 'dueDateFrom' and 'dueDateUpTo' parameters if they are specified.

Supports two date formats:
1. yyyy-MM-dd'T'HH:mm:ss.SSS'Z'
2. yyyyMMddHHmmss.SSS

        String dueDateFrom = dueDateFrom_example; // String | The start time (inclusive) of the due date time range for the user task instance.
Must be less or equal to the value of the 'dueDateUpTo' parameter if the latter is specified.
Evaluated using the logical 'or' operator with the value of the 'dueDate' parameter if the latter is specified.

Supports two date formats:
1. yyyy-MM-dd'T'HH:mm:ss.SSS'Z'
2. yyyyMMddHHmmss.SSS

        String dueDateUpTo = dueDateUpTo_example; // String | The end time (inclusive) of the due date time range for the user task instance.
Must be greater or equal to the 'dueDateFrom' parameter if the latter is specified.
Evaluated using the logical 'or' operator with the value of the 'dueDate' parameter if the latter is specified.

Supports two date formats:
1. yyyy-MM-dd'T'HH:mm:ss.SSS'Z'
2. yyyyMMddHHmmss.SSS

        String priority = priority_example; // String | The priority of the user task instance.
The values are case-insensitive.

        String status = status_example; // String | The status of the user task instance.
The values are case-insensitive.

        String recipientUsers = recipientUsers_example; // String | The users who must be among the recipient users of the user task instance. A user task instance has to match at least one of the recipient users specified.
Specify the users by repeating this parameter multiple times, with one user each.

        String recipientGroups = recipientGroups_example; // String | The groups which must be among the recipient groups of the user task instance. A user task instance has to match at least one of the recipient groups specified.
Specify the groups by repeating this parameter multiple times, with one user each.

        String containsText = containsText_example; // String | Text, which should be contained in at least one of the following fields of the user task instance:

 * subject
 * description
 * activityId
 * id
 * processor
 * workflowDefinitionId
 * workflowInstanceId

Performed filtering is case-insensitive. You must not use this parameter more than once.

        String attributes.ExampleCustomAttribute = attributes.ExampleCustomAttribute_example; // String | Example of a parameter that filters task instances by the value of the custom task attribute with the ID 'ExampleCustomAttribute'.
You can specify parameters for other attributes in an analogous way.
If you specify a parameter several times, the logical operators apply as outlined in the overall description of this API.
If custom task attributes with different IDs are present in the URL, only tasks which contain all of them with the values specified will be returned as a response to the request.
If a query by custom task attributes matches too many task definitions, you have to limit the query further. Refer, for example, to parameter 'definitionId'.

        String definitionId = definitionId_example; // String | The definition ID of the user task.
It consists of the ID of the task defined in the workflow definition (task definition ID) as well as the workflow definition ID delimited by an '@' sign.
For optimal performance, specify this parameter when searching for tasks by custom task attributes.
If the custom task attribute IDs from the query match more than 50 task definitions, you have to specify one or more task definition IDs when searching for tasks by custom task attributes.

        try {
            array[TaskInstance] result = apiInstance.v1TaskInstancesGet(acceptLanguage, $skip, $top, $inlinecount, $expand, $orderby, workflowInstanceId, workflowDefinitionId, processor, id, activityId, description, subject, createdAt, createdFrom, createdUpTo, claimedAt, claimedFrom, claimedUpTo, completedAt, completedFrom, completedUpTo, lastChangedAt, lastChangedFrom, lastChangedUpTo, dueDate, dueDateFrom, dueDateUpTo, priority, status, recipientUsers, recipientGroups, containsText, attributes.ExampleCustomAttribute, definitionId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling UserTaskInstancesApi#v1TaskInstancesGet");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure OAuth2 access token for authorization: (authentication scheme: Oauth2_AuthorizationCode)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];

// Configure OAuth2 access token for authorization: (authentication scheme: Oauth2_ClientCredentials)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];

String *acceptLanguage = acceptLanguage_example; // Provide a preferred language. If a translation is available, relevant texts are returned in this language. (optional)
Integer *$skip = 56; // The number of records you want to skip from the beginning.
You can skip at most 4000 records. To indicate a result range that starts, for example, at 1001, combine the $skip with the $top parameter.
If not specified, no records are skipped. You can use this parameter only once.
Refer also to the $top parameter. (optional) (default to 0)
Integer *$top = 56; // The number of records you want to show.
You can get at most 1000 records per API call. To indicate a result range that starts, for example, at 1001, combine the $top with the $skip parameter.
If not specified, 100 records are returned. You can use this parameter only once.
Refer also to the $skip parameter. (optional) (default to 100)
String *$inlinecount = $inlinecount_example; // Specify whether the total count of the task instances, which match the search criteria, should be returned as a value
of the X-Total-Count response header. To enable the header, use the 'allpages' setting. To disable the header, use the 'none' setting.
The values are case-sensitive. You can use this parameter only once. (optional) (default to none)
String *$expand = $expand_example; // You can request custom task attributes to become part of the task output by specifying the value 'attributes' for the '$expand' parameter.
Otherwise, if the '$expand' parameter is not specified, the 'attributes' field is not included into task output. Note that labels as well as the order of the custom task attributes in which they are returned, are taken from the latest versions of the workflow definitions where these attributes are present.
 (optional)
String *$orderby = $orderby_example; // The attribute and direction by which tasks are sorted. The sort attribute and direction are separated by a space.
The parameter value is case-sensitive. You can only specify one ordering parameter, which contains attribute and direction.
To stabilize the order of tasks the implicit second ordering parameter 'createdAt asc' is applied.

 * claimedAt asc - Ascending, task claim time from the oldest to the most recent, tasks with status READY (not yet claimed) first.
 * claimedAt desc - Descending, from the most recently claimed tasks to the oldest ones, tasks with status READY (not yet claimed) last.
 * completedAt asc - Ascending, task completion or cancelation time from the oldest to the most recent, not yet COMPLETED tasks first.
 * completedAt desc - Descending, from the most recently COMPLETED or CANCELED tasks to the oldest ones, not yet COMPLETED tasks last.
 * createdAt asc - Ascending, task creation time from the oldest to the most recent.
 * createdAt desc - Descending, from the most recently created tasks to the oldest ones.
 * lastChangedAt asc - Ascending, task last change time from the oldest to the most recent.
 * lastChangedAt desc - Descending, from the most recently changed tasks to the oldest ones.
 * dueDate asc - Ascending, tasks due date from the oldest to the most distant in future ones, tasks without due date first.
 * dueDate desc - Descending, tasks due date from the most distant in future to the oldest ones, tasks without due date last.
 * subject asc - Ascending, from A to Z case-sensitive.
 * subject desc - Descending, from Z to A case-sensitive.
 * description asc - Ascending, from A to Z case-sensitive, tasks without description first.
 * description desc - Descending, from Z to A case-sensitive, tasks without description last.
 * activityId asc - Ascending, from A to Z case-sensitive.
 * activityId desc - Descending, from Z to A case-sensitive.
 * id asc - Ascending, from A to Z case-sensitive.
 * id desc - Descending, from Z to A case-sensitive.
 * processor asc - Ascending, from A to Z case-sensitive, tasks without processor first.
 * processor desc - Descending, from Z to A case-sensitive, tasks without processor last.
 * workflowDefinitionId asc - Ascending, from A to Z case-sensitive.
 * workflowDefinitionId desc - Descending, from Z to A case-sensitive.
 * workflowInstanceId asc - Ascending, from A to Z case-sensitive.
 * workflowInstanceId desc - Descending, from Z to A case-sensitive.
 * priority asc - Ascending, tasks priority from lowest to highest.
 * priority desc - Descending, tasks priority from highest to lowest. (optional) (default to createdAt asc)
String *workflowInstanceId = workflowInstanceId_example; // The workflow instance ID for which the user task instances are returned. The workflow instance ID is 36 characters long. (optional)
String *workflowDefinitionId = workflowDefinitionId_example; // The workflow definition ID for which the user task instances are returned. (optional)
String *processor = processor_example; // The processor of the user task instance. (optional)
String *id = id_example; // The unique ID of the user task instance. The user task instance ID is 36 characters long. (optional)
String *activityId = activityId_example; // The activityId of the user task instance. This field represents the ID of the user task definition. (optional)
String *description = description_example; // The description of the user task instance in UTF-8 encoding. You must not specify texts that contain commas with this parameter. (optional)
String *subject = subject_example; // The subject of the user task instance in UTF-8 encoding. You must not specify texts that contain commas with this parameter. (optional)
String *createdAt = createdAt_example; // Time when the user task instance has been created.
Evaluated using the logical 'or' operator with the values of the 'createdFrom' and 'createdUpTo' parameters if they are specified.

Supports two date formats:
1. yyyy-MM-dd'T'HH:mm:ss.SSS'Z'
2. yyyyMMddHHmmss.SSS
 (optional)
String *createdFrom = createdFrom_example; // The start time (inclusive) of the time range when the user task instance was created.
Must be less or equal to the value of the 'createdUpTo' parameter if the latter is specified.
Evaluated using the logical 'or' operator with the value of the 'createdAt' parameter if the latter is specified.

Supports two date formats:
1. yyyy-MM-dd'T'HH:mm:ss.SSS'Z'
2. yyyyMMddHHmmss.SSS
 (optional)
String *createdUpTo = createdUpTo_example; // The end time (inclusive) of the time range when the user task instance was created.
Must be greater or equal to the value of the 'createdFrom' parameter if the latter is specified.
Evaluated using the logical 'or' operator with the value of the 'createdAt' parameter if the latter is specified.

Supports two date formats:
1. yyyy-MM-dd'T'HH:mm:ss.SSS'Z'
2. yyyyMMddHHmmss.SSS
 (optional)
String *claimedAt = claimedAt_example; // Time when the user task instance was claimed.
Evaluated using the logical 'or' operator with the values of the 'claimedFrom' and 'claimedUpTo' parameters if they are specified.

Supports two date formats:
1. yyyy-MM-dd'T'HH:mm:ss.SSS'Z'
2. yyyyMMddHHmmss.SSS
 (optional)
String *claimedFrom = claimedFrom_example; // The start time (inclusive) of the time range when the user task instance was claimed.
Must be less or equal to the value of the 'claimedUpTo' parameter if the latter is specified.
Evaluated using the logical 'or' operator with the value of the 'claimedAt' parameter if the latter is specified.

Supports two date formats:
1. yyyy-MM-dd'T'HH:mm:ss.SSS'Z'
2. yyyyMMddHHmmss.SSS
 (optional)
String *claimedUpTo = claimedUpTo_example; // The end time (inclusive) of the time range when the user task instance was claimed.
Must be greater or equal to the value of the 'claimedFrom' parameter if the latter is specified.
Evaluated using the logical 'or' operator with the value of the 'claimedAt' parameter if the latter is specified.

Supports two date formats:
1. yyyy-MM-dd'T'HH:mm:ss.SSS'Z'
2. yyyyMMddHHmmss.SSS
 (optional)
String *completedAt = completedAt_example; // Time when the user task instance was COMPLETED or CANCELED.
Evaluated using the logical 'or' operator with the values of the 'completedFrom' and 'completedUpTo' parameters if they are specified.

Supports two date formats:
1. yyyy-MM-dd'T'HH:mm:ss.SSS'Z'
2. yyyyMMddHHmmss.SSS
 (optional)
String *completedFrom = completedFrom_example; // The start time (inclusive) of the time range when the user task instance was COMPLETED or CANCELED.
Must be less or equal to the value of the 'completedUpTo' parameter if the latter is specified.
Evaluated using the logical 'or' operator with the value of the 'completedAt' parameter if the latter is specified.

Supports two date formats:
1. yyyy-MM-dd'T'HH:mm:ss.SSS'Z'
2. yyyyMMddHHmmss.SSS
 (optional)
String *completedUpTo = completedUpTo_example; // The end time (inclusive) of the time range when the user task instance was COMPLETED or CANCELED.
Must be greater or equal to the value of the 'completedFrom' parameter if the latter is specified.
Evaluated using the logical 'or' operator with the value of the 'completedAt' parameter if the latter is specified.

Supports two date formats:
1. yyyy-MM-dd'T'HH:mm:ss.SSS'Z'
2. yyyyMMddHHmmss.SSS
 (optional)
String *lastChangedAt = lastChangedAt_example; // Time when the user task instance has been changed for the last time.
Evaluated using the logical 'or' operator with the values of the 'lastChangedFrom' and 'lastChangedTo' parameters if they are specified.

Supports two date formats:
1. yyyy-MM-dd'T'HH:mm:ss.SSS'Z'
2. yyyyMMddHHmmss.SSS
 (optional)
String *lastChangedFrom = lastChangedFrom_example; // The start time (inclusive) of the time range when the user task instance was changed for the last time.
Must be less or equal to the value of the 'lastChangedUpTo' parameter if the latter is specified.
Evaluated using the logical 'or' operator with the value of the 'lastChangedAt' parameter if the latter is specified.

Supports two date formats:
1. yyyy-MM-dd'T'HH:mm:ss.SSS'Z'
2. yyyyMMddHHmmss.SSS
 (optional)
String *lastChangedUpTo = lastChangedUpTo_example; // The end time (inclusive) of the time range when the user task instance was changed for the last time.
Must be greater or equal to the value of the 'lastChangedFrom' parameter if the latter is specified.
Evaluated using the logical 'or' operator with the value of the 'lastChangedAt' parameter if the latter is specified.

Supports two date formats:
1. yyyy-MM-dd'T'HH:mm:ss.SSS'Z'
2. yyyyMMddHHmmss.SSS
 (optional)
String *dueDate = dueDate_example; // The due date of the user task instance.
Evaluated using the logical 'or' operator with the values of the 'dueDateFrom' and 'dueDateUpTo' parameters if they are specified.

Supports two date formats:
1. yyyy-MM-dd'T'HH:mm:ss.SSS'Z'
2. yyyyMMddHHmmss.SSS
 (optional)
String *dueDateFrom = dueDateFrom_example; // The start time (inclusive) of the due date time range for the user task instance.
Must be less or equal to the value of the 'dueDateUpTo' parameter if the latter is specified.
Evaluated using the logical 'or' operator with the value of the 'dueDate' parameter if the latter is specified.

Supports two date formats:
1. yyyy-MM-dd'T'HH:mm:ss.SSS'Z'
2. yyyyMMddHHmmss.SSS
 (optional)
String *dueDateUpTo = dueDateUpTo_example; // The end time (inclusive) of the due date time range for the user task instance.
Must be greater or equal to the 'dueDateFrom' parameter if the latter is specified.
Evaluated using the logical 'or' operator with the value of the 'dueDate' parameter if the latter is specified.

Supports two date formats:
1. yyyy-MM-dd'T'HH:mm:ss.SSS'Z'
2. yyyyMMddHHmmss.SSS
 (optional)
String *priority = priority_example; // The priority of the user task instance.
The values are case-insensitive.
 (optional)
String *status = status_example; // The status of the user task instance.
The values are case-insensitive.
 (optional)
String *recipientUsers = recipientUsers_example; // The users who must be among the recipient users of the user task instance. A user task instance has to match at least one of the recipient users specified.
Specify the users by repeating this parameter multiple times, with one user each.
 (optional)
String *recipientGroups = recipientGroups_example; // The groups which must be among the recipient groups of the user task instance. A user task instance has to match at least one of the recipient groups specified.
Specify the groups by repeating this parameter multiple times, with one user each.
 (optional)
String *containsText = containsText_example; // Text, which should be contained in at least one of the following fields of the user task instance:

 * subject
 * description
 * activityId
 * id
 * processor
 * workflowDefinitionId
 * workflowInstanceId

Performed filtering is case-insensitive. You must not use this parameter more than once.
 (optional)
String *attributes.ExampleCustomAttribute = attributes.ExampleCustomAttribute_example; // Example of a parameter that filters task instances by the value of the custom task attribute with the ID 'ExampleCustomAttribute'.
You can specify parameters for other attributes in an analogous way.
If you specify a parameter several times, the logical operators apply as outlined in the overall description of this API.
If custom task attributes with different IDs are present in the URL, only tasks which contain all of them with the values specified will be returned as a response to the request.
If a query by custom task attributes matches too many task definitions, you have to limit the query further. Refer, for example, to parameter 'definitionId'.
 (optional)
String *definitionId = definitionId_example; // The definition ID of the user task.
It consists of the ID of the task defined in the workflow definition (task definition ID) as well as the workflow definition ID delimited by an '@' sign.
For optimal performance, specify this parameter when searching for tasks by custom task attributes.
If the custom task attribute IDs from the query match more than 50 task definitions, you have to specify one or more task definition IDs when searching for tasks by custom task attributes.
 (optional)

UserTaskInstancesApi *apiInstance = [[UserTaskInstancesApi alloc] init];

// Retrieve instances by query parameters
[apiInstance v1TaskInstancesGetWith:acceptLanguage
    $skip:$skip
    $top:$top
    $inlinecount:$inlinecount
    $expand:$expand
    $orderby:$orderby
    workflowInstanceId:workflowInstanceId
    workflowDefinitionId:workflowDefinitionId
    processor:processor
    id:id
    activityId:activityId
    description:description
    subject:subject
    createdAt:createdAt
    createdFrom:createdFrom
    createdUpTo:createdUpTo
    claimedAt:claimedAt
    claimedFrom:claimedFrom
    claimedUpTo:claimedUpTo
    completedAt:completedAt
    completedFrom:completedFrom
    completedUpTo:completedUpTo
    lastChangedAt:lastChangedAt
    lastChangedFrom:lastChangedFrom
    lastChangedUpTo:lastChangedUpTo
    dueDate:dueDate
    dueDateFrom:dueDateFrom
    dueDateUpTo:dueDateUpTo
    priority:priority
    status:status
    recipientUsers:recipientUsers
    recipientGroups:recipientGroups
    containsText:containsText
    attributes.ExampleCustomAttribute:attributes.ExampleCustomAttribute
    definitionId:definitionId
              completionHandler: ^(array[TaskInstance] output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var WorkflowApiForCloudFoundry = require('workflow_api_for_cloud_foundry');
var defaultClient = WorkflowApiForCloudFoundry.ApiClient.instance;

// Configure OAuth2 access token for authorization: Oauth2_AuthorizationCode
var Oauth2_AuthorizationCode = defaultClient.authentications['Oauth2_AuthorizationCode'];
Oauth2_AuthorizationCode.accessToken = "YOUR ACCESS TOKEN"

// Configure OAuth2 access token for authorization: Oauth2_ClientCredentials
var Oauth2_ClientCredentials = defaultClient.authentications['Oauth2_ClientCredentials'];
Oauth2_ClientCredentials.accessToken = "YOUR ACCESS TOKEN"

var api = new WorkflowApiForCloudFoundry.UserTaskInstancesApi()

var opts = { 
  'acceptLanguage': acceptLanguage_example, // {String} Provide a preferred language. If a translation is available, relevant texts are returned in this language.
  '$skip': 56, // {Integer} The number of records you want to skip from the beginning.
You can skip at most 4000 records. To indicate a result range that starts, for example, at 1001, combine the $skip with the $top parameter.
If not specified, no records are skipped. You can use this parameter only once.
Refer also to the $top parameter.
  '$top': 56, // {Integer} The number of records you want to show.
You can get at most 1000 records per API call. To indicate a result range that starts, for example, at 1001, combine the $top with the $skip parameter.
If not specified, 100 records are returned. You can use this parameter only once.
Refer also to the $skip parameter.
  '$inlinecount': $inlinecount_example, // {String} Specify whether the total count of the task instances, which match the search criteria, should be returned as a value
of the X-Total-Count response header. To enable the header, use the 'allpages' setting. To disable the header, use the 'none' setting.
The values are case-sensitive. You can use this parameter only once.
  '$expand': $expand_example, // {String} You can request custom task attributes to become part of the task output by specifying the value 'attributes' for the '$expand' parameter.
Otherwise, if the '$expand' parameter is not specified, the 'attributes' field is not included into task output. Note that labels as well as the order of the custom task attributes in which they are returned, are taken from the latest versions of the workflow definitions where these attributes are present.

  '$orderby': $orderby_example, // {String} The attribute and direction by which tasks are sorted. The sort attribute and direction are separated by a space.
The parameter value is case-sensitive. You can only specify one ordering parameter, which contains attribute and direction.
To stabilize the order of tasks the implicit second ordering parameter 'createdAt asc' is applied.

 * claimedAt asc - Ascending, task claim time from the oldest to the most recent, tasks with status READY (not yet claimed) first.
 * claimedAt desc - Descending, from the most recently claimed tasks to the oldest ones, tasks with status READY (not yet claimed) last.
 * completedAt asc - Ascending, task completion or cancelation time from the oldest to the most recent, not yet COMPLETED tasks first.
 * completedAt desc - Descending, from the most recently COMPLETED or CANCELED tasks to the oldest ones, not yet COMPLETED tasks last.
 * createdAt asc - Ascending, task creation time from the oldest to the most recent.
 * createdAt desc - Descending, from the most recently created tasks to the oldest ones.
 * lastChangedAt asc - Ascending, task last change time from the oldest to the most recent.
 * lastChangedAt desc - Descending, from the most recently changed tasks to the oldest ones.
 * dueDate asc - Ascending, tasks due date from the oldest to the most distant in future ones, tasks without due date first.
 * dueDate desc - Descending, tasks due date from the most distant in future to the oldest ones, tasks without due date last.
 * subject asc - Ascending, from A to Z case-sensitive.
 * subject desc - Descending, from Z to A case-sensitive.
 * description asc - Ascending, from A to Z case-sensitive, tasks without description first.
 * description desc - Descending, from Z to A case-sensitive, tasks without description last.
 * activityId asc - Ascending, from A to Z case-sensitive.
 * activityId desc - Descending, from Z to A case-sensitive.
 * id asc - Ascending, from A to Z case-sensitive.
 * id desc - Descending, from Z to A case-sensitive.
 * processor asc - Ascending, from A to Z case-sensitive, tasks without processor first.
 * processor desc - Descending, from Z to A case-sensitive, tasks without processor last.
 * workflowDefinitionId asc - Ascending, from A to Z case-sensitive.
 * workflowDefinitionId desc - Descending, from Z to A case-sensitive.
 * workflowInstanceId asc - Ascending, from A to Z case-sensitive.
 * workflowInstanceId desc - Descending, from Z to A case-sensitive.
 * priority asc - Ascending, tasks priority from lowest to highest.
 * priority desc - Descending, tasks priority from highest to lowest.
  'workflowInstanceId': workflowInstanceId_example, // {String} The workflow instance ID for which the user task instances are returned. The workflow instance ID is 36 characters long.
  'workflowDefinitionId': workflowDefinitionId_example, // {String} The workflow definition ID for which the user task instances are returned.
  'processor': processor_example, // {String} The processor of the user task instance.
  'id': id_example, // {String} The unique ID of the user task instance. The user task instance ID is 36 characters long.
  'activityId': activityId_example, // {String} The activityId of the user task instance. This field represents the ID of the user task definition.
  'description': description_example, // {String} The description of the user task instance in UTF-8 encoding. You must not specify texts that contain commas with this parameter.
  'subject': subject_example, // {String} The subject of the user task instance in UTF-8 encoding. You must not specify texts that contain commas with this parameter.
  'createdAt': createdAt_example, // {String} Time when the user task instance has been created.
Evaluated using the logical 'or' operator with the values of the 'createdFrom' and 'createdUpTo' parameters if they are specified.

Supports two date formats:
1. yyyy-MM-dd'T'HH:mm:ss.SSS'Z'
2. yyyyMMddHHmmss.SSS

  'createdFrom': createdFrom_example, // {String} The start time (inclusive) of the time range when the user task instance was created.
Must be less or equal to the value of the 'createdUpTo' parameter if the latter is specified.
Evaluated using the logical 'or' operator with the value of the 'createdAt' parameter if the latter is specified.

Supports two date formats:
1. yyyy-MM-dd'T'HH:mm:ss.SSS'Z'
2. yyyyMMddHHmmss.SSS

  'createdUpTo': createdUpTo_example, // {String} The end time (inclusive) of the time range when the user task instance was created.
Must be greater or equal to the value of the 'createdFrom' parameter if the latter is specified.
Evaluated using the logical 'or' operator with the value of the 'createdAt' parameter if the latter is specified.

Supports two date formats:
1. yyyy-MM-dd'T'HH:mm:ss.SSS'Z'
2. yyyyMMddHHmmss.SSS

  'claimedAt': claimedAt_example, // {String} Time when the user task instance was claimed.
Evaluated using the logical 'or' operator with the values of the 'claimedFrom' and 'claimedUpTo' parameters if they are specified.

Supports two date formats:
1. yyyy-MM-dd'T'HH:mm:ss.SSS'Z'
2. yyyyMMddHHmmss.SSS

  'claimedFrom': claimedFrom_example, // {String} The start time (inclusive) of the time range when the user task instance was claimed.
Must be less or equal to the value of the 'claimedUpTo' parameter if the latter is specified.
Evaluated using the logical 'or' operator with the value of the 'claimedAt' parameter if the latter is specified.

Supports two date formats:
1. yyyy-MM-dd'T'HH:mm:ss.SSS'Z'
2. yyyyMMddHHmmss.SSS

  'claimedUpTo': claimedUpTo_example, // {String} The end time (inclusive) of the time range when the user task instance was claimed.
Must be greater or equal to the value of the 'claimedFrom' parameter if the latter is specified.
Evaluated using the logical 'or' operator with the value of the 'claimedAt' parameter if the latter is specified.

Supports two date formats:
1. yyyy-MM-dd'T'HH:mm:ss.SSS'Z'
2. yyyyMMddHHmmss.SSS

  'completedAt': completedAt_example, // {String} Time when the user task instance was COMPLETED or CANCELED.
Evaluated using the logical 'or' operator with the values of the 'completedFrom' and 'completedUpTo' parameters if they are specified.

Supports two date formats:
1. yyyy-MM-dd'T'HH:mm:ss.SSS'Z'
2. yyyyMMddHHmmss.SSS

  'completedFrom': completedFrom_example, // {String} The start time (inclusive) of the time range when the user task instance was COMPLETED or CANCELED.
Must be less or equal to the value of the 'completedUpTo' parameter if the latter is specified.
Evaluated using the logical 'or' operator with the value of the 'completedAt' parameter if the latter is specified.

Supports two date formats:
1. yyyy-MM-dd'T'HH:mm:ss.SSS'Z'
2. yyyyMMddHHmmss.SSS

  'completedUpTo': completedUpTo_example, // {String} The end time (inclusive) of the time range when the user task instance was COMPLETED or CANCELED.
Must be greater or equal to the value of the 'completedFrom' parameter if the latter is specified.
Evaluated using the logical 'or' operator with the value of the 'completedAt' parameter if the latter is specified.

Supports two date formats:
1. yyyy-MM-dd'T'HH:mm:ss.SSS'Z'
2. yyyyMMddHHmmss.SSS

  'lastChangedAt': lastChangedAt_example, // {String} Time when the user task instance has been changed for the last time.
Evaluated using the logical 'or' operator with the values of the 'lastChangedFrom' and 'lastChangedTo' parameters if they are specified.

Supports two date formats:
1. yyyy-MM-dd'T'HH:mm:ss.SSS'Z'
2. yyyyMMddHHmmss.SSS

  'lastChangedFrom': lastChangedFrom_example, // {String} The start time (inclusive) of the time range when the user task instance was changed for the last time.
Must be less or equal to the value of the 'lastChangedUpTo' parameter if the latter is specified.
Evaluated using the logical 'or' operator with the value of the 'lastChangedAt' parameter if the latter is specified.

Supports two date formats:
1. yyyy-MM-dd'T'HH:mm:ss.SSS'Z'
2. yyyyMMddHHmmss.SSS

  'lastChangedUpTo': lastChangedUpTo_example, // {String} The end time (inclusive) of the time range when the user task instance was changed for the last time.
Must be greater or equal to the value of the 'lastChangedFrom' parameter if the latter is specified.
Evaluated using the logical 'or' operator with the value of the 'lastChangedAt' parameter if the latter is specified.

Supports two date formats:
1. yyyy-MM-dd'T'HH:mm:ss.SSS'Z'
2. yyyyMMddHHmmss.SSS

  'dueDate': dueDate_example, // {String} The due date of the user task instance.
Evaluated using the logical 'or' operator with the values of the 'dueDateFrom' and 'dueDateUpTo' parameters if they are specified.

Supports two date formats:
1. yyyy-MM-dd'T'HH:mm:ss.SSS'Z'
2. yyyyMMddHHmmss.SSS

  'dueDateFrom': dueDateFrom_example, // {String} The start time (inclusive) of the due date time range for the user task instance.
Must be less or equal to the value of the 'dueDateUpTo' parameter if the latter is specified.
Evaluated using the logical 'or' operator with the value of the 'dueDate' parameter if the latter is specified.

Supports two date formats:
1. yyyy-MM-dd'T'HH:mm:ss.SSS'Z'
2. yyyyMMddHHmmss.SSS

  'dueDateUpTo': dueDateUpTo_example, // {String} The end time (inclusive) of the due date time range for the user task instance.
Must be greater or equal to the 'dueDateFrom' parameter if the latter is specified.
Evaluated using the logical 'or' operator with the value of the 'dueDate' parameter if the latter is specified.

Supports two date formats:
1. yyyy-MM-dd'T'HH:mm:ss.SSS'Z'
2. yyyyMMddHHmmss.SSS

  'priority': priority_example, // {String} The priority of the user task instance.
The values are case-insensitive.

  'status': status_example, // {String} The status of the user task instance.
The values are case-insensitive.

  'recipientUsers': recipientUsers_example, // {String} The users who must be among the recipient users of the user task instance. A user task instance has to match at least one of the recipient users specified.
Specify the users by repeating this parameter multiple times, with one user each.

  'recipientGroups': recipientGroups_example, // {String} The groups which must be among the recipient groups of the user task instance. A user task instance has to match at least one of the recipient groups specified.
Specify the groups by repeating this parameter multiple times, with one user each.

  'containsText': containsText_example, // {String} Text, which should be contained in at least one of the following fields of the user task instance:

 * subject
 * description
 * activityId
 * id
 * processor
 * workflowDefinitionId
 * workflowInstanceId

Performed filtering is case-insensitive. You must not use this parameter more than once.

  'attributes.ExampleCustomAttribute': attributes.ExampleCustomAttribute_example, // {String} Example of a parameter that filters task instances by the value of the custom task attribute with the ID 'ExampleCustomAttribute'.
You can specify parameters for other attributes in an analogous way.
If you specify a parameter several times, the logical operators apply as outlined in the overall description of this API.
If custom task attributes with different IDs are present in the URL, only tasks which contain all of them with the values specified will be returned as a response to the request.
If a query by custom task attributes matches too many task definitions, you have to limit the query further. Refer, for example, to parameter 'definitionId'.

  'definitionId': definitionId_example // {String} The definition ID of the user task.
It consists of the ID of the task defined in the workflow definition (task definition ID) as well as the workflow definition ID delimited by an '@' sign.
For optimal performance, specify this parameter when searching for tasks by custom task attributes.
If the custom task attribute IDs from the query match more than 50 task definitions, you have to specify one or more task definition IDs when searching for tasks by custom task attributes.

};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.v1TaskInstancesGet(opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class v1TaskInstancesGetExample
    {
        public void main()
        {
            
            // Configure OAuth2 access token for authorization: Oauth2_AuthorizationCode
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
            // Configure OAuth2 access token for authorization: Oauth2_ClientCredentials
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new UserTaskInstancesApi();
            var acceptLanguage = acceptLanguage_example;  // String | Provide a preferred language. If a translation is available, relevant texts are returned in this language. (optional) 
            var $skip = 56;  // Integer | The number of records you want to skip from the beginning.
You can skip at most 4000 records. To indicate a result range that starts, for example, at 1001, combine the $skip with the $top parameter.
If not specified, no records are skipped. You can use this parameter only once.
Refer also to the $top parameter. (optional)  (default to 0)
            var $top = 56;  // Integer | The number of records you want to show.
You can get at most 1000 records per API call. To indicate a result range that starts, for example, at 1001, combine the $top with the $skip parameter.
If not specified, 100 records are returned. You can use this parameter only once.
Refer also to the $skip parameter. (optional)  (default to 100)
            var $inlinecount = $inlinecount_example;  // String | Specify whether the total count of the task instances, which match the search criteria, should be returned as a value
of the X-Total-Count response header. To enable the header, use the 'allpages' setting. To disable the header, use the 'none' setting.
The values are case-sensitive. You can use this parameter only once. (optional)  (default to none)
            var $expand = $expand_example;  // String | You can request custom task attributes to become part of the task output by specifying the value 'attributes' for the '$expand' parameter.
Otherwise, if the '$expand' parameter is not specified, the 'attributes' field is not included into task output. Note that labels as well as the order of the custom task attributes in which they are returned, are taken from the latest versions of the workflow definitions where these attributes are present.
 (optional) 
            var $orderby = $orderby_example;  // String | The attribute and direction by which tasks are sorted. The sort attribute and direction are separated by a space.
The parameter value is case-sensitive. You can only specify one ordering parameter, which contains attribute and direction.
To stabilize the order of tasks the implicit second ordering parameter 'createdAt asc' is applied.

 * claimedAt asc - Ascending, task claim time from the oldest to the most recent, tasks with status READY (not yet claimed) first.
 * claimedAt desc - Descending, from the most recently claimed tasks to the oldest ones, tasks with status READY (not yet claimed) last.
 * completedAt asc - Ascending, task completion or cancelation time from the oldest to the most recent, not yet COMPLETED tasks first.
 * completedAt desc - Descending, from the most recently COMPLETED or CANCELED tasks to the oldest ones, not yet COMPLETED tasks last.
 * createdAt asc - Ascending, task creation time from the oldest to the most recent.
 * createdAt desc - Descending, from the most recently created tasks to the oldest ones.
 * lastChangedAt asc - Ascending, task last change time from the oldest to the most recent.
 * lastChangedAt desc - Descending, from the most recently changed tasks to the oldest ones.
 * dueDate asc - Ascending, tasks due date from the oldest to the most distant in future ones, tasks without due date first.
 * dueDate desc - Descending, tasks due date from the most distant in future to the oldest ones, tasks without due date last.
 * subject asc - Ascending, from A to Z case-sensitive.
 * subject desc - Descending, from Z to A case-sensitive.
 * description asc - Ascending, from A to Z case-sensitive, tasks without description first.
 * description desc - Descending, from Z to A case-sensitive, tasks without description last.
 * activityId asc - Ascending, from A to Z case-sensitive.
 * activityId desc - Descending, from Z to A case-sensitive.
 * id asc - Ascending, from A to Z case-sensitive.
 * id desc - Descending, from Z to A case-sensitive.
 * processor asc - Ascending, from A to Z case-sensitive, tasks without processor first.
 * processor desc - Descending, from Z to A case-sensitive, tasks without processor last.
 * workflowDefinitionId asc - Ascending, from A to Z case-sensitive.
 * workflowDefinitionId desc - Descending, from Z to A case-sensitive.
 * workflowInstanceId asc - Ascending, from A to Z case-sensitive.
 * workflowInstanceId desc - Descending, from Z to A case-sensitive.
 * priority asc - Ascending, tasks priority from lowest to highest.
 * priority desc - Descending, tasks priority from highest to lowest. (optional)  (default to createdAt asc)
            var workflowInstanceId = workflowInstanceId_example;  // String | The workflow instance ID for which the user task instances are returned. The workflow instance ID is 36 characters long. (optional) 
            var workflowDefinitionId = workflowDefinitionId_example;  // String | The workflow definition ID for which the user task instances are returned. (optional) 
            var processor = processor_example;  // String | The processor of the user task instance. (optional) 
            var id = id_example;  // String | The unique ID of the user task instance. The user task instance ID is 36 characters long. (optional) 
            var activityId = activityId_example;  // String | The activityId of the user task instance. This field represents the ID of the user task definition. (optional) 
            var description = description_example;  // String | The description of the user task instance in UTF-8 encoding. You must not specify texts that contain commas with this parameter. (optional) 
            var subject = subject_example;  // String | The subject of the user task instance in UTF-8 encoding. You must not specify texts that contain commas with this parameter. (optional) 
            var createdAt = createdAt_example;  // String | Time when the user task instance has been created.
Evaluated using the logical 'or' operator with the values of the 'createdFrom' and 'createdUpTo' parameters if they are specified.

Supports two date formats:
1. yyyy-MM-dd'T'HH:mm:ss.SSS'Z'
2. yyyyMMddHHmmss.SSS
 (optional) 
            var createdFrom = createdFrom_example;  // String | The start time (inclusive) of the time range when the user task instance was created.
Must be less or equal to the value of the 'createdUpTo' parameter if the latter is specified.
Evaluated using the logical 'or' operator with the value of the 'createdAt' parameter if the latter is specified.

Supports two date formats:
1. yyyy-MM-dd'T'HH:mm:ss.SSS'Z'
2. yyyyMMddHHmmss.SSS
 (optional) 
            var createdUpTo = createdUpTo_example;  // String | The end time (inclusive) of the time range when the user task instance was created.
Must be greater or equal to the value of the 'createdFrom' parameter if the latter is specified.
Evaluated using the logical 'or' operator with the value of the 'createdAt' parameter if the latter is specified.

Supports two date formats:
1. yyyy-MM-dd'T'HH:mm:ss.SSS'Z'
2. yyyyMMddHHmmss.SSS
 (optional) 
            var claimedAt = claimedAt_example;  // String | Time when the user task instance was claimed.
Evaluated using the logical 'or' operator with the values of the 'claimedFrom' and 'claimedUpTo' parameters if they are specified.

Supports two date formats:
1. yyyy-MM-dd'T'HH:mm:ss.SSS'Z'
2. yyyyMMddHHmmss.SSS
 (optional) 
            var claimedFrom = claimedFrom_example;  // String | The start time (inclusive) of the time range when the user task instance was claimed.
Must be less or equal to the value of the 'claimedUpTo' parameter if the latter is specified.
Evaluated using the logical 'or' operator with the value of the 'claimedAt' parameter if the latter is specified.

Supports two date formats:
1. yyyy-MM-dd'T'HH:mm:ss.SSS'Z'
2. yyyyMMddHHmmss.SSS
 (optional) 
            var claimedUpTo = claimedUpTo_example;  // String | The end time (inclusive) of the time range when the user task instance was claimed.
Must be greater or equal to the value of the 'claimedFrom' parameter if the latter is specified.
Evaluated using the logical 'or' operator with the value of the 'claimedAt' parameter if the latter is specified.

Supports two date formats:
1. yyyy-MM-dd'T'HH:mm:ss.SSS'Z'
2. yyyyMMddHHmmss.SSS
 (optional) 
            var completedAt = completedAt_example;  // String | Time when the user task instance was COMPLETED or CANCELED.
Evaluated using the logical 'or' operator with the values of the 'completedFrom' and 'completedUpTo' parameters if they are specified.

Supports two date formats:
1. yyyy-MM-dd'T'HH:mm:ss.SSS'Z'
2. yyyyMMddHHmmss.SSS
 (optional) 
            var completedFrom = completedFrom_example;  // String | The start time (inclusive) of the time range when the user task instance was COMPLETED or CANCELED.
Must be less or equal to the value of the 'completedUpTo' parameter if the latter is specified.
Evaluated using the logical 'or' operator with the value of the 'completedAt' parameter if the latter is specified.

Supports two date formats:
1. yyyy-MM-dd'T'HH:mm:ss.SSS'Z'
2. yyyyMMddHHmmss.SSS
 (optional) 
            var completedUpTo = completedUpTo_example;  // String | The end time (inclusive) of the time range when the user task instance was COMPLETED or CANCELED.
Must be greater or equal to the value of the 'completedFrom' parameter if the latter is specified.
Evaluated using the logical 'or' operator with the value of the 'completedAt' parameter if the latter is specified.

Supports two date formats:
1. yyyy-MM-dd'T'HH:mm:ss.SSS'Z'
2. yyyyMMddHHmmss.SSS
 (optional) 
            var lastChangedAt = lastChangedAt_example;  // String | Time when the user task instance has been changed for the last time.
Evaluated using the logical 'or' operator with the values of the 'lastChangedFrom' and 'lastChangedTo' parameters if they are specified.

Supports two date formats:
1. yyyy-MM-dd'T'HH:mm:ss.SSS'Z'
2. yyyyMMddHHmmss.SSS
 (optional) 
            var lastChangedFrom = lastChangedFrom_example;  // String | The start time (inclusive) of the time range when the user task instance was changed for the last time.
Must be less or equal to the value of the 'lastChangedUpTo' parameter if the latter is specified.
Evaluated using the logical 'or' operator with the value of the 'lastChangedAt' parameter if the latter is specified.

Supports two date formats:
1. yyyy-MM-dd'T'HH:mm:ss.SSS'Z'
2. yyyyMMddHHmmss.SSS
 (optional) 
            var lastChangedUpTo = lastChangedUpTo_example;  // String | The end time (inclusive) of the time range when the user task instance was changed for the last time.
Must be greater or equal to the value of the 'lastChangedFrom' parameter if the latter is specified.
Evaluated using the logical 'or' operator with the value of the 'lastChangedAt' parameter if the latter is specified.

Supports two date formats:
1. yyyy-MM-dd'T'HH:mm:ss.SSS'Z'
2. yyyyMMddHHmmss.SSS
 (optional) 
            var dueDate = dueDate_example;  // String | The due date of the user task instance.
Evaluated using the logical 'or' operator with the values of the 'dueDateFrom' and 'dueDateUpTo' parameters if they are specified.

Supports two date formats:
1. yyyy-MM-dd'T'HH:mm:ss.SSS'Z'
2. yyyyMMddHHmmss.SSS
 (optional) 
            var dueDateFrom = dueDateFrom_example;  // String | The start time (inclusive) of the due date time range for the user task instance.
Must be less or equal to the value of the 'dueDateUpTo' parameter if the latter is specified.
Evaluated using the logical 'or' operator with the value of the 'dueDate' parameter if the latter is specified.

Supports two date formats:
1. yyyy-MM-dd'T'HH:mm:ss.SSS'Z'
2. yyyyMMddHHmmss.SSS
 (optional) 
            var dueDateUpTo = dueDateUpTo_example;  // String | The end time (inclusive) of the due date time range for the user task instance.
Must be greater or equal to the 'dueDateFrom' parameter if the latter is specified.
Evaluated using the logical 'or' operator with the value of the 'dueDate' parameter if the latter is specified.

Supports two date formats:
1. yyyy-MM-dd'T'HH:mm:ss.SSS'Z'
2. yyyyMMddHHmmss.SSS
 (optional) 
            var priority = priority_example;  // String | The priority of the user task instance.
The values are case-insensitive.
 (optional) 
            var status = status_example;  // String | The status of the user task instance.
The values are case-insensitive.
 (optional) 
            var recipientUsers = recipientUsers_example;  // String | The users who must be among the recipient users of the user task instance. A user task instance has to match at least one of the recipient users specified.
Specify the users by repeating this parameter multiple times, with one user each.
 (optional) 
            var recipientGroups = recipientGroups_example;  // String | The groups which must be among the recipient groups of the user task instance. A user task instance has to match at least one of the recipient groups specified.
Specify the groups by repeating this parameter multiple times, with one user each.
 (optional) 
            var containsText = containsText_example;  // String | Text, which should be contained in at least one of the following fields of the user task instance:

 * subject
 * description
 * activityId
 * id
 * processor
 * workflowDefinitionId
 * workflowInstanceId

Performed filtering is case-insensitive. You must not use this parameter more than once.
 (optional) 
            var attributes.ExampleCustomAttribute = attributes.ExampleCustomAttribute_example;  // String | Example of a parameter that filters task instances by the value of the custom task attribute with the ID 'ExampleCustomAttribute'.
You can specify parameters for other attributes in an analogous way.
If you specify a parameter several times, the logical operators apply as outlined in the overall description of this API.
If custom task attributes with different IDs are present in the URL, only tasks which contain all of them with the values specified will be returned as a response to the request.
If a query by custom task attributes matches too many task definitions, you have to limit the query further. Refer, for example, to parameter 'definitionId'.
 (optional) 
            var definitionId = definitionId_example;  // String | The definition ID of the user task.
It consists of the ID of the task defined in the workflow definition (task definition ID) as well as the workflow definition ID delimited by an '@' sign.
For optimal performance, specify this parameter when searching for tasks by custom task attributes.
If the custom task attribute IDs from the query match more than 50 task definitions, you have to specify one or more task definition IDs when searching for tasks by custom task attributes.
 (optional) 

            try
            {
                // Retrieve instances by query parameters
                array[TaskInstance] result = apiInstance.v1TaskInstancesGet(acceptLanguage, $skip, $top, $inlinecount, $expand, $orderby, workflowInstanceId, workflowDefinitionId, processor, id, activityId, description, subject, createdAt, createdFrom, createdUpTo, claimedAt, claimedFrom, claimedUpTo, completedAt, completedFrom, completedUpTo, lastChangedAt, lastChangedFrom, lastChangedUpTo, dueDate, dueDateFrom, dueDateUpTo, priority, status, recipientUsers, recipientGroups, containsText, attributes.ExampleCustomAttribute, definitionId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling UserTaskInstancesApi.v1TaskInstancesGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: Oauth2_AuthorizationCode
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
// Configure OAuth2 access token for authorization: Oauth2_ClientCredentials
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new Swagger\Client\Api\UserTaskInstancesApi();
$acceptLanguage = acceptLanguage_example; // String | Provide a preferred language. If a translation is available, relevant texts are returned in this language.
$$skip = 56; // Integer | The number of records you want to skip from the beginning.
You can skip at most 4000 records. To indicate a result range that starts, for example, at 1001, combine the $skip with the $top parameter.
If not specified, no records are skipped. You can use this parameter only once.
Refer also to the $top parameter.
$$top = 56; // Integer | The number of records you want to show.
You can get at most 1000 records per API call. To indicate a result range that starts, for example, at 1001, combine the $top with the $skip parameter.
If not specified, 100 records are returned. You can use this parameter only once.
Refer also to the $skip parameter.
$$inlinecount = $inlinecount_example; // String | Specify whether the total count of the task instances, which match the search criteria, should be returned as a value
of the X-Total-Count response header. To enable the header, use the 'allpages' setting. To disable the header, use the 'none' setting.
The values are case-sensitive. You can use this parameter only once.
$$expand = $expand_example; // String | You can request custom task attributes to become part of the task output by specifying the value 'attributes' for the '$expand' parameter.
Otherwise, if the '$expand' parameter is not specified, the 'attributes' field is not included into task output. Note that labels as well as the order of the custom task attributes in which they are returned, are taken from the latest versions of the workflow definitions where these attributes are present.

$$orderby = $orderby_example; // String | The attribute and direction by which tasks are sorted. The sort attribute and direction are separated by a space.
The parameter value is case-sensitive. You can only specify one ordering parameter, which contains attribute and direction.
To stabilize the order of tasks the implicit second ordering parameter 'createdAt asc' is applied.

 * claimedAt asc - Ascending, task claim time from the oldest to the most recent, tasks with status READY (not yet claimed) first.
 * claimedAt desc - Descending, from the most recently claimed tasks to the oldest ones, tasks with status READY (not yet claimed) last.
 * completedAt asc - Ascending, task completion or cancelation time from the oldest to the most recent, not yet COMPLETED tasks first.
 * completedAt desc - Descending, from the most recently COMPLETED or CANCELED tasks to the oldest ones, not yet COMPLETED tasks last.
 * createdAt asc - Ascending, task creation time from the oldest to the most recent.
 * createdAt desc - Descending, from the most recently created tasks to the oldest ones.
 * lastChangedAt asc - Ascending, task last change time from the oldest to the most recent.
 * lastChangedAt desc - Descending, from the most recently changed tasks to the oldest ones.
 * dueDate asc - Ascending, tasks due date from the oldest to the most distant in future ones, tasks without due date first.
 * dueDate desc - Descending, tasks due date from the most distant in future to the oldest ones, tasks without due date last.
 * subject asc - Ascending, from A to Z case-sensitive.
 * subject desc - Descending, from Z to A case-sensitive.
 * description asc - Ascending, from A to Z case-sensitive, tasks without description first.
 * description desc - Descending, from Z to A case-sensitive, tasks without description last.
 * activityId asc - Ascending, from A to Z case-sensitive.
 * activityId desc - Descending, from Z to A case-sensitive.
 * id asc - Ascending, from A to Z case-sensitive.
 * id desc - Descending, from Z to A case-sensitive.
 * processor asc - Ascending, from A to Z case-sensitive, tasks without processor first.
 * processor desc - Descending, from Z to A case-sensitive, tasks without processor last.
 * workflowDefinitionId asc - Ascending, from A to Z case-sensitive.
 * workflowDefinitionId desc - Descending, from Z to A case-sensitive.
 * workflowInstanceId asc - Ascending, from A to Z case-sensitive.
 * workflowInstanceId desc - Descending, from Z to A case-sensitive.
 * priority asc - Ascending, tasks priority from lowest to highest.
 * priority desc - Descending, tasks priority from highest to lowest.
$workflowInstanceId = workflowInstanceId_example; // String | The workflow instance ID for which the user task instances are returned. The workflow instance ID is 36 characters long.
$workflowDefinitionId = workflowDefinitionId_example; // String | The workflow definition ID for which the user task instances are returned.
$processor = processor_example; // String | The processor of the user task instance.
$id = id_example; // String | The unique ID of the user task instance. The user task instance ID is 36 characters long.
$activityId = activityId_example; // String | The activityId of the user task instance. This field represents the ID of the user task definition.
$description = description_example; // String | The description of the user task instance in UTF-8 encoding. You must not specify texts that contain commas with this parameter.
$subject = subject_example; // String | The subject of the user task instance in UTF-8 encoding. You must not specify texts that contain commas with this parameter.
$createdAt = createdAt_example; // String | Time when the user task instance has been created.
Evaluated using the logical 'or' operator with the values of the 'createdFrom' and 'createdUpTo' parameters if they are specified.

Supports two date formats:
1. yyyy-MM-dd'T'HH:mm:ss.SSS'Z'
2. yyyyMMddHHmmss.SSS

$createdFrom = createdFrom_example; // String | The start time (inclusive) of the time range when the user task instance was created.
Must be less or equal to the value of the 'createdUpTo' parameter if the latter is specified.
Evaluated using the logical 'or' operator with the value of the 'createdAt' parameter if the latter is specified.

Supports two date formats:
1. yyyy-MM-dd'T'HH:mm:ss.SSS'Z'
2. yyyyMMddHHmmss.SSS

$createdUpTo = createdUpTo_example; // String | The end time (inclusive) of the time range when the user task instance was created.
Must be greater or equal to the value of the 'createdFrom' parameter if the latter is specified.
Evaluated using the logical 'or' operator with the value of the 'createdAt' parameter if the latter is specified.

Supports two date formats:
1. yyyy-MM-dd'T'HH:mm:ss.SSS'Z'
2. yyyyMMddHHmmss.SSS

$claimedAt = claimedAt_example; // String | Time when the user task instance was claimed.
Evaluated using the logical 'or' operator with the values of the 'claimedFrom' and 'claimedUpTo' parameters if they are specified.

Supports two date formats:
1. yyyy-MM-dd'T'HH:mm:ss.SSS'Z'
2. yyyyMMddHHmmss.SSS

$claimedFrom = claimedFrom_example; // String | The start time (inclusive) of the time range when the user task instance was claimed.
Must be less or equal to the value of the 'claimedUpTo' parameter if the latter is specified.
Evaluated using the logical 'or' operator with the value of the 'claimedAt' parameter if the latter is specified.

Supports two date formats:
1. yyyy-MM-dd'T'HH:mm:ss.SSS'Z'
2. yyyyMMddHHmmss.SSS

$claimedUpTo = claimedUpTo_example; // String | The end time (inclusive) of the time range when the user task instance was claimed.
Must be greater or equal to the value of the 'claimedFrom' parameter if the latter is specified.
Evaluated using the logical 'or' operator with the value of the 'claimedAt' parameter if the latter is specified.

Supports two date formats:
1. yyyy-MM-dd'T'HH:mm:ss.SSS'Z'
2. yyyyMMddHHmmss.SSS

$completedAt = completedAt_example; // String | Time when the user task instance was COMPLETED or CANCELED.
Evaluated using the logical 'or' operator with the values of the 'completedFrom' and 'completedUpTo' parameters if they are specified.

Supports two date formats:
1. yyyy-MM-dd'T'HH:mm:ss.SSS'Z'
2. yyyyMMddHHmmss.SSS

$completedFrom = completedFrom_example; // String | The start time (inclusive) of the time range when the user task instance was COMPLETED or CANCELED.
Must be less or equal to the value of the 'completedUpTo' parameter if the latter is specified.
Evaluated using the logical 'or' operator with the value of the 'completedAt' parameter if the latter is specified.

Supports two date formats:
1. yyyy-MM-dd'T'HH:mm:ss.SSS'Z'
2. yyyyMMddHHmmss.SSS

$completedUpTo = completedUpTo_example; // String | The end time (inclusive) of the time range when the user task instance was COMPLETED or CANCELED.
Must be greater or equal to the value of the 'completedFrom' parameter if the latter is specified.
Evaluated using the logical 'or' operator with the value of the 'completedAt' parameter if the latter is specified.

Supports two date formats:
1. yyyy-MM-dd'T'HH:mm:ss.SSS'Z'
2. yyyyMMddHHmmss.SSS

$lastChangedAt = lastChangedAt_example; // String | Time when the user task instance has been changed for the last time.
Evaluated using the logical 'or' operator with the values of the 'lastChangedFrom' and 'lastChangedTo' parameters if they are specified.

Supports two date formats:
1. yyyy-MM-dd'T'HH:mm:ss.SSS'Z'
2. yyyyMMddHHmmss.SSS

$lastChangedFrom = lastChangedFrom_example; // String | The start time (inclusive) of the time range when the user task instance was changed for the last time.
Must be less or equal to the value of the 'lastChangedUpTo' parameter if the latter is specified.
Evaluated using the logical 'or' operator with the value of the 'lastChangedAt' parameter if the latter is specified.

Supports two date formats:
1. yyyy-MM-dd'T'HH:mm:ss.SSS'Z'
2. yyyyMMddHHmmss.SSS

$lastChangedUpTo = lastChangedUpTo_example; // String | The end time (inclusive) of the time range when the user task instance was changed for the last time.
Must be greater or equal to the value of the 'lastChangedFrom' parameter if the latter is specified.
Evaluated using the logical 'or' operator with the value of the 'lastChangedAt' parameter if the latter is specified.

Supports two date formats:
1. yyyy-MM-dd'T'HH:mm:ss.SSS'Z'
2. yyyyMMddHHmmss.SSS

$dueDate = dueDate_example; // String | The due date of the user task instance.
Evaluated using the logical 'or' operator with the values of the 'dueDateFrom' and 'dueDateUpTo' parameters if they are specified.

Supports two date formats:
1. yyyy-MM-dd'T'HH:mm:ss.SSS'Z'
2. yyyyMMddHHmmss.SSS

$dueDateFrom = dueDateFrom_example; // String | The start time (inclusive) of the due date time range for the user task instance.
Must be less or equal to the value of the 'dueDateUpTo' parameter if the latter is specified.
Evaluated using the logical 'or' operator with the value of the 'dueDate' parameter if the latter is specified.

Supports two date formats:
1. yyyy-MM-dd'T'HH:mm:ss.SSS'Z'
2. yyyyMMddHHmmss.SSS

$dueDateUpTo = dueDateUpTo_example; // String | The end time (inclusive) of the due date time range for the user task instance.
Must be greater or equal to the 'dueDateFrom' parameter if the latter is specified.
Evaluated using the logical 'or' operator with the value of the 'dueDate' parameter if the latter is specified.

Supports two date formats:
1. yyyy-MM-dd'T'HH:mm:ss.SSS'Z'
2. yyyyMMddHHmmss.SSS

$priority = priority_example; // String | The priority of the user task instance.
The values are case-insensitive.

$status = status_example; // String | The status of the user task instance.
The values are case-insensitive.

$recipientUsers = recipientUsers_example; // String | The users who must be among the recipient users of the user task instance. A user task instance has to match at least one of the recipient users specified.
Specify the users by repeating this parameter multiple times, with one user each.

$recipientGroups = recipientGroups_example; // String | The groups which must be among the recipient groups of the user task instance. A user task instance has to match at least one of the recipient groups specified.
Specify the groups by repeating this parameter multiple times, with one user each.

$containsText = containsText_example; // String | Text, which should be contained in at least one of the following fields of the user task instance:

 * subject
 * description
 * activityId
 * id
 * processor
 * workflowDefinitionId
 * workflowInstanceId

Performed filtering is case-insensitive. You must not use this parameter more than once.

$attributes.ExampleCustomAttribute = attributes.ExampleCustomAttribute_example; // String | Example of a parameter that filters task instances by the value of the custom task attribute with the ID 'ExampleCustomAttribute'.
You can specify parameters for other attributes in an analogous way.
If you specify a parameter several times, the logical operators apply as outlined in the overall description of this API.
If custom task attributes with different IDs are present in the URL, only tasks which contain all of them with the values specified will be returned as a response to the request.
If a query by custom task attributes matches too many task definitions, you have to limit the query further. Refer, for example, to parameter 'definitionId'.

$definitionId = definitionId_example; // String | The definition ID of the user task.
It consists of the ID of the task defined in the workflow definition (task definition ID) as well as the workflow definition ID delimited by an '@' sign.
For optimal performance, specify this parameter when searching for tasks by custom task attributes.
If the custom task attribute IDs from the query match more than 50 task definitions, you have to specify one or more task definition IDs when searching for tasks by custom task attributes.


try {
    $result = $api_instance->v1TaskInstancesGet($acceptLanguage, $$skip, $$top, $$inlinecount, $$expand, $$orderby, $workflowInstanceId, $workflowDefinitionId, $processor, $id, $activityId, $description, $subject, $createdAt, $createdFrom, $createdUpTo, $claimedAt, $claimedFrom, $claimedUpTo, $completedAt, $completedFrom, $completedUpTo, $lastChangedAt, $lastChangedFrom, $lastChangedUpTo, $dueDate, $dueDateFrom, $dueDateUpTo, $priority, $status, $recipientUsers, $recipientGroups, $containsText, $attributes.ExampleCustomAttribute, $definitionId);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling UserTaskInstancesApi->v1TaskInstancesGet: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::UserTaskInstancesApi;

# Configure OAuth2 access token for authorization: Oauth2_AuthorizationCode
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
# Configure OAuth2 access token for authorization: Oauth2_ClientCredentials
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::SwaggerClient::UserTaskInstancesApi->new();
my $acceptLanguage = acceptLanguage_example; # String | Provide a preferred language. If a translation is available, relevant texts are returned in this language.
my $$skip = 56; # Integer | The number of records you want to skip from the beginning.
You can skip at most 4000 records. To indicate a result range that starts, for example, at 1001, combine the $skip with the $top parameter.
If not specified, no records are skipped. You can use this parameter only once.
Refer also to the $top parameter.
my $$top = 56; # Integer | The number of records you want to show.
You can get at most 1000 records per API call. To indicate a result range that starts, for example, at 1001, combine the $top with the $skip parameter.
If not specified, 100 records are returned. You can use this parameter only once.
Refer also to the $skip parameter.
my $$inlinecount = $inlinecount_example; # String | Specify whether the total count of the task instances, which match the search criteria, should be returned as a value
of the X-Total-Count response header. To enable the header, use the 'allpages' setting. To disable the header, use the 'none' setting.
The values are case-sensitive. You can use this parameter only once.
my $$expand = $expand_example; # String | You can request custom task attributes to become part of the task output by specifying the value 'attributes' for the '$expand' parameter.
Otherwise, if the '$expand' parameter is not specified, the 'attributes' field is not included into task output. Note that labels as well as the order of the custom task attributes in which they are returned, are taken from the latest versions of the workflow definitions where these attributes are present.

my $$orderby = $orderby_example; # String | The attribute and direction by which tasks are sorted. The sort attribute and direction are separated by a space.
The parameter value is case-sensitive. You can only specify one ordering parameter, which contains attribute and direction.
To stabilize the order of tasks the implicit second ordering parameter 'createdAt asc' is applied.

 * claimedAt asc - Ascending, task claim time from the oldest to the most recent, tasks with status READY (not yet claimed) first.
 * claimedAt desc - Descending, from the most recently claimed tasks to the oldest ones, tasks with status READY (not yet claimed) last.
 * completedAt asc - Ascending, task completion or cancelation time from the oldest to the most recent, not yet COMPLETED tasks first.
 * completedAt desc - Descending, from the most recently COMPLETED or CANCELED tasks to the oldest ones, not yet COMPLETED tasks last.
 * createdAt asc - Ascending, task creation time from the oldest to the most recent.
 * createdAt desc - Descending, from the most recently created tasks to the oldest ones.
 * lastChangedAt asc - Ascending, task last change time from the oldest to the most recent.
 * lastChangedAt desc - Descending, from the most recently changed tasks to the oldest ones.
 * dueDate asc - Ascending, tasks due date from the oldest to the most distant in future ones, tasks without due date first.
 * dueDate desc - Descending, tasks due date from the most distant in future to the oldest ones, tasks without due date last.
 * subject asc - Ascending, from A to Z case-sensitive.
 * subject desc - Descending, from Z to A case-sensitive.
 * description asc - Ascending, from A to Z case-sensitive, tasks without description first.
 * description desc - Descending, from Z to A case-sensitive, tasks without description last.
 * activityId asc - Ascending, from A to Z case-sensitive.
 * activityId desc - Descending, from Z to A case-sensitive.
 * id asc - Ascending, from A to Z case-sensitive.
 * id desc - Descending, from Z to A case-sensitive.
 * processor asc - Ascending, from A to Z case-sensitive, tasks without processor first.
 * processor desc - Descending, from Z to A case-sensitive, tasks without processor last.
 * workflowDefinitionId asc - Ascending, from A to Z case-sensitive.
 * workflowDefinitionId desc - Descending, from Z to A case-sensitive.
 * workflowInstanceId asc - Ascending, from A to Z case-sensitive.
 * workflowInstanceId desc - Descending, from Z to A case-sensitive.
 * priority asc - Ascending, tasks priority from lowest to highest.
 * priority desc - Descending, tasks priority from highest to lowest.
my $workflowInstanceId = workflowInstanceId_example; # String | The workflow instance ID for which the user task instances are returned. The workflow instance ID is 36 characters long.
my $workflowDefinitionId = workflowDefinitionId_example; # String | The workflow definition ID for which the user task instances are returned.
my $processor = processor_example; # String | The processor of the user task instance.
my $id = id_example; # String | The unique ID of the user task instance. The user task instance ID is 36 characters long.
my $activityId = activityId_example; # String | The activityId of the user task instance. This field represents the ID of the user task definition.
my $description = description_example; # String | The description of the user task instance in UTF-8 encoding. You must not specify texts that contain commas with this parameter.
my $subject = subject_example; # String | The subject of the user task instance in UTF-8 encoding. You must not specify texts that contain commas with this parameter.
my $createdAt = createdAt_example; # String | Time when the user task instance has been created.
Evaluated using the logical 'or' operator with the values of the 'createdFrom' and 'createdUpTo' parameters if they are specified.

Supports two date formats:
1. yyyy-MM-dd'T'HH:mm:ss.SSS'Z'
2. yyyyMMddHHmmss.SSS

my $createdFrom = createdFrom_example; # String | The start time (inclusive) of the time range when the user task instance was created.
Must be less or equal to the value of the 'createdUpTo' parameter if the latter is specified.
Evaluated using the logical 'or' operator with the value of the 'createdAt' parameter if the latter is specified.

Supports two date formats:
1. yyyy-MM-dd'T'HH:mm:ss.SSS'Z'
2. yyyyMMddHHmmss.SSS

my $createdUpTo = createdUpTo_example; # String | The end time (inclusive) of the time range when the user task instance was created.
Must be greater or equal to the value of the 'createdFrom' parameter if the latter is specified.
Evaluated using the logical 'or' operator with the value of the 'createdAt' parameter if the latter is specified.

Supports two date formats:
1. yyyy-MM-dd'T'HH:mm:ss.SSS'Z'
2. yyyyMMddHHmmss.SSS

my $claimedAt = claimedAt_example; # String | Time when the user task instance was claimed.
Evaluated using the logical 'or' operator with the values of the 'claimedFrom' and 'claimedUpTo' parameters if they are specified.

Supports two date formats:
1. yyyy-MM-dd'T'HH:mm:ss.SSS'Z'
2. yyyyMMddHHmmss.SSS

my $claimedFrom = claimedFrom_example; # String | The start time (inclusive) of the time range when the user task instance was claimed.
Must be less or equal to the value of the 'claimedUpTo' parameter if the latter is specified.
Evaluated using the logical 'or' operator with the value of the 'claimedAt' parameter if the latter is specified.

Supports two date formats:
1. yyyy-MM-dd'T'HH:mm:ss.SSS'Z'
2. yyyyMMddHHmmss.SSS

my $claimedUpTo = claimedUpTo_example; # String | The end time (inclusive) of the time range when the user task instance was claimed.
Must be greater or equal to the value of the 'claimedFrom' parameter if the latter is specified.
Evaluated using the logical 'or' operator with the value of the 'claimedAt' parameter if the latter is specified.

Supports two date formats:
1. yyyy-MM-dd'T'HH:mm:ss.SSS'Z'
2. yyyyMMddHHmmss.SSS

my $completedAt = completedAt_example; # String | Time when the user task instance was COMPLETED or CANCELED.
Evaluated using the logical 'or' operator with the values of the 'completedFrom' and 'completedUpTo' parameters if they are specified.

Supports two date formats:
1. yyyy-MM-dd'T'HH:mm:ss.SSS'Z'
2. yyyyMMddHHmmss.SSS

my $completedFrom = completedFrom_example; # String | The start time (inclusive) of the time range when the user task instance was COMPLETED or CANCELED.
Must be less or equal to the value of the 'completedUpTo' parameter if the latter is specified.
Evaluated using the logical 'or' operator with the value of the 'completedAt' parameter if the latter is specified.

Supports two date formats:
1. yyyy-MM-dd'T'HH:mm:ss.SSS'Z'
2. yyyyMMddHHmmss.SSS

my $completedUpTo = completedUpTo_example; # String | The end time (inclusive) of the time range when the user task instance was COMPLETED or CANCELED.
Must be greater or equal to the value of the 'completedFrom' parameter if the latter is specified.
Evaluated using the logical 'or' operator with the value of the 'completedAt' parameter if the latter is specified.

Supports two date formats:
1. yyyy-MM-dd'T'HH:mm:ss.SSS'Z'
2. yyyyMMddHHmmss.SSS

my $lastChangedAt = lastChangedAt_example; # String | Time when the user task instance has been changed for the last time.
Evaluated using the logical 'or' operator with the values of the 'lastChangedFrom' and 'lastChangedTo' parameters if they are specified.

Supports two date formats:
1. yyyy-MM-dd'T'HH:mm:ss.SSS'Z'
2. yyyyMMddHHmmss.SSS

my $lastChangedFrom = lastChangedFrom_example; # String | The start time (inclusive) of the time range when the user task instance was changed for the last time.
Must be less or equal to the value of the 'lastChangedUpTo' parameter if the latter is specified.
Evaluated using the logical 'or' operator with the value of the 'lastChangedAt' parameter if the latter is specified.

Supports two date formats:
1. yyyy-MM-dd'T'HH:mm:ss.SSS'Z'
2. yyyyMMddHHmmss.SSS

my $lastChangedUpTo = lastChangedUpTo_example; # String | The end time (inclusive) of the time range when the user task instance was changed for the last time.
Must be greater or equal to the value of the 'lastChangedFrom' parameter if the latter is specified.
Evaluated using the logical 'or' operator with the value of the 'lastChangedAt' parameter if the latter is specified.

Supports two date formats:
1. yyyy-MM-dd'T'HH:mm:ss.SSS'Z'
2. yyyyMMddHHmmss.SSS

my $dueDate = dueDate_example; # String | The due date of the user task instance.
Evaluated using the logical 'or' operator with the values of the 'dueDateFrom' and 'dueDateUpTo' parameters if they are specified.

Supports two date formats:
1. yyyy-MM-dd'T'HH:mm:ss.SSS'Z'
2. yyyyMMddHHmmss.SSS

my $dueDateFrom = dueDateFrom_example; # String | The start time (inclusive) of the due date time range for the user task instance.
Must be less or equal to the value of the 'dueDateUpTo' parameter if the latter is specified.
Evaluated using the logical 'or' operator with the value of the 'dueDate' parameter if the latter is specified.

Supports two date formats:
1. yyyy-MM-dd'T'HH:mm:ss.SSS'Z'
2. yyyyMMddHHmmss.SSS

my $dueDateUpTo = dueDateUpTo_example; # String | The end time (inclusive) of the due date time range for the user task instance.
Must be greater or equal to the 'dueDateFrom' parameter if the latter is specified.
Evaluated using the logical 'or' operator with the value of the 'dueDate' parameter if the latter is specified.

Supports two date formats:
1. yyyy-MM-dd'T'HH:mm:ss.SSS'Z'
2. yyyyMMddHHmmss.SSS

my $priority = priority_example; # String | The priority of the user task instance.
The values are case-insensitive.

my $status = status_example; # String | The status of the user task instance.
The values are case-insensitive.

my $recipientUsers = recipientUsers_example; # String | The users who must be among the recipient users of the user task instance. A user task instance has to match at least one of the recipient users specified.
Specify the users by repeating this parameter multiple times, with one user each.

my $recipientGroups = recipientGroups_example; # String | The groups which must be among the recipient groups of the user task instance. A user task instance has to match at least one of the recipient groups specified.
Specify the groups by repeating this parameter multiple times, with one user each.

my $containsText = containsText_example; # String | Text, which should be contained in at least one of the following fields of the user task instance:

 * subject
 * description
 * activityId
 * id
 * processor
 * workflowDefinitionId
 * workflowInstanceId

Performed filtering is case-insensitive. You must not use this parameter more than once.

my $attributes.ExampleCustomAttribute = attributes.ExampleCustomAttribute_example; # String | Example of a parameter that filters task instances by the value of the custom task attribute with the ID 'ExampleCustomAttribute'.
You can specify parameters for other attributes in an analogous way.
If you specify a parameter several times, the logical operators apply as outlined in the overall description of this API.
If custom task attributes with different IDs are present in the URL, only tasks which contain all of them with the values specified will be returned as a response to the request.
If a query by custom task attributes matches too many task definitions, you have to limit the query further. Refer, for example, to parameter 'definitionId'.

my $definitionId = definitionId_example; # String | The definition ID of the user task.
It consists of the ID of the task defined in the workflow definition (task definition ID) as well as the workflow definition ID delimited by an '@' sign.
For optimal performance, specify this parameter when searching for tasks by custom task attributes.
If the custom task attribute IDs from the query match more than 50 task definitions, you have to specify one or more task definition IDs when searching for tasks by custom task attributes.


eval { 
    my $result = $api_instance->v1TaskInstancesGet(acceptLanguage => $acceptLanguage, $skip => $$skip, $top => $$top, $inlinecount => $$inlinecount, $expand => $$expand, $orderby => $$orderby, workflowInstanceId => $workflowInstanceId, workflowDefinitionId => $workflowDefinitionId, processor => $processor, id => $id, activityId => $activityId, description => $description, subject => $subject, createdAt => $createdAt, createdFrom => $createdFrom, createdUpTo => $createdUpTo, claimedAt => $claimedAt, claimedFrom => $claimedFrom, claimedUpTo => $claimedUpTo, completedAt => $completedAt, completedFrom => $completedFrom, completedUpTo => $completedUpTo, lastChangedAt => $lastChangedAt, lastChangedFrom => $lastChangedFrom, lastChangedUpTo => $lastChangedUpTo, dueDate => $dueDate, dueDateFrom => $dueDateFrom, dueDateUpTo => $dueDateUpTo, priority => $priority, status => $status, recipientUsers => $recipientUsers, recipientGroups => $recipientGroups, containsText => $containsText, attributes.ExampleCustomAttribute => $attributes.ExampleCustomAttribute, definitionId => $definitionId);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling UserTaskInstancesApi->v1TaskInstancesGet: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: Oauth2_AuthorizationCode
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure OAuth2 access token for authorization: Oauth2_ClientCredentials
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.UserTaskInstancesApi()
acceptLanguage = acceptLanguage_example # String | Provide a preferred language. If a translation is available, relevant texts are returned in this language. (optional)
$skip = 56 # Integer | The number of records you want to skip from the beginning.
You can skip at most 4000 records. To indicate a result range that starts, for example, at 1001, combine the $skip with the $top parameter.
If not specified, no records are skipped. You can use this parameter only once.
Refer also to the $top parameter. (optional) (default to 0)
$top = 56 # Integer | The number of records you want to show.
You can get at most 1000 records per API call. To indicate a result range that starts, for example, at 1001, combine the $top with the $skip parameter.
If not specified, 100 records are returned. You can use this parameter only once.
Refer also to the $skip parameter. (optional) (default to 100)
$inlinecount = $inlinecount_example # String | Specify whether the total count of the task instances, which match the search criteria, should be returned as a value
of the X-Total-Count response header. To enable the header, use the 'allpages' setting. To disable the header, use the 'none' setting.
The values are case-sensitive. You can use this parameter only once. (optional) (default to none)
$expand = $expand_example # String | You can request custom task attributes to become part of the task output by specifying the value 'attributes' for the '$expand' parameter.
Otherwise, if the '$expand' parameter is not specified, the 'attributes' field is not included into task output. Note that labels as well as the order of the custom task attributes in which they are returned, are taken from the latest versions of the workflow definitions where these attributes are present.
 (optional)
$orderby = $orderby_example # String | The attribute and direction by which tasks are sorted. The sort attribute and direction are separated by a space.
The parameter value is case-sensitive. You can only specify one ordering parameter, which contains attribute and direction.
To stabilize the order of tasks the implicit second ordering parameter 'createdAt asc' is applied.

 * claimedAt asc - Ascending, task claim time from the oldest to the most recent, tasks with status READY (not yet claimed) first.
 * claimedAt desc - Descending, from the most recently claimed tasks to the oldest ones, tasks with status READY (not yet claimed) last.
 * completedAt asc - Ascending, task completion or cancelation time from the oldest to the most recent, not yet COMPLETED tasks first.
 * completedAt desc - Descending, from the most recently COMPLETED or CANCELED tasks to the oldest ones, not yet COMPLETED tasks last.
 * createdAt asc - Ascending, task creation time from the oldest to the most recent.
 * createdAt desc - Descending, from the most recently created tasks to the oldest ones.
 * lastChangedAt asc - Ascending, task last change time from the oldest to the most recent.
 * lastChangedAt desc - Descending, from the most recently changed tasks to the oldest ones.
 * dueDate asc - Ascending, tasks due date from the oldest to the most distant in future ones, tasks without due date first.
 * dueDate desc - Descending, tasks due date from the most distant in future to the oldest ones, tasks without due date last.
 * subject asc - Ascending, from A to Z case-sensitive.
 * subject desc - Descending, from Z to A case-sensitive.
 * description asc - Ascending, from A to Z case-sensitive, tasks without description first.
 * description desc - Descending, from Z to A case-sensitive, tasks without description last.
 * activityId asc - Ascending, from A to Z case-sensitive.
 * activityId desc - Descending, from Z to A case-sensitive.
 * id asc - Ascending, from A to Z case-sensitive.
 * id desc - Descending, from Z to A case-sensitive.
 * processor asc - Ascending, from A to Z case-sensitive, tasks without processor first.
 * processor desc - Descending, from Z to A case-sensitive, tasks without processor last.
 * workflowDefinitionId asc - Ascending, from A to Z case-sensitive.
 * workflowDefinitionId desc - Descending, from Z to A case-sensitive.
 * workflowInstanceId asc - Ascending, from A to Z case-sensitive.
 * workflowInstanceId desc - Descending, from Z to A case-sensitive.
 * priority asc - Ascending, tasks priority from lowest to highest.
 * priority desc - Descending, tasks priority from highest to lowest. (optional) (default to createdAt asc)
workflowInstanceId = workflowInstanceId_example # String | The workflow instance ID for which the user task instances are returned. The workflow instance ID is 36 characters long. (optional)
workflowDefinitionId = workflowDefinitionId_example # String | The workflow definition ID for which the user task instances are returned. (optional)
processor = processor_example # String | The processor of the user task instance. (optional)
id = id_example # String | The unique ID of the user task instance. The user task instance ID is 36 characters long. (optional)
activityId = activityId_example # String | The activityId of the user task instance. This field represents the ID of the user task definition. (optional)
description = description_example # String | The description of the user task instance in UTF-8 encoding. You must not specify texts that contain commas with this parameter. (optional)
subject = subject_example # String | The subject of the user task instance in UTF-8 encoding. You must not specify texts that contain commas with this parameter. (optional)
createdAt = createdAt_example # String | Time when the user task instance has been created.
Evaluated using the logical 'or' operator with the values of the 'createdFrom' and 'createdUpTo' parameters if they are specified.

Supports two date formats:
1. yyyy-MM-dd'T'HH:mm:ss.SSS'Z'
2. yyyyMMddHHmmss.SSS
 (optional)
createdFrom = createdFrom_example # String | The start time (inclusive) of the time range when the user task instance was created.
Must be less or equal to the value of the 'createdUpTo' parameter if the latter is specified.
Evaluated using the logical 'or' operator with the value of the 'createdAt' parameter if the latter is specified.

Supports two date formats:
1. yyyy-MM-dd'T'HH:mm:ss.SSS'Z'
2. yyyyMMddHHmmss.SSS
 (optional)
createdUpTo = createdUpTo_example # String | The end time (inclusive) of the time range when the user task instance was created.
Must be greater or equal to the value of the 'createdFrom' parameter if the latter is specified.
Evaluated using the logical 'or' operator with the value of the 'createdAt' parameter if the latter is specified.

Supports two date formats:
1. yyyy-MM-dd'T'HH:mm:ss.SSS'Z'
2. yyyyMMddHHmmss.SSS
 (optional)
claimedAt = claimedAt_example # String | Time when the user task instance was claimed.
Evaluated using the logical 'or' operator with the values of the 'claimedFrom' and 'claimedUpTo' parameters if they are specified.

Supports two date formats:
1. yyyy-MM-dd'T'HH:mm:ss.SSS'Z'
2. yyyyMMddHHmmss.SSS
 (optional)
claimedFrom = claimedFrom_example # String | The start time (inclusive) of the time range when the user task instance was claimed.
Must be less or equal to the value of the 'claimedUpTo' parameter if the latter is specified.
Evaluated using the logical 'or' operator with the value of the 'claimedAt' parameter if the latter is specified.

Supports two date formats:
1. yyyy-MM-dd'T'HH:mm:ss.SSS'Z'
2. yyyyMMddHHmmss.SSS
 (optional)
claimedUpTo = claimedUpTo_example # String | The end time (inclusive) of the time range when the user task instance was claimed.
Must be greater or equal to the value of the 'claimedFrom' parameter if the latter is specified.
Evaluated using the logical 'or' operator with the value of the 'claimedAt' parameter if the latter is specified.

Supports two date formats:
1. yyyy-MM-dd'T'HH:mm:ss.SSS'Z'
2. yyyyMMddHHmmss.SSS
 (optional)
completedAt = completedAt_example # String | Time when the user task instance was COMPLETED or CANCELED.
Evaluated using the logical 'or' operator with the values of the 'completedFrom' and 'completedUpTo' parameters if they are specified.

Supports two date formats:
1. yyyy-MM-dd'T'HH:mm:ss.SSS'Z'
2. yyyyMMddHHmmss.SSS
 (optional)
completedFrom = completedFrom_example # String | The start time (inclusive) of the time range when the user task instance was COMPLETED or CANCELED.
Must be less or equal to the value of the 'completedUpTo' parameter if the latter is specified.
Evaluated using the logical 'or' operator with the value of the 'completedAt' parameter if the latter is specified.

Supports two date formats:
1. yyyy-MM-dd'T'HH:mm:ss.SSS'Z'
2. yyyyMMddHHmmss.SSS
 (optional)
completedUpTo = completedUpTo_example # String | The end time (inclusive) of the time range when the user task instance was COMPLETED or CANCELED.
Must be greater or equal to the value of the 'completedFrom' parameter if the latter is specified.
Evaluated using the logical 'or' operator with the value of the 'completedAt' parameter if the latter is specified.

Supports two date formats:
1. yyyy-MM-dd'T'HH:mm:ss.SSS'Z'
2. yyyyMMddHHmmss.SSS
 (optional)
lastChangedAt = lastChangedAt_example # String | Time when the user task instance has been changed for the last time.
Evaluated using the logical 'or' operator with the values of the 'lastChangedFrom' and 'lastChangedTo' parameters if they are specified.

Supports two date formats:
1. yyyy-MM-dd'T'HH:mm:ss.SSS'Z'
2. yyyyMMddHHmmss.SSS
 (optional)
lastChangedFrom = lastChangedFrom_example # String | The start time (inclusive) of the time range when the user task instance was changed for the last time.
Must be less or equal to the value of the 'lastChangedUpTo' parameter if the latter is specified.
Evaluated using the logical 'or' operator with the value of the 'lastChangedAt' parameter if the latter is specified.

Supports two date formats:
1. yyyy-MM-dd'T'HH:mm:ss.SSS'Z'
2. yyyyMMddHHmmss.SSS
 (optional)
lastChangedUpTo = lastChangedUpTo_example # String | The end time (inclusive) of the time range when the user task instance was changed for the last time.
Must be greater or equal to the value of the 'lastChangedFrom' parameter if the latter is specified.
Evaluated using the logical 'or' operator with the value of the 'lastChangedAt' parameter if the latter is specified.

Supports two date formats:
1. yyyy-MM-dd'T'HH:mm:ss.SSS'Z'
2. yyyyMMddHHmmss.SSS
 (optional)
dueDate = dueDate_example # String | The due date of the user task instance.
Evaluated using the logical 'or' operator with the values of the 'dueDateFrom' and 'dueDateUpTo' parameters if they are specified.

Supports two date formats:
1. yyyy-MM-dd'T'HH:mm:ss.SSS'Z'
2. yyyyMMddHHmmss.SSS
 (optional)
dueDateFrom = dueDateFrom_example # String | The start time (inclusive) of the due date time range for the user task instance.
Must be less or equal to the value of the 'dueDateUpTo' parameter if the latter is specified.
Evaluated using the logical 'or' operator with the value of the 'dueDate' parameter if the latter is specified.

Supports two date formats:
1. yyyy-MM-dd'T'HH:mm:ss.SSS'Z'
2. yyyyMMddHHmmss.SSS
 (optional)
dueDateUpTo = dueDateUpTo_example # String | The end time (inclusive) of the due date time range for the user task instance.
Must be greater or equal to the 'dueDateFrom' parameter if the latter is specified.
Evaluated using the logical 'or' operator with the value of the 'dueDate' parameter if the latter is specified.

Supports two date formats:
1. yyyy-MM-dd'T'HH:mm:ss.SSS'Z'
2. yyyyMMddHHmmss.SSS
 (optional)
priority = priority_example # String | The priority of the user task instance.
The values are case-insensitive.
 (optional)
status = status_example # String | The status of the user task instance.
The values are case-insensitive.
 (optional)
recipientUsers = recipientUsers_example # String | The users who must be among the recipient users of the user task instance. A user task instance has to match at least one of the recipient users specified.
Specify the users by repeating this parameter multiple times, with one user each.
 (optional)
recipientGroups = recipientGroups_example # String | The groups which must be among the recipient groups of the user task instance. A user task instance has to match at least one of the recipient groups specified.
Specify the groups by repeating this parameter multiple times, with one user each.
 (optional)
containsText = containsText_example # String | Text, which should be contained in at least one of the following fields of the user task instance:

 * subject
 * description
 * activityId
 * id
 * processor
 * workflowDefinitionId
 * workflowInstanceId

Performed filtering is case-insensitive. You must not use this parameter more than once.
 (optional)
attributes.ExampleCustomAttribute = attributes.ExampleCustomAttribute_example # String | Example of a parameter that filters task instances by the value of the custom task attribute with the ID 'ExampleCustomAttribute'.
You can specify parameters for other attributes in an analogous way.
If you specify a parameter several times, the logical operators apply as outlined in the overall description of this API.
If custom task attributes with different IDs are present in the URL, only tasks which contain all of them with the values specified will be returned as a response to the request.
If a query by custom task attributes matches too many task definitions, you have to limit the query further. Refer, for example, to parameter 'definitionId'.
 (optional)
definitionId = definitionId_example # String | The definition ID of the user task.
It consists of the ID of the task defined in the workflow definition (task definition ID) as well as the workflow definition ID delimited by an '@' sign.
For optimal performance, specify this parameter when searching for tasks by custom task attributes.
If the custom task attribute IDs from the query match more than 50 task definitions, you have to specify one or more task definition IDs when searching for tasks by custom task attributes.
 (optional)

try: 
    # Retrieve instances by query parameters
    api_response = api_instance.v1TaskInstancesGet(acceptLanguage=acceptLanguage, $skip=$skip, $top=$top, $inlinecount=$inlinecount, $expand=$expand, $orderby=$orderby, workflowInstanceId=workflowInstanceId, workflowDefinitionId=workflowDefinitionId, processor=processor, id=id, activityId=activityId, description=description, subject=subject, createdAt=createdAt, createdFrom=createdFrom, createdUpTo=createdUpTo, claimedAt=claimedAt, claimedFrom=claimedFrom, claimedUpTo=claimedUpTo, completedAt=completedAt, completedFrom=completedFrom, completedUpTo=completedUpTo, lastChangedAt=lastChangedAt, lastChangedFrom=lastChangedFrom, lastChangedUpTo=lastChangedUpTo, dueDate=dueDate, dueDateFrom=dueDateFrom, dueDateUpTo=dueDateUpTo, priority=priority, status=status, recipientUsers=recipientUsers, recipientGroups=recipientGroups, containsText=containsText, attributes.ExampleCustomAttribute=attributes.ExampleCustomAttribute, definitionId=definitionId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling UserTaskInstancesApi->v1TaskInstancesGet: %s\n" % e)

Parameters

Header parameters
Name Description
Accept-Language
Query parameters
Name Description
$skip
$top
$inlinecount
$expand
$orderby
workflowInstanceId
workflowDefinitionId
processor
id
activityId
description
subject
createdAt
createdFrom
createdUpTo
claimedAt
claimedFrom
claimedUpTo
completedAt
completedFrom
completedUpTo
lastChangedAt
lastChangedFrom
lastChangedUpTo
dueDate
dueDateFrom
dueDateUpTo
priority
status
recipientUsers
recipientGroups
containsText
attributes.ExampleCustomAttribute
definitionId

Responses

Status: 200 - Returns a list of user task instances.

[{activityId=usertask1, claimedAt=2017-03-08T17:26:51.637Z, completedAt=2017-03-08T17:26:51.643Z, createdAt=2017-03-08T17:26:51.577Z, description=A very important task, id=1d8e6a7a-03f6-11e7-873d-00163e2ab1ae, priority=VERY_HIGH, dueDate=2017-03-09T19:48:30.281Z, processor=UserId1, recipientUsers=[], recipientGroups=[Admins, Managers], status=COMPLETED, subject=First Task, workflowDefinitionId=myfirstworkflow, workflowInstanceId=1d4f3e91-03f6-11e7-873d-00163e2ab1ae, applicationScope=own}, {activityId=usertask1, claimedAt=2017-03-08T17:26:51.637Z, completedAt=2017-03-08T17:26:51.643Z, createdAt=2017-03-08T17:26:51.577Z, description=A very important task, id=1d8e6a7a-03f6-11e7-873d-00163e2ab1ae, priority=VERY_HIGH, processor=UserId1, recipientUsers=[UserId1, UserId13], status=CANCELED, subject=First Task, workflowDefinitionId=myfirstworkflow, workflowInstanceId=1d4f3e91-03f6-11e7-873d-00163e2ab1ae, applicationScope=own}, {activityId=usertask2, createdAt=2017-03-08T17:26:51.675Z, description=An important task, id=a8a6c8ae-03f6-11e7-873d-00163e2ab1ae, priority=HIGH, dueDate=2017-03-10T12:00:21.382Z, recipientUsers=[UserId1], recipientGroups=[], status=READY, subject=Second Task, workflowDefinitionId=myfirstworkflow, workflowInstanceId=1d4f3e91-03f6-11e7-873d-00163e2ab1ae, definitionId=usertask1@myfirstworkflow, applicationScope=shared}, {activityId=usertask3, claimedAt=2017-03-09T07:26:51.675Z, createdAt=2017-03-08T17:26:51.675Z, description=A task that is already claimed, id=a8a6c8ae-13f6-11e7-873d-20163e2ab1ae, priority=MEDIUM, processor=UserId1, recipientUsers=[UserId1], recipientGroups=[Admins], status=RESERVED, subject=Second Task, workflowDefinitionId=myfirstworkflow, workflowInstanceId=1d4f3e91-03f6-11e7-873d-00163e2ab1ae, definitionId=usertask3@myfirstworkflow, applicationScope=shared}]

Status: 400 - Incorrect format or structure of the provided request body.

{error={code=bpm.workflowruntime.rest.content.format.invalid, message=Unable to parse the request content because it has an unexpected format or structure. The content has to be JSON and follow the documented data structure., logId=e329b2a4-cac7-44d7-b5c5-0494e6fbad5a}}

Status: 401 - Unauthorized. You have not provided valid authentication credentials to access the resource.

{error=unauthorized, error_description=Full authentication is required to access this resource.}

Status: 403 - Access forbidden. You have not the required permissions to access the resource.

{error={message=User does not have sufficient privileges.}}

Status: 404 - URL not found. Check whether the URL is correct and whether you refer to an existing task instance.

{error={code=bpm.workflowruntime.rest.task.not.found, message=Task not found, logId=d9abb62e-837b-465b-a77b-4821e21fc21d}}

Status: 429 - You have reached the usage limits that are configured for your tenant. You are performing too many requests or consume too many resources.

{error={code=bpm.workflowruntime.rate.limit.exceeded, message=Your tenant is performing too many requests.}}

Status: 500 - Internal server error. The operation you requested led to an error during execution.

{error={code=bpm.workflowruntime.rest.internal.server.error, message=Internal server error, logId=f29a5719-3342-4a4a-8a3d-5ddd5253159e}}

/v1/task-instances/{taskInstanceId}/attachments

Retrieves the attachments information of a workflow instance via the given user task. Roles permitted to execute this operation: - Global roles: WorkflowViewer, WorkflowAdmin - Instance-specific roles: viewerUsers, viewerGroups, adminUsers, adminGroups [Prerequisite: You are assigned to the WorkflowParticipant global role.] - Task-specific roles: recipientUsers, recipientGroups [Prerequisite: You are assigned to the WorkflowParticipant global role.] - Scope: TASK_GET_ATTACHMENTS


/v1/task-instances/{taskInstanceId}/attachments

Usage

curl -X GET "https://sandbox.api.sap.com/workflow-service/rest/v1/task-instances/{taskInstanceId}/attachments"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.UserTaskInstancesApi;

import java.io.File;
import java.util.*;

public class UserTaskInstancesApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        
        // Configure OAuth2 access token for authorization: Oauth2_AuthorizationCode
        OAuth Oauth2_AuthorizationCode = (OAuth) defaultClient.getAuthentication("Oauth2_AuthorizationCode");
        Oauth2_AuthorizationCode.setAccessToken("YOUR ACCESS TOKEN");

        // Configure OAuth2 access token for authorization: Oauth2_ClientCredentials
        OAuth Oauth2_ClientCredentials = (OAuth) defaultClient.getAuthentication("Oauth2_ClientCredentials");
        Oauth2_ClientCredentials.setAccessToken("YOUR ACCESS TOKEN");

        UserTaskInstancesApi apiInstance = new UserTaskInstancesApi();
        String taskInstanceId = taskInstanceId_example; // String | The ID of the user task via which the attachments information of the corresponding workflow instance should be retrieved. The ID is 36 characters long.
        try {
            AttachmentsContext result = apiInstance.v1TaskInstancesTaskInstanceIdAttachmentsGet(taskInstanceId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling UserTaskInstancesApi#v1TaskInstancesTaskInstanceIdAttachmentsGet");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.UserTaskInstancesApi;

public class UserTaskInstancesApiExample {

    public static void main(String[] args) {
        UserTaskInstancesApi apiInstance = new UserTaskInstancesApi();
        String taskInstanceId = taskInstanceId_example; // String | The ID of the user task via which the attachments information of the corresponding workflow instance should be retrieved. The ID is 36 characters long.
        try {
            AttachmentsContext result = apiInstance.v1TaskInstancesTaskInstanceIdAttachmentsGet(taskInstanceId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling UserTaskInstancesApi#v1TaskInstancesTaskInstanceIdAttachmentsGet");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure OAuth2 access token for authorization: (authentication scheme: Oauth2_AuthorizationCode)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];

// Configure OAuth2 access token for authorization: (authentication scheme: Oauth2_ClientCredentials)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];

String *taskInstanceId = taskInstanceId_example; // The ID of the user task via which the attachments information of the corresponding workflow instance should be retrieved. The ID is 36 characters long.

UserTaskInstancesApi *apiInstance = [[UserTaskInstancesApi alloc] init];

// Retrieve task instance attachments
[apiInstance v1TaskInstancesTaskInstanceIdAttachmentsGetWith:taskInstanceId
              completionHandler: ^(AttachmentsContext output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var WorkflowApiForCloudFoundry = require('workflow_api_for_cloud_foundry');
var defaultClient = WorkflowApiForCloudFoundry.ApiClient.instance;

// Configure OAuth2 access token for authorization: Oauth2_AuthorizationCode
var Oauth2_AuthorizationCode = defaultClient.authentications['Oauth2_AuthorizationCode'];
Oauth2_AuthorizationCode.accessToken = "YOUR ACCESS TOKEN"

// Configure OAuth2 access token for authorization: Oauth2_ClientCredentials
var Oauth2_ClientCredentials = defaultClient.authentications['Oauth2_ClientCredentials'];
Oauth2_ClientCredentials.accessToken = "YOUR ACCESS TOKEN"

var api = new WorkflowApiForCloudFoundry.UserTaskInstancesApi()

var taskInstanceId = taskInstanceId_example; // {String} The ID of the user task via which the attachments information of the corresponding workflow instance should be retrieved. The ID is 36 characters long.


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.v1TaskInstancesTaskInstanceIdAttachmentsGet(taskInstanceId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class v1TaskInstancesTaskInstanceIdAttachmentsGetExample
    {
        public void main()
        {
            
            // Configure OAuth2 access token for authorization: Oauth2_AuthorizationCode
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
            // Configure OAuth2 access token for authorization: Oauth2_ClientCredentials
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new UserTaskInstancesApi();
            var taskInstanceId = taskInstanceId_example;  // String | The ID of the user task via which the attachments information of the corresponding workflow instance should be retrieved. The ID is 36 characters long.

            try
            {
                // Retrieve task instance attachments
                AttachmentsContext result = apiInstance.v1TaskInstancesTaskInstanceIdAttachmentsGet(taskInstanceId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling UserTaskInstancesApi.v1TaskInstancesTaskInstanceIdAttachmentsGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: Oauth2_AuthorizationCode
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
// Configure OAuth2 access token for authorization: Oauth2_ClientCredentials
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new Swagger\Client\Api\UserTaskInstancesApi();
$taskInstanceId = taskInstanceId_example; // String | The ID of the user task via which the attachments information of the corresponding workflow instance should be retrieved. The ID is 36 characters long.

try {
    $result = $api_instance->v1TaskInstancesTaskInstanceIdAttachmentsGet($taskInstanceId);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling UserTaskInstancesApi->v1TaskInstancesTaskInstanceIdAttachmentsGet: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::UserTaskInstancesApi;

# Configure OAuth2 access token for authorization: Oauth2_AuthorizationCode
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
# Configure OAuth2 access token for authorization: Oauth2_ClientCredentials
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::SwaggerClient::UserTaskInstancesApi->new();
my $taskInstanceId = taskInstanceId_example; # String | The ID of the user task via which the attachments information of the corresponding workflow instance should be retrieved. The ID is 36 characters long.

eval { 
    my $result = $api_instance->v1TaskInstancesTaskInstanceIdAttachmentsGet(taskInstanceId => $taskInstanceId);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling UserTaskInstancesApi->v1TaskInstancesTaskInstanceIdAttachmentsGet: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: Oauth2_AuthorizationCode
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure OAuth2 access token for authorization: Oauth2_ClientCredentials
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.UserTaskInstancesApi()
taskInstanceId = taskInstanceId_example # String | The ID of the user task via which the attachments information of the corresponding workflow instance should be retrieved. The ID is 36 characters long.

try: 
    # Retrieve task instance attachments
    api_response = api_instance.v1TaskInstancesTaskInstanceIdAttachmentsGet(taskInstanceId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling UserTaskInstancesApi->v1TaskInstancesTaskInstanceIdAttachmentsGet: %s\n" % e)

Parameters

Path parameters
Name Description
taskInstanceId*

Responses

Status: 200 - The attachments information of the workflow instance.

{rootFolder=myFolder, groups={group1={folder=folder1, refs=[{objectId=1}, {objectId=2}]}, group2={folder=folder2, refs=[{objectId=3}]}}}

Status: 401 - Unauthorized. You have not provided valid authentication credentials to access the resource.

{error=unauthorized, error_description=Full authentication is required to access this resource.}

Status: 403 - Access forbidden. You have not the required permissions to access the resource.

{error={message=User does not have sufficient privileges.}}

Status: 404 - URL not found. Check whether the URL is correct and whether you refer to an existing task instance.

{error={code=bpm.workflowruntime.rest.task.not.found, message=Task not found, logId=d9abb62e-837b-465b-a77b-4821e21fc21d}}

Status: 429 - You have reached the usage limits that are configured for your tenant. You are performing too many requests or consume too many resources.

{error={code=bpm.workflowruntime.rate.limit.exceeded, message=Your tenant is performing too many requests.}}

Status: 500 - Internal server error. The operation you requested led to an error during execution.

{error={code=bpm.workflowruntime.rest.internal.server.error, message=Internal server error, logId=f29a5719-3342-4a4a-8a3d-5ddd5253159e}}

/v1/task-instances/{taskInstanceId}/attributes

Retrieves custom task attributes of a user task. Labels as well as the order of the custom task attributes in which they are returned, are taken from the latest versions of the workflow definitions where these attributes are present. Roles permitted to execute this operation: - Global roles: WorkflowViewer, WorkflowAdmin - Instance-specific roles: viewerUsers, viewerGroups, adminUsers, adminGroups [Prerequisite: You are assigned to the WorkflowParticipant global role.] - Task-specific roles: recipientUsers, recipientGroups [Prerequisite: You are assigned to the WorkflowParticipant global role.] - Scope: TASK_GET_ATTRIBUTES


/v1/task-instances/{taskInstanceId}/attributes

Usage

curl -X GET "https://sandbox.api.sap.com/workflow-service/rest/v1/task-instances/{taskInstanceId}/attributes"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.UserTaskInstancesApi;

import java.io.File;
import java.util.*;

public class UserTaskInstancesApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        
        // Configure OAuth2 access token for authorization: Oauth2_AuthorizationCode
        OAuth Oauth2_AuthorizationCode = (OAuth) defaultClient.getAuthentication("Oauth2_AuthorizationCode");
        Oauth2_AuthorizationCode.setAccessToken("YOUR ACCESS TOKEN");

        // Configure OAuth2 access token for authorization: Oauth2_ClientCredentials
        OAuth Oauth2_ClientCredentials = (OAuth) defaultClient.getAuthentication("Oauth2_ClientCredentials");
        Oauth2_ClientCredentials.setAccessToken("YOUR ACCESS TOKEN");

        UserTaskInstancesApi apiInstance = new UserTaskInstancesApi();
        String taskInstanceId = taskInstanceId_example; // String | The ID of the user task instance for which the custom task attributes should be retrieved. The ID is 36 characters long.
        String acceptLanguage = acceptLanguage_example; // String | Provide a preferred language. If a translation is available, relevant texts are returned in this language.
        try {
            array[CustomAttribute] result = apiInstance.v1TaskInstancesTaskInstanceIdAttributesGet(taskInstanceId, acceptLanguage);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling UserTaskInstancesApi#v1TaskInstancesTaskInstanceIdAttributesGet");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.UserTaskInstancesApi;

public class UserTaskInstancesApiExample {

    public static void main(String[] args) {
        UserTaskInstancesApi apiInstance = new UserTaskInstancesApi();
        String taskInstanceId = taskInstanceId_example; // String | The ID of the user task instance for which the custom task attributes should be retrieved. The ID is 36 characters long.
        String acceptLanguage = acceptLanguage_example; // String | Provide a preferred language. If a translation is available, relevant texts are returned in this language.
        try {
            array[CustomAttribute] result = apiInstance.v1TaskInstancesTaskInstanceIdAttributesGet(taskInstanceId, acceptLanguage);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling UserTaskInstancesApi#v1TaskInstancesTaskInstanceIdAttributesGet");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure OAuth2 access token for authorization: (authentication scheme: Oauth2_AuthorizationCode)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];

// Configure OAuth2 access token for authorization: (authentication scheme: Oauth2_ClientCredentials)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];

String *taskInstanceId = taskInstanceId_example; // The ID of the user task instance for which the custom task attributes should be retrieved. The ID is 36 characters long.
String *acceptLanguage = acceptLanguage_example; // Provide a preferred language. If a translation is available, relevant texts are returned in this language. (optional)

UserTaskInstancesApi *apiInstance = [[UserTaskInstancesApi alloc] init];

// Retrieve custom task attributes by task instance ID
[apiInstance v1TaskInstancesTaskInstanceIdAttributesGetWith:taskInstanceId
    acceptLanguage:acceptLanguage
              completionHandler: ^(array[CustomAttribute] output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var WorkflowApiForCloudFoundry = require('workflow_api_for_cloud_foundry');
var defaultClient = WorkflowApiForCloudFoundry.ApiClient.instance;

// Configure OAuth2 access token for authorization: Oauth2_AuthorizationCode
var Oauth2_AuthorizationCode = defaultClient.authentications['Oauth2_AuthorizationCode'];
Oauth2_AuthorizationCode.accessToken = "YOUR ACCESS TOKEN"

// Configure OAuth2 access token for authorization: Oauth2_ClientCredentials
var Oauth2_ClientCredentials = defaultClient.authentications['Oauth2_ClientCredentials'];
Oauth2_ClientCredentials.accessToken = "YOUR ACCESS TOKEN"

var api = new WorkflowApiForCloudFoundry.UserTaskInstancesApi()

var taskInstanceId = taskInstanceId_example; // {String} The ID of the user task instance for which the custom task attributes should be retrieved. The ID is 36 characters long.

var opts = { 
  'acceptLanguage': acceptLanguage_example // {String} Provide a preferred language. If a translation is available, relevant texts are returned in this language.
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.v1TaskInstancesTaskInstanceIdAttributesGet(taskInstanceId, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class v1TaskInstancesTaskInstanceIdAttributesGetExample
    {
        public void main()
        {
            
            // Configure OAuth2 access token for authorization: Oauth2_AuthorizationCode
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
            // Configure OAuth2 access token for authorization: Oauth2_ClientCredentials
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new UserTaskInstancesApi();
            var taskInstanceId = taskInstanceId_example;  // String | The ID of the user task instance for which the custom task attributes should be retrieved. The ID is 36 characters long.
            var acceptLanguage = acceptLanguage_example;  // String | Provide a preferred language. If a translation is available, relevant texts are returned in this language. (optional) 

            try
            {
                // Retrieve custom task attributes by task instance ID
                array[CustomAttribute] result = apiInstance.v1TaskInstancesTaskInstanceIdAttributesGet(taskInstanceId, acceptLanguage);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling UserTaskInstancesApi.v1TaskInstancesTaskInstanceIdAttributesGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: Oauth2_AuthorizationCode
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
// Configure OAuth2 access token for authorization: Oauth2_ClientCredentials
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new Swagger\Client\Api\UserTaskInstancesApi();
$taskInstanceId = taskInstanceId_example; // String | The ID of the user task instance for which the custom task attributes should be retrieved. The ID is 36 characters long.
$acceptLanguage = acceptLanguage_example; // String | Provide a preferred language. If a translation is available, relevant texts are returned in this language.

try {
    $result = $api_instance->v1TaskInstancesTaskInstanceIdAttributesGet($taskInstanceId, $acceptLanguage);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling UserTaskInstancesApi->v1TaskInstancesTaskInstanceIdAttributesGet: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::UserTaskInstancesApi;

# Configure OAuth2 access token for authorization: Oauth2_AuthorizationCode
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
# Configure OAuth2 access token for authorization: Oauth2_ClientCredentials
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::SwaggerClient::UserTaskInstancesApi->new();
my $taskInstanceId = taskInstanceId_example; # String | The ID of the user task instance for which the custom task attributes should be retrieved. The ID is 36 characters long.
my $acceptLanguage = acceptLanguage_example; # String | Provide a preferred language. If a translation is available, relevant texts are returned in this language.

eval { 
    my $result = $api_instance->v1TaskInstancesTaskInstanceIdAttributesGet(taskInstanceId => $taskInstanceId, acceptLanguage => $acceptLanguage);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling UserTaskInstancesApi->v1TaskInstancesTaskInstanceIdAttributesGet: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: Oauth2_AuthorizationCode
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure OAuth2 access token for authorization: Oauth2_ClientCredentials
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.UserTaskInstancesApi()
taskInstanceId = taskInstanceId_example # String | The ID of the user task instance for which the custom task attributes should be retrieved. The ID is 36 characters long.
acceptLanguage = acceptLanguage_example # String | Provide a preferred language. If a translation is available, relevant texts are returned in this language. (optional)

try: 
    # Retrieve custom task attributes by task instance ID
    api_response = api_instance.v1TaskInstancesTaskInstanceIdAttributesGet(taskInstanceId, acceptLanguage=acceptLanguage)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling UserTaskInstancesApi->v1TaskInstancesTaskInstanceIdAttributesGet: %s\n" % e)

Parameters

Path parameters
Name Description
taskInstanceId*
Header parameters
Name Description
Accept-Language

Responses

Status: 200 - Returns the custom task attributes for the requested user task.

[{id=ExampleCustomAttribute, label=Example of custom attribute, value=PRO_247, type=string}, {id=Cur, label=Currency, value=EUR, type=string}]

Status: 401 - Unauthorized. You have not provided valid authentication credentials to access the resource.

{error=unauthorized, error_description=Full authentication is required to access this resource.}

Status: 403 - Access forbidden. You have not the required permissions to access the resource.

{error={message=User does not have sufficient privileges.}}

Status: 404 - URL not found. Check whether the URL is correct and whether you refer to an existing task instance.

{error={code=bpm.workflowruntime.rest.task.not.found, message=Task not found, logId=d9abb62e-837b-465b-a77b-4821e21fc21d}}

Status: 429 - You have reached the usage limits that are configured for your tenant. You are performing too many requests or consume too many resources.

{error={code=bpm.workflowruntime.rate.limit.exceeded, message=Your tenant is performing too many requests.}}

Status: 500 - Internal server error. The operation you requested led to an error during execution.

{error={code=bpm.workflowruntime.rest.internal.server.error, message=Internal server error, logId=f29a5719-3342-4a4a-8a3d-5ddd5253159e}}

/v1/task-instances/{taskInstanceId}/context

Retrieves the context of a user task. Roles permitted to execute this operation: - Global roles: WorkflowContextViewer, WorkflowContextAdmin - Instance-specific roles: contextViewerUsers, contextViewerGroups, contextAdminUsers, contextAdminGroups [Prerequisite: You are assigned to the WorkflowParticipant global role.] - Task-specific roles: recipientUsers, recipientGroups [Prerequisite: You are assigned to the WorkflowParticipant global role.] - Scope: TASK_GET_CONTEXT


/v1/task-instances/{taskInstanceId}/context

Usage

curl -X GET "https://sandbox.api.sap.com/workflow-service/rest/v1/task-instances/{taskInstanceId}/context"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.UserTaskInstancesApi;

import java.io.File;
import java.util.*;

public class UserTaskInstancesApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        
        // Configure OAuth2 access token for authorization: Oauth2_AuthorizationCode
        OAuth Oauth2_AuthorizationCode = (OAuth) defaultClient.getAuthentication("Oauth2_AuthorizationCode");
        Oauth2_AuthorizationCode.setAccessToken("YOUR ACCESS TOKEN");

        // Configure OAuth2 access token for authorization: Oauth2_ClientCredentials
        OAuth Oauth2_ClientCredentials = (OAuth) defaultClient.getAuthentication("Oauth2_ClientCredentials");
        Oauth2_ClientCredentials.setAccessToken("YOUR ACCESS TOKEN");

        UserTaskInstancesApi apiInstance = new UserTaskInstancesApi();
        String taskInstanceId = taskInstanceId_example; // String | The ID of the user task for which the context should be retrieved. The ID is 36 characters long.
        try {
            Object result = apiInstance.v1TaskInstancesTaskInstanceIdContextGet(taskInstanceId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling UserTaskInstancesApi#v1TaskInstancesTaskInstanceIdContextGet");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.UserTaskInstancesApi;

public class UserTaskInstancesApiExample {

    public static void main(String[] args) {
        UserTaskInstancesApi apiInstance = new UserTaskInstancesApi();
        String taskInstanceId = taskInstanceId_example; // String | The ID of the user task for which the context should be retrieved. The ID is 36 characters long.
        try {
            Object result = apiInstance.v1TaskInstancesTaskInstanceIdContextGet(taskInstanceId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling UserTaskInstancesApi#v1TaskInstancesTaskInstanceIdContextGet");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure OAuth2 access token for authorization: (authentication scheme: Oauth2_AuthorizationCode)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];

// Configure OAuth2 access token for authorization: (authentication scheme: Oauth2_ClientCredentials)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];

String *taskInstanceId = taskInstanceId_example; // The ID of the user task for which the context should be retrieved. The ID is 36 characters long.

UserTaskInstancesApi *apiInstance = [[UserTaskInstancesApi alloc] init];

// Retrieve task context by ID
[apiInstance v1TaskInstancesTaskInstanceIdContextGetWith:taskInstanceId
              completionHandler: ^(Object output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var WorkflowApiForCloudFoundry = require('workflow_api_for_cloud_foundry');
var defaultClient = WorkflowApiForCloudFoundry.ApiClient.instance;

// Configure OAuth2 access token for authorization: Oauth2_AuthorizationCode
var Oauth2_AuthorizationCode = defaultClient.authentications['Oauth2_AuthorizationCode'];
Oauth2_AuthorizationCode.accessToken = "YOUR ACCESS TOKEN"

// Configure OAuth2 access token for authorization: Oauth2_ClientCredentials
var Oauth2_ClientCredentials = defaultClient.authentications['Oauth2_ClientCredentials'];
Oauth2_ClientCredentials.accessToken = "YOUR ACCESS TOKEN"

var api = new WorkflowApiForCloudFoundry.UserTaskInstancesApi()

var taskInstanceId = taskInstanceId_example; // {String} The ID of the user task for which the context should be retrieved. The ID is 36 characters long.


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.v1TaskInstancesTaskInstanceIdContextGet(taskInstanceId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class v1TaskInstancesTaskInstanceIdContextGetExample
    {
        public void main()
        {
            
            // Configure OAuth2 access token for authorization: Oauth2_AuthorizationCode
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
            // Configure OAuth2 access token for authorization: Oauth2_ClientCredentials
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new UserTaskInstancesApi();
            var taskInstanceId = taskInstanceId_example;  // String | The ID of the user task for which the context should be retrieved. The ID is 36 characters long.

            try
            {
                // Retrieve task context by ID
                Object result = apiInstance.v1TaskInstancesTaskInstanceIdContextGet(taskInstanceId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling UserTaskInstancesApi.v1TaskInstancesTaskInstanceIdContextGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: Oauth2_AuthorizationCode
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
// Configure OAuth2 access token for authorization: Oauth2_ClientCredentials
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new Swagger\Client\Api\UserTaskInstancesApi();
$taskInstanceId = taskInstanceId_example; // String | The ID of the user task for which the context should be retrieved. The ID is 36 characters long.

try {
    $result = $api_instance->v1TaskInstancesTaskInstanceIdContextGet($taskInstanceId);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling UserTaskInstancesApi->v1TaskInstancesTaskInstanceIdContextGet: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::UserTaskInstancesApi;

# Configure OAuth2 access token for authorization: Oauth2_AuthorizationCode
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
# Configure OAuth2 access token for authorization: Oauth2_ClientCredentials
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::SwaggerClient::UserTaskInstancesApi->new();
my $taskInstanceId = taskInstanceId_example; # String | The ID of the user task for which the context should be retrieved. The ID is 36 characters long.

eval { 
    my $result = $api_instance->v1TaskInstancesTaskInstanceIdContextGet(taskInstanceId => $taskInstanceId);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling UserTaskInstancesApi->v1TaskInstancesTaskInstanceIdContextGet: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: Oauth2_AuthorizationCode
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure OAuth2 access token for authorization: Oauth2_ClientCredentials
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.UserTaskInstancesApi()
taskInstanceId = taskInstanceId_example # String | The ID of the user task for which the context should be retrieved. The ID is 36 characters long.

try: 
    # Retrieve task context by ID
    api_response = api_instance.v1TaskInstancesTaskInstanceIdContextGet(taskInstanceId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling UserTaskInstancesApi->v1TaskInstancesTaskInstanceIdContextGet: %s\n" % e)

Parameters

Path parameters
Name Description
taskInstanceId*

Responses

Status: 200 - Returns the context of the specified user task.

{firstname=John, lastname=Doe}

Status: 401 - Unauthorized. You have not provided valid authentication credentials to access the resource.

{error=unauthorized, error_description=Full authentication is required to access this resource.}

Status: 403 - Access forbidden. You have not the required permissions to access the resource.

{error={message=User does not have sufficient privileges.}}

Status: 404 - URL not found. Check whether the URL is correct and whether you refer to an existing task instance.

{error={code=bpm.workflowruntime.rest.task.not.found, message=Task not found, logId=d9abb62e-837b-465b-a77b-4821e21fc21d}}

Status: 429 - You have reached the usage limits that are configured for your tenant. You are performing too many requests or consume too many resources.

{error={code=bpm.workflowruntime.rate.limit.exceeded, message=Your tenant is performing too many requests.}}

Status: 500 - Internal server error. The operation you requested led to an error during execution.

{error={code=bpm.workflowruntime.rest.internal.server.error, message=Internal server error, logId=f29a5719-3342-4a4a-8a3d-5ddd5253159e}}

/v1/task-instances/{taskInstanceId}/form

Retrieves the form metadata of the given task instance. Roles permitted to execute this operation: - Global roles: WorkflowViewer, WorkflowAdmin - Instance-specific roles: viewerUsers, viewerGroups, adminUsers, adminGroups [Prerequisite: You are assigned to the WorkflowParticipant global role.] - Scope: TASK_GET_FORM


/v1/task-instances/{taskInstanceId}/form

Usage

curl -X GET "https://sandbox.api.sap.com/workflow-service/rest/v1/task-instances/{taskInstanceId}/form"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.UserTaskInstancesApi;

import java.io.File;
import java.util.*;

public class UserTaskInstancesApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        
        // Configure OAuth2 access token for authorization: Oauth2_AuthorizationCode
        OAuth Oauth2_AuthorizationCode = (OAuth) defaultClient.getAuthentication("Oauth2_AuthorizationCode");
        Oauth2_AuthorizationCode.setAccessToken("YOUR ACCESS TOKEN");

        // Configure OAuth2 access token for authorization: Oauth2_ClientCredentials
        OAuth Oauth2_ClientCredentials = (OAuth) defaultClient.getAuthentication("Oauth2_ClientCredentials");
        Oauth2_ClientCredentials.setAccessToken("YOUR ACCESS TOKEN");

        UserTaskInstancesApi apiInstance = new UserTaskInstancesApi();
        String taskInstanceId = taskInstanceId_example; // String | The ID of the user task instance for which the form metadata should be retrieved. The ID is 36 characters long.
        try {
            FormMetadata result = apiInstance.v1TaskInstancesTaskInstanceIdFormGet(taskInstanceId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling UserTaskInstancesApi#v1TaskInstancesTaskInstanceIdFormGet");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.UserTaskInstancesApi;

public class UserTaskInstancesApiExample {

    public static void main(String[] args) {
        UserTaskInstancesApi apiInstance = new UserTaskInstancesApi();
        String taskInstanceId = taskInstanceId_example; // String | The ID of the user task instance for which the form metadata should be retrieved. The ID is 36 characters long.
        try {
            FormMetadata result = apiInstance.v1TaskInstancesTaskInstanceIdFormGet(taskInstanceId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling UserTaskInstancesApi#v1TaskInstancesTaskInstanceIdFormGet");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure OAuth2 access token for authorization: (authentication scheme: Oauth2_AuthorizationCode)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];

// Configure OAuth2 access token for authorization: (authentication scheme: Oauth2_ClientCredentials)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];

String *taskInstanceId = taskInstanceId_example; // The ID of the user task instance for which the form metadata should be retrieved. The ID is 36 characters long.

UserTaskInstancesApi *apiInstance = [[UserTaskInstancesApi alloc] init];

// Retrieve form metadata of the given task instance.
[apiInstance v1TaskInstancesTaskInstanceIdFormGetWith:taskInstanceId
              completionHandler: ^(FormMetadata output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var WorkflowApiForCloudFoundry = require('workflow_api_for_cloud_foundry');
var defaultClient = WorkflowApiForCloudFoundry.ApiClient.instance;

// Configure OAuth2 access token for authorization: Oauth2_AuthorizationCode
var Oauth2_AuthorizationCode = defaultClient.authentications['Oauth2_AuthorizationCode'];
Oauth2_AuthorizationCode.accessToken = "YOUR ACCESS TOKEN"

// Configure OAuth2 access token for authorization: Oauth2_ClientCredentials
var Oauth2_ClientCredentials = defaultClient.authentications['Oauth2_ClientCredentials'];
Oauth2_ClientCredentials.accessToken = "YOUR ACCESS TOKEN"

var api = new WorkflowApiForCloudFoundry.UserTaskInstancesApi()

var taskInstanceId = taskInstanceId_example; // {String} The ID of the user task instance for which the form metadata should be retrieved. The ID is 36 characters long.


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.v1TaskInstancesTaskInstanceIdFormGet(taskInstanceId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class v1TaskInstancesTaskInstanceIdFormGetExample
    {
        public void main()
        {
            
            // Configure OAuth2 access token for authorization: Oauth2_AuthorizationCode
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
            // Configure OAuth2 access token for authorization: Oauth2_ClientCredentials
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new UserTaskInstancesApi();
            var taskInstanceId = taskInstanceId_example;  // String | The ID of the user task instance for which the form metadata should be retrieved. The ID is 36 characters long.

            try
            {
                // Retrieve form metadata of the given task instance.
                FormMetadata result = apiInstance.v1TaskInstancesTaskInstanceIdFormGet(taskInstanceId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling UserTaskInstancesApi.v1TaskInstancesTaskInstanceIdFormGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: Oauth2_AuthorizationCode
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
// Configure OAuth2 access token for authorization: Oauth2_ClientCredentials
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new Swagger\Client\Api\UserTaskInstancesApi();
$taskInstanceId = taskInstanceId_example; // String | The ID of the user task instance for which the form metadata should be retrieved. The ID is 36 characters long.

try {
    $result = $api_instance->v1TaskInstancesTaskInstanceIdFormGet($taskInstanceId);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling UserTaskInstancesApi->v1TaskInstancesTaskInstanceIdFormGet: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::UserTaskInstancesApi;

# Configure OAuth2 access token for authorization: Oauth2_AuthorizationCode
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
# Configure OAuth2 access token for authorization: Oauth2_ClientCredentials
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::SwaggerClient::UserTaskInstancesApi->new();
my $taskInstanceId = taskInstanceId_example; # String | The ID of the user task instance for which the form metadata should be retrieved. The ID is 36 characters long.

eval { 
    my $result = $api_instance->v1TaskInstancesTaskInstanceIdFormGet(taskInstanceId => $taskInstanceId);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling UserTaskInstancesApi->v1TaskInstancesTaskInstanceIdFormGet: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: Oauth2_AuthorizationCode
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure OAuth2 access token for authorization: Oauth2_ClientCredentials
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.UserTaskInstancesApi()
taskInstanceId = taskInstanceId_example # String | The ID of the user task instance for which the form metadata should be retrieved. The ID is 36 characters long.

try: 
    # Retrieve form metadata of the given task instance.
    api_response = api_instance.v1TaskInstancesTaskInstanceIdFormGet(taskInstanceId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling UserTaskInstancesApi->v1TaskInstancesTaskInstanceIdFormGet: %s\n" % e)

Parameters

Path parameters
Name Description
taskInstanceId*

Responses

Status: 200 - Returns the requested form metadata of the given task instance

{id=com.sap.bpm.demo.approvalform, name=ApprovalForm, version=2, revision=Draft, type=task, createdAt=2018-06-01T07:37:20.168Z, createdBy=UserId}

Status: 401 - Unauthorized. You have not provided valid authentication credentials to access the resource.

{error=unauthorized, error_description=Full authentication is required to access this resource.}

Status: 403 - Access forbidden. You have not the required permissions to access the resource.

{error={message=User does not have sufficient privileges.}}

Status: 404 - URL not found. Check whether you refer to an existing task instance and whether a task form is assigned.

{error={code=bpm.workflowruntime.rest.task.form.not.assigned, message=No task form assigned, logId=d2716903-4890-4ad2-b7bf-0822c18ef231}}

Status: 429 - You have reached the usage limits that are configured for your tenant. You are performing too many requests or consume too many resources.

{error={code=bpm.workflowruntime.rate.limit.exceeded, message=Your tenant is performing too many requests.}}

Status: 500 - Internal server error. The operation you requested led to an error during execution.

{error={code=bpm.workflowruntime.rest.internal.server.error, message=Internal server error, logId=f29a5719-3342-4a4a-8a3d-5ddd5253159e}}

/v1/task-instances/{taskInstanceId}/form/model

Retrieves the form model of the given task instance. Roles permitted to execute this operation: - Global roles: WorkflowViewer, WorkflowAdmin - Instance-specific roles: viewerUsers, viewerGroups, adminUsers, adminGroups [Prerequisite: You are assigned to the WorkflowParticipant global role.] - Scope: TASK_GET_FORM_MODEL


/v1/task-instances/{taskInstanceId}/form/model

Usage

curl -X GET "https://sandbox.api.sap.com/workflow-service/rest/v1/task-instances/{taskInstanceId}/form/model"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.UserTaskInstancesApi;

import java.io.File;
import java.util.*;

public class UserTaskInstancesApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        
        // Configure OAuth2 access token for authorization: Oauth2_AuthorizationCode
        OAuth Oauth2_AuthorizationCode = (OAuth) defaultClient.getAuthentication("Oauth2_AuthorizationCode");
        Oauth2_AuthorizationCode.setAccessToken("YOUR ACCESS TOKEN");

        // Configure OAuth2 access token for authorization: Oauth2_ClientCredentials
        OAuth Oauth2_ClientCredentials = (OAuth) defaultClient.getAuthentication("Oauth2_ClientCredentials");
        Oauth2_ClientCredentials.setAccessToken("YOUR ACCESS TOKEN");

        UserTaskInstancesApi apiInstance = new UserTaskInstancesApi();
        String taskInstanceId = taskInstanceId_example; // String | The ID of the user task instance for which the form model should be retrieved. The ID is 36 characters long.
        try {
            FormModel result = apiInstance.v1TaskInstancesTaskInstanceIdFormModelGet(taskInstanceId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling UserTaskInstancesApi#v1TaskInstancesTaskInstanceIdFormModelGet");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.UserTaskInstancesApi;

public class UserTaskInstancesApiExample {

    public static void main(String[] args) {
        UserTaskInstancesApi apiInstance = new UserTaskInstancesApi();
        String taskInstanceId = taskInstanceId_example; // String | The ID of the user task instance for which the form model should be retrieved. The ID is 36 characters long.
        try {
            FormModel result = apiInstance.v1TaskInstancesTaskInstanceIdFormModelGet(taskInstanceId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling UserTaskInstancesApi#v1TaskInstancesTaskInstanceIdFormModelGet");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure OAuth2 access token for authorization: (authentication scheme: Oauth2_AuthorizationCode)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];

// Configure OAuth2 access token for authorization: (authentication scheme: Oauth2_ClientCredentials)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];

String *taskInstanceId = taskInstanceId_example; // The ID of the user task instance for which the form model should be retrieved. The ID is 36 characters long.

UserTaskInstancesApi *apiInstance = [[UserTaskInstancesApi alloc] init];

// Retrieve form model of the given task instance.
[apiInstance v1TaskInstancesTaskInstanceIdFormModelGetWith:taskInstanceId
              completionHandler: ^(FormModel output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var WorkflowApiForCloudFoundry = require('workflow_api_for_cloud_foundry');
var defaultClient = WorkflowApiForCloudFoundry.ApiClient.instance;

// Configure OAuth2 access token for authorization: Oauth2_AuthorizationCode
var Oauth2_AuthorizationCode = defaultClient.authentications['Oauth2_AuthorizationCode'];
Oauth2_AuthorizationCode.accessToken = "YOUR ACCESS TOKEN"

// Configure OAuth2 access token for authorization: Oauth2_ClientCredentials
var Oauth2_ClientCredentials = defaultClient.authentications['Oauth2_ClientCredentials'];
Oauth2_ClientCredentials.accessToken = "YOUR ACCESS TOKEN"

var api = new WorkflowApiForCloudFoundry.UserTaskInstancesApi()

var taskInstanceId = taskInstanceId_example; // {String} The ID of the user task instance for which the form model should be retrieved. The ID is 36 characters long.


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.v1TaskInstancesTaskInstanceIdFormModelGet(taskInstanceId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class v1TaskInstancesTaskInstanceIdFormModelGetExample
    {
        public void main()
        {
            
            // Configure OAuth2 access token for authorization: Oauth2_AuthorizationCode
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
            // Configure OAuth2 access token for authorization: Oauth2_ClientCredentials
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new UserTaskInstancesApi();
            var taskInstanceId = taskInstanceId_example;  // String | The ID of the user task instance for which the form model should be retrieved. The ID is 36 characters long.

            try
            {
                // Retrieve form model of the given task instance.
                FormModel result = apiInstance.v1TaskInstancesTaskInstanceIdFormModelGet(taskInstanceId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling UserTaskInstancesApi.v1TaskInstancesTaskInstanceIdFormModelGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: Oauth2_AuthorizationCode
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
// Configure OAuth2 access token for authorization: Oauth2_ClientCredentials
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new Swagger\Client\Api\UserTaskInstancesApi();
$taskInstanceId = taskInstanceId_example; // String | The ID of the user task instance for which the form model should be retrieved. The ID is 36 characters long.

try {
    $result = $api_instance->v1TaskInstancesTaskInstanceIdFormModelGet($taskInstanceId);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling UserTaskInstancesApi->v1TaskInstancesTaskInstanceIdFormModelGet: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::UserTaskInstancesApi;

# Configure OAuth2 access token for authorization: Oauth2_AuthorizationCode
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
# Configure OAuth2 access token for authorization: Oauth2_ClientCredentials
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::SwaggerClient::UserTaskInstancesApi->new();
my $taskInstanceId = taskInstanceId_example; # String | The ID of the user task instance for which the form model should be retrieved. The ID is 36 characters long.

eval { 
    my $result = $api_instance->v1TaskInstancesTaskInstanceIdFormModelGet(taskInstanceId => $taskInstanceId);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling UserTaskInstancesApi->v1TaskInstancesTaskInstanceIdFormModelGet: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: Oauth2_AuthorizationCode
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure OAuth2 access token for authorization: Oauth2_ClientCredentials
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.UserTaskInstancesApi()
taskInstanceId = taskInstanceId_example # String | The ID of the user task instance for which the form model should be retrieved. The ID is 36 characters long.

try: 
    # Retrieve form model of the given task instance.
    api_response = api_instance.v1TaskInstancesTaskInstanceIdFormModelGet(taskInstanceId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling UserTaskInstancesApi->v1TaskInstancesTaskInstanceIdFormModelGet: %s\n" % e)

Parameters

Path parameters
Name Description
taskInstanceId*

Responses

Status: 200 - The deployed form definition model.

{id=com.sap.bpm.demo.approvalform, name=ApprovalForm, revision=1.0, type=task, readOnly=false, content=[{id=title, type=string, label=Title, readOnly=false, value=${context.product}, constraints=[{required=false}]}, {id=price, type=string, label=Price, readOnly=false, value=${context.price}, constraints=[{required=false}]}], decisions=[{id=approve, text=Approve, decisionType=positive}, {id=reject, text=Reject, decisionType=negative}]}

Status: 401 - Unauthorized. You have not provided valid authentication credentials to access the resource.

{error=unauthorized, error_description=Full authentication is required to access this resource.}

Status: 403 - Access forbidden. You have not the required permissions to access the resource.

{error={message=User does not have sufficient privileges.}}

Status: 404 - URL not found. Check whether you refer to an existing task instance and whether a task form is assigned.

{error={code=bpm.workflowruntime.rest.task.form.not.assigned, message=No task form assigned, logId=d2716903-4890-4ad2-b7bf-0822c18ef231}}

Status: 429 - You have reached the usage limits that are configured for your tenant. You are performing too many requests or consume too many resources.

{error={code=bpm.workflowruntime.rate.limit.exceeded, message=Your tenant is performing too many requests.}}

Status: 500 - Internal server error. The operation you requested led to an error during execution.

{error={code=bpm.workflowruntime.rest.internal.server.error, message=Internal server error, logId=f29a5719-3342-4a4a-8a3d-5ddd5253159e}}

/v1/task-instances/{taskInstanceId}

Retrieves the user task instance with the specified task instance ID. Roles permitted to execute this operation: - Global roles: WorkflowViewer, WorkflowAdmin - Instance-specific roles: viewerUsers, viewerGroups, adminUsers, adminGroups [Prerequisite: You are assigned to the WorkflowParticipant global role.] - Task-specific roles: recipientUsers, recipientGroups [Prerequisite: You are assigned to the WorkflowParticipant global role.] - Scope: TASK_GET


/v1/task-instances/{taskInstanceId}

Usage

curl -X GET "https://sandbox.api.sap.com/workflow-service/rest/v1/task-instances/{taskInstanceId}?$expand="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.UserTaskInstancesApi;

import java.io.File;
import java.util.*;

public class UserTaskInstancesApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        
        // Configure OAuth2 access token for authorization: Oauth2_AuthorizationCode
        OAuth Oauth2_AuthorizationCode = (OAuth) defaultClient.getAuthentication("Oauth2_AuthorizationCode");
        Oauth2_AuthorizationCode.setAccessToken("YOUR ACCESS TOKEN");

        // Configure OAuth2 access token for authorization: Oauth2_ClientCredentials
        OAuth Oauth2_ClientCredentials = (OAuth) defaultClient.getAuthentication("Oauth2_ClientCredentials");
        Oauth2_ClientCredentials.setAccessToken("YOUR ACCESS TOKEN");

        UserTaskInstancesApi apiInstance = new UserTaskInstancesApi();
        String taskInstanceId = taskInstanceId_example; // String | The ID of the user task instance which should be retrieved. The ID is 36 characters long.
        String acceptLanguage = acceptLanguage_example; // String | Provide a preferred language. If a translation is available, relevant texts are returned in this language.
        String $expand = $expand_example; // String | You can request custom task attributes to become part of the task output by specifying the value 'attributes' for the '$expand' parameter.
Otherwise, if the '$expand' parameter is not specified, the 'attributes' field is not included into task output. Note that labels as well as the order of the custom task attributes in which they are returned, are taken from the latest versions of the workflow definitions where these attributes are present.

        try {
            TaskInstance result = apiInstance.v1TaskInstancesTaskInstanceIdGet(taskInstanceId, acceptLanguage, $expand);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling UserTaskInstancesApi#v1TaskInstancesTaskInstanceIdGet");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.UserTaskInstancesApi;

public class UserTaskInstancesApiExample {

    public static void main(String[] args) {
        UserTaskInstancesApi apiInstance = new UserTaskInstancesApi();
        String taskInstanceId = taskInstanceId_example; // String | The ID of the user task instance which should be retrieved. The ID is 36 characters long.
        String acceptLanguage = acceptLanguage_example; // String | Provide a preferred language. If a translation is available, relevant texts are returned in this language.
        String $expand = $expand_example; // String | You can request custom task attributes to become part of the task output by specifying the value 'attributes' for the '$expand' parameter.
Otherwise, if the '$expand' parameter is not specified, the 'attributes' field is not included into task output. Note that labels as well as the order of the custom task attributes in which they are returned, are taken from the latest versions of the workflow definitions where these attributes are present.

        try {
            TaskInstance result = apiInstance.v1TaskInstancesTaskInstanceIdGet(taskInstanceId, acceptLanguage, $expand);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling UserTaskInstancesApi#v1TaskInstancesTaskInstanceIdGet");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure OAuth2 access token for authorization: (authentication scheme: Oauth2_AuthorizationCode)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];

// Configure OAuth2 access token for authorization: (authentication scheme: Oauth2_ClientCredentials)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];

String *taskInstanceId = taskInstanceId_example; // The ID of the user task instance which should be retrieved. The ID is 36 characters long.
String *acceptLanguage = acceptLanguage_example; // Provide a preferred language. If a translation is available, relevant texts are returned in this language. (optional)
String *$expand = $expand_example; // You can request custom task attributes to become part of the task output by specifying the value 'attributes' for the '$expand' parameter.
Otherwise, if the '$expand' parameter is not specified, the 'attributes' field is not included into task output. Note that labels as well as the order of the custom task attributes in which they are returned, are taken from the latest versions of the workflow definitions where these attributes are present.
 (optional)

UserTaskInstancesApi *apiInstance = [[UserTaskInstancesApi alloc] init];

// Retrieve task by ID
[apiInstance v1TaskInstancesTaskInstanceIdGetWith:taskInstanceId
    acceptLanguage:acceptLanguage
    $expand:$expand
              completionHandler: ^(TaskInstance output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var WorkflowApiForCloudFoundry = require('workflow_api_for_cloud_foundry');
var defaultClient = WorkflowApiForCloudFoundry.ApiClient.instance;

// Configure OAuth2 access token for authorization: Oauth2_AuthorizationCode
var Oauth2_AuthorizationCode = defaultClient.authentications['Oauth2_AuthorizationCode'];
Oauth2_AuthorizationCode.accessToken = "YOUR ACCESS TOKEN"

// Configure OAuth2 access token for authorization: Oauth2_ClientCredentials
var Oauth2_ClientCredentials = defaultClient.authentications['Oauth2_ClientCredentials'];
Oauth2_ClientCredentials.accessToken = "YOUR ACCESS TOKEN"

var api = new WorkflowApiForCloudFoundry.UserTaskInstancesApi()

var taskInstanceId = taskInstanceId_example; // {String} The ID of the user task instance which should be retrieved. The ID is 36 characters long.

var opts = { 
  'acceptLanguage': acceptLanguage_example, // {String} Provide a preferred language. If a translation is available, relevant texts are returned in this language.
  '$expand': $expand_example // {String} You can request custom task attributes to become part of the task output by specifying the value 'attributes' for the '$expand' parameter.
Otherwise, if the '$expand' parameter is not specified, the 'attributes' field is not included into task output. Note that labels as well as the order of the custom task attributes in which they are returned, are taken from the latest versions of the workflow definitions where these attributes are present.

};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.v1TaskInstancesTaskInstanceIdGet(taskInstanceId, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class v1TaskInstancesTaskInstanceIdGetExample
    {
        public void main()
        {
            
            // Configure OAuth2 access token for authorization: Oauth2_AuthorizationCode
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
            // Configure OAuth2 access token for authorization: Oauth2_ClientCredentials
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new UserTaskInstancesApi();
            var taskInstanceId = taskInstanceId_example;  // String | The ID of the user task instance which should be retrieved. The ID is 36 characters long.
            var acceptLanguage = acceptLanguage_example;  // String | Provide a preferred language. If a translation is available, relevant texts are returned in this language. (optional) 
            var $expand = $expand_example;  // String | You can request custom task attributes to become part of the task output by specifying the value 'attributes' for the '$expand' parameter.
Otherwise, if the '$expand' parameter is not specified, the 'attributes' field is not included into task output. Note that labels as well as the order of the custom task attributes in which they are returned, are taken from the latest versions of the workflow definitions where these attributes are present.
 (optional) 

            try
            {
                // Retrieve task by ID
                TaskInstance result = apiInstance.v1TaskInstancesTaskInstanceIdGet(taskInstanceId, acceptLanguage, $expand);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling UserTaskInstancesApi.v1TaskInstancesTaskInstanceIdGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: Oauth2_AuthorizationCode
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
// Configure OAuth2 access token for authorization: Oauth2_ClientCredentials
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new Swagger\Client\Api\UserTaskInstancesApi();
$taskInstanceId = taskInstanceId_example; // String | The ID of the user task instance which should be retrieved. The ID is 36 characters long.
$acceptLanguage = acceptLanguage_example; // String | Provide a preferred language. If a translation is available, relevant texts are returned in this language.
$$expand = $expand_example; // String | You can request custom task attributes to become part of the task output by specifying the value 'attributes' for the '$expand' parameter.
Otherwise, if the '$expand' parameter is not specified, the 'attributes' field is not included into task output. Note that labels as well as the order of the custom task attributes in which they are returned, are taken from the latest versions of the workflow definitions where these attributes are present.


try {
    $result = $api_instance->v1TaskInstancesTaskInstanceIdGet($taskInstanceId, $acceptLanguage, $$expand);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling UserTaskInstancesApi->v1TaskInstancesTaskInstanceIdGet: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::UserTaskInstancesApi;

# Configure OAuth2 access token for authorization: Oauth2_AuthorizationCode
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
# Configure OAuth2 access token for authorization: Oauth2_ClientCredentials
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::SwaggerClient::UserTaskInstancesApi->new();
my $taskInstanceId = taskInstanceId_example; # String | The ID of the user task instance which should be retrieved. The ID is 36 characters long.
my $acceptLanguage = acceptLanguage_example; # String | Provide a preferred language. If a translation is available, relevant texts are returned in this language.
my $$expand = $expand_example; # String | You can request custom task attributes to become part of the task output by specifying the value 'attributes' for the '$expand' parameter.
Otherwise, if the '$expand' parameter is not specified, the 'attributes' field is not included into task output. Note that labels as well as the order of the custom task attributes in which they are returned, are taken from the latest versions of the workflow definitions where these attributes are present.


eval { 
    my $result = $api_instance->v1TaskInstancesTaskInstanceIdGet(taskInstanceId => $taskInstanceId, acceptLanguage => $acceptLanguage, $expand => $$expand);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling UserTaskInstancesApi->v1TaskInstancesTaskInstanceIdGet: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: Oauth2_AuthorizationCode
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure OAuth2 access token for authorization: Oauth2_ClientCredentials
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.UserTaskInstancesApi()
taskInstanceId = taskInstanceId_example # String | The ID of the user task instance which should be retrieved. The ID is 36 characters long.
acceptLanguage = acceptLanguage_example # String | Provide a preferred language. If a translation is available, relevant texts are returned in this language. (optional)
$expand = $expand_example # String | You can request custom task attributes to become part of the task output by specifying the value 'attributes' for the '$expand' parameter.
Otherwise, if the '$expand' parameter is not specified, the 'attributes' field is not included into task output. Note that labels as well as the order of the custom task attributes in which they are returned, are taken from the latest versions of the workflow definitions where these attributes are present.
 (optional)

try: 
    # Retrieve task by ID
    api_response = api_instance.v1TaskInstancesTaskInstanceIdGet(taskInstanceId, acceptLanguage=acceptLanguage, $expand=$expand)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling UserTaskInstancesApi->v1TaskInstancesTaskInstanceIdGet: %s\n" % e)

Parameters

Path parameters
Name Description
taskInstanceId*
Header parameters
Name Description
Accept-Language
Query parameters
Name Description
$expand

Responses

Status: 200 - Returns the requested user task.

{activityId=usertask1, createdAt=2017-03-08T17:26:51.675Z, description=An important task, id=a8a6c8ae-03f6-11e7-873d-00163e2ab1ae, priority=MEDIUM, dueDate=2017-03-10T12:00:21.382Z, recipientUsers=[D000001], recipientGroups=[Admins], status=READY, subject=Second Task, workflowDefinitionId=myfirstworkflow, workflowInstanceId=1d4f3e91-03f6-11e7-873d-00163e2ab1ae}

Status: 401 - Unauthorized. You have not provided valid authentication credentials to access the resource.

{error=unauthorized, error_description=Full authentication is required to access this resource.}

Status: 403 - Access forbidden. You have not the required permissions to access the resource.

{error={message=User does not have sufficient privileges.}}

Status: 404 - URL not found. Check whether the URL is correct and whether you refer to an existing task instance.

{error={code=bpm.workflowruntime.rest.task.not.found, message=Task not found, logId=d9abb62e-837b-465b-a77b-4821e21fc21d}}

Status: 429 - You have reached the usage limits that are configured for your tenant. You are performing too many requests or consume too many resources.

{error={code=bpm.workflowruntime.rate.limit.exceeded, message=Your tenant is performing too many requests.}}

Status: 500 - Internal server error. The operation you requested led to an error during execution.

{error={code=bpm.workflowruntime.rest.internal.server.error, message=Internal server error, logId=f29a5719-3342-4a4a-8a3d-5ddd5253159e}}

/v1/task-instances/{taskInstanceId}

Updates the status of a user task, its properties, for example, the subject, and its context with the attributes provided in the request body. Depending on the provided attributes, the user might need administrative privileges for the task instance. Without administrative privileges, a user can only set the status to COMPLETED. Optionally, the user can change the context when completing the task. Note that patching a translated subject or description is not supported. That means, that GET requests that are executed on a translated user task do not display the patched text. For more information, see the workflow service documentation on the [SAP Help Portal](https://help.sap.com/viewer/e157c391253b4ecd93647bf232d18a83/Cloud/en-US/fe41c54d61fa4710b34f2afe11b5d00e.html). Roles permitted to execute this operation: - Global roles: WorkflowAdmin - Instance-specific roles: adminUsers, adminGroups [Prerequisite: You are assigned to the WorkflowParticipant global role.] - Task-specific roles: recipientUsers, recipientGroups [Prerequisite: You are assigned to the WorkflowParticipant global role.] - Scopes: TASK_COMPLETE, TASK_UPDATE


/v1/task-instances/{taskInstanceId}

Usage

curl -X PATCH "https://sandbox.api.sap.com/workflow-service/rest/v1/task-instances/{taskInstanceId}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.UserTaskInstancesApi;

import java.io.File;
import java.util.*;

public class UserTaskInstancesApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        
        // Configure OAuth2 access token for authorization: Oauth2_AuthorizationCode
        OAuth Oauth2_AuthorizationCode = (OAuth) defaultClient.getAuthentication("Oauth2_AuthorizationCode");
        Oauth2_AuthorizationCode.setAccessToken("YOUR ACCESS TOKEN");

        // Configure OAuth2 access token for authorization: Oauth2_ClientCredentials
        OAuth Oauth2_ClientCredentials = (OAuth) defaultClient.getAuthentication("Oauth2_ClientCredentials");
        Oauth2_ClientCredentials.setAccessToken("YOUR ACCESS TOKEN");

        UserTaskInstancesApi apiInstance = new UserTaskInstancesApi();
        String taskInstanceId = taskInstanceId_example; // String | The ID of the user task instance that is to be updated. The ID is 36 characters long.
        UpdateTaskInstancePayload body = ; // UpdateTaskInstancePayload | Specify the request body according to the given schema.
The length of the request body is limited to ensure optimal operation of the service.
        try {
            apiInstance.v1TaskInstancesTaskInstanceIdPatch(taskInstanceId, body);
        } catch (ApiException e) {
            System.err.println("Exception when calling UserTaskInstancesApi#v1TaskInstancesTaskInstanceIdPatch");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.UserTaskInstancesApi;

public class UserTaskInstancesApiExample {

    public static void main(String[] args) {
        UserTaskInstancesApi apiInstance = new UserTaskInstancesApi();
        String taskInstanceId = taskInstanceId_example; // String | The ID of the user task instance that is to be updated. The ID is 36 characters long.
        UpdateTaskInstancePayload body = ; // UpdateTaskInstancePayload | Specify the request body according to the given schema.
The length of the request body is limited to ensure optimal operation of the service.
        try {
            apiInstance.v1TaskInstancesTaskInstanceIdPatch(taskInstanceId, body);
        } catch (ApiException e) {
            System.err.println("Exception when calling UserTaskInstancesApi#v1TaskInstancesTaskInstanceIdPatch");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure OAuth2 access token for authorization: (authentication scheme: Oauth2_AuthorizationCode)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];

// Configure OAuth2 access token for authorization: (authentication scheme: Oauth2_ClientCredentials)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];

String *taskInstanceId = taskInstanceId_example; // The ID of the user task instance that is to be updated. The ID is 36 characters long.
UpdateTaskInstancePayload *body = ; // Specify the request body according to the given schema.
The length of the request body is limited to ensure optimal operation of the service.

UserTaskInstancesApi *apiInstance = [[UserTaskInstancesApi alloc] init];

// Update task by ID
[apiInstance v1TaskInstancesTaskInstanceIdPatchWith:taskInstanceId
    body:body
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var WorkflowApiForCloudFoundry = require('workflow_api_for_cloud_foundry');
var defaultClient = WorkflowApiForCloudFoundry.ApiClient.instance;

// Configure OAuth2 access token for authorization: Oauth2_AuthorizationCode
var Oauth2_AuthorizationCode = defaultClient.authentications['Oauth2_AuthorizationCode'];
Oauth2_AuthorizationCode.accessToken = "YOUR ACCESS TOKEN"

// Configure OAuth2 access token for authorization: Oauth2_ClientCredentials
var Oauth2_ClientCredentials = defaultClient.authentications['Oauth2_ClientCredentials'];
Oauth2_ClientCredentials.accessToken = "YOUR ACCESS TOKEN"

var api = new WorkflowApiForCloudFoundry.UserTaskInstancesApi()

var taskInstanceId = taskInstanceId_example; // {String} The ID of the user task instance that is to be updated. The ID is 36 characters long.

var body = ; // {UpdateTaskInstancePayload} Specify the request body according to the given schema.
The length of the request body is limited to ensure optimal operation of the service.


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.v1TaskInstancesTaskInstanceIdPatch(taskInstanceId, body, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class v1TaskInstancesTaskInstanceIdPatchExample
    {
        public void main()
        {
            
            // Configure OAuth2 access token for authorization: Oauth2_AuthorizationCode
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
            // Configure OAuth2 access token for authorization: Oauth2_ClientCredentials
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new UserTaskInstancesApi();
            var taskInstanceId = taskInstanceId_example;  // String | The ID of the user task instance that is to be updated. The ID is 36 characters long.
            var body = new UpdateTaskInstancePayload(); // UpdateTaskInstancePayload | Specify the request body according to the given schema.
The length of the request body is limited to ensure optimal operation of the service.

            try
            {
                // Update task by ID
                apiInstance.v1TaskInstancesTaskInstanceIdPatch(taskInstanceId, body);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling UserTaskInstancesApi.v1TaskInstancesTaskInstanceIdPatch: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: Oauth2_AuthorizationCode
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
// Configure OAuth2 access token for authorization: Oauth2_ClientCredentials
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new Swagger\Client\Api\UserTaskInstancesApi();
$taskInstanceId = taskInstanceId_example; // String | The ID of the user task instance that is to be updated. The ID is 36 characters long.
$body = ; // UpdateTaskInstancePayload | Specify the request body according to the given schema.
The length of the request body is limited to ensure optimal operation of the service.

try {
    $api_instance->v1TaskInstancesTaskInstanceIdPatch($taskInstanceId, $body);
} catch (Exception $e) {
    echo 'Exception when calling UserTaskInstancesApi->v1TaskInstancesTaskInstanceIdPatch: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::UserTaskInstancesApi;

# Configure OAuth2 access token for authorization: Oauth2_AuthorizationCode
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
# Configure OAuth2 access token for authorization: Oauth2_ClientCredentials
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::SwaggerClient::UserTaskInstancesApi->new();
my $taskInstanceId = taskInstanceId_example; # String | The ID of the user task instance that is to be updated. The ID is 36 characters long.
my $body = WWW::SwaggerClient::Object::UpdateTaskInstancePayload->new(); # UpdateTaskInstancePayload | Specify the request body according to the given schema.
The length of the request body is limited to ensure optimal operation of the service.

eval { 
    $api_instance->v1TaskInstancesTaskInstanceIdPatch(taskInstanceId => $taskInstanceId, body => $body);
};
if ($@) {
    warn "Exception when calling UserTaskInstancesApi->v1TaskInstancesTaskInstanceIdPatch: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: Oauth2_AuthorizationCode
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure OAuth2 access token for authorization: Oauth2_ClientCredentials
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.UserTaskInstancesApi()
taskInstanceId = taskInstanceId_example # String | The ID of the user task instance that is to be updated. The ID is 36 characters long.
body =  # UpdateTaskInstancePayload | Specify the request body according to the given schema.
The length of the request body is limited to ensure optimal operation of the service.

try: 
    # Update task by ID
    api_instance.v1TaskInstancesTaskInstanceIdPatch(taskInstanceId, body)
except ApiException as e:
    print("Exception when calling UserTaskInstancesApi->v1TaskInstancesTaskInstanceIdPatch: %s\n" % e)

Parameters

Path parameters
Name Description
taskInstanceId*
Body parameters
Name Description
body *

Specify the request body according to the given schema. The length of the request body is limited to ensure optimal operation of the service.

Responses

Status: 204 - Depending on the request, either the task has been COMPLETED and the context updated, or the task properties have been updated.

Status: 400 - Incorrect format or structure of the provided request body.

{error={code=bpm.workflowruntime.rest.content.format.invalid, message=Unable to parse the request content because it has an unexpected format or structure. The content has to be JSON and follow the documented data structure., logId=e329b2a4-cac7-44d7-b5c5-0494e6fbad5a}}

Status: 401 - Unauthorized. You have not provided valid authentication credentials to access the resource.

{error=unauthorized, error_description=Full authentication is required to access this resource.}

Status: 403 - Access forbidden. You have not the required permissions to access the resource.

{error={message=User does not have sufficient privileges.}}

Status: 404 - URL not found. Check whether the URL is correct and whether you refer to an existing task instance.

{error={code=bpm.workflowruntime.rest.task.not.found, message=Task not found, logId=d9abb62e-837b-465b-a77b-4821e21fc21d}}

Status: 409 - The operation could not be executed because of another activity in the background. Please try again later.

{error={message=The operation could not be executed because of another activity in the background. Please try again later., logId=04a14146-dea3-493f-892c-3cb1dea7b122}}

Status: 422 - The task cannot be updated for one of the following reasons: The values submitted for updating the property cannot be resolved or became invalid after resolution. The context provided in the request body contains prohibited fields or the status in the request body is invalid.

{error={code=bpm.workflowruntime.rest.task.change.property.invalid, message=Could not update task., details=[{severity=error, message=The subject could not be set, because the value submitted is too long.}, {severity=error, message=The description could not be set: syntax error at position 9.}]}}

Status: 429 - You have reached the usage limits that are configured for your tenant. You are performing too many requests or consume too many resources.

{error={code=bpm.workflowruntime.rate.limit.exceeded, message=Your tenant is performing too many requests.}}

Status: 500 - Internal server error. The operation you requested led to an error during execution.

{error={code=bpm.workflowruntime.rest.internal.server.error, message=Internal server error, logId=f29a5719-3342-4a4a-8a3d-5ddd5253159e}}

WorkflowDefinitions

/v1/workflow-definitions/{definitionId}

Undeploys all versions of an existing workflow definition and deletes the corresponding workflow instances. Once the undeployment has started, you can no longer start a new workflow instance based on this workflow definition. Roles permitted to execute this operation: - Global roles: WorkflowTenantOperator - Scope: WORKFLOW_DEFINITION_UNDEPLOY


/v1/workflow-definitions/{definitionId}

Usage

curl -X DELETE "https://sandbox.api.sap.com/workflow-service/rest/v1/workflow-definitions/{definitionId}?cascade="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.WorkflowDefinitionsApi;

import java.io.File;
import java.util.*;

public class WorkflowDefinitionsApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        
        // Configure OAuth2 access token for authorization: Oauth2_AuthorizationCode
        OAuth Oauth2_AuthorizationCode = (OAuth) defaultClient.getAuthentication("Oauth2_AuthorizationCode");
        Oauth2_AuthorizationCode.setAccessToken("YOUR ACCESS TOKEN");

        // Configure OAuth2 access token for authorization: Oauth2_ClientCredentials
        OAuth Oauth2_ClientCredentials = (OAuth) defaultClient.getAuthentication("Oauth2_ClientCredentials");
        Oauth2_ClientCredentials.setAccessToken("YOUR ACCESS TOKEN");

        WorkflowDefinitionsApi apiInstance = new WorkflowDefinitionsApi();
        String definitionId = definitionId_example; // String | The ID of the workflow definition to be undeployed. The ID is at most 64 characters long.
        Boolean cascade = true; // Boolean | Whether the undeployment of the workflow definition deletes active workflow instances.
If the parameter is false or not specified and there are active workflow instances for the specified workflow definition,
the undeployment is rejected. An instance is considered active if it is in status RUNNING, ERRONEOUS, or SUSPENDED.

        try {
            apiInstance.v1WorkflowDefinitionsDefinitionIdDelete(definitionId, cascade);
        } catch (ApiException e) {
            System.err.println("Exception when calling WorkflowDefinitionsApi#v1WorkflowDefinitionsDefinitionIdDelete");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.WorkflowDefinitionsApi;

public class WorkflowDefinitionsApiExample {

    public static void main(String[] args) {
        WorkflowDefinitionsApi apiInstance = new WorkflowDefinitionsApi();
        String definitionId = definitionId_example; // String | The ID of the workflow definition to be undeployed. The ID is at most 64 characters long.
        Boolean cascade = true; // Boolean | Whether the undeployment of the workflow definition deletes active workflow instances.
If the parameter is false or not specified and there are active workflow instances for the specified workflow definition,
the undeployment is rejected. An instance is considered active if it is in status RUNNING, ERRONEOUS, or SUSPENDED.

        try {
            apiInstance.v1WorkflowDefinitionsDefinitionIdDelete(definitionId, cascade);
        } catch (ApiException e) {
            System.err.println("Exception when calling WorkflowDefinitionsApi#v1WorkflowDefinitionsDefinitionIdDelete");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure OAuth2 access token for authorization: (authentication scheme: Oauth2_AuthorizationCode)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];

// Configure OAuth2 access token for authorization: (authentication scheme: Oauth2_ClientCredentials)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];

String *definitionId = definitionId_example; // The ID of the workflow definition to be undeployed. The ID is at most 64 characters long.
Boolean *cascade = true; // Whether the undeployment of the workflow definition deletes active workflow instances.
If the parameter is false or not specified and there are active workflow instances for the specified workflow definition,
the undeployment is rejected. An instance is considered active if it is in status RUNNING, ERRONEOUS, or SUSPENDED.
 (optional) (default to false)

WorkflowDefinitionsApi *apiInstance = [[WorkflowDefinitionsApi alloc] init];

// Delete workflow definition
[apiInstance v1WorkflowDefinitionsDefinitionIdDeleteWith:definitionId
    cascade:cascade
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var WorkflowApiForCloudFoundry = require('workflow_api_for_cloud_foundry');
var defaultClient = WorkflowApiForCloudFoundry.ApiClient.instance;

// Configure OAuth2 access token for authorization: Oauth2_AuthorizationCode
var Oauth2_AuthorizationCode = defaultClient.authentications['Oauth2_AuthorizationCode'];
Oauth2_AuthorizationCode.accessToken = "YOUR ACCESS TOKEN"

// Configure OAuth2 access token for authorization: Oauth2_ClientCredentials
var Oauth2_ClientCredentials = defaultClient.authentications['Oauth2_ClientCredentials'];
Oauth2_ClientCredentials.accessToken = "YOUR ACCESS TOKEN"

var api = new WorkflowApiForCloudFoundry.WorkflowDefinitionsApi()

var definitionId = definitionId_example; // {String} The ID of the workflow definition to be undeployed. The ID is at most 64 characters long.

var opts = { 
  'cascade': true // {Boolean} Whether the undeployment of the workflow definition deletes active workflow instances.
If the parameter is false or not specified and there are active workflow instances for the specified workflow definition,
the undeployment is rejected. An instance is considered active if it is in status RUNNING, ERRONEOUS, or SUSPENDED.

};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.v1WorkflowDefinitionsDefinitionIdDelete(definitionId, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class v1WorkflowDefinitionsDefinitionIdDeleteExample
    {
        public void main()
        {
            
            // Configure OAuth2 access token for authorization: Oauth2_AuthorizationCode
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
            // Configure OAuth2 access token for authorization: Oauth2_ClientCredentials
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new WorkflowDefinitionsApi();
            var definitionId = definitionId_example;  // String | The ID of the workflow definition to be undeployed. The ID is at most 64 characters long.
            var cascade = true;  // Boolean | Whether the undeployment of the workflow definition deletes active workflow instances.
If the parameter is false or not specified and there are active workflow instances for the specified workflow definition,
the undeployment is rejected. An instance is considered active if it is in status RUNNING, ERRONEOUS, or SUSPENDED.
 (optional)  (default to false)

            try
            {
                // Delete workflow definition
                apiInstance.v1WorkflowDefinitionsDefinitionIdDelete(definitionId, cascade);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling WorkflowDefinitionsApi.v1WorkflowDefinitionsDefinitionIdDelete: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: Oauth2_AuthorizationCode
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
// Configure OAuth2 access token for authorization: Oauth2_ClientCredentials
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new Swagger\Client\Api\WorkflowDefinitionsApi();
$definitionId = definitionId_example; // String | The ID of the workflow definition to be undeployed. The ID is at most 64 characters long.
$cascade = true; // Boolean | Whether the undeployment of the workflow definition deletes active workflow instances.
If the parameter is false or not specified and there are active workflow instances for the specified workflow definition,
the undeployment is rejected. An instance is considered active if it is in status RUNNING, ERRONEOUS, or SUSPENDED.


try {
    $api_instance->v1WorkflowDefinitionsDefinitionIdDelete($definitionId, $cascade);
} catch (Exception $e) {
    echo 'Exception when calling WorkflowDefinitionsApi->v1WorkflowDefinitionsDefinitionIdDelete: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::WorkflowDefinitionsApi;

# Configure OAuth2 access token for authorization: Oauth2_AuthorizationCode
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
# Configure OAuth2 access token for authorization: Oauth2_ClientCredentials
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::SwaggerClient::WorkflowDefinitionsApi->new();
my $definitionId = definitionId_example; # String | The ID of the workflow definition to be undeployed. The ID is at most 64 characters long.
my $cascade = true; # Boolean | Whether the undeployment of the workflow definition deletes active workflow instances.
If the parameter is false or not specified and there are active workflow instances for the specified workflow definition,
the undeployment is rejected. An instance is considered active if it is in status RUNNING, ERRONEOUS, or SUSPENDED.


eval { 
    $api_instance->v1WorkflowDefinitionsDefinitionIdDelete(definitionId => $definitionId, cascade => $cascade);
};
if ($@) {
    warn "Exception when calling WorkflowDefinitionsApi->v1WorkflowDefinitionsDefinitionIdDelete: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: Oauth2_AuthorizationCode
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure OAuth2 access token for authorization: Oauth2_ClientCredentials
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.WorkflowDefinitionsApi()
definitionId = definitionId_example # String | The ID of the workflow definition to be undeployed. The ID is at most 64 characters long.
cascade = true # Boolean | Whether the undeployment of the workflow definition deletes active workflow instances.
If the parameter is false or not specified and there are active workflow instances for the specified workflow definition,
the undeployment is rejected. An instance is considered active if it is in status RUNNING, ERRONEOUS, or SUSPENDED.
 (optional) (default to false)

try: 
    # Delete workflow definition
    api_instance.v1WorkflowDefinitionsDefinitionIdDelete(definitionId, cascade=cascade)
except ApiException as e:
    print("Exception when calling WorkflowDefinitionsApi->v1WorkflowDefinitionsDefinitionIdDelete: %s\n" % e)

Parameters

Path parameters
Name Description
definitionId*
Query parameters
Name Description
cascade

Responses

Status: 202 - The undeployment of the workflow definition has been accepted, but will be executed asynchronously. The response will include the header 'Location' that points to a dedicated resource. You can use this resource to track the status of the undeployment.

Name Type Format Description
Location String Relative URL that points to a job resource. Use this resource to track the status of the undeployment.

Status: 303 - Another undeployment of the workflow definition is already running. The response will include the header 'Location' that points to a job resource which you can use to track the status of the undeployment. Depending on your web client you may be automatically redirected to this resource and receive the status of the undeployment as the result of your request.

Name Type Format Description
Location String Relative URL that points to a job resource. Using this resource you can track the status of the undeployment.

Status: 401 - Unauthorized. You have not provided valid authentication credentials to access the resource.

{error=unauthorized, error_description=Full authentication is required to access this resource.}

Status: 403 - Access forbidden. You have not the required permissions to access the resource.

{error={message=User does not have sufficient privileges.}}

Status: 404 - Workflow definition not found. Either the payload does not contain a definitionId property or the specified ID is incorrect.

{error={code=bpm.workflowruntime.rest.definition.not.found, message=Workflow definition not found, logId=1c4daaf5-eb3f-4ff5-8b13-aa32a47bb07d}}

Status: 412 - At least one version of the workflow definition has at least one RUNNING instance.

{error={code=bpm.workflowruntime.rest.instances.running, message=Cannot undeploy workflow definition because it still has RUNNING instances., logId=c7c7235e-4528-469f-a2de-c9a1bcaacdd3}}

Status: 429 - You have reached the usage limits that are configured for your tenant. You are performing too many requests or consume too many resources.

{error={code=bpm.workflowruntime.rate.limit.exceeded, message=Your tenant is performing too many requests.}}

Status: 500 - Internal server error. The operation you requested led to an error during execution.

{error={code=bpm.workflowruntime.rest.internal.server.error, message=Internal server error, logId=f29a5719-3342-4a4a-8a3d-5ddd5253159e}}

/v1/workflow-definitions/{definitionId}

Retrieves the latest version of the specified workflow definition. Roles permitted to execute this operation: - Global roles: WorkflowViewer, WorkflowAdmin, WorkflowDeveloper - Scope: WORKFLOW_DEFINITION_GET


/v1/workflow-definitions/{definitionId}

Usage

curl -X GET "https://sandbox.api.sap.com/workflow-service/rest/v1/workflow-definitions/{definitionId}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.WorkflowDefinitionsApi;

import java.io.File;
import java.util.*;

public class WorkflowDefinitionsApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        
        // Configure OAuth2 access token for authorization: Oauth2_AuthorizationCode
        OAuth Oauth2_AuthorizationCode = (OAuth) defaultClient.getAuthentication("Oauth2_AuthorizationCode");
        Oauth2_AuthorizationCode.setAccessToken("YOUR ACCESS TOKEN");

        // Configure OAuth2 access token for authorization: Oauth2_ClientCredentials
        OAuth Oauth2_ClientCredentials = (OAuth) defaultClient.getAuthentication("Oauth2_ClientCredentials");
        Oauth2_ClientCredentials.setAccessToken("YOUR ACCESS TOKEN");

        WorkflowDefinitionsApi apiInstance = new WorkflowDefinitionsApi();
        String definitionId = definitionId_example; // String | The ID of the workflow definition for which the latest version should be retrieved. The ID is at most 64 characters long.
        String acceptLanguage = acceptLanguage_example; // String | Provide a preferred language. If a translation is available, relevant texts are returned in this language.
        try {
            WorkflowDefinition result = apiInstance.v1WorkflowDefinitionsDefinitionIdGet(definitionId, acceptLanguage);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling WorkflowDefinitionsApi#v1WorkflowDefinitionsDefinitionIdGet");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.WorkflowDefinitionsApi;

public class WorkflowDefinitionsApiExample {

    public static void main(String[] args) {
        WorkflowDefinitionsApi apiInstance = new WorkflowDefinitionsApi();
        String definitionId = definitionId_example; // String | The ID of the workflow definition for which the latest version should be retrieved. The ID is at most 64 characters long.
        String acceptLanguage = acceptLanguage_example; // String | Provide a preferred language. If a translation is available, relevant texts are returned in this language.
        try {
            WorkflowDefinition result = apiInstance.v1WorkflowDefinitionsDefinitionIdGet(definitionId, acceptLanguage);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling WorkflowDefinitionsApi#v1WorkflowDefinitionsDefinitionIdGet");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure OAuth2 access token for authorization: (authentication scheme: Oauth2_AuthorizationCode)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];

// Configure OAuth2 access token for authorization: (authentication scheme: Oauth2_ClientCredentials)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];

String *definitionId = definitionId_example; // The ID of the workflow definition for which the latest version should be retrieved. The ID is at most 64 characters long.
String *acceptLanguage = acceptLanguage_example; // Provide a preferred language. If a translation is available, relevant texts are returned in this language. (optional)

WorkflowDefinitionsApi *apiInstance = [[WorkflowDefinitionsApi alloc] init];

// Retrieve workflow definition by ID
[apiInstance v1WorkflowDefinitionsDefinitionIdGetWith:definitionId
    acceptLanguage:acceptLanguage
              completionHandler: ^(WorkflowDefinition output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var WorkflowApiForCloudFoundry = require('workflow_api_for_cloud_foundry');
var defaultClient = WorkflowApiForCloudFoundry.ApiClient.instance;

// Configure OAuth2 access token for authorization: Oauth2_AuthorizationCode
var Oauth2_AuthorizationCode = defaultClient.authentications['Oauth2_AuthorizationCode'];
Oauth2_AuthorizationCode.accessToken = "YOUR ACCESS TOKEN"

// Configure OAuth2 access token for authorization: Oauth2_ClientCredentials
var Oauth2_ClientCredentials = defaultClient.authentications['Oauth2_ClientCredentials'];
Oauth2_ClientCredentials.accessToken = "YOUR ACCESS TOKEN"

var api = new WorkflowApiForCloudFoundry.WorkflowDefinitionsApi()

var definitionId = definitionId_example; // {String} The ID of the workflow definition for which the latest version should be retrieved. The ID is at most 64 characters long.

var opts = { 
  'acceptLanguage': acceptLanguage_example // {String} Provide a preferred language. If a translation is available, relevant texts are returned in this language.
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.v1WorkflowDefinitionsDefinitionIdGet(definitionId, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class v1WorkflowDefinitionsDefinitionIdGetExample
    {
        public void main()
        {
            
            // Configure OAuth2 access token for authorization: Oauth2_AuthorizationCode
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
            // Configure OAuth2 access token for authorization: Oauth2_ClientCredentials
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new WorkflowDefinitionsApi();
            var definitionId = definitionId_example;  // String | The ID of the workflow definition for which the latest version should be retrieved. The ID is at most 64 characters long.
            var acceptLanguage = acceptLanguage_example;  // String | Provide a preferred language. If a translation is available, relevant texts are returned in this language. (optional) 

            try
            {
                // Retrieve workflow definition by ID
                WorkflowDefinition result = apiInstance.v1WorkflowDefinitionsDefinitionIdGet(definitionId, acceptLanguage);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling WorkflowDefinitionsApi.v1WorkflowDefinitionsDefinitionIdGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: Oauth2_AuthorizationCode
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
// Configure OAuth2 access token for authorization: Oauth2_ClientCredentials
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new Swagger\Client\Api\WorkflowDefinitionsApi();
$definitionId = definitionId_example; // String | The ID of the workflow definition for which the latest version should be retrieved. The ID is at most 64 characters long.
$acceptLanguage = acceptLanguage_example; // String | Provide a preferred language. If a translation is available, relevant texts are returned in this language.

try {
    $result = $api_instance->v1WorkflowDefinitionsDefinitionIdGet($definitionId, $acceptLanguage);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling WorkflowDefinitionsApi->v1WorkflowDefinitionsDefinitionIdGet: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::WorkflowDefinitionsApi;

# Configure OAuth2 access token for authorization: Oauth2_AuthorizationCode
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
# Configure OAuth2 access token for authorization: Oauth2_ClientCredentials
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::SwaggerClient::WorkflowDefinitionsApi->new();
my $definitionId = definitionId_example; # String | The ID of the workflow definition for which the latest version should be retrieved. The ID is at most 64 characters long.
my $acceptLanguage = acceptLanguage_example; # String | Provide a preferred language. If a translation is available, relevant texts are returned in this language.

eval { 
    my $result = $api_instance->v1WorkflowDefinitionsDefinitionIdGet(definitionId => $definitionId, acceptLanguage => $acceptLanguage);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling WorkflowDefinitionsApi->v1WorkflowDefinitionsDefinitionIdGet: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: Oauth2_AuthorizationCode
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure OAuth2 access token for authorization: Oauth2_ClientCredentials
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.WorkflowDefinitionsApi()
definitionId = definitionId_example # String | The ID of the workflow definition for which the latest version should be retrieved. The ID is at most 64 characters long.
acceptLanguage = acceptLanguage_example # String | Provide a preferred language. If a translation is available, relevant texts are returned in this language. (optional)

try: 
    # Retrieve workflow definition by ID
    api_response = api_instance.v1WorkflowDefinitionsDefinitionIdGet(definitionId, acceptLanguage=acceptLanguage)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling WorkflowDefinitionsApi->v1WorkflowDefinitionsDefinitionIdGet: %s\n" % e)

Parameters

Path parameters
Name Description
definitionId*
Header parameters
Name Description
Accept-Language

Responses

Status: 200 - Returns a single workflow definition version.

{id=LeaveRequestWorkflow, name=Leave Request Workflow, version=2, createdBy=UserId1, createdAt=2018-05-09T11:42:27.524Z, jobs=[]}

Status: 401 - Unauthorized. You have not provided valid authentication credentials to access the resource.

{error=unauthorized, error_description=Full authentication is required to access this resource.}

Status: 403 - Access forbidden. You have not the required permissions to access the resource.

{error={message=User does not have sufficient privileges.}}

Status: 404 - Workflow definition not found. Either the payload does not contain a definitionId property or the specified ID is incorrect.

{error={code=bpm.workflowruntime.rest.definition.not.found, message=Workflow definition not found, logId=1c4daaf5-eb3f-4ff5-8b13-aa32a47bb07d}}

Status: 429 - You have reached the usage limits that are configured for your tenant. You are performing too many requests or consume too many resources.

{error={code=bpm.workflowruntime.rate.limit.exceeded, message=Your tenant is performing too many requests.}}

Status: 500 - Internal server error. The operation you requested led to an error during execution.

{error={code=bpm.workflowruntime.rest.internal.server.error, message=Internal server error, logId=f29a5719-3342-4a4a-8a3d-5ddd5253159e}}

/v1/workflow-definitions/{definitionId}/model

Retrieves the model of the latest version of the specified workflow definition. Roles permitted to execute this operation: - Global roles: WorkflowViewer, WorkflowAdmin, WorkflowDeveloper - Scope: WORKFLOW_DEFINITION_GET_MODEL


/v1/workflow-definitions/{definitionId}/model

Usage

curl -X GET "https://sandbox.api.sap.com/workflow-service/rest/v1/workflow-definitions/{definitionId}/model"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.WorkflowDefinitionsApi;

import java.io.File;
import java.util.*;

public class WorkflowDefinitionsApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        
        // Configure OAuth2 access token for authorization: Oauth2_AuthorizationCode
        OAuth Oauth2_AuthorizationCode = (OAuth) defaultClient.getAuthentication("Oauth2_AuthorizationCode");
        Oauth2_AuthorizationCode.setAccessToken("YOUR ACCESS TOKEN");

        // Configure OAuth2 access token for authorization: Oauth2_ClientCredentials
        OAuth Oauth2_ClientCredentials = (OAuth) defaultClient.getAuthentication("Oauth2_ClientCredentials");
        Oauth2_ClientCredentials.setAccessToken("YOUR ACCESS TOKEN");

        WorkflowDefinitionsApi apiInstance = new WorkflowDefinitionsApi();
        String definitionId = definitionId_example; // String | The workflow definition ID for which the latest model should be retrieved. The workflow definition ID is at most 64 characters long.
        try {
            WorkflowModel result = apiInstance.v1WorkflowDefinitionsDefinitionIdModelGet(definitionId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling WorkflowDefinitionsApi#v1WorkflowDefinitionsDefinitionIdModelGet");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.WorkflowDefinitionsApi;

public class WorkflowDefinitionsApiExample {

    public static void main(String[] args) {
        WorkflowDefinitionsApi apiInstance = new WorkflowDefinitionsApi();
        String definitionId = definitionId_example; // String | The workflow definition ID for which the latest model should be retrieved. The workflow definition ID is at most 64 characters long.
        try {
            WorkflowModel result = apiInstance.v1WorkflowDefinitionsDefinitionIdModelGet(definitionId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling WorkflowDefinitionsApi#v1WorkflowDefinitionsDefinitionIdModelGet");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure OAuth2 access token for authorization: (authentication scheme: Oauth2_AuthorizationCode)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];

// Configure OAuth2 access token for authorization: (authentication scheme: Oauth2_ClientCredentials)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];

String *definitionId = definitionId_example; // The workflow definition ID for which the latest model should be retrieved. The workflow definition ID is at most 64 characters long.

WorkflowDefinitionsApi *apiInstance = [[WorkflowDefinitionsApi alloc] init];

// Retrieve workflow definition model by ID
[apiInstance v1WorkflowDefinitionsDefinitionIdModelGetWith:definitionId
              completionHandler: ^(WorkflowModel output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var WorkflowApiForCloudFoundry = require('workflow_api_for_cloud_foundry');
var defaultClient = WorkflowApiForCloudFoundry.ApiClient.instance;

// Configure OAuth2 access token for authorization: Oauth2_AuthorizationCode
var Oauth2_AuthorizationCode = defaultClient.authentications['Oauth2_AuthorizationCode'];
Oauth2_AuthorizationCode.accessToken = "YOUR ACCESS TOKEN"

// Configure OAuth2 access token for authorization: Oauth2_ClientCredentials
var Oauth2_ClientCredentials = defaultClient.authentications['Oauth2_ClientCredentials'];
Oauth2_ClientCredentials.accessToken = "YOUR ACCESS TOKEN"

var api = new WorkflowApiForCloudFoundry.WorkflowDefinitionsApi()

var definitionId = definitionId_example; // {String} The workflow definition ID for which the latest model should be retrieved. The workflow definition ID is at most 64 characters long.


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.v1WorkflowDefinitionsDefinitionIdModelGet(definitionId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class v1WorkflowDefinitionsDefinitionIdModelGetExample
    {
        public void main()
        {
            
            // Configure OAuth2 access token for authorization: Oauth2_AuthorizationCode
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
            // Configure OAuth2 access token for authorization: Oauth2_ClientCredentials
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new WorkflowDefinitionsApi();
            var definitionId = definitionId_example;  // String | The workflow definition ID for which the latest model should be retrieved. The workflow definition ID is at most 64 characters long.

            try
            {
                // Retrieve workflow definition model by ID
                WorkflowModel result = apiInstance.v1WorkflowDefinitionsDefinitionIdModelGet(definitionId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling WorkflowDefinitionsApi.v1WorkflowDefinitionsDefinitionIdModelGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: Oauth2_AuthorizationCode
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
// Configure OAuth2 access token for authorization: Oauth2_ClientCredentials
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new Swagger\Client\Api\WorkflowDefinitionsApi();
$definitionId = definitionId_example; // String | The workflow definition ID for which the latest model should be retrieved. The workflow definition ID is at most 64 characters long.

try {
    $result = $api_instance->v1WorkflowDefinitionsDefinitionIdModelGet($definitionId);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling WorkflowDefinitionsApi->v1WorkflowDefinitionsDefinitionIdModelGet: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::WorkflowDefinitionsApi;

# Configure OAuth2 access token for authorization: Oauth2_AuthorizationCode
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
# Configure OAuth2 access token for authorization: Oauth2_ClientCredentials
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::SwaggerClient::WorkflowDefinitionsApi->new();
my $definitionId = definitionId_example; # String | The workflow definition ID for which the latest model should be retrieved. The workflow definition ID is at most 64 characters long.

eval { 
    my $result = $api_instance->v1WorkflowDefinitionsDefinitionIdModelGet(definitionId => $definitionId);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling WorkflowDefinitionsApi->v1WorkflowDefinitionsDefinitionIdModelGet: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: Oauth2_AuthorizationCode
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure OAuth2 access token for authorization: Oauth2_ClientCredentials
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.WorkflowDefinitionsApi()
definitionId = definitionId_example # String | The workflow definition ID for which the latest model should be retrieved. The workflow definition ID is at most 64 characters long.

try: 
    # Retrieve workflow definition model by ID
    api_response = api_instance.v1WorkflowDefinitionsDefinitionIdModelGet(definitionId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling WorkflowDefinitionsApi->v1WorkflowDefinitionsDefinitionIdModelGet: %s\n" % e)

Parameters

Path parameters
Name Description
definitionId*

Responses

Status: 200 - The deployed workflow model.

{contents={a46b9a0c-e2c4-46f1-ab45-a4f1c64242e1={classDefinition=com.sap.bpm.wfs.Model, id=ExternalServiceFlow, name=ExternalServiceFlow, subject=External Service Flow '${id}', businessKey=${id}, lastIds=835bb943-b74b-4a45-9a26-2a5ab2471fae, events={dac01f83-3cd2-421a-b099-695372490c22={name=StartEvent1}, 17af566f-cce3-4375-9e92-85fe456b9b1a={name=EndEvent1}}, activities={65021cef-c40b-4481-b6a5-d28f3d425b49={name=Call external Service}}, sequenceFlows={98d81e72-af85-46be-86f2-b86a290db42d={name=SequenceFlow14}, 0da7f0a6-fa3e-4c2a-a3a9-92f738e9cef9={name=SequenceFlow15}}, diagrams={5136eee3-88cd-40b3-a909-a212b7be5c1c={}}}, 835bb943-b74b-4a45-9a26-2a5ab2471fae={classDefinition=com.sap.bpm.wfs.LastIDs, sequenceflow=15, startevent=1, endevent=1, servicetask=1, scripttask=2, parallelgateway=2, exclusivegateway=2}, 5136eee3-88cd-40b3-a909-a212b7be5c1c={classDefinition=com.sap.bpm.wfs.ui.Diagram, symbols={e5af1ccc-d6ac-4b93-bd54-9ecbc22e1b0c={}, bba91ec8-a65b-4220-8b9a-38346de34c1e={}, fd3dd963-fa3f-4346-b75f-aaffcf172b6a={}, 9e681614-dc17-425d-ab02-037029c789e8={}, 9d851743-62a1-47cc-8786-522310d3a912={}}}, dac01f83-3cd2-421a-b099-695372490c22={classDefinition=com.sap.bpm.wfs.StartEvent, id=startevent1, name=StartEvent1}, e5af1ccc-d6ac-4b93-bd54-9ecbc22e1b0c={classDefinition=com.sap.bpm.wfs.ui.StartEventSymbol, x=134, y=221, width=32, height=32, object=dac01f83-3cd2-421a-b099-695372490c22}, 17af566f-cce3-4375-9e92-85fe456b9b1a={classDefinition=com.sap.bpm.wfs.EndEvent, id=endevent1, name=EndEvent1}, bba91ec8-a65b-4220-8b9a-38346de34c1e={classDefinition=com.sap.bpm.wfs.ui.EndEventSymbol, x=548, y=221, width=32, height=32, object=17af566f-cce3-4375-9e92-85fe456b9b1a}, 65021cef-c40b-4481-b6a5-d28f3d425b49={classDefinition=com.sap.bpm.wfs.ServiceTask, destination=destination, path=/path/${id}, httpMethod=GET, id=servicetask1, name=Call external Service}, fd3dd963-fa3f-4346-b75f-aaffcf172b6a={classDefinition=com.sap.bpm.wfs.ui.ServiceTaskSymbol, x=216, y=209.5, width=100, height=55, object=65021cef-c40b-4481-b6a5-d28f3d425b49}, 98d81e72-af85-46be-86f2-b86a290db42d={classDefinition=com.sap.bpm.wfs.SequenceFlow, id=sequenceflow14, name=SequenceFlow14, sourceRef=dac01f83-3cd2-421a-b099-695372490c22, targetRef=65021cef-c40b-4481-b6a5-d28f3d425b49}, 9e681614-dc17-425d-ab02-037029c789e8={classDefinition=com.sap.bpm.wfs.ui.SequenceFlowSymbol, points=150,237 266,237, sourceSymbol=e5af1ccc-d6ac-4b93-bd54-9ecbc22e1b0c, targetSymbol=fd3dd963-fa3f-4346-b75f-aaffcf172b6a, object=98d81e72-af85-46be-86f2-b86a290db42d}, 0da7f0a6-fa3e-4c2a-a3a9-92f738e9cef9={classDefinition=com.sap.bpm.wfs.SequenceFlow, id=sequenceflow15, name=SequenceFlow15, sourceRef=65021cef-c40b-4481-b6a5-d28f3d425b49, targetRef=17af566f-cce3-4375-9e92-85fe456b9b1a}, 9d851743-62a1-47cc-8786-522310d3a912={classDefinition=com.sap.bpm.wfs.ui.SequenceFlowSymbol, points=266,237 548,237, sourceSymbol=fd3dd963-fa3f-4346-b75f-aaffcf172b6a, targetSymbol=bba91ec8-a65b-4220-8b9a-38346de34c1e, object=0da7f0a6-fa3e-4c2a-a3a9-92f738e9cef9}}}

Status: 401 - Unauthorized. You have not provided valid authentication credentials to access the resource.

{error=unauthorized, error_description=Full authentication is required to access this resource.}

Status: 403 - Access forbidden. You have not the required permissions to access the resource.

{error={message=User does not have sufficient privileges.}}

Status: 404 - Either the specified workflow definition or the JSON model for that definition was not found.

{error={code=bpm.workflowruntime.rest.json.model.not.found, message=Workflow definition JSON model not found, logId=99edaaf5-ea51-4ff5-8b24-aa32a47bb684}}

Status: 429 - You have reached the usage limits that are configured for your tenant. You are performing too many requests or consume too many resources.

{error={code=bpm.workflowruntime.rate.limit.exceeded, message=Your tenant is performing too many requests.}}

Status: 500 - Internal server error. The operation you requested led to an error during execution.

{error={code=bpm.workflowruntime.rest.internal.server.error, message=Internal server error, logId=f29a5719-3342-4a4a-8a3d-5ddd5253159e}}

/v1/workflow-definitions/{definitionId}/sample-contexts/default-start-context

Retrieves the default start context of the latest version of the specified workflow definition. Roles permitted to execute this operation: - Global roles: WorkflowInitiator - Scope: WORKFLOW_DEFINITION_GET_SAMPLE_CONTEXT


/v1/workflow-definitions/{definitionId}/sample-contexts/default-start-context

Usage

curl -X GET "https://sandbox.api.sap.com/workflow-service/rest/v1/workflow-definitions/{definitionId}/sample-contexts/default-start-context"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.WorkflowDefinitionsApi;

import java.io.File;
import java.util.*;

public class WorkflowDefinitionsApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        
        // Configure OAuth2 access token for authorization: Oauth2_AuthorizationCode
        OAuth Oauth2_AuthorizationCode = (OAuth) defaultClient.getAuthentication("Oauth2_AuthorizationCode");
        Oauth2_AuthorizationCode.setAccessToken("YOUR ACCESS TOKEN");

        // Configure OAuth2 access token for authorization: Oauth2_ClientCredentials
        OAuth Oauth2_ClientCredentials = (OAuth) defaultClient.getAuthentication("Oauth2_ClientCredentials");
        Oauth2_ClientCredentials.setAccessToken("YOUR ACCESS TOKEN");

        WorkflowDefinitionsApi apiInstance = new WorkflowDefinitionsApi();
        String definitionId = definitionId_example; // String | The workflow definition ID for which the default start context should be retrieved. The workflow definition ID is at most 64 characters long.
        try {
            SampleContext result = apiInstance.v1WorkflowDefinitionsDefinitionIdSampleContextsDefaultStartContextGet(definitionId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling WorkflowDefinitionsApi#v1WorkflowDefinitionsDefinitionIdSampleContextsDefaultStartContextGet");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.WorkflowDefinitionsApi;

public class WorkflowDefinitionsApiExample {

    public static void main(String[] args) {
        WorkflowDefinitionsApi apiInstance = new WorkflowDefinitionsApi();
        String definitionId = definitionId_example; // String | The workflow definition ID for which the default start context should be retrieved. The workflow definition ID is at most 64 characters long.
        try {
            SampleContext result = apiInstance.v1WorkflowDefinitionsDefinitionIdSampleContextsDefaultStartContextGet(definitionId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling WorkflowDefinitionsApi#v1WorkflowDefinitionsDefinitionIdSampleContextsDefaultStartContextGet");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure OAuth2 access token for authorization: (authentication scheme: Oauth2_AuthorizationCode)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];

// Configure OAuth2 access token for authorization: (authentication scheme: Oauth2_ClientCredentials)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];

String *definitionId = definitionId_example; // The workflow definition ID for which the default start context should be retrieved. The workflow definition ID is at most 64 characters long.

WorkflowDefinitionsApi *apiInstance = [[WorkflowDefinitionsApi alloc] init];

// Retrieve sample start context of workflow definition by ID
[apiInstance v1WorkflowDefinitionsDefinitionIdSampleContextsDefaultStartContextGetWith:definitionId
              completionHandler: ^(SampleContext output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var WorkflowApiForCloudFoundry = require('workflow_api_for_cloud_foundry');
var defaultClient = WorkflowApiForCloudFoundry.ApiClient.instance;

// Configure OAuth2 access token for authorization: Oauth2_AuthorizationCode
var Oauth2_AuthorizationCode = defaultClient.authentications['Oauth2_AuthorizationCode'];
Oauth2_AuthorizationCode.accessToken = "YOUR ACCESS TOKEN"

// Configure OAuth2 access token for authorization: Oauth2_ClientCredentials
var Oauth2_ClientCredentials = defaultClient.authentications['Oauth2_ClientCredentials'];
Oauth2_ClientCredentials.accessToken = "YOUR ACCESS TOKEN"

var api = new WorkflowApiForCloudFoundry.WorkflowDefinitionsApi()

var definitionId = definitionId_example; // {String} The workflow definition ID for which the default start context should be retrieved. The workflow definition ID is at most 64 characters long.


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.v1WorkflowDefinitionsDefinitionIdSampleContextsDefaultStartContextGet(definitionId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class v1WorkflowDefinitionsDefinitionIdSampleContextsDefaultStartContextGetExample
    {
        public void main()
        {
            
            // Configure OAuth2 access token for authorization: Oauth2_AuthorizationCode
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
            // Configure OAuth2 access token for authorization: Oauth2_ClientCredentials
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new WorkflowDefinitionsApi();
            var definitionId = definitionId_example;  // String | The workflow definition ID for which the default start context should be retrieved. The workflow definition ID is at most 64 characters long.

            try
            {
                // Retrieve sample start context of workflow definition by ID
                SampleContext result = apiInstance.v1WorkflowDefinitionsDefinitionIdSampleContextsDefaultStartContextGet(definitionId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling WorkflowDefinitionsApi.v1WorkflowDefinitionsDefinitionIdSampleContextsDefaultStartContextGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: Oauth2_AuthorizationCode
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
// Configure OAuth2 access token for authorization: Oauth2_ClientCredentials
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new Swagger\Client\Api\WorkflowDefinitionsApi();
$definitionId = definitionId_example; // String | The workflow definition ID for which the default start context should be retrieved. The workflow definition ID is at most 64 characters long.

try {
    $result = $api_instance->v1WorkflowDefinitionsDefinitionIdSampleContextsDefaultStartContextGet($definitionId);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling WorkflowDefinitionsApi->v1WorkflowDefinitionsDefinitionIdSampleContextsDefaultStartContextGet: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::WorkflowDefinitionsApi;

# Configure OAuth2 access token for authorization: Oauth2_AuthorizationCode
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
# Configure OAuth2 access token for authorization: Oauth2_ClientCredentials
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::SwaggerClient::WorkflowDefinitionsApi->new();
my $definitionId = definitionId_example; # String | The workflow definition ID for which the default start context should be retrieved. The workflow definition ID is at most 64 characters long.

eval { 
    my $result = $api_instance->v1WorkflowDefinitionsDefinitionIdSampleContextsDefaultStartContextGet(definitionId => $definitionId);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling WorkflowDefinitionsApi->v1WorkflowDefinitionsDefinitionIdSampleContextsDefaultStartContextGet: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: Oauth2_AuthorizationCode
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure OAuth2 access token for authorization: Oauth2_ClientCredentials
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.WorkflowDefinitionsApi()
definitionId = definitionId_example # String | The workflow definition ID for which the default start context should be retrieved. The workflow definition ID is at most 64 characters long.

try: 
    # Retrieve sample start context of workflow definition by ID
    api_response = api_instance.v1WorkflowDefinitionsDefinitionIdSampleContextsDefaultStartContextGet(definitionId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling WorkflowDefinitionsApi->v1WorkflowDefinitionsDefinitionIdSampleContextsDefaultStartContextGet: %s\n" % e)

Parameters

Path parameters
Name Description
definitionId*

Responses

Status: 200 - Returns the default start context of the latest version of the workflow definition.

{id=default-start-context, content={product=Hamlet (Paperback), inStock=true, inventory=20000, price=7.49, publishingDate=1600-04-23T18:25:43.511Z, author={name=William Shakespeare}, publishers=[Simon & Brown, SparkNotes, Dover Publications]}, modelElementId=startevent1}

Status: 401 - Unauthorized. You have not provided valid authentication credentials to access the resource.

{error=unauthorized, error_description=Full authentication is required to access this resource.}

Status: 403 - Access forbidden. You have not the required permissions to access the resource.

{error={message=User does not have sufficient privileges.}}

Status: 404 - Either the specified workflow definition or the default sample context within the definition was not found.

{error={code=bpm.workflowruntime.rest.sample.context.not.found, message=Sample context for workflow definition not found, logId=1c4daaf5-eb3f-4ff5-8b13-aa32a47bb07d}}

Status: 429 - You have reached the usage limits that are configured for your tenant. You are performing too many requests or consume too many resources.

{error={code=bpm.workflowruntime.rate.limit.exceeded, message=Your tenant is performing too many requests.}}

Status: 500 - Internal server error. The operation you requested led to an error during execution.

{error={code=bpm.workflowruntime.rest.internal.server.error, message=Internal server error, logId=f29a5719-3342-4a4a-8a3d-5ddd5253159e}}

/v1/workflow-definitions/{definitionId}/versions

Retrieves a list of all deployed versions of the specified workflow definition. Roles permitted to execute this operation: - Global roles: WorkflowViewer, WorkflowAdmin, WorkflowDeveloper - Scope: WORKFLOW_DEFINITION_GET


/v1/workflow-definitions/{definitionId}/versions

Usage

curl -X GET "https://sandbox.api.sap.com/workflow-service/rest/v1/workflow-definitions/{definitionId}/versions?$orderby=&$skip=&$top=&$inlinecount="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.WorkflowDefinitionsApi;

import java.io.File;
import java.util.*;

public class WorkflowDefinitionsApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        
        // Configure OAuth2 access token for authorization: Oauth2_AuthorizationCode
        OAuth Oauth2_AuthorizationCode = (OAuth) defaultClient.getAuthentication("Oauth2_AuthorizationCode");
        Oauth2_AuthorizationCode.setAccessToken("YOUR ACCESS TOKEN");

        // Configure OAuth2 access token for authorization: Oauth2_ClientCredentials
        OAuth Oauth2_ClientCredentials = (OAuth) defaultClient.getAuthentication("Oauth2_ClientCredentials");
        Oauth2_ClientCredentials.setAccessToken("YOUR ACCESS TOKEN");

        WorkflowDefinitionsApi apiInstance = new WorkflowDefinitionsApi();
        String definitionId = definitionId_example; // String | The ID of the workflow definition for which all versions should be retrieved. The ID is at most 64 characters long.
        String acceptLanguage = acceptLanguage_example; // String | Provide a preferred language. If a translation is available, relevant texts are returned in this language.
        String $orderby = $orderby_example; // String | Specify the attribute you want to sort by and the order separated by a space. If the order is omitted it is ascending by default.
If not specified, the results are sorted by the 'createdAt' attribute in descending order.
        Integer $skip = 56; // Integer | Specify the number of records you want to skip from the beginning.
You can skip at most 4000 records. To indicate a result range that starts, for example, at 1001, combine the $skip with the $top parameter.
If not specified, no records are skipped.
Refer also to the $top parameter.
        Integer $top = 56; // Integer | Specify the number of records you want to show.
You can get at most 1000 records per API call. To indicate a result range that starts, for example, at 1001, combine the $top with the $skip parameter.
If not specified, 100 records are returned.
Refer also to the $skip parameter.
        String $inlinecount = $inlinecount_example; // String | Specify whether the total count of the workflow definition versions should be returned as the value of the X-Total-Count response header.
To enable the header, use the 'allpages' setting. To disable the header, use the 'none' setting. The values are case-sensitive.
        try {
            array[WorkflowDefinitionVersion] result = apiInstance.v1WorkflowDefinitionsDefinitionIdVersionsGet(definitionId, acceptLanguage, $orderby, $skip, $top, $inlinecount);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling WorkflowDefinitionsApi#v1WorkflowDefinitionsDefinitionIdVersionsGet");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.WorkflowDefinitionsApi;

public class WorkflowDefinitionsApiExample {

    public static void main(String[] args) {
        WorkflowDefinitionsApi apiInstance = new WorkflowDefinitionsApi();
        String definitionId = definitionId_example; // String | The ID of the workflow definition for which all versions should be retrieved. The ID is at most 64 characters long.
        String acceptLanguage = acceptLanguage_example; // String | Provide a preferred language. If a translation is available, relevant texts are returned in this language.
        String $orderby = $orderby_example; // String | Specify the attribute you want to sort by and the order separated by a space. If the order is omitted it is ascending by default.
If not specified, the results are sorted by the 'createdAt' attribute in descending order.
        Integer $skip = 56; // Integer | Specify the number of records you want to skip from the beginning.
You can skip at most 4000 records. To indicate a result range that starts, for example, at 1001, combine the $skip with the $top parameter.
If not specified, no records are skipped.
Refer also to the $top parameter.
        Integer $top = 56; // Integer | Specify the number of records you want to show.
You can get at most 1000 records per API call. To indicate a result range that starts, for example, at 1001, combine the $top with the $skip parameter.
If not specified, 100 records are returned.
Refer also to the $skip parameter.
        String $inlinecount = $inlinecount_example; // String | Specify whether the total count of the workflow definition versions should be returned as the value of the X-Total-Count response header.
To enable the header, use the 'allpages' setting. To disable the header, use the 'none' setting. The values are case-sensitive.
        try {
            array[WorkflowDefinitionVersion] result = apiInstance.v1WorkflowDefinitionsDefinitionIdVersionsGet(definitionId, acceptLanguage, $orderby, $skip, $top, $inlinecount);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling WorkflowDefinitionsApi#v1WorkflowDefinitionsDefinitionIdVersionsGet");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure OAuth2 access token for authorization: (authentication scheme: Oauth2_AuthorizationCode)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];

// Configure OAuth2 access token for authorization: (authentication scheme: Oauth2_ClientCredentials)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];

String *definitionId = definitionId_example; // The ID of the workflow definition for which all versions should be retrieved. The ID is at most 64 characters long.
String *acceptLanguage = acceptLanguage_example; // Provide a preferred language. If a translation is available, relevant texts are returned in this language. (optional)
String *$orderby = $orderby_example; // Specify the attribute you want to sort by and the order separated by a space. If the order is omitted it is ascending by default.
If not specified, the results are sorted by the 'createdAt' attribute in descending order. (optional) (default to createdAt desc)
Integer *$skip = 56; // Specify the number of records you want to skip from the beginning.
You can skip at most 4000 records. To indicate a result range that starts, for example, at 1001, combine the $skip with the $top parameter.
If not specified, no records are skipped.
Refer also to the $top parameter. (optional) (default to 0)
Integer *$top = 56; // Specify the number of records you want to show.
You can get at most 1000 records per API call. To indicate a result range that starts, for example, at 1001, combine the $top with the $skip parameter.
If not specified, 100 records are returned.
Refer also to the $skip parameter. (optional) (default to 100)
String *$inlinecount = $inlinecount_example; // Specify whether the total count of the workflow definition versions should be returned as the value of the X-Total-Count response header.
To enable the header, use the 'allpages' setting. To disable the header, use the 'none' setting. The values are case-sensitive. (optional) (default to none)

WorkflowDefinitionsApi *apiInstance = [[WorkflowDefinitionsApi alloc] init];

// Retrieve all versions of workflow definition by ID
[apiInstance v1WorkflowDefinitionsDefinitionIdVersionsGetWith:definitionId
    acceptLanguage:acceptLanguage
    $orderby:$orderby
    $skip:$skip
    $top:$top
    $inlinecount:$inlinecount
              completionHandler: ^(array[WorkflowDefinitionVersion] output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var WorkflowApiForCloudFoundry = require('workflow_api_for_cloud_foundry');
var defaultClient = WorkflowApiForCloudFoundry.ApiClient.instance;

// Configure OAuth2 access token for authorization: Oauth2_AuthorizationCode
var Oauth2_AuthorizationCode = defaultClient.authentications['Oauth2_AuthorizationCode'];
Oauth2_AuthorizationCode.accessToken = "YOUR ACCESS TOKEN"

// Configure OAuth2 access token for authorization: Oauth2_ClientCredentials
var Oauth2_ClientCredentials = defaultClient.authentications['Oauth2_ClientCredentials'];
Oauth2_ClientCredentials.accessToken = "YOUR ACCESS TOKEN"

var api = new WorkflowApiForCloudFoundry.WorkflowDefinitionsApi()

var definitionId = definitionId_example; // {String} The ID of the workflow definition for which all versions should be retrieved. The ID is at most 64 characters long.

var opts = { 
  'acceptLanguage': acceptLanguage_example, // {String} Provide a preferred language. If a translation is available, relevant texts are returned in this language.
  '$orderby': $orderby_example, // {String} Specify the attribute you want to sort by and the order separated by a space. If the order is omitted it is ascending by default.
If not specified, the results are sorted by the 'createdAt' attribute in descending order.
  '$skip': 56, // {Integer} Specify the number of records you want to skip from the beginning.
You can skip at most 4000 records. To indicate a result range that starts, for example, at 1001, combine the $skip with the $top parameter.
If not specified, no records are skipped.
Refer also to the $top parameter.
  '$top': 56, // {Integer} Specify the number of records you want to show.
You can get at most 1000 records per API call. To indicate a result range that starts, for example, at 1001, combine the $top with the $skip parameter.
If not specified, 100 records are returned.
Refer also to the $skip parameter.
  '$inlinecount': $inlinecount_example // {String} Specify whether the total count of the workflow definition versions should be returned as the value of the X-Total-Count response header.
To enable the header, use the 'allpages' setting. To disable the header, use the 'none' setting. The values are case-sensitive.
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.v1WorkflowDefinitionsDefinitionIdVersionsGet(definitionId, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class v1WorkflowDefinitionsDefinitionIdVersionsGetExample
    {
        public void main()
        {
            
            // Configure OAuth2 access token for authorization: Oauth2_AuthorizationCode
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
            // Configure OAuth2 access token for authorization: Oauth2_ClientCredentials
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new WorkflowDefinitionsApi();
            var definitionId = definitionId_example;  // String | The ID of the workflow definition for which all versions should be retrieved. The ID is at most 64 characters long.
            var acceptLanguage = acceptLanguage_example;  // String | Provide a preferred language. If a translation is available, relevant texts are returned in this language. (optional) 
            var $orderby = $orderby_example;  // String | Specify the attribute you want to sort by and the order separated by a space. If the order is omitted it is ascending by default.
If not specified, the results are sorted by the 'createdAt' attribute in descending order. (optional)  (default to createdAt desc)
            var $skip = 56;  // Integer | Specify the number of records you want to skip from the beginning.
You can skip at most 4000 records. To indicate a result range that starts, for example, at 1001, combine the $skip with the $top parameter.
If not specified, no records are skipped.
Refer also to the $top parameter. (optional)  (default to 0)
            var $top = 56;  // Integer | Specify the number of records you want to show.
You can get at most 1000 records per API call. To indicate a result range that starts, for example, at 1001, combine the $top with the $skip parameter.
If not specified, 100 records are returned.
Refer also to the $skip parameter. (optional)  (default to 100)
            var $inlinecount = $inlinecount_example;  // String | Specify whether the total count of the workflow definition versions should be returned as the value of the X-Total-Count response header.
To enable the header, use the 'allpages' setting. To disable the header, use the 'none' setting. The values are case-sensitive. (optional)  (default to none)

            try
            {
                // Retrieve all versions of workflow definition by ID
                array[WorkflowDefinitionVersion] result = apiInstance.v1WorkflowDefinitionsDefinitionIdVersionsGet(definitionId, acceptLanguage, $orderby, $skip, $top, $inlinecount);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling WorkflowDefinitionsApi.v1WorkflowDefinitionsDefinitionIdVersionsGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: Oauth2_AuthorizationCode
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
// Configure OAuth2 access token for authorization: Oauth2_ClientCredentials
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new Swagger\Client\Api\WorkflowDefinitionsApi();
$definitionId = definitionId_example; // String | The ID of the workflow definition for which all versions should be retrieved. The ID is at most 64 characters long.
$acceptLanguage = acceptLanguage_example; // String | Provide a preferred language. If a translation is available, relevant texts are returned in this language.
$$orderby = $orderby_example; // String | Specify the attribute you want to sort by and the order separated by a space. If the order is omitted it is ascending by default.
If not specified, the results are sorted by the 'createdAt' attribute in descending order.
$$skip = 56; // Integer | Specify the number of records you want to skip from the beginning.
You can skip at most 4000 records. To indicate a result range that starts, for example, at 1001, combine the $skip with the $top parameter.
If not specified, no records are skipped.
Refer also to the $top parameter.
$$top = 56; // Integer | Specify the number of records you want to show.
You can get at most 1000 records per API call. To indicate a result range that starts, for example, at 1001, combine the $top with the $skip parameter.
If not specified, 100 records are returned.
Refer also to the $skip parameter.
$$inlinecount = $inlinecount_example; // String | Specify whether the total count of the workflow definition versions should be returned as the value of the X-Total-Count response header.
To enable the header, use the 'allpages' setting. To disable the header, use the 'none' setting. The values are case-sensitive.

try {
    $result = $api_instance->v1WorkflowDefinitionsDefinitionIdVersionsGet($definitionId, $acceptLanguage, $$orderby, $$skip, $$top, $$inlinecount);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling WorkflowDefinitionsApi->v1WorkflowDefinitionsDefinitionIdVersionsGet: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::WorkflowDefinitionsApi;

# Configure OAuth2 access token for authorization: Oauth2_AuthorizationCode
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
# Configure OAuth2 access token for authorization: Oauth2_ClientCredentials
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::SwaggerClient::WorkflowDefinitionsApi->new();
my $definitionId = definitionId_example; # String | The ID of the workflow definition for which all versions should be retrieved. The ID is at most 64 characters long.
my $acceptLanguage = acceptLanguage_example; # String | Provide a preferred language. If a translation is available, relevant texts are returned in this language.
my $$orderby = $orderby_example; # String | Specify the attribute you want to sort by and the order separated by a space. If the order is omitted it is ascending by default.
If not specified, the results are sorted by the 'createdAt' attribute in descending order.
my $$skip = 56; # Integer | Specify the number of records you want to skip from the beginning.
You can skip at most 4000 records. To indicate a result range that starts, for example, at 1001, combine the $skip with the $top parameter.
If not specified, no records are skipped.
Refer also to the $top parameter.
my $$top = 56; # Integer | Specify the number of records you want to show.
You can get at most 1000 records per API call. To indicate a result range that starts, for example, at 1001, combine the $top with the $skip parameter.
If not specified, 100 records are returned.
Refer also to the $skip parameter.
my $$inlinecount = $inlinecount_example; # String | Specify whether the total count of the workflow definition versions should be returned as the value of the X-Total-Count response header.
To enable the header, use the 'allpages' setting. To disable the header, use the 'none' setting. The values are case-sensitive.

eval { 
    my $result = $api_instance->v1WorkflowDefinitionsDefinitionIdVersionsGet(definitionId => $definitionId, acceptLanguage => $acceptLanguage, $orderby => $$orderby, $skip => $$skip, $top => $$top, $inlinecount => $$inlinecount);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling WorkflowDefinitionsApi->v1WorkflowDefinitionsDefinitionIdVersionsGet: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: Oauth2_AuthorizationCode
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure OAuth2 access token for authorization: Oauth2_ClientCredentials
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.WorkflowDefinitionsApi()
definitionId = definitionId_example # String | The ID of the workflow definition for which all versions should be retrieved. The ID is at most 64 characters long.
acceptLanguage = acceptLanguage_example # String | Provide a preferred language. If a translation is available, relevant texts are returned in this language. (optional)
$orderby = $orderby_example # String | Specify the attribute you want to sort by and the order separated by a space. If the order is omitted it is ascending by default.
If not specified, the results are sorted by the 'createdAt' attribute in descending order. (optional) (default to createdAt desc)
$skip = 56 # Integer | Specify the number of records you want to skip from the beginning.
You can skip at most 4000 records. To indicate a result range that starts, for example, at 1001, combine the $skip with the $top parameter.
If not specified, no records are skipped.
Refer also to the $top parameter. (optional) (default to 0)
$top = 56 # Integer | Specify the number of records you want to show.
You can get at most 1000 records per API call. To indicate a result range that starts, for example, at 1001, combine the $top with the $skip parameter.
If not specified, 100 records are returned.
Refer also to the $skip parameter. (optional) (default to 100)
$inlinecount = $inlinecount_example # String | Specify whether the total count of the workflow definition versions should be returned as the value of the X-Total-Count response header.
To enable the header, use the 'allpages' setting. To disable the header, use the 'none' setting. The values are case-sensitive. (optional) (default to none)

try: 
    # Retrieve all versions of workflow definition by ID
    api_response = api_instance.v1WorkflowDefinitionsDefinitionIdVersionsGet(definitionId, acceptLanguage=acceptLanguage, $orderby=$orderby, $skip=$skip, $top=$top, $inlinecount=$inlinecount)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling WorkflowDefinitionsApi->v1WorkflowDefinitionsDefinitionIdVersionsGet: %s\n" % e)

Parameters

Path parameters
Name Description
definitionId*
Header parameters
Name Description
Accept-Language
Query parameters
Name Description
$orderby
$skip
$top
$inlinecount

Responses

Status: 200 - Returns a list of deployed workflow definitions.

[{id=LeaveRequestWorkflow, name=Leave Request Workflow, version=2, createdBy=UserId1, createdAt=2018-05-09T11:42:27.524Z}, {id=LeaveRequestWorkflow, name=Leave Request Workflow, version=1, createdBy=UserId1, createdAt=2018-05-01T14:44:53.186Z}]

Status: 401 - Unauthorized. You have not provided valid authentication credentials to access the resource.

{error=unauthorized, error_description=Full authentication is required to access this resource.}

Status: 403 - Access forbidden. You have not the required permissions to access the resource.

{error={message=User does not have sufficient privileges.}}

Status: 404 - Workflow definition not found. Either the payload does not contain a definitionId property or the specified ID is incorrect.

{error={code=bpm.workflowruntime.rest.definition.not.found, message=Workflow definition not found, logId=1c4daaf5-eb3f-4ff5-8b13-aa32a47bb07d}}

Status: 429 - You have reached the usage limits that are configured for your tenant. You are performing too many requests or consume too many resources.

{error={code=bpm.workflowruntime.rate.limit.exceeded, message=Your tenant is performing too many requests.}}

Status: 500 - Internal server error. The operation you requested led to an error during execution.

{error={code=bpm.workflowruntime.rest.internal.server.error, message=Internal server error, logId=f29a5719-3342-4a4a-8a3d-5ddd5253159e}}

/v1/workflow-definitions/{definitionId}/versions/{versionNumber}

Retrieves the specified version of the specified workflow definition. Roles permitted to execute this operation: - Global roles: WorkflowViewer, WorkflowAdmin, WorkflowDeveloper - Scope: WORKFLOW_DEFINITION_GET


/v1/workflow-definitions/{definitionId}/versions/{versionNumber}

Usage

curl -X GET "https://sandbox.api.sap.com/workflow-service/rest/v1/workflow-definitions/{definitionId}/versions/{versionNumber}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.WorkflowDefinitionsApi;

import java.io.File;
import java.util.*;

public class WorkflowDefinitionsApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        
        // Configure OAuth2 access token for authorization: Oauth2_AuthorizationCode
        OAuth Oauth2_AuthorizationCode = (OAuth) defaultClient.getAuthentication("Oauth2_AuthorizationCode");
        Oauth2_AuthorizationCode.setAccessToken("YOUR ACCESS TOKEN");

        // Configure OAuth2 access token for authorization: Oauth2_ClientCredentials
        OAuth Oauth2_ClientCredentials = (OAuth) defaultClient.getAuthentication("Oauth2_ClientCredentials");
        Oauth2_ClientCredentials.setAccessToken("YOUR ACCESS TOKEN");

        WorkflowDefinitionsApi apiInstance = new WorkflowDefinitionsApi();
        String definitionId = definitionId_example; // String | The ID of the workflow definition which should be retrieved. The ID is at most 64 characters long.
        String versionNumber = versionNumber_example; // String | The version number of the workflow definition that should be retrieved. The version number consists of 1 - 10 digits.
        String acceptLanguage = acceptLanguage_example; // String | Provide a preferred language. If a translation is available, relevant texts are returned in this language.
        try {
            WorkflowDefinitionVersion result = apiInstance.v1WorkflowDefinitionsDefinitionIdVersionsVersionNumberGet(definitionId, versionNumber, acceptLanguage);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling WorkflowDefinitionsApi#v1WorkflowDefinitionsDefinitionIdVersionsVersionNumberGet");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.WorkflowDefinitionsApi;

public class WorkflowDefinitionsApiExample {

    public static void main(String[] args) {
        WorkflowDefinitionsApi apiInstance = new WorkflowDefinitionsApi();
        String definitionId = definitionId_example; // String | The ID of the workflow definition which should be retrieved. The ID is at most 64 characters long.
        String versionNumber = versionNumber_example; // String | The version number of the workflow definition that should be retrieved. The version number consists of 1 - 10 digits.
        String acceptLanguage = acceptLanguage_example; // String | Provide a preferred language. If a translation is available, relevant texts are returned in this language.
        try {
            WorkflowDefinitionVersion result = apiInstance.v1WorkflowDefinitionsDefinitionIdVersionsVersionNumberGet(definitionId, versionNumber, acceptLanguage);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling WorkflowDefinitionsApi#v1WorkflowDefinitionsDefinitionIdVersionsVersionNumberGet");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure OAuth2 access token for authorization: (authentication scheme: Oauth2_AuthorizationCode)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];

// Configure OAuth2 access token for authorization: (authentication scheme: Oauth2_ClientCredentials)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];

String *definitionId = definitionId_example; // The ID of the workflow definition which should be retrieved. The ID is at most 64 characters long.
String *versionNumber = versionNumber_example; // The version number of the workflow definition that should be retrieved. The version number consists of 1 - 10 digits.
String *acceptLanguage = acceptLanguage_example; // Provide a preferred language. If a translation is available, relevant texts are returned in this language. (optional)

WorkflowDefinitionsApi *apiInstance = [[WorkflowDefinitionsApi alloc] init];

// Retrieve workflow definition by ID and version number
[apiInstance v1WorkflowDefinitionsDefinitionIdVersionsVersionNumberGetWith:definitionId
    versionNumber:versionNumber
    acceptLanguage:acceptLanguage
              completionHandler: ^(WorkflowDefinitionVersion output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var WorkflowApiForCloudFoundry = require('workflow_api_for_cloud_foundry');
var defaultClient = WorkflowApiForCloudFoundry.ApiClient.instance;

// Configure OAuth2 access token for authorization: Oauth2_AuthorizationCode
var Oauth2_AuthorizationCode = defaultClient.authentications['Oauth2_AuthorizationCode'];
Oauth2_AuthorizationCode.accessToken = "YOUR ACCESS TOKEN"

// Configure OAuth2 access token for authorization: Oauth2_ClientCredentials
var Oauth2_ClientCredentials = defaultClient.authentications['Oauth2_ClientCredentials'];
Oauth2_ClientCredentials.accessToken = "YOUR ACCESS TOKEN"

var api = new WorkflowApiForCloudFoundry.WorkflowDefinitionsApi()

var definitionId = definitionId_example; // {String} The ID of the workflow definition which should be retrieved. The ID is at most 64 characters long.

var versionNumber = versionNumber_example; // {String} The version number of the workflow definition that should be retrieved. The version number consists of 1 - 10 digits.

var opts = { 
  'acceptLanguage': acceptLanguage_example // {String} Provide a preferred language. If a translation is available, relevant texts are returned in this language.
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.v1WorkflowDefinitionsDefinitionIdVersionsVersionNumberGet(definitionId, versionNumber, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class v1WorkflowDefinitionsDefinitionIdVersionsVersionNumberGetExample
    {
        public void main()
        {
            
            // Configure OAuth2 access token for authorization: Oauth2_AuthorizationCode
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
            // Configure OAuth2 access token for authorization: Oauth2_ClientCredentials
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new WorkflowDefinitionsApi();
            var definitionId = definitionId_example;  // String | The ID of the workflow definition which should be retrieved. The ID is at most 64 characters long.
            var versionNumber = versionNumber_example;  // String | The version number of the workflow definition that should be retrieved. The version number consists of 1 - 10 digits.
            var acceptLanguage = acceptLanguage_example;  // String | Provide a preferred language. If a translation is available, relevant texts are returned in this language. (optional) 

            try
            {
                // Retrieve workflow definition by ID and version number
                WorkflowDefinitionVersion result = apiInstance.v1WorkflowDefinitionsDefinitionIdVersionsVersionNumberGet(definitionId, versionNumber, acceptLanguage);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling WorkflowDefinitionsApi.v1WorkflowDefinitionsDefinitionIdVersionsVersionNumberGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: Oauth2_AuthorizationCode
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
// Configure OAuth2 access token for authorization: Oauth2_ClientCredentials
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new Swagger\Client\Api\WorkflowDefinitionsApi();
$definitionId = definitionId_example; // String | The ID of the workflow definition which should be retrieved. The ID is at most 64 characters long.
$versionNumber = versionNumber_example; // String | The version number of the workflow definition that should be retrieved. The version number consists of 1 - 10 digits.
$acceptLanguage = acceptLanguage_example; // String | Provide a preferred language. If a translation is available, relevant texts are returned in this language.

try {
    $result = $api_instance->v1WorkflowDefinitionsDefinitionIdVersionsVersionNumberGet($definitionId, $versionNumber, $acceptLanguage);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling WorkflowDefinitionsApi->v1WorkflowDefinitionsDefinitionIdVersionsVersionNumberGet: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::WorkflowDefinitionsApi;

# Configure OAuth2 access token for authorization: Oauth2_AuthorizationCode
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
# Configure OAuth2 access token for authorization: Oauth2_ClientCredentials
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::SwaggerClient::WorkflowDefinitionsApi->new();
my $definitionId = definitionId_example; # String | The ID of the workflow definition which should be retrieved. The ID is at most 64 characters long.
my $versionNumber = versionNumber_example; # String | The version number of the workflow definition that should be retrieved. The version number consists of 1 - 10 digits.
my $acceptLanguage = acceptLanguage_example; # String | Provide a preferred language. If a translation is available, relevant texts are returned in this language.

eval { 
    my $result = $api_instance->v1WorkflowDefinitionsDefinitionIdVersionsVersionNumberGet(definitionId => $definitionId, versionNumber => $versionNumber, acceptLanguage => $acceptLanguage);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling WorkflowDefinitionsApi->v1WorkflowDefinitionsDefinitionIdVersionsVersionNumberGet: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: Oauth2_AuthorizationCode
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure OAuth2 access token for authorization: Oauth2_ClientCredentials
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.WorkflowDefinitionsApi()
definitionId = definitionId_example # String | The ID of the workflow definition which should be retrieved. The ID is at most 64 characters long.
versionNumber = versionNumber_example # String | The version number of the workflow definition that should be retrieved. The version number consists of 1 - 10 digits.
acceptLanguage = acceptLanguage_example # String | Provide a preferred language. If a translation is available, relevant texts are returned in this language. (optional)

try: 
    # Retrieve workflow definition by ID and version number
    api_response = api_instance.v1WorkflowDefinitionsDefinitionIdVersionsVersionNumberGet(definitionId, versionNumber, acceptLanguage=acceptLanguage)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling WorkflowDefinitionsApi->v1WorkflowDefinitionsDefinitionIdVersionsVersionNumberGet: %s\n" % e)

Parameters

Path parameters
Name Description
definitionId*
versionNumber*
Header parameters
Name Description
Accept-Language

Responses

Status: 200 - Returns a single workflow definition.

{id=LeaveRequestWorkflow, name=Leave Request Workflow, version=1, createdBy=UserId13, createdAt=2018-05-01T14:44:53.186Z}

Status: 401 - Unauthorized. You have not provided valid authentication credentials to access the resource.

{error=unauthorized, error_description=Full authentication is required to access this resource.}

Status: 403 - Access forbidden. You have not the required permissions to access the resource.

{error={message=User does not have sufficient privileges.}}

Status: 404 - Either the workflow definition or the specified version within that definition was not found.

{error={code=bpm.workflowruntime.rest.definition.version.not.found, message=Version of the specified workflow definition not found, logId=2a4dfef3-eb4f-4c50-8b29-fe32a31bb042}}

Status: 429 - You have reached the usage limits that are configured for your tenant. You are performing too many requests or consume too many resources.

{error={code=bpm.workflowruntime.rate.limit.exceeded, message=Your tenant is performing too many requests.}}

Status: 500 - Internal server error. The operation you requested led to an error during execution.

{error={code=bpm.workflowruntime.rest.internal.server.error, message=Internal server error, logId=f29a5719-3342-4a4a-8a3d-5ddd5253159e}}

/v1/workflow-definitions/{definitionId}/versions/{versionNumber}/model

Retrieves the model of the specified version of the specified workflow definition. Roles permitted to execute this operation: - Global roles: WorkflowViewer, WorkflowAdmin, WorkflowDeveloper - Scope: WORKFLOW_DEFINITION_GET_MODEL


/v1/workflow-definitions/{definitionId}/versions/{versionNumber}/model

Usage

curl -X GET "https://sandbox.api.sap.com/workflow-service/rest/v1/workflow-definitions/{definitionId}/versions/{versionNumber}/model"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.WorkflowDefinitionsApi;

import java.io.File;
import java.util.*;

public class WorkflowDefinitionsApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        
        // Configure OAuth2 access token for authorization: Oauth2_AuthorizationCode
        OAuth Oauth2_AuthorizationCode = (OAuth) defaultClient.getAuthentication("Oauth2_AuthorizationCode");
        Oauth2_AuthorizationCode.setAccessToken("YOUR ACCESS TOKEN");

        // Configure OAuth2 access token for authorization: Oauth2_ClientCredentials
        OAuth Oauth2_ClientCredentials = (OAuth) defaultClient.getAuthentication("Oauth2_ClientCredentials");
        Oauth2_ClientCredentials.setAccessToken("YOUR ACCESS TOKEN");

        WorkflowDefinitionsApi apiInstance = new WorkflowDefinitionsApi();
        String definitionId = definitionId_example; // String | The workflow definition ID for which the model should be retrieved. The workflow definition ID is at most 64 characters long.
        String versionNumber = versionNumber_example; // String | The version number for which the model should be retrieved. The version number consists of 1 - 10 digits.
        try {
            WorkflowModel result = apiInstance.v1WorkflowDefinitionsDefinitionIdVersionsVersionNumberModelGet(definitionId, versionNumber);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling WorkflowDefinitionsApi#v1WorkflowDefinitionsDefinitionIdVersionsVersionNumberModelGet");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.WorkflowDefinitionsApi;

public class WorkflowDefinitionsApiExample {

    public static void main(String[] args) {
        WorkflowDefinitionsApi apiInstance = new WorkflowDefinitionsApi();
        String definitionId = definitionId_example; // String | The workflow definition ID for which the model should be retrieved. The workflow definition ID is at most 64 characters long.
        String versionNumber = versionNumber_example; // String | The version number for which the model should be retrieved. The version number consists of 1 - 10 digits.
        try {
            WorkflowModel result = apiInstance.v1WorkflowDefinitionsDefinitionIdVersionsVersionNumberModelGet(definitionId, versionNumber);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling WorkflowDefinitionsApi#v1WorkflowDefinitionsDefinitionIdVersionsVersionNumberModelGet");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure OAuth2 access token for authorization: (authentication scheme: Oauth2_AuthorizationCode)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];

// Configure OAuth2 access token for authorization: (authentication scheme: Oauth2_ClientCredentials)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];

String *definitionId = definitionId_example; // The workflow definition ID for which the model should be retrieved. The workflow definition ID is at most 64 characters long.
String *versionNumber = versionNumber_example; // The version number for which the model should be retrieved. The version number consists of 1 - 10 digits.

WorkflowDefinitionsApi *apiInstance = [[WorkflowDefinitionsApi alloc] init];

// Retrieve workflow definition model by ID and version number
[apiInstance v1WorkflowDefinitionsDefinitionIdVersionsVersionNumberModelGetWith:definitionId
    versionNumber:versionNumber
              completionHandler: ^(WorkflowModel output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var WorkflowApiForCloudFoundry = require('workflow_api_for_cloud_foundry');
var defaultClient = WorkflowApiForCloudFoundry.ApiClient.instance;

// Configure OAuth2 access token for authorization: Oauth2_AuthorizationCode
var Oauth2_AuthorizationCode = defaultClient.authentications['Oauth2_AuthorizationCode'];
Oauth2_AuthorizationCode.accessToken = "YOUR ACCESS TOKEN"

// Configure OAuth2 access token for authorization: Oauth2_ClientCredentials
var Oauth2_ClientCredentials = defaultClient.authentications['Oauth2_ClientCredentials'];
Oauth2_ClientCredentials.accessToken = "YOUR ACCESS TOKEN"

var api = new WorkflowApiForCloudFoundry.WorkflowDefinitionsApi()

var definitionId = definitionId_example; // {String} The workflow definition ID for which the model should be retrieved. The workflow definition ID is at most 64 characters long.

var versionNumber = versionNumber_example; // {String} The version number for which the model should be retrieved. The version number consists of 1 - 10 digits.


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.v1WorkflowDefinitionsDefinitionIdVersionsVersionNumberModelGet(definitionId, versionNumber, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class v1WorkflowDefinitionsDefinitionIdVersionsVersionNumberModelGetExample
    {
        public void main()
        {
            
            // Configure OAuth2 access token for authorization: Oauth2_AuthorizationCode
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
            // Configure OAuth2 access token for authorization: Oauth2_ClientCredentials
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new WorkflowDefinitionsApi();
            var definitionId = definitionId_example;  // String | The workflow definition ID for which the model should be retrieved. The workflow definition ID is at most 64 characters long.
            var versionNumber = versionNumber_example;  // String | The version number for which the model should be retrieved. The version number consists of 1 - 10 digits.

            try
            {
                // Retrieve workflow definition model by ID and version number
                WorkflowModel result = apiInstance.v1WorkflowDefinitionsDefinitionIdVersionsVersionNumberModelGet(definitionId, versionNumber);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling WorkflowDefinitionsApi.v1WorkflowDefinitionsDefinitionIdVersionsVersionNumberModelGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: Oauth2_AuthorizationCode
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
// Configure OAuth2 access token for authorization: Oauth2_ClientCredentials
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new Swagger\Client\Api\WorkflowDefinitionsApi();
$definitionId = definitionId_example; // String | The workflow definition ID for which the model should be retrieved. The workflow definition ID is at most 64 characters long.
$versionNumber = versionNumber_example; // String | The version number for which the model should be retrieved. The version number consists of 1 - 10 digits.

try {
    $result = $api_instance->v1WorkflowDefinitionsDefinitionIdVersionsVersionNumberModelGet($definitionId, $versionNumber);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling WorkflowDefinitionsApi->v1WorkflowDefinitionsDefinitionIdVersionsVersionNumberModelGet: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::WorkflowDefinitionsApi;

# Configure OAuth2 access token for authorization: Oauth2_AuthorizationCode
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
# Configure OAuth2 access token for authorization: Oauth2_ClientCredentials
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::SwaggerClient::WorkflowDefinitionsApi->new();
my $definitionId = definitionId_example; # String | The workflow definition ID for which the model should be retrieved. The workflow definition ID is at most 64 characters long.
my $versionNumber = versionNumber_example; # String | The version number for which the model should be retrieved. The version number consists of 1 - 10 digits.

eval { 
    my $result = $api_instance->v1WorkflowDefinitionsDefinitionIdVersionsVersionNumberModelGet(definitionId => $definitionId, versionNumber => $versionNumber);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling WorkflowDefinitionsApi->v1WorkflowDefinitionsDefinitionIdVersionsVersionNumberModelGet: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: Oauth2_AuthorizationCode
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure OAuth2 access token for authorization: Oauth2_ClientCredentials
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.WorkflowDefinitionsApi()
definitionId = definitionId_example # String | The workflow definition ID for which the model should be retrieved. The workflow definition ID is at most 64 characters long.
versionNumber = versionNumber_example # String | The version number for which the model should be retrieved. The version number consists of 1 - 10 digits.

try: 
    # Retrieve workflow definition model by ID and version number
    api_response = api_instance.v1WorkflowDefinitionsDefinitionIdVersionsVersionNumberModelGet(definitionId, versionNumber)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling WorkflowDefinitionsApi->v1WorkflowDefinitionsDefinitionIdVersionsVersionNumberModelGet: %s\n" % e)

Parameters

Path parameters
Name Description
definitionId*
versionNumber*

Responses

Status: 200 - The deployed workflow model.

{contents={a46b9a0c-e2c4-46f1-ab45-a4f1c64242e1={classDefinition=com.sap.bpm.wfs.Model, id=ExternalServiceFlow, name=ExternalServiceFlow, subject=External Service Flow '${id}', businessKey=${id}, lastIds=835bb943-b74b-4a45-9a26-2a5ab2471fae, events={dac01f83-3cd2-421a-b099-695372490c22={name=StartEvent1}, 17af566f-cce3-4375-9e92-85fe456b9b1a={name=EndEvent1}}, activities={65021cef-c40b-4481-b6a5-d28f3d425b49={name=Call external Service}}, sequenceFlows={98d81e72-af85-46be-86f2-b86a290db42d={name=SequenceFlow14}, 0da7f0a6-fa3e-4c2a-a3a9-92f738e9cef9={name=SequenceFlow15}}, diagrams={5136eee3-88cd-40b3-a909-a212b7be5c1c={}}}, 835bb943-b74b-4a45-9a26-2a5ab2471fae={classDefinition=com.sap.bpm.wfs.LastIDs, sequenceflow=15, startevent=1, endevent=1, servicetask=1, scripttask=2, parallelgateway=2, exclusivegateway=2}, 5136eee3-88cd-40b3-a909-a212b7be5c1c={classDefinition=com.sap.bpm.wfs.ui.Diagram, symbols={e5af1ccc-d6ac-4b93-bd54-9ecbc22e1b0c={}, bba91ec8-a65b-4220-8b9a-38346de34c1e={}, fd3dd963-fa3f-4346-b75f-aaffcf172b6a={}, 9e681614-dc17-425d-ab02-037029c789e8={}, 9d851743-62a1-47cc-8786-522310d3a912={}}}, dac01f83-3cd2-421a-b099-695372490c22={classDefinition=com.sap.bpm.wfs.StartEvent, id=startevent1, name=StartEvent1}, e5af1ccc-d6ac-4b93-bd54-9ecbc22e1b0c={classDefinition=com.sap.bpm.wfs.ui.StartEventSymbol, x=134, y=221, width=32, height=32, object=dac01f83-3cd2-421a-b099-695372490c22}, 17af566f-cce3-4375-9e92-85fe456b9b1a={classDefinition=com.sap.bpm.wfs.EndEvent, id=endevent1, name=EndEvent1}, bba91ec8-a65b-4220-8b9a-38346de34c1e={classDefinition=com.sap.bpm.wfs.ui.EndEventSymbol, x=548, y=221, width=32, height=32, object=17af566f-cce3-4375-9e92-85fe456b9b1a}, 65021cef-c40b-4481-b6a5-d28f3d425b49={classDefinition=com.sap.bpm.wfs.ServiceTask, destination=destination, path=/path/${id}, httpMethod=GET, id=servicetask1, name=Call external Service}, fd3dd963-fa3f-4346-b75f-aaffcf172b6a={classDefinition=com.sap.bpm.wfs.ui.ServiceTaskSymbol, x=216, y=209.5, width=100, height=55, object=65021cef-c40b-4481-b6a5-d28f3d425b49}, 98d81e72-af85-46be-86f2-b86a290db42d={classDefinition=com.sap.bpm.wfs.SequenceFlow, id=sequenceflow14, name=SequenceFlow14, sourceRef=dac01f83-3cd2-421a-b099-695372490c22, targetRef=65021cef-c40b-4481-b6a5-d28f3d425b49}, 9e681614-dc17-425d-ab02-037029c789e8={classDefinition=com.sap.bpm.wfs.ui.SequenceFlowSymbol, points=150,237 266,237, sourceSymbol=e5af1ccc-d6ac-4b93-bd54-9ecbc22e1b0c, targetSymbol=fd3dd963-fa3f-4346-b75f-aaffcf172b6a, object=98d81e72-af85-46be-86f2-b86a290db42d}, 0da7f0a6-fa3e-4c2a-a3a9-92f738e9cef9={classDefinition=com.sap.bpm.wfs.SequenceFlow, id=sequenceflow15, name=SequenceFlow15, sourceRef=65021cef-c40b-4481-b6a5-d28f3d425b49, targetRef=17af566f-cce3-4375-9e92-85fe456b9b1a}, 9d851743-62a1-47cc-8786-522310d3a912={classDefinition=com.sap.bpm.wfs.ui.SequenceFlowSymbol, points=266,237 548,237, sourceSymbol=fd3dd963-fa3f-4346-b75f-aaffcf172b6a, targetSymbol=bba91ec8-a65b-4220-8b9a-38346de34c1e, object=0da7f0a6-fa3e-4c2a-a3a9-92f738e9cef9}}}

Status: 401 - Unauthorized. You have not provided valid authentication credentials to access the resource.

{error=unauthorized, error_description=Full authentication is required to access this resource.}

Status: 403 - Access forbidden. You have not the required permissions to access the resource.

{error={message=User does not have sufficient privileges.}}

Status: 404 - Either the specified workflow definition, the specified version within that definition or the JSON model for that definition version was not found.

{error={code=bpm.workflowruntime.rest.json.model.not.found, message=Workflow definition JSON model not found, logId=381a4f5-eb3f-4c3a-89b0-ca32a47bb517}}

Status: 429 - You have reached the usage limits that are configured for your tenant. You are performing too many requests or consume too many resources.

{error={code=bpm.workflowruntime.rate.limit.exceeded, message=Your tenant is performing too many requests.}}

Status: 500 - Internal server error. The operation you requested led to an error during execution.

{error={code=bpm.workflowruntime.rest.internal.server.error, message=Internal server error, logId=f29a5719-3342-4a4a-8a3d-5ddd5253159e}}

/v1/workflow-definitions/{definitionId}/versions/{versionNumber}/sample-contexts/default-start-context

Retrieves the default start context of the specified version of the specified workflow definition. Roles permitted to execute this operation: - Global roles: WorkflowInitiator - Scope: WORKFLOW_DEFINITION_GET_SAMPLE_CONTEXT


/v1/workflow-definitions/{definitionId}/versions/{versionNumber}/sample-contexts/default-start-context

Usage

curl -X GET "https://sandbox.api.sap.com/workflow-service/rest/v1/workflow-definitions/{definitionId}/versions/{versionNumber}/sample-contexts/default-start-context"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.WorkflowDefinitionsApi;

import java.io.File;
import java.util.*;

public class WorkflowDefinitionsApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        
        // Configure OAuth2 access token for authorization: Oauth2_AuthorizationCode
        OAuth Oauth2_AuthorizationCode = (OAuth) defaultClient.getAuthentication("Oauth2_AuthorizationCode");
        Oauth2_AuthorizationCode.setAccessToken("YOUR ACCESS TOKEN");

        // Configure OAuth2 access token for authorization: Oauth2_ClientCredentials
        OAuth Oauth2_ClientCredentials = (OAuth) defaultClient.getAuthentication("Oauth2_ClientCredentials");
        Oauth2_ClientCredentials.setAccessToken("YOUR ACCESS TOKEN");

        WorkflowDefinitionsApi apiInstance = new WorkflowDefinitionsApi();
        String definitionId = definitionId_example; // String | The workflow definition ID for which the default start context should be retrieved. The workflow definition ID is at most 64 characters long.
        String versionNumber = versionNumber_example; // String | The version number for which the default start context should be retrieved. The version number consists of 1 - 10 digits.
        try {
            SampleContext result = apiInstance.v1WorkflowDefinitionsDefinitionIdVersionsVersionNumberSampleContextsDefaultStartContextGet(definitionId, versionNumber);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling WorkflowDefinitionsApi#v1WorkflowDefinitionsDefinitionIdVersionsVersionNumberSampleContextsDefaultStartContextGet");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.WorkflowDefinitionsApi;

public class WorkflowDefinitionsApiExample {

    public static void main(String[] args) {
        WorkflowDefinitionsApi apiInstance = new WorkflowDefinitionsApi();
        String definitionId = definitionId_example; // String | The workflow definition ID for which the default start context should be retrieved. The workflow definition ID is at most 64 characters long.
        String versionNumber = versionNumber_example; // String | The version number for which the default start context should be retrieved. The version number consists of 1 - 10 digits.
        try {
            SampleContext result = apiInstance.v1WorkflowDefinitionsDefinitionIdVersionsVersionNumberSampleContextsDefaultStartContextGet(definitionId, versionNumber);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling WorkflowDefinitionsApi#v1WorkflowDefinitionsDefinitionIdVersionsVersionNumberSampleContextsDefaultStartContextGet");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure OAuth2 access token for authorization: (authentication scheme: Oauth2_AuthorizationCode)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];

// Configure OAuth2 access token for authorization: (authentication scheme: Oauth2_ClientCredentials)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];

String *definitionId = definitionId_example; // The workflow definition ID for which the default start context should be retrieved. The workflow definition ID is at most 64 characters long.
String *versionNumber = versionNumber_example; // The version number for which the default start context should be retrieved. The version number consists of 1 - 10 digits.

WorkflowDefinitionsApi *apiInstance = [[WorkflowDefinitionsApi alloc] init];

// Retrieve sample start context of workflow definition by ID and version number
[apiInstance v1WorkflowDefinitionsDefinitionIdVersionsVersionNumberSampleContextsDefaultStartContextGetWith:definitionId
    versionNumber:versionNumber
              completionHandler: ^(SampleContext output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var WorkflowApiForCloudFoundry = require('workflow_api_for_cloud_foundry');
var defaultClient = WorkflowApiForCloudFoundry.ApiClient.instance;

// Configure OAuth2 access token for authorization: Oauth2_AuthorizationCode
var Oauth2_AuthorizationCode = defaultClient.authentications['Oauth2_AuthorizationCode'];
Oauth2_AuthorizationCode.accessToken = "YOUR ACCESS TOKEN"

// Configure OAuth2 access token for authorization: Oauth2_ClientCredentials
var Oauth2_ClientCredentials = defaultClient.authentications['Oauth2_ClientCredentials'];
Oauth2_ClientCredentials.accessToken = "YOUR ACCESS TOKEN"

var api = new WorkflowApiForCloudFoundry.WorkflowDefinitionsApi()

var definitionId = definitionId_example; // {String} The workflow definition ID for which the default start context should be retrieved. The workflow definition ID is at most 64 characters long.

var versionNumber = versionNumber_example; // {String} The version number for which the default start context should be retrieved. The version number consists of 1 - 10 digits.


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.v1WorkflowDefinitionsDefinitionIdVersionsVersionNumberSampleContextsDefaultStartContextGet(definitionId, versionNumber, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class v1WorkflowDefinitionsDefinitionIdVersionsVersionNumberSampleContextsDefaultStartContextGetExample
    {
        public void main()
        {
            
            // Configure OAuth2 access token for authorization: Oauth2_AuthorizationCode
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
            // Configure OAuth2 access token for authorization: Oauth2_ClientCredentials
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new WorkflowDefinitionsApi();
            var definitionId = definitionId_example;  // String | The workflow definition ID for which the default start context should be retrieved. The workflow definition ID is at most 64 characters long.
            var versionNumber = versionNumber_example;  // String | The version number for which the default start context should be retrieved. The version number consists of 1 - 10 digits.

            try
            {
                // Retrieve sample start context of workflow definition by ID and version number
                SampleContext result = apiInstance.v1WorkflowDefinitionsDefinitionIdVersionsVersionNumberSampleContextsDefaultStartContextGet(definitionId, versionNumber);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling WorkflowDefinitionsApi.v1WorkflowDefinitionsDefinitionIdVersionsVersionNumberSampleContextsDefaultStartContextGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: Oauth2_AuthorizationCode
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
// Configure OAuth2 access token for authorization: Oauth2_ClientCredentials
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new Swagger\Client\Api\WorkflowDefinitionsApi();
$definitionId = definitionId_example; // String | The workflow definition ID for which the default start context should be retrieved. The workflow definition ID is at most 64 characters long.
$versionNumber = versionNumber_example; // String | The version number for which the default start context should be retrieved. The version number consists of 1 - 10 digits.

try {
    $result = $api_instance->v1WorkflowDefinitionsDefinitionIdVersionsVersionNumberSampleContextsDefaultStartContextGet($definitionId, $versionNumber);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling WorkflowDefinitionsApi->v1WorkflowDefinitionsDefinitionIdVersionsVersionNumberSampleContextsDefaultStartContextGet: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::WorkflowDefinitionsApi;

# Configure OAuth2 access token for authorization: Oauth2_AuthorizationCode
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
# Configure OAuth2 access token for authorization: Oauth2_ClientCredentials
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::SwaggerClient::WorkflowDefinitionsApi->new();
my $definitionId = definitionId_example; # String | The workflow definition ID for which the default start context should be retrieved. The workflow definition ID is at most 64 characters long.
my $versionNumber = versionNumber_example; # String | The version number for which the default start context should be retrieved. The version number consists of 1 - 10 digits.

eval { 
    my $result = $api_instance->v1WorkflowDefinitionsDefinitionIdVersionsVersionNumberSampleContextsDefaultStartContextGet(definitionId => $definitionId, versionNumber => $versionNumber);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling WorkflowDefinitionsApi->v1WorkflowDefinitionsDefinitionIdVersionsVersionNumberSampleContextsDefaultStartContextGet: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: Oauth2_AuthorizationCode
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure OAuth2 access token for authorization: Oauth2_ClientCredentials
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.WorkflowDefinitionsApi()
definitionId = definitionId_example # String | The workflow definition ID for which the default start context should be retrieved. The workflow definition ID is at most 64 characters long.
versionNumber = versionNumber_example # String | The version number for which the default start context should be retrieved. The version number consists of 1 - 10 digits.

try: 
    # Retrieve sample start context of workflow definition by ID and version number
    api_response = api_instance.v1WorkflowDefinitionsDefinitionIdVersionsVersionNumberSampleContextsDefaultStartContextGet(definitionId, versionNumber)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling WorkflowDefinitionsApi->v1WorkflowDefinitionsDefinitionIdVersionsVersionNumberSampleContextsDefaultStartContextGet: %s\n" % e)

Parameters

Path parameters
Name Description
definitionId*
versionNumber*

Responses

Status: 200 - Returns the default start context of the specified version of the specified workflow definition.

{id=default-start-context, content={product=Hamlet (Paperback), inStock=true, inventory=20000, price=7.49, publishingDate=1600-04-23T18:25:43.511Z, author={name=William Shakespeare}, publishers=[Simon & Brown, SparkNotes, Dover Publications]}, modelElementId=startevent1}

Status: 401 - Unauthorized. You have not provided valid authentication credentials to access the resource.

{error=unauthorized, error_description=Full authentication is required to access this resource.}

Status: 403 - Access forbidden. You have not the required permissions to access the resource.

{error={message=User does not have sufficient privileges.}}

Status: 404 - Either the specified workflow definition, the specified version within that definition or the default sample context within that definition version was not found.

{error={code=bpm.workflowruntime.rest.sample.context.not.found, message=Sample context for workflow definition not found, logId=2f5dacf3-eb3f-4ff5-8b13-aa32a47ba482}}

Status: 429 - You have reached the usage limits that are configured for your tenant. You are performing too many requests or consume too many resources.

{error={code=bpm.workflowruntime.rate.limit.exceeded, message=Your tenant is performing too many requests.}}

Status: 500 - Internal server error. The operation you requested led to an error during execution.

{error={code=bpm.workflowruntime.rest.internal.server.error, message=Internal server error, logId=f29a5719-3342-4a4a-8a3d-5ddd5253159e}}

/v1/workflow-definitions

Retrieves a list of the latest version of each deployed workflow definition. The request can be parameterized. Roles permitted to execute this operation: - Global roles: WorkflowViewer, WorkflowAdmin, WorkflowDeveloper - Scope: WORKFLOW_DEFINITION_GET


/v1/workflow-definitions

Usage

curl -X GET "https://sandbox.api.sap.com/workflow-service/rest/v1/workflow-definitions?$orderby=&$skip=&$top=&$inlinecount="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.WorkflowDefinitionsApi;

import java.io.File;
import java.util.*;

public class WorkflowDefinitionsApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        
        // Configure OAuth2 access token for authorization: Oauth2_AuthorizationCode
        OAuth Oauth2_AuthorizationCode = (OAuth) defaultClient.getAuthentication("Oauth2_AuthorizationCode");
        Oauth2_AuthorizationCode.setAccessToken("YOUR ACCESS TOKEN");

        // Configure OAuth2 access token for authorization: Oauth2_ClientCredentials
        OAuth Oauth2_ClientCredentials = (OAuth) defaultClient.getAuthentication("Oauth2_ClientCredentials");
        Oauth2_ClientCredentials.setAccessToken("YOUR ACCESS TOKEN");

        WorkflowDefinitionsApi apiInstance = new WorkflowDefinitionsApi();
        String acceptLanguage = acceptLanguage_example; // String | Provide a preferred language. If a translation is available, relevant texts are returned in this language.
        String $orderby = $orderby_example; // String | Specify the attribute you want to sort by and the order separated by a space. If the order is omitted it is ascending by default.
If not specified, the results are sorted by the 'createdAt' attribute in descending order.
        Integer $skip = 56; // Integer | Specify the number of records you want to skip from the beginning.
You can skip at most 4000 records. To indicate a result range that starts, for example, at 1001, combine the $skip with the $top parameter.
If not specified, no records are skipped.
Refer also to the $top parameter.
        Integer $top = 56; // Integer | Specify the number of records you want to show.
You can get at most 1000 records per API call. To indicate a result range that starts, for example, at 1001, combine the $top with the $skip parameter.
If not specified, 100 records are returned.
Refer also to the $skip parameter.
        String $inlinecount = $inlinecount_example; // String | Specify whether the total count of the workflow definitions should be returned as the value of the X-Total-Count response header.
To enable the header, use the 'allpages' setting. To disable the header, use the 'none' setting. The values are case-sensitive.
        try {
            array[WorkflowDefinition] result = apiInstance.v1WorkflowDefinitionsGet(acceptLanguage, $orderby, $skip, $top, $inlinecount);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling WorkflowDefinitionsApi#v1WorkflowDefinitionsGet");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.WorkflowDefinitionsApi;

public class WorkflowDefinitionsApiExample {

    public static void main(String[] args) {
        WorkflowDefinitionsApi apiInstance = new WorkflowDefinitionsApi();
        String acceptLanguage = acceptLanguage_example; // String | Provide a preferred language. If a translation is available, relevant texts are returned in this language.
        String $orderby = $orderby_example; // String | Specify the attribute you want to sort by and the order separated by a space. If the order is omitted it is ascending by default.
If not specified, the results are sorted by the 'createdAt' attribute in descending order.
        Integer $skip = 56; // Integer | Specify the number of records you want to skip from the beginning.
You can skip at most 4000 records. To indicate a result range that starts, for example, at 1001, combine the $skip with the $top parameter.
If not specified, no records are skipped.
Refer also to the $top parameter.
        Integer $top = 56; // Integer | Specify the number of records you want to show.
You can get at most 1000 records per API call. To indicate a result range that starts, for example, at 1001, combine the $top with the $skip parameter.
If not specified, 100 records are returned.
Refer also to the $skip parameter.
        String $inlinecount = $inlinecount_example; // String | Specify whether the total count of the workflow definitions should be returned as the value of the X-Total-Count response header.
To enable the header, use the 'allpages' setting. To disable the header, use the 'none' setting. The values are case-sensitive.
        try {
            array[WorkflowDefinition] result = apiInstance.v1WorkflowDefinitionsGet(acceptLanguage, $orderby, $skip, $top, $inlinecount);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling WorkflowDefinitionsApi#v1WorkflowDefinitionsGet");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure OAuth2 access token for authorization: (authentication scheme: Oauth2_AuthorizationCode)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];

// Configure OAuth2 access token for authorization: (authentication scheme: Oauth2_ClientCredentials)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];

String *acceptLanguage = acceptLanguage_example; // Provide a preferred language. If a translation is available, relevant texts are returned in this language. (optional)
String *$orderby = $orderby_example; // Specify the attribute you want to sort by and the order separated by a space. If the order is omitted it is ascending by default.
If not specified, the results are sorted by the 'createdAt' attribute in descending order. (optional) (default to createdAt desc)
Integer *$skip = 56; // Specify the number of records you want to skip from the beginning.
You can skip at most 4000 records. To indicate a result range that starts, for example, at 1001, combine the $skip with the $top parameter.
If not specified, no records are skipped.
Refer also to the $top parameter. (optional) (default to 0)
Integer *$top = 56; // Specify the number of records you want to show.
You can get at most 1000 records per API call. To indicate a result range that starts, for example, at 1001, combine the $top with the $skip parameter.
If not specified, 100 records are returned.
Refer also to the $skip parameter. (optional) (default to 100)
String *$inlinecount = $inlinecount_example; // Specify whether the total count of the workflow definitions should be returned as the value of the X-Total-Count response header.
To enable the header, use the 'allpages' setting. To disable the header, use the 'none' setting. The values are case-sensitive. (optional) (default to none)

WorkflowDefinitionsApi *apiInstance = [[WorkflowDefinitionsApi alloc] init];

// Retrieve all workflow definitions
[apiInstance v1WorkflowDefinitionsGetWith:acceptLanguage
    $orderby:$orderby
    $skip:$skip
    $top:$top
    $inlinecount:$inlinecount
              completionHandler: ^(array[WorkflowDefinition] output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var WorkflowApiForCloudFoundry = require('workflow_api_for_cloud_foundry');
var defaultClient = WorkflowApiForCloudFoundry.ApiClient.instance;

// Configure OAuth2 access token for authorization: Oauth2_AuthorizationCode
var Oauth2_AuthorizationCode = defaultClient.authentications['Oauth2_AuthorizationCode'];
Oauth2_AuthorizationCode.accessToken = "YOUR ACCESS TOKEN"

// Configure OAuth2 access token for authorization: Oauth2_ClientCredentials
var Oauth2_ClientCredentials = defaultClient.authentications['Oauth2_ClientCredentials'];
Oauth2_ClientCredentials.accessToken = "YOUR ACCESS TOKEN"

var api = new WorkflowApiForCloudFoundry.WorkflowDefinitionsApi()

var opts = { 
  'acceptLanguage': acceptLanguage_example, // {String} Provide a preferred language. If a translation is available, relevant texts are returned in this language.
  '$orderby': $orderby_example, // {String} Specify the attribute you want to sort by and the order separated by a space. If the order is omitted it is ascending by default.
If not specified, the results are sorted by the 'createdAt' attribute in descending order.
  '$skip': 56, // {Integer} Specify the number of records you want to skip from the beginning.
You can skip at most 4000 records. To indicate a result range that starts, for example, at 1001, combine the $skip with the $top parameter.
If not specified, no records are skipped.
Refer also to the $top parameter.
  '$top': 56, // {Integer} Specify the number of records you want to show.
You can get at most 1000 records per API call. To indicate a result range that starts, for example, at 1001, combine the $top with the $skip parameter.
If not specified, 100 records are returned.
Refer also to the $skip parameter.
  '$inlinecount': $inlinecount_example // {String} Specify whether the total count of the workflow definitions should be returned as the value of the X-Total-Count response header.
To enable the header, use the 'allpages' setting. To disable the header, use the 'none' setting. The values are case-sensitive.
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.v1WorkflowDefinitionsGet(opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class v1WorkflowDefinitionsGetExample
    {
        public void main()
        {
            
            // Configure OAuth2 access token for authorization: Oauth2_AuthorizationCode
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
            // Configure OAuth2 access token for authorization: Oauth2_ClientCredentials
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new WorkflowDefinitionsApi();
            var acceptLanguage = acceptLanguage_example;  // String | Provide a preferred language. If a translation is available, relevant texts are returned in this language. (optional) 
            var $orderby = $orderby_example;  // String | Specify the attribute you want to sort by and the order separated by a space. If the order is omitted it is ascending by default.
If not specified, the results are sorted by the 'createdAt' attribute in descending order. (optional)  (default to createdAt desc)
            var $skip = 56;  // Integer | Specify the number of records you want to skip from the beginning.
You can skip at most 4000 records. To indicate a result range that starts, for example, at 1001, combine the $skip with the $top parameter.
If not specified, no records are skipped.
Refer also to the $top parameter. (optional)  (default to 0)
            var $top = 56;  // Integer | Specify the number of records you want to show.
You can get at most 1000 records per API call. To indicate a result range that starts, for example, at 1001, combine the $top with the $skip parameter.
If not specified, 100 records are returned.
Refer also to the $skip parameter. (optional)  (default to 100)
            var $inlinecount = $inlinecount_example;  // String | Specify whether the total count of the workflow definitions should be returned as the value of the X-Total-Count response header.
To enable the header, use the 'allpages' setting. To disable the header, use the 'none' setting. The values are case-sensitive. (optional)  (default to none)

            try
            {
                // Retrieve all workflow definitions
                array[WorkflowDefinition] result = apiInstance.v1WorkflowDefinitionsGet(acceptLanguage, $orderby, $skip, $top, $inlinecount);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling WorkflowDefinitionsApi.v1WorkflowDefinitionsGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: Oauth2_AuthorizationCode
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
// Configure OAuth2 access token for authorization: Oauth2_ClientCredentials
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new Swagger\Client\Api\WorkflowDefinitionsApi();
$acceptLanguage = acceptLanguage_example; // String | Provide a preferred language. If a translation is available, relevant texts are returned in this language.
$$orderby = $orderby_example; // String | Specify the attribute you want to sort by and the order separated by a space. If the order is omitted it is ascending by default.
If not specified, the results are sorted by the 'createdAt' attribute in descending order.
$$skip = 56; // Integer | Specify the number of records you want to skip from the beginning.
You can skip at most 4000 records. To indicate a result range that starts, for example, at 1001, combine the $skip with the $top parameter.
If not specified, no records are skipped.
Refer also to the $top parameter.
$$top = 56; // Integer | Specify the number of records you want to show.
You can get at most 1000 records per API call. To indicate a result range that starts, for example, at 1001, combine the $top with the $skip parameter.
If not specified, 100 records are returned.
Refer also to the $skip parameter.
$$inlinecount = $inlinecount_example; // String | Specify whether the total count of the workflow definitions should be returned as the value of the X-Total-Count response header.
To enable the header, use the 'allpages' setting. To disable the header, use the 'none' setting. The values are case-sensitive.

try {
    $result = $api_instance->v1WorkflowDefinitionsGet($acceptLanguage, $$orderby, $$skip, $$top, $$inlinecount);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling WorkflowDefinitionsApi->v1WorkflowDefinitionsGet: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::WorkflowDefinitionsApi;

# Configure OAuth2 access token for authorization: Oauth2_AuthorizationCode
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
# Configure OAuth2 access token for authorization: Oauth2_ClientCredentials
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::SwaggerClient::WorkflowDefinitionsApi->new();
my $acceptLanguage = acceptLanguage_example; # String | Provide a preferred language. If a translation is available, relevant texts are returned in this language.
my $$orderby = $orderby_example; # String | Specify the attribute you want to sort by and the order separated by a space. If the order is omitted it is ascending by default.
If not specified, the results are sorted by the 'createdAt' attribute in descending order.
my $$skip = 56; # Integer | Specify the number of records you want to skip from the beginning.
You can skip at most 4000 records. To indicate a result range that starts, for example, at 1001, combine the $skip with the $top parameter.
If not specified, no records are skipped.
Refer also to the $top parameter.
my $$top = 56; # Integer | Specify the number of records you want to show.
You can get at most 1000 records per API call. To indicate a result range that starts, for example, at 1001, combine the $top with the $skip parameter.
If not specified, 100 records are returned.
Refer also to the $skip parameter.
my $$inlinecount = $inlinecount_example; # String | Specify whether the total count of the workflow definitions should be returned as the value of the X-Total-Count response header.
To enable the header, use the 'allpages' setting. To disable the header, use the 'none' setting. The values are case-sensitive.

eval { 
    my $result = $api_instance->v1WorkflowDefinitionsGet(acceptLanguage => $acceptLanguage, $orderby => $$orderby, $skip => $$skip, $top => $$top, $inlinecount => $$inlinecount);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling WorkflowDefinitionsApi->v1WorkflowDefinitionsGet: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: Oauth2_AuthorizationCode
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure OAuth2 access token for authorization: Oauth2_ClientCredentials
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.WorkflowDefinitionsApi()
acceptLanguage = acceptLanguage_example # String | Provide a preferred language. If a translation is available, relevant texts are returned in this language. (optional)
$orderby = $orderby_example # String | Specify the attribute you want to sort by and the order separated by a space. If the order is omitted it is ascending by default.
If not specified, the results are sorted by the 'createdAt' attribute in descending order. (optional) (default to createdAt desc)
$skip = 56 # Integer | Specify the number of records you want to skip from the beginning.
You can skip at most 4000 records. To indicate a result range that starts, for example, at 1001, combine the $skip with the $top parameter.
If not specified, no records are skipped.
Refer also to the $top parameter. (optional) (default to 0)
$top = 56 # Integer | Specify the number of records you want to show.
You can get at most 1000 records per API call. To indicate a result range that starts, for example, at 1001, combine the $top with the $skip parameter.
If not specified, 100 records are returned.
Refer also to the $skip parameter. (optional) (default to 100)
$inlinecount = $inlinecount_example # String | Specify whether the total count of the workflow definitions should be returned as the value of the X-Total-Count response header.
To enable the header, use the 'allpages' setting. To disable the header, use the 'none' setting. The values are case-sensitive. (optional) (default to none)

try: 
    # Retrieve all workflow definitions
    api_response = api_instance.v1WorkflowDefinitionsGet(acceptLanguage=acceptLanguage, $orderby=$orderby, $skip=$skip, $top=$top, $inlinecount=$inlinecount)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling WorkflowDefinitionsApi->v1WorkflowDefinitionsGet: %s\n" % e)

Parameters

Header parameters
Name Description
Accept-Language
Query parameters
Name Description
$orderby
$skip
$top
$inlinecount

Responses

Status: 200 - Returns a list of deployed workflow definitions.

[{id=LeaveRequestWorkflow, name=Leave Request Workflow, version=2, createdBy=UserId1, createdAt=2018-05-09T11:42:27.524Z, jobs=[]}, {id=OrderingWorkflow, name=Ordering Workflow, version=4, createdBy=UserId13, createdAt=2018-05-04T23:07:04.003Z, jobs=[]}]

Status: 401 - Unauthorized. You have not provided valid authentication credentials to access the resource.

{error=unauthorized, error_description=Full authentication is required to access this resource.}

Status: 403 - Access forbidden. You have not the required permissions to access the resource.

{error={message=User does not have sufficient privileges.}}

Status: 429 - You have reached the usage limits that are configured for your tenant. You are performing too many requests or consume too many resources.

{error={code=bpm.workflowruntime.rate.limit.exceeded, message=Your tenant is performing too many requests.}}

Status: 500 - Internal server error. The operation you requested led to an error during execution.

{error={code=bpm.workflowruntime.rest.internal.server.error, message=Internal server error, logId=f29a5719-3342-4a4a-8a3d-5ddd5253159e}}

WorkflowInstances

/v1/workflow-instances

Retrieves workflow instances by parameters. If no parameters are specified, all RUNNING, or ERRONEOUS instances are returned. Parameters for different attributes of the instance are evaluated using the logical 'and' operator. If multiple parameters are specified for the same attribute or a parameter is specified multiple times, results are matched using the logical 'or' operator, unless noted otherwise. Empty parameters are treated as if they were not given. Roles permitted to execute this operation: - Global roles: WorkflowViewer, WorkflowAdmin - Instance-specific roles: viewerUsers, viewerGroups, adminUsers, adminGroups [Prerequisite: You are assigned to the WorkflowParticipant global role.] - Scope: WORKFLOW_INSTANCE_GET


/v1/workflow-instances

Usage

curl -X GET "https://sandbox.api.sap.com/workflow-service/rest/v1/workflow-instances?$orderby=&$skip=&$top=&$inlinecount=&$expand=&id=&definitionId=&definitionVersion=&status=&startedAt=&startedFrom=&startedUpTo=&completedAt=&completedFrom=&completedUpTo=&startedBy=&subject=&containsText=&businessKey=&rootInstanceId=&parentInstanceId=&attributes.ExampleCustomAttribute="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.WorkflowInstancesApi;

import java.io.File;
import java.util.*;

public class WorkflowInstancesApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        
        // Configure OAuth2 access token for authorization: Oauth2_AuthorizationCode
        OAuth Oauth2_AuthorizationCode = (OAuth) defaultClient.getAuthentication("Oauth2_AuthorizationCode");
        Oauth2_AuthorizationCode.setAccessToken("YOUR ACCESS TOKEN");

        // Configure OAuth2 access token for authorization: Oauth2_ClientCredentials
        OAuth Oauth2_ClientCredentials = (OAuth) defaultClient.getAuthentication("Oauth2_ClientCredentials");
        Oauth2_ClientCredentials.setAccessToken("YOUR ACCESS TOKEN");

        WorkflowInstancesApi apiInstance = new WorkflowInstancesApi();
        String acceptLanguage = acceptLanguage_example; // String | Provide a preferred language. If a translation is available, relevant texts are returned in this language.
        String $orderby = $orderby_example; // String | The attribute and direction by which workflow instances are sorted. The sort attribute and direction are separated by a space.
The parameter value is case-sensitive. You can only specify one ordering parameter, which contains attribute and direction.
If sort by definitionVersion is enabled, then definitionId is also added to the sorting query.
If not specified, the results are sorted by the 'startedAt' attribute, in descending order.

 * id asc - Ascending, from A to Z case-sensitive.
 * id desc - Descending, from Z to A case-sensitive.
 * definitionId asc - Ascending, from A to Z case-sensitive.
 * definitionId desc - Descending, from Z to A case-sensitive.
 * definitionVersion asc - Ascending, from A to Z case-sensitive.
 * definitionVersion desc - Descending, from Z to A case-sensitive.
 * startedAt asc - Ascending, from A to Z case-sensitive.
 * startedAt desc - Descending, from Z to A case-sensitive.
 * completedAt asc - Ascending, workflow instance completion or cancelation time from the oldest to the most recent, not yet COMPLETED workflow instances first.
 * completedAt desc - Descending, from the most recently COMPLETED or CANCELED workflow instance to the oldest ones, not yet COMPLETED workflow instances last.
 * startedBy asc - Ascending, from A to Z case-sensitive.
 * startedBy desc - Descending, from Z to A case-sensitive.
 * subject asc - Ascending, from A to Z case-sensitive, workflow instances without subject first.
 * subject desc - Descending, from Z to A case-sensitive, workflow instances without subject last.
 * businessKey asc - Ascending, from A to Z case-sensitive, workflow instances without business key first.
 * businessKey desc - Descending, from Z to A case-sensitive, workflow instances without business key last.
        Integer $skip = 56; // Integer | Specify the number of records you want to skip from the beginning.
You can skip at most 4000 records. To indicate a result range that starts, for example, at 1001, combine the $skip with the $top parameter.
If not specified, no records are skipped.
Refer also to the $top parameter.
        Integer $top = 56; // Integer | Specify the number of records you want to show.
You can get at most 1000 records per API call. To indicate a result range that starts, for example, at 1001, combine the $top with the $skip parameter.
If not specified, 100 records are returned.
Refer also to the $skip parameter.
        String $inlinecount = $inlinecount_example; // String | Specify whether the total count of the workflow instances, which match the search criteria, should be returned as a value
of the X-Total-Count response header. To enable the header, use the 'allpages' setting. To disable the header, use the 'none' setting.
The values are case-sensitive.

        String $expand = $expand_example; // String | You can request custom workflow attributes to become part of the workflow instance output by specifying the value 'attributes' for the '$expand' parameter.
Otherwise, if the '$expand' parameter is not specified, the 'attributes' field is not included into the output of the workflow instance. Note that labels
as well as the order of the custom workflow attributes in which they are returned, are taken from the latest versions of the workflow definitions where
these attributes are present.

        String id = id_example; // String | Specify the workflow instance ID. The workflow instance ID is 36 characters long.
        String definitionId = definitionId_example; // String | Specify the ID of the workflow definition. The ID is at most 64 characters long.
        String definitionVersion = definitionVersion_example; // String | Specify the version of the workflow definition.
        String status = status_example; // String | Specify the status of the workflow instance. The values are not case-sensitive.
        String startedAt = startedAt_example; // String | Specify at what time the workflow instance was started. Supports two date formats 1) yyyy-MM-dd'T'HH:mm:ss.SSS'Z' 2) yyyyMMddHHmmss.SSS.
        String startedFrom = startedFrom_example; // String | Specify the beginning (inclusive) of the time range during which a returned workflow was started.

Supports two date formats:

1. yyyy-MM-dd'T'HH:mm:ss.SSS'Z'
1. yyyyMMddHHmmss.SSS

The parameter operates on the 'startedAt' attribute of a workflow instance. It is combined with the following parameters,
if available: 'startedUpTo' parameter using the logical 'and' operator; 'startedAt' parameter using the logical 'or' operator.

        String startedUpTo = startedUpTo_example; // String | Specify the end (inclusive) of the time range during which a returned workflow was started.

Supports two date formats:

1. yyyy-MM-dd'T'HH:mm:ss.SSS'Z'
1. yyyyMMddHHmmss.SSS

The parameter operates on the 'startedAt' attribute of a workflow instance. It is combined with the following parameters,
if available: 'startedFrom' parameter using the logical 'and' operator; 'startedAt' parameter using the logical 'or' operator.

        String completedAt = completedAt_example; // String | Specify at what time the workflow instance was changed to status COMPLETED or CANCELED.

Supports two date formats:

1. yyyy-MM-dd'T'HH:mm:ss.SSS'Z'
1. yyyyMMddHHmmss.SSS

        String completedFrom = completedFrom_example; // String | Specify the beginning (inclusive) of the time range during which a returned workflow was changed to status COMPLETED or CANCELED.

Supports two date formats:

1. yyyy-MM-dd'T'HH:mm:ss.SSS'Z'
1. yyyyMMddHHmmss.SSS

The parameter operates on the 'completedAt' attribute of a workflow instance. It is combined with the following parameters,
if available: 'completedUpTo' parameter using the logical 'and' operator; 'completedAt' parameter using the logical 'or' operator.

        String completedUpTo = completedUpTo_example; // String | Specify the end (inclusive) of the time range during which a returned workflow was changed to status COMPLETED or CANCELED.

Supports two date formats:

1. yyyy-MM-dd'T'HH:mm:ss.SSS'Z'
1. yyyyMMddHHmmss.SSS

The parameter operates on the 'completedAt' attribute of a workflow instance. It is combined with the following parameters,
if available: 'completedFrom' parameter using the logical 'and' operator; 'completedAt' parameter using the logical 'or' operator.

        String startedBy = startedBy_example; // String | Specify the user who started the workflow instance, in UTF-8 encoding. The user ID is at most 255 characters long.
        String subject = subject_example; // String | Specify the subject of the workflow instance, in UTF-8 encoding.
The subject of a workflow instance is limited to 255 characters.
        String containsText = containsText_example; // String | Specify the text to search for, in UTF-8 encoding. Searches the id, definitionId, subject, startedBy, and businessKey attributes
of the workflow instances. The maximum length of these attributes is 255 characters.

        String businessKey = businessKey_example; // String | Specify the business key of the workflow instance, in UTF-8 encoding.
The business key of a workflow instance is limited to 255 characters.
        String rootInstanceId = rootInstanceId_example; // String | Specify the workflow root instance ID.
The workflow root instance ID is 36 characters long.
        String parentInstanceId = parentInstanceId_example; // String | Specify the workflow parent instance ID.
The workflow parent instance ID is 36 characters long or it can be null.
        String attributes.ExampleCustomAttribute = attributes.ExampleCustomAttribute_example; // String | Example of a parameter that filters workflow instances by the value of the custom workflow attribute with the ID 'ExampleCustomAttribute'.
You can specify parameters for other attributes in an analogous way.
If you specify a parameter several times, the logical operators apply as outlined in the overall description of this API.
If custom workflow attributes with different IDs are present in the URL, only workflow instances which contain all of them with the values specified will be returned as a response to the request.
If a query by custom workflow attributes matches too many workflow definitions, you have to limit the query further. Refer, for example, to parameter 'definitionId'.

        try {
            array[WorkflowInstance] result = apiInstance.v1WorkflowInstancesGet(acceptLanguage, $orderby, $skip, $top, $inlinecount, $expand, id, definitionId, definitionVersion, status, startedAt, startedFrom, startedUpTo, completedAt, completedFrom, completedUpTo, startedBy, subject, containsText, businessKey, rootInstanceId, parentInstanceId, attributes.ExampleCustomAttribute);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling WorkflowInstancesApi#v1WorkflowInstancesGet");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.WorkflowInstancesApi;

public class WorkflowInstancesApiExample {

    public static void main(String[] args) {
        WorkflowInstancesApi apiInstance = new WorkflowInstancesApi();
        String acceptLanguage = acceptLanguage_example; // String | Provide a preferred language. If a translation is available, relevant texts are returned in this language.
        String $orderby = $orderby_example; // String | The attribute and direction by which workflow instances are sorted. The sort attribute and direction are separated by a space.
The parameter value is case-sensitive. You can only specify one ordering parameter, which contains attribute and direction.
If sort by definitionVersion is enabled, then definitionId is also added to the sorting query.
If not specified, the results are sorted by the 'startedAt' attribute, in descending order.

 * id asc - Ascending, from A to Z case-sensitive.
 * id desc - Descending, from Z to A case-sensitive.
 * definitionId asc - Ascending, from A to Z case-sensitive.
 * definitionId desc - Descending, from Z to A case-sensitive.
 * definitionVersion asc - Ascending, from A to Z case-sensitive.
 * definitionVersion desc - Descending, from Z to A case-sensitive.
 * startedAt asc - Ascending, from A to Z case-sensitive.
 * startedAt desc - Descending, from Z to A case-sensitive.
 * completedAt asc - Ascending, workflow instance completion or cancelation time from the oldest to the most recent, not yet COMPLETED workflow instances first.
 * completedAt desc - Descending, from the most recently COMPLETED or CANCELED workflow instance to the oldest ones, not yet COMPLETED workflow instances last.
 * startedBy asc - Ascending, from A to Z case-sensitive.
 * startedBy desc - Descending, from Z to A case-sensitive.
 * subject asc - Ascending, from A to Z case-sensitive, workflow instances without subject first.
 * subject desc - Descending, from Z to A case-sensitive, workflow instances without subject last.
 * businessKey asc - Ascending, from A to Z case-sensitive, workflow instances without business key first.
 * businessKey desc - Descending, from Z to A case-sensitive, workflow instances without business key last.
        Integer $skip = 56; // Integer | Specify the number of records you want to skip from the beginning.
You can skip at most 4000 records. To indicate a result range that starts, for example, at 1001, combine the $skip with the $top parameter.
If not specified, no records are skipped.
Refer also to the $top parameter.
        Integer $top = 56; // Integer | Specify the number of records you want to show.
You can get at most 1000 records per API call. To indicate a result range that starts, for example, at 1001, combine the $top with the $skip parameter.
If not specified, 100 records are returned.
Refer also to the $skip parameter.
        String $inlinecount = $inlinecount_example; // String | Specify whether the total count of the workflow instances, which match the search criteria, should be returned as a value
of the X-Total-Count response header. To enable the header, use the 'allpages' setting. To disable the header, use the 'none' setting.
The values are case-sensitive.

        String $expand = $expand_example; // String | You can request custom workflow attributes to become part of the workflow instance output by specifying the value 'attributes' for the '$expand' parameter.
Otherwise, if the '$expand' parameter is not specified, the 'attributes' field is not included into the output of the workflow instance. Note that labels
as well as the order of the custom workflow attributes in which they are returned, are taken from the latest versions of the workflow definitions where
these attributes are present.

        String id = id_example; // String | Specify the workflow instance ID. The workflow instance ID is 36 characters long.
        String definitionId = definitionId_example; // String | Specify the ID of the workflow definition. The ID is at most 64 characters long.
        String definitionVersion = definitionVersion_example; // String | Specify the version of the workflow definition.
        String status = status_example; // String | Specify the status of the workflow instance. The values are not case-sensitive.
        String startedAt = startedAt_example; // String | Specify at what time the workflow instance was started. Supports two date formats 1) yyyy-MM-dd'T'HH:mm:ss.SSS'Z' 2) yyyyMMddHHmmss.SSS.
        String startedFrom = startedFrom_example; // String | Specify the beginning (inclusive) of the time range during which a returned workflow was started.

Supports two date formats:

1. yyyy-MM-dd'T'HH:mm:ss.SSS'Z'
1. yyyyMMddHHmmss.SSS

The parameter operates on the 'startedAt' attribute of a workflow instance. It is combined with the following parameters,
if available: 'startedUpTo' parameter using the logical 'and' operator; 'startedAt' parameter using the logical 'or' operator.

        String startedUpTo = startedUpTo_example; // String | Specify the end (inclusive) of the time range during which a returned workflow was started.

Supports two date formats:

1. yyyy-MM-dd'T'HH:mm:ss.SSS'Z'
1. yyyyMMddHHmmss.SSS

The parameter operates on the 'startedAt' attribute of a workflow instance. It is combined with the following parameters,
if available: 'startedFrom' parameter using the logical 'and' operator; 'startedAt' parameter using the logical 'or' operator.

        String completedAt = completedAt_example; // String | Specify at what time the workflow instance was changed to status COMPLETED or CANCELED.

Supports two date formats:

1. yyyy-MM-dd'T'HH:mm:ss.SSS'Z'
1. yyyyMMddHHmmss.SSS

        String completedFrom = completedFrom_example; // String | Specify the beginning (inclusive) of the time range during which a returned workflow was changed to status COMPLETED or CANCELED.

Supports two date formats:

1. yyyy-MM-dd'T'HH:mm:ss.SSS'Z'
1. yyyyMMddHHmmss.SSS

The parameter operates on the 'completedAt' attribute of a workflow instance. It is combined with the following parameters,
if available: 'completedUpTo' parameter using the logical 'and' operator; 'completedAt' parameter using the logical 'or' operator.

        String completedUpTo = completedUpTo_example; // String | Specify the end (inclusive) of the time range during which a returned workflow was changed to status COMPLETED or CANCELED.

Supports two date formats:

1. yyyy-MM-dd'T'HH:mm:ss.SSS'Z'
1. yyyyMMddHHmmss.SSS

The parameter operates on the 'completedAt' attribute of a workflow instance. It is combined with the following parameters,
if available: 'completedFrom' parameter using the logical 'and' operator; 'completedAt' parameter using the logical 'or' operator.

        String startedBy = startedBy_example; // String | Specify the user who started the workflow instance, in UTF-8 encoding. The user ID is at most 255 characters long.
        String subject = subject_example; // String | Specify the subject of the workflow instance, in UTF-8 encoding.
The subject of a workflow instance is limited to 255 characters.
        String containsText = containsText_example; // String | Specify the text to search for, in UTF-8 encoding. Searches the id, definitionId, subject, startedBy, and businessKey attributes
of the workflow instances. The maximum length of these attributes is 255 characters.

        String businessKey = businessKey_example; // String | Specify the business key of the workflow instance, in UTF-8 encoding.
The business key of a workflow instance is limited to 255 characters.
        String rootInstanceId = rootInstanceId_example; // String | Specify the workflow root instance ID.
The workflow root instance ID is 36 characters long.
        String parentInstanceId = parentInstanceId_example; // String | Specify the workflow parent instance ID.
The workflow parent instance ID is 36 characters long or it can be null.
        String attributes.ExampleCustomAttribute = attributes.ExampleCustomAttribute_example; // String | Example of a parameter that filters workflow instances by the value of the custom workflow attribute with the ID 'ExampleCustomAttribute'.
You can specify parameters for other attributes in an analogous way.
If you specify a parameter several times, the logical operators apply as outlined in the overall description of this API.
If custom workflow attributes with different IDs are present in the URL, only workflow instances which contain all of them with the values specified will be returned as a response to the request.
If a query by custom workflow attributes matches too many workflow definitions, you have to limit the query further. Refer, for example, to parameter 'definitionId'.

        try {
            array[WorkflowInstance] result = apiInstance.v1WorkflowInstancesGet(acceptLanguage, $orderby, $skip, $top, $inlinecount, $expand, id, definitionId, definitionVersion, status, startedAt, startedFrom, startedUpTo, completedAt, completedFrom, completedUpTo, startedBy, subject, containsText, businessKey, rootInstanceId, parentInstanceId, attributes.ExampleCustomAttribute);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling WorkflowInstancesApi#v1WorkflowInstancesGet");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure OAuth2 access token for authorization: (authentication scheme: Oauth2_AuthorizationCode)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];

// Configure OAuth2 access token for authorization: (authentication scheme: Oauth2_ClientCredentials)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];

String *acceptLanguage = acceptLanguage_example; // Provide a preferred language. If a translation is available, relevant texts are returned in this language. (optional)
String *$orderby = $orderby_example; // The attribute and direction by which workflow instances are sorted. The sort attribute and direction are separated by a space.
The parameter value is case-sensitive. You can only specify one ordering parameter, which contains attribute and direction.
If sort by definitionVersion is enabled, then definitionId is also added to the sorting query.
If not specified, the results are sorted by the 'startedAt' attribute, in descending order.

 * id asc - Ascending, from A to Z case-sensitive.
 * id desc - Descending, from Z to A case-sensitive.
 * definitionId asc - Ascending, from A to Z case-sensitive.
 * definitionId desc - Descending, from Z to A case-sensitive.
 * definitionVersion asc - Ascending, from A to Z case-sensitive.
 * definitionVersion desc - Descending, from Z to A case-sensitive.
 * startedAt asc - Ascending, from A to Z case-sensitive.
 * startedAt desc - Descending, from Z to A case-sensitive.
 * completedAt asc - Ascending, workflow instance completion or cancelation time from the oldest to the most recent, not yet COMPLETED workflow instances first.
 * completedAt desc - Descending, from the most recently COMPLETED or CANCELED workflow instance to the oldest ones, not yet COMPLETED workflow instances last.
 * startedBy asc - Ascending, from A to Z case-sensitive.
 * startedBy desc - Descending, from Z to A case-sensitive.
 * subject asc - Ascending, from A to Z case-sensitive, workflow instances without subject first.
 * subject desc - Descending, from Z to A case-sensitive, workflow instances without subject last.
 * businessKey asc - Ascending, from A to Z case-sensitive, workflow instances without business key first.
 * businessKey desc - Descending, from Z to A case-sensitive, workflow instances without business key last. (optional) (default to startedAt desc)
Integer *$skip = 56; // Specify the number of records you want to skip from the beginning.
You can skip at most 4000 records. To indicate a result range that starts, for example, at 1001, combine the $skip with the $top parameter.
If not specified, no records are skipped.
Refer also to the $top parameter. (optional) (default to 0)
Integer *$top = 56; // Specify the number of records you want to show.
You can get at most 1000 records per API call. To indicate a result range that starts, for example, at 1001, combine the $top with the $skip parameter.
If not specified, 100 records are returned.
Refer also to the $skip parameter. (optional) (default to 100)
String *$inlinecount = $inlinecount_example; // Specify whether the total count of the workflow instances, which match the search criteria, should be returned as a value
of the X-Total-Count response header. To enable the header, use the 'allpages' setting. To disable the header, use the 'none' setting.
The values are case-sensitive.
 (optional) (default to none)
String *$expand = $expand_example; // You can request custom workflow attributes to become part of the workflow instance output by specifying the value 'attributes' for the '$expand' parameter.
Otherwise, if the '$expand' parameter is not specified, the 'attributes' field is not included into the output of the workflow instance. Note that labels
as well as the order of the custom workflow attributes in which they are returned, are taken from the latest versions of the workflow definitions where
these attributes are present.
 (optional)
String *id = id_example; // Specify the workflow instance ID. The workflow instance ID is 36 characters long. (optional)
String *definitionId = definitionId_example; // Specify the ID of the workflow definition. The ID is at most 64 characters long. (optional)
String *definitionVersion = definitionVersion_example; // Specify the version of the workflow definition. (optional)
String *status = status_example; // Specify the status of the workflow instance. The values are not case-sensitive. (optional)
String *startedAt = startedAt_example; // Specify at what time the workflow instance was started. Supports two date formats 1) yyyy-MM-dd'T'HH:mm:ss.SSS'Z' 2) yyyyMMddHHmmss.SSS. (optional)
String *startedFrom = startedFrom_example; // Specify the beginning (inclusive) of the time range during which a returned workflow was started.

Supports two date formats:

1. yyyy-MM-dd'T'HH:mm:ss.SSS'Z'
1. yyyyMMddHHmmss.SSS

The parameter operates on the 'startedAt' attribute of a workflow instance. It is combined with the following parameters,
if available: 'startedUpTo' parameter using the logical 'and' operator; 'startedAt' parameter using the logical 'or' operator.
 (optional)
String *startedUpTo = startedUpTo_example; // Specify the end (inclusive) of the time range during which a returned workflow was started.

Supports two date formats:

1. yyyy-MM-dd'T'HH:mm:ss.SSS'Z'
1. yyyyMMddHHmmss.SSS

The parameter operates on the 'startedAt' attribute of a workflow instance. It is combined with the following parameters,
if available: 'startedFrom' parameter using the logical 'and' operator; 'startedAt' parameter using the logical 'or' operator.
 (optional)
String *completedAt = completedAt_example; // Specify at what time the workflow instance was changed to status COMPLETED or CANCELED.

Supports two date formats:

1. yyyy-MM-dd'T'HH:mm:ss.SSS'Z'
1. yyyyMMddHHmmss.SSS
 (optional)
String *completedFrom = completedFrom_example; // Specify the beginning (inclusive) of the time range during which a returned workflow was changed to status COMPLETED or CANCELED.

Supports two date formats:

1. yyyy-MM-dd'T'HH:mm:ss.SSS'Z'
1. yyyyMMddHHmmss.SSS

The parameter operates on the 'completedAt' attribute of a workflow instance. It is combined with the following parameters,
if available: 'completedUpTo' parameter using the logical 'and' operator; 'completedAt' parameter using the logical 'or' operator.
 (optional)
String *completedUpTo = completedUpTo_example; // Specify the end (inclusive) of the time range during which a returned workflow was changed to status COMPLETED or CANCELED.

Supports two date formats:

1. yyyy-MM-dd'T'HH:mm:ss.SSS'Z'
1. yyyyMMddHHmmss.SSS

The parameter operates on the 'completedAt' attribute of a workflow instance. It is combined with the following parameters,
if available: 'completedFrom' parameter using the logical 'and' operator; 'completedAt' parameter using the logical 'or' operator.
 (optional)
String *startedBy = startedBy_example; // Specify the user who started the workflow instance, in UTF-8 encoding. The user ID is at most 255 characters long. (optional)
String *subject = subject_example; // Specify the subject of the workflow instance, in UTF-8 encoding.
The subject of a workflow instance is limited to 255 characters. (optional)
String *containsText = containsText_example; // Specify the text to search for, in UTF-8 encoding. Searches the id, definitionId, subject, startedBy, and businessKey attributes
of the workflow instances. The maximum length of these attributes is 255 characters.
 (optional)
String *businessKey = businessKey_example; // Specify the business key of the workflow instance, in UTF-8 encoding.
The business key of a workflow instance is limited to 255 characters. (optional)
String *rootInstanceId = rootInstanceId_example; // Specify the workflow root instance ID.
The workflow root instance ID is 36 characters long. (optional)
String *parentInstanceId = parentInstanceId_example; // Specify the workflow parent instance ID.
The workflow parent instance ID is 36 characters long or it can be null. (optional)
String *attributes.ExampleCustomAttribute = attributes.ExampleCustomAttribute_example; // Example of a parameter that filters workflow instances by the value of the custom workflow attribute with the ID 'ExampleCustomAttribute'.
You can specify parameters for other attributes in an analogous way.
If you specify a parameter several times, the logical operators apply as outlined in the overall description of this API.
If custom workflow attributes with different IDs are present in the URL, only workflow instances which contain all of them with the values specified will be returned as a response to the request.
If a query by custom workflow attributes matches too many workflow definitions, you have to limit the query further. Refer, for example, to parameter 'definitionId'.
 (optional)

WorkflowInstancesApi *apiInstance = [[WorkflowInstancesApi alloc] init];

// Retrieve all instances by query parameters
[apiInstance v1WorkflowInstancesGetWith:acceptLanguage
    $orderby:$orderby
    $skip:$skip
    $top:$top
    $inlinecount:$inlinecount
    $expand:$expand
    id:id
    definitionId:definitionId
    definitionVersion:definitionVersion
    status:status
    startedAt:startedAt
    startedFrom:startedFrom
    startedUpTo:startedUpTo
    completedAt:completedAt
    completedFrom:completedFrom
    completedUpTo:completedUpTo
    startedBy:startedBy
    subject:subject
    containsText:containsText
    businessKey:businessKey
    rootInstanceId:rootInstanceId
    parentInstanceId:parentInstanceId
    attributes.ExampleCustomAttribute:attributes.ExampleCustomAttribute
              completionHandler: ^(array[WorkflowInstance] output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var WorkflowApiForCloudFoundry = require('workflow_api_for_cloud_foundry');
var defaultClient = WorkflowApiForCloudFoundry.ApiClient.instance;

// Configure OAuth2 access token for authorization: Oauth2_AuthorizationCode
var Oauth2_AuthorizationCode = defaultClient.authentications['Oauth2_AuthorizationCode'];
Oauth2_AuthorizationCode.accessToken = "YOUR ACCESS TOKEN"

// Configure OAuth2 access token for authorization: Oauth2_ClientCredentials
var Oauth2_ClientCredentials = defaultClient.authentications['Oauth2_ClientCredentials'];
Oauth2_ClientCredentials.accessToken = "YOUR ACCESS TOKEN"

var api = new WorkflowApiForCloudFoundry.WorkflowInstancesApi()

var opts = { 
  'acceptLanguage': acceptLanguage_example, // {String} Provide a preferred language. If a translation is available, relevant texts are returned in this language.
  '$orderby': $orderby_example, // {String} The attribute and direction by which workflow instances are sorted. The sort attribute and direction are separated by a space.
The parameter value is case-sensitive. You can only specify one ordering parameter, which contains attribute and direction.
If sort by definitionVersion is enabled, then definitionId is also added to the sorting query.
If not specified, the results are sorted by the 'startedAt' attribute, in descending order.

 * id asc - Ascending, from A to Z case-sensitive.
 * id desc - Descending, from Z to A case-sensitive.
 * definitionId asc - Ascending, from A to Z case-sensitive.
 * definitionId desc - Descending, from Z to A case-sensitive.
 * definitionVersion asc - Ascending, from A to Z case-sensitive.
 * definitionVersion desc - Descending, from Z to A case-sensitive.
 * startedAt asc - Ascending, from A to Z case-sensitive.
 * startedAt desc - Descending, from Z to A case-sensitive.
 * completedAt asc - Ascending, workflow instance completion or cancelation time from the oldest to the most recent, not yet COMPLETED workflow instances first.
 * completedAt desc - Descending, from the most recently COMPLETED or CANCELED workflow instance to the oldest ones, not yet COMPLETED workflow instances last.
 * startedBy asc - Ascending, from A to Z case-sensitive.
 * startedBy desc - Descending, from Z to A case-sensitive.
 * subject asc - Ascending, from A to Z case-sensitive, workflow instances without subject first.
 * subject desc - Descending, from Z to A case-sensitive, workflow instances without subject last.
 * businessKey asc - Ascending, from A to Z case-sensitive, workflow instances without business key first.
 * businessKey desc - Descending, from Z to A case-sensitive, workflow instances without business key last.
  '$skip': 56, // {Integer} Specify the number of records you want to skip from the beginning.
You can skip at most 4000 records. To indicate a result range that starts, for example, at 1001, combine the $skip with the $top parameter.
If not specified, no records are skipped.
Refer also to the $top parameter.
  '$top': 56, // {Integer} Specify the number of records you want to show.
You can get at most 1000 records per API call. To indicate a result range that starts, for example, at 1001, combine the $top with the $skip parameter.
If not specified, 100 records are returned.
Refer also to the $skip parameter.
  '$inlinecount': $inlinecount_example, // {String} Specify whether the total count of the workflow instances, which match the search criteria, should be returned as a value
of the X-Total-Count response header. To enable the header, use the 'allpages' setting. To disable the header, use the 'none' setting.
The values are case-sensitive.

  '$expand': $expand_example, // {String} You can request custom workflow attributes to become part of the workflow instance output by specifying the value 'attributes' for the '$expand' parameter.
Otherwise, if the '$expand' parameter is not specified, the 'attributes' field is not included into the output of the workflow instance. Note that labels
as well as the order of the custom workflow attributes in which they are returned, are taken from the latest versions of the workflow definitions where
these attributes are present.

  'id': id_example, // {String} Specify the workflow instance ID. The workflow instance ID is 36 characters long.
  'definitionId': definitionId_example, // {String} Specify the ID of the workflow definition. The ID is at most 64 characters long.
  'definitionVersion': definitionVersion_example, // {String} Specify the version of the workflow definition.
  'status': status_example, // {String} Specify the status of the workflow instance. The values are not case-sensitive.
  'startedAt': startedAt_example, // {String} Specify at what time the workflow instance was started. Supports two date formats 1) yyyy-MM-dd'T'HH:mm:ss.SSS'Z' 2) yyyyMMddHHmmss.SSS.
  'startedFrom': startedFrom_example, // {String} Specify the beginning (inclusive) of the time range during which a returned workflow was started.

Supports two date formats:

1. yyyy-MM-dd'T'HH:mm:ss.SSS'Z'
1. yyyyMMddHHmmss.SSS

The parameter operates on the 'startedAt' attribute of a workflow instance. It is combined with the following parameters,
if available: 'startedUpTo' parameter using the logical 'and' operator; 'startedAt' parameter using the logical 'or' operator.

  'startedUpTo': startedUpTo_example, // {String} Specify the end (inclusive) of the time range during which a returned workflow was started.

Supports two date formats:

1. yyyy-MM-dd'T'HH:mm:ss.SSS'Z'
1. yyyyMMddHHmmss.SSS

The parameter operates on the 'startedAt' attribute of a workflow instance. It is combined with the following parameters,
if available: 'startedFrom' parameter using the logical 'and' operator; 'startedAt' parameter using the logical 'or' operator.

  'completedAt': completedAt_example, // {String} Specify at what time the workflow instance was changed to status COMPLETED or CANCELED.

Supports two date formats:

1. yyyy-MM-dd'T'HH:mm:ss.SSS'Z'
1. yyyyMMddHHmmss.SSS

  'completedFrom': completedFrom_example, // {String} Specify the beginning (inclusive) of the time range during which a returned workflow was changed to status COMPLETED or CANCELED.

Supports two date formats:

1. yyyy-MM-dd'T'HH:mm:ss.SSS'Z'
1. yyyyMMddHHmmss.SSS

The parameter operates on the 'completedAt' attribute of a workflow instance. It is combined with the following parameters,
if available: 'completedUpTo' parameter using the logical 'and' operator; 'completedAt' parameter using the logical 'or' operator.

  'completedUpTo': completedUpTo_example, // {String} Specify the end (inclusive) of the time range during which a returned workflow was changed to status COMPLETED or CANCELED.

Supports two date formats:

1. yyyy-MM-dd'T'HH:mm:ss.SSS'Z'
1. yyyyMMddHHmmss.SSS

The parameter operates on the 'completedAt' attribute of a workflow instance. It is combined with the following parameters,
if available: 'completedFrom' parameter using the logical 'and' operator; 'completedAt' parameter using the logical 'or' operator.

  'startedBy': startedBy_example, // {String} Specify the user who started the workflow instance, in UTF-8 encoding. The user ID is at most 255 characters long.
  'subject': subject_example, // {String} Specify the subject of the workflow instance, in UTF-8 encoding.
The subject of a workflow instance is limited to 255 characters.
  'containsText': containsText_example, // {String} Specify the text to search for, in UTF-8 encoding. Searches the id, definitionId, subject, startedBy, and businessKey attributes
of the workflow instances. The maximum length of these attributes is 255 characters.

  'businessKey': businessKey_example, // {String} Specify the business key of the workflow instance, in UTF-8 encoding.
The business key of a workflow instance is limited to 255 characters.
  'rootInstanceId': rootInstanceId_example, // {String} Specify the workflow root instance ID.
The workflow root instance ID is 36 characters long.
  'parentInstanceId': parentInstanceId_example, // {String} Specify the workflow parent instance ID.
The workflow parent instance ID is 36 characters long or it can be null.
  'attributes.ExampleCustomAttribute': attributes.ExampleCustomAttribute_example // {String} Example of a parameter that filters workflow instances by the value of the custom workflow attribute with the ID 'ExampleCustomAttribute'.
You can specify parameters for other attributes in an analogous way.
If you specify a parameter several times, the logical operators apply as outlined in the overall description of this API.
If custom workflow attributes with different IDs are present in the URL, only workflow instances which contain all of them with the values specified will be returned as a response to the request.
If a query by custom workflow attributes matches too many workflow definitions, you have to limit the query further. Refer, for example, to parameter 'definitionId'.

};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.v1WorkflowInstancesGet(opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class v1WorkflowInstancesGetExample
    {
        public void main()
        {
            
            // Configure OAuth2 access token for authorization: Oauth2_AuthorizationCode
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
            // Configure OAuth2 access token for authorization: Oauth2_ClientCredentials
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new WorkflowInstancesApi();
            var acceptLanguage = acceptLanguage_example;  // String | Provide a preferred language. If a translation is available, relevant texts are returned in this language. (optional) 
            var $orderby = $orderby_example;  // String | The attribute and direction by which workflow instances are sorted. The sort attribute and direction are separated by a space.
The parameter value is case-sensitive. You can only specify one ordering parameter, which contains attribute and direction.
If sort by definitionVersion is enabled, then definitionId is also added to the sorting query.
If not specified, the results are sorted by the 'startedAt' attribute, in descending order.

 * id asc - Ascending, from A to Z case-sensitive.
 * id desc - Descending, from Z to A case-sensitive.
 * definitionId asc - Ascending, from A to Z case-sensitive.
 * definitionId desc - Descending, from Z to A case-sensitive.
 * definitionVersion asc - Ascending, from A to Z case-sensitive.
 * definitionVersion desc - Descending, from Z to A case-sensitive.
 * startedAt asc - Ascending, from A to Z case-sensitive.
 * startedAt desc - Descending, from Z to A case-sensitive.
 * completedAt asc - Ascending, workflow instance completion or cancelation time from the oldest to the most recent, not yet COMPLETED workflow instances first.
 * completedAt desc - Descending, from the most recently COMPLETED or CANCELED workflow instance to the oldest ones, not yet COMPLETED workflow instances last.
 * startedBy asc - Ascending, from A to Z case-sensitive.
 * startedBy desc - Descending, from Z to A case-sensitive.
 * subject asc - Ascending, from A to Z case-sensitive, workflow instances without subject first.
 * subject desc - Descending, from Z to A case-sensitive, workflow instances without subject last.
 * businessKey asc - Ascending, from A to Z case-sensitive, workflow instances without business key first.
 * businessKey desc - Descending, from Z to A case-sensitive, workflow instances without business key last. (optional)  (default to startedAt desc)
            var $skip = 56;  // Integer | Specify the number of records you want to skip from the beginning.
You can skip at most 4000 records. To indicate a result range that starts, for example, at 1001, combine the $skip with the $top parameter.
If not specified, no records are skipped.
Refer also to the $top parameter. (optional)  (default to 0)
            var $top = 56;  // Integer | Specify the number of records you want to show.
You can get at most 1000 records per API call. To indicate a result range that starts, for example, at 1001, combine the $top with the $skip parameter.
If not specified, 100 records are returned.
Refer also to the $skip parameter. (optional)  (default to 100)
            var $inlinecount = $inlinecount_example;  // String | Specify whether the total count of the workflow instances, which match the search criteria, should be returned as a value
of the X-Total-Count response header. To enable the header, use the 'allpages' setting. To disable the header, use the 'none' setting.
The values are case-sensitive.
 (optional)  (default to none)
            var $expand = $expand_example;  // String | You can request custom workflow attributes to become part of the workflow instance output by specifying the value 'attributes' for the '$expand' parameter.
Otherwise, if the '$expand' parameter is not specified, the 'attributes' field is not included into the output of the workflow instance. Note that labels
as well as the order of the custom workflow attributes in which they are returned, are taken from the latest versions of the workflow definitions where
these attributes are present.
 (optional) 
            var id = id_example;  // String | Specify the workflow instance ID. The workflow instance ID is 36 characters long. (optional) 
            var definitionId = definitionId_example;  // String | Specify the ID of the workflow definition. The ID is at most 64 characters long. (optional) 
            var definitionVersion = definitionVersion_example;  // String | Specify the version of the workflow definition. (optional) 
            var status = status_example;  // String | Specify the status of the workflow instance. The values are not case-sensitive. (optional) 
            var startedAt = startedAt_example;  // String | Specify at what time the workflow instance was started. Supports two date formats 1) yyyy-MM-dd'T'HH:mm:ss.SSS'Z' 2) yyyyMMddHHmmss.SSS. (optional) 
            var startedFrom = startedFrom_example;  // String | Specify the beginning (inclusive) of the time range during which a returned workflow was started.

Supports two date formats:

1. yyyy-MM-dd'T'HH:mm:ss.SSS'Z'
1. yyyyMMddHHmmss.SSS

The parameter operates on the 'startedAt' attribute of a workflow instance. It is combined with the following parameters,
if available: 'startedUpTo' parameter using the logical 'and' operator; 'startedAt' parameter using the logical 'or' operator.
 (optional) 
            var startedUpTo = startedUpTo_example;  // String | Specify the end (inclusive) of the time range during which a returned workflow was started.

Supports two date formats:

1. yyyy-MM-dd'T'HH:mm:ss.SSS'Z'
1. yyyyMMddHHmmss.SSS

The parameter operates on the 'startedAt' attribute of a workflow instance. It is combined with the following parameters,
if available: 'startedFrom' parameter using the logical 'and' operator; 'startedAt' parameter using the logical 'or' operator.
 (optional) 
            var completedAt = completedAt_example;  // String | Specify at what time the workflow instance was changed to status COMPLETED or CANCELED.

Supports two date formats:

1. yyyy-MM-dd'T'HH:mm:ss.SSS'Z'
1. yyyyMMddHHmmss.SSS
 (optional) 
            var completedFrom = completedFrom_example;  // String | Specify the beginning (inclusive) of the time range during which a returned workflow was changed to status COMPLETED or CANCELED.

Supports two date formats:

1. yyyy-MM-dd'T'HH:mm:ss.SSS'Z'
1. yyyyMMddHHmmss.SSS

The parameter operates on the 'completedAt' attribute of a workflow instance. It is combined with the following parameters,
if available: 'completedUpTo' parameter using the logical 'and' operator; 'completedAt' parameter using the logical 'or' operator.
 (optional) 
            var completedUpTo = completedUpTo_example;  // String | Specify the end (inclusive) of the time range during which a returned workflow was changed to status COMPLETED or CANCELED.

Supports two date formats:

1. yyyy-MM-dd'T'HH:mm:ss.SSS'Z'
1. yyyyMMddHHmmss.SSS

The parameter operates on the 'completedAt' attribute of a workflow instance. It is combined with the following parameters,
if available: 'completedFrom' parameter using the logical 'and' operator; 'completedAt' parameter using the logical 'or' operator.
 (optional) 
            var startedBy = startedBy_example;  // String | Specify the user who started the workflow instance, in UTF-8 encoding. The user ID is at most 255 characters long. (optional) 
            var subject = subject_example;  // String | Specify the subject of the workflow instance, in UTF-8 encoding.
The subject of a workflow instance is limited to 255 characters. (optional) 
            var containsText = containsText_example;  // String | Specify the text to search for, in UTF-8 encoding. Searches the id, definitionId, subject, startedBy, and businessKey attributes
of the workflow instances. The maximum length of these attributes is 255 characters.
 (optional) 
            var businessKey = businessKey_example;  // String | Specify the business key of the workflow instance, in UTF-8 encoding.
The business key of a workflow instance is limited to 255 characters. (optional) 
            var rootInstanceId = rootInstanceId_example;  // String | Specify the workflow root instance ID.
The workflow root instance ID is 36 characters long. (optional) 
            var parentInstanceId = parentInstanceId_example;  // String | Specify the workflow parent instance ID.
The workflow parent instance ID is 36 characters long or it can be null. (optional) 
            var attributes.ExampleCustomAttribute = attributes.ExampleCustomAttribute_example;  // String | Example of a parameter that filters workflow instances by the value of the custom workflow attribute with the ID 'ExampleCustomAttribute'.
You can specify parameters for other attributes in an analogous way.
If you specify a parameter several times, the logical operators apply as outlined in the overall description of this API.
If custom workflow attributes with different IDs are present in the URL, only workflow instances which contain all of them with the values specified will be returned as a response to the request.
If a query by custom workflow attributes matches too many workflow definitions, you have to limit the query further. Refer, for example, to parameter 'definitionId'.
 (optional) 

            try
            {
                // Retrieve all instances by query parameters
                array[WorkflowInstance] result = apiInstance.v1WorkflowInstancesGet(acceptLanguage, $orderby, $skip, $top, $inlinecount, $expand, id, definitionId, definitionVersion, status, startedAt, startedFrom, startedUpTo, completedAt, completedFrom, completedUpTo, startedBy, subject, containsText, businessKey, rootInstanceId, parentInstanceId, attributes.ExampleCustomAttribute);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling WorkflowInstancesApi.v1WorkflowInstancesGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: Oauth2_AuthorizationCode
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
// Configure OAuth2 access token for authorization: Oauth2_ClientCredentials
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new Swagger\Client\Api\WorkflowInstancesApi();
$acceptLanguage = acceptLanguage_example; // String | Provide a preferred language. If a translation is available, relevant texts are returned in this language.
$$orderby = $orderby_example; // String | The attribute and direction by which workflow instances are sorted. The sort attribute and direction are separated by a space.
The parameter value is case-sensitive. You can only specify one ordering parameter, which contains attribute and direction.
If sort by definitionVersion is enabled, then definitionId is also added to the sorting query.
If not specified, the results are sorted by the 'startedAt' attribute, in descending order.

 * id asc - Ascending, from A to Z case-sensitive.
 * id desc - Descending, from Z to A case-sensitive.
 * definitionId asc - Ascending, from A to Z case-sensitive.
 * definitionId desc - Descending, from Z to A case-sensitive.
 * definitionVersion asc - Ascending, from A to Z case-sensitive.
 * definitionVersion desc - Descending, from Z to A case-sensitive.
 * startedAt asc - Ascending, from A to Z case-sensitive.
 * startedAt desc - Descending, from Z to A case-sensitive.
 * completedAt asc - Ascending, workflow instance completion or cancelation time from the oldest to the most recent, not yet COMPLETED workflow instances first.
 * completedAt desc - Descending, from the most recently COMPLETED or CANCELED workflow instance to the oldest ones, not yet COMPLETED workflow instances last.
 * startedBy asc - Ascending, from A to Z case-sensitive.
 * startedBy desc - Descending, from Z to A case-sensitive.
 * subject asc - Ascending, from A to Z case-sensitive, workflow instances without subject first.
 * subject desc - Descending, from Z to A case-sensitive, workflow instances without subject last.
 * businessKey asc - Ascending, from A to Z case-sensitive, workflow instances without business key first.
 * businessKey desc - Descending, from Z to A case-sensitive, workflow instances without business key last.
$$skip = 56; // Integer | Specify the number of records you want to skip from the beginning.
You can skip at most 4000 records. To indicate a result range that starts, for example, at 1001, combine the $skip with the $top parameter.
If not specified, no records are skipped.
Refer also to the $top parameter.
$$top = 56; // Integer | Specify the number of records you want to show.
You can get at most 1000 records per API call. To indicate a result range that starts, for example, at 1001, combine the $top with the $skip parameter.
If not specified, 100 records are returned.
Refer also to the $skip parameter.
$$inlinecount = $inlinecount_example; // String | Specify whether the total count of the workflow instances, which match the search criteria, should be returned as a value
of the X-Total-Count response header. To enable the header, use the 'allpages' setting. To disable the header, use the 'none' setting.
The values are case-sensitive.

$$expand = $expand_example; // String | You can request custom workflow attributes to become part of the workflow instance output by specifying the value 'attributes' for the '$expand' parameter.
Otherwise, if the '$expand' parameter is not specified, the 'attributes' field is not included into the output of the workflow instance. Note that labels
as well as the order of the custom workflow attributes in which they are returned, are taken from the latest versions of the workflow definitions where
these attributes are present.

$id = id_example; // String | Specify the workflow instance ID. The workflow instance ID is 36 characters long.
$definitionId = definitionId_example; // String | Specify the ID of the workflow definition. The ID is at most 64 characters long.
$definitionVersion = definitionVersion_example; // String | Specify the version of the workflow definition.
$status = status_example; // String | Specify the status of the workflow instance. The values are not case-sensitive.
$startedAt = startedAt_example; // String | Specify at what time the workflow instance was started. Supports two date formats 1) yyyy-MM-dd'T'HH:mm:ss.SSS'Z' 2) yyyyMMddHHmmss.SSS.
$startedFrom = startedFrom_example; // String | Specify the beginning (inclusive) of the time range during which a returned workflow was started.

Supports two date formats:

1. yyyy-MM-dd'T'HH:mm:ss.SSS'Z'
1. yyyyMMddHHmmss.SSS

The parameter operates on the 'startedAt' attribute of a workflow instance. It is combined with the following parameters,
if available: 'startedUpTo' parameter using the logical 'and' operator; 'startedAt' parameter using the logical 'or' operator.

$startedUpTo = startedUpTo_example; // String | Specify the end (inclusive) of the time range during which a returned workflow was started.

Supports two date formats:

1. yyyy-MM-dd'T'HH:mm:ss.SSS'Z'
1. yyyyMMddHHmmss.SSS

The parameter operates on the 'startedAt' attribute of a workflow instance. It is combined with the following parameters,
if available: 'startedFrom' parameter using the logical 'and' operator; 'startedAt' parameter using the logical 'or' operator.

$completedAt = completedAt_example; // String | Specify at what time the workflow instance was changed to status COMPLETED or CANCELED.

Supports two date formats:

1. yyyy-MM-dd'T'HH:mm:ss.SSS'Z'
1. yyyyMMddHHmmss.SSS

$completedFrom = completedFrom_example; // String | Specify the beginning (inclusive) of the time range during which a returned workflow was changed to status COMPLETED or CANCELED.

Supports two date formats:

1. yyyy-MM-dd'T'HH:mm:ss.SSS'Z'
1. yyyyMMddHHmmss.SSS

The parameter operates on the 'completedAt' attribute of a workflow instance. It is combined with the following parameters,
if available: 'completedUpTo' parameter using the logical 'and' operator; 'completedAt' parameter using the logical 'or' operator.

$completedUpTo = completedUpTo_example; // String | Specify the end (inclusive) of the time range during which a returned workflow was changed to status COMPLETED or CANCELED.

Supports two date formats:

1. yyyy-MM-dd'T'HH:mm:ss.SSS'Z'
1. yyyyMMddHHmmss.SSS

The parameter operates on the 'completedAt' attribute of a workflow instance. It is combined with the following parameters,
if available: 'completedFrom' parameter using the logical 'and' operator; 'completedAt' parameter using the logical 'or' operator.

$startedBy = startedBy_example; // String | Specify the user who started the workflow instance, in UTF-8 encoding. The user ID is at most 255 characters long.
$subject = subject_example; // String | Specify the subject of the workflow instance, in UTF-8 encoding.
The subject of a workflow instance is limited to 255 characters.
$containsText = containsText_example; // String | Specify the text to search for, in UTF-8 encoding. Searches the id, definitionId, subject, startedBy, and businessKey attributes
of the workflow instances. The maximum length of these attributes is 255 characters.

$businessKey = businessKey_example; // String | Specify the business key of the workflow instance, in UTF-8 encoding.
The business key of a workflow instance is limited to 255 characters.
$rootInstanceId = rootInstanceId_example; // String | Specify the workflow root instance ID.
The workflow root instance ID is 36 characters long.
$parentInstanceId = parentInstanceId_example; // String | Specify the workflow parent instance ID.
The workflow parent instance ID is 36 characters long or it can be null.
$attributes.ExampleCustomAttribute = attributes.ExampleCustomAttribute_example; // String | Example of a parameter that filters workflow instances by the value of the custom workflow attribute with the ID 'ExampleCustomAttribute'.
You can specify parameters for other attributes in an analogous way.
If you specify a parameter several times, the logical operators apply as outlined in the overall description of this API.
If custom workflow attributes with different IDs are present in the URL, only workflow instances which contain all of them with the values specified will be returned as a response to the request.
If a query by custom workflow attributes matches too many workflow definitions, you have to limit the query further. Refer, for example, to parameter 'definitionId'.


try {
    $result = $api_instance->v1WorkflowInstancesGet($acceptLanguage, $$orderby, $$skip, $$top, $$inlinecount, $$expand, $id, $definitionId, $definitionVersion, $status, $startedAt, $startedFrom, $startedUpTo, $completedAt, $completedFrom, $completedUpTo, $startedBy, $subject, $containsText, $businessKey, $rootInstanceId, $parentInstanceId, $attributes.ExampleCustomAttribute);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling WorkflowInstancesApi->v1WorkflowInstancesGet: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::WorkflowInstancesApi;

# Configure OAuth2 access token for authorization: Oauth2_AuthorizationCode
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
# Configure OAuth2 access token for authorization: Oauth2_ClientCredentials
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::SwaggerClient::WorkflowInstancesApi->new();
my $acceptLanguage = acceptLanguage_example; # String | Provide a preferred language. If a translation is available, relevant texts are returned in this language.
my $$orderby = $orderby_example; # String | The attribute and direction by which workflow instances are sorted. The sort attribute and direction are separated by a space.
The parameter value is case-sensitive. You can only specify one ordering parameter, which contains attribute and direction.
If sort by definitionVersion is enabled, then definitionId is also added to the sorting query.
If not specified, the results are sorted by the 'startedAt' attribute, in descending order.

 * id asc - Ascending, from A to Z case-sensitive.
 * id desc - Descending, from Z to A case-sensitive.
 * definitionId asc - Ascending, from A to Z case-sensitive.
 * definitionId desc - Descending, from Z to A case-sensitive.
 * definitionVersion asc - Ascending, from A to Z case-sensitive.
 * definitionVersion desc - Descending, from Z to A case-sensitive.
 * startedAt asc - Ascending, from A to Z case-sensitive.
 * startedAt desc - Descending, from Z to A case-sensitive.
 * completedAt asc - Ascending, workflow instance completion or cancelation time from the oldest to the most recent, not yet COMPLETED workflow instances first.
 * completedAt desc - Descending, from the most recently COMPLETED or CANCELED workflow instance to the oldest ones, not yet COMPLETED workflow instances last.
 * startedBy asc - Ascending, from A to Z case-sensitive.
 * startedBy desc - Descending, from Z to A case-sensitive.
 * subject asc - Ascending, from A to Z case-sensitive, workflow instances without subject first.
 * subject desc - Descending, from Z to A case-sensitive, workflow instances without subject last.
 * businessKey asc - Ascending, from A to Z case-sensitive, workflow instances without business key first.
 * businessKey desc - Descending, from Z to A case-sensitive, workflow instances without business key last.
my $$skip = 56; # Integer | Specify the number of records you want to skip from the beginning.
You can skip at most 4000 records. To indicate a result range that starts, for example, at 1001, combine the $skip with the $top parameter.
If not specified, no records are skipped.
Refer also to the $top parameter.
my $$top = 56; # Integer | Specify the number of records you want to show.
You can get at most 1000 records per API call. To indicate a result range that starts, for example, at 1001, combine the $top with the $skip parameter.
If not specified, 100 records are returned.
Refer also to the $skip parameter.
my $$inlinecount = $inlinecount_example; # String | Specify whether the total count of the workflow instances, which match the search criteria, should be returned as a value
of the X-Total-Count response header. To enable the header, use the 'allpages' setting. To disable the header, use the 'none' setting.
The values are case-sensitive.

my $$expand = $expand_example; # String | You can request custom workflow attributes to become part of the workflow instance output by specifying the value 'attributes' for the '$expand' parameter.
Otherwise, if the '$expand' parameter is not specified, the 'attributes' field is not included into the output of the workflow instance. Note that labels
as well as the order of the custom workflow attributes in which they are returned, are taken from the latest versions of the workflow definitions where
these attributes are present.

my $id = id_example; # String | Specify the workflow instance ID. The workflow instance ID is 36 characters long.
my $definitionId = definitionId_example; # String | Specify the ID of the workflow definition. The ID is at most 64 characters long.
my $definitionVersion = definitionVersion_example; # String | Specify the version of the workflow definition.
my $status = status_example; # String | Specify the status of the workflow instance. The values are not case-sensitive.
my $startedAt = startedAt_example; # String | Specify at what time the workflow instance was started. Supports two date formats 1) yyyy-MM-dd'T'HH:mm:ss.SSS'Z' 2) yyyyMMddHHmmss.SSS.
my $startedFrom = startedFrom_example; # String | Specify the beginning (inclusive) of the time range during which a returned workflow was started.

Supports two date formats:

1. yyyy-MM-dd'T'HH:mm:ss.SSS'Z'
1. yyyyMMddHHmmss.SSS

The parameter operates on the 'startedAt' attribute of a workflow instance. It is combined with the following parameters,
if available: 'startedUpTo' parameter using the logical 'and' operator; 'startedAt' parameter using the logical 'or' operator.

my $startedUpTo = startedUpTo_example; # String | Specify the end (inclusive) of the time range during which a returned workflow was started.

Supports two date formats:

1. yyyy-MM-dd'T'HH:mm:ss.SSS'Z'
1. yyyyMMddHHmmss.SSS

The parameter operates on the 'startedAt' attribute of a workflow instance. It is combined with the following parameters,
if available: 'startedFrom' parameter using the logical 'and' operator; 'startedAt' parameter using the logical 'or' operator.

my $completedAt = completedAt_example; # String | Specify at what time the workflow instance was changed to status COMPLETED or CANCELED.

Supports two date formats:

1. yyyy-MM-dd'T'HH:mm:ss.SSS'Z'
1. yyyyMMddHHmmss.SSS

my $completedFrom = completedFrom_example; # String | Specify the beginning (inclusive) of the time range during which a returned workflow was changed to status COMPLETED or CANCELED.

Supports two date formats:

1. yyyy-MM-dd'T'HH:mm:ss.SSS'Z'
1. yyyyMMddHHmmss.SSS

The parameter operates on the 'completedAt' attribute of a workflow instance. It is combined with the following parameters,
if available: 'completedUpTo' parameter using the logical 'and' operator; 'completedAt' parameter using the logical 'or' operator.

my $completedUpTo = completedUpTo_example; # String | Specify the end (inclusive) of the time range during which a returned workflow was changed to status COMPLETED or CANCELED.

Supports two date formats:

1. yyyy-MM-dd'T'HH:mm:ss.SSS'Z'
1. yyyyMMddHHmmss.SSS

The parameter operates on the 'completedAt' attribute of a workflow instance. It is combined with the following parameters,
if available: 'completedFrom' parameter using the logical 'and' operator; 'completedAt' parameter using the logical 'or' operator.

my $startedBy = startedBy_example; # String | Specify the user who started the workflow instance, in UTF-8 encoding. The user ID is at most 255 characters long.
my $subject = subject_example; # String | Specify the subject of the workflow instance, in UTF-8 encoding.
The subject of a workflow instance is limited to 255 characters.
my $containsText = containsText_example; # String | Specify the text to search for, in UTF-8 encoding. Searches the id, definitionId, subject, startedBy, and businessKey attributes
of the workflow instances. The maximum length of these attributes is 255 characters.

my $businessKey = businessKey_example; # String | Specify the business key of the workflow instance, in UTF-8 encoding.
The business key of a workflow instance is limited to 255 characters.
my $rootInstanceId = rootInstanceId_example; # String | Specify the workflow root instance ID.
The workflow root instance ID is 36 characters long.
my $parentInstanceId = parentInstanceId_example; # String | Specify the workflow parent instance ID.
The workflow parent instance ID is 36 characters long or it can be null.
my $attributes.ExampleCustomAttribute = attributes.ExampleCustomAttribute_example; # String | Example of a parameter that filters workflow instances by the value of the custom workflow attribute with the ID 'ExampleCustomAttribute'.
You can specify parameters for other attributes in an analogous way.
If you specify a parameter several times, the logical operators apply as outlined in the overall description of this API.
If custom workflow attributes with different IDs are present in the URL, only workflow instances which contain all of them with the values specified will be returned as a response to the request.
If a query by custom workflow attributes matches too many workflow definitions, you have to limit the query further. Refer, for example, to parameter 'definitionId'.


eval { 
    my $result = $api_instance->v1WorkflowInstancesGet(acceptLanguage => $acceptLanguage, $orderby => $$orderby, $skip => $$skip, $top => $$top, $inlinecount => $$inlinecount, $expand => $$expand, id => $id, definitionId => $definitionId, definitionVersion => $definitionVersion, status => $status, startedAt => $startedAt, startedFrom => $startedFrom, startedUpTo => $startedUpTo, completedAt => $completedAt, completedFrom => $completedFrom, completedUpTo => $completedUpTo, startedBy => $startedBy, subject => $subject, containsText => $containsText, businessKey => $businessKey, rootInstanceId => $rootInstanceId, parentInstanceId => $parentInstanceId, attributes.ExampleCustomAttribute => $attributes.ExampleCustomAttribute);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling WorkflowInstancesApi->v1WorkflowInstancesGet: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: Oauth2_AuthorizationCode
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure OAuth2 access token for authorization: Oauth2_ClientCredentials
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.WorkflowInstancesApi()
acceptLanguage = acceptLanguage_example # String | Provide a preferred language. If a translation is available, relevant texts are returned in this language. (optional)
$orderby = $orderby_example # String | The attribute and direction by which workflow instances are sorted. The sort attribute and direction are separated by a space.
The parameter value is case-sensitive. You can only specify one ordering parameter, which contains attribute and direction.
If sort by definitionVersion is enabled, then definitionId is also added to the sorting query.
If not specified, the results are sorted by the 'startedAt' attribute, in descending order.

 * id asc - Ascending, from A to Z case-sensitive.
 * id desc - Descending, from Z to A case-sensitive.
 * definitionId asc - Ascending, from A to Z case-sensitive.
 * definitionId desc - Descending, from Z to A case-sensitive.
 * definitionVersion asc - Ascending, from A to Z case-sensitive.
 * definitionVersion desc - Descending, from Z to A case-sensitive.
 * startedAt asc - Ascending, from A to Z case-sensitive.
 * startedAt desc - Descending, from Z to A case-sensitive.
 * completedAt asc - Ascending, workflow instance completion or cancelation time from the oldest to the most recent, not yet COMPLETED workflow instances first.
 * completedAt desc - Descending, from the most recently COMPLETED or CANCELED workflow instance to the oldest ones, not yet COMPLETED workflow instances last.
 * startedBy asc - Ascending, from A to Z case-sensitive.
 * startedBy desc - Descending, from Z to A case-sensitive.
 * subject asc - Ascending, from A to Z case-sensitive, workflow instances without subject first.
 * subject desc - Descending, from Z to A case-sensitive, workflow instances without subject last.
 * businessKey asc - Ascending, from A to Z case-sensitive, workflow instances without business key first.
 * businessKey desc - Descending, from Z to A case-sensitive, workflow instances without business key last. (optional) (default to startedAt desc)
$skip = 56 # Integer | Specify the number of records you want to skip from the beginning.
You can skip at most 4000 records. To indicate a result range that starts, for example, at 1001, combine the $skip with the $top parameter.
If not specified, no records are skipped.
Refer also to the $top parameter. (optional) (default to 0)
$top = 56 # Integer | Specify the number of records you want to show.
You can get at most 1000 records per API call. To indicate a result range that starts, for example, at 1001, combine the $top with the $skip parameter.
If not specified, 100 records are returned.
Refer also to the $skip parameter. (optional) (default to 100)
$inlinecount = $inlinecount_example # String | Specify whether the total count of the workflow instances, which match the search criteria, should be returned as a value
of the X-Total-Count response header. To enable the header, use the 'allpages' setting. To disable the header, use the 'none' setting.
The values are case-sensitive.
 (optional) (default to none)
$expand = $expand_example # String | You can request custom workflow attributes to become part of the workflow instance output by specifying the value 'attributes' for the '$expand' parameter.
Otherwise, if the '$expand' parameter is not specified, the 'attributes' field is not included into the output of the workflow instance. Note that labels
as well as the order of the custom workflow attributes in which they are returned, are taken from the latest versions of the workflow definitions where
these attributes are present.
 (optional)
id = id_example # String | Specify the workflow instance ID. The workflow instance ID is 36 characters long. (optional)
definitionId = definitionId_example # String | Specify the ID of the workflow definition. The ID is at most 64 characters long. (optional)
definitionVersion = definitionVersion_example # String | Specify the version of the workflow definition. (optional)
status = status_example # String | Specify the status of the workflow instance. The values are not case-sensitive. (optional)
startedAt = startedAt_example # String | Specify at what time the workflow instance was started. Supports two date formats 1) yyyy-MM-dd'T'HH:mm:ss.SSS'Z' 2) yyyyMMddHHmmss.SSS. (optional)
startedFrom = startedFrom_example # String | Specify the beginning (inclusive) of the time range during which a returned workflow was started.

Supports two date formats:

1. yyyy-MM-dd'T'HH:mm:ss.SSS'Z'
1. yyyyMMddHHmmss.SSS

The parameter operates on the 'startedAt' attribute of a workflow instance. It is combined with the following parameters,
if available: 'startedUpTo' parameter using the logical 'and' operator; 'startedAt' parameter using the logical 'or' operator.
 (optional)
startedUpTo = startedUpTo_example # String | Specify the end (inclusive) of the time range during which a returned workflow was started.

Supports two date formats:

1. yyyy-MM-dd'T'HH:mm:ss.SSS'Z'
1. yyyyMMddHHmmss.SSS

The parameter operates on the 'startedAt' attribute of a workflow instance. It is combined with the following parameters,
if available: 'startedFrom' parameter using the logical 'and' operator; 'startedAt' parameter using the logical 'or' operator.
 (optional)
completedAt = completedAt_example # String | Specify at what time the workflow instance was changed to status COMPLETED or CANCELED.

Supports two date formats:

1. yyyy-MM-dd'T'HH:mm:ss.SSS'Z'
1. yyyyMMddHHmmss.SSS
 (optional)
completedFrom = completedFrom_example # String | Specify the beginning (inclusive) of the time range during which a returned workflow was changed to status COMPLETED or CANCELED.

Supports two date formats:

1. yyyy-MM-dd'T'HH:mm:ss.SSS'Z'
1. yyyyMMddHHmmss.SSS

The parameter operates on the 'completedAt' attribute of a workflow instance. It is combined with the following parameters,
if available: 'completedUpTo' parameter using the logical 'and' operator; 'completedAt' parameter using the logical 'or' operator.
 (optional)
completedUpTo = completedUpTo_example # String | Specify the end (inclusive) of the time range during which a returned workflow was changed to status COMPLETED or CANCELED.

Supports two date formats:

1. yyyy-MM-dd'T'HH:mm:ss.SSS'Z'
1. yyyyMMddHHmmss.SSS

The parameter operates on the 'completedAt' attribute of a workflow instance. It is combined with the following parameters,
if available: 'completedFrom' parameter using the logical 'and' operator; 'completedAt' parameter using the logical 'or' operator.
 (optional)
startedBy = startedBy_example # String | Specify the user who started the workflow instance, in UTF-8 encoding. The user ID is at most 255 characters long. (optional)
subject = subject_example # String | Specify the subject of the workflow instance, in UTF-8 encoding.
The subject of a workflow instance is limited to 255 characters. (optional)
containsText = containsText_example # String | Specify the text to search for, in UTF-8 encoding. Searches the id, definitionId, subject, startedBy, and businessKey attributes
of the workflow instances. The maximum length of these attributes is 255 characters.
 (optional)
businessKey = businessKey_example # String | Specify the business key of the workflow instance, in UTF-8 encoding.
The business key of a workflow instance is limited to 255 characters. (optional)
rootInstanceId = rootInstanceId_example # String | Specify the workflow root instance ID.
The workflow root instance ID is 36 characters long. (optional)
parentInstanceId = parentInstanceId_example # String | Specify the workflow parent instance ID.
The workflow parent instance ID is 36 characters long or it can be null. (optional)
attributes.ExampleCustomAttribute = attributes.ExampleCustomAttribute_example # String | Example of a parameter that filters workflow instances by the value of the custom workflow attribute with the ID 'ExampleCustomAttribute'.
You can specify parameters for other attributes in an analogous way.
If you specify a parameter several times, the logical operators apply as outlined in the overall description of this API.
If custom workflow attributes with different IDs are present in the URL, only workflow instances which contain all of them with the values specified will be returned as a response to the request.
If a query by custom workflow attributes matches too many workflow definitions, you have to limit the query further. Refer, for example, to parameter 'definitionId'.
 (optional)

try: 
    # Retrieve all instances by query parameters
    api_response = api_instance.v1WorkflowInstancesGet(acceptLanguage=acceptLanguage, $orderby=$orderby, $skip=$skip, $top=$top, $inlinecount=$inlinecount, $expand=$expand, id=id, definitionId=definitionId, definitionVersion=definitionVersion, status=status, startedAt=startedAt, startedFrom=startedFrom, startedUpTo=startedUpTo, completedAt=completedAt, completedFrom=completedFrom, completedUpTo=completedUpTo, startedBy=startedBy, subject=subject, containsText=containsText, businessKey=businessKey, rootInstanceId=rootInstanceId, parentInstanceId=parentInstanceId, attributes.ExampleCustomAttribute=attributes.ExampleCustomAttribute)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling WorkflowInstancesApi->v1WorkflowInstancesGet: %s\n" % e)

Parameters

Header parameters
Name Description
Accept-Language
Query parameters
Name Description
$orderby
$skip
$top
$inlinecount
$expand
id
definitionId
definitionVersion
status
startedAt
startedFrom
startedUpTo
completedAt
completedFrom
completedUpTo
startedBy
subject
containsText
businessKey
rootInstanceId
parentInstanceId
attributes.ExampleCustomAttribute

Responses

Status: 200 - Returns a list of workflow instances.

[{id=13, definitionId=LeaveRequestWorkflow, definitionVersion=2, subject=Leave Request for Alice, businessKey=s021445, status=RUNNING, startedAt=2016-11-01T19:59:59.000Z, startedBy=Alice, rootInstanceId=25bd51d6-200d-11eb-a911-eeee0a811eb6}, {id=14, definitionId=OrderingWorkflow, definitionVersion=4, subject=Order #123 created by Bob, businessKey=123, status=RUNNING, startedAt=2016-11-01T19:59:59.000Z, startedBy=Bob, completedAt=2016-11-02T10:23:51.000Z, rootInstanceId=25bd51d6-200d-11eb-a911-eeee0a811eb6, parentInstanceId=1dsd51d6-620d-a1eb-t911-eeee0af11e8g}]

Status: 401 - Unauthorized. You have not provided valid authentication credentials to access the resource.

{error=unauthorized, error_description=Full authentication is required to access this resource.}

Status: 403 - Access forbidden. You have not the required permissions to access the resource.

{error={message=User does not have sufficient privileges.}}

Status: 429 - You have reached the usage limits that are configured for your tenant. You are performing too many requests or consume too many resources.

{error={code=bpm.workflowruntime.rate.limit.exceeded, message=Your tenant is performing too many requests.}}

Status: 500 - Internal server error. The operation you requested led to an error during execution.

{error={code=bpm.workflowruntime.rest.internal.server.error, message=Internal server error, logId=f29a5719-3342-4a4a-8a3d-5ddd5253159e}}

/v1/workflow-instances

Modifies the given workflow instances according to the specified operations. Currently, the only operation supported is the deletion of workflow instances. You can at most specify 10000 instances to delete in one API call. Roles permitted to execute this operation: - Global roles: WorkflowTenantOperator - Scope: WORKFLOW_INSTANCES_UPDATE


/v1/workflow-instances

Usage

curl -X PATCH "https://sandbox.api.sap.com/workflow-service/rest/v1/workflow-instances"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.WorkflowInstancesApi;

import java.io.File;
import java.util.*;

public class WorkflowInstancesApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        
        // Configure OAuth2 access token for authorization: Oauth2_AuthorizationCode
        OAuth Oauth2_AuthorizationCode = (OAuth) defaultClient.getAuthentication("Oauth2_AuthorizationCode");
        Oauth2_AuthorizationCode.setAccessToken("YOUR ACCESS TOKEN");

        // Configure OAuth2 access token for authorization: Oauth2_ClientCredentials
        OAuth Oauth2_ClientCredentials = (OAuth) defaultClient.getAuthentication("Oauth2_ClientCredentials");
        Oauth2_ClientCredentials.setAccessToken("YOUR ACCESS TOKEN");

        WorkflowInstancesApi apiInstance = new WorkflowInstancesApi();
        array[WorkflowInstancesUpdatePayload] body = ; // array[WorkflowInstancesUpdatePayload] | Specify the request body according to the given schema.
Note that the length of the request body is limited to ensure optimal operation of the service.
        try {
            apiInstance.v1WorkflowInstancesPatch(body);
        } catch (ApiException e) {
            System.err.println("Exception when calling WorkflowInstancesApi#v1WorkflowInstancesPatch");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.WorkflowInstancesApi;

public class WorkflowInstancesApiExample {

    public static void main(String[] args) {
        WorkflowInstancesApi apiInstance = new WorkflowInstancesApi();
        array[WorkflowInstancesUpdatePayload] body = ; // array[WorkflowInstancesUpdatePayload] | Specify the request body according to the given schema.
Note that the length of the request body is limited to ensure optimal operation of the service.
        try {
            apiInstance.v1WorkflowInstancesPatch(body);
        } catch (ApiException e) {
            System.err.println("Exception when calling WorkflowInstancesApi#v1WorkflowInstancesPatch");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure OAuth2 access token for authorization: (authentication scheme: Oauth2_AuthorizationCode)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];

// Configure OAuth2 access token for authorization: (authentication scheme: Oauth2_ClientCredentials)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];

array[WorkflowInstancesUpdatePayload] *body = ; // Specify the request body according to the given schema.
Note that the length of the request body is limited to ensure optimal operation of the service.

WorkflowInstancesApi *apiInstance = [[WorkflowInstancesApi alloc] init];

// Delete instance by ID
[apiInstance v1WorkflowInstancesPatchWith:body
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var WorkflowApiForCloudFoundry = require('workflow_api_for_cloud_foundry');
var defaultClient = WorkflowApiForCloudFoundry.ApiClient.instance;

// Configure OAuth2 access token for authorization: Oauth2_AuthorizationCode
var Oauth2_AuthorizationCode = defaultClient.authentications['Oauth2_AuthorizationCode'];
Oauth2_AuthorizationCode.accessToken = "YOUR ACCESS TOKEN"

// Configure OAuth2 access token for authorization: Oauth2_ClientCredentials
var Oauth2_ClientCredentials = defaultClient.authentications['Oauth2_ClientCredentials'];
Oauth2_ClientCredentials.accessToken = "YOUR ACCESS TOKEN"

var api = new WorkflowApiForCloudFoundry.WorkflowInstancesApi()

var body = ; // {array[WorkflowInstancesUpdatePayload]} Specify the request body according to the given schema.
Note that the length of the request body is limited to ensure optimal operation of the service.


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.v1WorkflowInstancesPatch(body, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class v1WorkflowInstancesPatchExample
    {
        public void main()
        {
            
            // Configure OAuth2 access token for authorization: Oauth2_AuthorizationCode
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
            // Configure OAuth2 access token for authorization: Oauth2_ClientCredentials
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new WorkflowInstancesApi();
            var body = new array[WorkflowInstancesUpdatePayload](); // array[WorkflowInstancesUpdatePayload] | Specify the request body according to the given schema.
Note that the length of the request body is limited to ensure optimal operation of the service.

            try
            {
                // Delete instance by ID
                apiInstance.v1WorkflowInstancesPatch(body);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling WorkflowInstancesApi.v1WorkflowInstancesPatch: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: Oauth2_AuthorizationCode
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
// Configure OAuth2 access token for authorization: Oauth2_ClientCredentials
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new Swagger\Client\Api\WorkflowInstancesApi();
$body = ; // array[WorkflowInstancesUpdatePayload] | Specify the request body according to the given schema.
Note that the length of the request body is limited to ensure optimal operation of the service.

try {
    $api_instance->v1WorkflowInstancesPatch($body);
} catch (Exception $e) {
    echo 'Exception when calling WorkflowInstancesApi->v1WorkflowInstancesPatch: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::WorkflowInstancesApi;

# Configure OAuth2 access token for authorization: Oauth2_AuthorizationCode
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
# Configure OAuth2 access token for authorization: Oauth2_ClientCredentials
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::SwaggerClient::WorkflowInstancesApi->new();
my $body = [WWW::SwaggerClient::Object::array[WorkflowInstancesUpdatePayload]->new()]; # array[WorkflowInstancesUpdatePayload] | Specify the request body according to the given schema.
Note that the length of the request body is limited to ensure optimal operation of the service.

eval { 
    $api_instance->v1WorkflowInstancesPatch(body => $body);
};
if ($@) {
    warn "Exception when calling WorkflowInstancesApi->v1WorkflowInstancesPatch: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: Oauth2_AuthorizationCode
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure OAuth2 access token for authorization: Oauth2_ClientCredentials
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.WorkflowInstancesApi()
body =  # array[WorkflowInstancesUpdatePayload] | Specify the request body according to the given schema.
Note that the length of the request body is limited to ensure optimal operation of the service.

try: 
    # Delete instance by ID
    api_instance.v1WorkflowInstancesPatch(body)
except ApiException as e:
    print("Exception when calling WorkflowInstancesApi->v1WorkflowInstancesPatch: %s\n" % e)

Parameters

Body parameters
Name Description
body *

Specify the request body according to the given schema. Note that the length of the request body is limited to ensure optimal operation of the service.

Responses

Status: 200 - Requested operations were completed successfully. Note: You also receive this response code if you have not requested an operation on any of the workflow instances or if the list of workflow instances was empty.

Status: 202 - The request was successful and corresponding operations with process instances will be performed asynchronously. The response will include the header 'Location' that points to a dedicated resource. Using this resource you can track the status of the operation.

Name Type Format Description
Location String Relative URL that points to a job resource. Using this resource you can track the status of the operation.

Status: 400 - Incorrect format or structure of the provided request body.

{error={code=bpm.workflowruntime.rest.content.format.invalid, message=Unable to parse the request content because it has an unexpected format or structure. The content has to be JSON and follow the documented data structure., logId=e329b2a4-cac7-44d7-b5c5-0494e6fbad5a}}

Status: 401 - Unauthorized. You have not provided valid authentication credentials to access the resource.

{error=unauthorized, error_description=Full authentication is required to access this resource.}

Status: 403 - Access forbidden. You have not the required permissions to access the resource.

{error={message=User does not have sufficient privileges.}}

Status: 422 - The request body contains at least one entry for which you have not provided a workflow instance ID.

Status: 429 - You have reached the usage limits that are configured for your tenant. You are performing too many requests or consume too many resources.

{error={code=bpm.workflowruntime.rate.limit.exceeded, message=Your tenant is performing too many requests.}}

/v1/workflow-instances

Starts a new workflow instance of the provided workflow definition. Specify the ID of the workflow definition in the body. The workflow instance automatically starts based on the latest deployed version of the definition. Roles permitted to execute this operation: - Global roles: WorkflowInitiator - Scope: WORKFLOW_INSTANCE_START


/v1/workflow-instances

Usage

curl -X POST "https://sandbox.api.sap.com/workflow-service/rest/v1/workflow-instances"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.WorkflowInstancesApi;

import java.io.File;
import java.util.*;

public class WorkflowInstancesApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        
        // Configure OAuth2 access token for authorization: Oauth2_AuthorizationCode
        OAuth Oauth2_AuthorizationCode = (OAuth) defaultClient.getAuthentication("Oauth2_AuthorizationCode");
        Oauth2_AuthorizationCode.setAccessToken("YOUR ACCESS TOKEN");

        // Configure OAuth2 access token for authorization: Oauth2_ClientCredentials
        OAuth Oauth2_ClientCredentials = (OAuth) defaultClient.getAuthentication("Oauth2_ClientCredentials");
        Oauth2_ClientCredentials.setAccessToken("YOUR ACCESS TOKEN");

        WorkflowInstancesApi apiInstance = new WorkflowInstancesApi();
        WorkflowInstanceStartPayload body = ; // WorkflowInstanceStartPayload | Specify the request body according to the given schema.
Note that the length of the request body is limited to ensure optimal operation of the service.
        String acceptLanguage = acceptLanguage_example; // String | Provide a preferred language. If a translation is available, relevant texts are returned in this language.
        try {
            WorkflowInstance result = apiInstance.v1WorkflowInstancesPost(body, acceptLanguage);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling WorkflowInstancesApi#v1WorkflowInstancesPost");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.WorkflowInstancesApi;

public class WorkflowInstancesApiExample {

    public static void main(String[] args) {
        WorkflowInstancesApi apiInstance = new WorkflowInstancesApi();
        WorkflowInstanceStartPayload body = ; // WorkflowInstanceStartPayload | Specify the request body according to the given schema.
Note that the length of the request body is limited to ensure optimal operation of the service.
        String acceptLanguage = acceptLanguage_example; // String | Provide a preferred language. If a translation is available, relevant texts are returned in this language.
        try {
            WorkflowInstance result = apiInstance.v1WorkflowInstancesPost(body, acceptLanguage);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling WorkflowInstancesApi#v1WorkflowInstancesPost");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure OAuth2 access token for authorization: (authentication scheme: Oauth2_AuthorizationCode)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];

// Configure OAuth2 access token for authorization: (authentication scheme: Oauth2_ClientCredentials)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];

WorkflowInstanceStartPayload *body = ; // Specify the request body according to the given schema.
Note that the length of the request body is limited to ensure optimal operation of the service.
String *acceptLanguage = acceptLanguage_example; // Provide a preferred language. If a translation is available, relevant texts are returned in this language. (optional)

WorkflowInstancesApi *apiInstance = [[WorkflowInstancesApi alloc] init];

// Start a new instance
[apiInstance v1WorkflowInstancesPostWith:body
    acceptLanguage:acceptLanguage
              completionHandler: ^(WorkflowInstance output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var WorkflowApiForCloudFoundry = require('workflow_api_for_cloud_foundry');
var defaultClient = WorkflowApiForCloudFoundry.ApiClient.instance;

// Configure OAuth2 access token for authorization: Oauth2_AuthorizationCode
var Oauth2_AuthorizationCode = defaultClient.authentications['Oauth2_AuthorizationCode'];
Oauth2_AuthorizationCode.accessToken = "YOUR ACCESS TOKEN"

// Configure OAuth2 access token for authorization: Oauth2_ClientCredentials
var Oauth2_ClientCredentials = defaultClient.authentications['Oauth2_ClientCredentials'];
Oauth2_ClientCredentials.accessToken = "YOUR ACCESS TOKEN"

var api = new WorkflowApiForCloudFoundry.WorkflowInstancesApi()

var body = ; // {WorkflowInstanceStartPayload} Specify the request body according to the given schema.
Note that the length of the request body is limited to ensure optimal operation of the service.

var opts = { 
  'acceptLanguage': acceptLanguage_example // {String} Provide a preferred language. If a translation is available, relevant texts are returned in this language.
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.v1WorkflowInstancesPost(body, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class v1WorkflowInstancesPostExample
    {
        public void main()
        {
            
            // Configure OAuth2 access token for authorization: Oauth2_AuthorizationCode
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
            // Configure OAuth2 access token for authorization: Oauth2_ClientCredentials
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new WorkflowInstancesApi();
            var body = new WorkflowInstanceStartPayload(); // WorkflowInstanceStartPayload | Specify the request body according to the given schema.
Note that the length of the request body is limited to ensure optimal operation of the service.
            var acceptLanguage = acceptLanguage_example;  // String | Provide a preferred language. If a translation is available, relevant texts are returned in this language. (optional) 

            try
            {
                // Start a new instance
                WorkflowInstance result = apiInstance.v1WorkflowInstancesPost(body, acceptLanguage);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling WorkflowInstancesApi.v1WorkflowInstancesPost: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: Oauth2_AuthorizationCode
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
// Configure OAuth2 access token for authorization: Oauth2_ClientCredentials
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new Swagger\Client\Api\WorkflowInstancesApi();
$body = ; // WorkflowInstanceStartPayload | Specify the request body according to the given schema.
Note that the length of the request body is limited to ensure optimal operation of the service.
$acceptLanguage = acceptLanguage_example; // String | Provide a preferred language. If a translation is available, relevant texts are returned in this language.

try {
    $result = $api_instance->v1WorkflowInstancesPost($body, $acceptLanguage);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling WorkflowInstancesApi->v1WorkflowInstancesPost: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::WorkflowInstancesApi;

# Configure OAuth2 access token for authorization: Oauth2_AuthorizationCode
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
# Configure OAuth2 access token for authorization: Oauth2_ClientCredentials
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::SwaggerClient::WorkflowInstancesApi->new();
my $body = WWW::SwaggerClient::Object::WorkflowInstanceStartPayload->new(); # WorkflowInstanceStartPayload | Specify the request body according to the given schema.
Note that the length of the request body is limited to ensure optimal operation of the service.
my $acceptLanguage = acceptLanguage_example; # String | Provide a preferred language. If a translation is available, relevant texts are returned in this language.

eval { 
    my $result = $api_instance->v1WorkflowInstancesPost(body => $body, acceptLanguage => $acceptLanguage);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling WorkflowInstancesApi->v1WorkflowInstancesPost: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: Oauth2_AuthorizationCode
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure OAuth2 access token for authorization: Oauth2_ClientCredentials
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.WorkflowInstancesApi()
body =  # WorkflowInstanceStartPayload | Specify the request body according to the given schema.
Note that the length of the request body is limited to ensure optimal operation of the service.
acceptLanguage = acceptLanguage_example # String | Provide a preferred language. If a translation is available, relevant texts are returned in this language. (optional)

try: 
    # Start a new instance
    api_response = api_instance.v1WorkflowInstancesPost(body, acceptLanguage=acceptLanguage)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling WorkflowInstancesApi->v1WorkflowInstancesPost: %s\n" % e)

Parameters

Header parameters
Name Description
Accept-Language
Body parameters
Name Description
body *

Specify the request body according to the given schema. Note that the length of the request body is limited to ensure optimal operation of the service.

Responses

Status: 201 - Returns the newly created workflow instance.

{id=13, definitionId=LeaveRequestWorkflow, definitionVersion=2, subject=Leave Request for Alice, businessKey=s021445, status=RUNNING, startedAt=2016-11-01T19:59:59.000Z, startedBy=Alice, rootInstanceId=13}

Status: 400 - Incorrect format or structure of the provided request body.

{error={code=bpm.workflowruntime.rest.content.format.invalid, message=Unable to parse the request content because it has an unexpected format or structure. The content has to be JSON and follow the documented data structure., logId=e329b2a4-cac7-44d7-b5c5-0494e6fbad5a}}

Status: 401 - Unauthorized. You have not provided valid authentication credentials to access the resource.

{error=unauthorized, error_description=Full authentication is required to access this resource.}

Status: 403 - Access forbidden. You have not the required permissions to access the resource.

{error={message=User does not have sufficient privileges.}}

Status: 404 - Workflow definition not found. Either the payload does not contain a definitionId property or the specified ID is incorrect.

{error={code=bpm.workflowruntime.rest.definition.not.found, message=Workflow definition not found, logId=1c4daaf5-eb3f-4ff5-8b13-aa32a47bb07d}}

Status: 422 - The workflow context in the request body contains invalid keys or values.

{error={code=bpm.workflowruntime.rest.instance.context.invalid, message=Workflow context could not be set because it contained errors., logId=89462226-6b9e-4cd3-9bea-533cc267e2a4}}

Status: 429 - You have reached the usage limits that are configured for your tenant. You are performing too many requests or consume too many resources.

{error={code=bpm.workflowruntime.rate.limit.exceeded, message=Your tenant is performing too many requests.}}

Status: 500 - Internal server error. The operation you requested led to an error during execution.

{error={code=bpm.workflowruntime.rest.internal.server.error, message=Internal server error, logId=f29a5719-3342-4a4a-8a3d-5ddd5253159e}}

/v1/workflow-instances/{workflowInstanceId}/attachments

Retrieves the attachments information for a workflow instance independent of its status. Roles permitted to execute this operation: - Global roles: WorkflowViewer, WorkflowAdmin - Instance-specific roles: viewerUsers, viewerGroups, adminUsers, adminGroups [Prerequisite: You are assigned to the WorkflowParticipant global role.] - Scope: WORKFLOW_INSTANCE_GET_ATTACHMENTS


/v1/workflow-instances/{workflowInstanceId}/attachments

Usage

curl -X GET "https://sandbox.api.sap.com/workflow-service/rest/v1/workflow-instances/{workflowInstanceId}/attachments"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.WorkflowInstancesApi;

import java.io.File;
import java.util.*;

public class WorkflowInstancesApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        
        // Configure OAuth2 access token for authorization: Oauth2_AuthorizationCode
        OAuth Oauth2_AuthorizationCode = (OAuth) defaultClient.getAuthentication("Oauth2_AuthorizationCode");
        Oauth2_AuthorizationCode.setAccessToken("YOUR ACCESS TOKEN");

        // Configure OAuth2 access token for authorization: Oauth2_ClientCredentials
        OAuth Oauth2_ClientCredentials = (OAuth) defaultClient.getAuthentication("Oauth2_ClientCredentials");
        Oauth2_ClientCredentials.setAccessToken("YOUR ACCESS TOKEN");

        WorkflowInstancesApi apiInstance = new WorkflowInstancesApi();
        String workflowInstanceId = workflowInstanceId_example; // String | The workflow instance ID for which the attachments should be retrieved. The workflow instance ID is 36 characters long.
        try {
            AttachmentsContext result = apiInstance.v1WorkflowInstancesWorkflowInstanceIdAttachmentsGet(workflowInstanceId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling WorkflowInstancesApi#v1WorkflowInstancesWorkflowInstanceIdAttachmentsGet");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.WorkflowInstancesApi;

public class WorkflowInstancesApiExample {

    public static void main(String[] args) {
        WorkflowInstancesApi apiInstance = new WorkflowInstancesApi();
        String workflowInstanceId = workflowInstanceId_example; // String | The workflow instance ID for which the attachments should be retrieved. The workflow instance ID is 36 characters long.
        try {
            AttachmentsContext result = apiInstance.v1WorkflowInstancesWorkflowInstanceIdAttachmentsGet(workflowInstanceId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling WorkflowInstancesApi#v1WorkflowInstancesWorkflowInstanceIdAttachmentsGet");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure OAuth2 access token for authorization: (authentication scheme: Oauth2_AuthorizationCode)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];

// Configure OAuth2 access token for authorization: (authentication scheme: Oauth2_ClientCredentials)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];

String *workflowInstanceId = workflowInstanceId_example; // The workflow instance ID for which the attachments should be retrieved. The workflow instance ID is 36 characters long.

WorkflowInstancesApi *apiInstance = [[WorkflowInstancesApi alloc] init];

// Retrieve instance attachments
[apiInstance v1WorkflowInstancesWorkflowInstanceIdAttachmentsGetWith:workflowInstanceId
              completionHandler: ^(AttachmentsContext output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var WorkflowApiForCloudFoundry = require('workflow_api_for_cloud_foundry');
var defaultClient = WorkflowApiForCloudFoundry.ApiClient.instance;

// Configure OAuth2 access token for authorization: Oauth2_AuthorizationCode
var Oauth2_AuthorizationCode = defaultClient.authentications['Oauth2_AuthorizationCode'];
Oauth2_AuthorizationCode.accessToken = "YOUR ACCESS TOKEN"

// Configure OAuth2 access token for authorization: Oauth2_ClientCredentials
var Oauth2_ClientCredentials = defaultClient.authentications['Oauth2_ClientCredentials'];
Oauth2_ClientCredentials.accessToken = "YOUR ACCESS TOKEN"

var api = new WorkflowApiForCloudFoundry.WorkflowInstancesApi()

var workflowInstanceId = workflowInstanceId_example; // {String} The workflow instance ID for which the attachments should be retrieved. The workflow instance ID is 36 characters long.


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.v1WorkflowInstancesWorkflowInstanceIdAttachmentsGet(workflowInstanceId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class v1WorkflowInstancesWorkflowInstanceIdAttachmentsGetExample
    {
        public void main()
        {
            
            // Configure OAuth2 access token for authorization: Oauth2_AuthorizationCode
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
            // Configure OAuth2 access token for authorization: Oauth2_ClientCredentials
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new WorkflowInstancesApi();
            var workflowInstanceId = workflowInstanceId_example;  // String | The workflow instance ID for which the attachments should be retrieved. The workflow instance ID is 36 characters long.

            try
            {
                // Retrieve instance attachments
                AttachmentsContext result = apiInstance.v1WorkflowInstancesWorkflowInstanceIdAttachmentsGet(workflowInstanceId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling WorkflowInstancesApi.v1WorkflowInstancesWorkflowInstanceIdAttachmentsGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: Oauth2_AuthorizationCode
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
// Configure OAuth2 access token for authorization: Oauth2_ClientCredentials
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new Swagger\Client\Api\WorkflowInstancesApi();
$workflowInstanceId = workflowInstanceId_example; // String | The workflow instance ID for which the attachments should be retrieved. The workflow instance ID is 36 characters long.

try {
    $result = $api_instance->v1WorkflowInstancesWorkflowInstanceIdAttachmentsGet($workflowInstanceId);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling WorkflowInstancesApi->v1WorkflowInstancesWorkflowInstanceIdAttachmentsGet: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::WorkflowInstancesApi;

# Configure OAuth2 access token for authorization: Oauth2_AuthorizationCode
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
# Configure OAuth2 access token for authorization: Oauth2_ClientCredentials
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::SwaggerClient::WorkflowInstancesApi->new();
my $workflowInstanceId = workflowInstanceId_example; # String | The workflow instance ID for which the attachments should be retrieved. The workflow instance ID is 36 characters long.

eval { 
    my $result = $api_instance->v1WorkflowInstancesWorkflowInstanceIdAttachmentsGet(workflowInstanceId => $workflowInstanceId);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling WorkflowInstancesApi->v1WorkflowInstancesWorkflowInstanceIdAttachmentsGet: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: Oauth2_AuthorizationCode
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure OAuth2 access token for authorization: Oauth2_ClientCredentials
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.WorkflowInstancesApi()
workflowInstanceId = workflowInstanceId_example # String | The workflow instance ID for which the attachments should be retrieved. The workflow instance ID is 36 characters long.

try: 
    # Retrieve instance attachments
    api_response = api_instance.v1WorkflowInstancesWorkflowInstanceIdAttachmentsGet(workflowInstanceId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling WorkflowInstancesApi->v1WorkflowInstancesWorkflowInstanceIdAttachmentsGet: %s\n" % e)

Parameters

Path parameters
Name Description
workflowInstanceId*

Responses

Status: 200 - The attachments information of the workflow instance.

{rootFolder=myFolder, groups={group1={folder=folder1, refs=[{objectId=1}, {objectId=2}]}, group2={folder=folder2, refs=[{objectId=3}]}}}

Status: 401 - Unauthorized. You have not provided valid authentication credentials to access the resource.

{error=unauthorized, error_description=Full authentication is required to access this resource.}

Status: 403 - Access forbidden. You have not the required permissions to access the resource.

{error={message=User does not have sufficient privileges.}}

Status: 404 - URL not found. Check whether the URL is correct and whether you refer to an existing workflow instance.

{error={code=bpm.workflowruntime.rest.instance.not.found, message=Workflow instance not found, logId=dc68239e-3ad4-442a-8343-cc197f69d05f}}

Status: 429 - You have reached the usage limits that are configured for your tenant. You are performing too many requests or consume too many resources.

{error={code=bpm.workflowruntime.rate.limit.exceeded, message=Your tenant is performing too many requests.}}

Status: 500 - Internal server error. The operation you requested led to an error during execution.

{error={code=bpm.workflowruntime.rest.internal.server.error, message=Internal server error, logId=f29a5719-3342-4a4a-8a3d-5ddd5253159e}}

/v1/workflow-instances/{workflowInstanceId}/attachments

Overrides the attachments information for a workflow instance independent of its status. Take special care when using this API, because it will override the workflow attachments, that is, it might change the workflow in ways that are incompatible with the expectations of the tasks in the workflow definition. Before changing, we recommend that you suspend the workflow instance and check that the execution has come to a halt, that is, no further steps are being added to the execution log. Roles permitted to execute this operation: - Global roles: WorkflowAdmin - Instance-specific roles: adminUsers, adminGroups [Prerequisite: You are assigned to the WorkflowParticipant global role.] - Scope: WORKFLOW_INSTANCE_UPDATE_ATTACHMENTS


/v1/workflow-instances/{workflowInstanceId}/attachments

Usage

curl -X PUT "https://sandbox.api.sap.com/workflow-service/rest/v1/workflow-instances/{workflowInstanceId}/attachments"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.WorkflowInstancesApi;

import java.io.File;
import java.util.*;

public class WorkflowInstancesApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        
        // Configure OAuth2 access token for authorization: Oauth2_AuthorizationCode
        OAuth Oauth2_AuthorizationCode = (OAuth) defaultClient.getAuthentication("Oauth2_AuthorizationCode");
        Oauth2_AuthorizationCode.setAccessToken("YOUR ACCESS TOKEN");

        // Configure OAuth2 access token for authorization: Oauth2_ClientCredentials
        OAuth Oauth2_ClientCredentials = (OAuth) defaultClient.getAuthentication("Oauth2_ClientCredentials");
        Oauth2_ClientCredentials.setAccessToken("YOUR ACCESS TOKEN");

        WorkflowInstancesApi apiInstance = new WorkflowInstancesApi();
        String workflowInstanceId = workflowInstanceId_example; // String | Specify the workflow instance ID for which the attachments should be overridden. The workflow instance ID is 36 characters long.
        AttachmentsContext body = ; // AttachmentsContext | Specify the new information according to the given schema.
        try {
            apiInstance.v1WorkflowInstancesWorkflowInstanceIdAttachmentsPut(workflowInstanceId, body);
        } catch (ApiException e) {
            System.err.println("Exception when calling WorkflowInstancesApi#v1WorkflowInstancesWorkflowInstanceIdAttachmentsPut");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.WorkflowInstancesApi;

public class WorkflowInstancesApiExample {

    public static void main(String[] args) {
        WorkflowInstancesApi apiInstance = new WorkflowInstancesApi();
        String workflowInstanceId = workflowInstanceId_example; // String | Specify the workflow instance ID for which the attachments should be overridden. The workflow instance ID is 36 characters long.
        AttachmentsContext body = ; // AttachmentsContext | Specify the new information according to the given schema.
        try {
            apiInstance.v1WorkflowInstancesWorkflowInstanceIdAttachmentsPut(workflowInstanceId, body);
        } catch (ApiException e) {
            System.err.println("Exception when calling WorkflowInstancesApi#v1WorkflowInstancesWorkflowInstanceIdAttachmentsPut");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure OAuth2 access token for authorization: (authentication scheme: Oauth2_AuthorizationCode)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];

// Configure OAuth2 access token for authorization: (authentication scheme: Oauth2_ClientCredentials)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];

String *workflowInstanceId = workflowInstanceId_example; // Specify the workflow instance ID for which the attachments should be overridden. The workflow instance ID is 36 characters long.
AttachmentsContext *body = ; // Specify the new information according to the given schema.

WorkflowInstancesApi *apiInstance = [[WorkflowInstancesApi alloc] init];

// Overwrite instance attachments
[apiInstance v1WorkflowInstancesWorkflowInstanceIdAttachmentsPutWith:workflowInstanceId
    body:body
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var WorkflowApiForCloudFoundry = require('workflow_api_for_cloud_foundry');
var defaultClient = WorkflowApiForCloudFoundry.ApiClient.instance;

// Configure OAuth2 access token for authorization: Oauth2_AuthorizationCode
var Oauth2_AuthorizationCode = defaultClient.authentications['Oauth2_AuthorizationCode'];
Oauth2_AuthorizationCode.accessToken = "YOUR ACCESS TOKEN"

// Configure OAuth2 access token for authorization: Oauth2_ClientCredentials
var Oauth2_ClientCredentials = defaultClient.authentications['Oauth2_ClientCredentials'];
Oauth2_ClientCredentials.accessToken = "YOUR ACCESS TOKEN"

var api = new WorkflowApiForCloudFoundry.WorkflowInstancesApi()

var workflowInstanceId = workflowInstanceId_example; // {String} Specify the workflow instance ID for which the attachments should be overridden. The workflow instance ID is 36 characters long.

var body = ; // {AttachmentsContext} Specify the new information according to the given schema.


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.v1WorkflowInstancesWorkflowInstanceIdAttachmentsPut(workflowInstanceId, body, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class v1WorkflowInstancesWorkflowInstanceIdAttachmentsPutExample
    {
        public void main()
        {
            
            // Configure OAuth2 access token for authorization: Oauth2_AuthorizationCode
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
            // Configure OAuth2 access token for authorization: Oauth2_ClientCredentials
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new WorkflowInstancesApi();
            var workflowInstanceId = workflowInstanceId_example;  // String | Specify the workflow instance ID for which the attachments should be overridden. The workflow instance ID is 36 characters long.
            var body = new AttachmentsContext(); // AttachmentsContext | Specify the new information according to the given schema.

            try
            {
                // Overwrite instance attachments
                apiInstance.v1WorkflowInstancesWorkflowInstanceIdAttachmentsPut(workflowInstanceId, body);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling WorkflowInstancesApi.v1WorkflowInstancesWorkflowInstanceIdAttachmentsPut: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: Oauth2_AuthorizationCode
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
// Configure OAuth2 access token for authorization: Oauth2_ClientCredentials
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new Swagger\Client\Api\WorkflowInstancesApi();
$workflowInstanceId = workflowInstanceId_example; // String | Specify the workflow instance ID for which the attachments should be overridden. The workflow instance ID is 36 characters long.
$body = ; // AttachmentsContext | Specify the new information according to the given schema.

try {
    $api_instance->v1WorkflowInstancesWorkflowInstanceIdAttachmentsPut($workflowInstanceId, $body);
} catch (Exception $e) {
    echo 'Exception when calling WorkflowInstancesApi->v1WorkflowInstancesWorkflowInstanceIdAttachmentsPut: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::WorkflowInstancesApi;

# Configure OAuth2 access token for authorization: Oauth2_AuthorizationCode
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
# Configure OAuth2 access token for authorization: Oauth2_ClientCredentials
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::SwaggerClient::WorkflowInstancesApi->new();
my $workflowInstanceId = workflowInstanceId_example; # String | Specify the workflow instance ID for which the attachments should be overridden. The workflow instance ID is 36 characters long.
my $body = WWW::SwaggerClient::Object::AttachmentsContext->new(); # AttachmentsContext | Specify the new information according to the given schema.

eval { 
    $api_instance->v1WorkflowInstancesWorkflowInstanceIdAttachmentsPut(workflowInstanceId => $workflowInstanceId, body => $body);
};
if ($@) {
    warn "Exception when calling WorkflowInstancesApi->v1WorkflowInstancesWorkflowInstanceIdAttachmentsPut: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: Oauth2_AuthorizationCode
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure OAuth2 access token for authorization: Oauth2_ClientCredentials
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.WorkflowInstancesApi()
workflowInstanceId = workflowInstanceId_example # String | Specify the workflow instance ID for which the attachments should be overridden. The workflow instance ID is 36 characters long.
body =  # AttachmentsContext | Specify the new information according to the given schema.

try: 
    # Overwrite instance attachments
    api_instance.v1WorkflowInstancesWorkflowInstanceIdAttachmentsPut(workflowInstanceId, body)
except ApiException as e:
    print("Exception when calling WorkflowInstancesApi->v1WorkflowInstancesWorkflowInstanceIdAttachmentsPut: %s\n" % e)

Parameters

Path parameters
Name Description
workflowInstanceId*
Body parameters
Name Description
body *

Specify the new information according to the given schema.

Responses

Status: 204 - The attachments information has been updated.

Status: 401 - Unauthorized. You have not provided valid authentication credentials to access the resource.

{error=unauthorized, error_description=Full authentication is required to access this resource.}

Status: 403 - Access forbidden. You have not the required permissions to access the resource.

{error={message=User does not have sufficient privileges.}}

Status: 404 - URL not found. Check whether the URL is correct and whether you refer to an existing workflow instance.

{error={code=bpm.workflowruntime.rest.instance.not.found, message=Workflow instance not found, logId=dc68239e-3ad4-442a-8343-cc197f69d05f}}

Status: 409 - The operation could not be executed because of another activity in the background. Please try again later.

{error={message=The operation could not be executed because of another activity in the background. Please try again later., logId=04a14146-dea3-493f-892c-3cb1dea7b122}}

Status: 429 - You have reached the usage limits that are configured for your tenant. You are performing too many requests or consume too many resources.

{error={code=bpm.workflowruntime.rate.limit.exceeded, message=Your tenant is performing too many requests.}}

Status: 500 - Internal server error. The operation you requested led to an error during execution.

{error={code=bpm.workflowruntime.rest.internal.server.error, message=Internal server error, logId=f29a5719-3342-4a4a-8a3d-5ddd5253159e}}

/v1/workflow-instances/{workflowInstanceId}/attributes

Retrieves custom workflow attributes for a workflow instance. Labels as well as the order of the custom workflow attributes in which they are returned, are taken from the latest versions of the workflow definitions where these attributes are present. Roles permitted to execute this operation: - Global roles: WorkflowViewer, WorkflowAdmin - Instance-specific roles: viewerUsers, viewerGroups, adminUsers, adminGroups [Prerequisite: You are assigned to the WorkflowParticipant global role.] - Scope: WORKFLOW_INSTANCE_GET_ATTRIBUTES


/v1/workflow-instances/{workflowInstanceId}/attributes

Usage

curl -X GET "https://sandbox.api.sap.com/workflow-service/rest/v1/workflow-instances/{workflowInstanceId}/attributes"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.WorkflowInstancesApi;

import java.io.File;
import java.util.*;

public class WorkflowInstancesApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        
        // Configure OAuth2 access token for authorization: Oauth2_AuthorizationCode
        OAuth Oauth2_AuthorizationCode = (OAuth) defaultClient.getAuthentication("Oauth2_AuthorizationCode");
        Oauth2_AuthorizationCode.setAccessToken("YOUR ACCESS TOKEN");

        // Configure OAuth2 access token for authorization: Oauth2_ClientCredentials
        OAuth Oauth2_ClientCredentials = (OAuth) defaultClient.getAuthentication("Oauth2_ClientCredentials");
        Oauth2_ClientCredentials.setAccessToken("YOUR ACCESS TOKEN");

        WorkflowInstancesApi apiInstance = new WorkflowInstancesApi();
        String workflowInstanceId = workflowInstanceId_example; // String | The ID of the workflow instance for which the custom workflow attributes should be retrieved. The ID is 36 characters long.
        String acceptLanguage = acceptLanguage_example; // String | Provide a preferred language. If a translation is available, relevant texts are returned in this language.
        try {
            array[CustomAttribute] result = apiInstance.v1WorkflowInstancesWorkflowInstanceIdAttributesGet(workflowInstanceId, acceptLanguage);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling WorkflowInstancesApi#v1WorkflowInstancesWorkflowInstanceIdAttributesGet");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.WorkflowInstancesApi;

public class WorkflowInstancesApiExample {

    public static void main(String[] args) {
        WorkflowInstancesApi apiInstance = new WorkflowInstancesApi();
        String workflowInstanceId = workflowInstanceId_example; // String | The ID of the workflow instance for which the custom workflow attributes should be retrieved. The ID is 36 characters long.
        String acceptLanguage = acceptLanguage_example; // String | Provide a preferred language. If a translation is available, relevant texts are returned in this language.
        try {
            array[CustomAttribute] result = apiInstance.v1WorkflowInstancesWorkflowInstanceIdAttributesGet(workflowInstanceId, acceptLanguage);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling WorkflowInstancesApi#v1WorkflowInstancesWorkflowInstanceIdAttributesGet");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure OAuth2 access token for authorization: (authentication scheme: Oauth2_AuthorizationCode)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];

// Configure OAuth2 access token for authorization: (authentication scheme: Oauth2_ClientCredentials)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];

String *workflowInstanceId = workflowInstanceId_example; // The ID of the workflow instance for which the custom workflow attributes should be retrieved. The ID is 36 characters long.
String *acceptLanguage = acceptLanguage_example; // Provide a preferred language. If a translation is available, relevant texts are returned in this language. (optional)

WorkflowInstancesApi *apiInstance = [[WorkflowInstancesApi alloc] init];

// Retrieve custom workflow attributes by workflow instance ID
[apiInstance v1WorkflowInstancesWorkflowInstanceIdAttributesGetWith:workflowInstanceId
    acceptLanguage:acceptLanguage
              completionHandler: ^(array[CustomAttribute] output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var WorkflowApiForCloudFoundry = require('workflow_api_for_cloud_foundry');
var defaultClient = WorkflowApiForCloudFoundry.ApiClient.instance;

// Configure OAuth2 access token for authorization: Oauth2_AuthorizationCode
var Oauth2_AuthorizationCode = defaultClient.authentications['Oauth2_AuthorizationCode'];
Oauth2_AuthorizationCode.accessToken = "YOUR ACCESS TOKEN"

// Configure OAuth2 access token for authorization: Oauth2_ClientCredentials
var Oauth2_ClientCredentials = defaultClient.authentications['Oauth2_ClientCredentials'];
Oauth2_ClientCredentials.accessToken = "YOUR ACCESS TOKEN"

var api = new WorkflowApiForCloudFoundry.WorkflowInstancesApi()

var workflowInstanceId = workflowInstanceId_example; // {String} The ID of the workflow instance for which the custom workflow attributes should be retrieved. The ID is 36 characters long.

var opts = { 
  'acceptLanguage': acceptLanguage_example // {String} Provide a preferred language. If a translation is available, relevant texts are returned in this language.
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.v1WorkflowInstancesWorkflowInstanceIdAttributesGet(workflowInstanceId, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class v1WorkflowInstancesWorkflowInstanceIdAttributesGetExample
    {
        public void main()
        {
            
            // Configure OAuth2 access token for authorization: Oauth2_AuthorizationCode
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
            // Configure OAuth2 access token for authorization: Oauth2_ClientCredentials
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new WorkflowInstancesApi();
            var workflowInstanceId = workflowInstanceId_example;  // String | The ID of the workflow instance for which the custom workflow attributes should be retrieved. The ID is 36 characters long.
            var acceptLanguage = acceptLanguage_example;  // String | Provide a preferred language. If a translation is available, relevant texts are returned in this language. (optional) 

            try
            {
                // Retrieve custom workflow attributes by workflow instance ID
                array[CustomAttribute] result = apiInstance.v1WorkflowInstancesWorkflowInstanceIdAttributesGet(workflowInstanceId, acceptLanguage);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling WorkflowInstancesApi.v1WorkflowInstancesWorkflowInstanceIdAttributesGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: Oauth2_AuthorizationCode
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
// Configure OAuth2 access token for authorization: Oauth2_ClientCredentials
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new Swagger\Client\Api\WorkflowInstancesApi();
$workflowInstanceId = workflowInstanceId_example; // String | The ID of the workflow instance for which the custom workflow attributes should be retrieved. The ID is 36 characters long.
$acceptLanguage = acceptLanguage_example; // String | Provide a preferred language. If a translation is available, relevant texts are returned in this language.

try {
    $result = $api_instance->v1WorkflowInstancesWorkflowInstanceIdAttributesGet($workflowInstanceId, $acceptLanguage);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling WorkflowInstancesApi->v1WorkflowInstancesWorkflowInstanceIdAttributesGet: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::WorkflowInstancesApi;

# Configure OAuth2 access token for authorization: Oauth2_AuthorizationCode
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
# Configure OAuth2 access token for authorization: Oauth2_ClientCredentials
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::SwaggerClient::WorkflowInstancesApi->new();
my $workflowInstanceId = workflowInstanceId_example; # String | The ID of the workflow instance for which the custom workflow attributes should be retrieved. The ID is 36 characters long.
my $acceptLanguage = acceptLanguage_example; # String | Provide a preferred language. If a translation is available, relevant texts are returned in this language.

eval { 
    my $result = $api_instance->v1WorkflowInstancesWorkflowInstanceIdAttributesGet(workflowInstanceId => $workflowInstanceId, acceptLanguage => $acceptLanguage);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling WorkflowInstancesApi->v1WorkflowInstancesWorkflowInstanceIdAttributesGet: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: Oauth2_AuthorizationCode
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure OAuth2 access token for authorization: Oauth2_ClientCredentials
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.WorkflowInstancesApi()
workflowInstanceId = workflowInstanceId_example # String | The ID of the workflow instance for which the custom workflow attributes should be retrieved. The ID is 36 characters long.
acceptLanguage = acceptLanguage_example # String | Provide a preferred language. If a translation is available, relevant texts are returned in this language. (optional)

try: 
    # Retrieve custom workflow attributes by workflow instance ID
    api_response = api_instance.v1WorkflowInstancesWorkflowInstanceIdAttributesGet(workflowInstanceId, acceptLanguage=acceptLanguage)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling WorkflowInstancesApi->v1WorkflowInstancesWorkflowInstanceIdAttributesGet: %s\n" % e)

Parameters

Path parameters
Name Description
workflowInstanceId*
Header parameters
Name Description
Accept-Language

Responses

Status: 200 - Returns the custom workflow attributes for the requested workflow instance.

[{id=ExampleCustomAttribute, label=Example of custom attribute, value=PRO_247, type=string}, {id=Cur, label=Currency, value=EUR, type=string}]

Status: 401 - Unauthorized. You have not provided valid authentication credentials to access the resource.

{error=unauthorized, error_description=Full authentication is required to access this resource.}

Status: 403 - Access forbidden. You have not the required permissions to access the resource.

{error={message=User does not have sufficient privileges.}}

Status: 404 - URL not found. Check whether the URL is correct and whether you refer to an existing workflow instance.

{error={code=bpm.workflowruntime.rest.instance.not.found, message=Workflow instance not found, logId=dc68239e-3ad4-442a-8343-cc197f69d05f}}

Status: 429 - You have reached the usage limits that are configured for your tenant. You are performing too many requests or consume too many resources.

{error={code=bpm.workflowruntime.rate.limit.exceeded, message=Your tenant is performing too many requests.}}

Status: 500 - Internal server error. The operation you requested led to an error during execution.

{error={code=bpm.workflowruntime.rest.internal.server.error, message=Internal server error, logId=f29a5719-3342-4a4a-8a3d-5ddd5253159e}}

/v1/workflow-instances/{workflowInstanceId}/context

Retrieves the context for a workflow instance independent of its status. Roles permitted to execute this operation: - Global roles: WorkflowContextViewer, WorkflowContextAdmin - Instance-specific roles: contextViewerUsers, contextViewerGroups, contextAdminUsers, contextAdminGroups [Prerequisite: You are assigned to the WorkflowParticipant global role.] - Scope: WORKFLOW_INSTANCE_GET_CONTEXT


/v1/workflow-instances/{workflowInstanceId}/context

Usage

curl -X GET "https://sandbox.api.sap.com/workflow-service/rest/v1/workflow-instances/{workflowInstanceId}/context"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.WorkflowInstancesApi;

import java.io.File;
import java.util.*;

public class WorkflowInstancesApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        
        // Configure OAuth2 access token for authorization: Oauth2_AuthorizationCode
        OAuth Oauth2_AuthorizationCode = (OAuth) defaultClient.getAuthentication("Oauth2_AuthorizationCode");
        Oauth2_AuthorizationCode.setAccessToken("YOUR ACCESS TOKEN");

        // Configure OAuth2 access token for authorization: Oauth2_ClientCredentials
        OAuth Oauth2_ClientCredentials = (OAuth) defaultClient.getAuthentication("Oauth2_ClientCredentials");
        Oauth2_ClientCredentials.setAccessToken("YOUR ACCESS TOKEN");

        WorkflowInstancesApi apiInstance = new WorkflowInstancesApi();
        String workflowInstanceId = workflowInstanceId_example; // String | The workflow instance ID for which the context should be retrieved. The workflow instance ID is 36 characters long.
        try {
            Object result = apiInstance.v1WorkflowInstancesWorkflowInstanceIdContextGet(workflowInstanceId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling WorkflowInstancesApi#v1WorkflowInstancesWorkflowInstanceIdContextGet");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.WorkflowInstancesApi;

public class WorkflowInstancesApiExample {

    public static void main(String[] args) {
        WorkflowInstancesApi apiInstance = new WorkflowInstancesApi();
        String workflowInstanceId = workflowInstanceId_example; // String | The workflow instance ID for which the context should be retrieved. The workflow instance ID is 36 characters long.
        try {
            Object result = apiInstance.v1WorkflowInstancesWorkflowInstanceIdContextGet(workflowInstanceId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling WorkflowInstancesApi#v1WorkflowInstancesWorkflowInstanceIdContextGet");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure OAuth2 access token for authorization: (authentication scheme: Oauth2_AuthorizationCode)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];

// Configure OAuth2 access token for authorization: (authentication scheme: Oauth2_ClientCredentials)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];

String *workflowInstanceId = workflowInstanceId_example; // The workflow instance ID for which the context should be retrieved. The workflow instance ID is 36 characters long.

WorkflowInstancesApi *apiInstance = [[WorkflowInstancesApi alloc] init];

// Retrieve instance context
[apiInstance v1WorkflowInstancesWorkflowInstanceIdContextGetWith:workflowInstanceId
              completionHandler: ^(Object output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var WorkflowApiForCloudFoundry = require('workflow_api_for_cloud_foundry');
var defaultClient = WorkflowApiForCloudFoundry.ApiClient.instance;

// Configure OAuth2 access token for authorization: Oauth2_AuthorizationCode
var Oauth2_AuthorizationCode = defaultClient.authentications['Oauth2_AuthorizationCode'];
Oauth2_AuthorizationCode.accessToken = "YOUR ACCESS TOKEN"

// Configure OAuth2 access token for authorization: Oauth2_ClientCredentials
var Oauth2_ClientCredentials = defaultClient.authentications['Oauth2_ClientCredentials'];
Oauth2_ClientCredentials.accessToken = "YOUR ACCESS TOKEN"

var api = new WorkflowApiForCloudFoundry.WorkflowInstancesApi()

var workflowInstanceId = workflowInstanceId_example; // {String} The workflow instance ID for which the context should be retrieved. The workflow instance ID is 36 characters long.


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.v1WorkflowInstancesWorkflowInstanceIdContextGet(workflowInstanceId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class v1WorkflowInstancesWorkflowInstanceIdContextGetExample
    {
        public void main()
        {
            
            // Configure OAuth2 access token for authorization: Oauth2_AuthorizationCode
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
            // Configure OAuth2 access token for authorization: Oauth2_ClientCredentials
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new WorkflowInstancesApi();
            var workflowInstanceId = workflowInstanceId_example;  // String | The workflow instance ID for which the context should be retrieved. The workflow instance ID is 36 characters long.

            try
            {
                // Retrieve instance context
                Object result = apiInstance.v1WorkflowInstancesWorkflowInstanceIdContextGet(workflowInstanceId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling WorkflowInstancesApi.v1WorkflowInstancesWorkflowInstanceIdContextGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: Oauth2_AuthorizationCode
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
// Configure OAuth2 access token for authorization: Oauth2_ClientCredentials
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new Swagger\Client\Api\WorkflowInstancesApi();
$workflowInstanceId = workflowInstanceId_example; // String | The workflow instance ID for which the context should be retrieved. The workflow instance ID is 36 characters long.

try {
    $result = $api_instance->v1WorkflowInstancesWorkflowInstanceIdContextGet($workflowInstanceId);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling WorkflowInstancesApi->v1WorkflowInstancesWorkflowInstanceIdContextGet: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::WorkflowInstancesApi;

# Configure OAuth2 access token for authorization: Oauth2_AuthorizationCode
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
# Configure OAuth2 access token for authorization: Oauth2_ClientCredentials
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::SwaggerClient::WorkflowInstancesApi->new();
my $workflowInstanceId = workflowInstanceId_example; # String | The workflow instance ID for which the context should be retrieved. The workflow instance ID is 36 characters long.

eval { 
    my $result = $api_instance->v1WorkflowInstancesWorkflowInstanceIdContextGet(workflowInstanceId => $workflowInstanceId);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling WorkflowInstancesApi->v1WorkflowInstancesWorkflowInstanceIdContextGet: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: Oauth2_AuthorizationCode
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure OAuth2 access token for authorization: Oauth2_ClientCredentials
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.WorkflowInstancesApi()
workflowInstanceId = workflowInstanceId_example # String | The workflow instance ID for which the context should be retrieved. The workflow instance ID is 36 characters long.

try: 
    # Retrieve instance context
    api_response = api_instance.v1WorkflowInstancesWorkflowInstanceIdContextGet(workflowInstanceId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling WorkflowInstancesApi->v1WorkflowInstancesWorkflowInstanceIdContextGet: %s\n" % e)

Parameters

Path parameters
Name Description
workflowInstanceId*

Responses

Status: 200 - Returns the context of the workflow instance.

{aString=hello world!, aBoolean=true, aShort=200, aInteger=20000, aLong=2000000000, aDouble=1.5, aDate=2012-04-23T18:25:43.511Z}

Status: 401 - Unauthorized. You have not provided valid authentication credentials to access the resource.

{error=unauthorized, error_description=Full authentication is required to access this resource.}

Status: 403 - Access forbidden. You have not the required permissions to access the resource.

{error={message=User does not have sufficient privileges.}}

Status: 404 - URL not found. Check whether the URL is correct and whether you refer to an existing workflow instance.

{error={code=bpm.workflowruntime.rest.instance.not.found, message=Workflow instance not found, logId=dc68239e-3ad4-442a-8343-cc197f69d05f}}

Status: 429 - You have reached the usage limits that are configured for your tenant. You are performing too many requests or consume too many resources.

{error={code=bpm.workflowruntime.rate.limit.exceeded, message=Your tenant is performing too many requests.}}

Status: 500 - Internal server error. The operation you requested led to an error during execution.

{error={code=bpm.workflowruntime.rest.internal.server.error, message=Internal server error, logId=f29a5719-3342-4a4a-8a3d-5ddd5253159e}}

/v1/workflow-instances/{workflowInstanceId}/context

Modifies parts of the context for a workflow instance independent of its status. Take special care when using this API, because it might change the workflow context in ways that are incompatible with the expectations of the tasks in the workflow definition. Before changing the context, we recommend that you suspend the workflow instance and make sure that the execution has come to a halt, that is, that no further steps are being added to the execution log. Refer to PATCH on the parent resource and GET on the 'execution-logs' sibling resource. Roles permitted to execute this operation: - Global roles: WorkflowContextAdmin - Instance-specific roles: contextAdminUsers, contextAdminGroups [Prerequisite: You are assigned to the WorkflowParticipant global role.] - Scope: WORKFLOW_INSTANCE_UPDATE_CONTEXT


/v1/workflow-instances/{workflowInstanceId}/context

Usage

curl -X PATCH "https://sandbox.api.sap.com/workflow-service/rest/v1/workflow-instances/{workflowInstanceId}/context"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.WorkflowInstancesApi;

import java.io.File;
import java.util.*;

public class WorkflowInstancesApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        
        // Configure OAuth2 access token for authorization: Oauth2_AuthorizationCode
        OAuth Oauth2_AuthorizationCode = (OAuth) defaultClient.getAuthentication("Oauth2_AuthorizationCode");
        Oauth2_AuthorizationCode.setAccessToken("YOUR ACCESS TOKEN");

        // Configure OAuth2 access token for authorization: Oauth2_ClientCredentials
        OAuth Oauth2_ClientCredentials = (OAuth) defaultClient.getAuthentication("Oauth2_ClientCredentials");
        Oauth2_ClientCredentials.setAccessToken("YOUR ACCESS TOKEN");

        WorkflowInstancesApi apiInstance = new WorkflowInstancesApi();
        String workflowInstanceId = workflowInstanceId_example; // String | Specify the workflow instance ID for which the context should be modified. The workflow instance ID is 36 characters long.
        Object body = ; // Object | Specify the modified parts of the context.
Note that the modification is limited by the allowed content length of the request body. The length is restricted to ensure optimal operation of the service.
        try {
            apiInstance.v1WorkflowInstancesWorkflowInstanceIdContextPatch(workflowInstanceId, body);
        } catch (ApiException e) {
            System.err.println("Exception when calling WorkflowInstancesApi#v1WorkflowInstancesWorkflowInstanceIdContextPatch");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.WorkflowInstancesApi;

public class WorkflowInstancesApiExample {

    public static void main(String[] args) {
        WorkflowInstancesApi apiInstance = new WorkflowInstancesApi();
        String workflowInstanceId = workflowInstanceId_example; // String | Specify the workflow instance ID for which the context should be modified. The workflow instance ID is 36 characters long.
        Object body = ; // Object | Specify the modified parts of the context.
Note that the modification is limited by the allowed content length of the request body. The length is restricted to ensure optimal operation of the service.
        try {
            apiInstance.v1WorkflowInstancesWorkflowInstanceIdContextPatch(workflowInstanceId, body);
        } catch (ApiException e) {
            System.err.println("Exception when calling WorkflowInstancesApi#v1WorkflowInstancesWorkflowInstanceIdContextPatch");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure OAuth2 access token for authorization: (authentication scheme: Oauth2_AuthorizationCode)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];

// Configure OAuth2 access token for authorization: (authentication scheme: Oauth2_ClientCredentials)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];

String *workflowInstanceId = workflowInstanceId_example; // Specify the workflow instance ID for which the context should be modified. The workflow instance ID is 36 characters long.
Object *body = ; // Specify the modified parts of the context.
Note that the modification is limited by the allowed content length of the request body. The length is restricted to ensure optimal operation of the service.

WorkflowInstancesApi *apiInstance = [[WorkflowInstancesApi alloc] init];

// Update instance context
[apiInstance v1WorkflowInstancesWorkflowInstanceIdContextPatchWith:workflowInstanceId
    body:body
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var WorkflowApiForCloudFoundry = require('workflow_api_for_cloud_foundry');
var defaultClient = WorkflowApiForCloudFoundry.ApiClient.instance;

// Configure OAuth2 access token for authorization: Oauth2_AuthorizationCode
var Oauth2_AuthorizationCode = defaultClient.authentications['Oauth2_AuthorizationCode'];
Oauth2_AuthorizationCode.accessToken = "YOUR ACCESS TOKEN"

// Configure OAuth2 access token for authorization: Oauth2_ClientCredentials
var Oauth2_ClientCredentials = defaultClient.authentications['Oauth2_ClientCredentials'];
Oauth2_ClientCredentials.accessToken = "YOUR ACCESS TOKEN"

var api = new WorkflowApiForCloudFoundry.WorkflowInstancesApi()

var workflowInstanceId = workflowInstanceId_example; // {String} Specify the workflow instance ID for which the context should be modified. The workflow instance ID is 36 characters long.

var body = ; // {Object} Specify the modified parts of the context.
Note that the modification is limited by the allowed content length of the request body. The length is restricted to ensure optimal operation of the service.


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.v1WorkflowInstancesWorkflowInstanceIdContextPatch(workflowInstanceId, body, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class v1WorkflowInstancesWorkflowInstanceIdContextPatchExample
    {
        public void main()
        {
            
            // Configure OAuth2 access token for authorization: Oauth2_AuthorizationCode
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
            // Configure OAuth2 access token for authorization: Oauth2_ClientCredentials
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new WorkflowInstancesApi();
            var workflowInstanceId = workflowInstanceId_example;  // String | Specify the workflow instance ID for which the context should be modified. The workflow instance ID is 36 characters long.
            var body = new Object(); // Object | Specify the modified parts of the context.
Note that the modification is limited by the allowed content length of the request body. The length is restricted to ensure optimal operation of the service.

            try
            {
                // Update instance context
                apiInstance.v1WorkflowInstancesWorkflowInstanceIdContextPatch(workflowInstanceId, body);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling WorkflowInstancesApi.v1WorkflowInstancesWorkflowInstanceIdContextPatch: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: Oauth2_AuthorizationCode
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
// Configure OAuth2 access token for authorization: Oauth2_ClientCredentials
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new Swagger\Client\Api\WorkflowInstancesApi();
$workflowInstanceId = workflowInstanceId_example; // String | Specify the workflow instance ID for which the context should be modified. The workflow instance ID is 36 characters long.
$body = ; // Object | Specify the modified parts of the context.
Note that the modification is limited by the allowed content length of the request body. The length is restricted to ensure optimal operation of the service.

try {
    $api_instance->v1WorkflowInstancesWorkflowInstanceIdContextPatch($workflowInstanceId, $body);
} catch (Exception $e) {
    echo 'Exception when calling WorkflowInstancesApi->v1WorkflowInstancesWorkflowInstanceIdContextPatch: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::WorkflowInstancesApi;

# Configure OAuth2 access token for authorization: Oauth2_AuthorizationCode
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
# Configure OAuth2 access token for authorization: Oauth2_ClientCredentials
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::SwaggerClient::WorkflowInstancesApi->new();
my $workflowInstanceId = workflowInstanceId_example; # String | Specify the workflow instance ID for which the context should be modified. The workflow instance ID is 36 characters long.
my $body = WWW::SwaggerClient::Object::Object->new(); # Object | Specify the modified parts of the context.
Note that the modification is limited by the allowed content length of the request body. The length is restricted to ensure optimal operation of the service.

eval { 
    $api_instance->v1WorkflowInstancesWorkflowInstanceIdContextPatch(workflowInstanceId => $workflowInstanceId, body => $body);
};
if ($@) {
    warn "Exception when calling WorkflowInstancesApi->v1WorkflowInstancesWorkflowInstanceIdContextPatch: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: Oauth2_AuthorizationCode
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure OAuth2 access token for authorization: Oauth2_ClientCredentials
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.WorkflowInstancesApi()
workflowInstanceId = workflowInstanceId_example # String | Specify the workflow instance ID for which the context should be modified. The workflow instance ID is 36 characters long.
body =  # Object | Specify the modified parts of the context.
Note that the modification is limited by the allowed content length of the request body. The length is restricted to ensure optimal operation of the service.

try: 
    # Update instance context
    api_instance.v1WorkflowInstancesWorkflowInstanceIdContextPatch(workflowInstanceId, body)
except ApiException as e:
    print("Exception when calling WorkflowInstancesApi->v1WorkflowInstancesWorkflowInstanceIdContextPatch: %s\n" % e)

Parameters

Path parameters
Name Description
workflowInstanceId*
Body parameters
Name Description
body *

Specify the modified parts of the context. Note that the modification is limited by the allowed content length of the request body. The length is restricted to ensure optimal operation of the service.

Responses

Status: 204 - The context has been updated.

Status: 401 - Unauthorized. You have not provided valid authentication credentials to access the resource.

{error=unauthorized, error_description=Full authentication is required to access this resource.}

Status: 403 - Access forbidden. You have not the required permissions to access the resource.

{error={message=User does not have sufficient privileges.}}

Status: 404 - URL not found. Check whether the URL is correct and whether you refer to an existing workflow instance.

{error={code=bpm.workflowruntime.rest.instance.not.found, message=Workflow instance not found, logId=dc68239e-3ad4-442a-8343-cc197f69d05f}}

Status: 409 - The operation could not be executed because of another activity in the background. Please try again later.

{error={message=The operation could not be executed because of another activity in the background. Please try again later., logId=04a14146-dea3-493f-892c-3cb1dea7b122}}

Status: 429 - You have reached the usage limits that are configured for your tenant. You are performing too many requests or consume too many resources.

{error={code=bpm.workflowruntime.rate.limit.exceeded, message=Your tenant is performing too many requests.}}

Status: 500 - Internal server error. The operation you requested led to an error during execution.

{error={code=bpm.workflowruntime.rest.internal.server.error, message=Internal server error, logId=f29a5719-3342-4a4a-8a3d-5ddd5253159e}}

/v1/workflow-instances/{workflowInstanceId}/context

Overrides the context for a workflow instance independent of its status. Take special care when using this API, because it will override the workflow context, that is, it might change the workflow context in ways that are incompatible with the expectations of the tasks in the workflow definition. Before changing the context, we recommend that you suspend the workflow instance and check that the execution has come to a halt, that is, no further steps are being added to the execution log. Refer to PATCH on the parent resource and GET on the 'execution-logs' sibling resource. Roles permitted to execute this operation: - Global roles: WorkflowContextAdmin - Instance-specific roles: contextAdminUsers, contextAdminGroups [Prerequisite: You are assigned to the WorkflowParticipant global role.] - Scope: WORKFLOW_INSTANCE_UPDATE_CONTEXT


/v1/workflow-instances/{workflowInstanceId}/context

Usage

curl -X PUT "https://sandbox.api.sap.com/workflow-service/rest/v1/workflow-instances/{workflowInstanceId}/context"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.WorkflowInstancesApi;

import java.io.File;
import java.util.*;

public class WorkflowInstancesApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        
        // Configure OAuth2 access token for authorization: Oauth2_AuthorizationCode
        OAuth Oauth2_AuthorizationCode = (OAuth) defaultClient.getAuthentication("Oauth2_AuthorizationCode");
        Oauth2_AuthorizationCode.setAccessToken("YOUR ACCESS TOKEN");

        // Configure OAuth2 access token for authorization: Oauth2_ClientCredentials
        OAuth Oauth2_ClientCredentials = (OAuth) defaultClient.getAuthentication("Oauth2_ClientCredentials");
        Oauth2_ClientCredentials.setAccessToken("YOUR ACCESS TOKEN");

        WorkflowInstancesApi apiInstance = new WorkflowInstancesApi();
        String workflowInstanceId = workflowInstanceId_example; // String | Specify the workflow instance ID for which the context should be overridden. The workflow instance ID is 36 characters long.
        Object body = ; // Object | Specify the new context according to the given schema.
The length of the request body is limited to ensure optimal operation of the service.
        try {
            apiInstance.v1WorkflowInstancesWorkflowInstanceIdContextPut(workflowInstanceId, body);
        } catch (ApiException e) {
            System.err.println("Exception when calling WorkflowInstancesApi#v1WorkflowInstancesWorkflowInstanceIdContextPut");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.WorkflowInstancesApi;

public class WorkflowInstancesApiExample {

    public static void main(String[] args) {
        WorkflowInstancesApi apiInstance = new WorkflowInstancesApi();
        String workflowInstanceId = workflowInstanceId_example; // String | Specify the workflow instance ID for which the context should be overridden. The workflow instance ID is 36 characters long.
        Object body = ; // Object | Specify the new context according to the given schema.
The length of the request body is limited to ensure optimal operation of the service.
        try {
            apiInstance.v1WorkflowInstancesWorkflowInstanceIdContextPut(workflowInstanceId, body);
        } catch (ApiException e) {
            System.err.println("Exception when calling WorkflowInstancesApi#v1WorkflowInstancesWorkflowInstanceIdContextPut");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure OAuth2 access token for authorization: (authentication scheme: Oauth2_AuthorizationCode)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];

// Configure OAuth2 access token for authorization: (authentication scheme: Oauth2_ClientCredentials)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];

String *workflowInstanceId = workflowInstanceId_example; // Specify the workflow instance ID for which the context should be overridden. The workflow instance ID is 36 characters long.
Object *body = ; // Specify the new context according to the given schema.
The length of the request body is limited to ensure optimal operation of the service.

WorkflowInstancesApi *apiInstance = [[WorkflowInstancesApi alloc] init];

// Overwrite instance context
[apiInstance v1WorkflowInstancesWorkflowInstanceIdContextPutWith:workflowInstanceId
    body:body
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var WorkflowApiForCloudFoundry = require('workflow_api_for_cloud_foundry');
var defaultClient = WorkflowApiForCloudFoundry.ApiClient.instance;

// Configure OAuth2 access token for authorization: Oauth2_AuthorizationCode
var Oauth2_AuthorizationCode = defaultClient.authentications['Oauth2_AuthorizationCode'];
Oauth2_AuthorizationCode.accessToken = "YOUR ACCESS TOKEN"

// Configure OAuth2 access token for authorization: Oauth2_ClientCredentials
var Oauth2_ClientCredentials = defaultClient.authentications['Oauth2_ClientCredentials'];
Oauth2_ClientCredentials.accessToken = "YOUR ACCESS TOKEN"

var api = new WorkflowApiForCloudFoundry.WorkflowInstancesApi()

var workflowInstanceId = workflowInstanceId_example; // {String} Specify the workflow instance ID for which the context should be overridden. The workflow instance ID is 36 characters long.

var body = ; // {Object} Specify the new context according to the given schema.
The length of the request body is limited to ensure optimal operation of the service.


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.v1WorkflowInstancesWorkflowInstanceIdContextPut(workflowInstanceId, body, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class v1WorkflowInstancesWorkflowInstanceIdContextPutExample
    {
        public void main()
        {
            
            // Configure OAuth2 access token for authorization: Oauth2_AuthorizationCode
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
            // Configure OAuth2 access token for authorization: Oauth2_ClientCredentials
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new WorkflowInstancesApi();
            var workflowInstanceId = workflowInstanceId_example;  // String | Specify the workflow instance ID for which the context should be overridden. The workflow instance ID is 36 characters long.
            var body = new Object(); // Object | Specify the new context according to the given schema.
The length of the request body is limited to ensure optimal operation of the service.

            try
            {
                // Overwrite instance context
                apiInstance.v1WorkflowInstancesWorkflowInstanceIdContextPut(workflowInstanceId, body);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling WorkflowInstancesApi.v1WorkflowInstancesWorkflowInstanceIdContextPut: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: Oauth2_AuthorizationCode
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
// Configure OAuth2 access token for authorization: Oauth2_ClientCredentials
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new Swagger\Client\Api\WorkflowInstancesApi();
$workflowInstanceId = workflowInstanceId_example; // String | Specify the workflow instance ID for which the context should be overridden. The workflow instance ID is 36 characters long.
$body = ; // Object | Specify the new context according to the given schema.
The length of the request body is limited to ensure optimal operation of the service.

try {
    $api_instance->v1WorkflowInstancesWorkflowInstanceIdContextPut($workflowInstanceId, $body);
} catch (Exception $e) {
    echo 'Exception when calling WorkflowInstancesApi->v1WorkflowInstancesWorkflowInstanceIdContextPut: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::WorkflowInstancesApi;

# Configure OAuth2 access token for authorization: Oauth2_AuthorizationCode
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
# Configure OAuth2 access token for authorization: Oauth2_ClientCredentials
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::SwaggerClient::WorkflowInstancesApi->new();
my $workflowInstanceId = workflowInstanceId_example; # String | Specify the workflow instance ID for which the context should be overridden. The workflow instance ID is 36 characters long.
my $body = WWW::SwaggerClient::Object::Object->new(); # Object | Specify the new context according to the given schema.
The length of the request body is limited to ensure optimal operation of the service.

eval { 
    $api_instance->v1WorkflowInstancesWorkflowInstanceIdContextPut(workflowInstanceId => $workflowInstanceId, body => $body);
};
if ($@) {
    warn "Exception when calling WorkflowInstancesApi->v1WorkflowInstancesWorkflowInstanceIdContextPut: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: Oauth2_AuthorizationCode
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure OAuth2 access token for authorization: Oauth2_ClientCredentials
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.WorkflowInstancesApi()
workflowInstanceId = workflowInstanceId_example # String | Specify the workflow instance ID for which the context should be overridden. The workflow instance ID is 36 characters long.
body =  # Object | Specify the new context according to the given schema.
The length of the request body is limited to ensure optimal operation of the service.

try: 
    # Overwrite instance context
    api_instance.v1WorkflowInstancesWorkflowInstanceIdContextPut(workflowInstanceId, body)
except ApiException as e:
    print("Exception when calling WorkflowInstancesApi->v1WorkflowInstancesWorkflowInstanceIdContextPut: %s\n" % e)

Parameters

Path parameters
Name Description
workflowInstanceId*
Body parameters
Name Description
body *

Specify the new context according to the given schema. The length of the request body is limited to ensure optimal operation of the service.

Responses

Status: 204 - The context has been updated.

Status: 401 - Unauthorized. You have not provided valid authentication credentials to access the resource.

{error=unauthorized, error_description=Full authentication is required to access this resource.}

Status: 403 - Access forbidden. You have not the required permissions to access the resource.

{error={message=User does not have sufficient privileges.}}

Status: 404 - URL not found. Check whether the URL is correct and whether you refer to an existing workflow instance.

{error={code=bpm.workflowruntime.rest.instance.not.found, message=Workflow instance not found, logId=dc68239e-3ad4-442a-8343-cc197f69d05f}}

Status: 409 - The operation could not be executed because of another activity in the background. Please try again later.

{error={message=The operation could not be executed because of another activity in the background. Please try again later., logId=04a14146-dea3-493f-892c-3cb1dea7b122}}

Status: 429 - You have reached the usage limits that are configured for your tenant. You are performing too many requests or consume too many resources.

{error={code=bpm.workflowruntime.rate.limit.exceeded, message=Your tenant is performing too many requests.}}

Status: 500 - Internal server error. The operation you requested led to an error during execution.

{error={code=bpm.workflowruntime.rest.internal.server.error, message=Internal server error, logId=f29a5719-3342-4a4a-8a3d-5ddd5253159e}}

/v1/workflow-instances/{workflowInstanceId}/error-messages

Retrieves current error messages for a workflow instance. Roles permitted to execute this operation: - Global roles: WorkflowDeveloper, WorkflowAdmin - Instance-specific roles: adminUsers, adminGroups [Prerequisite: You are assigned to the WorkflowParticipant global role.] - Scope: WORKFLOW_INSTANCE_GET_ERROR_MESSAGES


/v1/workflow-instances/{workflowInstanceId}/error-messages

Usage

curl -X GET "https://sandbox.api.sap.com/workflow-service/rest/v1/workflow-instances/{workflowInstanceId}/error-messages"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.WorkflowInstancesApi;

import java.io.File;
import java.util.*;

public class WorkflowInstancesApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        
        // Configure OAuth2 access token for authorization: Oauth2_AuthorizationCode
        OAuth Oauth2_AuthorizationCode = (OAuth) defaultClient.getAuthentication("Oauth2_AuthorizationCode");
        Oauth2_AuthorizationCode.setAccessToken("YOUR ACCESS TOKEN");

        // Configure OAuth2 access token for authorization: Oauth2_ClientCredentials
        OAuth Oauth2_ClientCredentials = (OAuth) defaultClient.getAuthentication("Oauth2_ClientCredentials");
        Oauth2_ClientCredentials.setAccessToken("YOUR ACCESS TOKEN");

        WorkflowInstancesApi apiInstance = new WorkflowInstancesApi();
        String workflowInstanceId = workflowInstanceId_example; // String | The workflow instance ID for which the error messages should be retrieved. The workflow instance ID is 36 characters long.
        try {
            array[WorkflowInstanceErrorMessage] result = apiInstance.v1WorkflowInstancesWorkflowInstanceIdErrorMessagesGet(workflowInstanceId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling WorkflowInstancesApi#v1WorkflowInstancesWorkflowInstanceIdErrorMessagesGet");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.WorkflowInstancesApi;

public class WorkflowInstancesApiExample {

    public static void main(String[] args) {
        WorkflowInstancesApi apiInstance = new WorkflowInstancesApi();
        String workflowInstanceId = workflowInstanceId_example; // String | The workflow instance ID for which the error messages should be retrieved. The workflow instance ID is 36 characters long.
        try {
            array[WorkflowInstanceErrorMessage] result = apiInstance.v1WorkflowInstancesWorkflowInstanceIdErrorMessagesGet(workflowInstanceId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling WorkflowInstancesApi#v1WorkflowInstancesWorkflowInstanceIdErrorMessagesGet");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure OAuth2 access token for authorization: (authentication scheme: Oauth2_AuthorizationCode)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];

// Configure OAuth2 access token for authorization: (authentication scheme: Oauth2_ClientCredentials)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];

String *workflowInstanceId = workflowInstanceId_example; // The workflow instance ID for which the error messages should be retrieved. The workflow instance ID is 36 characters long.

WorkflowInstancesApi *apiInstance = [[WorkflowInstancesApi alloc] init];

// Retrieve error messages
[apiInstance v1WorkflowInstancesWorkflowInstanceIdErrorMessagesGetWith:workflowInstanceId
              completionHandler: ^(array[WorkflowInstanceErrorMessage] output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var WorkflowApiForCloudFoundry = require('workflow_api_for_cloud_foundry');
var defaultClient = WorkflowApiForCloudFoundry.ApiClient.instance;

// Configure OAuth2 access token for authorization: Oauth2_AuthorizationCode
var Oauth2_AuthorizationCode = defaultClient.authentications['Oauth2_AuthorizationCode'];
Oauth2_AuthorizationCode.accessToken = "YOUR ACCESS TOKEN"

// Configure OAuth2 access token for authorization: Oauth2_ClientCredentials
var Oauth2_ClientCredentials = defaultClient.authentications['Oauth2_ClientCredentials'];
Oauth2_ClientCredentials.accessToken = "YOUR ACCESS TOKEN"

var api = new WorkflowApiForCloudFoundry.WorkflowInstancesApi()

var workflowInstanceId = workflowInstanceId_example; // {String} The workflow instance ID for which the error messages should be retrieved. The workflow instance ID is 36 characters long.


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.v1WorkflowInstancesWorkflowInstanceIdErrorMessagesGet(workflowInstanceId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class v1WorkflowInstancesWorkflowInstanceIdErrorMessagesGetExample
    {
        public void main()
        {
            
            // Configure OAuth2 access token for authorization: Oauth2_AuthorizationCode
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
            // Configure OAuth2 access token for authorization: Oauth2_ClientCredentials
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new WorkflowInstancesApi();
            var workflowInstanceId = workflowInstanceId_example;  // String | The workflow instance ID for which the error messages should be retrieved. The workflow instance ID is 36 characters long.

            try
            {
                // Retrieve error messages
                array[WorkflowInstanceErrorMessage] result = apiInstance.v1WorkflowInstancesWorkflowInstanceIdErrorMessagesGet(workflowInstanceId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling WorkflowInstancesApi.v1WorkflowInstancesWorkflowInstanceIdErrorMessagesGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: Oauth2_AuthorizationCode
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
// Configure OAuth2 access token for authorization: Oauth2_ClientCredentials
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new Swagger\Client\Api\WorkflowInstancesApi();
$workflowInstanceId = workflowInstanceId_example; // String | The workflow instance ID for which the error messages should be retrieved. The workflow instance ID is 36 characters long.

try {
    $result = $api_instance->v1WorkflowInstancesWorkflowInstanceIdErrorMessagesGet($workflowInstanceId);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling WorkflowInstancesApi->v1WorkflowInstancesWorkflowInstanceIdErrorMessagesGet: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::WorkflowInstancesApi;

# Configure OAuth2 access token for authorization: Oauth2_AuthorizationCode
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
# Configure OAuth2 access token for authorization: Oauth2_ClientCredentials
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::SwaggerClient::WorkflowInstancesApi->new();
my $workflowInstanceId = workflowInstanceId_example; # String | The workflow instance ID for which the error messages should be retrieved. The workflow instance ID is 36 characters long.

eval { 
    my $result = $api_instance->v1WorkflowInstancesWorkflowInstanceIdErrorMessagesGet(workflowInstanceId => $workflowInstanceId);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling WorkflowInstancesApi->v1WorkflowInstancesWorkflowInstanceIdErrorMessagesGet: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: Oauth2_AuthorizationCode
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure OAuth2 access token for authorization: Oauth2_ClientCredentials
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.WorkflowInstancesApi()
workflowInstanceId = workflowInstanceId_example # String | The workflow instance ID for which the error messages should be retrieved. The workflow instance ID is 36 characters long.

try: 
    # Retrieve error messages
    api_response = api_instance.v1WorkflowInstancesWorkflowInstanceIdErrorMessagesGet(workflowInstanceId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling WorkflowInstancesApi->v1WorkflowInstancesWorkflowInstanceIdErrorMessagesGet: %s\n" % e)

Parameters

Path parameters
Name Description
workflowInstanceId*

Responses

Status: 200 - Returns a list of error messages.

[{activityId=scripttask1, activityName=Script Task 1, logId=1989cced-b5b0-48cb-b25e-761993be6d92, message=TypeError: null has no such function "get" in <eval> at line number 2, timestamp=2016-11-30T23:59:59.999Z, errorCode=bpm.workflowruntime.scripttask.script.execution.error.in.evaluation}, {activityId=scripttask2, activityName=Script Task 2, logId=9b9efaa5-1a5c-4041-a779-46c4417d7e72, message=TypeError: null has no such function "get" in <eval> at line number 2, timestamp=2016-11-01T19:59:59.000Z, errorCode=bpm.workflowruntime.scripttask.script.execution.error.in.evaluation}]

Status: 401 - Unauthorized. You have not provided valid authentication credentials to access the resource.

{error=unauthorized, error_description=Full authentication is required to access this resource.}

Status: 403 - Access forbidden. You have not the required permissions to access the resource.

{error={message=User does not have sufficient privileges.}}

Status: 404 - URL not found. Check whether the URL is correct and whether you refer to an existing workflow instance.

{error={code=bpm.workflowruntime.rest.instance.not.found, message=Workflow instance not found, logId=dc68239e-3ad4-442a-8343-cc197f69d05f}}

Status: 429 - You have reached the usage limits that are configured for your tenant. You are performing too many requests or consume too many resources.

{error={code=bpm.workflowruntime.rate.limit.exceeded, message=Your tenant is performing too many requests.}}

Status: 500 - Internal server error. The operation you requested led to an error during execution.

{error={code=bpm.workflowruntime.rest.internal.server.error, message=Internal server error, logId=f29a5719-3342-4a4a-8a3d-5ddd5253159e}}

/v1/workflow-instances/{workflowInstanceId}/execution-logs

Retrieves execution logs for a given workflow instance. Roles permitted to execute this operation: - Global roles: WorkflowViewer, WorkflowAdmin - Instance-specific roles: viewerUsers, viewerGroups, adminUsers, adminGroups [Prerequisite: You are assigned to the WorkflowParticipant global role.] - Scope: WORKFLOW_INSTANCE_GET_EXECUTION_LOGS


/v1/workflow-instances/{workflowInstanceId}/execution-logs

Usage

curl -X GET "https://sandbox.api.sap.com/workflow-service/rest/v1/workflow-instances/{workflowInstanceId}/execution-logs"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.WorkflowInstancesApi;

import java.io.File;
import java.util.*;

public class WorkflowInstancesApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        
        // Configure OAuth2 access token for authorization: Oauth2_AuthorizationCode
        OAuth Oauth2_AuthorizationCode = (OAuth) defaultClient.getAuthentication("Oauth2_AuthorizationCode");
        Oauth2_AuthorizationCode.setAccessToken("YOUR ACCESS TOKEN");

        // Configure OAuth2 access token for authorization: Oauth2_ClientCredentials
        OAuth Oauth2_ClientCredentials = (OAuth) defaultClient.getAuthentication("Oauth2_ClientCredentials");
        Oauth2_ClientCredentials.setAccessToken("YOUR ACCESS TOKEN");

        WorkflowInstancesApi apiInstance = new WorkflowInstancesApi();
        String workflowInstanceId = workflowInstanceId_example; // String | The workflow instance ID for which the execution logs should be retrieved. The workflow instance ID is 36 characters long.
        String acceptLanguage = acceptLanguage_example; // String | Provide a preferred language. If a translation is available, relevant texts are returned in this language.
        try {
            array[WorkflowInstanceExecutionLog] result = apiInstance.v1WorkflowInstancesWorkflowInstanceIdExecutionLogsGet(workflowInstanceId, acceptLanguage);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling WorkflowInstancesApi#v1WorkflowInstancesWorkflowInstanceIdExecutionLogsGet");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.WorkflowInstancesApi;

public class WorkflowInstancesApiExample {

    public static void main(String[] args) {
        WorkflowInstancesApi apiInstance = new WorkflowInstancesApi();
        String workflowInstanceId = workflowInstanceId_example; // String | The workflow instance ID for which the execution logs should be retrieved. The workflow instance ID is 36 characters long.
        String acceptLanguage = acceptLanguage_example; // String | Provide a preferred language. If a translation is available, relevant texts are returned in this language.
        try {
            array[WorkflowInstanceExecutionLog] result = apiInstance.v1WorkflowInstancesWorkflowInstanceIdExecutionLogsGet(workflowInstanceId, acceptLanguage);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling WorkflowInstancesApi#v1WorkflowInstancesWorkflowInstanceIdExecutionLogsGet");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure OAuth2 access token for authorization: (authentication scheme: Oauth2_AuthorizationCode)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];

// Configure OAuth2 access token for authorization: (authentication scheme: Oauth2_ClientCredentials)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];

String *workflowInstanceId = workflowInstanceId_example; // The workflow instance ID for which the execution logs should be retrieved. The workflow instance ID is 36 characters long.
String *acceptLanguage = acceptLanguage_example; // Provide a preferred language. If a translation is available, relevant texts are returned in this language. (optional)

WorkflowInstancesApi *apiInstance = [[WorkflowInstancesApi alloc] init];

// Retrieve execution logs
[apiInstance v1WorkflowInstancesWorkflowInstanceIdExecutionLogsGetWith:workflowInstanceId
    acceptLanguage:acceptLanguage
              completionHandler: ^(array[WorkflowInstanceExecutionLog] output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var WorkflowApiForCloudFoundry = require('workflow_api_for_cloud_foundry');
var defaultClient = WorkflowApiForCloudFoundry.ApiClient.instance;

// Configure OAuth2 access token for authorization: Oauth2_AuthorizationCode
var Oauth2_AuthorizationCode = defaultClient.authentications['Oauth2_AuthorizationCode'];
Oauth2_AuthorizationCode.accessToken = "YOUR ACCESS TOKEN"

// Configure OAuth2 access token for authorization: Oauth2_ClientCredentials
var Oauth2_ClientCredentials = defaultClient.authentications['Oauth2_ClientCredentials'];
Oauth2_ClientCredentials.accessToken = "YOUR ACCESS TOKEN"

var api = new WorkflowApiForCloudFoundry.WorkflowInstancesApi()

var workflowInstanceId = workflowInstanceId_example; // {String} The workflow instance ID for which the execution logs should be retrieved. The workflow instance ID is 36 characters long.

var opts = { 
  'acceptLanguage': acceptLanguage_example // {String} Provide a preferred language. If a translation is available, relevant texts are returned in this language.
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.v1WorkflowInstancesWorkflowInstanceIdExecutionLogsGet(workflowInstanceId, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class v1WorkflowInstancesWorkflowInstanceIdExecutionLogsGetExample
    {
        public void main()
        {
            
            // Configure OAuth2 access token for authorization: Oauth2_AuthorizationCode
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
            // Configure OAuth2 access token for authorization: Oauth2_ClientCredentials
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new WorkflowInstancesApi();
            var workflowInstanceId = workflowInstanceId_example;  // String | The workflow instance ID for which the execution logs should be retrieved. The workflow instance ID is 36 characters long.
            var acceptLanguage = acceptLanguage_example;  // String | Provide a preferred language. If a translation is available, relevant texts are returned in this language. (optional) 

            try
            {
                // Retrieve execution logs
                array[WorkflowInstanceExecutionLog] result = apiInstance.v1WorkflowInstancesWorkflowInstanceIdExecutionLogsGet(workflowInstanceId, acceptLanguage);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling WorkflowInstancesApi.v1WorkflowInstancesWorkflowInstanceIdExecutionLogsGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: Oauth2_AuthorizationCode
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
// Configure OAuth2 access token for authorization: Oauth2_ClientCredentials
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new Swagger\Client\Api\WorkflowInstancesApi();
$workflowInstanceId = workflowInstanceId_example; // String | The workflow instance ID for which the execution logs should be retrieved. The workflow instance ID is 36 characters long.
$acceptLanguage = acceptLanguage_example; // String | Provide a preferred language. If a translation is available, relevant texts are returned in this language.

try {
    $result = $api_instance->v1WorkflowInstancesWorkflowInstanceIdExecutionLogsGet($workflowInstanceId, $acceptLanguage);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling WorkflowInstancesApi->v1WorkflowInstancesWorkflowInstanceIdExecutionLogsGet: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::WorkflowInstancesApi;

# Configure OAuth2 access token for authorization: Oauth2_AuthorizationCode
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
# Configure OAuth2 access token for authorization: Oauth2_ClientCredentials
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::SwaggerClient::WorkflowInstancesApi->new();
my $workflowInstanceId = workflowInstanceId_example; # String | The workflow instance ID for which the execution logs should be retrieved. The workflow instance ID is 36 characters long.
my $acceptLanguage = acceptLanguage_example; # String | Provide a preferred language. If a translation is available, relevant texts are returned in this language.

eval { 
    my $result = $api_instance->v1WorkflowInstancesWorkflowInstanceIdExecutionLogsGet(workflowInstanceId => $workflowInstanceId, acceptLanguage => $acceptLanguage);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling WorkflowInstancesApi->v1WorkflowInstancesWorkflowInstanceIdExecutionLogsGet: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: Oauth2_AuthorizationCode
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure OAuth2 access token for authorization: Oauth2_ClientCredentials
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.WorkflowInstancesApi()
workflowInstanceId = workflowInstanceId_example # String | The workflow instance ID for which the execution logs should be retrieved. The workflow instance ID is 36 characters long.
acceptLanguage = acceptLanguage_example # String | Provide a preferred language. If a translation is available, relevant texts are returned in this language. (optional)

try: 
    # Retrieve execution logs
    api_response = api_instance.v1WorkflowInstancesWorkflowInstanceIdExecutionLogsGet(workflowInstanceId, acceptLanguage=acceptLanguage)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling WorkflowInstancesApi->v1WorkflowInstancesWorkflowInstanceIdExecutionLogsGet: %s\n" % e)

Parameters

Path parameters
Name Description
workflowInstanceId*
Header parameters
Name Description
Accept-Language

Responses

Status: 200 - Returns a list of execution logs.

[{id=4711, type=WORKFLOW_STARTED, timestamp=2017-02-01T14:14:23.392Z, referenceInstanceId=5234-4555-178a-fa1224235a04, userId=UserId13}, {id=4714, type=SERVICETASK_CREATED, timestamp=2017-02-01T14:14:26.516Z, referenceInstanceId=c4f2-4066-0ba1-ee8393107bc2, activityId=servicetask1, subject=Retrieve Employees}, {id=4716, type=SERVICETASK_FAILED, timestamp=2017-02-01T14:14:35.145Z, referenceInstanceId=c4f2-4066-0ba1-ee8393107bc2, activityId=servicetask1, subject=Retrieve Employees, restEndpoint={httpMethod=GET, destinationName=HRSystem, destinationSubdomain=hr-scenarios, destinationUrl=https://hrsystem.example.com/api, relativePath=/employee}, error={message=The destination 'HRSystem' could not be found. Check the spelling or create a destination with this name., errorCode=bpm.workflowruntime.hcp.destination.not.found, logId=7ee1558c-690d-4ebf-a669-dfee4a5e24d1}, retriesRemaining=0}, {id=4717, type=SCRIPTTASK_CREATED, timestamp=2017-02-01T14:14:42.510Z, referenceInstanceId=1f52-4066-1ba1-6e8393107ef5, activityId=scripttask1, subject=Calculate Working Hours}, {id=4718, type=SCRIPTTASK_FAILED, timestamp=2017-02-01T14:14:42.345Z, referenceInstanceId=1f52-4066-1ba1-6e8393107ef5, activityId=scripttask1, subject=Calculate Working Hours, error={message=ReferenceError: "hours" is not defined in <eval> at line number 1, errorCode=bpm.workflowruntime.scripttask.script.execution.error.in.evaluation, logId=f1a56632-1436-4de7-9d12-820ba4508e13}, retriesRemaining=0}, {id=4719, type=WORKFLOW_SUSPENDED, timestamp=2017-02-01T14:14:43.345Z, referenceInstanceId=5234-4555-178a-fa1224235a04, userId=UserId13}, {id=4720, type=WORKFLOW_CONTEXT_PATCHED_BY_ADMIN, referenceInstanceId=5234-4555-178a-fa1224235a04, timestamp=2017-02-01T14:15:16.123Z, userId=UserId1, changes={create=[adminChangeReason], update=[retrieveDetails]}}, {id=4721, type=WORKFLOW_CONTEXT_OVERWRITTEN_BY_ADMIN, referenceInstanceId=5234-4555-178a-fa1224235a04, timestamp=2017-02-01T14:15:16.123Z, userId=UserId1, changes={create=[adminChangeReason, details], update=[count, loopVariable, retrieveDetails], delete=[detals]}}, {id=4722, type=WORKFLOW_RESUMED, timestamp=2017-02-01T14:14:44.345Z, referenceInstanceId=5234-4555-178a-fa1224235a04, userId=UserId13}, {id=4723, type=WORKFLOW_CONTINUED, timestamp=2017-02-01T14:14:45.345Z, referenceInstanceId=5234-4555-178a-fa1224235a04, userId=UserId13}, {id=4724, type=USERTASK_CREATED, timestamp=2017-02-01T14:14:45.353Z, referenceInstanceId=fef2-5066-1ba1-fe8393107ef5, activityId=usertask1, subject=First Task, recipientUsers=[UserId1, UserId13], recipientGroups=[Admins, Staff], taskId=74, userId=UserId13}, {id=4725, type=USERTASK_CLAIMED, timestamp=2017-02-01T14:14:46.353Z, referenceInstanceId=fef2-5066-1ba1-fe8393107ef5, activityId=usertask1, userId=UserId1, subject=First Task, taskId=74}, {id=4726, type=USERTASK_RELEASED, timestamp=2017-02-01T14:14:47.353Z, referenceInstanceId=fef2-5066-1ba1-fe8393107ef5, activityId=usertask1, userId=UserId1, subject=First Task, taskId=74}, {id=4727, type=INTERMEDIATE_TIMER_EVENT_REACHED, timestamp=2017-02-01T14:14:47.363Z, referenceInstanceId=1bcf0142-a7e1-4d6f-845d-64fdfa7721ac, activityId=intermediatecatchevent1, subject=Timer Event, duration=PT1M}, {id=4728, type=INTERMEDIATE_TIMER_EVENT_TRIGGERED, timestamp=2017-02-01T14:15:52.183Z, referenceInstanceId=1bcf0142-a7e1-4d6f-845d-64fdfa7721ac, activityId=intermediatecatchevent1, subject=Timer Event}, {id=4729, type=NONCANCELING_BOUNDARY_TIMER_EVENT_TRIGGERED, timestamp=2017-02-01T14:16:52.183Z, referenceInstanceId=85a6-9330-797b-0b8414d6, activityId=boundarytimerevent3, subject=Confirm Equipment for Erwin Clarke, activityName=NonCancelingBoundaryTimerEvent, taskId=74}, {id=4730, type=CANCELING_BOUNDARY_TIMER_EVENT_TRIGGERED, timestamp=2017-02-01T14:17:52.183Z, referenceInstanceId=85a6-9330-797b-0b8414d6, activityId=boundarytimerevent3, subject=Confirm Equipment for Erwin Clarke, activityName=CancelingBoundaryTimerEvent, taskId=74}, {id=4731, type=USERTASK_CANCELED_BY_BOUNDARY_EVENT, timestamp=2017-02-01T14:17:53.183Z, referenceInstanceId=85a6-9330-797b-0b8414d6, activityId=usertask1, subject=Confirm Equipment for Erwin Clarke, cause=boundarytimerevent3, boundaryEventName=CancelingBoundaryTimerEvent, taskId=74}, {id=4732, type=MAILTASK_CREATED, timestamp=2017-02-01T14:17:54.183Z, referenceInstanceId=088a6a91-5f4c-4f9d-bd34-be8c19608fd1, activityId=mailtask1, subject=Employee onboarding completed}, {id=4733, type=MAILTASK_FAILED, timestamp=2017-02-01T14:17:55.183Z, referenceInstanceId=088a6a91-5f4c-4f9d-bd34-be8c19608fd1, activityId=mailtask1, subject=Employee onboarding completed, recipients={to=[hr-dept@example.com], cc=[unit-head@example.com, office-head@example.com], bcc=[me@example.com], ignored=[]}, error={message=The transport protocol in destination 'bpmworkflowruntime_mail' is missing or empty. Use 'smtp' as the value of property 'mail.transport.protocol'., errorCode=bpm.workflowruntime.mailtask.destination.property.invalid, logId=f1a56632-1436-4de7-9d12-820ba4508e13}, retriesRemaining=0}, {id=4734, type=MAILTASK_COMPLETED, timestamp=2017-02-01T14:17:56.183Z, referenceInstanceId=088a6a91-5f4c-4f9d-bd34-be8c19608fd1, activityId=mailtask1, subject=Employee onboarding completed, destinationSubdomain=hr-scenarios, sendDisabled=true, recipients={to=[hr-dept@example.com, invalidemail], cc=[unit-head@example.com, office-head@example.com], bcc=[me@example.com], ignored=[invalidemail]}}, {id=4735, type=MAILTASK_FAILED, timestamp=2017-02-01T14:17:57.183Z, referenceInstanceId=088a6a91-5f4c-4f9d-bd34-be8c19608fd1, activityId=mailtask1, subject=Employee onboarding completed, destinationSubdomain=hr-scenarios, recipients={to=[invalidemail], cc=[invalidemail2], bcc=[invalidemail3], ignored=[invalidemail, invalidemail2, invalidemail3]}, error={message=All recipient addresses were invalid or no addresses were given., errorCode=bpm.workflowruntime.mailtask.recipients.address.do.not.exist, logId=f1a56632-1436-4de7-9d12-820ba4508e13}, retriesRemaining=0, propagatedPrincipal=UserId1}, {id=4736, type=EXCLUSIVE_GATEWAY_REACHED, timestamp=2020-04-17T14:17:56.183Z, referenceInstanceId=3c08c6e1-d2d4-4dd7-8905-cd656566dea3, activityId=exclusivegateway1, subject=ExclusiveGateway1}, {id=4737, type=EXCLUSIVE_GATEWAY_FAILED, timestamp=2020-04-17T14:17:56.283Z, referenceInstanceId=8bfe23dd-d113-48f3-906c-e9a107c526e8, activityId=exclusivegateway1, subject=ExclusiveGateway1}]

Status: 401 - Unauthorized. You have not provided valid authentication credentials to access the resource.

{error=unauthorized, error_description=Full authentication is required to access this resource.}

Status: 403 - Access forbidden. You have not the required permissions to access the resource.

{error={message=User does not have sufficient privileges.}}

Status: 404 - URL not found. Check whether the URL is correct and whether you refer to an existing workflow instance.

{error={code=bpm.workflowruntime.rest.instance.not.found, message=Workflow instance not found, logId=dc68239e-3ad4-442a-8343-cc197f69d05f}}

Status: 429 - You have reached the usage limits that are configured for your tenant. You are performing too many requests or consume too many resources.

{error={code=bpm.workflowruntime.rate.limit.exceeded, message=Your tenant is performing too many requests.}}

Status: 500 - Internal server error. The operation you requested led to an error during execution.

{error={code=bpm.workflowruntime.rest.internal.server.error, message=Internal server error, logId=f29a5719-3342-4a4a-8a3d-5ddd5253159e}}

/v1/workflow-instances/{workflowInstanceId}

Retrieves the workflow instance with the specified workflow instance ID. Roles permitted to execute this operation: - Global roles: WorkflowViewer, WorkflowAdmin - Instance-specific roles: viewerUsers, viewerGroups, adminUsers, adminGroups [Prerequisite: You are assigned to the WorkflowParticipant global role.] - Scope: WORKFLOW_INSTANCE_GET


/v1/workflow-instances/{workflowInstanceId}

Usage

curl -X GET "https://sandbox.api.sap.com/workflow-service/rest/v1/workflow-instances/{workflowInstanceId}?$expand="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.WorkflowInstancesApi;

import java.io.File;
import java.util.*;

public class WorkflowInstancesApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        
        // Configure OAuth2 access token for authorization: Oauth2_AuthorizationCode
        OAuth Oauth2_AuthorizationCode = (OAuth) defaultClient.getAuthentication("Oauth2_AuthorizationCode");
        Oauth2_AuthorizationCode.setAccessToken("YOUR ACCESS TOKEN");

        // Configure OAuth2 access token for authorization: Oauth2_ClientCredentials
        OAuth Oauth2_ClientCredentials = (OAuth) defaultClient.getAuthentication("Oauth2_ClientCredentials");
        Oauth2_ClientCredentials.setAccessToken("YOUR ACCESS TOKEN");

        WorkflowInstancesApi apiInstance = new WorkflowInstancesApi();
        String workflowInstanceId = workflowInstanceId_example; // String | The ID of the workflow instance, which should be retrieved. The workflow instance ID is 36 characters long.
        String acceptLanguage = acceptLanguage_example; // String | Provide a preferred language. If a translation is available, relevant texts are returned in this language.
        String $expand = $expand_example; // String | You can request custom workflow attributes to become part of the workflow instance output by specifying the value 'attributes' for the '$expand' parameter.
Otherwise, if the '$expand' parameter is not specified, the 'attributes' field is not included into the output of the workflow instance. Note that labels
as well as the order of the custom workflow attributes in which they are returned, are taken from the latest versions of the workflow definitions where
these attributes are present.

        try {
            WorkflowInstance result = apiInstance.v1WorkflowInstancesWorkflowInstanceIdGet(workflowInstanceId, acceptLanguage, $expand);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling WorkflowInstancesApi#v1WorkflowInstancesWorkflowInstanceIdGet");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.WorkflowInstancesApi;

public class WorkflowInstancesApiExample {

    public static void main(String[] args) {
        WorkflowInstancesApi apiInstance = new WorkflowInstancesApi();
        String workflowInstanceId = workflowInstanceId_example; // String | The ID of the workflow instance, which should be retrieved. The workflow instance ID is 36 characters long.
        String acceptLanguage = acceptLanguage_example; // String | Provide a preferred language. If a translation is available, relevant texts are returned in this language.
        String $expand = $expand_example; // String | You can request custom workflow attributes to become part of the workflow instance output by specifying the value 'attributes' for the '$expand' parameter.
Otherwise, if the '$expand' parameter is not specified, the 'attributes' field is not included into the output of the workflow instance. Note that labels
as well as the order of the custom workflow attributes in which they are returned, are taken from the latest versions of the workflow definitions where
these attributes are present.

        try {
            WorkflowInstance result = apiInstance.v1WorkflowInstancesWorkflowInstanceIdGet(workflowInstanceId, acceptLanguage, $expand);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling WorkflowInstancesApi#v1WorkflowInstancesWorkflowInstanceIdGet");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure OAuth2 access token for authorization: (authentication scheme: Oauth2_AuthorizationCode)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];

// Configure OAuth2 access token for authorization: (authentication scheme: Oauth2_ClientCredentials)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];

String *workflowInstanceId = workflowInstanceId_example; // The ID of the workflow instance, which should be retrieved. The workflow instance ID is 36 characters long.
String *acceptLanguage = acceptLanguage_example; // Provide a preferred language. If a translation is available, relevant texts are returned in this language. (optional)
String *$expand = $expand_example; // You can request custom workflow attributes to become part of the workflow instance output by specifying the value 'attributes' for the '$expand' parameter.
Otherwise, if the '$expand' parameter is not specified, the 'attributes' field is not included into the output of the workflow instance. Note that labels
as well as the order of the custom workflow attributes in which they are returned, are taken from the latest versions of the workflow definitions where
these attributes are present.
 (optional)

WorkflowInstancesApi *apiInstance = [[WorkflowInstancesApi alloc] init];

// Retrieve workflow instance by ID
[apiInstance v1WorkflowInstancesWorkflowInstanceIdGetWith:workflowInstanceId
    acceptLanguage:acceptLanguage
    $expand:$expand
              completionHandler: ^(WorkflowInstance output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var WorkflowApiForCloudFoundry = require('workflow_api_for_cloud_foundry');
var defaultClient = WorkflowApiForCloudFoundry.ApiClient.instance;

// Configure OAuth2 access token for authorization: Oauth2_AuthorizationCode
var Oauth2_AuthorizationCode = defaultClient.authentications['Oauth2_AuthorizationCode'];
Oauth2_AuthorizationCode.accessToken = "YOUR ACCESS TOKEN"

// Configure OAuth2 access token for authorization: Oauth2_ClientCredentials
var Oauth2_ClientCredentials = defaultClient.authentications['Oauth2_ClientCredentials'];
Oauth2_ClientCredentials.accessToken = "YOUR ACCESS TOKEN"

var api = new WorkflowApiForCloudFoundry.WorkflowInstancesApi()

var workflowInstanceId = workflowInstanceId_example; // {String} The ID of the workflow instance, which should be retrieved. The workflow instance ID is 36 characters long.

var opts = { 
  'acceptLanguage': acceptLanguage_example, // {String} Provide a preferred language. If a translation is available, relevant texts are returned in this language.
  '$expand': $expand_example // {String} You can request custom workflow attributes to become part of the workflow instance output by specifying the value 'attributes' for the '$expand' parameter.
Otherwise, if the '$expand' parameter is not specified, the 'attributes' field is not included into the output of the workflow instance. Note that labels
as well as the order of the custom workflow attributes in which they are returned, are taken from the latest versions of the workflow definitions where
these attributes are present.

};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.v1WorkflowInstancesWorkflowInstanceIdGet(workflowInstanceId, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class v1WorkflowInstancesWorkflowInstanceIdGetExample
    {
        public void main()
        {
            
            // Configure OAuth2 access token for authorization: Oauth2_AuthorizationCode
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
            // Configure OAuth2 access token for authorization: Oauth2_ClientCredentials
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new WorkflowInstancesApi();
            var workflowInstanceId = workflowInstanceId_example;  // String | The ID of the workflow instance, which should be retrieved. The workflow instance ID is 36 characters long.
            var acceptLanguage = acceptLanguage_example;  // String | Provide a preferred language. If a translation is available, relevant texts are returned in this language. (optional) 
            var $expand = $expand_example;  // String | You can request custom workflow attributes to become part of the workflow instance output by specifying the value 'attributes' for the '$expand' parameter.
Otherwise, if the '$expand' parameter is not specified, the 'attributes' field is not included into the output of the workflow instance. Note that labels
as well as the order of the custom workflow attributes in which they are returned, are taken from the latest versions of the workflow definitions where
these attributes are present.
 (optional) 

            try
            {
                // Retrieve workflow instance by ID
                WorkflowInstance result = apiInstance.v1WorkflowInstancesWorkflowInstanceIdGet(workflowInstanceId, acceptLanguage, $expand);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling WorkflowInstancesApi.v1WorkflowInstancesWorkflowInstanceIdGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: Oauth2_AuthorizationCode
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
// Configure OAuth2 access token for authorization: Oauth2_ClientCredentials
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new Swagger\Client\Api\WorkflowInstancesApi();
$workflowInstanceId = workflowInstanceId_example; // String | The ID of the workflow instance, which should be retrieved. The workflow instance ID is 36 characters long.
$acceptLanguage = acceptLanguage_example; // String | Provide a preferred language. If a translation is available, relevant texts are returned in this language.
$$expand = $expand_example; // String | You can request custom workflow attributes to become part of the workflow instance output by specifying the value 'attributes' for the '$expand' parameter.
Otherwise, if the '$expand' parameter is not specified, the 'attributes' field is not included into the output of the workflow instance. Note that labels
as well as the order of the custom workflow attributes in which they are returned, are taken from the latest versions of the workflow definitions where
these attributes are present.


try {
    $result = $api_instance->v1WorkflowInstancesWorkflowInstanceIdGet($workflowInstanceId, $acceptLanguage, $$expand);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling WorkflowInstancesApi->v1WorkflowInstancesWorkflowInstanceIdGet: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::WorkflowInstancesApi;

# Configure OAuth2 access token for authorization: Oauth2_AuthorizationCode
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
# Configure OAuth2 access token for authorization: Oauth2_ClientCredentials
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::SwaggerClient::WorkflowInstancesApi->new();
my $workflowInstanceId = workflowInstanceId_example; # String | The ID of the workflow instance, which should be retrieved. The workflow instance ID is 36 characters long.
my $acceptLanguage = acceptLanguage_example; # String | Provide a preferred language. If a translation is available, relevant texts are returned in this language.
my $$expand = $expand_example; # String | You can request custom workflow attributes to become part of the workflow instance output by specifying the value 'attributes' for the '$expand' parameter.
Otherwise, if the '$expand' parameter is not specified, the 'attributes' field is not included into the output of the workflow instance. Note that labels
as well as the order of the custom workflow attributes in which they are returned, are taken from the latest versions of the workflow definitions where
these attributes are present.


eval { 
    my $result = $api_instance->v1WorkflowInstancesWorkflowInstanceIdGet(workflowInstanceId => $workflowInstanceId, acceptLanguage => $acceptLanguage, $expand => $$expand);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling WorkflowInstancesApi->v1WorkflowInstancesWorkflowInstanceIdGet: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: Oauth2_AuthorizationCode
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure OAuth2 access token for authorization: Oauth2_ClientCredentials
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.WorkflowInstancesApi()
workflowInstanceId = workflowInstanceId_example # String | The ID of the workflow instance, which should be retrieved. The workflow instance ID is 36 characters long.
acceptLanguage = acceptLanguage_example # String | Provide a preferred language. If a translation is available, relevant texts are returned in this language. (optional)
$expand = $expand_example # String | You can request custom workflow attributes to become part of the workflow instance output by specifying the value 'attributes' for the '$expand' parameter.
Otherwise, if the '$expand' parameter is not specified, the 'attributes' field is not included into the output of the workflow instance. Note that labels
as well as the order of the custom workflow attributes in which they are returned, are taken from the latest versions of the workflow definitions where
these attributes are present.
 (optional)

try: 
    # Retrieve workflow instance by ID
    api_response = api_instance.v1WorkflowInstancesWorkflowInstanceIdGet(workflowInstanceId, acceptLanguage=acceptLanguage, $expand=$expand)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling WorkflowInstancesApi->v1WorkflowInstancesWorkflowInstanceIdGet: %s\n" % e)

Parameters

Path parameters
Name Description
workflowInstanceId*
Header parameters
Name Description
Accept-Language
Query parameters
Name Description
$expand

Responses

Status: 200 - The requested workflow instance.

{id=13, definitionId=LeaveRequestWorkflow, definitionVersion=2, subject=Leave Request for Alice, businessKey=s021445, status=RUNNING, startedAt=2016-11-01T19:59:59.000Z, startedBy=Alice, rootInstanceId=25bd51d6-200d-11eb-a911-eeee0a811eb6, parentInstanceId=1dsd2g6y-620d-a1eb-t90r-3gy70af11e8g}

Status: 400 - Incorrect format or structure of the provided request body.

{error={code=bpm.workflowruntime.rest.content.format.invalid, message=Unable to parse the request content because it has an unexpected format or structure. The content has to be JSON and follow the documented data structure., logId=e329b2a4-cac7-44d7-b5c5-0494e6fbad5a}}

Status: 401 - Unauthorized. You have not provided valid authentication credentials to access the resource.

{error=unauthorized, error_description=Full authentication is required to access this resource.}

Status: 403 - Access forbidden. You have not the required permissions to access the resource.

{error={message=User does not have sufficient privileges.}}

Status: 404 - URL not found. Check whether the URL is correct and whether you refer to an existing workflow instance.

{error={code=bpm.workflowruntime.rest.instance.not.found, message=Workflow instance not found, logId=dc68239e-3ad4-442a-8343-cc197f69d05f}}

Status: 429 - You have reached the usage limits that are configured for your tenant. You are performing too many requests or consume too many resources.

{error={code=bpm.workflowruntime.rate.limit.exceeded, message=Your tenant is performing too many requests.}}

Status: 500 - Internal server error. The operation you requested led to an error during execution.

{error={code=bpm.workflowruntime.rest.internal.server.error, message=Internal server error, logId=f29a5719-3342-4a4a-8a3d-5ddd5253159e}}

/v1/workflow-instances/{workflowInstanceId}

Modifies the properties of a given workflow instance, for example, sets its status to CANCELED or RUNNING. Status changes may not take effect immediately, due to asynchronous processing of the request. When you change the status to CANCELED, note the following: * Workflow instances in CANCELED status are considered final, that is, no further changes are allowed. This is valid as well for other APIs and the processing according to the workflow definition. * Workflow instances in CANCELED status stop processing as soon as the system allows. When you are changing the status to SUSPENDED, note the following: * Status SUSPENDED manually and temporarily suspends processing. * You can choose to suspend the specified instance or the whole cascade by setting boolean parameter "cascade". By default, the parameter is false. When set to true, the operation is cascaded to its referenced subflow instances. * Workflow instances in SUSPENDED status stop processing as soon as the system allows. * Workflow instances remain in SUSPENDED status until a status change to RUNNING or CANCELED is requested. * While the workflow instance status reported by the respective API might change with immediate effect, follow-up actions might only be successful, after asynchronous processing within the workflow instance actually has stopped. To check whether asynchronous processing is ongoing, analyze the execution logs or check the workflow definition structure. When you are changing the status to RUNNING, note the following: * For workflow instances in ERRONEOUS status, this retries the failed activities. If these activities continue failing, the workflow instance automatically moves again into ERRONEOUS status. * If the workflow instance had previously been suspended while in ERRONEOUS status, failed activities, such as service tasks, are retried. * You can choose to retry or resume the specified instance or the whole cascade by setting boolean parameter "cascade". By default, the parameter is false. When set to true, the operation is cascaded to its referenced subflow instances. When you propagate the status change to subflow instances with the 'cascade' parameter, note the following: * The effects outlined above are appropriately applied to the subflow instances. For example, instances in a final status like CANCELED are not changed by the API. Roles permitted to execute this operation: - Global roles: WorkflowAdmin - Instance-specific roles: adminUsers, adminGroups [Prerequisite: You are assigned to the WorkflowParticipant global role.] - Scopes: WORKFLOW_INSTANCE_CANCEL, WORKFLOW_INSTANCE_RETRY_RESUME, WORKFLOW_INSTANCE_SUSPEND


/v1/workflow-instances/{workflowInstanceId}

Usage

curl -X PATCH "https://sandbox.api.sap.com/workflow-service/rest/v1/workflow-instances/{workflowInstanceId}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.WorkflowInstancesApi;

import java.io.File;
import java.util.*;

public class WorkflowInstancesApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        
        // Configure OAuth2 access token for authorization: Oauth2_AuthorizationCode
        OAuth Oauth2_AuthorizationCode = (OAuth) defaultClient.getAuthentication("Oauth2_AuthorizationCode");
        Oauth2_AuthorizationCode.setAccessToken("YOUR ACCESS TOKEN");

        // Configure OAuth2 access token for authorization: Oauth2_ClientCredentials
        OAuth Oauth2_ClientCredentials = (OAuth) defaultClient.getAuthentication("Oauth2_ClientCredentials");
        Oauth2_ClientCredentials.setAccessToken("YOUR ACCESS TOKEN");

        WorkflowInstancesApi apiInstance = new WorkflowInstancesApi();
        String workflowInstanceId = workflowInstanceId_example; // String | The ID of the workflow instance, which should be modified. The workflow instance ID is 36 characters long.
        WorkflowInstanceUpdatePayload body = ; // WorkflowInstanceUpdatePayload | Specify the request body according to the given schema.
The length of the request body is limited to ensure optimal operation of the service.
        try {
            apiInstance.v1WorkflowInstancesWorkflowInstanceIdPatch(workflowInstanceId, body);
        } catch (ApiException e) {
            System.err.println("Exception when calling WorkflowInstancesApi#v1WorkflowInstancesWorkflowInstanceIdPatch");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.WorkflowInstancesApi;

public class WorkflowInstancesApiExample {

    public static void main(String[] args) {
        WorkflowInstancesApi apiInstance = new WorkflowInstancesApi();
        String workflowInstanceId = workflowInstanceId_example; // String | The ID of the workflow instance, which should be modified. The workflow instance ID is 36 characters long.
        WorkflowInstanceUpdatePayload body = ; // WorkflowInstanceUpdatePayload | Specify the request body according to the given schema.
The length of the request body is limited to ensure optimal operation of the service.
        try {
            apiInstance.v1WorkflowInstancesWorkflowInstanceIdPatch(workflowInstanceId, body);
        } catch (ApiException e) {
            System.err.println("Exception when calling WorkflowInstancesApi#v1WorkflowInstancesWorkflowInstanceIdPatch");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure OAuth2 access token for authorization: (authentication scheme: Oauth2_AuthorizationCode)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];

// Configure OAuth2 access token for authorization: (authentication scheme: Oauth2_ClientCredentials)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];

String *workflowInstanceId = workflowInstanceId_example; // The ID of the workflow instance, which should be modified. The workflow instance ID is 36 characters long.
WorkflowInstanceUpdatePayload *body = ; // Specify the request body according to the given schema.
The length of the request body is limited to ensure optimal operation of the service.

WorkflowInstancesApi *apiInstance = [[WorkflowInstancesApi alloc] init];

// Update instance
[apiInstance v1WorkflowInstancesWorkflowInstanceIdPatchWith:workflowInstanceId
    body:body
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var WorkflowApiForCloudFoundry = require('workflow_api_for_cloud_foundry');
var defaultClient = WorkflowApiForCloudFoundry.ApiClient.instance;

// Configure OAuth2 access token for authorization: Oauth2_AuthorizationCode
var Oauth2_AuthorizationCode = defaultClient.authentications['Oauth2_AuthorizationCode'];
Oauth2_AuthorizationCode.accessToken = "YOUR ACCESS TOKEN"

// Configure OAuth2 access token for authorization: Oauth2_ClientCredentials
var Oauth2_ClientCredentials = defaultClient.authentications['Oauth2_ClientCredentials'];
Oauth2_ClientCredentials.accessToken = "YOUR ACCESS TOKEN"

var api = new WorkflowApiForCloudFoundry.WorkflowInstancesApi()

var workflowInstanceId = workflowInstanceId_example; // {String} The ID of the workflow instance, which should be modified. The workflow instance ID is 36 characters long.

var body = ; // {WorkflowInstanceUpdatePayload} Specify the request body according to the given schema.
The length of the request body is limited to ensure optimal operation of the service.


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.v1WorkflowInstancesWorkflowInstanceIdPatch(workflowInstanceId, body, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class v1WorkflowInstancesWorkflowInstanceIdPatchExample
    {
        public void main()
        {
            
            // Configure OAuth2 access token for authorization: Oauth2_AuthorizationCode
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
            // Configure OAuth2 access token for authorization: Oauth2_ClientCredentials
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new WorkflowInstancesApi();
            var workflowInstanceId = workflowInstanceId_example;  // String | The ID of the workflow instance, which should be modified. The workflow instance ID is 36 characters long.
            var body = new WorkflowInstanceUpdatePayload(); // WorkflowInstanceUpdatePayload | Specify the request body according to the given schema.
The length of the request body is limited to ensure optimal operation of the service.

            try
            {
                // Update instance
                apiInstance.v1WorkflowInstancesWorkflowInstanceIdPatch(workflowInstanceId, body);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling WorkflowInstancesApi.v1WorkflowInstancesWorkflowInstanceIdPatch: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: Oauth2_AuthorizationCode
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
// Configure OAuth2 access token for authorization: Oauth2_ClientCredentials
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new Swagger\Client\Api\WorkflowInstancesApi();
$workflowInstanceId = workflowInstanceId_example; // String | The ID of the workflow instance, which should be modified. The workflow instance ID is 36 characters long.
$body = ; // WorkflowInstanceUpdatePayload | Specify the request body according to the given schema.
The length of the request body is limited to ensure optimal operation of the service.

try {
    $api_instance->v1WorkflowInstancesWorkflowInstanceIdPatch($workflowInstanceId, $body);
} catch (Exception $e) {
    echo 'Exception when calling WorkflowInstancesApi->v1WorkflowInstancesWorkflowInstanceIdPatch: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::WorkflowInstancesApi;

# Configure OAuth2 access token for authorization: Oauth2_AuthorizationCode
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
# Configure OAuth2 access token for authorization: Oauth2_ClientCredentials
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::SwaggerClient::WorkflowInstancesApi->new();
my $workflowInstanceId = workflowInstanceId_example; # String | The ID of the workflow instance, which should be modified. The workflow instance ID is 36 characters long.
my $body = WWW::SwaggerClient::Object::WorkflowInstanceUpdatePayload->new(); # WorkflowInstanceUpdatePayload | Specify the request body according to the given schema.
The length of the request body is limited to ensure optimal operation of the service.

eval { 
    $api_instance->v1WorkflowInstancesWorkflowInstanceIdPatch(workflowInstanceId => $workflowInstanceId, body => $body);
};
if ($@) {
    warn "Exception when calling WorkflowInstancesApi->v1WorkflowInstancesWorkflowInstanceIdPatch: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: Oauth2_AuthorizationCode
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure OAuth2 access token for authorization: Oauth2_ClientCredentials
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.WorkflowInstancesApi()
workflowInstanceId = workflowInstanceId_example # String | The ID of the workflow instance, which should be modified. The workflow instance ID is 36 characters long.
body =  # WorkflowInstanceUpdatePayload | Specify the request body according to the given schema.
The length of the request body is limited to ensure optimal operation of the service.

try: 
    # Update instance
    api_instance.v1WorkflowInstancesWorkflowInstanceIdPatch(workflowInstanceId, body)
except ApiException as e:
    print("Exception when calling WorkflowInstancesApi->v1WorkflowInstancesWorkflowInstanceIdPatch: %s\n" % e)

Parameters

Path parameters
Name Description
workflowInstanceId*
Body parameters
Name Description
body *

Specify the request body according to the given schema. The length of the request body is limited to ensure optimal operation of the service.

Responses

Status: 202 - The request is successful and the properties will be changed asynchronously.

Status: 400 - Incorrect format or structure of the provided request body.

{error={code=bpm.workflowruntime.rest.content.format.invalid, message=Unable to parse the request content because it has an unexpected format or structure. The content has to be JSON and follow the documented data structure., logId=e329b2a4-cac7-44d7-b5c5-0494e6fbad5a}}

Status: 401 - Unauthorized. You have not provided valid authentication credentials to access the resource.

{error=unauthorized, error_description=Full authentication is required to access this resource.}

Status: 403 - Access forbidden. You have not the required permissions to access the resource.

{error={message=User does not have sufficient privileges.}}

Status: 404 - URL not found. Check whether the URL is correct and whether you refer to an existing workflow instance.

{error={code=bpm.workflowruntime.rest.instance.not.found, message=Workflow instance not found, logId=dc68239e-3ad4-442a-8343-cc197f69d05f}}

Status: 409 - The operation could not be executed because of another activity in the background. Please try again later.

{error={message=The operation could not be executed because of another activity in the background. Please try again later., logId=04a14146-dea3-493f-892c-3cb1dea7b122}}

Status: 422 - The status provided in the request body was invalid.

{error={code=bpm.workflowruntime.rest.instance.status.invalid, message=Invalid status requested for workflow instance., logId=0e250611-dcd3-49f9-a031-c69feb90971a}}

Status: 429 - You have reached the usage limits that are configured for your tenant. You are performing too many requests or consume too many resources.

{error={code=bpm.workflowruntime.rate.limit.exceeded, message=Your tenant is performing too many requests.}}

Status: 500 - Internal server error. The operation you requested led to an error during execution.

{error={code=bpm.workflowruntime.rest.internal.server.error, message=Internal server error, logId=f29a5719-3342-4a4a-8a3d-5ddd5253159e}}

/v1/workflow-instances/{workflowInstanceId}/roles

Retrieves the instance-specific role assignments of the given workflow instance. Roles permitted to execute this operation: - Global roles: WorkflowAdmin - Instance-specific roles: adminUsers, adminGroups [Prerequisite: You are assigned to the WorkflowParticipant global role.] - Scope: WORKFLOW_INSTANCE_GET_ROLES


/v1/workflow-instances/{workflowInstanceId}/roles

Usage

curl -X GET "https://sandbox.api.sap.com/workflow-service/rest/v1/workflow-instances/{workflowInstanceId}/roles"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.WorkflowInstancesApi;

import java.io.File;
import java.util.*;

public class WorkflowInstancesApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        
        // Configure OAuth2 access token for authorization: Oauth2_AuthorizationCode
        OAuth Oauth2_AuthorizationCode = (OAuth) defaultClient.getAuthentication("Oauth2_AuthorizationCode");
        Oauth2_AuthorizationCode.setAccessToken("YOUR ACCESS TOKEN");

        // Configure OAuth2 access token for authorization: Oauth2_ClientCredentials
        OAuth Oauth2_ClientCredentials = (OAuth) defaultClient.getAuthentication("Oauth2_ClientCredentials");
        Oauth2_ClientCredentials.setAccessToken("YOUR ACCESS TOKEN");

        WorkflowInstancesApi apiInstance = new WorkflowInstancesApi();
        String workflowInstanceId = workflowInstanceId_example; // String | The workflow instance ID for which the roles should be retrieved. The workflow instance ID is 36 characters long.
        try {
            WorkflowInstanceRoles result = apiInstance.v1WorkflowInstancesWorkflowInstanceIdRolesGet(workflowInstanceId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling WorkflowInstancesApi#v1WorkflowInstancesWorkflowInstanceIdRolesGet");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.WorkflowInstancesApi;

public class WorkflowInstancesApiExample {

    public static void main(String[] args) {
        WorkflowInstancesApi apiInstance = new WorkflowInstancesApi();
        String workflowInstanceId = workflowInstanceId_example; // String | The workflow instance ID for which the roles should be retrieved. The workflow instance ID is 36 characters long.
        try {
            WorkflowInstanceRoles result = apiInstance.v1WorkflowInstancesWorkflowInstanceIdRolesGet(workflowInstanceId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling WorkflowInstancesApi#v1WorkflowInstancesWorkflowInstanceIdRolesGet");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure OAuth2 access token for authorization: (authentication scheme: Oauth2_AuthorizationCode)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];

// Configure OAuth2 access token for authorization: (authentication scheme: Oauth2_ClientCredentials)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];

String *workflowInstanceId = workflowInstanceId_example; // The workflow instance ID for which the roles should be retrieved. The workflow instance ID is 36 characters long.

WorkflowInstancesApi *apiInstance = [[WorkflowInstancesApi alloc] init];

// Retrieve instance roles
[apiInstance v1WorkflowInstancesWorkflowInstanceIdRolesGetWith:workflowInstanceId
              completionHandler: ^(WorkflowInstanceRoles output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var WorkflowApiForCloudFoundry = require('workflow_api_for_cloud_foundry');
var defaultClient = WorkflowApiForCloudFoundry.ApiClient.instance;

// Configure OAuth2 access token for authorization: Oauth2_AuthorizationCode
var Oauth2_AuthorizationCode = defaultClient.authentications['Oauth2_AuthorizationCode'];
Oauth2_AuthorizationCode.accessToken = "YOUR ACCESS TOKEN"

// Configure OAuth2 access token for authorization: Oauth2_ClientCredentials
var Oauth2_ClientCredentials = defaultClient.authentications['Oauth2_ClientCredentials'];
Oauth2_ClientCredentials.accessToken = "YOUR ACCESS TOKEN"

var api = new WorkflowApiForCloudFoundry.WorkflowInstancesApi()

var workflowInstanceId = workflowInstanceId_example; // {String} The workflow instance ID for which the roles should be retrieved. The workflow instance ID is 36 characters long.


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.v1WorkflowInstancesWorkflowInstanceIdRolesGet(workflowInstanceId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class v1WorkflowInstancesWorkflowInstanceIdRolesGetExample
    {
        public void main()
        {
            
            // Configure OAuth2 access token for authorization: Oauth2_AuthorizationCode
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
            // Configure OAuth2 access token for authorization: Oauth2_ClientCredentials
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new WorkflowInstancesApi();
            var workflowInstanceId = workflowInstanceId_example;  // String | The workflow instance ID for which the roles should be retrieved. The workflow instance ID is 36 characters long.

            try
            {
                // Retrieve instance roles
                WorkflowInstanceRoles result = apiInstance.v1WorkflowInstancesWorkflowInstanceIdRolesGet(workflowInstanceId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling WorkflowInstancesApi.v1WorkflowInstancesWorkflowInstanceIdRolesGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: Oauth2_AuthorizationCode
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
// Configure OAuth2 access token for authorization: Oauth2_ClientCredentials
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new Swagger\Client\Api\WorkflowInstancesApi();
$workflowInstanceId = workflowInstanceId_example; // String | The workflow instance ID for which the roles should be retrieved. The workflow instance ID is 36 characters long.

try {
    $result = $api_instance->v1WorkflowInstancesWorkflowInstanceIdRolesGet($workflowInstanceId);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling WorkflowInstancesApi->v1WorkflowInstancesWorkflowInstanceIdRolesGet: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::WorkflowInstancesApi;

# Configure OAuth2 access token for authorization: Oauth2_AuthorizationCode
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
# Configure OAuth2 access token for authorization: Oauth2_ClientCredentials
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::SwaggerClient::WorkflowInstancesApi->new();
my $workflowInstanceId = workflowInstanceId_example; # String | The workflow instance ID for which the roles should be retrieved. The workflow instance ID is 36 characters long.

eval { 
    my $result = $api_instance->v1WorkflowInstancesWorkflowInstanceIdRolesGet(workflowInstanceId => $workflowInstanceId);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling WorkflowInstancesApi->v1WorkflowInstancesWorkflowInstanceIdRolesGet: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: Oauth2_AuthorizationCode
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure OAuth2 access token for authorization: Oauth2_ClientCredentials
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.WorkflowInstancesApi()
workflowInstanceId = workflowInstanceId_example # String | The workflow instance ID for which the roles should be retrieved. The workflow instance ID is 36 characters long.

try: 
    # Retrieve instance roles
    api_response = api_instance.v1WorkflowInstancesWorkflowInstanceIdRolesGet(workflowInstanceId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling WorkflowInstancesApi->v1WorkflowInstancesWorkflowInstanceIdRolesGet: %s\n" % e)

Parameters

Path parameters
Name Description
workflowInstanceId*

Responses

Status: 200 - Returns a list of assigned users and a list of assigned groups for each role on the given workflow instance.

{viewerUsers=[UserId1, UserId8], viewerGroups=[Team17], adminUsers=[], adminGroups=[], contextViewerUsers=[], contextViewerGroups=[], contextAdminUsers=[UserId1], contextAdminGroups=[Managers, Team5]}

Status: 401 - Unauthorized. You have not provided valid authentication credentials to access the resource.

{error=unauthorized, error_description=Full authentication is required to access this resource.}

Status: 403 - Access forbidden. You have not the required permissions to access the resource.

{error={message=User does not have sufficient privileges.}}

Status: 404 - URL not found. Check whether the URL is correct and whether you refer to an existing workflow instance.

{error={code=bpm.workflowruntime.rest.instance.not.found, message=Workflow instance not found, logId=dc68239e-3ad4-442a-8343-cc197f69d05f}}

Status: 429 - You have reached the usage limits that are configured for your tenant. You are performing too many requests or consume too many resources.

{error={code=bpm.workflowruntime.rate.limit.exceeded, message=Your tenant is performing too many requests.}}

Status: 500 - Internal server error. The operation you requested led to an error during execution.

{error={code=bpm.workflowruntime.rest.internal.server.error, message=Internal server error, logId=f29a5719-3342-4a4a-8a3d-5ddd5253159e}}

/v1/workflow-instances/{workflowInstanceId}/roles

Updates the instance-specific role assignments of the given workflow instance. Any of the role assignment properties that is present in the request body will overwrite the existing assignments with the new assignments. Any properties that are either null or not present at all in the request body will leave the corresponding role assignments unchanged. The maximum number of users and groups that can be assigned to each role is limited to 100. The use of expressions as part of the role assignments (e.g. ${context.variable}) is only allowed for workflow instances that are not yet COMPLETED or CANCELED. Roles permitted to execute this operation: - Global roles: WorkflowAdmin - Instance-specific roles: adminUsers, adminGroups [Prerequisite: You are assigned to the WorkflowParticipant global role.] - Scope: WORKFLOW_INSTANCE_UPDATE_ROLES Examples: - Setting **viewerUsers: "UserId1, UserId8"** will remove all existing user assignments of the viewer role and then assign only the two specified users to the role. - Setting **viewerUsers: ""** will remove all existing user assignments of the viewer role. - Specifying any non-null **viewerUsers** in the request body and leaving out **viewerGroups** will update the user assignments and leave the group assignments unchanged.


/v1/workflow-instances/{workflowInstanceId}/roles

Usage

curl -X PATCH "https://sandbox.api.sap.com/workflow-service/rest/v1/workflow-instances/{workflowInstanceId}/roles"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.WorkflowInstancesApi;

import java.io.File;
import java.util.*;

public class WorkflowInstancesApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        
        // Configure OAuth2 access token for authorization: Oauth2_AuthorizationCode
        OAuth Oauth2_AuthorizationCode = (OAuth) defaultClient.getAuthentication("Oauth2_AuthorizationCode");
        Oauth2_AuthorizationCode.setAccessToken("YOUR ACCESS TOKEN");

        // Configure OAuth2 access token for authorization: Oauth2_ClientCredentials
        OAuth Oauth2_ClientCredentials = (OAuth) defaultClient.getAuthentication("Oauth2_ClientCredentials");
        Oauth2_ClientCredentials.setAccessToken("YOUR ACCESS TOKEN");

        WorkflowInstancesApi apiInstance = new WorkflowInstancesApi();
        String workflowInstanceId = workflowInstanceId_example; // String | The workflow instance ID for which the role assignments should be updated. The workflow instance ID is 36 characters long.
        WorkflowInstanceRolesUpdatePayload body = ; // WorkflowInstanceRolesUpdatePayload | Specify new role assignments.
        try {
            apiInstance.v1WorkflowInstancesWorkflowInstanceIdRolesPatch(workflowInstanceId, body);
        } catch (ApiException e) {
            System.err.println("Exception when calling WorkflowInstancesApi#v1WorkflowInstancesWorkflowInstanceIdRolesPatch");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.WorkflowInstancesApi;

public class WorkflowInstancesApiExample {

    public static void main(String[] args) {
        WorkflowInstancesApi apiInstance = new WorkflowInstancesApi();
        String workflowInstanceId = workflowInstanceId_example; // String | The workflow instance ID for which the role assignments should be updated. The workflow instance ID is 36 characters long.
        WorkflowInstanceRolesUpdatePayload body = ; // WorkflowInstanceRolesUpdatePayload | Specify new role assignments.
        try {
            apiInstance.v1WorkflowInstancesWorkflowInstanceIdRolesPatch(workflowInstanceId, body);
        } catch (ApiException e) {
            System.err.println("Exception when calling WorkflowInstancesApi#v1WorkflowInstancesWorkflowInstanceIdRolesPatch");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure OAuth2 access token for authorization: (authentication scheme: Oauth2_AuthorizationCode)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];

// Configure OAuth2 access token for authorization: (authentication scheme: Oauth2_ClientCredentials)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];

String *workflowInstanceId = workflowInstanceId_example; // The workflow instance ID for which the role assignments should be updated. The workflow instance ID is 36 characters long.
WorkflowInstanceRolesUpdatePayload *body = ; // Specify new role assignments.

WorkflowInstancesApi *apiInstance = [[WorkflowInstancesApi alloc] init];

// Update instance roles
[apiInstance v1WorkflowInstancesWorkflowInstanceIdRolesPatchWith:workflowInstanceId
    body:body
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var WorkflowApiForCloudFoundry = require('workflow_api_for_cloud_foundry');
var defaultClient = WorkflowApiForCloudFoundry.ApiClient.instance;

// Configure OAuth2 access token for authorization: Oauth2_AuthorizationCode
var Oauth2_AuthorizationCode = defaultClient.authentications['Oauth2_AuthorizationCode'];
Oauth2_AuthorizationCode.accessToken = "YOUR ACCESS TOKEN"

// Configure OAuth2 access token for authorization: Oauth2_ClientCredentials
var Oauth2_ClientCredentials = defaultClient.authentications['Oauth2_ClientCredentials'];
Oauth2_ClientCredentials.accessToken = "YOUR ACCESS TOKEN"

var api = new WorkflowApiForCloudFoundry.WorkflowInstancesApi()

var workflowInstanceId = workflowInstanceId_example; // {String} The workflow instance ID for which the role assignments should be updated. The workflow instance ID is 36 characters long.

var body = ; // {WorkflowInstanceRolesUpdatePayload} Specify new role assignments.


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.v1WorkflowInstancesWorkflowInstanceIdRolesPatch(workflowInstanceId, body, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class v1WorkflowInstancesWorkflowInstanceIdRolesPatchExample
    {
        public void main()
        {
            
            // Configure OAuth2 access token for authorization: Oauth2_AuthorizationCode
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
            // Configure OAuth2 access token for authorization: Oauth2_ClientCredentials
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new WorkflowInstancesApi();
            var workflowInstanceId = workflowInstanceId_example;  // String | The workflow instance ID for which the role assignments should be updated. The workflow instance ID is 36 characters long.
            var body = new WorkflowInstanceRolesUpdatePayload(); // WorkflowInstanceRolesUpdatePayload | Specify new role assignments.

            try
            {
                // Update instance roles
                apiInstance.v1WorkflowInstancesWorkflowInstanceIdRolesPatch(workflowInstanceId, body);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling WorkflowInstancesApi.v1WorkflowInstancesWorkflowInstanceIdRolesPatch: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: Oauth2_AuthorizationCode
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
// Configure OAuth2 access token for authorization: Oauth2_ClientCredentials
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new Swagger\Client\Api\WorkflowInstancesApi();
$workflowInstanceId = workflowInstanceId_example; // String | The workflow instance ID for which the role assignments should be updated. The workflow instance ID is 36 characters long.
$body = ; // WorkflowInstanceRolesUpdatePayload | Specify new role assignments.

try {
    $api_instance->v1WorkflowInstancesWorkflowInstanceIdRolesPatch($workflowInstanceId, $body);
} catch (Exception $e) {
    echo 'Exception when calling WorkflowInstancesApi->v1WorkflowInstancesWorkflowInstanceIdRolesPatch: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::WorkflowInstancesApi;

# Configure OAuth2 access token for authorization: Oauth2_AuthorizationCode
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
# Configure OAuth2 access token for authorization: Oauth2_ClientCredentials
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::SwaggerClient::WorkflowInstancesApi->new();
my $workflowInstanceId = workflowInstanceId_example; # String | The workflow instance ID for which the role assignments should be updated. The workflow instance ID is 36 characters long.
my $body = WWW::SwaggerClient::Object::WorkflowInstanceRolesUpdatePayload->new(); # WorkflowInstanceRolesUpdatePayload | Specify new role assignments.

eval { 
    $api_instance->v1WorkflowInstancesWorkflowInstanceIdRolesPatch(workflowInstanceId => $workflowInstanceId, body => $body);
};
if ($@) {
    warn "Exception when calling WorkflowInstancesApi->v1WorkflowInstancesWorkflowInstanceIdRolesPatch: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: Oauth2_AuthorizationCode
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure OAuth2 access token for authorization: Oauth2_ClientCredentials
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.WorkflowInstancesApi()
workflowInstanceId = workflowInstanceId_example # String | The workflow instance ID for which the role assignments should be updated. The workflow instance ID is 36 characters long.
body =  # WorkflowInstanceRolesUpdatePayload | Specify new role assignments.

try: 
    # Update instance roles
    api_instance.v1WorkflowInstancesWorkflowInstanceIdRolesPatch(workflowInstanceId, body)
except ApiException as e:
    print("Exception when calling WorkflowInstancesApi->v1WorkflowInstancesWorkflowInstanceIdRolesPatch: %s\n" % e)

Parameters

Path parameters
Name Description
workflowInstanceId*
Body parameters
Name Description
body *

Specify new role assignments.

Responses

Status: 204 - The workflow instance role assignments were updated.

Status: 400 - The workflow instance that you specified is already in status COMPLETED or CANCELED and you attempted to use expressions in your operation.

{error={code=bpm.workflowruntime.rest.instance.finalized.expressions.not.allowed, message=Could not update the workflow instance because using expressions is not allowed when an instance is in a final status (COMPLETED or CANCELED)., logId=f56a2320-34d1-443f-ba43-d3a97f89d914}}

Status: 401 - Unauthorized. You have not provided valid authentication credentials to access the resource.

{error=unauthorized, error_description=Full authentication is required to access this resource.}

Status: 403 - Access forbidden. You have not the required permissions to access the resource.

{error={message=User does not have sufficient privileges.}}

Status: 404 - URL not found. Check whether the URL is correct and whether you refer to an existing workflow instance.

{error={code=bpm.workflowruntime.rest.instance.not.found, message=Workflow instance not found, logId=dc68239e-3ad4-442a-8343-cc197f69d05f}}

Status: 409 - The operation could not be executed because of another activity in the background. Please try again later.

{error={message=The operation could not be executed because of another activity in the background. Please try again later., logId=04a14146-dea3-493f-892c-3cb1dea7b122}}

Status: 429 - You have reached the usage limits that are configured for your tenant. You are performing too many requests or consume too many resources.

{error={code=bpm.workflowruntime.rate.limit.exceeded, message=Your tenant is performing too many requests.}}

Status: 500 - Internal server error. The operation you requested led to an error during execution.

{error={code=bpm.workflowruntime.rest.internal.server.error, message=Internal server error, logId=f29a5719-3342-4a4a-8a3d-5ddd5253159e}}

Generated 2022-11-21T09:33:08.199Z