Team Onboarding Scans
Get all Team Onboarding scans
Get all Team Onboarding scan resources.
GET /api/v2/team-onboarding/scans/
Query Parameters
Fields | Required | Description |
---|---|---|
page_size | No | Page size of the returned response. Set to 10 by default. |
GET /api/v2/team-onboarding/scans/ HTTP/1.1
Accept: application/json
Authorization: Token "YOUR SDE ACCESS TOKEN"
HTTP/1.1 200 OK
Content-Type: application/json
{
"count": 2,
"next": null,
"previous": null,
"results": [
{
"id": 1,
"result": {
"A707": [
"12/manage.py",
"12/example_project/urls.py",
"12/example_project/__init__.py",
"12/example_project/wsgi.py",
"12/example_project/asgi.py",
"12/example_project/settings/__init__.py",
"12/example_project/settings/settings.py"
],
"A731": [
"12/example_project/urls.py",
"12/apps/users/serializers.py",
"12/apps/users/views.py"
]
},
"status": "REPO_DELETE_SUCCESS",
"message": null,
"updated": "2024-02-29T17:47:02.599744-05:00",
"project": 1,
"repo": 1,
"job_id": null
},
{
"id": 2,
"result": null,
"status": "TASK_QUEUED",
"message": null,
"updated": "2024-02-29T17:20:47.258151-05:00",
"project": 1,
"repo": 1,
"job_id": "063cb253-60f7-43b4-9f13-1516323d7a4d"
}
]
}
Get a specific Team Onboarding scan
Returns a single Team Onboarding scan resource, as specified by the URL parameter.
GET /api/v2/team-onboarding/scans/{scan_id}/
URL Parameters
Parameter | Description |
---|---|
scan_id | The ID of an existing Team Onboarding scan to be retrieved |
Query Parameters
Parameter | Description |
---|---|
project_id | The ID of an existing project to filter by |
GET /api/v2/team-onboarding/scans/1/ HTTP/1.1
Accept: application/json
Authorization: Token "YOUR SDE ACCESS TOKEN"
HTTP/1.1 200 OK
Content-Type: application/json
{
"id": 1,
"result": {
"A707": [
"12/manage.py",
"12/example_project/urls.py",
"12/example_project/__init__.py",
"12/example_project/wsgi.py",
"12/example_project/asgi.py",
"12/example_project/settings/__init__.py",
"12/example_project/settings/settings.py"
],
"A731": [
"12/example_project/urls.py",
"12/apps/users/serializers.py",
"12/apps/users/views.py"
]
},
"status": "REPO_DELETE_SUCCESS",
"message": null,
"updated": "2024-02-29T17:47:02.599744-05:00",
"project": 1,
"repo": 1,
"job_id": null
}
Run a Team Onboarding Scan
Initiate and run a new Team Onboarding scan using an existing Team Onboarding connection.
POST /api/v2/team-onboarding/scans/
Payload
Fields | Required | Description |
---|---|---|
repo | Yes | The repo ID of an existing Team Onboarding connection |
Notes:
- this endpoint will lock the related project when the scan is created, only users with edit survey permission on the related project can create a scan.
- The repository to scan size should be below 2 Gb
POST /api/v2/team-onboarding/scans/ HTTP/1.1
Accept: application/json
Authorization: Token "YOUR SDE ACCESS TOKEN"
{
"repo": 1
}
HTTP/1.1 201 CREATED
Content-Type: application/json
{
"id": 2
}
Import a Team Onboarding Scan
Import the results from a Team Onboarding scan into the project's survey
PATCH /api/v2/team-onboarding/scan/draft-survey/
Payload
Fields | Required | Description |
---|---|---|
scan_id | Yes | The scan ID of an existing Team Onboarding scan |
Note: Only the user who created the scan can import it.
PATCH /api/v2/team-onboarding/scan/draft-survey/ HTTP/1.1
Accept: application/json
Authorization: Token "YOUR SDE ACCESS TOKEN"
{
"scan_id": 1
}
HTTP/1.1 201 CREATED
Content-Type: application/json
{
"scan_id": 1
}