Reporting integration status
To report the integration activation status, the API client must use the /api/integration_management/v2/status
endpoint.
Query string parameters
The endpoint accepts the tenantID
query string parameter. This parameter specifies the tenant UUID for which the integration status is reported.
Usually, it’s a partner tenant where the integration is configured.
If not specified, the tenant UUID where the API client is registered will be used.
Request body structure
Note
This table describes the fields using the following JSON Path syntax:
.
- a path to the object’s field.[*]
- an array that specifies all elements.
For example, the events[*].category
notation means that events
is an array
where all items are objects containing the category
field.
Field |
Type |
Required |
Description |
---|---|---|---|
|
String, up to 1000 characters |
Yes (if |
CyberApp code in the |
|
UUID string |
Yes (if |
ID of the integration. Mutually exclusive with |
|
Object |
Yes |
Information about integration. |
|
String, 1 to 255 characters |
Yes |
Integration name. |
|
String, up to 255 characters |
No |
Integration version. |
|
Object |
No |
Information about the product integrated with Acronis. |
|
String, 1 to 255 characters |
Yes |
Integrated product name. |
|
String, up to 255 characters |
No |
Integrated product version. |
|
Array of objects |
No |
List of events. Event represents an action that integration performed on a tenant. |
|
String, 1 to 150 characters |
Yes |
Event category is an arbitrary string identifying a group of events, for example, “activation”. |
|
String, 1 to 500 characters |
Yes |
Event action is an arbitrary string identifying an event, for example, “activated integration”. |
|
Boolean, default false |
No |
Set to true if the event indicates that integration has been activated on a tenant. This flag will set |
|
Boolean, default false |
No |
Set to true if the event indicates that integration has been deactivated on a tenant. This flag will set |
|
Date and time in RFC 3339 format |
No |
A timestamp of when integration has been activated on a tenant. |
|
Date and time in RFC 3339 format |
No |
A timestamp of when integration has been deactivated on a tenant. |
Request body example:
{
"application_code": "<vendor.application>",
"module": {
"name": "Integration backend",
"version": "1.0.0"
},
"vendor_system": {
"name": "Product integrated with Acronis",
"version": "22.04.1"
},
"events": [
{
"category": "activation",
"action": "activated integration",
"activation_event": true
}
]
}
Before you start
Authenticate to the cloud platform via the Python shell.
The following variables should be available now:
>>> base_url # the base URL of the API 'https://eu2-cloud.acronis.com/api/integration_management/v2' >>> auth # the 'Authorization' header value with the access token {'Authorization': 'Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImtpZCI6ImMwMD...'} >>> tenant_id # the UUID of the tenant to which the token provides access 'ede9f834-70b3-476c-83d9-736f9f8c7dae'
Define the following common variables that describe the integration and will be used in status reporting requests:
>>> # Replace '<vendor.application>' with your application code >>> application_code = '<vendor.application>' >>> module = {'name': 'Integration backend', 'version': '1.0.0'} >>> vendor_system = {'name': 'Product integrated with Acronis', 'version': '22.04.1'}
To activate the integration
Define a variable named
status
, and then assign a dictionary with information about the integration status to this variable:>>> status = { ... 'application_code': application_code, ... 'module': module, ... 'vendor_system': vendor_system, ... 'events': [{'category': 'activation', 'action': 'activated integration', 'activation_event': True}], ... }
[Optional] Define the
target_tenant_id
variable and specify the tenant UUID where you want to report the integration activation:>>> target_tenant_id = tenant_id
Convert the
status
object to a JSON text:>>> status = json.dumps(status, indent=4)
Send a POST request with the JSON text to the
/status?tenantID={target_tenant_id}
endpoint:>>> response = requests.post( ... f'{base_url}/status?tenantID={target_tenant_id}', ... headers={'Content-Type': 'application/json', **auth}, ... data=status, ... )
Check the status code of the response:
>>> response.status_code 204
Status code 204 means that the integration has been activated.
To deactivate the integration
Define a variable named
status
, and then assign a dictionary with information about the integration status to this variable:>>> status = { ... 'application_code': application_code, ... 'module': module, ... 'vendor_system': vendor_system, ... 'events': [{'category': 'activation', 'action': 'deactivated integration', 'deactivation_event': True}] ... }
[Optional] Define the
target_tenant_id
variable and specify the tenant UUID where you want to report the integration deactivation:>>> target_tenant_id = tenant_id
Convert the
status
object to a JSON text:>>> status = json.dumps(status, indent=4)
Send a POST request with the JSON text to the
/status?tenantID={target_tenant_id}
endpoint:>>> response = requests.post( ... f'{base_url}/status?tenantID={target_tenant_id}', ... headers={'Content-Type': 'application/json', **auth}, ... data=status, ... )
Check the status code of the response:
>>> response.status_code 204
Status code 204 means that the integration has been deactivated.