Learning Tracks¶
A learning track record holds the following information:
- is_deleted
- description
- required
- company_id
- updated_at
- type
- id
- name
Getting Learning Tracks¶
- GET /api/v2/events/learning_tracks/:id¶
statuscode 200: | no error |
---|---|
statuscode 404: | does not exist |
Using Python:
import json
import requests
response = requests.get('http://YOUR-SUBDOMAIN.administrateapp.com/api/v2/event/learning_tracks/4',
auth=('<username>', '<password>'))
print response.json
Using Curl:
curl https://YOUR-SUBDOMAIN.administrateapp.com/api/v2/event/learning_tracks/4 -k -u (login):(password)
Using PHP:
<?php
$credentials = '(username):(password)';
$url = 'https://YOUR-SUBDOMAIN.administrateapp.com/api/v2/event/learning_tracks/4';
$options = array(
'http' => array(
'method' => 'GET',
'header'=> "Accept: application/json\r\n" .
"Authorization: Basic " . base64_encode($credentials)
)
);
$context = stream_context_create($options);
$result = file_get_contents($url, false, $context);
echo $result;
Example response:
{
"is_deleted": false,
"description": "A refined experience indeed!",
"required": null,
"updated_at": null,
"company_id": null,
"type": "serial",
"id": 4,
"name": "Fine Track"
}
Getting more than one Learning Track¶
- GET /api/v2/events/learning_tracks¶
statuscode 200: | no error |
---|---|
statuscode 404: | does not exist |
Using Python:
import json
import requests
response = requests.get('http://YOUR-SUBDOMAIN.administrateapp.com/api/v2/event/learning_tracks',
auth=('<username>', '<password>'))
print response.json
Using Curl:
curl https://YOUR-SUBDOMAIN.administrateapp.com/api/v2/event/learning_tracks -k -u (login):(password)
Using PHP:
<?php
$credentials = '(username):(password)';
$url = 'https://YOUR-SUBDOMAIN.administrateapp.com/api/v2/event/learning_tracks';
$options = array(
'http' => array(
'method' => 'GET',
'header'=> "Accept: application/json\r\n" .
"Authorization: Basic " . base64_encode($credentials)
)
);
$context = stream_context_create($options);
$result = file_get_contents($url, false, $context);
echo $result;
Example response:
[
{
"is_deleted": false,
"description": "A refined experience indeed!",
"required": null,
"updated_at": null,
"company_id": null,
"type": "serial",
"id": 2,
"name": "Fine Track"
},
{
"is_deleted": false,
"description": "A true challange for the mighty!",
"required": null,
"updated_at": null,
"company_id": null,
"type": "parallel",
"id": 3,
"name": "Hard Track"
}
]