# Service Executor

### 1. Methods

#### **1.1 `getService(String)`**

```java
Service getService(String serviceId);
```

**Description:**\
This method is used to obtain information about a service.

#### **1.2 `getServices()`**

```java
List<Service> getServices();
```

**Description:**\
This method is used to obtain a list of service information.

#### **1.3 `getServices(String)`**

```java
List<Service> getServices(String templateName);
```

**Description:**\
This method is used to obtain a list of service information for a specific template.

#### **1.4 `queueNewService(String)`**

```java
void queueNewService(String templateName);
```

**Description:**\
This method is used to start a new service based on the template.

#### **1.5 `stopRunningService(String)`**

```java
void stopRunningService(String serviceId);
```

**Description:**\
This method is used to stop a service.

#### **1.6 `stopServices(String)`**

```java
void stopServices(String templateName);
```

**Description:**\
This method is used to stop all services of a template.

#### **1.7 `setServiceInUse(String)`**

```java
void setServiceInUse(String serviceId);
```

**Description:**\
This method is used to set a service to the IN\_USE state, so that a new one can be automatically started if necessary.


---

# 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.walecloud.com/api-documentation/executors/service-executor.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.
