Skip to content

Latest commit

 

History

History
501 lines (371 loc) · 15.7 KB

FormModelsApi.md

File metadata and controls

501 lines (371 loc) · 15.7 KB

FormModelsApi

All URIs are relative to https://localhost:9080/activiti-app/api

Method HTTP request Description
getFormEditorJsonUsingGET GET /enterprise/forms/{formId}/editorJson Get form content
getFormHistoryUsingGET GET /enterprise/editor/form-models/{formId}/history/{formHistoryId} Get form history
getFormUsingGET GET /enterprise/editor/form-models/{formId} Get a form model
getFormUsingGET1 GET /enterprise/forms/{formId} Get a form
getFormsUsingGET GET /enterprise/editor/form-models/values Get forms
getFormsUsingGET1 GET /enterprise/editor/form-models List form models
getFormsUsingGET2 GET /enterprise/forms Query forms
saveFormUsingPUT PUT /enterprise/editor/form-models/{formId} Update form model content
validateModelUsingPUT PUT /enterprise/editor/form-models/{formId}/validate Validate form model content

getFormEditorJsonUsingGET

FormDefinitionRepresentation getFormEditorJsonUsingGET(formId)

Get form content

Example

// Import classes:
//import org.activiti.engine.remote.client.ApiClient;
//import org.activiti.engine.remote.client.ApiException;
//import org.activiti.engine.remote.client.Configuration;
//import org.activiti.engine.remote.client.auth.*;
//import org.activiti.engine.remote.client.api.FormModelsApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure HTTP basic authorization: basicAuth
HttpBasicAuth basicAuth = (HttpBasicAuth) defaultClient.getAuthentication("basicAuth");
basicAuth.setUsername("YOUR USERNAME");
basicAuth.setPassword("YOUR PASSWORD");

FormModelsApi apiInstance = new FormModelsApi();
Long formId = 789L; // Long | formId
try {
    FormDefinitionRepresentation result = apiInstance.getFormEditorJsonUsingGET(formId);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling FormModelsApi#getFormEditorJsonUsingGET");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
formId Long formId

Return type

FormDefinitionRepresentation

Authorization

basicAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

getFormHistoryUsingGET

FormRepresentation getFormHistoryUsingGET(formId, formHistoryId)

Get form history

Example

// Import classes:
//import org.activiti.engine.remote.client.ApiClient;
//import org.activiti.engine.remote.client.ApiException;
//import org.activiti.engine.remote.client.Configuration;
//import org.activiti.engine.remote.client.auth.*;
//import org.activiti.engine.remote.client.api.FormModelsApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure HTTP basic authorization: basicAuth
HttpBasicAuth basicAuth = (HttpBasicAuth) defaultClient.getAuthentication("basicAuth");
basicAuth.setUsername("YOUR USERNAME");
basicAuth.setPassword("YOUR PASSWORD");

FormModelsApi apiInstance = new FormModelsApi();
Long formId = 789L; // Long | formId
Long formHistoryId = 789L; // Long | formHistoryId
try {
    FormRepresentation result = apiInstance.getFormHistoryUsingGET(formId, formHistoryId);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling FormModelsApi#getFormHistoryUsingGET");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
formId Long formId
formHistoryId Long formHistoryId

Return type

FormRepresentation

Authorization

basicAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

getFormUsingGET

FormRepresentation getFormUsingGET(formId)

Get a form model

Example

// Import classes:
//import org.activiti.engine.remote.client.ApiClient;
//import org.activiti.engine.remote.client.ApiException;
//import org.activiti.engine.remote.client.Configuration;
//import org.activiti.engine.remote.client.auth.*;
//import org.activiti.engine.remote.client.api.FormModelsApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure HTTP basic authorization: basicAuth
HttpBasicAuth basicAuth = (HttpBasicAuth) defaultClient.getAuthentication("basicAuth");
basicAuth.setUsername("YOUR USERNAME");
basicAuth.setPassword("YOUR PASSWORD");

FormModelsApi apiInstance = new FormModelsApi();
Long formId = 789L; // Long | formId
try {
    FormRepresentation result = apiInstance.getFormUsingGET(formId);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling FormModelsApi#getFormUsingGET");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
formId Long formId

Return type

FormRepresentation

Authorization

basicAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

getFormUsingGET1

RuntimeFormRepresentation getFormUsingGET1(formId)

Get a form

Example

// Import classes:
//import org.activiti.engine.remote.client.ApiClient;
//import org.activiti.engine.remote.client.ApiException;
//import org.activiti.engine.remote.client.Configuration;
//import org.activiti.engine.remote.client.auth.*;
//import org.activiti.engine.remote.client.api.FormModelsApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure HTTP basic authorization: basicAuth
HttpBasicAuth basicAuth = (HttpBasicAuth) defaultClient.getAuthentication("basicAuth");
basicAuth.setUsername("YOUR USERNAME");
basicAuth.setPassword("YOUR PASSWORD");

FormModelsApi apiInstance = new FormModelsApi();
Long formId = 789L; // Long | formId
try {
    RuntimeFormRepresentation result = apiInstance.getFormUsingGET1(formId);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling FormModelsApi#getFormUsingGET1");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
formId Long formId

Return type

RuntimeFormRepresentation

Authorization

basicAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

getFormsUsingGET

List<FormRepresentation> getFormsUsingGET(formId)

Get forms

Example

// Import classes:
//import org.activiti.engine.remote.client.ApiClient;
//import org.activiti.engine.remote.client.ApiException;
//import org.activiti.engine.remote.client.Configuration;
//import org.activiti.engine.remote.client.auth.*;
//import org.activiti.engine.remote.client.api.FormModelsApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure HTTP basic authorization: basicAuth
HttpBasicAuth basicAuth = (HttpBasicAuth) defaultClient.getAuthentication("basicAuth");
basicAuth.setUsername("YOUR USERNAME");
basicAuth.setPassword("YOUR PASSWORD");

FormModelsApi apiInstance = new FormModelsApi();
List<String> formId = Arrays.asList("formId_example"); // List<String> | formId
try {
    List<FormRepresentation> result = apiInstance.getFormsUsingGET(formId);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling FormModelsApi#getFormsUsingGET");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
formId List<String> formId

Return type

List<FormRepresentation>

Authorization

basicAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

getFormsUsingGET1

ResultListDataRepresentationFormRepresentation getFormsUsingGET1()

List form models

Example

// Import classes:
//import org.activiti.engine.remote.client.ApiClient;
//import org.activiti.engine.remote.client.ApiException;
//import org.activiti.engine.remote.client.Configuration;
//import org.activiti.engine.remote.client.auth.*;
//import org.activiti.engine.remote.client.api.FormModelsApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure HTTP basic authorization: basicAuth
HttpBasicAuth basicAuth = (HttpBasicAuth) defaultClient.getAuthentication("basicAuth");
basicAuth.setUsername("YOUR USERNAME");
basicAuth.setPassword("YOUR PASSWORD");

FormModelsApi apiInstance = new FormModelsApi();
try {
    ResultListDataRepresentationFormRepresentation result = apiInstance.getFormsUsingGET1();
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling FormModelsApi#getFormsUsingGET1");
    e.printStackTrace();
}

Parameters

This endpoint does not need any parameter.

Return type

ResultListDataRepresentationFormRepresentation

Authorization

basicAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

getFormsUsingGET2

ResultListDataRepresentationRuntimeFormRepresentation getFormsUsingGET2(nameLike, appId, tenantId, start, sort, order, size)

Query forms

Example

// Import classes:
//import org.activiti.engine.remote.client.ApiClient;
//import org.activiti.engine.remote.client.ApiException;
//import org.activiti.engine.remote.client.Configuration;
//import org.activiti.engine.remote.client.auth.*;
//import org.activiti.engine.remote.client.api.FormModelsApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure HTTP basic authorization: basicAuth
HttpBasicAuth basicAuth = (HttpBasicAuth) defaultClient.getAuthentication("basicAuth");
basicAuth.setUsername("YOUR USERNAME");
basicAuth.setPassword("YOUR PASSWORD");

FormModelsApi apiInstance = new FormModelsApi();
String nameLike = "nameLike_example"; // String | nameLike
Long appId = 789L; // Long | appId
Long tenantId = 789L; // Long | tenantId
Integer start = 56; // Integer | start
String sort = "sort_example"; // String | sort
String order = "order_example"; // String | order
Integer size = 56; // Integer | size
try {
    ResultListDataRepresentationRuntimeFormRepresentation result = apiInstance.getFormsUsingGET2(nameLike, appId, tenantId, start, sort, order, size);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling FormModelsApi#getFormsUsingGET2");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
nameLike String nameLike [optional]
appId Long appId [optional]
tenantId Long tenantId [optional]
start Integer start [optional]
sort String sort [optional]
order String order [optional]
size Integer size [optional]

Return type

ResultListDataRepresentationRuntimeFormRepresentation

Authorization

basicAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

saveFormUsingPUT

FormRepresentation saveFormUsingPUT(formId, saveRepresentation)

Update form model content

Example

// Import classes:
//import org.activiti.engine.remote.client.ApiClient;
//import org.activiti.engine.remote.client.ApiException;
//import org.activiti.engine.remote.client.Configuration;
//import org.activiti.engine.remote.client.auth.*;
//import org.activiti.engine.remote.client.api.FormModelsApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure HTTP basic authorization: basicAuth
HttpBasicAuth basicAuth = (HttpBasicAuth) defaultClient.getAuthentication("basicAuth");
basicAuth.setUsername("YOUR USERNAME");
basicAuth.setPassword("YOUR PASSWORD");

FormModelsApi apiInstance = new FormModelsApi();
Long formId = 789L; // Long | ID of the form to update
FormSaveRepresentation saveRepresentation = new FormSaveRepresentation(); // FormSaveRepresentation | saveRepresentation
try {
    FormRepresentation result = apiInstance.saveFormUsingPUT(formId, saveRepresentation);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling FormModelsApi#saveFormUsingPUT");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
formId Long ID of the form to update
saveRepresentation FormSaveRepresentation saveRepresentation

Return type

FormRepresentation

Authorization

basicAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

validateModelUsingPUT

List<ValidationErrorRepresentation> validateModelUsingPUT(formId, saveRepresentation)

Validate form model content

The model content to be validated must be specified in the POST body

Example

// Import classes:
//import org.activiti.engine.remote.client.ApiClient;
//import org.activiti.engine.remote.client.ApiException;
//import org.activiti.engine.remote.client.Configuration;
//import org.activiti.engine.remote.client.auth.*;
//import org.activiti.engine.remote.client.api.FormModelsApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure HTTP basic authorization: basicAuth
HttpBasicAuth basicAuth = (HttpBasicAuth) defaultClient.getAuthentication("basicAuth");
basicAuth.setUsername("YOUR USERNAME");
basicAuth.setPassword("YOUR PASSWORD");

FormModelsApi apiInstance = new FormModelsApi();
Long formId = 789L; // Long | formId
FormSaveRepresentation saveRepresentation = new FormSaveRepresentation(); // FormSaveRepresentation | saveRepresentation
try {
    List<ValidationErrorRepresentation> result = apiInstance.validateModelUsingPUT(formId, saveRepresentation);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling FormModelsApi#validateModelUsingPUT");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
formId Long formId
saveRepresentation FormSaveRepresentation saveRepresentation

Return type

List<ValidationErrorRepresentation>

Authorization

basicAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json