Documentation

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
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
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
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
      ]
    }
  }
]

Last updated

Was this helpful?