Reviewed-by: Pruthi, Vineet <vineet.pruthi@t-systems.com> Co-authored-by: Lai, Weijian <laiweijian4@huawei.com> Co-committed-by: Lai, Weijian <laiweijian4@huawei.com>
12 KiB
Querying a Plug-in Template
Function
This interface is used to obtain details about a specified plug-in template.
Debugging
You can debug this API through automatic authentication in or use the SDK sample code generated by API Explorer.
URI
GET /v1/{project_id}/plugintemplates/{plugintemplate_name}
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
project_id |
Yes |
String |
Project ID. For details, see Obtaining a Project ID and Name. |
plugintemplate_name |
Yes |
String |
Name of a plug-in template. The options are as follows:
|
Request Parameters
None
Response Parameters
Status code: 200
Parameter |
Type |
Description |
|---|---|---|
apiVersion |
String |
API version. The options are as follows:
|
kind |
String |
Resource type. The options are as follows:
|
metadata |
PluginTemplateMetadata object |
Specifies the metadata information of the plug-in template. |
spec |
PluginTemplateSpec object |
Specifications of the plug-in template. |
Parameter |
Type |
Description |
|---|---|---|
type |
String |
Plug-in template type. The options are as follows:
|
description |
String |
Plug-in template description. |
versions |
Map<String,PluginTemplateVersion> |
Description of the plug-in template version. |
Status code: 404
Parameter |
Type |
Description |
|---|---|---|
error_code |
String |
Error code. |
error_msg |
String |
Error description. |
Example Requests
None
Example Responses
Status code: 200
OK.
{
"apiVersion" : "v1",
"kind" : "PluginTemplate",
"metadata" : {
"name" : "npu-driver"
},
"spec" : {
"type" : "npuDriver",
"description" : "npu driver"
},
"versions" : {
"78-21.0.2" : {
"detail" : "c78driver&firmware"
},
"77-21.0.cr1" : {
"detail" : "c77driver&firmware"
}
}
}
Status code: 404
Not Found.
{
"error_code" : "ModelArts.50005101",
"error_msg" : "Plugintemplate {name} not found."
}
Status Codes
Status Code |
Description |
|---|---|
200 |
OK. |
404 |
Not Found. |
Error Codes
See Error Codes.