Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Note

Note that all modification to definitions is immediately reflected. Widget lifecycle management is not currently in place and it is recommended to use other specific widgets for dev and test purposes before updating the production definition.

...

Info

As we currently do not version control definitions, it is recommended to source control your definitions elsewhere.

List configurations

The following cURL will list (the id , and name ) of all configurations related to the admin user.

Code Block
export SERVER=https://waas.technia.cloud
export USER=
export PASSWORD=
curl ${SERVER}/api/v1/configs -u "${USER}:${PASSWORD}" -k 

Parameter Detail

Parameter

Description

USER

An administration user with the proper access.

PASSWORD

The password of the administration user.

Creating a Configuration

The following cURL template will create a new widget definition.

Note

Make sure that you are using a unique name without special characters or spaces.

Code Block
export SERVER=https://waas.technia.cloud
export CONFIG_NAME=
export CONFIG_FILE=
export USER=
export PASSWORD=
export CONTENT_TYPE='Content-Type: multipart/form-data'
curl -XPOST ${SERVER}/api/v1/configs -H "${CONTENT_TYPE}" -F "name=${CONFIG_NAME}" -F "config=@${CONFIG_FILE}" -u "${USER}:${PASSWORD}" -k 

Parameter detail

Parameter

Description

CONFIG_NAME

A unique string representation of the configuration. Used when referring the widget from the “Create additional app” dialog.

CONFIG_FILE

The configuration file holding the definition.

USER

An administration user with the proper access.

PASSWORD

The password of the administration user.

Updating a Configuration

The following cURL template will update the widget definition and/or its name (used referring from 3DX).

Note

Make sure that you are using a unique name without special characters or spaces.

Code Block
export SERVER=https://waas.technia.cloud
export CONFIG_ID=
export CONFIG_NAME=
export CONFIG_FILE=
export USER=
export PASSWORD=
export CONTENT_TYPE='Content-Type: multipart/form-data'
curl -XPUT ${SERVER}/api/v1/configs/${CONFIG_ID} -H "${CONTENT_TYPE}" -F "name=${CONFIG_NAME}" -F "config=@${CONFIG_FILE}" -u "${USER}:${PASSWORD}" -k 

Parameter detail

Parameter

Description

CONFIG_ID

A numeric identifier of the configuration. Can be found calling list configurations.

CONFIG_NAME

A unique string representation of the configuration. Could be changed, used when referring the widget from the “Create additional app” dialog.

CONFIG_FILE

The configuration file holding the new definition.

USER

An administration user with the proper access.

PASSWORD

The password of the administration user.

...

Create or Update a Code resource

To add a custom js resource to use in configurations (e.g. custom dataHandlers) you can push a js file to the server using the following cURL.

Code Block
export SERVER=https://waas.technia.cloud
export COMPANY_ID=
export FILE=
export USER=
export PASSWORD=
export CONTENT_TYPE='Content-Type: multipart/form-data'
curl -XPOST ${SERVER}/api/v1/companies/${COMPANY_ID}/resources -H "${CONTENT_TYPE}" -F "file=@${FILE}" -u "${USER}:${PASSWORD}" -k 

Parameter detail

Parameter

Description

COMPANY_ID

A numeric identifier of your company. Where to get this?

FILE

The js file holding the new resource definition.

USER

An administration user with the proper access.

PASSWORD

The password of the administration user.

...