transform
GETALL,EAM/addUserToTransFormAccount/
Arguments
- userIdCharacter
UserId to add to TransForm account
- rolesCharacter
Roles for user in this TransForm account
- validateUserLogical
If true only people with valid TransForm user accounts are added
Returns
- resultJSON Object
Returns an object with these properties:
- errorboolean
true if there was an error
- errorTextstring
- resultobject
- rowsAddedToTransFormAccountmembershiptTable
- rowsAddedToTransFormRolesTable
Description
Add users to a TransForm account. The account is the account associated with the API key.
You can optionally specify a list of roles for the user in this account. If you do not specify any roles a default role of 'user' is used.
You can optionally validate users before adding them to the TransForm account. If you validate users then only users with existing TransForm User Accounts will be added to the TransForm account.
CURL
CURL --insecure -H "apikey:Your_api_key" -H "accept: application/json" "https://transform.alphasoftware.com/transformAPIVersion1.a5svc/addUserToTransFormAccount/?userid=value_of_userid&roles=value_of_roles&validateUser=value_of_validateUser"
Node
var https = require('https'); var options = { protocol: "https:", hostname: "transform.alphasoftware.com", path: "/transformAPIVersion1.a5svc/addUserToTransFormAccount/?userid=value%5fof%5fuserid&roles=value%5fof%5froles&validateUser=value%5fof%5fvalidateUser", headers: {apikey: "Your_api_key"} }; https.get(options, (resp) => { let data = ''; resp.on('data', (chunk) => {data += chunk;}); resp.on('end', () => {console.log(data);}); }).on("error", (err) => {console.log("Error: " + err.message);});
Xbasic
dim apikey as c = "Your_api_key" dim postdata as c dim url as c = "/addUserToTransFormAccount/?userid=value%5fof%5fuserid&roles=value%5fof%5froles&validateUser=value%5fof%5fvalidateUser" dim pr as p pr = a5dialogHelper_transformAPIQuery(url,postdata,apikey) if pr.error = .f. then dim result as c result = pr.result else dim errorText as c errorText = pr.errorText end if