folders
Creates, updates, deletes, gets or lists a folders
resource.
Overview
Name | folders |
Type | Resource |
Id | sumologic.content.folders |
Fields
The following fields are returned by SELECT
queries:
- getFolder
Folder that was requested.
Name | Datatype | Description |
---|---|---|
id | string | Identifier of the content item. (example: 000000000C1C17C6) |
name | string | The name of the content item. (example: Personal) |
children | array | A list of the content items. |
createdAt | string (date-time) | Creation timestamp in UTC in RFC3339 format. (example: 2018-10-16T09:10:00Z) |
createdBy | string | Identifier of the user who created the resource. (example: 0000000006743FDD) |
description | string | The description of the folder. (example: This is a sample folder.) |
itemType | string | Type of the content item. Supported values are: 1. Folder 2. Search 3. Report (for old dashboards) 4. Dashboard (for new dashboards) 5. Lookups (example: Folder) |
modifiedAt | string (date-time) | Last modification timestamp in UTC. (example: 2018-10-16T09:10:00Z) |
modifiedBy | string | Identifier of the user who last modified the resource. (example: 0000000006743FE8) |
parentId | string | Identifier of the parent content item. (example: 0000000001C41EF2) |
permissions | array | List of permissions the user has on the content item. |
Methods
The following methods are available for this resource:
Name | Accessible by | Required Params | Optional Params | Description |
---|---|---|---|---|
getFolder | select | id , region | isAdminMode | Get a folder with the given identifier. Set the header parameter isAdminMode to "true" if fetching a folder inside "Admin Recommended" folder. |
createFolder | insert | region , data__name , data__parentId | isAdminMode | Creates a new folder under the given parent folder. Set the header parameter isAdminMode to "true" to create a folder inside "Admin Recommended" folder. |
updateFolder | exec | id , region , name | isAdminMode | Update an existing folder with the given identifier. Set the header parameter isAdminMode to "true" if updating a folder inside "Admin Recommended" folder. |
Parameters
Parameters can be passed in the WHERE
clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
Name | Datatype | Description |
---|---|---|
id | string | Identifier of the folder to update. |
region | string | SumoLogic region (enum: [us2, au, ca, de, eu, fed, in, jp], default: us2) |
isAdminMode | string | Set this to "true" if you want to perform the request as a Content Administrator. |
SELECT
examples
- getFolder
Get a folder with the given identifier. Set the header parameter isAdminMode
to "true"
if fetching a folder inside "Admin Recommended" folder.
SELECT
id,
name,
children,
createdAt,
createdBy,
description,
itemType,
modifiedAt,
modifiedBy,
parentId,
permissions
FROM sumologic.content.folders
WHERE id = '{{ id }}' -- required
AND region = '{{ region }}' -- required
AND isAdminMode = '{{ isAdminMode }}'
;
INSERT
examples
- createFolder
- Manifest
Creates a new folder under the given parent folder. Set the header parameter isAdminMode
to "true"
to create a folder inside "Admin Recommended" folder.
INSERT INTO sumologic.content.folders (
data__name,
data__description,
data__parentId,
region,
isAdminMode
)
SELECT
'{{ name }}' /* required */,
'{{ description }}',
'{{ parentId }}' /* required */,
'{{ region }}',
'{{ isAdminMode }}'
RETURNING
id,
name,
children,
createdAt,
createdBy,
description,
itemType,
modifiedAt,
modifiedBy,
parentId,
permissions
;
# Description fields are for documentation purposes
- name: folders
props:
- name: region
value: string
description: Required parameter for the folders resource.
- name: name
value: string
description: |
The name of the folder.
- name: description
value: string
description: |
The description of the folder.
- name: parentId
value: string
description: |
The identifier of the parent folder.
- name: isAdminMode
value: string
description: Set this to "true" if you want to perform the request as a Content Administrator.
Lifecycle Methods
- updateFolder
Update an existing folder with the given identifier. Set the header parameter isAdminMode
to "true"
if updating a folder inside "Admin Recommended" folder.
EXEC sumologic.content.folders.updateFolder
@id='{{ id }}' --required,
@region='{{ region }}' --required,
@isAdminMode='{{ isAdminMode }}'
@@json=
'{
"name": "{{ name }}",
"description": "{{ description }}"
}'
;