Secure Store API
The password parameter requires BCrypt Encoded value, with 10 strength.
Secure Storage Plugins can be used as a part of Business Processes.
Configuration
Service is published under the /api/v1/securestore URL.
URL examples
https://custom-name.workfusion.com/workfusion/api/v1/securestore
API security overview
All API postings are made over a Secure Sockets Layer (SSL) connection, which encrypts communications between the user and web server to ensure data remains private.
note
All requests must be preceding with https://.
WorkFusion REST API supports basic (login and password hash) authentication to ensure that APIs are only accessible to those with the proper credentials.
Basic authentication
username: Your username in Control Tower.password: Hash of your password in Control Tower.
Using REST API with SSO
When using REST API with SSO you can not use your SSO id/password. The recommended approach for using REST API with SSO enabled is the following:
- Disable SSO:
wf.sso.saml.enable=false - Restart Control Tower:
wfmanager restart workfusion - Log in to Workfusion with pre-SSO ID and password.
- Create special REST API user and grant him necessary permissions. Assign a proper role.
- Enable SSO:
wf.sso.saml.enable=true - Restart Control Tower:
wfmanager restart workfusion - To log in, use the
/workfusion/api/dologinenpoint./workfusion/dologinis disabled once you turn on SSO.
Now, SSO is enabled, but you can use that the REST API user id and password for the REST API authentication.
Get secure entry
| Resource path | Method | Description |
|---|---|---|
v1/securestore/entry | POST | Retrieves secure entry from Secure Storage. |
The parameters are as follows:
| Parameter | Description | Required | Param type | Data type |
|---|---|---|---|---|
alias | Alias of the secured entry | Yes | x-www-form-urlencoded | String |
Success output:
{
"responseStatus": "SUCCESS",
"body": {
"alias": "333",
"key": "0000000",
"value": "0000000000",
"lastUpdateDate": 1449814392229
},
"errors": []
}
Error output:
{
"responseStatus": "FAILURE",
"body": null,
"errors": [
{
"code": 22,
"message": "Invalid password"
}
]
}
Save secure entry
| Resource path | Method | Description |
|---|---|---|
v1/securestore/entry/put | POST | Saves provided entry to Secure Storage. |
The parameters are as follows:
| Parameter | Description | Required | Param type | Data type |
|---|---|---|---|---|
alias | Alias of the secured entry | Yes | x-www-form-urlencoded | String |
key | Entry key, usually the username | Yes | x-www-form-urlencoded | String |
value | Entry value, usually the password | Yes | x-www-form-urlencoded | String |
Success output:
{
"responseStatus": "SUCCESS",
"body": true,
"errors": []
}
Error output:
{
"responseStatus": "FAILURE",
"body": null,
"errors": [
{
"code": 20,
"message": "Secure Entry 1211 already exists"
}
]
}
Delete secure entry
| Resource path | Method | Description |
|---|---|---|
v1/securestore/entry/delete | POST | Deletes specified entry from Secure Storage. |
The parameters are as follows:
| Parameter | Description | Required | Param type | Data type |
|---|---|---|---|---|
alias | Alias of the secured entry | Yes | x-www-form-urlencoded | String |
Success output:
{
"responseStatus": "SUCCESS",
"body": true,
"errors": []
}
Error output:
{
"responseStatus": "FAILURE",
"body": null,
"errors": [
{
"code": 22,
"message": "Invalid password"
}
]
}
Update secure entry
| Resource path | Method | Description |
|---|---|---|
v1/securestore/entry/update | POST | Updates entry (key, value) by alias to Secure Storage. |
The parameters are as follows:
| Parameter | Description | Required | Param type | Data type |
|---|---|---|---|---|
alias | Alias of the secured entry | Yes | x-www-form-urlencoded | String |
key | Entry key, usually the username | Yes | x-www-form-urlencoded | String |
value | Entry value, usually the password | Yes | x-www-form-urlencoded | String |
Success output:
{
"responseStatus": "SUCCESS",
"body": true,
"errors": []
}
Error output:
{
"message": "Validation Failed",
"code": "com.workfusion.api.error.missing.request.parameter",
"errors": [
{
"message": "Required String parameter 'key' is not present",
"field": "key"
}
]
}
Reset secure entry
| Resource path | Method | Description |
|---|---|---|
v1/securestore/entry/reset | POST | Resets value for specified entry from Secure Storage. The new value is randomly generated (20 symbols). |
The parameters are as follows:
| Parameter | Description | Required | Param type | Data type |
|---|---|---|---|---|
alias | Alias of the secured entry | Yes | x-www-form-urlencoded | String |
Success output:
{
"responseStatus": "SUCCESS",
"body": true,
"errors": []
}
Error output:
{
"message": "Secure Entry with alias '12342222' does not exist",
"code": "com.workfusion.api.error.http.not.found"
}