Skip to content

Zeph3r/Laptop-Availability-Notifier

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 

Repository files navigation

BOSSDesk API Integration

This script provides a simple integration with the BOSSDesk API, specifically targeting the Configuration Management Database (CMDB) endpoint to fetch and count available laptops.

Prerequisites

  • Python 3.x
  • requests library: For making HTTP requests.
  • python-dotenv library: For loading environment variables from a .env file.

Installation

  1. Clone this repository:
git clone [URL of your repo]
  1. Navigate to the project directory:
cd [project-directory]
  1. Install the required packages:
pip install requests python-dotenv

Usage

  1. Ensure that you have set up your .env file as described in the Configuration section.
  2. Run the script:
python [script-name].py

The script will output the number of available laptops based on the API's response.

Configuration

Configuration is managed through a .env file. Create a .env file in the root directory of the project and specify the required environment variables:

BOSSDESK_API_TOKEN=your_token
API_ENDPOINT=https://mycompany.bossdesk.io/api/v1/cmdb
  • BOSSDESK_API_TOKEN: Your BOSSDesk API token for authentication
  • API_ENDPOINT: The endpoint URL of the BOSSDesk API you are targeting.

Note: Ensure that you never commit the .env file to the version control to keep sensitive data secure

Contributing

  1. Fork the repository.
  2. Create a new branch for you changes
  3. Make your changes and commit them with meaningful commit messages
  4. Open a pull request

Remember to replace placeholders like [URL of your repo] and [script-name].py with appropriate values for your repository and script.

About

Automated script to fetch available laptops from BOSSDesk's CMDB, generate a report, and send it via email. Aimed at streamlining inventory checks and ensuring timely notifications.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages