Updating Data source of provider by REST API in SAP

When updating a data source of a provider through REST API in SAP, it's important to understand that modifying the document is just the first step. You also need to save the changes to make them persistent in the repository.

Understanding Document States

After making changes to the document, you'll notice that its state has been updated to 'Modified' from the previous state, which could have been 'Unused' or 'Original'. This state change indicates that the document has been altered but not yet saved to the repository.

Saving Changes with PUT Request

To save your modifications, you need to send a PUT request to the SAP REST API. Here's the typical structure of such a request ?

PUT /api/v1/dataproviders/{provider_id}
Content-Type: application/json
Authorization: Bearer {access_token}

{
    "dataSource": {
        "connectionString": "new_connection_details",
        "type": "updated_data_source_type"
    }
}

Once the PUT request is processed successfully for the requested document, the changes (including the data source of the data provider) will be updated and persisted in the repository. The document state will then change back to 'Original' or 'Saved', indicating that your modifications have been successfully committed.

Conclusion

Remember that modifying a data provider's data source requires both updating the document and saving it via a PUT request to ensure changes are persisted in the SAP repository.

Updated on: 2026-03-13T18:51:22+05:30

245 Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements