Scanyp REST API

Scanyp is highly customizable. Indeed the rules, queries, thresholds, metrics, and charts are specified using Python functions, which use the Scanyp code model API to define their behavior.

Analysis

Get projects:
To get all the parsed projects.
Self hosted server call:
curl -L  -H "Authorization: Bearer <TOKEN>" http://server:port/projects
Cloud server call:
curl -L  -H "Authorization: Bearer <TOKEN>"  https://scanypcloud.io/account/projects

Get project:
Get the project by id, the ids of projects are retrieved from the getProjects function.
Self hosted server call:
curl -L  -H "Authorization: Bearer <TOKEN>"\   http://server:port/projects/{id}
Cloud server call:
curl -L  -H "Authorization: Bearer <TOKEN>"\   https://scanypcloud.io/account/projects/{id}

Get perspective:
Get the perspective by id, the ids of perspectives are retrieved from the getProject(id) function.
Self hosted server call:
curl -L  -H "Authorization: Bearer <TOKEN>"\   http://server:port/perspectives/{id}
Cloud server call:
curl -L  -H "Authorization: Bearer <TOKEN>" https://scanypcloud.io/account/perspectives/{id}

Get analysis:
Get a specific  project analysis, an analysis is identified by an Id. The latest analysis Id and the Ids of all the project analysis are retrieved from the getProject function
Self hosted server call:
curl -L  -H "Authorization: Bearer <TOKEN>"\   http://server:port/analysis/{id}
Cloud server call:
curl -L  -H "Authorization: Bearer <TOKEN>"\   https://scanypcloud.io/account/analysis/{id}

Get analysis modules:
Get all the modules detected by a project analysis  For example if it's a dotnet visual studio solution , each project is a module of the scanyp project.
Self hosted server call:
curl -L  -H "Authorization: Bearer <TOKEN>"  http://server:port/analysis/id/modules
Cloud server call:
curl -L  -H "Authorization: Bearer <TOKEN>"  https://scanypcloud.io/account/analysis/{id}/modules

Get analysis namespaces:
Get all the namespaces detected by a project analysis  
Self hosted server call:
curl -L  -H "Authorization: Bearer <TOKEN>"  http://server:port/analysis/{id}/namespaces
Cloud server call:
curl -L  -H "Authorization: Bearer <TOKEN>" https://scanypcloud.io/account/analysis/{id}/namespaces

Get analysis types:
Get all the types detected by a project analysis  
Self hosted server call:
curl -L  -H "Authorization: Bearer <TOKEN>" http://server:port/analysis/{id}/types
Cloud server call:
curl -L  -H "Authorization: Bearer <TOKEN>"  https://scanypcloud.io/account/analysis/{id}/types

Get analysis methods:
Get all the methods detected by a project analysis  
Self hosted server call:
curl -L  -H "Authorization: Bearer <TOKEN>"  http://server:port/analysis/{id}/methods
Cloud server call:
curl -L  -H "Authorization: Bearer <TOKEN>" https://scanypcloud.io/account/analysis/{id}/methods

Get Code Element Metrics:
Get the metrics of a specific code element of a project analysis, the code element Ids are retrieved from the functions getAnalysisModules, getAnalysisNamespaces, getAnalysisTypes and getAnalysisMethods. Or from the childs array of the result of the getCodeElementMetrics function.
Self hosted server call:
curl -L  -H "Authorization: Bearer <TOKEN>" http://server:port/analysis/{id}/element/{idelement}
Cloud server call:
curl -L  -H "Authorization: Bearer <TOKEN>" https://scanypcloud.io/account/analysis/{id}/element/{idelement}

Get Code Element Issues:
Get the issues detected for a specific code element of a project analysis, the code element Ids are retrieved from the functions getAnalysisModules, getAnalysisNamespaces, getAnalysisTypes and getAnalysisMethods. Or from the childs array of the result of the getCodeElementMetrics function.
Self hosted server call:
curl -L  -H "Authorization: Bearer <TOKEN>" http://server:port/analysis/{id}/element/{idelement}/issues
Cloud server call:
curl -L  -H "Authorization: Bearer <TOKEN>" https://scanypcloud.io/account/analysis/{id}/element/{idelement}/issues

Get Code Element Dependencies:
Get the dependencies detected for a specific code element of a project analysis, the code element Ids are retrieved from the functions getAnalysisModules, getAnalysisNamespaces, getAnalysisTypes and getAnalysisMethods. Or from the childs array of the result of the getCodeElementMetrics function.

Self hosted server call:
curl -L  -H "Authorization: Bearer <TOKEN>"  http://server:port/analysis/{id}/element/{idelement}/dependencies
Cloud server call:
curl -L  -H "Authorization: Bearer <TOKEN>" https://scanypcloud.io/account/analysis/{id}/element/{idelement}/dependencies

Teams and Users

Get users:
Get all the scanyp users.
Self hosted server call:
curl -L  -H "Authorization: Bearer <TOKEN>"  http://server:port/users
Cloud server call:
curl -L  -H "Authorization: Bearer <TOKEN>"  https://scanypcloud.io/account/users

Get teams:
Get all the scanyp teams.
Self hosted server call:
curl -L  -H "Authorization: Bearer <YOUR-TOKEN>"  http://server:port/teams
Cloud server call:
curl -L  -H "Authorization: Bearer <YOUR-TOKEN>"  https://scanypcloud.io/account/teams

Tasks and WorkingSets

Get Tasks:
Get the tasks created by a user in a specific project.
Self hosted server call:
curl -L  -H "Authorization: Bearer <TOKEN>"\   http://server:port/users/{iduser}/projects/{idproject}/tasks
Cloud server call:
curl -L  -H "Authorization: Bearer <TOKEN>"\   https://scanypcloud.io/account/users/{iduser}/projects/{idproject}/tasks

Get Working Sets:
Get the working sets  created by a user in a specific project.
Self hosted server call:
curl -L  -H "Authorization: Bearer <TOKEN>"\   http://server:port/users/{iduser}/projects/{idproject}/workingsets
Cloud server call:
curl -L  -H "Authorization: Bearer <TOKEN>"\   https://scanypcloud.io/account/users/{iduser}/projects/{idproject}/workingsets