Data management API
- Tier: Premium, Ultimate
- Offering: GitLab Self-Managed
- Status: Experiment
Use the data management API to manage an instance’s data.
Prerequisites:
- You must be an administrator.
Retrieve model information
Retrieves information about a data model in an instance. This operation 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_nuget_symbolspackages_package_filespages_deploymentsprojectsprojects_wiki_repositoriessnippet_repositoriessupply_chain_attestationsterraform_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 checksums for model records
Recalculates checksums for selected records of a specified model, filtered by checksum_state and identifiers parameters if provided. The request enqueues a background job to perform the recalculation.
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. |
If successful, it 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."
}Retrieve information about a model record
Retrieves information about a specified 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, it 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 model record
Recalculates the checksum of a specified model record. The checksum value is a representation of the queried model hashed with the md5 or sha256 algorithm.
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, it returns 200 and information about the specific model record.
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
}
}