Updated on 2024-06-13 GMT+08:00

Querying a Plug-in Template

Function

This API is used to obtain details of a specified plug-in template.

URI

GET /v1/{project_id}/plugintemplates/{plugintemplate_name}

Table 1 Path Parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

Project ID. For details, see Obtaining a Project ID and Name.

plugintemplate_name

Yes

String

Plug-in template name. Options:

  • gpu-driver: GPU driver plug-in template

  • npu-driver: NPU driver plug-in template

Request Parameters

None

Response Parameters

Status code: 200

Table 2 Response body parameters

Parameter

Type

Description

apiVersion

String

API version. Options:

  • v1

kind

String

Resource type. Options:

  • PluginTemplate: plug-in template

metadata

PluginTemplateMetadata object

Plug-in template metadata

spec

PluginTemplateSpec object

Plug-in template specifications

Table 3 PluginTemplateMetadata

Parameter

Type

Description

name

String

Plug-in template name

Table 4 PluginTemplateSpec

Parameter

Type

Description

type

String

Plug-in template type. Options:

  • npuDriver: NPU driver

  • gpuDriver: GPU driver

  • ccePlugin: CCE plug-in

  • helm: Helm template

  • icAgent: ICAgent

description

String

Plug-in template description

versions

Map<String,PluginTemplateVersion>

Plug-in template versions

Table 5 PluginTemplateVersion

Parameter

Type

Description

detail

String

Version description

Status code: 404

Table 6 Response body parameters

Parameter

Type

Description

error_code

String

Error code

Minimum: 8

Maximum: 36

error_msg

String

Error message

Minimum: 2

Maximum: 512

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.