# Pools

## Lists all pools.

> \*\*API Key Scope\*\*: pools / index

```json
{"openapi":"3.0.1","info":{"title":"Nodeum API","version":"2.1.0"},"servers":[{"url":"{url}/api/v2","variables":{"url":{"default":"http://localhost","description":"URL of server"}}}],"security":[{"BasicAuth":[]},{"BearerAuth":[]},{"JWT":[]}],"components":{"securitySchemes":{"BasicAuth":{"type":"http","scheme":"basic","description":"Pass the username and password of a user in the authorization header.\nThis currently gives full access."},"BearerAuth":{"type":"apiKey","description":"Create an API Key associated to user.\nAccess can be restricted with the scope.\nEach API call described below has a scoped mentionned in its description.\n\nFor example :\n\n**API Key Scope**: files / index\n\nThis means that the API key should have a scope with controller as *files*\nand the action as *index*.","name":"Authorization","in":"header"},"JWT":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}},"responses":{"pools_index":{"description":"List of pools.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/pool_collection"}}}}},"schemas":{"pool_collection":{"type":"object","properties":{"count":{"type":"integer","readOnly":true},"pools":{"type":"array","readOnly":true,"items":{"$ref":"#/components/schemas/pool"}}}},"pool":{"type":"object","properties":{"id":{"type":"integer","readOnly":true},"name":{"type":"string"},"comment":{"type":"string"},"type":{"type":"string","enum":["active_archive","offline_archive","data_exchange","scratch","data_enrichment","primary"]},"content":{"type":"string","enum":["cloud","nas"]},"storage_id":{"type":"integer","description":"For pools, used to link to a storage id","format":"int64"}}}},"parameters":{"limit":{"name":"limit","in":"query","description":"The number of items to display for pagination.","schema":{"type":"integer"}},"offset":{"name":"offset","in":"query","description":"The number of items to skip for pagination.","schema":{"type":"integer"}},"sort_by":{"name":"sort_by","in":"query","description":"Sort results by attribute.\n\nCan sort on multiple attributes, separated by `|`.\nOrder direction can be suffixing the attribute by either `:asc` (default) or `:desc`.","style":"pipeDelimited","schema":{"type":"array","items":{"type":"string"}}},"filter_id":{"name":"id","in":"query","description":"Filter on id","schema":{"type":"string"}},"filter_name":{"name":"name","in":"query","description":"Filter on name","schema":{"type":"string"}},"filter_comment":{"name":"comment","in":"query","description":"Filter on comment","schema":{"type":"string"}},"filter_type":{"name":"type","in":"query","description":"Filter on type","schema":{"type":"string"}},"filter_content":{"name":"content","in":"query","description":"Filter on content","schema":{"type":"string"}}}},"paths":{"/pools":{"get":{"summary":"Lists all pools.","tags":["pools"],"operationId":"index_pools","description":"**API Key Scope**: pools / index","responses":{"200":{"$ref":"#/components/responses/pools_index"}},"parameters":[{"$ref":"#/components/parameters/limit"},{"$ref":"#/components/parameters/offset"},{"$ref":"#/components/parameters/sort_by"},{"$ref":"#/components/parameters/filter_id"},{"$ref":"#/components/parameters/filter_name"},{"$ref":"#/components/parameters/filter_comment"},{"$ref":"#/components/parameters/filter_type"},{"$ref":"#/components/parameters/filter_content"}]}}}}
```

## Creates a new pool.

> \*\*API Key Scope\*\*: pools / create

```json
{"openapi":"3.0.1","info":{"title":"Nodeum API","version":"2.1.0"},"servers":[{"url":"{url}/api/v2","variables":{"url":{"default":"http://localhost","description":"URL of server"}}}],"security":[{"BasicAuth":[]},{"BearerAuth":[]},{"JWT":[]}],"components":{"securitySchemes":{"BasicAuth":{"type":"http","scheme":"basic","description":"Pass the username and password of a user in the authorization header.\nThis currently gives full access."},"BearerAuth":{"type":"apiKey","description":"Create an API Key associated to user.\nAccess can be restricted with the scope.\nEach API call described below has a scoped mentionned in its description.\n\nFor example :\n\n**API Key Scope**: files / index\n\nThis means that the API key should have a scope with controller as *files*\nand the action as *index*.","name":"Authorization","in":"header"},"JWT":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}},"responses":{"pools_show":{"description":"A specific pool.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/pool"}}}},"unprocessable_entity":{"description":"The received resource was not correctly formatted.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/model_error"}}}}},"schemas":{"pool":{"type":"object","properties":{"id":{"type":"integer","readOnly":true},"name":{"type":"string"},"comment":{"type":"string"},"type":{"type":"string","enum":["active_archive","offline_archive","data_exchange","scratch","data_enrichment","primary"]},"content":{"type":"string","enum":["cloud","nas"]},"storage_id":{"type":"integer","description":"For pools, used to link to a storage id","format":"int64"}}},"model_error":{"type":"object","properties":{"details":{"type":"object","additionalProperties":{"type":"array","items":{"$ref":"#/components/schemas/attribute_error"}},"description":"Parsable objects describing the errors. The key is the invalid attribute name."},"messages":{"type":"array","description":"English description of the errors.","items":{"type":"string"}}}},"attribute_error":{"required":["error"],"type":"object","properties":{"error":{"type":"string"}},"discriminator":{"propertyName":"error"}},"pool_up":{"allOf":[{"$ref":"#/components/schemas/pool"},{"type":"object","properties":{"nas_share_ids":{"type":"array","items":{"type":"integer"}},"cloud_bucket_ids":{"type":"array","items":{"type":"integer"}}}}]}},"requestBodies":{"pool_body":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/pool_up"}}},"required":true}}},"paths":{"/pools":{"post":{"summary":"Creates a new pool.","operationId":"create_pool","description":"**API Key Scope**: pools / create","tags":["pools"],"responses":{"201":{"$ref":"#/components/responses/pools_show"},"422":{"$ref":"#/components/responses/unprocessable_entity"}},"requestBody":{"$ref":"#/components/requestBodies/pool_body"}}}}}
```

## Displays a specific pool.

> \*\*API Key Scope\*\*: pools / show

```json
{"openapi":"3.0.1","info":{"title":"Nodeum API","version":"2.1.0"},"servers":[{"url":"{url}/api/v2","variables":{"url":{"default":"http://localhost","description":"URL of server"}}}],"security":[{"BasicAuth":[]},{"BearerAuth":[]},{"JWT":[]}],"components":{"securitySchemes":{"BasicAuth":{"type":"http","scheme":"basic","description":"Pass the username and password of a user in the authorization header.\nThis currently gives full access."},"BearerAuth":{"type":"apiKey","description":"Create an API Key associated to user.\nAccess can be restricted with the scope.\nEach API call described below has a scoped mentionned in its description.\n\nFor example :\n\n**API Key Scope**: files / index\n\nThis means that the API key should have a scope with controller as *files*\nand the action as *index*.","name":"Authorization","in":"header"},"JWT":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}},"responses":{"pools_show":{"description":"A specific pool.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/pool"}}}},"not_found":{"description":"The requested resource was not found. The detailed error will be of type `not_found`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/model_error"}}}}},"schemas":{"pool":{"type":"object","properties":{"id":{"type":"integer","readOnly":true},"name":{"type":"string"},"comment":{"type":"string"},"type":{"type":"string","enum":["active_archive","offline_archive","data_exchange","scratch","data_enrichment","primary"]},"content":{"type":"string","enum":["cloud","nas"]},"storage_id":{"type":"integer","description":"For pools, used to link to a storage id","format":"int64"}}},"model_error":{"type":"object","properties":{"details":{"type":"object","additionalProperties":{"type":"array","items":{"$ref":"#/components/schemas/attribute_error"}},"description":"Parsable objects describing the errors. The key is the invalid attribute name."},"messages":{"type":"array","description":"English description of the errors.","items":{"type":"string"}}}},"attribute_error":{"required":["error"],"type":"object","properties":{"error":{"type":"string"}},"discriminator":{"propertyName":"error"}}}},"paths":{"/pools/{pool_id}":{"get":{"summary":"Displays a specific pool.","operationId":"show_pool","description":"**API Key Scope**: pools / show","tags":["pools"],"responses":{"200":{"$ref":"#/components/responses/pools_show"},"404":{"$ref":"#/components/responses/not_found"}}}}}}
```

## Updates a specific pool.

> \*\*API Key Scope\*\*: pools / update

```json
{"openapi":"3.0.1","info":{"title":"Nodeum API","version":"2.1.0"},"servers":[{"url":"{url}/api/v2","variables":{"url":{"default":"http://localhost","description":"URL of server"}}}],"security":[{"BasicAuth":[]},{"BearerAuth":[]},{"JWT":[]}],"components":{"securitySchemes":{"BasicAuth":{"type":"http","scheme":"basic","description":"Pass the username and password of a user in the authorization header.\nThis currently gives full access."},"BearerAuth":{"type":"apiKey","description":"Create an API Key associated to user.\nAccess can be restricted with the scope.\nEach API call described below has a scoped mentionned in its description.\n\nFor example :\n\n**API Key Scope**: files / index\n\nThis means that the API key should have a scope with controller as *files*\nand the action as *index*.","name":"Authorization","in":"header"},"JWT":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}},"responses":{"pools_show":{"description":"A specific pool.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/pool"}}}},"unprocessable_entity":{"description":"The received resource was not correctly formatted.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/model_error"}}}}},"schemas":{"pool":{"type":"object","properties":{"id":{"type":"integer","readOnly":true},"name":{"type":"string"},"comment":{"type":"string"},"type":{"type":"string","enum":["active_archive","offline_archive","data_exchange","scratch","data_enrichment","primary"]},"content":{"type":"string","enum":["cloud","nas"]},"storage_id":{"type":"integer","description":"For pools, used to link to a storage id","format":"int64"}}},"model_error":{"type":"object","properties":{"details":{"type":"object","additionalProperties":{"type":"array","items":{"$ref":"#/components/schemas/attribute_error"}},"description":"Parsable objects describing the errors. The key is the invalid attribute name."},"messages":{"type":"array","description":"English description of the errors.","items":{"type":"string"}}}},"attribute_error":{"required":["error"],"type":"object","properties":{"error":{"type":"string"}},"discriminator":{"propertyName":"error"}},"pool_up":{"allOf":[{"$ref":"#/components/schemas/pool"},{"type":"object","properties":{"nas_share_ids":{"type":"array","items":{"type":"integer"}},"cloud_bucket_ids":{"type":"array","items":{"type":"integer"}}}}]}},"requestBodies":{"pool_body":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/pool_up"}}},"required":true}}},"paths":{"/pools/{pool_id}":{"put":{"summary":"Updates a specific pool.","operationId":"update_pool","description":"**API Key Scope**: pools / update","tags":["pools"],"responses":{"200":{"$ref":"#/components/responses/pools_show"},"422":{"$ref":"#/components/responses/unprocessable_entity"}},"requestBody":{"$ref":"#/components/requestBodies/pool_body"}}}}}
```

## Destroys a specific pool.

> \*\*API Key Scope\*\*: pools / destroy

```json
{"openapi":"3.0.1","info":{"title":"Nodeum API","version":"2.1.0"},"servers":[{"url":"{url}/api/v2","variables":{"url":{"default":"http://localhost","description":"URL of server"}}}],"security":[{"BasicAuth":[]},{"BearerAuth":[]},{"JWT":[]}],"components":{"securitySchemes":{"BasicAuth":{"type":"http","scheme":"basic","description":"Pass the username and password of a user in the authorization header.\nThis currently gives full access."},"BearerAuth":{"type":"apiKey","description":"Create an API Key associated to user.\nAccess can be restricted with the scope.\nEach API call described below has a scoped mentionned in its description.\n\nFor example :\n\n**API Key Scope**: files / index\n\nThis means that the API key should have a scope with controller as *files*\nand the action as *index*.","name":"Authorization","in":"header"},"JWT":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}}},"paths":{"/pools/{pool_id}":{"delete":{"summary":"Destroys a specific pool.","operationId":"destroy_pool","description":"**API Key Scope**: pools / destroy","tags":["pools"],"responses":{"204":{"description":"Pool destroyed."}}}}}}
```

## Displays the primary pool scan status.

> \*\*API Key Scope\*\*: primary\_scans / show

```json
{"openapi":"3.0.1","info":{"title":"Nodeum API","version":"2.1.0"},"servers":[{"url":"{url}/api/v2","variables":{"url":{"default":"http://localhost","description":"URL of server"}}}],"security":[{"BasicAuth":[]},{"BearerAuth":[]},{"JWT":[]}],"components":{"securitySchemes":{"BasicAuth":{"type":"http","scheme":"basic","description":"Pass the username and password of a user in the authorization header.\nThis currently gives full access."},"BearerAuth":{"type":"apiKey","description":"Create an API Key associated to user.\nAccess can be restricted with the scope.\nEach API call described below has a scoped mentionned in its description.\n\nFor example :\n\n**API Key Scope**: files / index\n\nThis means that the API key should have a scope with controller as *files*\nand the action as *index*.","name":"Authorization","in":"header"},"JWT":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}},"responses":{"primary_scan_show":{"description":"The primary pool scan status.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/primary_scan"}}}},"not_found":{"description":"The requested resource was not found. The detailed error will be of type `not_found`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/model_error"}}}}},"schemas":{"primary_scan":{"type":"object","properties":{"id":{"type":"integer","readOnly":true,"format":"int64"},"pool_id":{"type":"integer"},"enabled":{"type":"boolean"},"operand":{"type":"number"},"unit":{"type":"string","enum":["minutes","hours","days","weeks","months","years"]}}},"model_error":{"type":"object","properties":{"details":{"type":"object","additionalProperties":{"type":"array","items":{"$ref":"#/components/schemas/attribute_error"}},"description":"Parsable objects describing the errors. The key is the invalid attribute name."},"messages":{"type":"array","description":"English description of the errors.","items":{"type":"string"}}}},"attribute_error":{"required":["error"],"type":"object","properties":{"error":{"type":"string"}},"discriminator":{"propertyName":"error"}}}},"paths":{"/pools/{pool_id}/primary_scan":{"get":{"summary":"Displays the primary pool scan status.","operationId":"show_primary_scan","description":"**API Key Scope**: primary_scans / show","tags":["pools"],"responses":{"200":{"$ref":"#/components/responses/primary_scan_show"},"404":{"$ref":"#/components/responses/not_found"}}}}}}
```

## Set a new primary pool scan option.

> \*\*API Key Scope\*\*: primary\_scans / create

```json
{"openapi":"3.0.1","info":{"title":"Nodeum API","version":"2.1.0"},"servers":[{"url":"{url}/api/v2","variables":{"url":{"default":"http://localhost","description":"URL of server"}}}],"security":[{"BasicAuth":[]},{"BearerAuth":[]},{"JWT":[]}],"components":{"securitySchemes":{"BasicAuth":{"type":"http","scheme":"basic","description":"Pass the username and password of a user in the authorization header.\nThis currently gives full access."},"BearerAuth":{"type":"apiKey","description":"Create an API Key associated to user.\nAccess can be restricted with the scope.\nEach API call described below has a scoped mentionned in its description.\n\nFor example :\n\n**API Key Scope**: files / index\n\nThis means that the API key should have a scope with controller as *files*\nand the action as *index*.","name":"Authorization","in":"header"},"JWT":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}},"responses":{"primary_scan_show":{"description":"The primary pool scan status.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/primary_scan"}}}},"unprocessable_entity":{"description":"The received resource was not correctly formatted.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/model_error"}}}}},"schemas":{"primary_scan":{"type":"object","properties":{"id":{"type":"integer","readOnly":true,"format":"int64"},"pool_id":{"type":"integer"},"enabled":{"type":"boolean"},"operand":{"type":"number"},"unit":{"type":"string","enum":["minutes","hours","days","weeks","months","years"]}}},"model_error":{"type":"object","properties":{"details":{"type":"object","additionalProperties":{"type":"array","items":{"$ref":"#/components/schemas/attribute_error"}},"description":"Parsable objects describing the errors. The key is the invalid attribute name."},"messages":{"type":"array","description":"English description of the errors.","items":{"type":"string"}}}},"attribute_error":{"required":["error"],"type":"object","properties":{"error":{"type":"string"}},"discriminator":{"propertyName":"error"}}},"requestBodies":{"primary_scan_body":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/primary_scan"}}},"required":true}}},"paths":{"/pools/{pool_id}/primary_scan":{"post":{"summary":"Set a new primary pool scan option.","operationId":"create_primary_scan","description":"**API Key Scope**: primary_scans / create","tags":["pools"],"responses":{"201":{"$ref":"#/components/responses/primary_scan_show"},"422":{"$ref":"#/components/responses/unprocessable_entity"}},"requestBody":{"$ref":"#/components/requestBodies/primary_scan_body"}}}}}
```

## Updates the existing primary pool scan option.

> \*\*API Key Scope\*\*: primary\_scans / update

```json
{"openapi":"3.0.1","info":{"title":"Nodeum API","version":"2.1.0"},"servers":[{"url":"{url}/api/v2","variables":{"url":{"default":"http://localhost","description":"URL of server"}}}],"security":[{"BasicAuth":[]},{"BearerAuth":[]},{"JWT":[]}],"components":{"securitySchemes":{"BasicAuth":{"type":"http","scheme":"basic","description":"Pass the username and password of a user in the authorization header.\nThis currently gives full access."},"BearerAuth":{"type":"apiKey","description":"Create an API Key associated to user.\nAccess can be restricted with the scope.\nEach API call described below has a scoped mentionned in its description.\n\nFor example :\n\n**API Key Scope**: files / index\n\nThis means that the API key should have a scope with controller as *files*\nand the action as *index*.","name":"Authorization","in":"header"},"JWT":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}},"responses":{"primary_scan_show":{"description":"The primary pool scan status.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/primary_scan"}}}},"unprocessable_entity":{"description":"The received resource was not correctly formatted.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/model_error"}}}}},"schemas":{"primary_scan":{"type":"object","properties":{"id":{"type":"integer","readOnly":true,"format":"int64"},"pool_id":{"type":"integer"},"enabled":{"type":"boolean"},"operand":{"type":"number"},"unit":{"type":"string","enum":["minutes","hours","days","weeks","months","years"]}}},"model_error":{"type":"object","properties":{"details":{"type":"object","additionalProperties":{"type":"array","items":{"$ref":"#/components/schemas/attribute_error"}},"description":"Parsable objects describing the errors. The key is the invalid attribute name."},"messages":{"type":"array","description":"English description of the errors.","items":{"type":"string"}}}},"attribute_error":{"required":["error"],"type":"object","properties":{"error":{"type":"string"}},"discriminator":{"propertyName":"error"}}},"requestBodies":{"primary_scan_body":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/primary_scan"}}},"required":true}}},"paths":{"/pools/{pool_id}/primary_scan":{"put":{"summary":"Updates the existing primary pool scan option.","operationId":"update_primary_scan","description":"**API Key Scope**: primary_scans / update","tags":["pools"],"responses":{"200":{"$ref":"#/components/responses/primary_scan_show"},"422":{"$ref":"#/components/responses/unprocessable_entity"}},"requestBody":{"$ref":"#/components/requestBodies/primary_scan_body"}}}}}
```

## Disable the primary pool scan.

> \*\*API Key Scope\*\*: primary\_scans / destroy

```json
{"openapi":"3.0.1","info":{"title":"Nodeum API","version":"2.1.0"},"servers":[{"url":"{url}/api/v2","variables":{"url":{"default":"http://localhost","description":"URL of server"}}}],"security":[{"BasicAuth":[]},{"BearerAuth":[]},{"JWT":[]}],"components":{"securitySchemes":{"BasicAuth":{"type":"http","scheme":"basic","description":"Pass the username and password of a user in the authorization header.\nThis currently gives full access."},"BearerAuth":{"type":"apiKey","description":"Create an API Key associated to user.\nAccess can be restricted with the scope.\nEach API call described below has a scoped mentionned in its description.\n\nFor example :\n\n**API Key Scope**: files / index\n\nThis means that the API key should have a scope with controller as *files*\nand the action as *index*.","name":"Authorization","in":"header"},"JWT":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}}},"paths":{"/pools/{pool_id}/primary_scan":{"delete":{"summary":"Disable the primary pool scan.","operationId":"destroy_primary_scan","description":"**API Key Scope**: primary_scans / destroy","tags":["pools"],"responses":{"204":{"description":"Primary pool scan disabled."}}}}}}
```
