Rotina de sincronismo de chamados entre ServiceNow e GLPI
Go to file
Rafael Lopes b746ce5ea1 REFACTOR: Substituição de databaseModel por ticketSnModel
- Remove databaseModel antigo e substitui por ticketSnModel
- Comenta trecho que gerava .json para verificação da API
- Estrutura melhor o model para coletar todos os dados da request
2025-09-05 20:28:15 -03:00
config Refatorando dados de autenticação no arquivo apiConfing.js. Criação da função que consome as requisições do ServiceNow e gera um JSON com os dados. 2025-09-03 16:11:30 -03:00
src REFACTOR: Substituição de databaseModel por ticketSnModel 2025-09-05 20:28:15 -03:00
.env FEAT: Integração ServiceNow + PostgreSQL com salvamento automático 2025-09-03 21:40:04 -03:00
.gitignore Tirando .env do gitignore. 2025-09-03 16:43:17 -03:00
package-lock.json FEAT: Implementação de sistema de logs com Winston 2025-09-05 20:27:35 -03:00
package.json FEAT: Implementação de sistema de logs com Winston 2025-09-05 20:27:35 -03:00
README.md Initial commit - SNGLPI 2025-08-30 22:04:35 +00:00

servicenow-glpi-sync/README.md

ServiceNow and GLPI Sync

This project is designed to facilitate the integration between ServiceNow and GLPI, allowing for the synchronization of tickets between the two platforms. It utilizes Node.js and follows the MVC architecture pattern.

Table of Contents

Prerequisites

  • Node.js (version 14 or higher)
  • npm (Node Package Manager)
  • PostgreSQL or MySQL database
  • Access to ServiceNow and GLPI APIs

Installation

  1. Clone the repository:

    git clone https://github.com/yourusername/servicenow-glpi-sync.git
    cd servicenow-glpi-sync
    
  2. Install the dependencies:

    npm install
    
  3. Copy the .env.example file to .env and fill in the required environment variables:

    cp .env.example .env
    

Configuration

  • Update the .env file with your ServiceNow and GLPI API credentials, database connection details, and any other necessary configurations.

Running the Application

To start the application, run:

node server.js

The application will listen on the port specified in the .env file.

Endpoints

  • POST /tickets/sync - Synchronize tickets from ServiceNow to GLPI.
  • GET /tickets/:id - Retrieve details of a specific ticket.
  • POST /tickets - Create a new ticket in GLPI based on ServiceNow data.
  • PUT /tickets/:id - Update an existing ticket in GLPI.

Logging

The application uses Winston for logging. Logs are stored in the logs directory:

  • app.log - Logs application events.
  • error.log - Logs errors that occur during execution.

Contributing

Contributions are welcome! Please open an issue or submit a pull request for any improvements or bug fixes.

License

This project is licensed under the MIT License. See the LICENSE file for details.