# 创建静态资源上传会话 (/docs/api/native/application/createAssetUploadSession)



`POST /application/v1/workers/{worker_id}/assets-upload-session`

Declare the static file manifest. The answer lists the hashes still missing, grouped into upload batches, and an upload token.

**支持状态: supported**

## 参数 [#参数]

| 名称         | 位置   | 类型     | 必填   | 说明                  |
| ---------- | ---- | ------ | ---- | ------------------- |
| worker\_id | path | string | true | Worker ID (wkr\_…). |

## 请求体 (application/json) [#请求体-applicationjson]

必填: true

| 名称       | 类型     | 说明                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
| -------- | ------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| manifest | object | Map of static file path to content hash and byte size. Paths start with /; the same hash must declare the same size. The root paths /\_headers and /\_redirects are response-header and redirect rule files and are not served as assets; same-named files in subdirectories are ordinary assets. \_headers allows at most 100 rules and 2000 characters per line (whitespace included); \_redirects allows at most 2000 static and 100 dynamic rules and 1000 characters per rule (whitespace included), and rules after the first dynamic rule count toward the dynamic quota. Exceeding a limit makes CreateVersion return INVALID\_PARAMS, with violations.field pointing at the manifest entry. |

```json
{
  "type": "object",
  "required": [
    "manifest"
  ],
  "properties": {
    "manifest": {
      "$ref": "#/components/schemas/application-AssetManifest"
    }
  }
}
```

## 响应 [#响应]

### HTTP 200 [#http-200]

Success

**application/json**

| 名称 | 类型 | 说明 |
| --- | --- | --- |
| jwt | string | Upload token, valid for one hour. |
| buckets | array&lt;array&lt;string&gt;&gt; | Hashes still missing, grouped into upload batches. |
