Skip to content

Commit 700f3da

Browse files
committed
feat: add delete model instance endpoint
1 parent 650930a commit 700f3da

File tree

3 files changed

+54
-0
lines changed

3 files changed

+54
-0
lines changed

specs/predict/paths/models/models.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,9 @@ post:
5252
updatedAt:
5353
type: string
5454
description: The time the model was updated.
55+
required:
56+
- modelID
57+
- updatedAt
5558

5659
'401':
5760
$ref: '../../responses/InvalidCredentials.yml'

specs/predict/paths/models/specificModels.yml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,45 @@ post:
5353
updatedAt:
5454
type: string
5555
description: The time the model was updated.
56+
required:
57+
- modelID
58+
- updatedAt
59+
'401':
60+
$ref: '../../responses/InvalidCredentials.yml'
61+
'404':
62+
$ref: '../../responses/ModelNotFound.yml'
63+
'422':
64+
$ref: '../../../common/responses/UnprocessableEntity.yml'
65+
'500':
66+
$ref: '../../../common/responses/InternalError.yml'
67+
68+
delete:
69+
tags:
70+
- models
71+
operationId: deleteModelInstance
72+
summary: Delete a model instance.
73+
description: Delete the model’s configuration, pipelines and generated predictions.
74+
parameters:
75+
- $ref: '../../common/parameters.yml#/modelID'
76+
responses:
77+
'200':
78+
description: OK
79+
content:
80+
application/json:
81+
schema:
82+
title: deleteModelInstanceResponse
83+
type: object
84+
additionalProperties: false
85+
properties:
86+
modelID:
87+
type: string
88+
description: The ID of the model.
89+
deletedUntil:
90+
type: string
91+
description: The date until which you can safely consider the data as being deleted.
92+
required:
93+
- modelID
94+
- deletedUntil
5695
'401':
5796
$ref: '../../responses/InvalidCredentials.yml'
5897
'404':
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
[
2+
{
3+
"testName": "delete a model instance",
4+
"parameters": {
5+
"modelID": "model1"
6+
},
7+
"request": {
8+
"path": "/1/predict/models/model1",
9+
"method": "DELETE"
10+
}
11+
}
12+
]

0 commit comments

Comments
 (0)