> For the complete documentation index, see [llms.txt](https://docs.coherent.global/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.coherent.global/spark-apis/spark-openapi-specification/folder-apis.md).

# Folder APIs

APIs for managing Spark folders.

## Create folder

> Folders contain Spark services.

```json
{"openapi":"3.1.0","info":{"title":"Spark OpenAPI specification","version":"0.1.0"},"tags":[{"name":"Folder APIs","description":"APIs for managing Spark folders."}],"servers":[{"url":"https://excel.{environment}.coherent.global","variables":{"environment":{"default":"myenvironmentname"}}}],"security":[{"bearerToken":[]}],"components":{"securitySchemes":{"bearerToken":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"Bearer token can be accessed from the user menu."}}},"paths":{"/api/v1/product/create":{"post":{"tags":["Folder APIs"],"summary":"Create folder","description":"Folders contain Spark services.","operationId":"postProductCreate","requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"Name":{"type":"string","description":"Folder name."},"Category":{"type":"string","description":"Folder category. Must be a valid folder category. The category names are managed in _Options_ _Folder categories_."},"Description":{"type":"string","description":"Folder description."},"Status":{"type":"string","default":"Design","description":"Status of the folder. `Design` is the default value."},"CoverImage":{"type":"string","format":"binary","description":"Image file for cover image."}},"required":["Name","Category","Description","Status"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}}}}}}}
```

## List folders

> Returns folders that match the search filter.\<br>\<br> If using an API key, the API key group must contain user groups that are also assigned to \`Spark.FolderList.json\` or \`Spark.AllEncompassingProxy.json\`.

```json
{"openapi":"3.1.0","info":{"title":"Spark OpenAPI specification","version":"0.1.0"},"tags":[{"name":"Folder APIs","description":"APIs for managing Spark folders."}],"servers":[{"url":"https://excel.{environment}.coherent.global","variables":{"environment":{"default":"myenvironmentname"}}}],"security":[{"bearerToken":[]},{"tenantName":[],"syntheticKey":[]}],"components":{"securitySchemes":{"bearerToken":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"Bearer token can be accessed from the user menu."},"tenantName":{"type":"apiKey","in":"header","name":"x-tenant-name","description":"Tenant name header required when using API key authentication."}}},"paths":{"/api/v1/product/list":{"post":{"tags":["Folder APIs"],"summary":"List folders","description":"Returns folders that match the search filter.<br><br> If using an API key, the API key group must contain user groups that are also assigned to `Spark.FolderList.json` or `Spark.AllEncompassingProxy.json`.","operationId":"postProductList","requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"page":{"type":"integer","minimum":1,"description":"Page number of the list to get."},"pageSize":{"type":"integer","minimum":1,"description":"Number of records per page."},"sort":{"type":["null","string"],"description":"String defining the sort order"},"search":{"type":["null","array"],"description":"Array of search filter objects.","items":{"type":"object","properties":{"field":{"type":["null","string"],"description":"Name of the field to filter."},"value":{"description":"Value of the `field` to filter for."},"operator":{"type":["null","string"],"description":"Operator for numeric properties."}}}}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}}}}}}}
```

## Get folder

> Get folder details.

```json
{"openapi":"3.1.0","info":{"title":"Spark OpenAPI specification","version":"0.1.0"},"tags":[{"name":"Folder APIs","description":"APIs for managing Spark folders."}],"servers":[{"url":"https://excel.{environment}.coherent.global","variables":{"environment":{"default":"myenvironmentname"}}}],"security":[{"bearerToken":[]}],"components":{"securitySchemes":{"bearerToken":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"Bearer token can be accessed from the user menu."}},"parameters":{"folder":{"name":"folder","in":"path","required":true,"description":"Folder associated with the API call.","schema":{"type":"string"}}}},"paths":{"/api/v1/product/getproduct/{folder}":{"get":{"tags":["Folder APIs"],"summary":"Get folder","description":"Get folder details.","operationId":"getProductGetProduct","parameters":[{"$ref":"#/components/parameters/folder"},{"name":"noOfCalculationEngines","in":"query","required":false,"description":"Number of services to include in the response.","schema":{"type":"integer","minimum":1}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}}}}}}}
```

## Update folder

> Update folder details including category or description.

```json
{"openapi":"3.1.0","info":{"title":"Spark OpenAPI specification","version":"0.1.0"},"tags":[{"name":"Folder APIs","description":"APIs for managing Spark folders."}],"servers":[{"url":"https://excel.{environment}.coherent.global","variables":{"environment":{"default":"myenvironmentname"}}}],"security":[{"bearerToken":[]}],"components":{"securitySchemes":{"bearerToken":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"Bearer token can be accessed from the user menu."}},"parameters":{"folderId":{"name":"folderId","in":"path","required":true,"description":"Folder `id` which can be found from List folders or Get folder.","schema":{"type":"string","format":"uuid"}}}},"paths":{"/api/v1/product/update/{folderId}":{"post":{"tags":["Folder APIs"],"summary":"Update folder","description":"Update folder details including category or description.","operationId":"postProductUpdate","parameters":[{"$ref":"#/components/parameters/folderId"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"category":{"type":"string","description":"Folder category. Must be a valid folder category. The category names are managed in _Options_ _Folder categories_."},"description":{"type":"string","description":"Folder description."},"shouldTrackUserAction":{"type":"boolean","default":true}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}}}}}}}
```

## Delete folder

> Delete folder including all documents and services.

```json
{"openapi":"3.1.0","info":{"title":"Spark OpenAPI specification","version":"0.1.0"},"tags":[{"name":"Folder APIs","description":"APIs for managing Spark folders."}],"servers":[{"url":"https://excel.{environment}.coherent.global","variables":{"environment":{"default":"myenvironmentname"}}}],"security":[{"bearerToken":[]}],"components":{"securitySchemes":{"bearerToken":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"Bearer token can be accessed from the user menu."}},"parameters":{"folderId":{"name":"folderId","in":"path","required":true,"description":"Folder `id` which can be found from List folders or Get folder.","schema":{"type":"string","format":"uuid"}}}},"paths":{"/api/v1/product/delete/{folderId}":{"delete":{"tags":["Folder APIs"],"summary":"Delete folder","description":"Delete folder including all documents and services.","operationId":"deleteProductDelete","parameters":[{"$ref":"#/components/parameters/folderId"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}}}}}}}
```
