Skip to content

Web API developed in .NET Core for the Palantir Information Radiator project. Main objective: to communicate with various online administration and monitoring services of software development projects, such as GitHub, Pivotal Tracker, GitLab, among others, whose data will be displayed in the Palantir web UI on Tizen OS Smart TVs and another devi…

License

Hugh-Dev/Backend

 
 

Repository files navigation

Palantir Web API

Palantir project - Web API

The web API of the Palantir Information Radiator Project
Explore the docs »

View Demo · Report Bug · Request Feature

Table of Contents

About The Project

Web API developed in .NET Core for the Palantir Information Radiator project. Main objective: to communicate with various online administration and monitoring services of software development projects, such as GitHub, Pivotal Tracker, GitLab, among others, whose data will be displayed in the Palantir web UI on Tizen OS Smart TVs and another devices as single-board computers such as Raspberry Pi.

Built And Tested With

Getting Started

To get a local copy up and running consider these recommendations and follow these simple example steps:

Prerequisites

Installation

  1. Clone the repo
git clone https://github.com/untref-ingsoft/tfi-cozzi/information-radiator.git
  1. Go to the project root folder
  2. Build the project
dotnet build
  1. Go to the Palantir.WebApi assembly folder inside the root folder
  2. Run the project
dotnet run

By default, the .NET Core project will run on a Kestrel web server local instance, whose default port is 5000.

If you are not interested in developing the project, but just using the API, you can download it from Docker Hub with the following command:

  • For AMD64 (x86-64) Docker installations:
docker pull gonzalocozzi/palantir-api-amd64
  • For ARM64 (aarch64) Docker installations:
docker pull gonzalocozzi/palantir-api-arm64

...and run the Docker container with:

  • For AMD64 (x86-64) Docker installations (with port 5000 exposed):
docker run -d -p 5000:80 gonzalocozzi/palantir-api-amd64
  • For ARM64 (aarch64) Docker installations (with port 5000 exposed):
docker run -d -p 5000:80 gonzalocozzi/palantir-api-arm64

You can also generate the Docker image locally, after cloning the repository, from the Dockerfile available in the project:

docker build -t docker-image-name path-to-dockerfile

Installation (with the Palantir web UI)

You can use this project in conjunction with the Palantir web UI project, using Docker Compose. This requires three files which must be located in the same folder:

  • a configuration file for this API, called apiConfig.json (example at this link)

  • a configuration file for the web frontend called webConfig.json (example at this link)

  • a Docker Compose file (example at this link).

To run the Docker Compose and start the application, the following command must be run in the folder in which the three files are stored:

docker-compose up -d

Usage as administrator (ADMIN)

Initially, you need to set up the services that will return information about the development project(s) you want to follow up:

  • Configuring a Source Control Management (SCM) service:
curl -X POST -d {"service":"Palantir.ServiceAssembly","user":"user-name","projects":["project-name"],"token":"alphanumeric-token"} -H 'Content-Type: application/json' http://localhost:5000/admin/scm
  • Configuring a Issue Tracking (IT) service:
curl -X POST -d {"service":"Palantir.ServiceAssembly","projects":["project-name"],"token":"alphanumeric-token"} -H 'Content-Type: application/json' http://localhost:5000/admin/it
  • Configuring an Build Server (BS) service:
curl -X POST -d {"service":"Palantir.ServiceAssembly","projects":["project-number"],"token":"alphanumeric-token"} -H 'Content-Type: application/json' http://localhost:5000/admin/bs
  • Configuring an Iframe service:
curl -X POST -d {"Iframe": "<iframe src='ifreame-address' style='border: 0' width='600' height='600' frameborder='0' scrolling='no'></iframe>"
} -H 'Content-Type: application/json' http://localhost:5000/admin/iframe

All this settings will be stored in the API configuration file (apiConfig.json) previously mentioned.

You can then ask the API for the stored settings, for example from the Source Control Manager (SCM).

curl -X GET http://localhost:5000/admin/scm

You can also update the stored setting (only if there is a previously stored setting for the service) or delete it:

  • Updating the Source Control Manager (SCM) settings:
curl -X PUT -d {"service":"Palantir.GitHub","user":"user-name","projects":["project-name"],"token":"alphanumeric-token"}} -H {{'Content-Type: application/json'} http://localhost:5000/admin/scm
  • Deleting the Source Control Manager (SCM) settings:
curl -X DELETE http://localhost:5000/admin/scm

Usage as user (VIEW)

As a user, you will be able to obtain the data that the monitoring services offer. To do this, you can request them from the API:

  • Getting data from a Source Control Manager (SCM) service:
curl -X GET http://localhost:5000/view/scm/
  • Getting data from a Issue Tracking (IT) service:
curl -X GET http://localhost:5000/view/it/
  • Getting data from a Build Server (BS) service:
curl -X GET http://localhost:5000/view/bs/

Roadmap

See the open issues for a list of proposed features (and known issues).

Contributing

Please read CONTRIBUTING for details on our code of conduct, and the process for submitting pull requests to us.

License

Distributed under the GPL License. See LICENSE for more information.

Contact

Gonzalo Alejandro Cozzi - gcozzi@untref.edu.ar

Additional bibliography and acknowledgements

About

Web API developed in .NET Core for the Palantir Information Radiator project. Main objective: to communicate with various online administration and monitoring services of software development projects, such as GitHub, Pivotal Tracker, GitLab, among others, whose data will be displayed in the Palantir web UI on Tizen OS Smart TVs and another devi…

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C# 99.8%
  • Dockerfile 0.2%