Tenant Configuration - Save

This operation creates a commit with the current configuration snapshot to the specified branch in the repository. This is a long running operation and could take several minutes to complete.

POST https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tenant/configuration/save?api-version=2021-08-01

URI Parameters

Name In Required Type Description
configurationName
path True

configurationIdName

The identifier of the Git Configuration Operation.

resourceGroupName
path True

string

The name of the resource group.

serviceName
path True

string

The name of the API Management service.

Regex pattern: ^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$

subscriptionId
path True

string

Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.

api-version
query True

string

Version of the API to be used with the client request.

Request Body

Name Required Type Description
properties.branch True

string

The name of the Git branch in which to commit the current configuration snapshot.

properties.force

boolean

The value if true, the current configuration database is committed to the Git repository, even if the Git repository has newer changes that would be overwritten.

Responses

Name Type Description
200 OK

OperationResultContract

Result of creating a commit in the repository.

202 Accepted

Accepted: Location header contains the URL where the status of the long running operation can be checked.

Other Status Codes

ErrorResponse

Error response describing why the operation failed.

Security

azure_auth

Azure Active Directory OAuth2 Flow.

Type: oauth2
Flow: implicit
Authorization URL: https://login.microsoftonline.com/common/oauth2/authorize

Scopes

Name Description
user_impersonation impersonate your user account

Examples

ApiManagementTenantConfigurationSave

Sample request

POST https://management.azure.com/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/tenant/configuration/save?api-version=2021-08-01

{
  "properties": {
    "branch": "master"
  }
}

Sample response

location: https://management.azure.com/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/tenant/operationResults/5a1af57d2a6d2e0b688d751b?api-version=2021-08-01
{
  "id": "6074e652093a9d0dac3d733c",
  "type": "Microsoft.ApiManagement/service/tenant/operationResults",
  "name": "6074e652093a9d0dac3d733c",
  "properties": {
    "status": "Succeeded",
    "started": "2021-04-13T00:31:14.94Z",
    "updated": "2021-04-13T00:31:27.59Z",
    "resultInfo": "The configuration was successfully saved to master as commit c0ae274f6046912107bad734834cbf65918668b6.",
    "actionLog": []
  }
}

Definitions

Name Description
AsyncOperationStatus

Status of an async operation.

configurationIdName

The identifier of the Git Configuration Operation.

ErrorFieldContract

Error Field contract.

ErrorResponse

Error Response.

ErrorResponseBody

Error Body contract.

OperationResultContract

Long Running Git Operation Results.

OperationResultLogItemContract

Log of the entity being created, updated or deleted.

SaveConfigurationParameter

Save Tenant Configuration Contract details.

AsyncOperationStatus

Status of an async operation.

Name Type Description
Failed

string

InProgress

string

Started

string

Succeeded

string

configurationIdName

The identifier of the Git Configuration Operation.

Name Type Description
configuration

string

ErrorFieldContract

Error Field contract.

Name Type Description
code

string

Property level error code.

message

string

Human-readable representation of property-level error.

target

string

Property name.

ErrorResponse

Error Response.

Name Type Description
error.code

string

Service-defined error code. This code serves as a sub-status for the HTTP error code specified in the response.

error.details

ErrorFieldContract[]

The list of invalid fields send in request, in case of validation error.

error.message

string

Human-readable representation of the error.

ErrorResponseBody

Error Body contract.

Name Type Description
code

string

Service-defined error code. This code serves as a sub-status for the HTTP error code specified in the response.

details

ErrorFieldContract[]

The list of invalid fields send in request, in case of validation error.

message

string

Human-readable representation of the error.

OperationResultContract

Long Running Git Operation Results.

Name Type Description
id

string

Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}

name

string

The name of the resource

properties.actionLog

OperationResultLogItemContract[]

This property if only provided as part of the TenantConfiguration_Validate operation. It contains the log the entities which will be updated/created/deleted as part of the TenantConfiguration_Deploy operation.

properties.error

ErrorResponseBody

Error Body Contract

properties.id

string

Operation result identifier.

properties.resultInfo

string

Optional result info.

properties.started

string

Start time of an async operation. The date conforms to the following format: yyyy-MM-ddTHH:mm:ssZ as specified by the ISO 8601 standard.

properties.status

AsyncOperationStatus

Status of an async operation.

properties.updated

string

Last update time of an async operation. The date conforms to the following format: yyyy-MM-ddTHH:mm:ssZ as specified by the ISO 8601 standard.

type

string

The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"

OperationResultLogItemContract

Log of the entity being created, updated or deleted.

Name Type Description
action

string

Action like create/update/delete.

objectKey

string

Identifier of the entity being created/updated/deleted.

objectType

string

The type of entity contract.

SaveConfigurationParameter

Save Tenant Configuration Contract details.

Name Type Description
properties.branch

string

The name of the Git branch in which to commit the current configuration snapshot.

properties.force

boolean

The value if true, the current configuration database is committed to the Git repository, even if the Git repository has newer changes that would be overwritten.