path
Creates, updates, deletes, gets or lists a path
resource.
Overview
Name | path |
Type | Resource |
Id | sumologic.content.path |
Fields
The following fields are returned by SELECT
queries:
- getPathById
- getItemByPath
Full path of the content item.
Name | Datatype | Description |
---|---|---|
path | string | Path of the content item. (example: /Library/Users/user@test.com/SampleFolder) |
Content item corresponding to the given path.
Name | Datatype | Description |
---|---|---|
id | string | Identifier of the content item. (example: 000000000C1C17C6) |
name | string | The name of the content item. (example: Personal) |
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) |
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 |
---|---|---|---|---|
getPathById | select | contentId , region | Get full path of a content item with the given identifier. | |
getItemByPath | select | path , region | Get a content item corresponding to the given path. Path is specified in the required query parameter path . The path should be URL encoded. For example, to get "Acme Corp" folder of a user "user@sumo.com" you can use the following curl command:bash<br /> curl https://api.sumologic.com/api/v2/content/path?path=/Library/Users/user%40sumo.com/Acme%20Corp<br /> The absolute path to a content item should be specified to get the item. The content library has "Library" folder at the root level. For items in "Personal" folder, the base path is "/Library/Users/user@sumo.com" where "user@sumo.com" is the email address of the user. For example if a user with email address wile@acme.com has Rockets folder inside Personal folder, the path of Rockets folder will be /Library/Users/wile@acme.com/Rockets .For items in "Admin Recommended" folder, the base path is "/Library/Admin Recommended". For example, given a folder Acme in Admin Recommended folder, the path will be /Library/Admin Recommended/Acme . |
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 |
---|---|---|
contentId | string | Identifier of the content item to get the path. |
path | string | Path of the content item to retrieve. (example: /Library/Users/user@sumo.com/SampleFolder) |
region | string | SumoLogic region (enum: [us2, au, ca, de, eu, fed, in, jp], default: us2) |
SELECT
examples
- getPathById
- getItemByPath
Get full path of a content item with the given identifier.
SELECT
path
FROM sumologic.content.path
WHERE contentId = '{{ contentId }}' -- required
AND region = '{{ region }}' -- required
;
Get a content item corresponding to the given path.
Path is specified in the required query parameter path
. The path should be URL encoded. For example, to get "Acme Corp" folder of a user "user@sumo.com" you can use the following curl command:
bash<br /> curl https://api.sumologic.com/api/v2/content/path?path=/Library/Users/user%40sumo.com/Acme%20Corp<br />
The absolute path to a content item should be specified to get the item. The content library has "Library" folder at the root level. For items in "Personal" folder, the base path is "/Library/Users/user@sumo.com" where "user@sumo.com" is the email address of the user. For example if a user with email address wile@acme.com
has Rockets
folder inside Personal folder, the path of Rockets folder will be /Library/Users/wile@acme.com/Rockets
.
For items in "Admin Recommended" folder, the base path is "/Library/Admin Recommended". For example, given a folder Acme
in Admin Recommended folder, the path will be /Library/Admin Recommended/Acme
.
SELECT
id,
name,
createdAt,
createdBy,
itemType,
modifiedAt,
modifiedBy,
parentId,
permissions
FROM sumologic.content.path
WHERE path = '{{ path }}' -- required
AND region = '{{ region }}' -- required
;