> For the complete documentation index, see [llms.txt](https://docs.pentaho.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.pentaho.com/rest-api/file-management-apis-session-resource.md).

# File Management APIs Session Resource

This service provides session-related operations for workspace management.

## Get user workspace directory

> Returns the current user's workspace folder path.\
> \
> \*\*Example Request:\*\*\
> \`\`\`\
> GET pentaho/api/session/userWorkspaceDir\
> \`\`\`\
> \
> \*\*cURL Example:\*\*\
> \`\`\`bash\
> curl -X GET \\\
> &#x20; "<http://localhost:8080/pentaho/api/session/userWorkspaceDir>" \\\
> &#x20; -H "Authorization: Basic YWRtaW46cGFzc3dvcmQ="\
> \`\`\`<br>

````json
{"openapi":"3.0.3","info":{"title":"Pentaho Data Integration and Analytics","version":"0.0.1"},"tags":[{"name":"File Management APIs - Session Resource","description":"This service provides session-related operations for workspace management."}],"security":[{"basicAuth":[]}],"components":{"securitySchemes":{"basicAuth":{"type":"http","scheme":"basic","description":"HTTP Basic Authentication"}}},"paths":{"/session/userWorkspaceDir":{"get":{"tags":["File Management APIs - Session Resource"],"summary":"Get user workspace directory","produces":["text/plain"],"description":"Returns the current user's workspace folder path.\n\n**Example Request:**\n```\nGET pentaho/api/session/userWorkspaceDir\n```\n\n**cURL Example:**\n```bash\ncurl -X GET \\\n  \"http://localhost:8080/pentaho/api/session/userWorkspaceDir\" \\\n  -H \"Authorization: Basic YWRtaW46cGFzc3dvcmQ=\"\n```\n","responses":{"200":{"description":"Returns the requested file path","content":{"text/plain":{"schema":{"type":"string","description":"String object containing the workspace folder path"}}}}}}}}}
````

## Get workspace directory for specific user

> Returns the workspace folder path for the selected user.\
> \
> \*\*Example Request:\*\*\
> \`\`\`\
> GET pentaho/api/session/workspaceDirForUser/admin\
> \`\`\`\
> \
> \*\*cURL Example:\*\*\
> \`\`\`bash\
> curl -X GET \\\
> &#x20; "<http://localhost:8080/pentaho/api/session/workspaceDirForUser/admin>" \\\
> &#x20; -H "Authorization: Basic YWRtaW46cGFzc3dvcmQ="\
> \`\`\`<br>

````json
{"openapi":"3.0.3","info":{"title":"Pentaho Data Integration and Analytics","version":"0.0.1"},"tags":[{"name":"File Management APIs - Session Resource","description":"This service provides session-related operations for workspace management."}],"security":[{"basicAuth":[]}],"components":{"securitySchemes":{"basicAuth":{"type":"http","scheme":"basic","description":"HTTP Basic Authentication"}}},"paths":{"/session/workspaceDirForUser/{user}":{"get":{"tags":["File Management APIs - Session Resource"],"summary":"Get workspace directory for specific user","produces":["text/plain"],"description":"Returns the workspace folder path for the selected user.\n\n**Example Request:**\n```\nGET pentaho/api/session/workspaceDirForUser/admin\n```\n\n**cURL Example:**\n```bash\ncurl -X GET \\\n  \"http://localhost:8080/pentaho/api/session/workspaceDirForUser/admin\" \\\n  -H \"Authorization: Basic YWRtaW46cGFzc3dvcmQ=\"\n```\n","parameters":[{"name":"user","in":"path","required":true,"description":"String of the user name","schema":{"type":"string"}}],"responses":{"200":{"description":"Returns the workspace file path for the specified user","content":{"text/plain":{"schema":{"type":"string","description":"String object containing the workspace folder path"}}}},"500":{"description":"File path failed to be retrieved. This could be caused by an invalid user request"}}}}}}
````


---

# 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.pentaho.com/rest-api/file-management-apis-session-resource.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.
