Editing an Endpoint
Description
This API is used to edit the throttling settings, ModelArts Guard switch, endpoint name, and endpoint description of a specified endpoint.
Constraints
- This function is only supported in CN-Hong Kong.
- After an endpoint is created, the model service cannot be modified.
URI
PUT /v1/{project_id}/maas/services/custom-endpoint/endpoint/{custom_endpoint_id}
Parameter | Mandatory | Type | Description |
|---|---|---|---|
project-id | Yes | String | Definition: Project ID. For details, see Obtaining a Project ID and Name. Constraints: N/A. Range: N/A. Default Value: N/A. |
custom_endpoint_id | Yes | String | Definition: Endpoint ID. The endpoint ID is returned when an endpoint is created or obtained using the query API. For details, see Creating an Endpoint or Querying Custom Endpoints. Constraints: N/A. Range: N/A. Default Value: N/A. |
Request Parameters
Parameter | Mandatory | Type | Description |
|---|---|---|---|
X-Auth-Token | Yes | String | Definition: User token. The token can be obtained by calling the IAM API used to obtain a user token. The value of X-Subject-Token in the response header is the user token. For details, see Authentication. Constraints: N/A. Range: N/A. Default Value: N/A. |
Content-Type | Yes | String | Definition: Type of the message body. The value is fixed to application/json. Constraints: N/A. Range: N/A. Default Value: N/A. |
Parameter | Mandatory | Type | Description |
|---|---|---|---|
endpoint_name | No | String | Definition: Endpoint name. Constraints: The name of a user must be unique. Range: Enter 1 to 64 characters. The name must start with a letter, and can only contain letters, digits, hyphens (-), underscores (_), and dots (.). Default Value: N/A. |
remark | No | String | Definition: Description of an endpoint. Constraints: N/A. Range: A string of up to 256 characters. Default Value: N/A. |
rpm | No | Integer | Definition: Endpoint RPM throttling value. Constraints: N/A. Range: Each model has its own allowable range. You can view the corresponding range in ModelArts Studio (MaaS) console > Real-Time Inference > Built-in Services, under the Model flow limiting column for each model. Default Value: N/A. |
tpm | No | Integer | Definition: Endpoint TPM throttling value. Constraints: N/A. Range: Each model has its own allowable range. You can view the corresponding range in ModelArts Studio (MaaS) console > Real-Time Inference > Built-in Services, under the Model flow limiting column for each model. Default Value: N/A. |
moderation | No | Boolean | Definition: Specifies whether to enable content guard. Configure content guard if you have a V2 or higher account level. NOTE: To view your account level, log in to the ModelArts Studio (MaaS) console, click the username in the upper right corner, click Basic Information, and view the level next to the account name. Constraints: This parameter is optional. The default value is true. Range:
Default Value: true. |
agreement_id | No | String | Definition: An agreement needs to be signed to enable or disable content guard. The protocol ID is transferred here. For details about how to obtain the value, see agreement_id in Obtaining the Latest Content Guard Disclaimer. Constraints: This parameter is mandatory when moderation is set to false. Range: N/A. Default Value: N/A. |
Response Parameters
Parameter | Type | Description |
|---|---|---|
1 | String | Definition: Operation result flag. The value is fixed at 1. Range: N/A. |
Parameter | Type | Description |
|---|---|---|
error_msg | String | Definition: Error description. Range: N/A. |
error_code | String | Definition: Error code, indicating the error type. Range: N/A. |
Request Example
The following uses the name, description, content guard, RPM, and TPM parameters of an endpoint as an example.
/v1/{project_id}/maas/services/custom-endpoint/endpoint/{custom_endpoint_id}
{
"endpoint_name": "DeepSeek-Test",
"remark": "DeepSeek endpoint test",
"moderation": false,
"agreement_id": "af247c14-2bee-4d78-a5e8-a419ea62b6c6",
"rpm":0,
"tpm":0
} Response Example
- Success response. Status code: 200.
1
- Failure response. Status code: 400.
{ "error_msg": "Invalid token.", "error_code": "ModelArts.0104" }
Status Codes
For details, see Status Codes.
Error Codes
For details, 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
