Class GetApiKey
Creates or retrieves an api key for the given user
Defined in: getApiKey.js.
Constructor Attributes | Constructor Name and Description |
---|---|
GetApiKey(src, expires, secondsValid)
Creates or retrieves an api key for the given user
Creates or retrieves an Api Key for the user with the username in 'src' .
|
Class Detail
GetApiKey(src, expires, secondsValid)
Creates or retrieves an api key for the given user
Creates or retrieves an Api Key for the user with the username in 'src' . The results parsed into a
text object keyed by AssetID from the JSON file in which they are contained, and by default are displayed to the
user.
'MBurl'/wf/restapi/1/getApiKey?src=["root"]&expires=true
http://127.0.0.1:55555/wf/restapi/1/getApiKey?src=["root"]
'MBurl'/wf/restapi/1/GetApiKey?user=root&pass=test&src=["root"]&expires=true
- Parameters:
- src
- the username/usernames of the users to create the api keys for
- expires
- true/false determines if the key created will expire or not. default is true
- secondsValid
- Seconds until the key expires. if parameter is not given and expires is true, a default expiration will be created
- Returns:
- ( {'username': "ApiKey",...} )