Forms API

Forms is an independent BPC module. The Forms API can only be used for this module. In most cases, access to the Forms API requires a registered user or API key is required to access the Forms API. The latter is recommended. Please also note the role and rights required in each case. The Forms API can only be used to access the Forms Repository can be used.

Forms API

Method Endpoint

/cxf/bpc-forms/forms

Description

Get all forms listed in the forms repository. Only the latest version of each form is returned.

Returns

List of all forms in forms repository as JSON. Each object has form configuration in config entry and other meta data.

HTTP Status Code

  • 200 : OK

  • 401 : Unauthorized

Content-Type

  • application/json

Required Access Rights

The logged in user or API key must have either the following role or right.

  • Role : FORMS_ADMIN

  • Right : FORMS_READ_ALL

/cxf/bpc-forms/forms/{formId}

Description

Add a new form to the forms repository with specified id. If a form with the specified id already exists, the form is updated. Example:

{
    "name": "Name of Form",
    "config": {
        "metaData": {
            "id": "form_id",
            "version": 1
        },
        "configuration": {},
        "components": [
            {
                "type": "textfield",
                "label": "Textfeld"
            }
        ]
    }
}

Path Parameters

formId

id of the new form.

Returns

Created form as JSON. Object has form configuration in config entry and other meta data.

HTTP Status Code

  • 200 : OK

  • 400 : Form validation failed or structure of provided form is wrong

  • 401 : Unauthorized

Content-Type

  • application/json

Required Access Rights

The logged in user or API key must have either the following role or right.

  • Role : FORMS_ADMIN

  • Right : FORMS_ADD

/cxf/bpc-forms/forms/{formId}/{version}

Description

Update a form in the forms repository. The version is automatically incremented. If no form with specified id exists, the form is created with version 1. Example:

{
    "name": "Name of Form",
    "config": {
        "metaData": {
            "id": "form_id",
            "version": 2
        },
        "configuration": {},
        "components": [
            {
                "type": "textfield",
                "label": "Textfeld"
            }
        ]
    }
}

Path Parameters

formId

id of the form. The old and new form have the same id.

version

version of the new form.

Returns

Created form as JSON. Object has form configuration in config entry and other meta data.

HTTP Status Code

  • 200 : OK

  • 400 : Form validation failed or structure of provided form is wrong

  • 401 : Unauthorized

Content-Type

  • application/json

Required Access Rights

The logged in user or API key must have either the following role or right.

  • Role : FORMS_ADMIN

  • Right : FORMS_UPDATE

/cxf/bpc-forms/forms/{formId}

Description

Get a specific form with latest version of the forms repository.

Path Parameters

formId

id of the form.

Returns

Specified form as JSON. Object has form configuration in config entry and other meta data.

HTTP Status Code

  • 200 : OK

  • 401 : Unauthorized

Content-Type

  • application/json

Required Access Rights

A logged in user or API key is required.

/cxf/bpc-forms/forms/{formId}/{version}

Description

Get a specific form with specific version of the forms repository. If the version does not exist, the latest version is returned.

Path Parameters

formId

id of the form.

version

version of the form.

Returns

Specified form as JSON. Object has form configuration in config entry and other meta data.

HTTP Status Code

  • 200 : OK

  • 401 : Unauthorized

Content-Type

  • application/json

Required Access Rights

A logged in user or API key is required.

/cxf/bpc-forms/history/{formId}

Description

Get all versions of a form in the forms repository.

Path Parameters

formId

id of the form.

Returns

List of all form versions with specified id in forms repository as JSON. Each object has form configuration in config entry and other meta data.

HTTP Status Code

  • 200 : OK

  • 401 : Unauthorized

Content-Type

  • application/json

Required Access Rights

The logged in user or API key must have either the following role or right.

  • Role : FORMS_ADMIN

  • Right : FORMS_READ_HISTORY

/cxf/bpc-forms/config/{formId}

Description

Get the configuration of a specific form with latest version of the forms repository.

Path Parameters

formId

id of the form.

Returns

Configuration of specified form as JSON.

HTTP Status Code

  • 200 : OK

  • 401 : Unauthorized

Content-Type

  • application/json

Required Access Rights

A logged in user or API key is required.

/cxf/bpc-forms/config/{formId}/{version}

Description

Get the configuration of a specific form with specified version of the forms repository. If the version does not exist, the configuration of the latest version is returned.

Path Parameters

formId

id of the form.

version

version of the form.

Returns

Configuration of specified form as JSON.

HTTP Status Code

  • 200 : OK

  • 401 : Unauthorized

Content-Type

  • application/json

Required Access Rights

A logged in user or API key is required.


Keywords: