sf_retrieve_metadata: Make A Request to Retrieve the Metadata

View source: R/retrieve-metadata.R

sf_retrieve_metadataR Documentation

Make A Request to Retrieve the Metadata

Description

[Experimental]

This function makes a request to retrieve metadata as a package XML files that can be modified and later deployed into an environment

Usage

sf_retrieve_metadata(
  retrieve_request,
  filename = "package.zip",
  check_interval = 3,
  max_tries = 20,
  verbose = FALSE
)

Arguments

retrieve_request

a list of parameters defining what XML file representations should be returned

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"

check_interval

numeric; specifying the seconds to wait between retrieve status requests to check if complete

max_tries

numeric; specifying the maximum number of times to check whether the retrieve package.zip is complete before the function times out

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 details from the created retrieve request

Note

See the Salesforce documentation for the proper arguments to create a retrieveRequest. Here is a link to that documentation: https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/meta_retrieve_request.htm

References

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

Examples

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

## End(Not run)

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