Faculty Portal OAuth2 API

Default

apiGetPayslip

Download payslip

Download the payslip (PDF) for the given payslip ID.


/api/faculty/salary/{payslipId}/download

Usage and SDK Samples

curl -X GET\
 -H "Authorization: Bearer [[accessToken]]"\
-H "Accept: application/pdf"\
"http://localhost:8080/api/faculty/salary/{payslipId}/download"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.DefaultApi;

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

public class DefaultApiExample {

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


        DefaultApi apiInstance = new DefaultApi();
        String payslipId = payslipId_example; // String | 
        String fACULTYJWT = fACULTYJWT_example; // String | 
        String gOOGLEACCESSTOKEN = gOOGLEACCESSTOKEN_example; // String | 
        try {
            byte[] result = apiInstance.apiGetPayslip(payslipId, fACULTYJWT, gOOGLEACCESSTOKEN);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#apiGetPayslip");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.DefaultApi;

public class DefaultApiExample {

    public static void main(String[] args) {
        DefaultApi apiInstance = new DefaultApi();
        String payslipId = payslipId_example; // String | 
        String fACULTYJWT = fACULTYJWT_example; // String | 
        String gOOGLEACCESSTOKEN = gOOGLEACCESSTOKEN_example; // String | 
        try {
            byte[] result = apiInstance.apiGetPayslip(payslipId, fACULTYJWT, gOOGLEACCESSTOKEN);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#apiGetPayslip");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
String *payslipId = payslipId_example; // 
String *fACULTYJWT = fACULTYJWT_example; //  (optional)
String *gOOGLEACCESSTOKEN = gOOGLEACCESSTOKEN_example; //  (optional)

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

// Download payslip
[apiInstance apiGetPayslipWith:payslipId
    fACULTYJWT:fACULTYJWT
    gOOGLEACCESSTOKEN:gOOGLEACCESSTOKEN
              completionHandler: ^(byte[] output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var FacultyPortalOAuth2Api = require('faculty_portal_o_auth2_api');
var defaultClient = FacultyPortalOAuth2Api.ApiClient.instance;


var api = new FacultyPortalOAuth2Api.DefaultApi()
var payslipId = payslipId_example; // {{String}} 
var opts = { 
  'fACULTYJWT': fACULTYJWT_example, // {{String}} 
  'gOOGLEACCESSTOKEN': gOOGLEACCESSTOKEN_example // {{String}} 
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.apiGetPayslip(payslipId, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

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


            var apiInstance = new DefaultApi();
            var payslipId = payslipId_example;  // String | 
            var fACULTYJWT = fACULTYJWT_example;  // String |  (optional) 
            var gOOGLEACCESSTOKEN = gOOGLEACCESSTOKEN_example;  // String |  (optional) 

            try
            {
                // Download payslip
                byte[] result = apiInstance.apiGetPayslip(payslipId, fACULTYJWT, gOOGLEACCESSTOKEN);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling DefaultApi.apiGetPayslip: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');


$api_instance = new Swagger\Client\ApiDefaultApi();
$payslipId = payslipId_example; // String | 
$fACULTYJWT = fACULTYJWT_example; // String | 
$gOOGLEACCESSTOKEN = gOOGLEACCESSTOKEN_example; // String | 

try {
    $result = $api_instance->apiGetPayslip($payslipId, $fACULTYJWT, $gOOGLEACCESSTOKEN);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling DefaultApi->apiGetPayslip: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::DefaultApi;


my $api_instance = WWW::SwaggerClient::DefaultApi->new();
my $payslipId = payslipId_example; # String | 
my $fACULTYJWT = fACULTYJWT_example; # String | 
my $gOOGLEACCESSTOKEN = gOOGLEACCESSTOKEN_example; # String | 

eval { 
    my $result = $api_instance->apiGetPayslip(payslipId => $payslipId, fACULTYJWT => $fACULTYJWT, gOOGLEACCESSTOKEN => $gOOGLEACCESSTOKEN);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling DefaultApi->apiGetPayslip: $@\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.DefaultApi()
payslipId = payslipId_example # String | 
fACULTYJWT = fACULTYJWT_example # String |  (optional)
gOOGLEACCESSTOKEN = gOOGLEACCESSTOKEN_example # String |  (optional)

try: 
    # Download payslip
    api_response = api_instance.api_get_payslip(payslipId, fACULTYJWT=fACULTYJWT, gOOGLEACCESSTOKEN=gOOGLEACCESSTOKEN)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling DefaultApi->apiGetPayslip: %s\n" % e)

Parameters

Path parameters
Name Description
payslipId*
String
Required

Responses

Status: 200 - Payslip downloaded successfully

Status: 401 - Unauthorized

Status: 404 - Payslip not found


getApiFacultyDetails

Get faculty profile details

Retrieve the currently authenticated faculty user's profile from the database.


/api/faculty/details

Usage and SDK Samples

curl -X GET\
 -H "Authorization: Bearer [[accessToken]]"\
-H "Accept: application/json"\
"http://localhost:8080/api/faculty/details"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.DefaultApi;

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

public class DefaultApiExample {

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


        DefaultApi apiInstance = new DefaultApi();
        String fACULTYJWT = fACULTYJWT_example; // String | 
        String gOOGLEACCESSTOKEN = gOOGLEACCESSTOKEN_example; // String | 
        try {
            FacultyProfile result = apiInstance.getApiFacultyDetails(fACULTYJWT, gOOGLEACCESSTOKEN);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#getApiFacultyDetails");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.DefaultApi;

public class DefaultApiExample {

    public static void main(String[] args) {
        DefaultApi apiInstance = new DefaultApi();
        String fACULTYJWT = fACULTYJWT_example; // String | 
        String gOOGLEACCESSTOKEN = gOOGLEACCESSTOKEN_example; // String | 
        try {
            FacultyProfile result = apiInstance.getApiFacultyDetails(fACULTYJWT, gOOGLEACCESSTOKEN);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#getApiFacultyDetails");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
String *fACULTYJWT = fACULTYJWT_example; //  (optional)
String *gOOGLEACCESSTOKEN = gOOGLEACCESSTOKEN_example; //  (optional)

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

// Get faculty profile details
[apiInstance getApiFacultyDetailsWith:fACULTYJWT
    gOOGLEACCESSTOKEN:gOOGLEACCESSTOKEN
              completionHandler: ^(FacultyProfile output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var FacultyPortalOAuth2Api = require('faculty_portal_o_auth2_api');
var defaultClient = FacultyPortalOAuth2Api.ApiClient.instance;


var api = new FacultyPortalOAuth2Api.DefaultApi()
var opts = { 
  'fACULTYJWT': fACULTYJWT_example, // {{String}} 
  'gOOGLEACCESSTOKEN': gOOGLEACCESSTOKEN_example // {{String}} 
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getApiFacultyDetails(opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

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


            var apiInstance = new DefaultApi();
            var fACULTYJWT = fACULTYJWT_example;  // String |  (optional) 
            var gOOGLEACCESSTOKEN = gOOGLEACCESSTOKEN_example;  // String |  (optional) 

            try
            {
                // Get faculty profile details
                FacultyProfile result = apiInstance.getApiFacultyDetails(fACULTYJWT, gOOGLEACCESSTOKEN);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling DefaultApi.getApiFacultyDetails: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');


$api_instance = new Swagger\Client\ApiDefaultApi();
$fACULTYJWT = fACULTYJWT_example; // String | 
$gOOGLEACCESSTOKEN = gOOGLEACCESSTOKEN_example; // String | 

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


my $api_instance = WWW::SwaggerClient::DefaultApi->new();
my $fACULTYJWT = fACULTYJWT_example; # String | 
my $gOOGLEACCESSTOKEN = gOOGLEACCESSTOKEN_example; # String | 

eval { 
    my $result = $api_instance->getApiFacultyDetails(fACULTYJWT => $fACULTYJWT, gOOGLEACCESSTOKEN => $gOOGLEACCESSTOKEN);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling DefaultApi->getApiFacultyDetails: $@\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.DefaultApi()
fACULTYJWT = fACULTYJWT_example # String |  (optional)
gOOGLEACCESSTOKEN = gOOGLEACCESSTOKEN_example # String |  (optional)

try: 
    # Get faculty profile details
    api_response = api_instance.get_api_faculty_details(fACULTYJWT=fACULTYJWT, gOOGLEACCESSTOKEN=gOOGLEACCESSTOKEN)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling DefaultApi->getApiFacultyDetails: %s\n" % e)

Parameters

Responses

Status: 200 - Faculty details retrieved successfully

Status: 401 - Unauthorized - Missing or invalid token

Status: 500 - Internal server error


getApiFacultySalaryHistory

Get faculty salary history

Retrieve a JSON array of salary history records for the faculty.


/api/faculty/salary/history

Usage and SDK Samples

curl -X GET\
 -H "Authorization: Bearer [[accessToken]]"\
-H "Accept: application/json"\
"http://localhost:8080/api/faculty/salary/history"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.DefaultApi;

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

public class DefaultApiExample {

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


        DefaultApi apiInstance = new DefaultApi();
        String fACULTYJWT = fACULTYJWT_example; // String | 
        String gOOGLEACCESSTOKEN = gOOGLEACCESSTOKEN_example; // String | 
        try {
            array[SalaryRecord] result = apiInstance.getApiFacultySalaryHistory(fACULTYJWT, gOOGLEACCESSTOKEN);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#getApiFacultySalaryHistory");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.DefaultApi;

public class DefaultApiExample {

    public static void main(String[] args) {
        DefaultApi apiInstance = new DefaultApi();
        String fACULTYJWT = fACULTYJWT_example; // String | 
        String gOOGLEACCESSTOKEN = gOOGLEACCESSTOKEN_example; // String | 
        try {
            array[SalaryRecord] result = apiInstance.getApiFacultySalaryHistory(fACULTYJWT, gOOGLEACCESSTOKEN);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#getApiFacultySalaryHistory");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
String *fACULTYJWT = fACULTYJWT_example; //  (optional)
String *gOOGLEACCESSTOKEN = gOOGLEACCESSTOKEN_example; //  (optional)

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

// Get faculty salary history
[apiInstance getApiFacultySalaryHistoryWith:fACULTYJWT
    gOOGLEACCESSTOKEN:gOOGLEACCESSTOKEN
              completionHandler: ^(array[SalaryRecord] output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var FacultyPortalOAuth2Api = require('faculty_portal_o_auth2_api');
var defaultClient = FacultyPortalOAuth2Api.ApiClient.instance;


var api = new FacultyPortalOAuth2Api.DefaultApi()
var opts = { 
  'fACULTYJWT': fACULTYJWT_example, // {{String}} 
  'gOOGLEACCESSTOKEN': gOOGLEACCESSTOKEN_example // {{String}} 
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getApiFacultySalaryHistory(opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

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


            var apiInstance = new DefaultApi();
            var fACULTYJWT = fACULTYJWT_example;  // String |  (optional) 
            var gOOGLEACCESSTOKEN = gOOGLEACCESSTOKEN_example;  // String |  (optional) 

            try
            {
                // Get faculty salary history
                array[SalaryRecord] result = apiInstance.getApiFacultySalaryHistory(fACULTYJWT, gOOGLEACCESSTOKEN);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling DefaultApi.getApiFacultySalaryHistory: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');


$api_instance = new Swagger\Client\ApiDefaultApi();
$fACULTYJWT = fACULTYJWT_example; // String | 
$gOOGLEACCESSTOKEN = gOOGLEACCESSTOKEN_example; // String | 

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


my $api_instance = WWW::SwaggerClient::DefaultApi->new();
my $fACULTYJWT = fACULTYJWT_example; # String | 
my $gOOGLEACCESSTOKEN = gOOGLEACCESSTOKEN_example; # String | 

eval { 
    my $result = $api_instance->getApiFacultySalaryHistory(fACULTYJWT => $fACULTYJWT, gOOGLEACCESSTOKEN => $gOOGLEACCESSTOKEN);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling DefaultApi->getApiFacultySalaryHistory: $@\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.DefaultApi()
fACULTYJWT = fACULTYJWT_example # String |  (optional)
gOOGLEACCESSTOKEN = gOOGLEACCESSTOKEN_example # String |  (optional)

try: 
    # Get faculty salary history
    api_response = api_instance.get_api_faculty_salary_history(fACULTYJWT=fACULTYJWT, gOOGLEACCESSTOKEN=gOOGLEACCESSTOKEN)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling DefaultApi->getApiFacultySalaryHistory: %s\n" % e)

Parameters

Responses

Status: 200 - Salary history retrieved successfully

Status: 401 - Unauthorized

Status: 500 - Internal server error


postApiAuthLogout

Your POST endpoint

Called when user wants to logout


/api/auth/logout

Usage and SDK Samples

curl -X POST\
 -H "Authorization: Bearer [[accessToken]]"\
"http://localhost:8080/api/auth/logout"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.DefaultApi;

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

public class DefaultApiExample {

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


        DefaultApi apiInstance = new DefaultApi();
        String fACULTYJWT = fACULTYJWT_example; // String | ID_token from google
        String gOOGLEACCESSTOKEN = gOOGLEACCESSTOKEN_example; // String | Access token from google
        try {
            apiInstance.postApiAuthLogout(fACULTYJWT, gOOGLEACCESSTOKEN);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#postApiAuthLogout");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.DefaultApi;

public class DefaultApiExample {

    public static void main(String[] args) {
        DefaultApi apiInstance = new DefaultApi();
        String fACULTYJWT = fACULTYJWT_example; // String | ID_token from google
        String gOOGLEACCESSTOKEN = gOOGLEACCESSTOKEN_example; // String | Access token from google
        try {
            apiInstance.postApiAuthLogout(fACULTYJWT, gOOGLEACCESSTOKEN);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#postApiAuthLogout");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
String *fACULTYJWT = fACULTYJWT_example; // ID_token from google (optional)
String *gOOGLEACCESSTOKEN = gOOGLEACCESSTOKEN_example; // Access token from google (optional)

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

// Your POST endpoint
[apiInstance postApiAuthLogoutWith:fACULTYJWT
    gOOGLEACCESSTOKEN:gOOGLEACCESSTOKEN
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var FacultyPortalOAuth2Api = require('faculty_portal_o_auth2_api');
var defaultClient = FacultyPortalOAuth2Api.ApiClient.instance;


var api = new FacultyPortalOAuth2Api.DefaultApi()
var opts = { 
  'fACULTYJWT': fACULTYJWT_example, // {{String}} ID_token from google
  'gOOGLEACCESSTOKEN': gOOGLEACCESSTOKEN_example // {{String}} Access token from google
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.postApiAuthLogout(opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

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


            var apiInstance = new DefaultApi();
            var fACULTYJWT = fACULTYJWT_example;  // String | ID_token from google (optional) 
            var gOOGLEACCESSTOKEN = gOOGLEACCESSTOKEN_example;  // String | Access token from google (optional) 

            try
            {
                // Your POST endpoint
                apiInstance.postApiAuthLogout(fACULTYJWT, gOOGLEACCESSTOKEN);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling DefaultApi.postApiAuthLogout: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');


$api_instance = new Swagger\Client\ApiDefaultApi();
$fACULTYJWT = fACULTYJWT_example; // String | ID_token from google
$gOOGLEACCESSTOKEN = gOOGLEACCESSTOKEN_example; // String | Access token from google

try {
    $api_instance->postApiAuthLogout($fACULTYJWT, $gOOGLEACCESSTOKEN);
} catch (Exception $e) {
    echo 'Exception when calling DefaultApi->postApiAuthLogout: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::DefaultApi;


my $api_instance = WWW::SwaggerClient::DefaultApi->new();
my $fACULTYJWT = fACULTYJWT_example; # String | ID_token from google
my $gOOGLEACCESSTOKEN = gOOGLEACCESSTOKEN_example; # String | Access token from google

eval { 
    $api_instance->postApiAuthLogout(fACULTYJWT => $fACULTYJWT, gOOGLEACCESSTOKEN => $gOOGLEACCESSTOKEN);
};
if ($@) {
    warn "Exception when calling DefaultApi->postApiAuthLogout: $@\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.DefaultApi()
fACULTYJWT = fACULTYJWT_example # String | ID_token from google (optional)
gOOGLEACCESSTOKEN = gOOGLEACCESSTOKEN_example # String | Access token from google (optional)

try: 
    # Your POST endpoint
    api_instance.post_api_auth_logout(fACULTYJWT=fACULTYJWT, gOOGLEACCESSTOKEN=gOOGLEACCESSTOKEN)
except ApiException as e:
    print("Exception when calling DefaultApi->postApiAuthLogout: %s\n" % e)

Parameters

Responses

Status: 200 - OK

Status: 500 - Internal Server Error