- Navigation GuideYou are on a Command (operation) page with structural examples. Use the navigation breadcrumb if you would like to return to the Client landing page.
DescribeActivitiesCommand
Describes the user activities in a specified time period.
Example Syntax
Use a bare-bones client and the command you need to make an API call.
import { WorkDocsClient, DescribeActivitiesCommand } from "@aws-sdk/client-workdocs"; // ES Modules import
// const { WorkDocsClient, DescribeActivitiesCommand } = require("@aws-sdk/client-workdocs"); // CommonJS import
const client = new WorkDocsClient(config);
const input = { // DescribeActivitiesRequest
AuthenticationToken: "STRING_VALUE",
StartTime: new Date("TIMESTAMP"),
EndTime: new Date("TIMESTAMP"),
OrganizationId: "STRING_VALUE",
ActivityTypes: "STRING_VALUE",
ResourceId: "STRING_VALUE",
UserId: "STRING_VALUE",
IncludeIndirectActivities: true || false,
Limit: Number("int"),
Marker: "STRING_VALUE",
};
const command = new DescribeActivitiesCommand(input);
const response = await client.send(command);
// { // DescribeActivitiesResponse
// UserActivities: [ // UserActivities
// { // Activity
// Type: "DOCUMENT_CHECKED_IN" || "DOCUMENT_CHECKED_OUT" || "DOCUMENT_RENAMED" || "DOCUMENT_VERSION_UPLOADED" || "DOCUMENT_VERSION_DELETED" || "DOCUMENT_VERSION_VIEWED" || "DOCUMENT_VERSION_DOWNLOADED" || "DOCUMENT_RECYCLED" || "DOCUMENT_RESTORED" || "DOCUMENT_REVERTED" || "DOCUMENT_SHARED" || "DOCUMENT_UNSHARED" || "DOCUMENT_SHARE_PERMISSION_CHANGED" || "DOCUMENT_SHAREABLE_LINK_CREATED" || "DOCUMENT_SHAREABLE_LINK_REMOVED" || "DOCUMENT_SHAREABLE_LINK_PERMISSION_CHANGED" || "DOCUMENT_MOVED" || "DOCUMENT_COMMENT_ADDED" || "DOCUMENT_COMMENT_DELETED" || "DOCUMENT_ANNOTATION_ADDED" || "DOCUMENT_ANNOTATION_DELETED" || "FOLDER_CREATED" || "FOLDER_DELETED" || "FOLDER_RENAMED" || "FOLDER_RECYCLED" || "FOLDER_RESTORED" || "FOLDER_SHARED" || "FOLDER_UNSHARED" || "FOLDER_SHARE_PERMISSION_CHANGED" || "FOLDER_SHAREABLE_LINK_CREATED" || "FOLDER_SHAREABLE_LINK_REMOVED" || "FOLDER_SHAREABLE_LINK_PERMISSION_CHANGED" || "FOLDER_MOVED",
// TimeStamp: new Date("TIMESTAMP"),
// IsIndirectActivity: true || false,
// OrganizationId: "STRING_VALUE",
// Initiator: { // UserMetadata
// Id: "STRING_VALUE",
// Username: "STRING_VALUE",
// GivenName: "STRING_VALUE",
// Surname: "STRING_VALUE",
// EmailAddress: "STRING_VALUE",
// },
// Participants: { // Participants
// Users: [ // UserMetadataList
// {
// Id: "STRING_VALUE",
// Username: "STRING_VALUE",
// GivenName: "STRING_VALUE",
// Surname: "STRING_VALUE",
// EmailAddress: "STRING_VALUE",
// },
// ],
// Groups: [ // GroupMetadataList
// { // GroupMetadata
// Id: "STRING_VALUE",
// Name: "STRING_VALUE",
// },
// ],
// },
// ResourceMetadata: { // ResourceMetadata
// Type: "FOLDER" || "DOCUMENT",
// Name: "STRING_VALUE",
// OriginalName: "STRING_VALUE",
// Id: "STRING_VALUE",
// VersionId: "STRING_VALUE",
// Owner: "<UserMetadata>",
// ParentId: "STRING_VALUE",
// },
// OriginalParent: {
// Type: "FOLDER" || "DOCUMENT",
// Name: "STRING_VALUE",
// OriginalName: "STRING_VALUE",
// Id: "STRING_VALUE",
// VersionId: "STRING_VALUE",
// Owner: "<UserMetadata>",
// ParentId: "STRING_VALUE",
// },
// CommentMetadata: { // CommentMetadata
// CommentId: "STRING_VALUE",
// Contributor: { // User
// Id: "STRING_VALUE",
// Username: "STRING_VALUE",
// EmailAddress: "STRING_VALUE",
// GivenName: "STRING_VALUE",
// Surname: "STRING_VALUE",
// OrganizationId: "STRING_VALUE",
// RootFolderId: "STRING_VALUE",
// RecycleBinFolderId: "STRING_VALUE",
// Status: "ACTIVE" || "INACTIVE" || "PENDING",
// Type: "USER" || "ADMIN" || "POWERUSER" || "MINIMALUSER" || "WORKSPACESUSER",
// CreatedTimestamp: new Date("TIMESTAMP"),
// ModifiedTimestamp: new Date("TIMESTAMP"),
// TimeZoneId: "STRING_VALUE",
// Locale: "en" || "fr" || "ko" || "de" || "es" || "ja" || "ru" || "zh_CN" || "zh_TW" || "pt_BR" || "default",
// Storage: { // UserStorageMetadata
// StorageUtilizedInBytes: Number("long"),
// StorageRule: { // StorageRuleType
// StorageAllocatedInBytes: Number("long"),
// StorageType: "UNLIMITED" || "QUOTA",
// },
// },
// },
// CreatedTimestamp: new Date("TIMESTAMP"),
// CommentStatus: "DRAFT" || "PUBLISHED" || "DELETED",
// RecipientId: "STRING_VALUE",
// ContributorId: "STRING_VALUE",
// },
// },
// ],
// Marker: "STRING_VALUE",
// };
DescribeActivitiesCommand Input
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
ActivityTypes | string | undefined | Specifies which activity types to include in the response. If this field is left empty, all activity types are returned. |
AuthenticationToken | string | undefined | Amazon WorkDocs authentication token. Not required when using Amazon Web Services administrator credentials to access the API. |
EndTime | Date | undefined | The timestamp that determines the end time of the activities. The response includes the activities performed before the specified timestamp. |
IncludeIndirectActivities | boolean | undefined | Includes indirect activities. An indirect activity results from a direct activity performed on a parent resource. For example, sharing a parent folder (the direct activity) shares all of the subfolders and documents within the parent folder (the indirect activity). |
Limit | number | undefined | The maximum number of items to return. |
Marker | string | undefined | The marker for the next set of results. |
OrganizationId | string | undefined | The ID of the organization. This is a mandatory parameter when using administrative API (SigV4) requests. |
ResourceId | string | undefined | The document or folder ID for which to describe activity types. |
StartTime | Date | undefined | The timestamp that determines the starting time of the activities. The response includes the activities performed after the specified timestamp. |
UserId | string | undefined | The ID of the user who performed the action. The response includes activities pertaining to this user. This is an optional parameter and is only applicable for administrative API (SigV4) requests. |
DescribeActivitiesCommand Output
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
$metadata Required | ResponseMetadata | Metadata pertaining to this request. |
Marker | string | undefined | The marker for the next set of results. |
UserActivities | Activity[] | undefined | The list of activities for the specified user and time period. |
Throws
Name | Fault | Details |
---|
Name | Fault | Details |
---|---|---|
FailedDependencyException | client | The Directory Service cannot reach an on-premises instance. Or a dependency under the control of the organization is failing, such as a connected Active Directory. |
InvalidArgumentException | client | The pagination marker or limit fields are not valid. |
ServiceUnavailableException | server | One or more of the dependencies is unavailable. |
UnauthorizedOperationException | client | The operation is not permitted. |
UnauthorizedResourceAccessException | client | The caller does not have access to perform the action on the resource. |
WorkDocsServiceException | Base exception class for all service exceptions from WorkDocs service. |