Skip to content

API endpoints for Maven projects

Marco Micera edited this page Nov 23, 2020 · 46 revisions

ToC

Getting started

Take a look at the documentation to see how to launch the REST server.

Useful links

Endpoints

Packages and package versions

Done Resource Method Req. body Query params Response codes Response body

Missing:
tests
/mvn/packages/{pkg} GET
  • 200: Package returned
  • 404: Package not found
[ { "id": bigint, "package_name": text, "forge": text, "project_name": text, "repository": text, "created_at": timestamp, "version": text } ]


Missing:
tests
/mvn/packages/{pkg}/versions GET limit: integer, offset: integer
  • 200: Package versions returned
  • 400: Invalid limit value
  • 400: Invalid offset value
  • 404: Package not found
[ { "id": bigint, "package_id": bigint, "version": text, "cg_generator": text, "created_at": timestamp, "metadata": jsonb } ]

Missing:
tests
/mvn/packages/{pkg}/{pkg_ver} GET limit: integer, offset: integer
  • 200: OK
  • 400: Invalid limit value
  • 400: Invalid offset value
  • 404: Package not found
  • 404: Package version not found
[ { "id": bigint, "package_id": bigint, "version": text, "cg_generator": text, "created_at": timestamp, "metadata": jsonb } ]

Only one element, it won't be an array soon.


Missing:
tests
/mvn/packages/{pkg}/{pkg_ver}/metadata GET limit: integer, offset: integer
  • 200: OK
  • 400: Invalid limit value
  • 400: Invalid offset value
  • 404: Package not found
  • 404: Package version not found
[ { "package_name": text, "version": text, "metadata": jsonb } ]

Only one element, it won't be an array soon.


Missing:
tests
/mvn/packages/{pkg}/{pkg_ver}/callgraph GET limit: integer, offset: integer
  • 200: OK
  • 400: Invalid limit value
  • 400: Invalid offset value
  • 404: Package not found
  • 404: Package version not found
[ { "source_id": bigint, "target_id": bigint } ]

Could be retrieved directly from graph DB.

Dependencies

Done Resource Method Req. body Query params Response codes Response body

Missing:
tests
/mvn/packages/{pkg}/{pkg_ver}/deps GET limit: integer, offset: integer
  • 200: OK
  • 400: Invalid limit value
  • 400: Invalid offset value
  • 404: Package not found
  • 404: Package version not found
dependencies:*

Modules

Done Resource Method Req. body Query params Response codes Response body

Missing:
tests
/mvn/packages/{pkg}/{pkg_ver}/modules GET limit: integer, offset: integer
  • 200: OK
  • 400: Invalid limit value
  • 400: Invalid offset value
  • 404: Package not found
  • 404: Package version not found
modules:*
🐞
Unsupported encoded URI
/mvn/packages/{pkg}/{pkg_ver}/modules/{namespace}/metadata GET limit: integer, offset: integer
  • 200: OK
  • 400: Invalid limit value
  • 400: Invalid offset value
  • 404: Package not found
  • 404: Package version not found
  • 404: Module namespace not found
modules:metadata
🐞
Unsupported encoded URI
/mvn/packages/{pkg}/{pkg_ver}/modules/{namespace}/files GET limit: integer, offset: integer
  • 200: OK
  • 400: Invalid limit value
  • 400: Invalid offset value
  • 404: Package not found
  • 404: Package version not found
  • 404: Module namespace not found
files:*

Binary Modules

Done Resource Method Req. body Query params Response codes Response body
✅:warning:
Not tested due to missing data in KB.
Also Missing:
tests
/mvn/packages/{pkg}/{pkg_ver}/binary-modules GET limit: integer, offset: integer
  • 200: OK
  • 400: Invalid limit value
  • 400: Invalid offset value
  • 404: Package not found
  • 404: Package version not found
binary_modules:*
✅:warning:
Not tested due to missing data in KB.
Also Missing:
tests
/mvn/packages/{pkg}/{pkg_ver}/binary-modules/{binary}/metadata GET limit: integer, offset: integer
  • 200: OK
  • 400: Invalid limit value
  • 400: Invalid offset value
  • 404: Package not found
  • 404: Package version not found
  • 404: Binary name not found
binary_modules:metadata
✅:warning:
Not tested due to missing data in KB.
Also Missing:
tests
/mvn/packages/{pkg}/{pkg_ver}/binary-modules/{binary}/files GET limit: integer, offset: integer
  • 200: OK
  • 400: Invalid limit value
  • 400: Invalid offset value
  • 404: Package not found
  • 404: Package version not found
  • 404: Binary name not found
files:*

Callables

Callable ID = module ID (package version) + FASTEN URI + other

Done Resource Method Req. body Query params Response codes Response body

Missing:
tests
/mvn/packages/{pkg}/{pkg_ver}/callables GET limit: integer, offset: integer
  • 200: OK
  • 400: Invalid limit value
  • 400: Invalid offset value
  • 404: Package not found
  • 404: Package version not found
callables:*

Retrievably directly from graph DB, one-line query.

🐞
Unsupported encoded URI
/mvn/packages/{pkg}/{pkg_ver}/{fasten_uri}/metadata GET limit: integer, offset: integer
  • 200: OK
  • 400: Invalid limit value
  • 400: Invalid offset value
  • 404: Package not found
  • 404: Package version not found
  • 404: FASTEN URI not found
callables:metadata

Edges

Done Resource Method Req. body Query params Response codes Response body

Missing:
tests
/mvn/packages/{pkg}/{pkg_ver}/edges GET limit: integer, offset: integer
  • 200: OK
  • 400: Invalid limit value
  • 400: Invalid offset value
  • 404: Package not found
  • 404: Package version not found
edges:*

Files

Done Resource Method Req. body Query params Response codes Response body

Missing:
tests
/mvn/packages/{pkg}/{pkg_ver}/files GET limit: integer, offset: integer
  • 200: OK
  • 400: Invalid limit value
  • 400: Invalid offset value
  • 404: Package not found
  • 404: Package version not found
files:*