> For the complete documentation index, see [llms.txt](https://docs.abtasty.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.abtasty.com/server-side/remote-control-api/account-environments.md).

# Account Environments

Manage account environments

## Get account environments for the account

> Return the list of the account environments for the account

```json
{"openapi":"3.0.0","info":{"title":"Flagship - Remote Control API","version":"1.0"},"tags":[{"name":"Account Environments","description":"Manage account environments"}],"servers":[{"url":"https://api.flagship.io/v1"}],"security":[{"token":[]}],"components":{"securitySchemes":{"token":{"type":"apiKey","description":"Prefix the token with 'Bearer ' to indicate it is a bearer token","name":"Authorization","in":"header"}},"parameters":{"account_id":{"name":"account_id","in":"path","description":"The ID of the account","required":true,"schema":{"type":"string"}},"_page":{"name":"_page","in":"query","description":"Index of the page","schema":{"type":"integer"}},"_max_per_page":{"name":"_max_per_page","in":"query","description":"Number of items per page","schema":{"type":"integer"}}},"schemas":{"ItemCollection":{"properties":{"current_item_count":{"description":"Returns the number of items in the current page","type":"integer","format":"int"},"current_page":{"description":"Returns the number of the current page","type":"integer","format":"int","default":0},"total_count":{"description":"Returns the number of total items","type":"integer","format":"int"},"items_per_page":{"title":"Items per page","description":"Returns the number of items per page","type":"integer","format":"int","default":10},"last_page":{"title":"Last page","description":"Returns the index of the page","type":"integer","format":"int"}},"type":"object"},"AccountEnvironment":{"required":["name"],"properties":{"id":{"description":"ID of the accountEnvironment","type":"string","readOnly":true},"environment":{"description":"Name of the accountEnvironment","type":"string"},"isMain":{"description":"Is this accountEnvironment the main production one","type":"string"},"panic":{"description":"Is this accountEnvironment in panic mode","type":"string"},"singleAssignment":{"description":"Is XP-C enabled for this accountEnvironment","type":"string"}},"type":"object"}}},"paths":{"/accounts/{account_id}/account_environments":{"get":{"tags":["Account Environments"],"summary":"Get account environments for the account","description":"Return the list of the account environments for the account","operationId":"75d9c537b56eea24b1d668afbb976c35","parameters":[{"$ref":"#/components/parameters/account_id"},{"$ref":"#/components/parameters/_page"},{"$ref":"#/components/parameters/_max_per_page"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/ItemCollection"},{"properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/AccountEnvironment"}}},"type":"object"}]}}}},"404":{"description":"Not Found"}}}}}}
```

## Get one environment

> Return one environment by its id

```json
{"openapi":"3.0.0","info":{"title":"Flagship - Remote Control API","version":"1.0"},"tags":[{"name":"Account Environments","description":"Manage account environments"}],"servers":[{"url":"https://api.flagship.io/v1"}],"security":[{"token":[]}],"components":{"securitySchemes":{"token":{"type":"apiKey","description":"Prefix the token with 'Bearer ' to indicate it is a bearer token","name":"Authorization","in":"header"}},"parameters":{"account_id":{"name":"account_id","in":"path","description":"The ID of the account","required":true,"schema":{"type":"string"}},"account_environment_id":{"name":"account_environment_id","in":"path","description":"The ID of the environment","required":true,"schema":{"type":"string"}}},"schemas":{"AccountEnvironment":{"required":["name"],"properties":{"id":{"description":"ID of the accountEnvironment","type":"string","readOnly":true},"environment":{"description":"Name of the accountEnvironment","type":"string"},"isMain":{"description":"Is this accountEnvironment the main production one","type":"string"},"panic":{"description":"Is this accountEnvironment in panic mode","type":"string"},"singleAssignment":{"description":"Is XP-C enabled for this accountEnvironment","type":"string"}},"type":"object"}}},"paths":{"/accounts/{account_id}/account_environments/{account_environment_id}":{"get":{"tags":["Account Environments"],"summary":"Get one environment","description":"Return one environment by its id","operationId":"735a0cac2f4b3d443b395660ed93c5de","parameters":[{"$ref":"#/components/parameters/account_id"},{"$ref":"#/components/parameters/account_environment_id"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountEnvironment"}}}},"404":{"description":"Not Found"}}}}}}
```

## Panic the account environment

> Update the panic mode of the account environment

```json
{"openapi":"3.0.0","info":{"title":"Flagship - Remote Control API","version":"1.0"},"tags":[{"name":"Account Environments","description":"Manage account environments"}],"servers":[{"url":"https://api.flagship.io/v1"}],"security":[{"token":[]}],"components":{"securitySchemes":{"token":{"type":"apiKey","description":"Prefix the token with 'Bearer ' to indicate it is a bearer token","name":"Authorization","in":"header"}},"parameters":{"account_id":{"name":"account_id","in":"path","description":"The ID of the account","required":true,"schema":{"type":"string"}},"account_environment_id":{"name":"account_environment_id","in":"path","description":"The ID of the environment","required":true,"schema":{"type":"string"}}},"schemas":{"Panic":{"required":["panic"],"properties":{"panic":{"description":"Status of the panic mode","type":"string","enum":["on","off"]}},"type":"object"}}},"paths":{"/accounts/{account_id}/account_environments/{account_environment_id}":{"patch":{"tags":["Account Environments"],"summary":"Panic the account environment","description":"Update the panic mode of the account environment","operationId":"d976a9eb72acb4fb43ab90e73ad2f1ca","parameters":[{"$ref":"#/components/parameters/account_id"},{"$ref":"#/components/parameters/account_environment_id"}],"requestBody":{"description":"Informations of the panic mode","required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Panic"}}}},"responses":{"200":{"description":"Success"},"404":{"description":"Not Found"}}}}}}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

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

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.abtasty.com/server-side/remote-control-api/account-environments.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
