# Maintenance Methods

In distinction to eva-cloud, several maintenance operations may be performed by yourself. The following methods are all handy quality of life methods provided to ease the managing of your Syntphony CAI environments.

Those are internal, unlisted methods in our API which are not meant to be implemented into your system, but rather, to be used sporadically to perform specific tasks.

{% hint style="warning" %}
All methods listed below are internal methods. This imples that they are permanently locked out of external access, regardless of your configurations. In order to perform any of the methods listed below, you are expected to connect to the specified Syntphony CAI's service or pod through a localhost. Your port forward localhost IP will be referred to as 'IP\_PF' in this document.
{% endhint %}

## Remove and Restore methods

The following methods allow you to remove organizations, environments, and even full instances you own. None will affect your pricings, as those deletions are logical deletes, which can be reactivated.

When removing an environment, you must also clear all settings from that environment in your config server and update the scope of all active microservices. This may be performed, for instance, with a short reboot.

As with removal, the Restore methods require you to reconfigure your config server in order to have the environment settings.

{% hint style="danger" %}
While you technically could just keep the config servers between removal and restore, we **strongly** recommend you to perform full clears. Incomplete setups on restore may leave some fields behind that are unwanted or wrong, causing errors. The recommended practice is to re-do the whole proccess, always double checking your configurations.
{% endhint %}

### Organizations

{% hint style="info" %}
Port forward to: eva-organization
{% endhint %}

Organizations cannot be removed if there is any active environment within it.

```
DELETE (Remove)
http://{IP_PF}/internal/organizations/{orgUUID}?userUUID={userUUID}

PUT (Restore)
http://{IP_PF}/internal/organizations/{orgUUID}/restore?userUUID={userUUID}
```

These endpoints will receive the following parameters:

·       orgUUID: an id of an organization validates to be removed or restored

·       userUUID valid user id for audit fields

&#x20;

Some errors may occur when accessing the endpoint:

·       404: when the environment or organization does not exist

·       400: when try remove a organization with active environments

·       500: internal errors

### Environments

{% hint style="info" %}
Port forward to: eva-environment
{% endhint %}

```
DELETE (Remove)
http://{IP_PF}/internal/org/{orgUUID}/environments/{envUUID}?userUUID={userUUID}

PUT (Restore)
http://{IP_PF}/internal/org/{orgUUID}/environments/{envUUID}/restore?userUUID={userUUID} 
```

These endpoints will receive the following parameters:

·       orgUUID: an id of an organization validates

·       envUUID: environment id to be removed or restored

·       userUUID valid user id for audit fields

Some errors may occur when accessing the endpoint:

·       404: when the environment or organization does not exist

·       500: internal errors

### Instances

{% hint style="info" %}
Port forward to: eva-environment
{% endhint %}

```
DELETE (Remove)
http://{IP_PF}/internal/instances/{instanceUUID}?userUUID={userUUID}

PUT (Restore)
http://{IP_PF}/internal/instances/{instanceUUID}/restore?userUUID={userUUID}
```

These endpoints will receive the following parameters:

·       instanceUUID: instance id to be removed or restored

·       userUUID valid user id for audit fields

Some errors may occur when accessing the endpoint:

·       404: when the environment or organization does not exist

·       400 when try remove an instance with active environments

·       500: internal errors

## &#x20;


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs-conversational-ai.syntphony.com/api-docs/infrastructure-guidelines/maintenance-methods.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
