Delete dependency. DELETE /api/openapi/v1/environment-packages/{id}, scope admin.v1.environment-packages.manage.
- Scope:
admin.v1.environment-packages.manage - Permission: Manage dependencies
- Action: manage
- Endpoint: DELETE
/api/openapi/v1/environment-packages/{id}
Authorization: Bearer \<API_KEY\>. The application must have subject_scope={"mode":"all"}; restricted scopes return 403. Scopes are independently granted. Do not cache responses.
Reuses the UI dependency service. First upload one file to uploads as multipart/form-data, then create or replace with JSON metadata and upload_id. Files must be nonempty and at most 1 GiB.
Receipts are bound to the organization and uploader, expire in one hour and can be consumed once. Replacement requires expected_revision and retains dependency/platform/arch and enabled.
The service calculates size and SHA-256; it does not inspect executable compatibility. Listing preserves UI filters and pagination. Writes and long-running uploads recheck current application authorization.
Common request headers
Apply the “Authentication and headers” section in “Configure the QwenWork console through APIs”: Authorization is required and X-Request-Id is optional. See this page for the required scope.
Whether Idempotency-Key applies and is required is specified in this page’s request parameters; a tracing identifier does not replace an idempotency key.
Request parameters
| Name | Location | Type | Required | Description | Example |
|---|---|---|---|---|---|
id | path | string | Yes | id | - |
expected_revision | query | integer · int64 | Yes | Revision from the latest read; format="int64", minimum=1 | - |
Response statuses
| HTTP status | Trigger | Response structure | Client action |
|---|---|---|---|
204 | Request succeeded | No response body | Read the response. |
default | Other authentication, authorization, validation or dependency errors | See “General error” in “Configure the QwenWork console through APIs” | Handle the status and code; verify the result and idempotency requirements before retrying writes. |