Retrieve replacement tokens from a lab instance
- 15 Aug 2024
- 1 Minute to read
- Print
Retrieve replacement tokens from a lab instance
- Updated on 15 Aug 2024
- 1 Minute to read
- Print
Article summary
Did you find this summary helpful?
Thank you for your feedback
Get
/replacementtokens
The ReplacementTokens command retrieves all @lab replacement tokens available for a particular lab instance.
Security
API Key
Header parameter nameapi_key
All methods require an API key, which must be obtained from Skillable. This key is used by Skillable to validate your account. The key can be passed as an HTTP request header with the header name "api_key".
Query parameters
labInstanceId
integer (int64) Required
The ID of the lab instance.
Example1286841
Responses
200
OK Response.
Example of retrieving all @lab replacement tokens available for a particular lab instance
{
"ReplacementTokens": [
{
"Token": "@lab.VirtualMachine(machine1).Username",
"Replacement": "user1"
},
{
"Token": "@lab.VirtualMachine(machine1).Password",
"Replacement": "h&4Fa?)C3/eQ;)?E"
},
{
"Token": "@lab.VirtualMachine(machine2).Username",
"Replacement": "user1"
},
{
"Token": "@lab.VirtualMachine(machine2).Password",
"Replacement": "LXM(#(Z^Hw4Upp>f"
},
{
"Token": "@lab.LabInstance.Id",
"Replacement": "15167595"
},
{
"Token": "@lab.LabInstance.GlobalId",
"Replacement": "lod15167595"
},
{
"Token": "@lab.LabInstance.StartDate",
"Replacement": "20190809"
},
{
"Token": "@lab.LabProfile.Id",
"Replacement": "1581178"
},
{
"Token": "@lab.User.Id",
"Replacement": "11832814"
},
{
"Token": "@lab.User.FirstName",
"Replacement": "John "
},
{
"Token": "@lab.User.LastName",
"Replacement": "Doe"
},
{
"Token": "@lab.User.Email",
"Replacement": "john.doe@sample.net"
}
],
"Error": null,
"Status": 1
}
object
ReplacementTokens
Array of object
Array of ReplacementToken objects.
object
Token
string
The token name.
Replacement
string
The replacement value for the token.
Error
string | null
In the event of an error, this will contain a detailed error message.
Status
integer (int32)
Indicates the status of the API request.
0 = Error
1 = Success
Was this article helpful?