The Successfactors OData Sandbox is a Python application that provides a user interface for analyzing OData metadata and finding the shortest path between entities using a graph-based approach.
- Entity Metadata Analysis: Browse and analyze OData entity metadata from XML files.
- Shortest Path Finder: Find the shortest path between two entities, considering specified navigation entities and excluding others.
- User-Friendly Interface: Utilizes Tkinter for a simple and interactive user interface.
To retrieve the entire metadata of an instance, you can use the OData API call: https://<$hostname$>/odata/v2/$metadata
Here is a list of hostnames based on SAP Support Knowledge Base Note 2215682:
-
Development Environment (Example):
- Hostname:
https://api68sales.successfactors.com
- Hostname:
-
Quality Assurance Environment (Example):
- Hostname:
https://api4preview.sapsf.com
- Hostname:
-
Production Environment (Example):
- Hostname:
https://api4.successfactors.com
- Hostname:
You can also use Postman to make the API call:
-
Open Postman.
-
Set the HTTP method to
GET
. -
Enter the API endpoint in the URL bar: https://<$hostname$>/odata/v2/$metadata
-
Select basic authentication where username, company ID, and password are combined into a string as such: username@company ID:password
-
Click on the "Send" button to make the API call.
-
Save the received metadata EMDX file body as a XML file and later use it in the appliaction.
This will fetch the entire metadata of the OData instance, providing detailed information about entities, properties, and relationships.
Note: Make sure to replace <hostname>
with the actual hostname corresponding to the environment you are working on.
Successfactors-OData-Sandbox/
|-- gui/
| |-- __init__.py
| └── app.py
|-- odata_utils/
| |-- __init__.py
| |-- graph_utils.py
| └── xml_parser.py
|-- dist/
| └── main.exe
|-- main.py
|-- requirements.txt
|-- setup.py
gui/
: Contains the Tkinter-based GUI application.odata_utils/
: Utilities for handling OData metadata and graph-related operations.main.py
: Entry point of the application.requirements.txt
: Lists the project dependencies.setup.py
: Configuration for setting up the project.
-
Clone the repository:
git clone https://github.com/ShayanMajumder/Successfactors-OData-Sandbox.git
-
Navigate to the project directory:
cd Successfactors-OData-Sandbox
-
Create and activate a virtual environment:
python -m venv venv source venv/bin/activate # On Linux/macOS .\venv\Scripts\activate # On Windows
-
Install dependencies:
pip install -r requirements.txt
-
Run the application:
python main.py
-
Deactivate the virtual environment (when done):
deactivate
You can use PyInstaller to create standalone executables for your Python applications on Windows and macOS. Follow the steps below to create executables for the Successfactors OData Sandbox:
Open a terminal and install PyInstaller using the following command:
pip install pyinstaller
Go to the directory where your main.py file is located.
cd /path/to/Successfactors-OData-Sandbox
Run the following command to create an executable for Windows:
pyinstaller --onefile --windowed main.py
This command generates a standalone executable (main.exe in Windows) or executable (main.app in macOS) in the dist directory.
Navigate to the dist directory and run the generated executable:
For Windows: Double-click on main.exe. For macOS: Double-click on main.app. Now, you can distribute the executable files without requiring users to have Python installed.
Note: PyInstaller might include some additional files in the dist directory. You can distribute the entire directory for the application to work properly.
- Select an XML file containing OData metadata.
- Browse and analyze entity metadata.
- Specify starting and ending entities.
- Optionally, include/exclude navigation entities.
- Click "Find Shortest Path" to discover the shortest path.
Feel free to contribute to this project! Fork the repository, make your changes, and submit a pull request.
This project is licensed under the MIT License - see the LICENSE file for details.