Data management API
- Tier: Premium, Ultimate
- Offering: GitLab Self-Managed
- Status: Experiment
The availability of this feature is controlled by a feature flag. For more information, see the history.
Use the data management API to manage an instance’s data.
Prerequisites:
- You must be an administrator.
Get information about a model
This endpoint is an experiment and might be changed or removed without notice.
GET /admin/data_management/:model_nameThe :model_name parameter must be one of:
ci_job_artifactsci_pipeline_artifactsci_secure_filescontainer_repositoriesdependency_proxy_blobsdependency_proxy_manifestsdesign_management_repositoriesgroup_wiki_repositorieslfs_objectsmerge_request_diffspackages_package_filespages_deploymentsprojectsprojects_wiki_repositoriessnippet_repositoriesterraform_state_versionsuploads
Supported attributes:
| Attribute | Type | Required | Description |
|---|---|---|---|
model_name | string | Yes | The pluralized name of the requested model. Must belong to the :model_name list above. |
checksum_state | string | No | Search by checksum status. Allowed values: pending, started, succeeded, failed, disabled. |
identifiers | array | No | Filter results with an array of unique identifiers of the requested model, which can be integers or base64 encoded strings. |
This endpoint supports keyset pagination on the model’s primary key, with sorting in ascending or descending order. To use keyset pagination, add the pagination=keyset parameter to the request. By default, keyset pagination loads 20 records per page sorted in ascending order. You can modify the sorting order with the query parameter sort, and values asc or desc. To select a number of records per page, use the parameter per_page.
If successful, returns 200 and information about the model. It includes the following
response attributes:
| Attribute | Type | Description |
|---|---|---|
checksum_information | JSON | Geo-specific checksum information, if available. |
created_at | timestamp | Creation timestamp, if available. |
file_size | integer | Size of the object, if available. |
model_class | string | Class name of the model. |
record_identifier | string or integer | Unique identifier of the record. Can be an integer or a base64 encoded string. |
curl --header "PRIVATE-TOKEN: <your_access_token>" "https://primary.example.com/api/v4/admin/data_management/projects?pagination=keyset"Example response:
[
{
"record_identifier": 1,
"model_class": "Project",
"created_at": "2025-02-05T11:27:10.173Z",
"file_size": null,
"checksum_information": {
"checksum": "<object checksum>",
"last_checksum": "2025-07-24T14:22:18.643Z",
"checksum_state": "succeeded",
"checksum_retry_count": 0,
"checksum_retry_at": null,
"checksum_failure": null
}
},
{
"record_identifier": 2,
"model_class": "Project",
"created_at": "2025-02-05T11:27:14.402Z",
"file_size": null,
"checksum_information": {
"checksum": "<object checksum>",
"last_checksum": "2025-07-24T14:22:18.214Z",
"checksum_state": "succeeded",
"checksum_retry_count": 0,
"checksum_retry_at": null,
"checksum_failure": null
}
}
]Recalculate the checksum of selected model records
PUT /admin/data_management/:model_name/checksum| Attribute | Type | Required | Description |
|---|---|---|---|
model_name | string | Yes | The pluralized name of the requested model. Must belong to the :model_name list above. |
checksum_state | string | No | Filter by checksum status. Allowed values: pending, started, succeeded, failed, disabled. |
identifiers | array | No | Filter records with an array of unique identifiers of the requested model, which can be integers or base64 encoded strings. |
This endpoint marks all selected records from the model for checksum recalculation, filtered by checksum_state and identifiers parameters if provided. It enqueues a background job to do so. If successful, returns 200 and a JSON response containing the following information:
| Attribute | Type | Description |
|---|---|---|
message | string | A information message about the success or error. |
status | string | Can be “success” or “error”. |
curl --header "PRIVATE-TOKEN: <your_access_token>" "https://primary.example.com/api/v4/admin/data_management/projects/checksum"Example response:
{
"status": "success",
"message": "Batch update job has been successfully enqueued."
}Get information about a specific model record
GET /admin/data_management/:model_name/:id| Attribute | Type | Required | Description |
|---|---|---|---|
model_name | string | Yes | The pluralized name of the requested model. Must belong to the :model_name list above. |
record_identifier | string or integer | Yes | The unique identifier of the requested model. Can be an integer or a base64 encoded string. |
If successful, returns 200 and information about the specific model record. It includes the following
response attributes:
| Attribute | Type | Description |
|---|---|---|
checksum_information | JSON | Geo-specific checksum information, if available. |
created_at | timestamp | Creation timestamp, if available. |
file_size | integer | Size of the object, if available. |
model_class | string | Class name of the model. |
record_identifier | string or integer | Unique identifier of the record. Can be an integer or a base64 encoded string. |
curl --header "PRIVATE-TOKEN: <your_access_token>" "https://primary.example.com/api/v4/admin/data_management/projects/1"Example response:
{
"record_identifier": 1,
"model_class": "Project",
"created_at": "2025-02-05T11:27:10.173Z",
"file_size": null,
"checksum_information": {
"checksum": "<object checksum>",
"last_checksum": "2025-07-24T14:22:18.643Z",
"checksum_state": "succeeded",
"checksum_retry_count": 0,
"checksum_retry_at": null,
"checksum_failure": null
}
}Recalculate the checksum of a specific model record
PUT /admin/data_management/:model_name/:record_identifier/checksum| Attribute | Type | Required | Description |
|---|---|---|---|
model_name | string | Yes | The pluralized name of the requested model. Must belong to the :model_name list above. |
record_identifier | string or integer | Yes | Unique identifier of the record. Can be an integer or a base64 encoded string (taken from the response of the GET query). |
If successful, returns 200 and information about the specific model record. The checksum value is a representation of the queried model hashed with the md5 or sha256 algorithm.
curl --header "PRIVATE-TOKEN: <your_access_token>" "https://primary.example.com/api/v4/admin/data_management/projects/1/checksum"Example response:
{
"record_identifier": 1,
"model_class": "Project",
"created_at": "2025-02-05T11:27:10.173Z",
"file_size": null,
"checksum_information": {
"checksum": "<sha256 or md5 string>",
"last_checksum": "2025-07-24T14:22:18.643Z",
"checksum_state": "succeeded",
"checksum_retry_count": 0,
"checksum_retry_at": null,
"checksum_failure": null
}
}