Querying a Plug-in Template
Function
This API is used to obtain details about a specified plug-in template. This API is used when you need to query the configuration, functions, or usage of a specific plug-in template. Before using this API, ensure that the plug-in template exists and you have the required permission. After the query, the details of the specified plug-in template are returned, including the configuration parameters and function description of the template, helping you develop and manage plug-ins. If the plug-in template does not exist or you do not have the access permission, the API will return an error message.
Debugging
You can debug this API through automatic authentication in API Explorer 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 |
Definition: User project ID. For details, see Obtaining a Project ID and Name. Constraints: The value can contain 1 to 64 characters. Letters, digits, and hyphens (-) are allowed. Range: N/A Default Value: N/A |
|
plugintemplate_name |
Yes |
String |
Definition: Plug-in template name. Constraints: N/A Range
Default Value: N/A |
Request Parameters
None
Response Parameters
Status code: 200
|
Parameter |
Type |
Description |
|---|---|---|
|
apiVersion |
String |
Definition: API version. Range:
|
|
kind |
String |
Definition: Resource type. Range:
|
|
metadata |
PluginTemplateMetadata object |
Definition: Metadata of the plugin template. |
|
spec |
PluginTemplateSpec object |
Definition: Specifications of the plugin template. |
|
Parameter |
Type |
Description |
|---|---|---|
|
name |
String |
Definition: Name of the plugin template. Range: N/A |
|
annotations |
Map<String,String> |
Plugin template annotations in the format of key-value pairs. |
|
Parameter |
Type |
Description |
|---|---|---|
|
type |
String |
Plugin template type. Options:
|
|
description |
String |
Definition: Description of the plugin template. Range: N/A |
|
versions |
Map<String,PluginTemplateVersionV2> |
Definition: Description of the plugin template version. |
|
Parameter |
Type |
Description |
|---|---|---|
|
version |
String |
Version number of the plugin template. |
|
creationtimestamp |
String |
Creation time. |
|
inputs |
Object |
Plugin installation parameters. |
|
translate |
Object |
Translation information used by the GUI. |
|
description |
String |
Version description. |
|
detail |
String |
Version description. |
Status code: 404
|
Parameter |
Type |
Description |
|---|---|---|
|
error_code |
String |
Range: N/A |
|
error_msg |
String |
Definition: Error message. Range: N/A |
Example Requests
GET https://{endpoint}/v1/{project_id}/plugintemplates/{plugintemplate_name}
Example Responses
Status code: 200
OK.
{
"apiVersion" : "v1",
"kind" : "PluginTemplate",
"metadata" : {
"name" : "npu-driver"
},
"spec" : {
"type" : "npuDriver",
"description" : "npu driver",
"versions" : { }
}
}
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.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot