User Manual

Apps - Download app

ルートURL

POST https://playcanvas.com/api/apps/download

説明

This will allow you to download an app which you can self host on your own server. The request will start an export job and the job details will be returned in the response. You can poll the job by id until its status is either 'complete' or 'error'. When the job is done, its data will contain a URL to download the exported app.

curl -H "Authorization: Bearer fdslkjlk32j2l3kj2lkj2lkj323rr" -H "Content-Type: application/json" -X POST -d '{"project_id": 9999999, "scenes": [9999999], "name": "My App"}' https://playcanvas.com/api/apps/download

パラメータ

project_id

The id of the project.

name

The name of the app. Must be less than 1000 characters

scenes

A list of scene ids to be included in the app. When you specify scenes then the first scene in the list will be used as the initial scene of the application.

branch_id [optional]

The id of the branch. If no id is specified the master branch will be used.

description [optional]

The description of the app. Must be less than 10,000 characters.

version [optional]

The version of the app. Can be a string up to 20 characters.

release_notes [optional]

Release notes for the app. Can be a string up to 10,000 characters.

scripts_concatenate [optional]

Boolean. Set it to true if you want scripts to be concatenated.

scripts_minify [optional]

Boolean. Set it to true if you want scripts to be minified. Defaults to true.

optimize_scene_format [optional]

Boolean. Set it to true if you want scenes to be in an optimized format (see Optimize Scene Format for more information)

engine_version [optional]

String. Set it to a Engine version string (full list of releases) if a specific version is needed for the app.

応答のスキーマ

Status: 201 Created
{
    "status": "running" | "complete" | "error",
    "messages": list of strings,
    "created_at": date,
    "modified_at": date,
    "data": {
        "concatenate": boolean,
        "branch_id": string,
        "optimize_scene_format": boolean,
        "minify": boolean,
        "name": string,
        "sourcemaps": boolean,
        "scenes": list of int scene ids,
        "engineVersion": string,
        "preload_bundle": boolean,
        "project_id": int,
        "owner_id": int
    },
    "id": int
}

エラー

401

非認証

403

許可されていません

404

プロジェクトが見つかりません

404

所有者が見つかりません

404

シーンが見つかりません

429

リクエストが多すぎます

レート制限

このルートはstrictなレート制限を使用します。

This site is translated by the community. If you want to get involved visit this page