-
Notifications
You must be signed in to change notification settings - Fork 0
Scoring API
This documentation provides details about all available scoring endpoints. Endpoints are grouped by their functionality. For every endpoint, the request is routed through the gateway, thus the Bearer token must be included in the request header.
The request header should include the following key-value pair:
Authorization: Bearer <token>-
Content-Type: application/json
Even if the header email is asked in the doc, if you're querying through the gateway, you must use theAuthorizationheader instead of theemailone.
If you were to expose the ports of this API to curl it directly, you would need to instead of using the Bearer token, use the header email with the value of the user's email when told in the endpoint description.
GET /scoring/ping (check service health)
Description:
Returns a simple "pong" response confirming the service is running.
Responses:
| HTTP Code | Content-Type | Response |
|---|---|---|
200 |
text/plain |
pong |
Example cURL:
curl -L -X GET 'http://localhost/v1/scoring/ping'GET /scoring/osint-results (retrieve OSINT scan result count)
Parameters:
- Header:
email(required, string)
Responses:
| HTTP Code | Content-Type | Response |
|---|---|---|
200 |
application/json |
{ "email": "user@example.com", "resultCount": int } |
Example cURL:
curl -L -X GET 'http://localhost/v1/scoring/osint-results' \
-H 'email: user@example.com'GET /scoring/formations (retrieve user quiz scores)
Parameters:
- Header:
email(required, string)
Responses:
| HTTP Code | Content-Type | Response |
|---|---|---|
200 |
application/json |
Array of quiz score objects |
Example cURL:
curl -L -X GET 'http://localhost/v1/scoring/formations' \
-H 'email: user@example.com'GET /scoring/gophish-actions (retrieve Gophish actions for the user)
Parameters:
- Header:
email(required, string)
Responses:
| HTTP Code | Content-Type | Response |
|---|---|---|
200 |
application/json |
Array of Gophish action events |
Example cURL:
curl -L -X GET 'http://localhost/v1/scoring/gophish-actions' \
-H 'email: user@example.com'GET /scoring/gophish-score (retrieve Gophish overall score)
Parameters:
- Header:
email(required, string)
Responses:
| HTTP Code | Content-Type | Response |
|---|---|---|
200 |
application/json |
{ "email": "user@example.com", "score": number } |
Example cURL:
curl -L -X GET 'http://localhost/v1/scoring/gophish-score' \
-H 'email: user@example.com'GET /scoring/osint-score (retrieve OSINT score)
Parameters:
- Header:
email(required, string)
Responses:
| HTTP Code | Content-Type | Response |
|---|---|---|
200 |
application/json |
{ "email": "user@example.com", "osintScore": number } |
Example cURL:
curl -L -X GET 'http://localhost/v1/scoring/osint-score' \
-H 'email: user@example.com'GET /scoring/formation-average (retrieve formation average score)
Parameters:
- Header:
email(required, string)
Responses:
| HTTP Code | Content-Type | Response |
|---|---|---|
200 |
application/json |
{ "email": "user@example.com", "formationAverage": number } |
Example cURL:
curl -L -X GET 'http://localhost/v1/scoring/formation-average' \
-H 'email: user@example.com'GET /scoring/total-score (retrieve total score for the user)
Parameters:
- Header:
email(required, string)
Responses:
| HTTP Code | Content-Type | Response |
|---|---|---|
200 |
application/json |
{ "email": "user@example.com", "totalScore": number } |
Example cURL:
curl -L -X GET 'http://localhost/v1/scoring/total-score' \
-H 'email: user@example.com'GET /scoring/gophish-actions-count (retrieve Gophish action counts)
Parameters:
- Header:
email(required, string)
Responses:
| HTTP Code | Content-Type | Response |
|---|---|---|
200 |
application/json |
{ "Submitted Data": "x/y", "Clicked Link": "x/y", "Email Opened": "x/y" } |
Example cURL:
curl -L -X GET 'http://localhost/v1/scoring/gophish-actions-count' \
-H 'email: user@example.com'All admin endpoints expect the request body to contain a JSON object with the key email.
POST /scoring/admin/total-score (retrieve total score for a specified email)
Parameters (Request Body):
| Name | Type | Data Type | Description |
|---|---|---|---|
| required | string | The target user's email |
Responses:
| HTTP Code | Content-Type | Response |
|---|---|---|
200 |
application/json |
{ "email": "user@example.com", "totalScore": number } |
Example cURL:
curl -L -X POST 'http://localhost/v1/scoring/admin/total-score' \
-H 'Content-Type: application/json' \
-d '{"email": "user@example.com"}'POST /scoring/admin/gophish-actions (retrieve Gophish actions for a specified email)
Parameters (Request Body):
| Name | Type | Data Type | Description |
|---|---|---|---|
| required | string | The target user's email |
Responses:
| HTTP Code | Content-Type | Response |
|---|---|---|
200 |
application/json |
Array of Gophish action events |
Example cURL:
curl -L -X POST 'http://localhost/v1/scoring/admin/gophish-actions' \
-H 'Content-Type: application/json' \
-d '{"email": "user@example.com"}'POST /scoring/admin/gophish-score (retrieve Gophish overall score for a specified email)
Parameters (Request Body):
| Name | Type | Data Type | Description |
|---|---|---|---|
| required | string | The target user's email |
Responses:
| HTTP Code | Content-Type | Response |
|---|---|---|
200 |
application/json |
{ "email": "user@example.com", "score": number } |
Example cURL:
curl -L -X POST 'http://localhost/v1/scoring/admin/gophish-score' \
-H 'Content-Type: application/json' \
-d '{"email": "user@example.com"}'POST /scoring/admin/osint-score (retrieve OSINT score for a specified email)
Parameters (Request Body):
| Name | Type | Data Type | Description |
|---|---|---|---|
| required | string | The target user's email |
Responses:
| HTTP Code | Content-Type | Response |
|---|---|---|
200 |
application/json |
{ "email": "user@example.com", "osintScore": number } |
Example cURL:
curl -L -X POST 'http://localhost/v1/scoring/admin/osint-score' \
-H 'Content-Type: application/json' \
-d '{"email": "user@example.com"}'POST /scoring/admin/gophish-actions-count (retrieve Gophish action counts for a specified email)
Parameters (Request Body):
| Name | Type | Data Type | Description |
|---|---|---|---|
| required | string | The target user's email |
Responses:
| HTTP Code | Content-Type | Response |
|---|---|---|
200 |
application/json |
{ "Submitted Data": "x/y", "Clicked Link": "x/y", "Email Opened": "x/y" } |
Example cURL:
curl -L -X POST 'http://localhost/v1/scoring/admin/gophish-actions-count' \
-H 'Content-Type: application/json' \
-d '{"email": "user@example.com"}'POST /scoring/admin/formation-average (retrieve formation average score for a specified email)
Parameters (Request Body):
| Name | Type | Data Type | Description |
|---|---|---|---|
| required | string | The target user's email |
Responses:
| HTTP Code | Content-Type | Response |
|---|---|---|
200 |
application/json |
{ "email": "user@example.com", "formationAverage": number } |
Example cURL:
curl -L -X POST 'http://localhost/v1/scoring/admin/formation-average' \
-H 'Content-Type: application/json' \
-d '{"email": "user@example.com"}'