Salesforce backup and restore for data, files and metadata
Post Reply
gannon
Novice
Posts: 9
Liked: never
Joined: Mar 25, 2025 10:19 pm
Full Name: Gannon Middleton
Contact:

API - Full Object Reload

Post by gannon »

Based on the information from the other post about API support (veeam-backup-for-salesforce-f65/api-or-cli-t98211.html), I'd love to be able to do this via API to update our formula fields (or perform a periodic reload): https://helpcenter.veeam.com/docs/backu ... tml?ver=30

Can you provide any examples about what we would need to call in the API to perform this, lets say its a full reload of all fields on the Account object. Is it possible if its in a job with other objects or only on its own?

This looks like the most accurate endpoint - is it possible you could share an example request to perform this?
/swagger-ui/index.html#/Backup/backupJobReloadFieldsPostRequest

Thanks in advance!!
https://au.linkedin.com/in/gannonmiddleton
anastasia.belyaeva
Veeam Software
Posts: 35
Liked: 12 times
Joined: Mar 14, 2023 9:05 am
Full Name: Anastasia Belyaeva
Contact:

Re: API - Full Object Reload

Post by anastasia.belyaeva »

Hello, @gannon

Do to reload operation for an object you can use POST /api/v1/backup/job/{backupJobId}/reload.
It's only possible to run reload for 1 object at a time.
"Reload" process can either compare only specific fields or do full record comparison (in any case if there is a difference, new record version will be created in backup).
And you can set whether all records should be checked or only created (in Salesforce) in specific period.

Request

Code: Select all

curl -X 'POST' \
  'localhost/api/v1/backup/job/1/reload' \
  -H 'accept: application/json' \
  -H 'Authorization: Bearer TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{
  "object": "Account",
  "fields": [
    "Custom_Field__c"
  ],
  "start_time": "2025-01-01T15:59:10.118Z",
  "end_time": "2025-05-12T15:59:10.118Z"
}'
Response:

Code: Select all

{
  "job_id": 80,
  "success": true,
  "message": null
}
After submitting request, you can check status of the job execution by calling: GET /api/v1/backup/job/{backupJobId}/log
Method will return list of all sessions for the specific backup policy, and you'll need to filter out needed one by "job_id".

Code: Select all

{
      "log_id": 1016,
      "job_id": 80, ----- < job_id of reload job
      "start_time": "2025-05-12T16:00:09.428Z",
      "end_time": "2025-05-12T16:00:16.390Z",
      "run_time": "00:00:06",
      "rows_loaded": 507,
      "rows_inserted": 0,
      "rows_updated": 0,
      "rows_deleted": 0,
      "rows_failed": 0,
      "api_calls_used": 11,
      "processed_objects": 1,
      "message": null,
      "run_type": "manual",
      "state": "DELETED",
      "status": "SUCCESS", ------ < status of the reload job
      "type": "RELOAD",
      "schedule_name": null,
      "downloadable": true
    }
RE: Is it possible if its in a job with other objects or only on its own?
Could you please re-phrase, i didn't understand that part of the question.

regards
gannon
Novice
Posts: 9
Liked: never
Joined: Mar 25, 2025 10:19 pm
Full Name: Gannon Middleton
Contact:

Re: API - Full Object Reload

Post by gannon »

Thanks Anastasia, this is super helpful for us!

I have a few questions about the Request ...

Request

Code: Select all

curl -X 'POST' \
  'localhost/api/v1/backup/job/1/reload' \
  -H 'accept: application/json' \
  -H 'Authorization: Bearer TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{
  "object": "Account",
  "fields": [
    "Custom_Field__c"
  ],
  "start_time": "2025-01-01T15:59:10.118Z",
  "end_time": "2025-05-12T15:59:10.118Z"
  }'
"Reload" process can either compare only specific fields or do full record comparison (in any case if there is a difference, new record version will be created in backup).
Q1. the fields array, is it possible to include ALL fields without specifying them? Would we just leave the array empty, put "*", etc. My understanding is that your request would reload all records, but only update "Custom_Field__c", is that right?
And you can set whether all records should be checked or only created (in Salesforce) in specific period.
2. the start_time and end_time, what relevance do they have here, are we only reloading records where sysmodstamp or lastmodifieddate are within this range? If we want to reload EVERYTHING, do we put say "start_time": "1990-01-01T00:00:00.000Z", "end_time": "2100-01-01T00:00:00.000Z" or leave these fields blank or something?

Really appreciate the information!
https://au.linkedin.com/in/gannonmiddleton
anastasia.belyaeva
Veeam Software
Posts: 35
Liked: 12 times
Joined: Mar 14, 2023 9:05 am
Full Name: Anastasia Belyaeva
Contact:

Re: API - Full Object Reload

Post by anastasia.belyaeva »

Hello, @gannon

1) the fields array, is it possible to include ALL fields without specifying them? Would we just leave the array empty, put "*", etc. My understanding is that your request would reload all records, but only update "Custom_Field__c", is that right?
>> Yes, in my example product would check changes only for 1 specific field. If you want to reload all, then request should not include "fields" parameter. Something like this:

Code: Select all

{
  "object": "Account"
} 
2) the start_time and end_time, what relevance do they have here, are we only reloading records where sysmodstamp or lastmodifieddate are within this range? If we want to reload EVERYTHING, do we put say "start_time": "1990-01-01T00:00:00.000Z", "end_time": "2100-01-01T00:00:00.000Z" or leave these fields blank or something?
>> If dates are specified, then only records with createdDate within specified period will be verified. If you need to check everything, then skip dates parameters. See request example above.

regards.
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest