URI Description
Squore REST API provides access to Squore data using URI paths.
Using these URIs, a REST client application will send HTTP request to Squore server and parse the JSON response from the server.
Supported operations are standard HTTP methods GET, PUT, POST and DELETE.
API URI Structure
Squore REST API URIs looks like the following:
http://localhost:8180/api/<version>/<resource-name>
Where:
-
<version>is the API version to use. -
<resource-name>is the name of the entity you want to retrieve such as artifacts, projects or findings.
Example:
http://localhost:8180/api/v4/projects
API Versioning
From Squore 26.0.0 and on, API versioning is handled directly through the URI path. Using an explicit version ensures that applications continue to use the same API behavior, as long as the selected version is still supported.
Applications that require predictable behavior are encouraged to use versioned endpoints.
|
Squore also supports unversioned endpoints, however, these are automatically redirected to the latest available API version. Using
|
Backwards Compatibility
Although from Squore 26.0.0 the API versioning is determined by the URI path, the Accept headers application/vnd.squore.app-v2+json, application/vnd.squore.app-v3+json and application/vnd.squore.app-latest+json are automatically transformed to application\json to allow backwards compatibility.
Hence, specifying a version in the Accept header no longer influences the selected API version;
Response Format
Squore REST API response is returned to the JSON format.
GET /projects[
{
"id": 1,
"modelId": "software_analytics",
"ownerId": 2,
"name": "Earth",
"metaProject": false,
"multiBranch": false,
"mainId": 1,
"creationTime": "2025-01-22T00:14:58.000550+01:00",
"artifactId": 1,
"branches": {
"main": {
"id": 1,
"name": "main",
"level": {
"id": "LEVELD",
"icon": "/ui/squore/resource/config/models/Shared/Images/icons/levels/letters_7levels/level_d.svg"
},
"group": "C",
"color": [
130,
196,
240,
255
],
"projectId": 1,
"currentVersionId": 8,
"lastBaselineId": 6,
"lastTask": {
"id": 7,
"type": "build",
"status": {
"id": "DONE",
"name": "Successful"
},
"elapsedTime": 8867,
"submitDate": "2025-01-22T00:16:05.000839+01:00"
},
"lastBuild": {
"id": 8,
"baseline": false,
"analysisTime": "2025-01-22T00:16:05.000542+01:00",
"status": {
"id": "DONE",
"name": "Successful"
}
},
"creationTime": "2025-01-22T00:14:58.000550+01:00",
"artifactId": 1,
"dirty": false
}
}
}
]
|
You can find the list of available entities/resources in the API Viewer page. Where you will also find a response example for each request or endpoint. |