This post will export objects from the tenant to a JSON configuration file.
For more information about the object types that currently support export functionality, refer to SaaS Configuration.
Client Error - Returned if the request body is invalid.
ErrorResponseDto
401
Unauthorized - Returned if there is no authorization header, or if the JWT token is expired.
ListAccessModelMetadataAttribute401Response
403
Forbidden - Returned if the user you are running as, doesn't have access to this end-point.
ErrorResponseDto
404
Not Found - returned if the request URL refers to a resource or object that does not exist
ErrorResponseDto
429
Too Many Requests - Returned in response to too many requests in a given period of time - rate limited. The Retry-After header in the response includes how long to wait before trying again.
ListAccessModelMetadataAttribute429Response
500
Internal Server Error - Returned if there is an unexpected error.
ErrorResponseDto
HTTP request headers
Content-Type: application/json
Accept: application/json
Example
$ExportPayload=@"{
"description" : "ExportJob1Test"
}"@# Initiates configuration objects export jobtry{$Result=ConvertFrom-JsonToExportPayload-Json$ExportPayloadExport-BetaSpConfig-ExportPayload$Result# Below is a request that includes all optional parameters# Export-BetaSpConfig -ExportPayload $Result }catch{Write-Host$_.Exception.Response.StatusCode.value__"Exception occurred when calling Export-BetaSpConfig"Write-Host$_.ErrorDetails}
This endpoint gets the export file resulting from the export job with the requested id and downloads it to a file.
The request will need one of the following security scopes:
Client Error - Returned if the request body is invalid.
ErrorResponseDto
401
Unauthorized - Returned if there is no authorization header, or if the JWT token is expired.
ListAccessModelMetadataAttribute401Response
403
Forbidden - Returned if the user you are running as, doesn't have access to this end-point.
ErrorResponseDto
404
Not Found - returned if the request URL refers to a resource or object that does not exist
ErrorResponseDto
429
Too Many Requests - Returned in response to too many requests in a given period of time - rate limited. The Retry-After header in the response includes how long to wait before trying again.
ListAccessModelMetadataAttribute429Response
500
Internal Server Error - Returned if there is an unexpected error.
ErrorResponseDto
HTTP request headers
Content-Type: Not defined
Accept: application/json
Example
$Id="ef38f94347e94562b5bb8424a56397d8"# String | The ID of the export job whose results will be downloaded.# Download export job result.try{Get-BetaSpConfigExport-Id$Id# Below is a request that includes all optional parameters# Get-BetaSpConfigExport -Id $Id }catch{Write-Host$_.Exception.Response.StatusCode.value__"Exception occurred when calling Get-BetaSpConfigExport"Write-Host$_.ErrorDetails}
Client Error - Returned if the request body is invalid.
ErrorResponseDto
401
Unauthorized - Returned if there is no authorization header, or if the JWT token is expired.
ListAccessModelMetadataAttribute401Response
403
Forbidden - Returned if the user you are running as, doesn't have access to this end-point.
ErrorResponseDto
404
Not Found - returned if the request URL refers to a resource or object that does not exist
ErrorResponseDto
429
Too Many Requests - Returned in response to too many requests in a given period of time - rate limited. The Retry-After header in the response includes how long to wait before trying again.
ListAccessModelMetadataAttribute429Response
500
Internal Server Error - Returned if there is an unexpected error.
ErrorResponseDto
HTTP request headers
Content-Type: Not defined
Accept: application/json
Example
$Id="ef38f94347e94562b5bb8424a56397d8"# String | The ID of the export job whose status will be returned.# Get export job statustry{Get-BetaSpConfigExportStatus-Id$Id# Below is a request that includes all optional parameters# Get-BetaSpConfigExportStatus -Id $Id }catch{Write-Host$_.Exception.Response.StatusCode.value__"Exception occurred when calling Get-BetaSpConfigExportStatus"Write-Host$_.ErrorDetails}
This gets import file resulting from the import job with the requested id and downloads it to a file. The downloaded file will contain the results of the import operation, including any error, warning or informational messages associated with the import.
The request will need the following security scope:
Import results JSON object, containing detailed results of the import operation.
SpConfigImportResults
400
Client Error - Returned if the request body is invalid.
ErrorResponseDto
401
Unauthorized - Returned if there is no authorization header, or if the JWT token is expired.
ListAccessModelMetadataAttribute401Response
403
Forbidden - Returned if the user you are running as, doesn't have access to this end-point.
ErrorResponseDto
404
Not Found - returned if the request URL refers to a resource or object that does not exist
ErrorResponseDto
429
Too Many Requests - Returned in response to too many requests in a given period of time - rate limited. The Retry-After header in the response includes how long to wait before trying again.
ListAccessModelMetadataAttribute429Response
500
Internal Server Error - Returned if there is an unexpected error.
ErrorResponseDto
HTTP request headers
Content-Type: Not defined
Accept: application/json
Example
$Id="ef38f94347e94562b5bb8424a56397d8"# String | The ID of the import job whose results will be downloaded.# Download import job resulttry{Get-BetaSpConfigImport-Id$Id# Below is a request that includes all optional parameters# Get-BetaSpConfigImport -Id $Id }catch{Write-Host$_.Exception.Response.StatusCode.value__"Exception occurred when calling Get-BetaSpConfigImport"Write-Host$_.ErrorDetails}
This gets the status of the import job identified by the id parameter.
For more information about the object types that currently support import functionality, refer to SaaS Configuration.
Client Error - Returned if the request body is invalid.
ErrorResponseDto
401
Unauthorized - Returned if there is no authorization header, or if the JWT token is expired.
ListAccessModelMetadataAttribute401Response
403
Forbidden - Returned if the user you are running as, doesn't have access to this end-point.
ErrorResponseDto
404
Not Found - returned if the request URL refers to a resource or object that does not exist
ErrorResponseDto
429
Too Many Requests - Returned in response to too many requests in a given period of time - rate limited. The Retry-After header in the response includes how long to wait before trying again.
ListAccessModelMetadataAttribute429Response
500
Internal Server Error - Returned if there is an unexpected error.
ErrorResponseDto
HTTP request headers
Content-Type: Not defined
Accept: application/json
Example
$Id="ef38f94347e94562b5bb8424a56397d8"# String | The ID of the import job whose status will be returned.# Get import job statustry{Get-BetaSpConfigImportStatus-Id$Id# Below is a request that includes all optional parameters# Get-BetaSpConfigImportStatus -Id $Id }catch{Write-Host$_.Exception.Response.StatusCode.value__"Exception occurred when calling Get-BetaSpConfigImportStatus"Write-Host$_.ErrorDetails}
This post will import objects from a JSON configuration file into a tenant.
By default, every import will first export all existing objects supported by sp-config as a backup before the import is attempted.
The backup is provided so that the state of the configuration prior to the import is available for inspection or restore if needed.
The backup can be skipped by setting "excludeBackup" to true in the import options.
If a backup is performed, the id of the backup will be provided in the ImportResult as the "exportJobId". This can be downloaded
using the /sp-config/export/{exportJobId}/download endpoint.
You cannot currently import from the Non-Employee Lifecycle Management (NELM) source. You cannot use this endpoint to back up or store NELM data.
For more information about the object types that currently support import functionality, refer to SaaS Configuration.
This option is intended to give the user information about how an import operation would proceed, without having any effect on the target tenant. If this parameter is ""true"", no objects will be imported. Instead, the import process will pre-process the import file and attempt to resolve references within imported objects. The import result file will contain messages pertaining to how specific references were resolved, any errors associated with the preprocessing, and messages indicating which objects would be imported.
Client Error - Returned if the request body is invalid.
ErrorResponseDto
401
Unauthorized - Returned if there is no authorization header, or if the JWT token is expired.
ListAccessModelMetadataAttribute401Response
403
Forbidden - Returned if the user you are running as, doesn't have access to this end-point.
ErrorResponseDto
404
Not Found - returned if the request URL refers to a resource or object that does not exist
ErrorResponseDto
429
Too Many Requests - Returned in response to too many requests in a given period of time - rate limited. The Retry-After header in the response includes how long to wait before trying again.
ListAccessModelMetadataAttribute429Response
500
Internal Server Error - Returned if there is an unexpected error.
ErrorResponseDto
HTTP request headers
Content-Type: multipart/form-data
Accept: application/json
Example
$Data=# System.IO.FileInfo | JSON file containing the objects to be imported.$Preview=$true# Boolean | This option is intended to give the user information about how an import operation would proceed, without having any effect on the target tenant. If this parameter is ""true"", no objects will be imported. Instead, the import process will pre-process the import file and attempt to resolve references within imported objects. The import result file will contain messages pertaining to how specific references were resolved, any errors associated with the preprocessing, and messages indicating which objects would be imported. (optional) (default to $false)$Options=@""@# Initiates configuration objects import jobtry{Import-BetaSpConfig-Data$Data# Below is a request that includes all optional parameters# Import-BetaSpConfig -Data $Data -Preview $Preview -Options $Options }catch{Write-Host$_.Exception.Response.StatusCode.value__"Exception occurred when calling Import-BetaSpConfig"Write-Host$_.ErrorDetails}
Client Error - Returned if the request body is invalid.
ErrorResponseDto
401
Unauthorized - Returned if there is no authorization header, or if the JWT token is expired.
ListAccessModelMetadataAttribute401Response
403
Forbidden - Returned if the user you are running as, doesn't have access to this end-point.
ErrorResponseDto
404
Not Found - returned if the request URL refers to a resource or object that does not exist
ErrorResponseDto
429
Too Many Requests - Returned in response to too many requests in a given period of time - rate limited. The Retry-After header in the response includes how long to wait before trying again.
ListAccessModelMetadataAttribute429Response
500
Internal Server Error - Returned if there is an unexpected error.
ErrorResponseDto
HTTP request headers
Content-Type: Not defined
Accept: application/json
Example
# List config objectstry{Get-BetaSpConfigObjects# Below is a request that includes all optional parameters# Get-BetaSpConfigObjects }catch{Write-Host$_.Exception.Response.StatusCode.value__"Exception occurred when calling Get-BetaSpConfigObjects"Write-Host$_.ErrorDetails}