Project View Data


To avoid the need for parsing Project View Menu Items to perform changes to what Entity Types and Tilesets are loadeded. We have a dedicated endpoint for performing bulk changes.

This endpoint will match a given Entity Type ID or Tileset ID and update all related Menu Items to a new ID. Alternatively, you can delete all related Menu Items for a given Entity Type or Tileset.

Requests

Below are the endpoints to reference.

Update a single Project View

Request body
interface ITypeChangeRequest {
    // Entity Type ID we're updating.
    "EntityType.ID": string;

    // The new Entity Type ID to swap related Menu Items to.
    "New.EntityType.ID"?: string;
    // If true, the related Menu Items will have their captions updated to the new type's name.
    "UpdateCaptions"?: boolean;

    // If true, the related Menu Items will be deleted instead of updated.
    // The newTypeID and captions don't need to be provided if this is true.
    "Delete"?: boolean;
}

interface ITilesetChangeRequest {
    // Tileset ID we're updating.
    "Tileset.ID": string;

    // The new Tileset ID to swap related Menu Items to.
    "New.Tileset.ID"?: string;
    // If true, the related Menu Items will have their captions updated to the new tileset's name.
    "UpdateCaptions"?: boolean;

    // If true, the "New.Tileset.ID" doesn't need to be provided.
    // Instead, we look for the latest Tileset with a matching name and use it if it's newer than the current one.
    "Predictive"?: boolean;

    // If true, the related Menu Items will be deleted instead of updated.
    // The newTilesetID and captions don't need to be provided if this is true.
    "Delete"?: boolean;
}

interface IBody {
    // List of changes.
    "Items": (ITypeChangeRequest |  ITilesetChangeRequest)[];
}
Response
// Response is the same for one view and multiple views being updated.
// So for one view, you mainly change for 0/1 counter to see if anything was updated.
interface IResponse {
    // Specific view IDs that were updated.
    "Updated.UIView.ID": string[];
    // Simple counter of View IDs that were updated.
    "Updated.Count": number;
}
Javascript example

Update multiple or all Project Views

Request body
interface IBody {
    // List of changes (same as singular view request).
    "Items": (ITypeChangeRequest |  ITilesetChangeRequest)[];
    // Array of view IDs to apply the changes to.
    // Send ["*"] to update all Project Views.
    "View.ID": string[];
}
Response
// Same as singular view update.