-
Notifications
You must be signed in to change notification settings - Fork 28
API endpoints for Maven projects
Mihhail Sokolov edited this page Jan 2, 2021
·
46 revisions
Take a look at the documentation to see how to launch the REST server.
Done | Resource | Method | Req. body | Query params | Response codes | Response body |
---|---|---|---|---|---|---|
✅ Missing: tests |
/mvn/packages |
GET |
— |
limit : integer , offset : integer
|
|
{
"id": bigint,
"package_name": text,
"forge": text,
"project_name": text,
"repository": text,
"created_at": timestamp,
"version": text
}
|
✅ Missing: tests |
/mvn/packages/search |
GET |
— |
packageName : text , limit : integer , offset : integer
|
|
[
{
"id": bigint,
"package_name": text,
"forge": text,
"project_name": text,
"repository": text,
"created_at": timestamp
}
]
|
✅ Missing: tests |
/mvn/packages/{pkg} |
GET |
— | — |
|
[
{
"id": bigint,
"package_name": text,
"forge": text,
"project_name": text,
"repository": text,
"created_at": timestamp
}
]
|
✅ Missing: tests |
/mvn/packages/{pkg}/versions |
GET |
— |
limit : integer , offset : integer
|
|
[
{
"id": bigint,
"package_id": bigint,
"version": text,
"cg_generator": text,
"created_at": timestamp,
"metadata": json
}
]
|
✅ Missing: tests |
/mvn/packages/{pkg}/{pkg_ver} |
GET |
— |
limit : integer , offset : integer
|
|
{
"id": bigint,
"package_id": bigint,
"version": text,
"cg_generator": text,
"created_at": timestamp,
"metadata": json
}
|
✅ Missing: tests |
/mvn/packages/{pkg}/{pkg_ver}/metadata |
GET |
— |
limit : integer , offset : integer
|
|
{
"package_name": text,
"version": text,
"metadata": json
}
|
✅ Missing: tests |
/mvn/packages/{pkg}/{pkg_ver}/callgraph |
GET |
— |
limit : integer , offset : integer
|
|
[
{
"source_id": bigint,
"target_id": bigint
}
]
Could be retrieved directly from graph DB. |
✅ Missing: tests |
/mvn/packages/{pkg}/{pkg_ver}/rcg |
GET |
— | — |
|
"link to JSON RCG for downloading"
|
✅ Missing: tests |
/mvn/package_version/{pkg_version_id}/rcg |
GET |
— | — |
|
"link to JSON RCG for downloading"
|
Done | Resource | Method | Req. body | Query params | Response codes | Response body |
---|---|---|---|---|---|---|
✅ Missing: tests |
/mvn/packages/{pkg}/{pkg_ver}/deps |
GET |
— |
limit : integer , offset : integer
|
|
[
{
"package_version_id": bigint,
"dependency_id": bigint,
"version_range": [
text
],
"metadata": json
}
]
|
Done | Resource | Method | Req. body | Query params | Response codes | Response body |
---|---|---|---|---|---|---|
✅ Missing: tests |
/mvn/packages/{pkg}/{pkg_ver}/modules |
GET |
— |
limit : integer , offset : integer
|
|
[
{
"id": bigint,
"package_version_id": binint,
"namespace": text,
"created_at": timestamp,
"metadata": json
}
]
|
✅ Missing: tests |
/mvn/packages/{pkg}/{pkg_ver}/modules/metadata |
POST |
"module namespace" |
— |
|
[
{
"package_name": text,
"version": text,
"namespace": text,
"metadata": json
}
]
|
✅ Missing: tests |
/mvn/packages/{pkg}/{pkg_ver}/modules/files |
POST |
"module namespace" |
limit : integer , offset : integer
|
|
[
{
"id": bigint,
"package_version_id": bigint,
"path": text,
"checksum": bytea,
"created_at": timestamp,
"metadata": json
}
]
|
✅ Missing: tests |
/mvn/packages/{pkg}/{pkg_ver}/modules/callables |
GET |
"module namespace" |
limit : integer , offset : integer
|
|
[
{
"id": bigint,
"module_id": bigint,
"fasten_uri": text,
"is_internal_call": boolean,
"created_at": timestamp,
"line_start": int,
"line_end": int,
"metadata": json
}
]
|
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
|
|
[
{
"package_name": text,
"version": text,
"name": text,
"metadata": json
}
]
|
✅:warning: Not tested due to missing data in KB. Also Missing: tests |
/mvn/packages/{pkg}/{pkg_ver}/binary-modules/{binary_module}/metadata |
GET |
— |
limit : integer , offset : integer
|
|
[
{
"package_name": text,
"version": text,
"name": text,
"metadata": json
}
]
|
✅: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
|
|
[
{
"id": bigint,
"package_version_id": bigint,
"path": text,
"checksum": bytea,
"created_at": timestamp,
"metadata": json
}
]
|
Callable ID = module ID (package version) + FASTEN URI
Done | Resource | Method | Req. body | Query params | Response codes | Response body |
---|---|---|---|---|---|---|
✅ Missing: tests |
/mvn/packages/{pkg}/{pkg_ver}/callables |
GET |
— |
limit : integer , offset : integer
|
|
[
{
"id": bigint,
"module_id": bigint,
"fasten_uri": text,
"is_internal_call": boolean,
"created_at": timestamp,
"line_start": int,
"line_end": int,
"metadata": json
}
]
|
✅ Missing: tests |
/mvn/packages/{pkg}/{pkg_ver}/callable/metadata |
POST |
"fasten uri" |
— |
|
{
"package_name": text,
"version": text,
"fasten_uri": text,
"metadata": json
}
|
✅ Missing: tests |
/callables |
POST |
List of fully qualified FASTEN URIs |
— |
|
{
"": metadata:json,
"": metadata:json,
...
}
|
Done | Resource | Method | Req. body | Query params | Response codes | Response body |
---|---|---|---|---|---|---|
✅ Missing: tests |
/mvn/packages/{pkg}/{pkg_ver}/edges |
GET |
— |
limit : integer , offset : integer
|
|
[
{
"source_id": bigint,
"target_id": bigint,
"receivers": [
{
"line": int,
"type": text,
"receiver_uri": text
}
],
"metadata": json
}
]
|
Done | Resource | Method | Req. body | Query params | Response codes | Response body |
---|---|---|---|---|---|---|
✅ Missing: tests |
/mvn/packages/{pkg}/{pkg_ver}/files |
GET |
— |
limit : integer , offset : integer
|
|
[
{
"id": bigint,
"package_version_id": bigint,
"path": text,
"checksum": bytea,
"created_at": timestamp,
"metadata": json
}
]
|
Done | Resource | Method | Req. body | Query params | Response codes | Response body |
---|---|---|---|---|---|---|
✅ Missing: tests |
/mvn/packages/{pkg}/{pkg_ver}/resolve/dependencies |
GET |
— |
transitive : boolean , timestamp : long
|
|
[
{
"id": bigint
"artifactId": text,
"groupId": text,
"version": text,
"createdAt": timestamp,
"url": text
}
]
|
✅ Missing: tests |
/mvn/packages/{pkg}/{pkg_ver}/resolve/dependents |
GET |
— |
transitive : boolean , timestamp : long
|
|
[
{
"id": bigint
"artifactId": text,
"groupId": text,
"version": text,
"createdAt": timestamp,
"url": text
}
]
|
Done | Resource | Method | Req. body | Query params | Response codes | Response body |
---|---|---|---|---|---|---|
✅ Missing: tests |
/callable_uris |
POST |
List of GIDs (callable IDs) |
— |
|
{
"gid1": full_fasten_uri:text,
"gid2": full_fasten_uri:text,
...
}
|
✅ Missing: tests |
/metadata/callables |
POST |
List of full FASTEN URIs |
allAttributes : boolean , attributes : list:text
|
|
{
"fasten_uri1": callable_metadata:json,
"fasten_uri2": callable_metadata:json,
...
}
|
✅ Missing: tests |
/resolve_dependencies |
POST |
List of Maven coordinates (dependencies) |
— |
|
{
"nodes": [
node_id:bigint
],
"edges": [
[
source_id:bigint,
target_id:bigint
],
...
]
}
|
✅ Missing: tests |
/__INTERNAL__/packages/{pkg_version_id}/directedgraph |
GET |
— |
needStitching : boolean , timestamp : long
|
|
{
"nodes": [
node_id:bigint
],
"edges": [
[
source_id:bigint,
target_id:bigint
],
...
]
}
|