# Landings ## Landing API: `/api/bw/v2/landing` API BW version 2 (Beta) Allows you to add, update or delete Landings in a Boldest platform account. Among many other things, it can also be used to categorize Landings. ## Methods ### POST: Create/Update Landing - POST `json` Data to import in JSON format according to Schema /api/bw/v2/landing/schema.json Consult the [**`Schema documentation`**](#landing-schema-documentation) for the structure of the JSON data. **RESULT**: `HTTP 200` Skipped. The Landing exists and does not need to be updated ```json { "done": "Skip Landing TEST111", "id": "TEST111", "new": false, "update": false } ``` `HTTP 201` Created. The Landing did not exist, so it was created ```json { "done": "Create Landing TEST111", "id": "TEST111", "new": true, "update": true } ``` `HTTP 202` Accepted. The Landing existed, so it was updated ```json { "done": "Update Landing TEST111", "id": "TEST111", "new": false, "update": true } ``` `HTTP 400` Wrong request ```json { "fail": "Wrong request" } ``` `HTTP 401` Unauthorized ```json { "fail": "Unauthorized" } ``` `HTTP 409` Conflict. The submitted contents are not valid ```json { "fail": "Explanation of the problems encountered" } ``` ### GET: Get Landing/s - `/{ids}` Id or Ids CSV format (Optional) - `/published/{1|0|*}` Published (Optional) (Default:1) - `/fields/{fields}` Only these fields (Optional) (Default:All) - `/ignoreFields/{fields}` Ignore these fields (Optional) (Default:None) - `/excludeFiles` Ignore file fields (Optional) (Default:No) **RESULT**: `HTTP 200` Success Landing data in JSON format according to Schema (schema.json or schema.multiple.json) `HTTP 400` Wrong request ```json { "fail": "Wrong request" } ``` `HTTP 401` Unauthorized ```json { "fail": "Unauthorized" } ``` `HTTP 404` Not found ```json { "fail": "ERROR: Export fail" } ``` ``` ### DELETE: Delete Landing/s - `/{ids}` Id or Ids CSV format **RESULT**: `HTTP 202` Deleted ```json { "done": "Deletion of 5 Landings done", "count": 5 // Number of Landings deleted } ``` Partial deletion ```json { "done": "Deletion of 3 Landings done", "count": 3, // Number of Landings deleted "fail": "Deletion of 2 Landings not done", "failed": ["TEST114", "TEST115"] } ``` `HTTP 400` Wrong request ```json { "fail": "Wrong request" } ``` `HTTP 401` Unauthorized ```json { "fail": "Unauthorized" } ``` `HTTP 404` Not found ```json { "fail": "No Landings to delete" } ``` `HTTP 409` Conflict. The submitted contents are not valid ```json { "fail": "Deletion of 5 Landings not done" } ``` ### POST/GET: Clone a Landing. Optionally can be added to a Map - `/clone` Command - `/{id}` Id (Optional) (Default: Landing "Base" is cloned) **RESULT**: `HTTP 201` Cloned ```json { "done": "Cloned Landing TEST111 to Landing TEST111_8PtTXiU6mcw", "id": "TEST111_8PtTXiU6mcw" } ``` `HTTP 400` Wrong request ```json { "fail": "Wrong request" } ``` `HTTP 401` Unauthorized ```json { "fail": "Unauthorized" } ``` `HTTP 404` Error ```json { "fail": "There is no Landing TEST111 to clone" } ``` `HTTP 409` Fail ```json { "fail": "Not cloned Landing TEST111" } ``` ### GET: Get Schema JSON from the data structure of a Landing - `/full` Schema and data (Optinal) - `/schema.json` JSON schema for import **RESULT**: `HTTP 200` Success JSON schema document ### GET: Get Schema JSON schema of a group of Landings in a batch process - `/full` Schema and data (Optinal) - `/schema.multiple.json` Schema for batch import JSON **RESULT**: `HTTP 200` Success JSON schema document (landing-schema-documentation)= ```{include} landing.schema.json.md.merge :parser: myst_parser.sphinx_