## 4.2.9.7.2 Reading and Deploying ATC Configurations
## Prerequisites
- You have an SAP BTP ABAP environment system.
- You've created a Communication User and generated a password as described in How to Create Communication Users [page 2710].
- You've created a Communication System as described in How to Create Communication Systems.
- You've created a Communication Arrangement as described in How to Create a Communication Arrangement [page 2712].
##  Note
The URL displayed for the inbound service of the communication arrangement will be needed for the GET requests described below.
- You have selected the communication scenario SAP\_COM\_0763 for your communication arrangement and have mapped it to your communication system.
## Context
The communication scenario SAP\_COM\_0763 offers an OData V4 API for maintenance of ABAP Test Cockpit (ATC) configurations on the business objects SATC\_CI\_CF\_RT\_E , SATC\_CI\_CF\_E , and SATC\_CI\_CF\_P\_V . Therefore, you have to create a valid communication arrangement as described in the prerequisites before performing the actual test steps.
## Procedure
1. Get CSRF token: The first step serves for the authentication on the server. Use the URL you've obtained from the Communication Arrangement 's inbound service for the GET request. The response header contains an CSRF token, which is used as authentication for the GET request following in step 2.
## Request
Authentication Type : Basic Authentication. Enter the name of your Communication User (not the technical user ID) and the generated password.
GET &lt;URL\_from\_Communication\_Arrangement&gt;
Headers
| KEY          | VALUE   |
|--------------|---------|
| x-csrf-token | fetch   |
| Response     |         |
| Headers      |         |
| KEY          | VALUE   |
| x-csrf-token | <token> |
2. Read ATC configurations: To read ATC configurations, prepare a GET request using the following parameters:
Request
Header
KEY
x-csrf-token
- All configurations:
GET &lt;URL\_from\_Communication\_Arrangement&gt;/configuration
- By name:
GET &lt;URL\_from\_Communication\_Arrangement&gt;/configuration?$filter=conf\_name eq '&lt;CONFNAME&gt;'
- Default configuration:
GET &lt;URL\_from\_Communication\_Arrangement/configuration?$filter=is\_default eq true
If you want to look deeper into configuration data (e.g. the priorities of the configuration), you can use expands by adding:
- to all priorities: &amp;$expand=\_priorities
- filtered only on priorities changed from default\_priority: &amp;$expand=\_priorities($filter=priority ne default\_priority)
3. Deploy ATC configurations: To deploy an ATC configuration, prepare a POST request and use the body to provide a json (or XML) representing the configuration you want to deploy.
Request
Header
KEY
## VALUE
| content-type   | application/json   |
|----------------|--------------------|
| x-csrf-token   | <token>            |
POST &lt;URL\_from\_Communication\_Arrangement&gt;/configuration
· Flat Insert of changed priorities: When you pass the json from the get\_configuration with no expand by creating a valid configuration, the default priorities will also be created.
## VALUE
&lt;token&gt;
- Deep Insert of changed priorities: You can pass the json from the get\_configuration with expand to filtered priorities and potentially change the confname if desired.