How to Write API Requests Using Cursor AI
Cursor AI is a popular development tool and IDE that can use language models to generate scripts.
For best results, you’ll need either a paid version of Cursor or an API key for ChatGPT / DeepSeek or other chatbots.
To make Cursor aware of the JumpServer API documentation, you need to:
-
Download the
swagger.jsonfile from:https://PAM/api/swagger.json, wherePAMis the hostname or IP address of your JumpServer. -
Create a new working directory for Cursor, where the generated scripts will be stored, and copy the
swagger.jsonfile into this directory. -
After that, ask Cursor to generate the script you need based on the API documentation in
swagger.json.
You can write your requests in Russian in free form, for example:
“In a separate file, create a script that outputs all users, their roles, and the names of their organizations.”
