This project has retired. For details please refer to its Attic page.
Register Model REST API | Apache Submarine
Skip to main content
Version: 0.7.0

Register Model REST API

caution

The Registered Model API is in the alpha stage which is subjected to incompatible changes in future releases.

Create a registered model

POST /api/v1/registered-model

Parameters

Field NameTypeDescriptionRequired
nameStringRegistered model name.o
descriptionStringRegistered model description.x
tagsList<String>Registered model tags.x

Example

Example Request
curl -X POST -H "Content-Type: application/json" -d '
{
"name": "example_name",
"description": "example_description",
"tags": ["123", "456"]
}
' http://127.0.0.1:32080/api/v1/registered-model
Example Response
{
"status":"OK",
"code":200,
"success":true,
"message":"Create a registered model instance",
"result":null,
"attributes":{}
}

List registered models

GET /api/v1/registered-model

Example

Example Request
curl -X GET http://127.0.0.1:32080/api/v1/registered-model
Example Response
{
"attributes" : {},
"code" : 200,
"message" : "List all registered model instances",
"result" : [
{
"creationTime" : "2021-12-16 10:14:06",
"description" : "example_description",
"lastUpdatedTime" : "2021-12-16 10:14:06",
"name" : "example_name",
"tags" : [
"123",
"456"
]
},
{
"creationTime" : "2021-12-16 10:16:25",
"description" : "example_description",
"lastUpdatedTime" : "2021-12-16 10:16:25",
"name" : "example_name1",
"tags" : [
"123",
"456"
]
},
{
"creationTime" : "2021-12-12 02:27:05",
"description" : null,
"lastUpdatedTime" : "2021-12-14 12:49:33",
"name" : "register",
"tags" : []
}
],
"status" : "OK",
"success" : true
}

Get a registered model

GET /api/v1/registered-model/{name}

Parameters

Field NameTypeInDescriptionRequired
nameStringpathregistered model name.o

Example

Example Request
curl -X GET http://127.0.0.1:32080/api/v1/registered-model/example_name
Example Response
{
"attributes" : {},
"code" : 200,
"message" : "Get the registered model instance",
"result" : {
"creationTime" : "2021-12-16 10:14:06",
"description" : "example_description",
"lastUpdatedTime" : "2021-12-16 10:14:06",
"name" : "example_name",
"tags" : [
"123",
"456"
]
},
"status" : "OK",
"success" : true
}

Patch a registered model

PATCH /api/v1/registered-model/{name}

Parameters

Field NameTypeInDescriptionRequired
nameStringpathregistered model name.o
nameStringbodyNew model name.x
descriptionStringpathNew model description.x

Example

Example Request
curl -X PATCH -H "Content-Type: application/json" -d '
{
"name": "new_name",
"description": "new_description"
}' http://127.0.0.1:32080/api/v1/registered-model/example_name
Example Response
{
"attributes" : {},
"code" : 200,
"message" : "Update the registered model instance",
"result" : null,
"status" : "OK",
"success" : true
}

Delete a registered model

DELETE /api/v1/registered-model/{name}

Parameters

Field NameTypeInDescriptionRequired
nameStringpathregistered model name.o

Example

Example Request
curl -X DELETE http://127.0.0.1:32080/api/v1/registered-model/example_name
Example Response
{
"attributes" : {},
"code" : 200,
"message" : "Delete the registered model instance",
"result" : null,
"status" : "OK",
"success" : true
}

Create a registered model tag

POST /api/v1/registered-model/tag?name={name}&tag={tag}

Parameters

Field NameTypeInDescriptionRequired
nameStringqueryregistered model name.o
tagStringqueryAdd a tag for the registered model.o

Example

Example Request
curl -X POST http://127.0.0.1:32080/api/v1/registered-model/tag?name=example_name&tag=example_tag
Example Response
{
"status":"OK",
"code":200,
"success":true,
"message":"Create a registered model tag instance",
"result":null,
"attributes":{}
}

Delete a registered model tag

DELETE /api/v1/registered-model/tag?name={name}&tag={tag}

Parameters

Field NameTypeInDescriptionRequired
nameStringqueryregistered model name.o
tagStringqueryDelete a tag in the registered model.o

Example

Example Request
curl -X DELETE http://127.0.0.1:32080/api/v1/registered-model/tag?name=example_name&tag=example_tag
Example Response
{
"attributes" : {},
"code" : 200,
"message" : "Delete a registered model tag instance",
"result" : null,
"status" : "OK",
"success" : true
}