- 11 Oct 2024
- 3 Minutes to read
- Print
Returns information about a class. If the class doesn’t exist, it is created
- Updated on 11 Oct 2024
- 3 Minutes to read
- Print
The GetOrCreateClass command returns information about a class. If the class doesn’t exist, it is created.
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".
The unique identifier of the class, as represented in your organization.
The name of the class.
When the class starts (in Unix epoch time).
When the class ends (in Unix epoch time).
When labs can no longer be associated with the class (in Unix epoch time).
The ID you use to identify the class instructor in your external system.
The first name of the class instructor.
The last name of the class instructor.
The maximum number of active lab instances than can exist concurrently within this class context. This is optional in most situations. However, it is required for classes that host shared environments. If a shared lab is launched against a class that doesn't have this value set, the launch will fail.
An optional array of lab profile IDs. When provided, Skillable will know that these labs are available within the class. You do not need to set this value in order to launch labs against the class. This is useful when using Skillable to display a class attendance page, or when consuming shared class environments and you want the shared environment launch link to appear on the class monitor page.
OK Response.
{
"Id": "4449999",
"Name": "Sample Class",
"Start": 1333267200,
"StartTime": "/Date(1333267200000)/",
"End": 1333299600,
"EndTime": "/Date(1333299600000)/",
"Expires": 1335978000,
"ExpiresTime": "/Date(1335978000000)/",
"Instructor": null,
"Url": null,
"MaxActiveLabInstances": null,
"AvailableLabs": [
"17390",
"17432"
],
"Status": 1,
"Error": null
}
{
"Id": "4449999",
"Name": "Sample Class",
"Start": 1333267200,
"StartTime": "/Date(1333267200000)/",
"End": 1333299600,
"EndTime": "/Date(1333299600000)/",
"Expires": 1335978000,
"ExpiresTime": "/Date(1335978000000)/",
"Instructor": {
"Id": "65214",
"FirstName": "Demo",
"LastName": "Instructor"
},
"Url": null,
"MaxActiveLabInstances": null,
"AvailableLabs": [
"17390",
"17432"
],
"Status": 1,
"Error": null
}
The unique identifier of the class, as represented in your organization.
The name of the class.
When the class starts (in Unix epoch time).
When the class starts (in Unix epoch time).
When the class ends (in Unix epoch time).
When the class ends (in Unix epoch time).
When labs can no longer be associated with the class (in Unix epoch time).
When labs can no longer be associated with the class (in Unix epoch time).
The ID of the class instructor in your external system.
The first name of the class instructor.
The last name of the class instructor.
This response property is deprecated. Unless explicitly allowed by Skillable, this field will always be null. To obtain a class URL, use the ClassAccessUrl API command.
The maximum number of active lab instances than can exist concurrently within this class context.
The IDs of labs available for launch within the class when using the class attendance UI directly in Skillable (generally not used for class deliveries managed outside of Skillable).
Indicates the status of the API request.
0 = Error
1 = Success
In the event of an error, this will contain a detailed error message.