---
title: "Get a diff and a MAQL script"
method: GET
path: "/gdc/projects/{projectId}/model/diff/{diffId}"
tags: ["logicaldatamodel"]
---

# Get a diff and a MAQL script

`GET /gdc/projects/{projectId}/model/diff/{diffId}`

## Request

- Base URL: `https://secure.gooddata.com`
- URL: `https://secure.gooddata.com/gdc/projects/{projectId}/model/diff/{diffId}`
- Auth: none declared

This method retrieves the generated diff between two project models and MAQL DDL scripts.<br/>
The diff between the two models is represented by script operations that you can execute on the current project model to make it equal to the submitted `targetModel`.
If no difference exists between the current model and its `targetState`, the returned list of update operations is empty.<br/>
This example simulates the MAQL script generated by the resource for
[generating a diff and a MAQL DDL script](#operation/generateDiffMaqlDdl).<br/>
The `updateScripts` section of the response contains one or more unique versions of MAQL DDL, which you can execute to update the project model. Some combinations of update options may not be available.

## Response `200`

OK - view of project's model

- ProjectModelDiff
  - `projectModelDiff` object, required
    - `updateOperations` UpdateOperation[], required
      - `updateOperation` object, required
        - `type` string, required
        - `dataset` string
        - `destructive` boolean, required
        - `description` string, required
        - `parameters` string[], required
    - `updateScripts` UpdateScripts[], required
      - `updateScript` object, required
        - `maqlDdl` string
        - `maqlDdlChunks` string, required
        - `preserveData` boolean, required
        - `cascadeDrops` boolean, required
        - `fallbackHardSync` boolean
    - `impactedVisualObjects` ImpactedVisualObject[]
      - `impactedVisualObject` object, required
        - `identifier` string, required
        - `category` string, required
        - `title` string, required
        - `uri` string, required
    - `computedAttributesScript` ComputedAttributesScript
      - `maqlDdlChunks` string, required

## Other responses

- `202`: Accepted - the task is still running
- `403`: Forbidden - the project does not exist
- `404`: Not Found - the view with <viewId> does not exist
- `409`: Conflict - project's model is not supported by this API
- `410`: Gone - if the async task failed

---

[API](https://skmtc.dev/gooddata/apis/gooddata-api-documentation.md) - [All operations](https://skmtc.dev/gooddata/apis/gooddata-api-documentation/llms.txt) - [OpenAPI document](https://skmtc.dev/gooddata/apis/gooddata-api-documentation/revisions/e5dc0ee6ab00?raw)
