LogoLogo
Packmind CloudChangelogGet supportJoin Slack
  • 👋Welcome!
  • 🪐Manage spaces
  • 🔐Security and data
  • 🐞Troubleshooting guides
  • 🚀First steps
    • Enable and configure AI
    • Connect your Git platform
  • 📥Capture your coding practices
    • How to create coding practices
    • Review practices in the Inbox
  • 🔍Enforce practices in your code
    • Setup practices detection with the AI Agent
    • Packmind CLI
      • Run with NPM
      • Run with Docker
      • SonarQube Integration
      • Run in Gitlab CI
  • Coding Assistants Integration
  • 👩‍💻Plugins & Integrations
    • IDE Plugins
      • 🚀Packmind's IDE plugins use cases
      • Visual Studio Code
      • Visual Studio
      • JetBrains IDEs
      • Eclipse
      • Xcode
      • Packmind Tech Coach
    • 🔔Get notifications
  • 📖Best practices management
    • Manage your practices
      • Import, copy and export practices
      • Use categories to organize your practices
      • Manage duplications of practices
      • Move all practices from a space to another space
      • Styling with Markdown
      • Multi-file examples on coding practices
    • 📰Scheduler to push practices
  • ↔️API Reference
    • Authentication
    • Documentation
  • ⚙️Account & Settings
    • 👩‍💼Manage users
    • 💵Subscription and Billing
    • 🔓Single Sign-On (SSO) in Packmind
      • Enable SSO for Packmind Cloud
      • Enable SSO for Packmind Self-Hosted
  • 🏠On-Premise version
    • Release notes - Self-Hosted versions
    • Install the Self-Hosted version
      • Migrate from a legacy setup (Mongo 2.x)
    • Connect a SMTP server
    • Authentication
      • Authentication with OpenLDAP
      • Authentication by SSO
      • Authentication with Active Directory
Powered by GitBook
On this page

Was this helpful?

  1. API Reference

Documentation

PreviousAuthenticationNextManage users

Last updated 2 months ago

Was this helpful?

↔️
  • GETGets all the practices of a space
  • POSTGet best practices identified as negative patterns (Regex and Semgrep)
  • POSTGet best practices identified as negative patterns (Regex and Semgrep) from a list of files

Gets all the practices of a space

get
Path parameters
spaceNamestringRequired

The name of the space you whish to query the practices from

Header parameters
Packmind-api-keystringRequired

Your Packmind API key

Responses
200
Contains an array of all the practices for the space
application/json
401
You are not authorized to access this resource. Check your api key, more so if you are in mutliple organisations. You'll have one api key per organisation.
application/json
get
GET /public/practices/for-space/{spaceName} HTTP/1.1
Host: 
Packmind-api-key: text
Accept: */*
[
  {
    "id": "text",
    "name": "text",
    "description": "text",
    "link": "text",
    "categories": [
      "text"
    ]
  }
]

Get best practices identified as negative patterns (Regex and Semgrep)

post
Header parameters
Packmind-api-keystringRequired

Your Packmind API key

Body
pathstringOptionalExample: SuggestionService.java,
extensionstringOptionalExample: .java
contentstringOptionalExample: import module; private const int = 4;
Responses
200
Contains an array of all the suggested best practices
application/json
401
You are not authorised to access this resource. Check your api key, more so if you are in mutliple organisations. You'll have one api key per organisation.
application/json
422
File path or extension are missing
application/json
post
POST /api/plugin/ide/suggestion/regex/negative HTTP/1.1
Host: 
Packmind-api-key: text
Content-Type: application/json
Accept: */*
Content-Length: 107

{
  "path": "SuggestionService.java,",
  "extension": ".java",
  "content": "import module;\nprivate const int = 4;\n"
}
[
  {
    "_id": "622f638c4e73049622301106",
    "name": "An example of best practice",
    "space": {
      "_id": "61fa9e160065d3192de01d52",
      "name": "Back-end space"
    },
    "lines": [
      0,
      4
    ]
  }
]

Get best practices identified as negative patterns (Regex and Semgrep) from a list of files

post
Header parameters
Packmind-api-keystringRequired

Your Packmind API key

Body
Responses
200
Contains an array of all the suggested best practices
application/json
401
You are not authorized to access this resource. Check your api key, more so if you are in mutliple organisations. You'll have one api key per organisation.
application/json
422
File path or extension are missing
application/json
post
POST /api/plugin/cli/suggestion/batch/negative HTTP/1.1
Host: 
Packmind-api-key: text
Content-Type: application/json
Accept: */*
Content-Length: 176

{
  "files": [
    {
      "fileId": "src/main/java/SuggestionService.java",
      "data": {
        "path": "SuggestionService.java,",
        "extension": ".java",
        "content": "import module;\nprivate const int = 4;\n"
      }
    }
  ]
}
[
  {
    "fileId": "src/main/java/SuggestionService.java",
    "data": {
      "_id": "622f638c4e73049622301106",
      "name": "An example of best practice",
      "space": {
        "_id": "61fa9e160065d3192de01d52",
        "name": "Back-end space"
      },
      "lines": [
        0,
        4
      ]
    }
  }
]