Workspace Objects Life Cycle

Every object in a workspace follows a life cycle, starting with creation and ending with deletion. In between, the object can be modified multiple times and even deleted and recreated. Objects interact with others in specific ways, and deleting an object can affect the user experience and platform functionality.

graph LR
    create --> modify
    create --> delete
    modify --> delete
    delete --> recreate
    recreate --> modify

Creating or Modifying an Object

All workspace objects can be created or modified at once using the Workspace Declarative Interface. Components of the analytics model can also be managed individually via the Metadata Entity Interface.

Deleting an Object

There are two main ways to delete objects:

  1. Indirectly: This applies to any workspace object. You can remove an object by not including it in the payload sent via the Workspace Declarative Interface.
  2. Directly: This applies only to components of the analytics model and can be done via the Metadata Entity Interface.

Indirect Delete Process

When using the declarative interface, all objects and their relationships must be valid (i.e., they must reference existing objects). Otherwise, the server won’t accept the changes. You can update the logical and analytics models separately. Replacing the analytics model typically won’t cause issues, but replacing the logical model could break relationships with analytics objects, rendering them unusable. For more details, see the Workspace Declarative Interface.

Direct Delete Process

You can directly delete objects from the analytics model. When an object is deleted, all its relationships are removed, so other objects will no longer reference it. However, objects that used to reference the deleted object will still contain that relationship in their definition. You can retrieve such objects from the server, but you won’t be able to save them back until you remove or replace the invalid references.

Impact of Deleted Objects

When an object is deleted and leaves behind invalid references, you may encounter these issues:

  • The Workspace Declarative Interface output will include objects with invalid references. You can download the workspace model, but you won’t be able to upload it back until all invalid references are fixed.
  • Objects with invalid references won’t appear in GoodData.UI but can still be accessed via the Metadata Entity Interface.

Recreating an Object

You can delete an object while keeping other analytics objects that referenced it unchanged. If you recreate the object with the same ID, the analytics objects will work again, but their relationships won’t be restored. To fully restore these relationships, you must upload the entire analytics model via the Workspace Declarative Interface.

Object Authors and Editors

Analytical objects like dashboards, visualizations, and metrics store metadata about their creation and most recent edits:

  • createdBy: Who created the object.
  • createdAt: When the object was created.
  • modifiedBy: Who last modified the object.
  • modifiedAt: When the object was last modified.

When a new object is created, createdAt is set to the current server’s local time, and createdBy is the user who created it. When an object is modified (using PUT or PATCH), modifiedAt and modifiedBy are updated with the time and user who made the change.

If a user is removed from the organization, createdBy and modifiedBy will be set to null, but createdAt and modifiedAt remain unchanged.

You can update the createdAt, createdBy, modifiedAt, and modifiedBy properties using a PUT request in the declarative APIs. The API follows these rules:

  • If neither createdAt nor createdBy is provided, the API will set createdAt to the time of the API call and createdBy to the user making the request.
  • If createdBy is provided but createdAt is missing, or modifiedBy is provided but modifiedAt is missing, the API will reject the request.
  • Otherwise, the API updates all relevant fields based on the provided data.

Refer to the Extended Metadata section for examples of declarative API calls.