# 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"}}}}}}}}}
```


---

# 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.coherent.global/spark-apis/spark-openapi-specification/folder-apis.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.
