NFCdance REST API

Reader

postEvent

Odošle udalosť z NFC čítačky

Tento endpoint používa HW zariadenie na čítanie NFC kariet. Obsahom musí byť TAG, ktorý chce zaevidovať do systéme nfcDance. NFC Čítačka sa auutorizuje svojím unikátnym ID, a to v hlavičke požiadavky (kľúč X-API-READER)


/event

Usage and SDK Samples

curl -X POST\
-H "X-API-READER: [[apiKey]]"\
 -H "Authorization: Bearer [[accessToken]]"\
-H "Accept: application/json"\
-H "Content-Type: application/json"\
"http://localhost:9090/nfcdance/www/api/event"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.ReaderApi;

import java.io.File;
import java.util.*;

public class ReaderApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: ApiKeyAuth
        ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth");
        ApiKeyAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //ApiKeyAuth.setApiKeyPrefix("Token");


        ReaderApi apiInstance = new ReaderApi();
        TagRequest body = ; // TagRequest | Obsah NFC karty - identifikátor
        try {
            Event result = apiInstance.postEvent(body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ReaderApi#postEvent");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.ReaderApi;

public class ReaderApiExample {

    public static void main(String[] args) {
        ReaderApi apiInstance = new ReaderApi();
        TagRequest body = ; // TagRequest | Obsah NFC karty - identifikátor
        try {
            Event result = apiInstance.postEvent(body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ReaderApi#postEvent");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure API key authorization: (authentication scheme: ApiKeyAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"X-API-READER"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"X-API-READER"];
TagRequest *body = ; // Obsah NFC karty - identifikátor (optional)

ReaderApi *apiInstance = [[ReaderApi alloc] init];

// Odošle udalosť z NFC čítačky
[apiInstance postEventWith:body
              completionHandler: ^(Event output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var NfCdanceRestApi = require('nf_cdance_rest_api');
var defaultClient = NfCdanceRestApi.ApiClient.instance;

// Configure API key authorization: ApiKeyAuth
var ApiKeyAuth = defaultClient.authentications['ApiKeyAuth'];
ApiKeyAuth.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ApiKeyAuth.apiKeyPrefix['X-API-READER'] = "Token"


var api = new NfCdanceRestApi.ReaderApi()
var opts = { 
  'body':  // {{TagRequest}} Obsah NFC karty - identifikátor
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.postEvent(opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class postEventExample
    {
        public void main()
        {

            // Configure API key authorization: ApiKeyAuth
            Configuration.Default.ApiKey.Add("X-API-READER", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("X-API-READER", "Bearer");

            var apiInstance = new ReaderApi();
            var body = new TagRequest(); // TagRequest | Obsah NFC karty - identifikátor (optional) 

            try
            {
                // Odošle udalosť z NFC čítačky
                Event result = apiInstance.postEvent(body);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ReaderApi.postEvent: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: ApiKeyAuth
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('X-API-READER', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-API-READER', 'Bearer');

$api_instance = new Swagger\Client\ApiReaderApi();
$body = ; // TagRequest | Obsah NFC karty - identifikátor

try {
    $result = $api_instance->postEvent($body);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ReaderApi->postEvent: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::ReaderApi;

# Configure API key authorization: ApiKeyAuth
$WWW::SwaggerClient::Configuration::api_key->{'X-API-READER'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::SwaggerClient::Configuration::api_key_prefix->{'X-API-READER'} = "Bearer";

my $api_instance = WWW::SwaggerClient::ReaderApi->new();
my $body = WWW::SwaggerClient::Object::TagRequest->new(); # TagRequest | Obsah NFC karty - identifikátor

eval { 
    my $result = $api_instance->postEvent(body => $body);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling ReaderApi->postEvent: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: ApiKeyAuth
swagger_client.configuration.api_key['X-API-READER'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['X-API-READER'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.ReaderApi()
body =  # TagRequest | Obsah NFC karty - identifikátor (optional)

try: 
    # Odošle udalosť z NFC čítačky
    api_response = api_instance.post_event(body=body)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ReaderApi->postEvent: %s\n" % e)

Parameters

Body parameters
Name Description
body

Responses

Status: 200 - Úspešná odpoveď - udalosť do dochádzky bola zaregistrovaná.

Status: 404 - Not found: Tag does not exists, User does not exists. Obsah časti 'status' je meno priradené k tagu. Obsah časti 'message' je chybová hláška (po slovensky, bez diakritiky).

Status: 422 - Pri pokuse o viacnásobné zaregistrovanie dochádzaky: Event is already logged, No records

Status: 401 - Authorization required. Chýba alebo je chybný X-API-READER kľúč.


System

createUser

Vytvorí nového usera

Vytvorí nového usera. Parametrom tohto endpointu je údaj, ktorý môže obsahovať meno, priezvisko (alebo oboje) alebo idemtifikačné číslo v is.stuba.sk. Systém NFCdance si overá, či daný používateľ existuje v IS a následne ho pridá do svojej databáze. Z is.stuba.sk sa číta výhradne len meno, priezvisko a osobné číslo. K ostatným údajom nie je možný prístup.


/user

Usage and SDK Samples

curl -X POST\
 -H "Authorization: Bearer [[accessToken]]"\
-H "Accept: application/json"\
-H "Content-Type: application/json"\
"http://localhost:9090/nfcdance/www/api/user"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.SystemApi;

import java.io.File;
import java.util.*;

public class SystemApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();


        SystemApi apiInstance = new SystemApi();
        UserRequest body = ; // UserRequest | Existenciu používateľa sa overí na is.stuba.sk. Následne sa údaje (login,meno,priezvisko) uloží do databázy NFCdance. Takto vytvorený používateľ namá prístup do systému NFCdacnce cez web rozhranie, pretože nemá nastavené heslo. V prípade, že server is.stuba.sk odpovie s viac ako jedným kandidátom je vrátených chybový stav 400 s informáciou 'Multiple candidates. Use your ID"'. V tomto prípade je potebné meno bližšie špecifikovať (uviesť celé meno) alebo uviesť identifikačné číslo v IS.
        try {
            User result = apiInstance.createUser(body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling SystemApi#createUser");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.SystemApi;

public class SystemApiExample {

    public static void main(String[] args) {
        SystemApi apiInstance = new SystemApi();
        UserRequest body = ; // UserRequest | Existenciu používateľa sa overí na is.stuba.sk. Následne sa údaje (login,meno,priezvisko) uloží do databázy NFCdance. Takto vytvorený používateľ namá prístup do systému NFCdacnce cez web rozhranie, pretože nemá nastavené heslo. V prípade, že server is.stuba.sk odpovie s viac ako jedným kandidátom je vrátených chybový stav 400 s informáciou 'Multiple candidates. Use your ID"'. V tomto prípade je potebné meno bližšie špecifikovať (uviesť celé meno) alebo uviesť identifikačné číslo v IS.
        try {
            User result = apiInstance.createUser(body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling SystemApi#createUser");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
UserRequest *body = ; // Existenciu používateľa sa overí na is.stuba.sk. Následne sa údaje (login,meno,priezvisko) uloží do databázy NFCdance. Takto vytvorený používateľ namá prístup do systému NFCdacnce cez web rozhranie, pretože nemá nastavené heslo. V prípade, že server is.stuba.sk odpovie s viac ako jedným kandidátom je vrátených chybový stav 400 s informáciou 'Multiple candidates. Use your ID"'. V tomto prípade je potebné meno bližšie špecifikovať (uviesť celé meno) alebo uviesť identifikačné číslo v IS.

SystemApi *apiInstance = [[SystemApi alloc] init];

// Vytvorí nového usera
[apiInstance createUserWith:body
              completionHandler: ^(User output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var NfCdanceRestApi = require('nf_cdance_rest_api');
var defaultClient = NfCdanceRestApi.ApiClient.instance;


var api = new NfCdanceRestApi.SystemApi()
var body = ; // {{UserRequest}} Existenciu používateľa sa overí na is.stuba.sk. Následne sa údaje (login,meno,priezvisko) uloží do databázy NFCdance. Takto vytvorený používateľ namá prístup do systému NFCdacnce cez web rozhranie, pretože nemá nastavené heslo. V prípade, že server is.stuba.sk odpovie s viac ako jedným kandidátom je vrátených chybový stav 400 s informáciou 'Multiple candidates. Use your ID"'. V tomto prípade je potebné meno bližšie špecifikovať (uviesť celé meno) alebo uviesť identifikačné číslo v IS.

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.createUser(body, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class createUserExample
    {
        public void main()
        {


            var apiInstance = new SystemApi();
            var body = new UserRequest(); // UserRequest | Existenciu používateľa sa overí na is.stuba.sk. Následne sa údaje (login,meno,priezvisko) uloží do databázy NFCdance. Takto vytvorený používateľ namá prístup do systému NFCdacnce cez web rozhranie, pretože nemá nastavené heslo. V prípade, že server is.stuba.sk odpovie s viac ako jedným kandidátom je vrátených chybový stav 400 s informáciou 'Multiple candidates. Use your ID"'. V tomto prípade je potebné meno bližšie špecifikovať (uviesť celé meno) alebo uviesť identifikačné číslo v IS.

            try
            {
                // Vytvorí nového usera
                User result = apiInstance.createUser(body);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling SystemApi.createUser: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');


$api_instance = new Swagger\Client\ApiSystemApi();
$body = ; // UserRequest | Existenciu používateľa sa overí na is.stuba.sk. Následne sa údaje (login,meno,priezvisko) uloží do databázy NFCdance. Takto vytvorený používateľ namá prístup do systému NFCdacnce cez web rozhranie, pretože nemá nastavené heslo. V prípade, že server is.stuba.sk odpovie s viac ako jedným kandidátom je vrátených chybový stav 400 s informáciou 'Multiple candidates. Use your ID"'. V tomto prípade je potebné meno bližšie špecifikovať (uviesť celé meno) alebo uviesť identifikačné číslo v IS.

try {
    $result = $api_instance->createUser($body);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling SystemApi->createUser: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::SystemApi;


my $api_instance = WWW::SwaggerClient::SystemApi->new();
my $body = WWW::SwaggerClient::Object::UserRequest->new(); # UserRequest | Existenciu používateľa sa overí na is.stuba.sk. Následne sa údaje (login,meno,priezvisko) uloží do databázy NFCdance. Takto vytvorený používateľ namá prístup do systému NFCdacnce cez web rozhranie, pretože nemá nastavené heslo. V prípade, že server is.stuba.sk odpovie s viac ako jedným kandidátom je vrátených chybový stav 400 s informáciou 'Multiple candidates. Use your ID"'. V tomto prípade je potebné meno bližšie špecifikovať (uviesť celé meno) alebo uviesť identifikačné číslo v IS.

eval { 
    my $result = $api_instance->createUser(body => $body);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling SystemApi->createUser: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint


# create an instance of the API class
api_instance = swagger_client.SystemApi()
body =  # UserRequest | Existenciu používateľa sa overí na is.stuba.sk. Následne sa údaje (login,meno,priezvisko) uloží do databázy NFCdance. Takto vytvorený používateľ namá prístup do systému NFCdacnce cez web rozhranie, pretože nemá nastavené heslo. V prípade, že server is.stuba.sk odpovie s viac ako jedným kandidátom je vrátených chybový stav 400 s informáciou 'Multiple candidates. Use your ID"'. V tomto prípade je potebné meno bližšie špecifikovať (uviesť celé meno) alebo uviesť identifikačné číslo v IS.

try: 
    # Vytvorí nového usera
    api_response = api_instance.create_user(body)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling SystemApi->createUser: %s\n" % e)

Parameters

Body parameters
Name Description
body *

Responses

Status: 200 - Úspešná odpoveď - bol vytvorený nový používateľ v sytéme NFCdance. S systéme sú evidované len údaje, ktoré sa nachádzajú v tejto odpovedi.

Status: 400 - Bad request: Malformed request data, Inconsistent request data, Malformed data from is.stuba.sk, Multiple candidates. Use your ID

Status: 404 - Not found: Malformed data from is.stuba.sk, User not found, Incomplete register data from IS

Status: 401 - Unahthorized


deleteSubjectGroup

Odoberie skupinu z predmetu

Zmaže študijnú skupinu preradinú do predmetu.


/subject/{subjectId}/group/{group}

Usage and SDK Samples

curl -X DELETE\
 -H "Authorization: Bearer [[accessToken]]"\
-H "Accept: application/json"\
"http://localhost:9090/nfcdance/www/api/subject/{subjectId}/group/{group}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.SystemApi;

import java.io.File;
import java.util.*;

public class SystemApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();


        SystemApi apiInstance = new SystemApi();
        Integer subjectId = 56; // Integer | ID predmetu, z ktorého sa bude odoberať existujúca skupina.
        Integer group = 56; // Integer | ID skupiny, ktorá sa bude mazať
        try {
            StatusResponse result = apiInstance.deleteSubjectGroup(subjectId, group);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling SystemApi#deleteSubjectGroup");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.SystemApi;

public class SystemApiExample {

    public static void main(String[] args) {
        SystemApi apiInstance = new SystemApi();
        Integer subjectId = 56; // Integer | ID predmetu, z ktorého sa bude odoberať existujúca skupina.
        Integer group = 56; // Integer | ID skupiny, ktorá sa bude mazať
        try {
            StatusResponse result = apiInstance.deleteSubjectGroup(subjectId, group);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling SystemApi#deleteSubjectGroup");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
Integer *subjectId = 56; // ID predmetu, z ktorého sa bude odoberať existujúca skupina.
Integer *group = 56; // ID skupiny, ktorá sa bude mazať

SystemApi *apiInstance = [[SystemApi alloc] init];

// Odoberie skupinu z predmetu
[apiInstance deleteSubjectGroupWith:subjectId
    group:group
              completionHandler: ^(StatusResponse output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var NfCdanceRestApi = require('nf_cdance_rest_api');
var defaultClient = NfCdanceRestApi.ApiClient.instance;


var api = new NfCdanceRestApi.SystemApi()
var subjectId = 56; // {{Integer}} ID predmetu, z ktorého sa bude odoberať existujúca skupina.
var group = 56; // {{Integer}} ID skupiny, ktorá sa bude mazať

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.deleteSubjectGroup(subjectId, group, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class deleteSubjectGroupExample
    {
        public void main()
        {


            var apiInstance = new SystemApi();
            var subjectId = 56;  // Integer | ID predmetu, z ktorého sa bude odoberať existujúca skupina.
            var group = 56;  // Integer | ID skupiny, ktorá sa bude mazať

            try
            {
                // Odoberie skupinu z predmetu
                StatusResponse result = apiInstance.deleteSubjectGroup(subjectId, group);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling SystemApi.deleteSubjectGroup: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');


$api_instance = new Swagger\Client\ApiSystemApi();
$subjectId = 56; // Integer | ID predmetu, z ktorého sa bude odoberať existujúca skupina.
$group = 56; // Integer | ID skupiny, ktorá sa bude mazať

try {
    $result = $api_instance->deleteSubjectGroup($subjectId, $group);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling SystemApi->deleteSubjectGroup: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::SystemApi;


my $api_instance = WWW::SwaggerClient::SystemApi->new();
my $subjectId = 56; # Integer | ID predmetu, z ktorého sa bude odoberať existujúca skupina.
my $group = 56; # Integer | ID skupiny, ktorá sa bude mazať

eval { 
    my $result = $api_instance->deleteSubjectGroup(subjectId => $subjectId, group => $group);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling SystemApi->deleteSubjectGroup: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint


# create an instance of the API class
api_instance = swagger_client.SystemApi()
subjectId = 56 # Integer | ID predmetu, z ktorého sa bude odoberať existujúca skupina.
group = 56 # Integer | ID skupiny, ktorá sa bude mazať

try: 
    # Odoberie skupinu z predmetu
    api_response = api_instance.delete_subject_group(subjectId, group)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling SystemApi->deleteSubjectGroup: %s\n" % e)

Parameters

Path parameters
Name Description
subjectId*
Integer
ID predmetu, z ktorého sa bude odoberať existujúca skupina.
Required
group*
Integer
ID skupiny, ktorá sa bude mazať
Required

Responses

Status: 200 - Úspešná odpoveď - podarilo sa zmazať skupinu z premetu. Táto odpoveď sa odošle aj keď požadovaná skupina neexistuje. Dôvod - po ukonšení tohto volania skupina neexistuje, čo bolo žiadané. V odpovedi bude status=OK, message=deleted

Status: 401 - Unahthorized

Status: 404 - Neexistujúci predmet


deleteSubjectGroupStudents

Odoberie priradenie študenta do študjnej skupiny.

Zruší priradenie študenta do študijnej skupiny.


/subject/{subjectId}/group/{groupId}/student/{userId}

Usage and SDK Samples

curl -X DELETE\
 -H "Authorization: Bearer [[accessToken]]"\
-H "Accept: application/json"\
"http://localhost:9090/nfcdance/www/api/subject/{subjectId}/group/{groupId}/student/{userId}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.SystemApi;

import java.io.File;
import java.util.*;

public class SystemApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();


        SystemApi apiInstance = new SystemApi();
        Integer subjectId = 56; // Integer | ID predmetu, z ktorého sa bude odoberať existujúca skupina.
        Integer groupId = 56; // Integer | ID študijnej skupiny, v ktorej je aktuálne priradený.
        Integer userId = 56; // Integer | ID študenta, ktorý sa odoberie z aktuálnej študijnej skupiny.
        try {
            StatusResponse result = apiInstance.deleteSubjectGroupStudents(subjectId, groupId, userId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling SystemApi#deleteSubjectGroupStudents");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.SystemApi;

public class SystemApiExample {

    public static void main(String[] args) {
        SystemApi apiInstance = new SystemApi();
        Integer subjectId = 56; // Integer | ID predmetu, z ktorého sa bude odoberať existujúca skupina.
        Integer groupId = 56; // Integer | ID študijnej skupiny, v ktorej je aktuálne priradený.
        Integer userId = 56; // Integer | ID študenta, ktorý sa odoberie z aktuálnej študijnej skupiny.
        try {
            StatusResponse result = apiInstance.deleteSubjectGroupStudents(subjectId, groupId, userId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling SystemApi#deleteSubjectGroupStudents");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
Integer *subjectId = 56; // ID predmetu, z ktorého sa bude odoberať existujúca skupina.
Integer *groupId = 56; // ID študijnej skupiny, v ktorej je aktuálne priradený.
Integer *userId = 56; // ID študenta, ktorý sa odoberie z aktuálnej študijnej skupiny.

SystemApi *apiInstance = [[SystemApi alloc] init];

// Odoberie priradenie študenta do študjnej skupiny.
[apiInstance deleteSubjectGroupStudentsWith:subjectId
    groupId:groupId
    userId:userId
              completionHandler: ^(StatusResponse output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var NfCdanceRestApi = require('nf_cdance_rest_api');
var defaultClient = NfCdanceRestApi.ApiClient.instance;


var api = new NfCdanceRestApi.SystemApi()
var subjectId = 56; // {{Integer}} ID predmetu, z ktorého sa bude odoberať existujúca skupina.
var groupId = 56; // {{Integer}} ID študijnej skupiny, v ktorej je aktuálne priradený.
var userId = 56; // {{Integer}} ID študenta, ktorý sa odoberie z aktuálnej študijnej skupiny.

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.deleteSubjectGroupStudents(subjectId, groupId, userId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class deleteSubjectGroupStudentsExample
    {
        public void main()
        {


            var apiInstance = new SystemApi();
            var subjectId = 56;  // Integer | ID predmetu, z ktorého sa bude odoberať existujúca skupina.
            var groupId = 56;  // Integer | ID študijnej skupiny, v ktorej je aktuálne priradený.
            var userId = 56;  // Integer | ID študenta, ktorý sa odoberie z aktuálnej študijnej skupiny.

            try
            {
                // Odoberie priradenie študenta do študjnej skupiny.
                StatusResponse result = apiInstance.deleteSubjectGroupStudents(subjectId, groupId, userId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling SystemApi.deleteSubjectGroupStudents: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');


$api_instance = new Swagger\Client\ApiSystemApi();
$subjectId = 56; // Integer | ID predmetu, z ktorého sa bude odoberať existujúca skupina.
$groupId = 56; // Integer | ID študijnej skupiny, v ktorej je aktuálne priradený.
$userId = 56; // Integer | ID študenta, ktorý sa odoberie z aktuálnej študijnej skupiny.

try {
    $result = $api_instance->deleteSubjectGroupStudents($subjectId, $groupId, $userId);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling SystemApi->deleteSubjectGroupStudents: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::SystemApi;


my $api_instance = WWW::SwaggerClient::SystemApi->new();
my $subjectId = 56; # Integer | ID predmetu, z ktorého sa bude odoberať existujúca skupina.
my $groupId = 56; # Integer | ID študijnej skupiny, v ktorej je aktuálne priradený.
my $userId = 56; # Integer | ID študenta, ktorý sa odoberie z aktuálnej študijnej skupiny.

eval { 
    my $result = $api_instance->deleteSubjectGroupStudents(subjectId => $subjectId, groupId => $groupId, userId => $userId);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling SystemApi->deleteSubjectGroupStudents: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint


# create an instance of the API class
api_instance = swagger_client.SystemApi()
subjectId = 56 # Integer | ID predmetu, z ktorého sa bude odoberať existujúca skupina.
groupId = 56 # Integer | ID študijnej skupiny, v ktorej je aktuálne priradený.
userId = 56 # Integer | ID študenta, ktorý sa odoberie z aktuálnej študijnej skupiny.

try: 
    # Odoberie priradenie študenta do študjnej skupiny.
    api_response = api_instance.delete_subject_group_students(subjectId, groupId, userId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling SystemApi->deleteSubjectGroupStudents: %s\n" % e)

Parameters

Path parameters
Name Description
subjectId*
Integer
ID predmetu, z ktorého sa bude odoberať existujúca skupina.
Required
groupId*
Integer
ID študijnej skupiny, v ktorej je aktuálne priradený.
Required
userId*
Integer
ID študenta, ktorý sa odoberie z aktuálnej študijnej skupiny.
Required

Responses

Status: 200 - Úspešná odpoveď - podarilo odobrať študenta zo študijnej skupiny. V odpovedi bude status=OK, message=Deleted

Status: 401 - Unahthorized

Status: 404 - Neexistujúci predmet, Neexistujúca skupina


deleteSubjectParticipant

Odoberie študenta z predmetu

Priradí študenta s userId do predmetu s subjectId.


/subject/{subjectId}/participants/{userId}

Usage and SDK Samples

curl -X DELETE\
 -H "Authorization: Bearer [[accessToken]]"\
-H "Accept: application/json"\
"http://localhost:9090/nfcdance/www/api/subject/{subjectId}/participants/{userId}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.SystemApi;

import java.io.File;
import java.util.*;

public class SystemApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();


        SystemApi apiInstance = new SystemApi();
        Integer subjectId = 56; // Integer | ID predmetu, z ktorého sa bude odoberať existujúci študent.
        Integer userId = 56; // Integer | Id študenta, ktorý sa odobeie z predmetu.
        try {
            StatusResponse result = apiInstance.deleteSubjectParticipant(subjectId, userId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling SystemApi#deleteSubjectParticipant");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.SystemApi;

public class SystemApiExample {

    public static void main(String[] args) {
        SystemApi apiInstance = new SystemApi();
        Integer subjectId = 56; // Integer | ID predmetu, z ktorého sa bude odoberať existujúci študent.
        Integer userId = 56; // Integer | Id študenta, ktorý sa odobeie z predmetu.
        try {
            StatusResponse result = apiInstance.deleteSubjectParticipant(subjectId, userId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling SystemApi#deleteSubjectParticipant");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
Integer *subjectId = 56; // ID predmetu, z ktorého sa bude odoberať existujúci študent.
Integer *userId = 56; // Id študenta, ktorý sa odobeie z predmetu.

SystemApi *apiInstance = [[SystemApi alloc] init];

// Odoberie študenta z predmetu
[apiInstance deleteSubjectParticipantWith:subjectId
    userId:userId
              completionHandler: ^(StatusResponse output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var NfCdanceRestApi = require('nf_cdance_rest_api');
var defaultClient = NfCdanceRestApi.ApiClient.instance;


var api = new NfCdanceRestApi.SystemApi()
var subjectId = 56; // {{Integer}} ID predmetu, z ktorého sa bude odoberať existujúci študent.
var userId = 56; // {{Integer}} Id študenta, ktorý sa odobeie z predmetu.

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.deleteSubjectParticipant(subjectId, userId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class deleteSubjectParticipantExample
    {
        public void main()
        {


            var apiInstance = new SystemApi();
            var subjectId = 56;  // Integer | ID predmetu, z ktorého sa bude odoberať existujúci študent.
            var userId = 56;  // Integer | Id študenta, ktorý sa odobeie z predmetu.

            try
            {
                // Odoberie študenta z predmetu
                StatusResponse result = apiInstance.deleteSubjectParticipant(subjectId, userId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling SystemApi.deleteSubjectParticipant: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');


$api_instance = new Swagger\Client\ApiSystemApi();
$subjectId = 56; // Integer | ID predmetu, z ktorého sa bude odoberať existujúci študent.
$userId = 56; // Integer | Id študenta, ktorý sa odobeie z predmetu.

try {
    $result = $api_instance->deleteSubjectParticipant($subjectId, $userId);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling SystemApi->deleteSubjectParticipant: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::SystemApi;


my $api_instance = WWW::SwaggerClient::SystemApi->new();
my $subjectId = 56; # Integer | ID predmetu, z ktorého sa bude odoberať existujúci študent.
my $userId = 56; # Integer | Id študenta, ktorý sa odobeie z predmetu.

eval { 
    my $result = $api_instance->deleteSubjectParticipant(subjectId => $subjectId, userId => $userId);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling SystemApi->deleteSubjectParticipant: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint


# create an instance of the API class
api_instance = swagger_client.SystemApi()
subjectId = 56 # Integer | ID predmetu, z ktorého sa bude odoberať existujúci študent.
userId = 56 # Integer | Id študenta, ktorý sa odobeie z predmetu.

try: 
    # Odoberie študenta z predmetu
    api_response = api_instance.delete_subject_participant(subjectId, userId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling SystemApi->deleteSubjectParticipant: %s\n" % e)

Parameters

Path parameters
Name Description
subjectId*
Integer
ID predmetu, z ktorého sa bude odoberať existujúci študent.
Required
userId*
Integer
Id študenta, ktorý sa odobeie z predmetu.
Required

Responses

Status: 200 - Úspešná odpoveď - podarilo sa odobrať študenta z premetu. Táto operácia sa podarí nezávisle od toho, či sa šudent pôvodne v predmete nacházal V oboch prípadoch (študent na predmete bol/nebol priradený) je výsledkom, že študent už na predmete nie je priradený. Atribút message obsahuje správu - Removed.

Status: 401 - Unahthorized

Status: 404 - Neexistujúci predmet alebo používateľ


getReader

Zobrazí informácie o čítačke

Do systému vloží záznam o novej čítačke. Čítačka je identifikovaná svojím HW kľúčom.


/reader/{mac}

Usage and SDK Samples

curl -X GET\
 -H "Authorization: Bearer [[accessToken]]"\
-H "Accept: application/json"\
"http://localhost:9090/nfcdance/www/api/reader/{mac}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.SystemApi;

import java.io.File;
import java.util.*;

public class SystemApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();


        SystemApi apiInstance = new SystemApi();
        String mac = mac_example; // String | HW adresa (MAC adresa) čítačky
        try {
            Reader result = apiInstance.getReader(mac);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling SystemApi#getReader");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.SystemApi;

public class SystemApiExample {

    public static void main(String[] args) {
        SystemApi apiInstance = new SystemApi();
        String mac = mac_example; // String | HW adresa (MAC adresa) čítačky
        try {
            Reader result = apiInstance.getReader(mac);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling SystemApi#getReader");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
String *mac = mac_example; // HW adresa (MAC adresa) čítačky

SystemApi *apiInstance = [[SystemApi alloc] init];

// Zobrazí informácie o čítačke
[apiInstance getReaderWith:mac
              completionHandler: ^(Reader output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var NfCdanceRestApi = require('nf_cdance_rest_api');
var defaultClient = NfCdanceRestApi.ApiClient.instance;


var api = new NfCdanceRestApi.SystemApi()
var mac = mac_example; // {{String}} HW adresa (MAC adresa) čítačky

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getReader(mac, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getReaderExample
    {
        public void main()
        {


            var apiInstance = new SystemApi();
            var mac = mac_example;  // String | HW adresa (MAC adresa) čítačky

            try
            {
                // Zobrazí informácie o čítačke
                Reader result = apiInstance.getReader(mac);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling SystemApi.getReader: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');


$api_instance = new Swagger\Client\ApiSystemApi();
$mac = mac_example; // String | HW adresa (MAC adresa) čítačky

try {
    $result = $api_instance->getReader($mac);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling SystemApi->getReader: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::SystemApi;


my $api_instance = WWW::SwaggerClient::SystemApi->new();
my $mac = mac_example; # String | HW adresa (MAC adresa) čítačky

eval { 
    my $result = $api_instance->getReader(mac => $mac);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling SystemApi->getReader: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint


# create an instance of the API class
api_instance = swagger_client.SystemApi()
mac = mac_example # String | HW adresa (MAC adresa) čítačky

try: 
    # Zobrazí informácie o čítačke
    api_response = api_instance.get_reader(mac)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling SystemApi->getReader: %s\n" % e)

Parameters

Path parameters
Name Description
mac*
String
HW adresa (MAC adresa) čítačky
Required

Responses

Status: 200 - Úspešná odpoveď - zoznam aktívnych predmetov.

Status: 401 - Unahthorized

Status: 404 - Not found


getSubject

Zoznam aktívnych predmetov

Zoznam všetkých aktívnych predmetov. Dostupné len pre oprávnenie admin.


/subject/{id}

Usage and SDK Samples

curl -X GET\
 -H "Authorization: Bearer [[accessToken]]"\
-H "Accept: application/json"\
"http://localhost:9090/nfcdance/www/api/subject/{id}?q="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.SystemApi;

import java.io.File;
import java.util.*;

public class SystemApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();


        SystemApi apiInstance = new SystemApi();
        Integer id = 56; // Integer | ID predmetu, pre ktorý sa vráti info. V prípade, že sa parameter vynechá, alebo sa uvedie 0, tak byde aktívne vyhľadávanie podľa parametra q.
        String q = q_example; // String | Filter pre vyhľadávanie. Filter je platný názov alebo skratku predmetu. Filter je aktívny len v prípade, že id=0 alebo nie je uvedené.
        try {
            array[Subject] result = apiInstance.getSubject(id, q);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling SystemApi#getSubject");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.SystemApi;

public class SystemApiExample {

    public static void main(String[] args) {
        SystemApi apiInstance = new SystemApi();
        Integer id = 56; // Integer | ID predmetu, pre ktorý sa vráti info. V prípade, že sa parameter vynechá, alebo sa uvedie 0, tak byde aktívne vyhľadávanie podľa parametra q.
        String q = q_example; // String | Filter pre vyhľadávanie. Filter je platný názov alebo skratku predmetu. Filter je aktívny len v prípade, že id=0 alebo nie je uvedené.
        try {
            array[Subject] result = apiInstance.getSubject(id, q);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling SystemApi#getSubject");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
Integer *id = 56; // ID predmetu, pre ktorý sa vráti info. V prípade, že sa parameter vynechá, alebo sa uvedie 0, tak byde aktívne vyhľadávanie podľa parametra q.
String *q = q_example; // Filter pre vyhľadávanie. Filter je platný názov alebo skratku predmetu. Filter je aktívny len v prípade, že id=0 alebo nie je uvedené. (optional)

SystemApi *apiInstance = [[SystemApi alloc] init];

// Zoznam aktívnych predmetov
[apiInstance getSubjectWith:id
    q:q
              completionHandler: ^(array[Subject] output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var NfCdanceRestApi = require('nf_cdance_rest_api');
var defaultClient = NfCdanceRestApi.ApiClient.instance;


var api = new NfCdanceRestApi.SystemApi()
var id = 56; // {{Integer}} ID predmetu, pre ktorý sa vráti info. V prípade, že sa parameter vynechá, alebo sa uvedie 0, tak byde aktívne vyhľadávanie podľa parametra q.
var opts = { 
  'q': q_example // {{String}} Filter pre vyhľadávanie. Filter je platný názov alebo skratku predmetu. Filter je aktívny len v prípade, že id=0 alebo nie je uvedené.
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getSubject(id, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getSubjectExample
    {
        public void main()
        {


            var apiInstance = new SystemApi();
            var id = 56;  // Integer | ID predmetu, pre ktorý sa vráti info. V prípade, že sa parameter vynechá, alebo sa uvedie 0, tak byde aktívne vyhľadávanie podľa parametra q.
            var q = q_example;  // String | Filter pre vyhľadávanie. Filter je platný názov alebo skratku predmetu. Filter je aktívny len v prípade, že id=0 alebo nie je uvedené. (optional) 

            try
            {
                // Zoznam aktívnych predmetov
                array[Subject] result = apiInstance.getSubject(id, q);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling SystemApi.getSubject: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');


$api_instance = new Swagger\Client\ApiSystemApi();
$id = 56; // Integer | ID predmetu, pre ktorý sa vráti info. V prípade, že sa parameter vynechá, alebo sa uvedie 0, tak byde aktívne vyhľadávanie podľa parametra q.
$q = q_example; // String | Filter pre vyhľadávanie. Filter je platný názov alebo skratku predmetu. Filter je aktívny len v prípade, že id=0 alebo nie je uvedené.

try {
    $result = $api_instance->getSubject($id, $q);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling SystemApi->getSubject: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::SystemApi;


my $api_instance = WWW::SwaggerClient::SystemApi->new();
my $id = 56; # Integer | ID predmetu, pre ktorý sa vráti info. V prípade, že sa parameter vynechá, alebo sa uvedie 0, tak byde aktívne vyhľadávanie podľa parametra q.
my $q = q_example; # String | Filter pre vyhľadávanie. Filter je platný názov alebo skratku predmetu. Filter je aktívny len v prípade, že id=0 alebo nie je uvedené.

eval { 
    my $result = $api_instance->getSubject(id => $id, q => $q);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling SystemApi->getSubject: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint


# create an instance of the API class
api_instance = swagger_client.SystemApi()
id = 56 # Integer | ID predmetu, pre ktorý sa vráti info. V prípade, že sa parameter vynechá, alebo sa uvedie 0, tak byde aktívne vyhľadávanie podľa parametra q.
q = q_example # String | Filter pre vyhľadávanie. Filter je platný názov alebo skratku predmetu. Filter je aktívny len v prípade, že id=0 alebo nie je uvedené. (optional)

try: 
    # Zoznam aktívnych predmetov
    api_response = api_instance.get_subject(id, q=q)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling SystemApi->getSubject: %s\n" % e)

Parameters

Path parameters
Name Description
id*
Integer
ID predmetu, pre ktorý sa vráti info. V prípade, že sa parameter vynechá, alebo sa uvedie 0, tak byde aktívne vyhľadávanie podľa parametra q.
Required
Query parameters
Name Description
q
String
Filter pre vyhľadávanie. Filter je platný názov alebo skratku predmetu. Filter je aktívny len v prípade, že id=0 alebo nie je uvedené.

Responses

Status: 200 - Úspešná odpoveď - zoznam aktívnych predmetov.

Status: 401 - Unahthorized


getSubjectGroupStudents

Zoznam študentov patriacich do študijnej skupiny

Zoznam študentov priradených do vybranej študijnej skupiny. Parameter {userId} sa v tomto endpointe ignoruje


/subject/{subjectId}/group/{groupId}/student/{userId}

Usage and SDK Samples

curl -X GET\
 -H "Authorization: Bearer [[accessToken]]"\
-H "Accept: application/json"\
"http://localhost:9090/nfcdance/www/api/subject/{subjectId}/group/{groupId}/student/{userId}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.SystemApi;

import java.io.File;
import java.util.*;

public class SystemApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();


        SystemApi apiInstance = new SystemApi();
        Integer subjectId = 56; // Integer | ID predmetu, pre ktorý sa vráti zoznam študijných skupín
        Integer groupId = 56; // Integer | ID študijnej skupiny
        Integer userId = 56; // Integer | ID študenta. V tomto edpointe ignorované.
        try {
            array[User] result = apiInstance.getSubjectGroupStudents(subjectId, groupId, userId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling SystemApi#getSubjectGroupStudents");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.SystemApi;

public class SystemApiExample {

    public static void main(String[] args) {
        SystemApi apiInstance = new SystemApi();
        Integer subjectId = 56; // Integer | ID predmetu, pre ktorý sa vráti zoznam študijných skupín
        Integer groupId = 56; // Integer | ID študijnej skupiny
        Integer userId = 56; // Integer | ID študenta. V tomto edpointe ignorované.
        try {
            array[User] result = apiInstance.getSubjectGroupStudents(subjectId, groupId, userId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling SystemApi#getSubjectGroupStudents");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
Integer *subjectId = 56; // ID predmetu, pre ktorý sa vráti zoznam študijných skupín
Integer *groupId = 56; // ID študijnej skupiny
Integer *userId = 56; // ID študenta. V tomto edpointe ignorované.

SystemApi *apiInstance = [[SystemApi alloc] init];

// Zoznam študentov patriacich do študijnej skupiny
[apiInstance getSubjectGroupStudentsWith:subjectId
    groupId:groupId
    userId:userId
              completionHandler: ^(array[User] output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var NfCdanceRestApi = require('nf_cdance_rest_api');
var defaultClient = NfCdanceRestApi.ApiClient.instance;


var api = new NfCdanceRestApi.SystemApi()
var subjectId = 56; // {{Integer}} ID predmetu, pre ktorý sa vráti zoznam študijných skupín
var groupId = 56; // {{Integer}} ID študijnej skupiny
var userId = 56; // {{Integer}} ID študenta. V tomto edpointe ignorované.

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getSubjectGroupStudents(subjectId, groupId, userId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getSubjectGroupStudentsExample
    {
        public void main()
        {


            var apiInstance = new SystemApi();
            var subjectId = 56;  // Integer | ID predmetu, pre ktorý sa vráti zoznam študijných skupín
            var groupId = 56;  // Integer | ID študijnej skupiny
            var userId = 56;  // Integer | ID študenta. V tomto edpointe ignorované.

            try
            {
                // Zoznam študentov patriacich do študijnej skupiny
                array[User] result = apiInstance.getSubjectGroupStudents(subjectId, groupId, userId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling SystemApi.getSubjectGroupStudents: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');


$api_instance = new Swagger\Client\ApiSystemApi();
$subjectId = 56; // Integer | ID predmetu, pre ktorý sa vráti zoznam študijných skupín
$groupId = 56; // Integer | ID študijnej skupiny
$userId = 56; // Integer | ID študenta. V tomto edpointe ignorované.

try {
    $result = $api_instance->getSubjectGroupStudents($subjectId, $groupId, $userId);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling SystemApi->getSubjectGroupStudents: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::SystemApi;


my $api_instance = WWW::SwaggerClient::SystemApi->new();
my $subjectId = 56; # Integer | ID predmetu, pre ktorý sa vráti zoznam študijných skupín
my $groupId = 56; # Integer | ID študijnej skupiny
my $userId = 56; # Integer | ID študenta. V tomto edpointe ignorované.

eval { 
    my $result = $api_instance->getSubjectGroupStudents(subjectId => $subjectId, groupId => $groupId, userId => $userId);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling SystemApi->getSubjectGroupStudents: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint


# create an instance of the API class
api_instance = swagger_client.SystemApi()
subjectId = 56 # Integer | ID predmetu, pre ktorý sa vráti zoznam študijných skupín
groupId = 56 # Integer | ID študijnej skupiny
userId = 56 # Integer | ID študenta. V tomto edpointe ignorované.

try: 
    # Zoznam študentov patriacich do študijnej skupiny
    api_response = api_instance.get_subject_group_students(subjectId, groupId, userId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling SystemApi->getSubjectGroupStudents: %s\n" % e)

Parameters

Path parameters
Name Description
subjectId*
Integer
ID predmetu, pre ktorý sa vráti zoznam študijných skupín
Required
groupId*
Integer
ID študijnej skupiny
Required
userId*
Integer
ID študenta. V tomto edpointe ignorované.
Required

Responses

Status: 200 - Úspešná odpoveď - zoznam študentov vo vybranej študijnej skupine.

Status: 401 - Unahthorized


getSubjectGroups

Zoznam študijných skupín predmetu

Zoznam študijných skupín, ktoré sú registrované pre vybraný predmet


/subject/{subjectId}/group

Usage and SDK Samples

curl -X GET\
 -H "Authorization: Bearer [[accessToken]]"\
-H "Accept: application/json"\
"http://localhost:9090/nfcdance/www/api/subject/{subjectId}/group"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.SystemApi;

import java.io.File;
import java.util.*;

public class SystemApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();


        SystemApi apiInstance = new SystemApi();
        Integer subjectId = 56; // Integer | ID predmetu, pre ktorý sa vráti zoznam študijných skupín
        try {
            array[Group] result = apiInstance.getSubjectGroups(subjectId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling SystemApi#getSubjectGroups");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.SystemApi;

public class SystemApiExample {

    public static void main(String[] args) {
        SystemApi apiInstance = new SystemApi();
        Integer subjectId = 56; // Integer | ID predmetu, pre ktorý sa vráti zoznam študijných skupín
        try {
            array[Group] result = apiInstance.getSubjectGroups(subjectId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling SystemApi#getSubjectGroups");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
Integer *subjectId = 56; // ID predmetu, pre ktorý sa vráti zoznam študijných skupín

SystemApi *apiInstance = [[SystemApi alloc] init];

// Zoznam študijných skupín predmetu
[apiInstance getSubjectGroupsWith:subjectId
              completionHandler: ^(array[Group] output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var NfCdanceRestApi = require('nf_cdance_rest_api');
var defaultClient = NfCdanceRestApi.ApiClient.instance;


var api = new NfCdanceRestApi.SystemApi()
var subjectId = 56; // {{Integer}} ID predmetu, pre ktorý sa vráti zoznam študijných skupín

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getSubjectGroups(subjectId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getSubjectGroupsExample
    {
        public void main()
        {


            var apiInstance = new SystemApi();
            var subjectId = 56;  // Integer | ID predmetu, pre ktorý sa vráti zoznam študijných skupín

            try
            {
                // Zoznam študijných skupín predmetu
                array[Group] result = apiInstance.getSubjectGroups(subjectId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling SystemApi.getSubjectGroups: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');


$api_instance = new Swagger\Client\ApiSystemApi();
$subjectId = 56; // Integer | ID predmetu, pre ktorý sa vráti zoznam študijných skupín

try {
    $result = $api_instance->getSubjectGroups($subjectId);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling SystemApi->getSubjectGroups: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::SystemApi;


my $api_instance = WWW::SwaggerClient::SystemApi->new();
my $subjectId = 56; # Integer | ID predmetu, pre ktorý sa vráti zoznam študijných skupín

eval { 
    my $result = $api_instance->getSubjectGroups(subjectId => $subjectId);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling SystemApi->getSubjectGroups: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint


# create an instance of the API class
api_instance = swagger_client.SystemApi()
subjectId = 56 # Integer | ID predmetu, pre ktorý sa vráti zoznam študijných skupín

try: 
    # Zoznam študijných skupín predmetu
    api_response = api_instance.get_subject_groups(subjectId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling SystemApi->getSubjectGroups: %s\n" % e)

Parameters

Path parameters
Name Description
subjectId*
Integer
ID predmetu, pre ktorý sa vráti zoznam študijných skupín
Required

Responses

Status: 200 - Úspešná odpoveď - zoznam študijných skupím.

Status: 401 - Unahthorized


getSubjectParticipants

Zoznam študentov predmetu

Zoznam študentov prihlásených na vybraný predmet


/subject/{subjectId}/participants/{userId}

Usage and SDK Samples

curl -X GET\
 -H "Authorization: Bearer [[accessToken]]"\
-H "Accept: application/json"\
"http://localhost:9090/nfcdance/www/api/subject/{subjectId}/participants/{userId}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.SystemApi;

import java.io.File;
import java.util.*;

public class SystemApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();


        SystemApi apiInstance = new SystemApi();
        Integer subjectId = 56; // Integer | ID predmetu, pre ktorý sa vráti zoznam prihlásených študentov
        Integer userId = 56; // Integer | Id študenta. Údaj je relevantný len pri pridávaní študenta do predmetu. (POST endpoint)
        try {
            array[User] result = apiInstance.getSubjectParticipants(subjectId, userId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling SystemApi#getSubjectParticipants");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.SystemApi;

public class SystemApiExample {

    public static void main(String[] args) {
        SystemApi apiInstance = new SystemApi();
        Integer subjectId = 56; // Integer | ID predmetu, pre ktorý sa vráti zoznam prihlásených študentov
        Integer userId = 56; // Integer | Id študenta. Údaj je relevantný len pri pridávaní študenta do predmetu. (POST endpoint)
        try {
            array[User] result = apiInstance.getSubjectParticipants(subjectId, userId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling SystemApi#getSubjectParticipants");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
Integer *subjectId = 56; // ID predmetu, pre ktorý sa vráti zoznam prihlásených študentov
Integer *userId = 56; // Id študenta. Údaj je relevantný len pri pridávaní študenta do predmetu. (POST endpoint)

SystemApi *apiInstance = [[SystemApi alloc] init];

// Zoznam študentov predmetu
[apiInstance getSubjectParticipantsWith:subjectId
    userId:userId
              completionHandler: ^(array[User] output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var NfCdanceRestApi = require('nf_cdance_rest_api');
var defaultClient = NfCdanceRestApi.ApiClient.instance;


var api = new NfCdanceRestApi.SystemApi()
var subjectId = 56; // {{Integer}} ID predmetu, pre ktorý sa vráti zoznam prihlásených študentov
var userId = 56; // {{Integer}} Id študenta. Údaj je relevantný len pri pridávaní študenta do predmetu. (POST endpoint)

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getSubjectParticipants(subjectId, userId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getSubjectParticipantsExample
    {
        public void main()
        {


            var apiInstance = new SystemApi();
            var subjectId = 56;  // Integer | ID predmetu, pre ktorý sa vráti zoznam prihlásených študentov
            var userId = 56;  // Integer | Id študenta. Údaj je relevantný len pri pridávaní študenta do predmetu. (POST endpoint)

            try
            {
                // Zoznam študentov predmetu
                array[User] result = apiInstance.getSubjectParticipants(subjectId, userId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling SystemApi.getSubjectParticipants: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');


$api_instance = new Swagger\Client\ApiSystemApi();
$subjectId = 56; // Integer | ID predmetu, pre ktorý sa vráti zoznam prihlásených študentov
$userId = 56; // Integer | Id študenta. Údaj je relevantný len pri pridávaní študenta do predmetu. (POST endpoint)

try {
    $result = $api_instance->getSubjectParticipants($subjectId, $userId);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling SystemApi->getSubjectParticipants: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::SystemApi;


my $api_instance = WWW::SwaggerClient::SystemApi->new();
my $subjectId = 56; # Integer | ID predmetu, pre ktorý sa vráti zoznam prihlásených študentov
my $userId = 56; # Integer | Id študenta. Údaj je relevantný len pri pridávaní študenta do predmetu. (POST endpoint)

eval { 
    my $result = $api_instance->getSubjectParticipants(subjectId => $subjectId, userId => $userId);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling SystemApi->getSubjectParticipants: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint


# create an instance of the API class
api_instance = swagger_client.SystemApi()
subjectId = 56 # Integer | ID predmetu, pre ktorý sa vráti zoznam prihlásených študentov
userId = 56 # Integer | Id študenta. Údaj je relevantný len pri pridávaní študenta do predmetu. (POST endpoint)

try: 
    # Zoznam študentov predmetu
    api_response = api_instance.get_subject_participants(subjectId, userId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling SystemApi->getSubjectParticipants: %s\n" % e)

Parameters

Path parameters
Name Description
subjectId*
Integer
ID predmetu, pre ktorý sa vráti zoznam prihlásených študentov
Required
userId*
Integer
Id študenta. Údaj je relevantný len pri pridávaní študenta do predmetu. (POST endpoint)
Required

Responses

Status: 200 - Úspešná odpoveď - zoznam aktívnych predmetov.

Status: 401 - Unahthorized


getUsers

Zoznam aktívnych používateľov

Zoznam aktívnych používateľov v systéme (user, teacher, admin)


/user

Usage and SDK Samples

curl -X GET\
 -H "Authorization: Bearer [[accessToken]]"\
-H "Accept: application/json"\
"http://localhost:9090/nfcdance/www/api/user?q=&role=&onlyActive="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.SystemApi;

import java.io.File;
import java.util.*;

public class SystemApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();


        SystemApi apiInstance = new SystemApi();
        String q = q_example; // String | Filter pre vyhľadávanie. Filter je platný pre meno a priezvisko.
        String role = role_example; // String | Filter pre vyhľadávanie. Povolené hdonoty sú 'student' a 'teacher'. Ak sa neuvedie, tak je toto obmedzenie nastavené na 'student'
        Integer onlyActive = 56; // Integer | Zahrnie len aktívnych používateľov. Predvolená hodnota je 1
        try {
            array[User] result = apiInstance.getUsers(q, role, onlyActive);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling SystemApi#getUsers");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.SystemApi;

public class SystemApiExample {

    public static void main(String[] args) {
        SystemApi apiInstance = new SystemApi();
        String q = q_example; // String | Filter pre vyhľadávanie. Filter je platný pre meno a priezvisko.
        String role = role_example; // String | Filter pre vyhľadávanie. Povolené hdonoty sú 'student' a 'teacher'. Ak sa neuvedie, tak je toto obmedzenie nastavené na 'student'
        Integer onlyActive = 56; // Integer | Zahrnie len aktívnych používateľov. Predvolená hodnota je 1
        try {
            array[User] result = apiInstance.getUsers(q, role, onlyActive);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling SystemApi#getUsers");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
String *q = q_example; // Filter pre vyhľadávanie. Filter je platný pre meno a priezvisko. (optional)
String *role = role_example; // Filter pre vyhľadávanie. Povolené hdonoty sú 'student' a 'teacher'. Ak sa neuvedie, tak je toto obmedzenie nastavené na 'student' (optional)
Integer *onlyActive = 56; // Zahrnie len aktívnych používateľov. Predvolená hodnota je 1 (optional)

SystemApi *apiInstance = [[SystemApi alloc] init];

// Zoznam aktívnych používateľov
[apiInstance getUsersWith:q
    role:role
    onlyActive:onlyActive
              completionHandler: ^(array[User] output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var NfCdanceRestApi = require('nf_cdance_rest_api');
var defaultClient = NfCdanceRestApi.ApiClient.instance;


var api = new NfCdanceRestApi.SystemApi()
var opts = { 
  'q': q_example, // {{String}} Filter pre vyhľadávanie. Filter je platný pre meno a priezvisko.
  'role': role_example, // {{String}} Filter pre vyhľadávanie. Povolené hdonoty sú 'student' a 'teacher'. Ak sa neuvedie, tak je toto obmedzenie nastavené na 'student'
  'onlyActive': 56 // {{Integer}} Zahrnie len aktívnych používateľov. Predvolená hodnota je 1
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getUsers(opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getUsersExample
    {
        public void main()
        {


            var apiInstance = new SystemApi();
            var q = q_example;  // String | Filter pre vyhľadávanie. Filter je platný pre meno a priezvisko. (optional) 
            var role = role_example;  // String | Filter pre vyhľadávanie. Povolené hdonoty sú 'student' a 'teacher'. Ak sa neuvedie, tak je toto obmedzenie nastavené na 'student' (optional) 
            var onlyActive = 56;  // Integer | Zahrnie len aktívnych používateľov. Predvolená hodnota je 1 (optional) 

            try
            {
                // Zoznam aktívnych používateľov
                array[User] result = apiInstance.getUsers(q, role, onlyActive);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling SystemApi.getUsers: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');


$api_instance = new Swagger\Client\ApiSystemApi();
$q = q_example; // String | Filter pre vyhľadávanie. Filter je platný pre meno a priezvisko.
$role = role_example; // String | Filter pre vyhľadávanie. Povolené hdonoty sú 'student' a 'teacher'. Ak sa neuvedie, tak je toto obmedzenie nastavené na 'student'
$onlyActive = 56; // Integer | Zahrnie len aktívnych používateľov. Predvolená hodnota je 1

try {
    $result = $api_instance->getUsers($q, $role, $onlyActive);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling SystemApi->getUsers: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::SystemApi;


my $api_instance = WWW::SwaggerClient::SystemApi->new();
my $q = q_example; # String | Filter pre vyhľadávanie. Filter je platný pre meno a priezvisko.
my $role = role_example; # String | Filter pre vyhľadávanie. Povolené hdonoty sú 'student' a 'teacher'. Ak sa neuvedie, tak je toto obmedzenie nastavené na 'student'
my $onlyActive = 56; # Integer | Zahrnie len aktívnych používateľov. Predvolená hodnota je 1

eval { 
    my $result = $api_instance->getUsers(q => $q, role => $role, onlyActive => $onlyActive);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling SystemApi->getUsers: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint


# create an instance of the API class
api_instance = swagger_client.SystemApi()
q = q_example # String | Filter pre vyhľadávanie. Filter je platný pre meno a priezvisko. (optional)
role = role_example # String | Filter pre vyhľadávanie. Povolené hdonoty sú 'student' a 'teacher'. Ak sa neuvedie, tak je toto obmedzenie nastavené na 'student' (optional)
onlyActive = 56 # Integer | Zahrnie len aktívnych používateľov. Predvolená hodnota je 1 (optional)

try: 
    # Zoznam aktívnych používateľov
    api_response = api_instance.get_users(q=q, role=role, onlyActive=onlyActive)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling SystemApi->getUsers: %s\n" % e)

Parameters

Query parameters
Name Description
q
String
Filter pre vyhľadávanie. Filter je platný pre meno a priezvisko.
role
String
Filter pre vyhľadávanie. Povolené hdonoty sú 'student' a 'teacher'. Ak sa neuvedie, tak je toto obmedzenie nastavené na 'student'
onlyActive
Integer
Zahrnie len aktívnych používateľov. Predvolená hodnota je 1

Responses

Status: 200 - Úspešná odpoveď

Status: 401 - Unahthorized


loginUser

Prihlási sa do systému

Prihlásenie sa pre používateľov s rolami admin/teacher. Používateľ s rolou 'user' sa do systému nedokáže prihlásiť, pretože nemá vygenerované heslo. Pridávanie nových používateľov do systému je implementované v enpointe [POST]/user.


/login

Usage and SDK Samples

curl -X POST\
-H "Accept: application/json"\
-H "Content-Type: application/json"\
"http://localhost:9090/nfcdance/www/api/login"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.SystemApi;

import java.io.File;
import java.util.*;

public class SystemApiExample {

    public static void main(String[] args) {
        
        SystemApi apiInstance = new SystemApi();
        UserLogin body = ; // UserLogin | Konto s ktorým sa prihlasujeme musí byť aktívne.
        try {
            LoginResponse result = apiInstance.loginUser(body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling SystemApi#loginUser");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.SystemApi;

public class SystemApiExample {

    public static void main(String[] args) {
        SystemApi apiInstance = new SystemApi();
        UserLogin body = ; // UserLogin | Konto s ktorým sa prihlasujeme musí byť aktívne.
        try {
            LoginResponse result = apiInstance.loginUser(body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling SystemApi#loginUser");
            e.printStackTrace();
        }
    }
}
UserLogin *body = ; // Konto s ktorým sa prihlasujeme musí byť aktívne.

SystemApi *apiInstance = [[SystemApi alloc] init];

// Prihlási sa do systému
[apiInstance loginUserWith:body
              completionHandler: ^(LoginResponse output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var NfCdanceRestApi = require('nf_cdance_rest_api');

var api = new NfCdanceRestApi.SystemApi()
var body = ; // {{UserLogin}} Konto s ktorým sa prihlasujeme musí byť aktívne.

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.loginUser(body, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class loginUserExample
    {
        public void main()
        {

            var apiInstance = new SystemApi();
            var body = new UserLogin(); // UserLogin | Konto s ktorým sa prihlasujeme musí byť aktívne.

            try
            {
                // Prihlási sa do systému
                LoginResponse result = apiInstance.loginUser(body);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling SystemApi.loginUser: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiSystemApi();
$body = ; // UserLogin | Konto s ktorým sa prihlasujeme musí byť aktívne.

try {
    $result = $api_instance->loginUser($body);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling SystemApi->loginUser: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::SystemApi;

my $api_instance = WWW::SwaggerClient::SystemApi->new();
my $body = WWW::SwaggerClient::Object::UserLogin->new(); # UserLogin | Konto s ktorým sa prihlasujeme musí byť aktívne.

eval { 
    my $result = $api_instance->loginUser(body => $body);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling SystemApi->loginUser: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.SystemApi()
body =  # UserLogin | Konto s ktorým sa prihlasujeme musí byť aktívne.

try: 
    # Prihlási sa do systému
    api_response = api_instance.login_user(body)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling SystemApi->loginUser: %s\n" % e)

Parameters

Body parameters
Name Description
body *

Responses

Status: 200 - Úspešná odpoveď

Status: 400 - Bad request: Malformed request data, Login not found, Password not found

Status: 401 - Unahthorized: Neexistujúci login, Heslo je chybné


postSubjectGroup

Pridá študijnú skupinu

Pridá študijnú skupinu pre vybraný predmet


/subject/{subjectId}/group

Usage and SDK Samples

curl -X POST\
 -H "Authorization: Bearer [[accessToken]]"\
-H "Accept: application/json"\
-H "Content-Type: application/json"\
"http://localhost:9090/nfcdance/www/api/subject/{subjectId}/group"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.SystemApi;

import java.io.File;
import java.util.*;

public class SystemApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();


        SystemApi apiInstance = new SystemApi();
        Integer subjectId = 56; // Integer | ID predmetu, do ktorého sa bude pridávať nový študent.
        Group body = ; // Group | JSON štruktúra s definíciou názvu novej skupiny. Atribút "id" sa môže vynechať. Ak sa uvedie, bude sa ignorovať.
        try {
            Group result = apiInstance.postSubjectGroup(subjectId, body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling SystemApi#postSubjectGroup");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.SystemApi;

public class SystemApiExample {

    public static void main(String[] args) {
        SystemApi apiInstance = new SystemApi();
        Integer subjectId = 56; // Integer | ID predmetu, do ktorého sa bude pridávať nový študent.
        Group body = ; // Group | JSON štruktúra s definíciou názvu novej skupiny. Atribút "id" sa môže vynechať. Ak sa uvedie, bude sa ignorovať.
        try {
            Group result = apiInstance.postSubjectGroup(subjectId, body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling SystemApi#postSubjectGroup");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
Integer *subjectId = 56; // ID predmetu, do ktorého sa bude pridávať nový študent.
Group *body = ; // JSON štruktúra s definíciou názvu novej skupiny. Atribút "id" sa môže vynechať. Ak sa uvedie, bude sa ignorovať. (optional)

SystemApi *apiInstance = [[SystemApi alloc] init];

// Pridá študijnú skupinu
[apiInstance postSubjectGroupWith:subjectId
    body:body
              completionHandler: ^(Group output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var NfCdanceRestApi = require('nf_cdance_rest_api');
var defaultClient = NfCdanceRestApi.ApiClient.instance;


var api = new NfCdanceRestApi.SystemApi()
var subjectId = 56; // {{Integer}} ID predmetu, do ktorého sa bude pridávať nový študent.
var opts = { 
  'body':  // {{Group}} JSON štruktúra s definíciou názvu novej skupiny. Atribút "id" sa môže vynechať. Ak sa uvedie, bude sa ignorovať.
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.postSubjectGroup(subjectId, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class postSubjectGroupExample
    {
        public void main()
        {


            var apiInstance = new SystemApi();
            var subjectId = 56;  // Integer | ID predmetu, do ktorého sa bude pridávať nový študent.
            var body = new Group(); // Group | JSON štruktúra s definíciou názvu novej skupiny. Atribút "id" sa môže vynechať. Ak sa uvedie, bude sa ignorovať. (optional) 

            try
            {
                // Pridá študijnú skupinu
                Group result = apiInstance.postSubjectGroup(subjectId, body);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling SystemApi.postSubjectGroup: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');


$api_instance = new Swagger\Client\ApiSystemApi();
$subjectId = 56; // Integer | ID predmetu, do ktorého sa bude pridávať nový študent.
$body = ; // Group | JSON štruktúra s definíciou názvu novej skupiny. Atribút "id" sa môže vynechať. Ak sa uvedie, bude sa ignorovať.

try {
    $result = $api_instance->postSubjectGroup($subjectId, $body);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling SystemApi->postSubjectGroup: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::SystemApi;


my $api_instance = WWW::SwaggerClient::SystemApi->new();
my $subjectId = 56; # Integer | ID predmetu, do ktorého sa bude pridávať nový študent.
my $body = WWW::SwaggerClient::Object::Group->new(); # Group | JSON štruktúra s definíciou názvu novej skupiny. Atribút "id" sa môže vynechať. Ak sa uvedie, bude sa ignorovať.

eval { 
    my $result = $api_instance->postSubjectGroup(subjectId => $subjectId, body => $body);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling SystemApi->postSubjectGroup: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint


# create an instance of the API class
api_instance = swagger_client.SystemApi()
subjectId = 56 # Integer | ID predmetu, do ktorého sa bude pridávať nový študent.
body =  # Group | JSON štruktúra s definíciou názvu novej skupiny. Atribút "id" sa môže vynechať. Ak sa uvedie, bude sa ignorovať. (optional)

try: 
    # Pridá študijnú skupinu
    api_response = api_instance.post_subject_group(subjectId, body=body)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling SystemApi->postSubjectGroup: %s\n" % e)

Parameters

Path parameters
Name Description
subjectId*
Integer
ID predmetu, do ktorého sa bude pridávať nový študent.
Required
Body parameters
Name Description
body

Responses

Status: 200 - Úspešná odpoveď - podarilo sa pridať študijnú skupiny. V odpovedi je záznam pridaný do databázy.

Status: 401 - Unahthorized

Status: 404 - Neexistujúci predmet, nedá sa zmazať skupina, pretože sú tam zapísaní študenti


postSubjectGroupStudents

Priradí študenta do študijnej skupiny

Ak študent existuje zapísaný v predmete, tak potom sa priradí do požadovanej študijnej skupiny.


/subject/{subjectId}/group/{groupId}/student/{userId}

Usage and SDK Samples

curl -X POST\
 -H "Authorization: Bearer [[accessToken]]"\
-H "Accept: application/json"\
"http://localhost:9090/nfcdance/www/api/subject/{subjectId}/group/{groupId}/student/{userId}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.SystemApi;

import java.io.File;
import java.util.*;

public class SystemApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();


        SystemApi apiInstance = new SystemApi();
        Integer subjectId = 56; // Integer | ID predmetu, v ktorom je definovaná štugijná skupina {groupId} do ktorej sa bude priraďovať študent.
        Integer groupId = 56; // Integer | ID študijnej skupiny
        Integer userId = 56; // Integer | ID študenta, ktorý sa pridaná do požadovanej študijnej skupiny.
        try {
            StatusResponse result = apiInstance.postSubjectGroupStudents(subjectId, groupId, userId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling SystemApi#postSubjectGroupStudents");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.SystemApi;

public class SystemApiExample {

    public static void main(String[] args) {
        SystemApi apiInstance = new SystemApi();
        Integer subjectId = 56; // Integer | ID predmetu, v ktorom je definovaná štugijná skupina {groupId} do ktorej sa bude priraďovať študent.
        Integer groupId = 56; // Integer | ID študijnej skupiny
        Integer userId = 56; // Integer | ID študenta, ktorý sa pridaná do požadovanej študijnej skupiny.
        try {
            StatusResponse result = apiInstance.postSubjectGroupStudents(subjectId, groupId, userId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling SystemApi#postSubjectGroupStudents");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
Integer *subjectId = 56; // ID predmetu, v ktorom je definovaná štugijná skupina {groupId} do ktorej sa bude priraďovať študent.
Integer *groupId = 56; // ID študijnej skupiny
Integer *userId = 56; // ID študenta, ktorý sa pridaná do požadovanej študijnej skupiny.

SystemApi *apiInstance = [[SystemApi alloc] init];

// Priradí študenta do študijnej skupiny
[apiInstance postSubjectGroupStudentsWith:subjectId
    groupId:groupId
    userId:userId
              completionHandler: ^(StatusResponse output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var NfCdanceRestApi = require('nf_cdance_rest_api');
var defaultClient = NfCdanceRestApi.ApiClient.instance;


var api = new NfCdanceRestApi.SystemApi()
var subjectId = 56; // {{Integer}} ID predmetu, v ktorom je definovaná štugijná skupina {groupId} do ktorej sa bude priraďovať študent.
var groupId = 56; // {{Integer}} ID študijnej skupiny
var userId = 56; // {{Integer}} ID študenta, ktorý sa pridaná do požadovanej študijnej skupiny.

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.postSubjectGroupStudents(subjectId, groupId, userId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class postSubjectGroupStudentsExample
    {
        public void main()
        {


            var apiInstance = new SystemApi();
            var subjectId = 56;  // Integer | ID predmetu, v ktorom je definovaná štugijná skupina {groupId} do ktorej sa bude priraďovať študent.
            var groupId = 56;  // Integer | ID študijnej skupiny
            var userId = 56;  // Integer | ID študenta, ktorý sa pridaná do požadovanej študijnej skupiny.

            try
            {
                // Priradí študenta do študijnej skupiny
                StatusResponse result = apiInstance.postSubjectGroupStudents(subjectId, groupId, userId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling SystemApi.postSubjectGroupStudents: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');


$api_instance = new Swagger\Client\ApiSystemApi();
$subjectId = 56; // Integer | ID predmetu, v ktorom je definovaná štugijná skupina {groupId} do ktorej sa bude priraďovať študent.
$groupId = 56; // Integer | ID študijnej skupiny
$userId = 56; // Integer | ID študenta, ktorý sa pridaná do požadovanej študijnej skupiny.

try {
    $result = $api_instance->postSubjectGroupStudents($subjectId, $groupId, $userId);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling SystemApi->postSubjectGroupStudents: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::SystemApi;


my $api_instance = WWW::SwaggerClient::SystemApi->new();
my $subjectId = 56; # Integer | ID predmetu, v ktorom je definovaná štugijná skupina {groupId} do ktorej sa bude priraďovať študent.
my $groupId = 56; # Integer | ID študijnej skupiny
my $userId = 56; # Integer | ID študenta, ktorý sa pridaná do požadovanej študijnej skupiny.

eval { 
    my $result = $api_instance->postSubjectGroupStudents(subjectId => $subjectId, groupId => $groupId, userId => $userId);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling SystemApi->postSubjectGroupStudents: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint


# create an instance of the API class
api_instance = swagger_client.SystemApi()
subjectId = 56 # Integer | ID predmetu, v ktorom je definovaná štugijná skupina {groupId} do ktorej sa bude priraďovať študent.
groupId = 56 # Integer | ID študijnej skupiny
userId = 56 # Integer | ID študenta, ktorý sa pridaná do požadovanej študijnej skupiny.

try: 
    # Priradí študenta do študijnej skupiny
    api_response = api_instance.post_subject_group_students(subjectId, groupId, userId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling SystemApi->postSubjectGroupStudents: %s\n" % e)

Parameters

Path parameters
Name Description
subjectId*
Integer
ID predmetu, v ktorom je definovaná štugijná skupina {groupId} do ktorej sa bude priraďovať študent.
Required
groupId*
Integer
ID študijnej skupiny
Required
userId*
Integer
ID študenta, ktorý sa pridaná do požadovanej študijnej skupiny.
Required

Responses

Status: 200 - Úspešná odpoveď - podarilo sa priradiť študenta do študijej skupiny. V odpovedi status=OK, message=Assigned

Status: 401 - Unahthorized

Status: 404 - Neexistujúci predmet, Neexistujúca skupina, Študnet nie je zapísaný do predmetu


postSubjectParticipant

Priradí študenta do predmetu

Priradí študenta s userId do predmetu s subjectId.


/subject/{subjectId}/participants/{userId}

Usage and SDK Samples

curl -X POST\
 -H "Authorization: Bearer [[accessToken]]"\
-H "Accept: application/json"\
"http://localhost:9090/nfcdance/www/api/subject/{subjectId}/participants/{userId}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.SystemApi;

import java.io.File;
import java.util.*;

public class SystemApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();


        SystemApi apiInstance = new SystemApi();
        Integer subjectId = 56; // Integer | ID predmetu, do ktorého sa bude pridávať nový študent.
        Integer userId = 56; // Integer | Id študenta, ktorý sa pridá do predmetu s rolou student.
        try {
            StatusResponse result = apiInstance.postSubjectParticipant(subjectId, userId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling SystemApi#postSubjectParticipant");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.SystemApi;

public class SystemApiExample {

    public static void main(String[] args) {
        SystemApi apiInstance = new SystemApi();
        Integer subjectId = 56; // Integer | ID predmetu, do ktorého sa bude pridávať nový študent.
        Integer userId = 56; // Integer | Id študenta, ktorý sa pridá do predmetu s rolou student.
        try {
            StatusResponse result = apiInstance.postSubjectParticipant(subjectId, userId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling SystemApi#postSubjectParticipant");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
Integer *subjectId = 56; // ID predmetu, do ktorého sa bude pridávať nový študent.
Integer *userId = 56; // Id študenta, ktorý sa pridá do predmetu s rolou student.

SystemApi *apiInstance = [[SystemApi alloc] init];

// Priradí študenta do predmetu
[apiInstance postSubjectParticipantWith:subjectId
    userId:userId
              completionHandler: ^(StatusResponse output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var NfCdanceRestApi = require('nf_cdance_rest_api');
var defaultClient = NfCdanceRestApi.ApiClient.instance;


var api = new NfCdanceRestApi.SystemApi()
var subjectId = 56; // {{Integer}} ID predmetu, do ktorého sa bude pridávať nový študent.
var userId = 56; // {{Integer}} Id študenta, ktorý sa pridá do predmetu s rolou student.

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.postSubjectParticipant(subjectId, userId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class postSubjectParticipantExample
    {
        public void main()
        {


            var apiInstance = new SystemApi();
            var subjectId = 56;  // Integer | ID predmetu, do ktorého sa bude pridávať nový študent.
            var userId = 56;  // Integer | Id študenta, ktorý sa pridá do predmetu s rolou student.

            try
            {
                // Priradí študenta do predmetu
                StatusResponse result = apiInstance.postSubjectParticipant(subjectId, userId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling SystemApi.postSubjectParticipant: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');


$api_instance = new Swagger\Client\ApiSystemApi();
$subjectId = 56; // Integer | ID predmetu, do ktorého sa bude pridávať nový študent.
$userId = 56; // Integer | Id študenta, ktorý sa pridá do predmetu s rolou student.

try {
    $result = $api_instance->postSubjectParticipant($subjectId, $userId);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling SystemApi->postSubjectParticipant: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::SystemApi;


my $api_instance = WWW::SwaggerClient::SystemApi->new();
my $subjectId = 56; # Integer | ID predmetu, do ktorého sa bude pridávať nový študent.
my $userId = 56; # Integer | Id študenta, ktorý sa pridá do predmetu s rolou student.

eval { 
    my $result = $api_instance->postSubjectParticipant(subjectId => $subjectId, userId => $userId);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling SystemApi->postSubjectParticipant: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint


# create an instance of the API class
api_instance = swagger_client.SystemApi()
subjectId = 56 # Integer | ID predmetu, do ktorého sa bude pridávať nový študent.
userId = 56 # Integer | Id študenta, ktorý sa pridá do predmetu s rolou student.

try: 
    # Priradí študenta do predmetu
    api_response = api_instance.post_subject_participant(subjectId, userId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling SystemApi->postSubjectParticipant: %s\n" % e)

Parameters

Path parameters
Name Description
subjectId*
Integer
ID predmetu, do ktorého sa bude pridávať nový študent.
Required
userId*
Integer
Id študenta, ktorý sa pridá do predmetu s rolou student.
Required

Responses

Status: 200 - Úspešná odpoveď - podarilo sa pridať študenta do premetu, alebo bol už študent v predmete zaregistrovaný. Atribút message obsahuje počet pridaných záznamov. Ak je v odpovedi message=0, znamená to, že používateľ bol už v predmete zaregistrovaný.

Status: 401 - Unahthorized

Status: 404 - Neexistujúci predmet alebo používateľ


putEvent

Odošle udalosti z desktop SW

Tento endpoint používa desktop aplikácia v prípade, že NFC čítačka sa nedokáže pripojiť do siete. Parametrom je pole tagoc s doplnkovými infromáciami. API odpovedá štatistikou vloženia údajov do systému. Tento endpoint používa autentifikáciu pomocou JWT tokenu.


/event

Usage and SDK Samples

curl -X PUT\
 -H "Authorization: Bearer [[accessToken]]"\
-H "Accept: application/json"\
-H "Content-Type: application/json"\
"http://localhost:9090/nfcdance/www/api/event"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.SystemApi;

import java.io.File;
import java.util.*;

public class SystemApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();


        SystemApi apiInstance = new SystemApi();
        array[TagDetailRequest] body = ; // array[TagDetailRequest] | Obsah NFC karty - identifikátor, čas záznamu a ID človeka, ktorý záznam robí (učiteľ)
        try {
            EventBulk result = apiInstance.putEvent(body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling SystemApi#putEvent");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.SystemApi;

public class SystemApiExample {

    public static void main(String[] args) {
        SystemApi apiInstance = new SystemApi();
        array[TagDetailRequest] body = ; // array[TagDetailRequest] | Obsah NFC karty - identifikátor, čas záznamu a ID človeka, ktorý záznam robí (učiteľ)
        try {
            EventBulk result = apiInstance.putEvent(body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling SystemApi#putEvent");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
array[TagDetailRequest] *body = ; // Obsah NFC karty - identifikátor, čas záznamu a ID človeka, ktorý záznam robí (učiteľ) (optional)

SystemApi *apiInstance = [[SystemApi alloc] init];

// Odošle udalosti z desktop SW
[apiInstance putEventWith:body
              completionHandler: ^(EventBulk output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var NfCdanceRestApi = require('nf_cdance_rest_api');
var defaultClient = NfCdanceRestApi.ApiClient.instance;


var api = new NfCdanceRestApi.SystemApi()
var opts = { 
  'body':  // {{array[TagDetailRequest]}} Obsah NFC karty - identifikátor, čas záznamu a ID človeka, ktorý záznam robí (učiteľ)
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.putEvent(opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class putEventExample
    {
        public void main()
        {


            var apiInstance = new SystemApi();
            var body = new array[TagDetailRequest](); // array[TagDetailRequest] | Obsah NFC karty - identifikátor, čas záznamu a ID človeka, ktorý záznam robí (učiteľ) (optional) 

            try
            {
                // Odošle udalosti z desktop SW
                EventBulk result = apiInstance.putEvent(body);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling SystemApi.putEvent: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');


$api_instance = new Swagger\Client\ApiSystemApi();
$body = ; // array[TagDetailRequest] | Obsah NFC karty - identifikátor, čas záznamu a ID človeka, ktorý záznam robí (učiteľ)

try {
    $result = $api_instance->putEvent($body);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling SystemApi->putEvent: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::SystemApi;


my $api_instance = WWW::SwaggerClient::SystemApi->new();
my $body = [WWW::SwaggerClient::Object::array[TagDetailRequest]->new()]; # array[TagDetailRequest] | Obsah NFC karty - identifikátor, čas záznamu a ID človeka, ktorý záznam robí (učiteľ)

eval { 
    my $result = $api_instance->putEvent(body => $body);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling SystemApi->putEvent: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint


# create an instance of the API class
api_instance = swagger_client.SystemApi()
body =  # array[TagDetailRequest] | Obsah NFC karty - identifikátor, čas záznamu a ID človeka, ktorý záznam robí (učiteľ) (optional)

try: 
    # Odošle udalosti z desktop SW
    api_response = api_instance.put_event(body=body)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling SystemApi->putEvent: %s\n" % e)

Parameters

Body parameters
Name Description
body

Responses

Status: 200 - Úspešná odpoveď - udalosť do dochádzky bola zaregistrovaná.

Status: 404 - Chyba dekódovania tela požiadavku, Body must be an array

Status: 401 - Authorization required. Je potrebné sa prihlásiť cez endpoint /login.


registerReader

Zaregistruje čítačku

Do systému vloží záznam o novej čítačke. Čítačka je identifikovaná svojím HW kľúčom.


/reader

Usage and SDK Samples

curl -X POST\
 -H "Authorization: Bearer [[accessToken]]"\
-H "Accept: application/json"\
-H "Content-Type: application/json"\
"http://localhost:9090/nfcdance/www/api/reader"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.SystemApi;

import java.io.File;
import java.util.*;

public class SystemApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();


        SystemApi apiInstance = new SystemApi();
        RegisterReaderRequest body = ; // RegisterReaderRequest | NFC ID a User login
        try {
            Reader result = apiInstance.registerReader(body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling SystemApi#registerReader");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.SystemApi;

public class SystemApiExample {

    public static void main(String[] args) {
        SystemApi apiInstance = new SystemApi();
        RegisterReaderRequest body = ; // RegisterReaderRequest | NFC ID a User login
        try {
            Reader result = apiInstance.registerReader(body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling SystemApi#registerReader");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
RegisterReaderRequest *body = ; // NFC ID a User login (optional)

SystemApi *apiInstance = [[SystemApi alloc] init];

// Zaregistruje čítačku
[apiInstance registerReaderWith:body
              completionHandler: ^(Reader output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var NfCdanceRestApi = require('nf_cdance_rest_api');
var defaultClient = NfCdanceRestApi.ApiClient.instance;


var api = new NfCdanceRestApi.SystemApi()
var opts = { 
  'body':  // {{RegisterReaderRequest}} NFC ID a User login
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.registerReader(opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class registerReaderExample
    {
        public void main()
        {


            var apiInstance = new SystemApi();
            var body = new RegisterReaderRequest(); // RegisterReaderRequest | NFC ID a User login (optional) 

            try
            {
                // Zaregistruje čítačku
                Reader result = apiInstance.registerReader(body);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling SystemApi.registerReader: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');


$api_instance = new Swagger\Client\ApiSystemApi();
$body = ; // RegisterReaderRequest | NFC ID a User login

try {
    $result = $api_instance->registerReader($body);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling SystemApi->registerReader: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::SystemApi;


my $api_instance = WWW::SwaggerClient::SystemApi->new();
my $body = WWW::SwaggerClient::Object::RegisterReaderRequest->new(); # RegisterReaderRequest | NFC ID a User login

eval { 
    my $result = $api_instance->registerReader(body => $body);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling SystemApi->registerReader: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint


# create an instance of the API class
api_instance = swagger_client.SystemApi()
body =  # RegisterReaderRequest | NFC ID a User login (optional)

try: 
    # Zaregistruje čítačku
    api_response = api_instance.register_reader(body=body)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling SystemApi->registerReader: %s\n" % e)

Parameters

Body parameters
Name Description
body

Responses

Status: 200 - Úspešná odpoveď

Status: 400 - Chybová odpoveď. vstupné dáta nemajú formát JSON

Status: 401 - Chybová odpoveď. Malé oprávnenie. Endpoint je len pre rolu admin.

Status: 404 - Chyba vo vstupných dátach, alebo nebol nájdený záznam.


registerTag

Zaregistruje TAG

Vybranému používateľovi zaregistruje nový TAG. Používateľ môže mať viacerov Tagov. Ich počet nie je obmedzený.


/tag

Usage and SDK Samples

curl -X POST\
 -H "Authorization: Bearer [[accessToken]]"\
-H "Accept: application/json"\
-H "Content-Type: application/json"\
"http://localhost:9090/nfcdance/www/api/tag"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.SystemApi;

import java.io.File;
import java.util.*;

public class SystemApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();


        SystemApi apiInstance = new SystemApi();
        RegisterTagRequest body = ; // RegisterTagRequest | NFC ID a User login
        try {
            RegisterTagResponse result = apiInstance.registerTag(body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling SystemApi#registerTag");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.SystemApi;

public class SystemApiExample {

    public static void main(String[] args) {
        SystemApi apiInstance = new SystemApi();
        RegisterTagRequest body = ; // RegisterTagRequest | NFC ID a User login
        try {
            RegisterTagResponse result = apiInstance.registerTag(body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling SystemApi#registerTag");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
RegisterTagRequest *body = ; // NFC ID a User login (optional)

SystemApi *apiInstance = [[SystemApi alloc] init];

// Zaregistruje TAG
[apiInstance registerTagWith:body
              completionHandler: ^(RegisterTagResponse output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var NfCdanceRestApi = require('nf_cdance_rest_api');
var defaultClient = NfCdanceRestApi.ApiClient.instance;


var api = new NfCdanceRestApi.SystemApi()
var opts = { 
  'body':  // {{RegisterTagRequest}} NFC ID a User login
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.registerTag(opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class registerTagExample
    {
        public void main()
        {


            var apiInstance = new SystemApi();
            var body = new RegisterTagRequest(); // RegisterTagRequest | NFC ID a User login (optional) 

            try
            {
                // Zaregistruje TAG
                RegisterTagResponse result = apiInstance.registerTag(body);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling SystemApi.registerTag: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');


$api_instance = new Swagger\Client\ApiSystemApi();
$body = ; // RegisterTagRequest | NFC ID a User login

try {
    $result = $api_instance->registerTag($body);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling SystemApi->registerTag: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::SystemApi;


my $api_instance = WWW::SwaggerClient::SystemApi->new();
my $body = WWW::SwaggerClient::Object::RegisterTagRequest->new(); # RegisterTagRequest | NFC ID a User login

eval { 
    my $result = $api_instance->registerTag(body => $body);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling SystemApi->registerTag: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint


# create an instance of the API class
api_instance = swagger_client.SystemApi()
body =  # RegisterTagRequest | NFC ID a User login (optional)

try: 
    # Zaregistruje TAG
    api_response = api_instance.register_tag(body=body)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling SystemApi->registerTag: %s\n" % e)

Parameters

Body parameters
Name Description
body

Responses

Status: 200 - Úspešná odpoveď

Status: 400 - Chybová odpoveď. vstupné dáta nemajú formát JSON

Status: 401 - Chybová odpoveď. Malé oprávnenie. Endpoint je len pre rolu admin.

Status: 404 - Chyba vo vstupných dátach, alebo nebol nájdený používateľ.