Update a Layer

The /v1/layer/{id} route is a robust interface for interacting with individual layers within a Metafuse project, offering functionalities to fetch, update, or delete a specific layer. Here’s a detailed breakdown of the available operations on this route:

  • GET Method:
    Retrieves the details of a specified layer.

    • id (required, path): Identifies the layer to fetch.
    • lastEvaluatedKey (optional, query): Fetches paginated data if returned from a previous query.
      A successful query returns a 200 status code along with the layer's details, while a 400 status code denotes client-side errors like missing required parameters or incorrect query format.
  • PUT Method:
    Updates the specified layer’s details with the provided JSON payload adhering to the schema (MetafuApiDepAONIR6hxU6Q).

    • id (required, path): Identifies the layer to update.
    • regenerate (optional, path): Regenerate items that utilized the updated layer.
      A successful update returns a 200 status code, indicating the successful modification of the layer. A 400 status code is returned for client-side errors like missing required parameters or incorrect data format.
  • DELETE Method:
    Deletes the specified layer from the Metafuse platform.

    • id (required, path): Identifies the layer to delete.
    • regenerate (optional, path): Regenerate items that utilized the deleted layer to no longer include it.
      A successful deletion returns a 200 status code, indicating the successful removal of the layer. A 400 status code is returned for client-side errors like missing required parameters.
Path Params
string
required

The ID of the layer to update.

Query Params
string

If true, all items that utilize the target layer will regenerate to include the changes to the target layer.

Body Params
string

The name of the specific trait. This must be unique within a trait category.

string

A base64 encoded string representing the image of the layer.

number
≥ 0

This is the rarity score for the trait. It represents how rare or common a trait is during the generation process (eg 10 is 10%).

string

The category this trait belongs to. This must be unique within a collection.

number
≥ 0

The generation order of the layer. This represents the sequence in which the layer was overlaid on the others.

Responses
200

200 response

400

400 response

Language
Credentials
Header
Response
Click Try It! to start a request and see the response here!