sf_retrieve_metadata_check_status: Check on Retrieve Calls and Get Contents If Available

View source: R/retrieve-metadata.R

sf_retrieve_metadata_check_statusR Documentation

Check on Retrieve Calls and Get Contents If Available

Description

[Experimental]

This function returns details about an initiated retrieveMetadata request and saves the results into a zip file

Usage

sf_retrieve_metadata_check_status(
  id,
  include_zip = TRUE,
  filename = "package.zip",
  verbose = FALSE
)

Arguments

id

character; string id returned from sf_retrieve_metadata

include_zip

logical; Set to false to check the status of the retrieval without attempting to retrieve the zip file. If omitted, this argument defaults to true.

filename

a file path to save the zip file in the event that it is downloaded. The name must have a .zip extension. The default behavior will be to save in the current working directory as package.zip

verbose

logical; an indicator of whether to print additional detail for each API call, which is useful for debugging. More specifically, when set to TRUE the URL, header, and body will be printed for each request, along with additional diagnostic information where available.

Value

A list of the response

Note

This function is meant to be used internally. Only use when debugging.

References

https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/meta_checkretrievestatus.htm

Examples

## Not run: 
retrieve_request <- list(unpackaged=list(types=list(members='*', name='CustomObject')))
retrieve_info <- sf_retrieve_metadata(retrieve_request)

# check on status, this will automatically download the contents to package.zip when ready
retrieve_status <- sf_retrieve_metadata_check_status(retrieve_info$id)

## End(Not run)

salesforcer documentation built on March 18, 2022, 6:26 p.m.