[GET] Get Workspaces⚓︎
Use this request to obtain all the Workspaces available in your tenant.
Use cases for this request include:
- Creating advanced UIs and Views around the selection of workspaces, such as the Tasks Inbox screen;
- Selecting a workspace ID for future requests, based on the information of your available workspaces.
Workspaces⚓︎
GET/api/v1.0/external/sdworkspace/CurrentWorkspaces
Example Request⚓︎
curl --location 'https://cloud.smartdocumentor.net/api/v1.0/external/sdworkspace/CurrentWorkspaces' --header 'Authorization: Bearer {your access token here}'
var client = new HttpClient();
var accessToken = "your access token here";
var request = new HttpRequestMessage(HttpMethod.Get, "https://cloud.smartdocumentor.net/api/v1.0/external/sdworkspace/CurrentWorkspaces");
request.Headers.Add("Authorization", $"Bearer {accessToken}");
var response = await client.SendAsync(request);
response.EnsureSuccessStatusCode();
Console.WriteLine(await response.Content.ReadAsStringAsync());
import requests
url = "https://cloud.smartdocumentor.net/api/v1.0/external/sdworkspace/CurrentWorkspaces"
access_token = "your access token here"
payload = {}
headers = {
'Authorization': f'Bearer {access_token}'
}
response = requests.request("GET", url, headers=headers, data=payload)
print(response.text)
const myHeaders = new Headers();
const accessToken = "your access token here";
myHeaders.append("Authorization", `Bearer ${accessToken}`);
const requestOptions = {
method: 'GET',
headers: myHeaders,
redirect: 'follow'
};
fetch("https://cloud.smartdocumentor.net/api/v1.0/external/sdworkspace/CurrentWorkspaces", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));
Responses⚓︎
[
{
"workspaceId": 10,
"tenantId": 10,
"workspaceName": "workspaceName",
"workspaceDescription": "workspaceDescription",
"isDefault": true,
"taskType": 10,
"workspaceType": 10,
"templateType": 10,
"workspaceTemplateName": "workspaceTemplateName"
}
]
Response Body GetWorkspaceResponse[]
| Name | Type | Description |
|---|---|---|
workspaceId | integer | The ID of the workspace this task belongs to. |
tenantId | integer | The ID of your Organization in our system. |
workspaceName | string | The display name of this Workspace. |
workspaceDescription | string (optional) | The optional description of this Workspace. |
isDefault | boolean | true if this is the default workspace in your Organization, false if otherwise. |
taskType | TaskType | The task type processed by this Workspace. |
workspaceType | WorkspaceType | The type of workspace. |
templateType | TemplateType | The type of template used to create this workspace. |
workspaceTemplateName | string (optional) | The name of the template used to create this workspace. May not be available for some tasks, use templateType as a fallback. |
Response body has no content.
Info
Note
Returned when a startDate or endDate are not specified.