Skip to main content

Attribution Engine v2 (2.4.8)

Download OpenAPI specification:Download

License: AGPLv3

REST API to interact with Function Similarity Models

Health Check

Ping

External Ping to check health of attribution-api service

Responses

Response samples

Content type
application/json
{
  • "check": true
}

Sample

Submit Sample

External Submit Sample for prediction

Request Body schema: multipart/form-data
sample
required
file <binary> (Sample)

Responses

Response samples

Content type
application/json
{
  • "sample_id": "b8af48fc5dc8371d6b00b16029e9ab9027e2da86fa6d8dbda181df464226a3a8"
}

Prediction

Get Status

External Get prediction status of sample

path Parameters
sha256_hash
required
string (Hash) = 64 characters
Example: b8af48fc5dc8371d6b00b16029e9ab9027e2da86fa6d8dbda181df464226a3a8

Responses

Response samples

Content type
application/json
{
  • "status": {
    },
  • "detailed_status": {
    }
}

Get Results

External Get prediction results of sample

path Parameters
model_name
required
string (Name)
Value: "FESTIVE Func Sim"
sha256_hash
required
string (Hash) = 64 characters
Example: b8af48fc5dc8371d6b00b16029e9ab9027e2da86fa6d8dbda181df464226a3a8

Responses

Response samples

Content type
application/json
{
  • "model": "FESTIVE Func Sim",
  • "error_details": null,
  • "sha256_hash": "b8af48fc5dc8371d6b00b16029e9ab9027e2da86fa6d8dbda181df464226a3a8",
  • "predicted_at": "2025-05-15T14:30:45.123456",
  • "celery_task_id": "550e8400-e29b-41d4-a716-446655440000",
  • "prediction_results": null,
  • "explanation_results": null
}

Revoke

Revoke Prediction Task

External Revoke prediction task that's currently running

path Parameters
model_name
required
string (Name)
Value: "FESTIVE Func Sim"
sha256_hash
required
string (Hash) = 64 characters
Example: b8af48fc5dc8371d6b00b16029e9ab9027e2da86fa6d8dbda181df464226a3a8

Responses

Response samples

Content type
application/json
{
  • "detail": "Prediction Task [celery_task_id] revoked"
}

Revoke Task

Internal Interfaces directly with AMQP to revoke task

path Parameters
sha256_hash
required
string (Hash) = 64 characters
Example: b8af48fc5dc8371d6b00b16029e9ab9027e2da86fa6d8dbda181df464226a3a8

Responses

Response samples

Content type
application/json
{
  • "sample_id": "b8af48fc5dc8371d6b00b16029e9ab9027e2da86fa6d8dbda181df464226a3a8"
}

Queue

Queue Status Retrieval

Internal Interfaces directly with AMQP to get status

path Parameters
sha256_hash
required
string (Hash) = 64 characters
Example: b8af48fc5dc8371d6b00b16029e9ab9027e2da86fa6d8dbda181df464226a3a8

Responses

Response samples

Content type
application/json
{
  • "id": "550e8400-e29b-41d4-a716-446655440000"
}

Queue FESTIVE Task

Internal Queue prediction task to FESTIVE

path Parameters
sha256_hash
required
string (Hash) = 64 characters
Example: b8af48fc5dc8371d6b00b16029e9ab9027e2da86fa6d8dbda181df464226a3a8

Responses

Response samples

Content type
application/json
{
  • "sample_id": "b8af48fc5dc8371d6b00b16029e9ab9027e2da86fa6d8dbda181df464226a3a8"
}

CRUD

Create Prediction

Internal Create prediction row in db

path Parameters
sha256_hash
required
string (Hash) = 64 characters
Example: b8af48fc5dc8371d6b00b16029e9ab9027e2da86fa6d8dbda181df464226a3a8
model_name
required
string (Name)
Value: "FESTIVE Func Sim"

Responses

Response samples

Content type
application/json
null

Read Predictions

Internal Read all model predictions of one hash

path Parameters
sha256_hash
required
string (Hash) = 64 characters
Example: b8af48fc5dc8371d6b00b16029e9ab9027e2da86fa6d8dbda181df464226a3a8

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Read Prediction Info

Internal Read all model predictions of one hash but without results

path Parameters
sha256_hash
required
string (Hash) = 64 characters
Example: b8af48fc5dc8371d6b00b16029e9ab9027e2da86fa6d8dbda181df464226a3a8

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Read Prediction

Internal Read one model prediction of one hash

path Parameters
model_name
required
string (Name)
Value: "FESTIVE Func Sim"
sha256_hash
required
string (Hash) = 64 characters
Example: b8af48fc5dc8371d6b00b16029e9ab9027e2da86fa6d8dbda181df464226a3a8

Responses

Response samples

Content type
application/json
{
  • "model": "FESTIVE Func Sim",
  • "error_details": null,
  • "sha256_hash": "b8af48fc5dc8371d6b00b16029e9ab9027e2da86fa6d8dbda181df464226a3a8",
  • "predicted_at": "2025-05-15T14:30:45.123456",
  • "celery_task_id": "550e8400-e29b-41d4-a716-446655440000",
  • "prediction_results": null,
  • "explanation_results": null
}

Update Celery Task ID

Internal Update Prediction row with celery task id

path Parameters
sha256_hash
required
string (Hash) = 64 characters
Example: b8af48fc5dc8371d6b00b16029e9ab9027e2da86fa6d8dbda181df464226a3a8
model
required
string (Name)
Value: "FESTIVE Func Sim"
celery_task_id
required
string <uuid> (Task ID)
Example: 550e8400-e29b-41d4-a716-446655440000

Responses

Response samples

Content type
application/json
null

Update Predictions

Internal Update empty prediction row with results

path Parameters
sha256_hash
required
string (Hash) = 64 characters
Example: b8af48fc5dc8371d6b00b16029e9ab9027e2da86fa6d8dbda181df464226a3a8
model
required
string (Name)
Value: "FESTIVE Func Sim"
query Parameters
error_details
string (Error)
Request Body schema: application/json
prediction_results
dict <dict[str, str | dict[str, dict[str, str]]]> (Prediction)

Responses

Request samples

Content type
application/json
{
  • "prediction_results": null
}

Response samples

Content type
application/json
null

Update Explanations

Internal Update empty prediction row with explanation

path Parameters
sha256_hash
required
string (Hash) = 64 characters
Example: b8af48fc5dc8371d6b00b16029e9ab9027e2da86fa6d8dbda181df464226a3a8
model
required
string (Name)
Value: "FESTIVE Func Sim"
query Parameters
error_details
string (Error)
Request Body schema: application/json
explanation_results
string <str> (Explanation)

Responses

Request samples

Content type
application/json
{
  • "explanation_results": "string"
}

Response samples

Content type
application/json
null

Delete prediction

Internal Delete prediction row

path Parameters
sha256_hash
required
string (Hash) = 64 characters
Example: b8af48fc5dc8371d6b00b16029e9ab9027e2da86fa6d8dbda181df464226a3a8
model
required
string (Name)
Value: "FESTIVE Func Sim"

Responses

Response samples

Content type
application/json
null

Meta

Get Versions

External Get all container image versions

Responses

Response samples

Content type
application/json
{
  • "description": "string",
  • "attribution-api": "string",
  • "crystal-ball": "string",
  • "prediction-store": "string",
  • "model_name_1": {
    },
  • "model_name_2": {
    }
}

Get Version of Crystal Ball

Internal Get container image version of crystal-ball

Responses

Response samples

Content type
application/json
{
  • "crystal-ball": "string"
}

Get Version of Prediction Store

Internal Get container image version of prediction-store

Responses

Response samples

Content type
application/json
{
  • "prediction-store": "string"
}