Skip to main content

items

Creates, updates, deletes, gets or lists an items resource.

Overview

Nameitems
TypeResource
Idsumologic.content.items

Fields

The following fields are returned by SELECT queries:

Content item corresponding to the given path.

NameDatatypeDescription
idstringIdentifier of the content item. (example: 000000000C1C17C6)
namestringThe name of the content item. (example: Personal)
parent_idstringIdentifier of the parent content item. (example: 0000000001C41EF2) (wire: parentId)
created_atstring (date-time)Creation timestamp in UTC in [RFC3339](https:​//tools.ietf.org/html/rfc3339) format. (example: 2018-10-16T09:10:00.000Z) (wire: createdAt)
created_bystringIdentifier of the user who created the resource. (example: 0000000006743FDD) (wire: createdBy)
descriptionstringDescription of the content item. (example: Personal folder for John Doe)
is_scheduledbooleanIndicates whether the content item refers to scheduled search. This field is only relevant to Search content type. (wire: isScheduled)
item_typestringType 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) (wire: itemType)
modified_atstring (date-time)Last modification timestamp in UTC. (example: 2018-10-16T09:10:00.000Z) (wire: modifiedAt)
modified_bystringIdentifier of the user who last modified the resource. (example: 0000000006743FE8) (wire: modifiedBy)
permissionsarrayList of permissions the user has on the content item.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_by_pathselectpath, regionGet a content item corresponding to the given path.<br /><br />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:<br /> bash&lt;br /&gt; curl https:​//api.sumologic.com/api/v2/content/path?path=/Library/Users/user%40sumo.com/Acme%20Corp&lt;br /&gt; <br /><br /><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.<br /><br />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.
moveexecdestinationFolderId, id, regionisAdminModeMoves an item from its current location to another folder.<br />

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.

NameDatatypeDescription
destinationFolderIdstringIdentifier of the destination folder.
idstringIdentifier of the item the user wants to move.
pathstringPath of the content item to retrieve. (example: /Library/Users/user@sumo.com/SampleFolder)
regionstringSumo Logic deployment (au, ca, ch, de, eu, fed, in, jp, kr, us1, us2). Resolved from the SUMOLOGIC_ENVIRONMENT environment variable when it is set (x-stackQL-envVar, the same variable the Terraform provider reads); otherwise defaults to us2. A WHERE region = '...' value always takes precedence. (enum: [au, ca, ch, de, eu, fed, in, jp, kr, us1, us2], default: us2, x-stackQL-envVar: SUMOLOGIC_ENVIRONMENT)
isAdminModestringSet this to "true" if you want to perform the request as a Content Administrator.

SELECT examples

Get a content item corresponding to the given path.<br /><br />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:<br /> bash&lt;br /&gt; curl https:​//api.sumologic.com/api/v2/content/path?path=/Library/Users/user%40sumo.com/Acme%20Corp&lt;br /&gt; <br /><br /><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.<br /><br />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,
parent_id,
created_at,
created_by,
description,
is_scheduled,
item_type,
modified_at,
modified_by,
permissions
FROM sumologic.content.items
WHERE path = '{{ path }}' -- required
AND region = '{{ region }}' -- required unless SUMOLOGIC_ENVIRONMENT is set
;

Lifecycle Methods

EXEC variables use wire (API) names.

Moves an item from its current location to another folder.<br />

EXEC sumologic.content.items.move
@destinationFolderId='{{ destinationFolderId }}' --required,
@id='{{ id }}' --required,
@region='{{ region }}' --required unless SUMOLOGIC_ENVIRONMENT is set,
@isAdminMode='{{ isAdminMode }}'
;