CreateNotificationSubscription
Configure Amazon WorkDocs to use Amazon SNS notifications. The endpoint receives a confirmation message, and must confirm the subscription.
For more information, see Subscribe to Notifications in the Amazon WorkDocs Developer Guide.
Request Syntax
POST /api/v1/organizations/OrganizationId/subscriptions HTTP/1.1 Content-type: application/json
{ "Endpoint": "string", "Protocol": "string",
"SubscriptionType": "string"
}
URI Request Parameters
The request uses the following URI parameters.
OrganizationId (p. 25) The ID of the organization.
Length Constraints: Minimum length of 1. Maximum length of 256.
Pattern: [&\w+-.@]+
Required: Yes
Request Body
The request accepts the following data in JSON format.
Endpoint (p. 25)
The endpoint to receive the notifications. If the protocol is HTTPS, the endpoint is a URL that begins with https.
Type: String
Length Constraints: Minimum length of 1. Maximum length of 256.
Required: Yes Protocol (p. 25)
The protocol to use. The supported value is https, which delivers JSON-encoded messages using HTTPS POST.
Type: String
Valid Values: HTTPS
Response Syntax
Required: Yes SubscriptionType (p. 25)
The notification type.
Type: String Valid Values: ALL Required: Yes
Response Syntax
HTTP/1.1 200
Content-type: application/json { "Subscription": {
"EndPoint": "string", "Protocol": "string", "SubscriptionId": "string"
}}
Response Elements
If the action is successful, the service sends back an HTTP 200 response.
The following data is returned in JSON format by the service.
Subscription (p. 26) The subscription.
Type: Subscription (p. 154) object
Errors
For information about the errors that are common to all actions, see Common Errors (p. 164).
ServiceUnavailableException
One or more of the dependencies is unavailable.
HTTP Status Code: 503 TooManySubscriptionsException
You've reached the limit on the number of subscriptions for the WorkDocs instance.
HTTP Status Code: 429
UnauthorizedResourceAccessException
The caller does not have access to perform the action on the resource.
HTTP Status Code: 404
See Also
See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following:
• AWS Command Line Interface
• AWS SDK for .NET
• AWS SDK for C++
• AWS SDK for Go
• AWS SDK for Java V2
• AWS SDK for JavaScript
• AWS SDK for PHP V3
• AWS SDK for Python
• AWS SDK for Ruby V3
CreateUser
CreateUser
Creates a user in a Simple AD or Microsoft AD directory. The status of a newly created user is "ACTIVE".
New users can access Amazon WorkDocs.
Request Syntax
POST /api/v1/users HTTP/1.1
Authentication: AuthenticationToken Content-type: application/json {
"EmailAddress": "string", "GivenName": "string", "OrganizationId": "string", "Password": "string", "StorageRule": {
"StorageAllocatedInBytes": number, "StorageType": "string"
},
"Surname": "string", "TimeZoneId": "string", "Username": "string"
}
URI Request Parameters
The request uses the following URI parameters.
AuthenticationToken (p. 28)
Amazon WorkDocs authentication token. Not required when using AWS administrator credentials to access the API.
Length Constraints: Minimum length of 1. Maximum length of 8199.
Request Body
The request accepts the following data in JSON format.
EmailAddress (p. 28)
The email address of the user.
Type: String
Length Constraints: Minimum length of 1. Maximum length of 256.
Pattern: [a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}
Required: No GivenName (p. 28)
The given name of the user.
Type: String
Request Body
Length Constraints: Minimum length of 1. Maximum length of 64.
Required: Yes OrganizationId (p. 28)
The ID of the organization.
Type: String
Length Constraints: Minimum length of 1. Maximum length of 256.
Pattern: [&\w+-.@]+
Required: No Password (p. 28)
The password of the user.
Type: String
Length Constraints: Minimum length of 4. Maximum length of 32.
Pattern: [\u0020-\u00FF]+
Required: Yes StorageRule (p. 28)
The amount of storage for the user.
Type: StorageRuleType (p. 153) object Required: No
Surname (p. 28)
The surname of the user.
Type: String
Length Constraints: Minimum length of 1. Maximum length of 64.
Required: Yes TimeZoneId (p. 28)
The time zone ID of the user.
Type: String
Length Constraints: Minimum length of 1. Maximum length of 256.
Required: No Username (p. 28)
The login name of the user.
Type: String
Length Constraints: Minimum length of 1. Maximum length of 256.
Pattern: [\w\-+.]+(@[a-zA-Z0-9.\-]+\.[a-zA-Z]+)?
Required: Yes
Response Syntax
Response Syntax
HTTP/1.1 201
Content-type: application/json { "User": {
"CreatedTimestamp": number, "EmailAddress": "string", "GivenName": "string", "Id": "string", "Locale": "string",
"ModifiedTimestamp": number, "OrganizationId": "string", "RecycleBinFolderId": "string", "RootFolderId": "string", "Status": "string", "TimeZoneId": "string", "Type": "string", "Username": "string"
} }
Response Elements
If the action is successful, the service sends back an HTTP 201 response.
The following data is returned in JSON format by the service.
User (p. 30)
The user information.
Type: User (p. 156) object
Errors
For information about the errors that are common to all actions, see Common Errors (p. 164).
EntityAlreadyExistsException The resource already exists.
HTTP Status Code: 409 FailedDependencyException
The AWS 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.
HTTP Status Code: 424
See Also
ServiceUnavailableException
One or more of the dependencies is unavailable.
HTTP Status Code: 503 UnauthorizedOperationException
The operation is not permitted.
HTTP Status Code: 403
UnauthorizedResourceAccessException
The caller does not have access to perform the action on the resource.
HTTP Status Code: 404
See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following:
• AWS Command Line Interface
• AWS SDK for .NET
• AWS SDK for C++
• AWS SDK for Go
• AWS SDK for Java V2
• AWS SDK for JavaScript
• AWS SDK for PHP V3
• AWS SDK for Python
• AWS SDK for Ruby V3
DeactivateUser
DeactivateUser
Deactivates the specified user, which revokes the user's access to Amazon WorkDocs.
Request Syntax
DELETE /api/v1/users/UserId/activation HTTP/1.1 Authentication: AuthenticationToken
URI Request Parameters
The request uses the following URI parameters.
AuthenticationToken (p. 32)
Amazon WorkDocs authentication token. Not required when using AWS administrator credentials to access the API.
Length Constraints: Minimum length of 1. Maximum length of 8199.
UserId (p. 32)
The ID of the user.
Length Constraints: Minimum length of 1. Maximum length of 256.
Pattern: [&\w+-.@]+
Required: Yes
Request Body
The request does not have a request body.
Response Syntax
HTTP/1.1 204
Response Elements
If the action is successful, the service sends back an HTTP 204 response with an empty HTTP body.
Errors
For information about the errors that are common to all actions, see Common Errors (p. 164).
EntityNotExistsException The resource does not exist.
HTTP Status Code: 404
See Also
FailedDependencyException
The AWS 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.
HTTP Status Code: 424 ServiceUnavailableException
One or more of the dependencies is unavailable.
HTTP Status Code: 503 UnauthorizedOperationException
The operation is not permitted.
HTTP Status Code: 403
UnauthorizedResourceAccessException
The caller does not have access to perform the action on the resource.
HTTP Status Code: 404
See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following:
• AWS Command Line Interface
• AWS SDK for .NET
• AWS SDK for C++
• AWS SDK for Go
• AWS SDK for Java V2
• AWS SDK for JavaScript
• AWS SDK for PHP V3
• AWS SDK for Python
• AWS SDK for Ruby V3
DeleteComment
DeleteComment
Deletes the specified comment from the document version.
Request Syntax
DELETE /api/v1/documents/DocumentId/versions/VersionId/comment/CommentId HTTP/1.1 Authentication: AuthenticationToken
URI Request Parameters
The request uses the following URI parameters.
AuthenticationToken (p. 34)
Amazon WorkDocs authentication token. Not required when using AWS administrator credentials to access the API.
Length Constraints: Minimum length of 1. Maximum length of 8199.
CommentId (p. 34)
The ID of the comment.
Length Constraints: Minimum length of 1. Maximum length of 128.
Pattern: [\w+-.@]+
Required: Yes DocumentId (p. 34)
The ID of the document.
Length Constraints: Minimum length of 1. Maximum length of 128.
Pattern: [\w+-.@]+
Required: Yes VersionId (p. 34)
The ID of the document version.
Length Constraints: Minimum length of 1. Maximum length of 128.
Pattern: [\w+-.@]+
Required: Yes
Request Body
The request does not have a request body.
Response Syntax
HTTP/1.1 204
Response Elements
Response Elements
If the action is successful, the service sends back an HTTP 204 response with an empty HTTP body.
Errors
For information about the errors that are common to all actions, see Common Errors (p. 164).
DocumentLockedForCommentsException
This exception is thrown when the document is locked for comments and user tries to create or delete a comment on that document.
HTTP Status Code: 409 EntityNotExistsException
The resource does not exist.
HTTP Status Code: 404 FailedDependencyException
The AWS 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.
HTTP Status Code: 424 ProhibitedStateException
The specified document version is not in the INITIALIZED state.
HTTP Status Code: 409 ServiceUnavailableException
One or more of the dependencies is unavailable.
HTTP Status Code: 503 UnauthorizedOperationException
The operation is not permitted.
HTTP Status Code: 403
UnauthorizedResourceAccessException
The caller does not have access to perform the action on the resource.
HTTP Status Code: 404
See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following:
• AWS Command Line Interface
• AWS SDK for .NET
• AWS SDK for C++
• AWS SDK for Go
• AWS SDK for Java V2
See Also
• AWS SDK for JavaScript
• AWS SDK for PHP V3
• AWS SDK for Python
• AWS SDK for Ruby V3
DeleteCustomMetadata
DeleteCustomMetadata
Deletes custom metadata from the specified resource.
Request Syntax
DELETE /api/v1/resources/ResourceId/customMetadata?
deleteAll=DeleteAll&keys=Keys&versionId=VersionId HTTP/1.1 Authentication: AuthenticationToken
URI Request Parameters
The request uses the following URI parameters.
AuthenticationToken (p. 37)
Amazon WorkDocs authentication token. Not required when using AWS administrator credentials to access the API.
Length Constraints: Minimum length of 1. Maximum length of 8199.
DeleteAll (p. 37)
Flag to indicate removal of all custom metadata properties from the specified resource.
Keys (p. 37)
List of properties to remove.
Array Members: Maximum number of 8 items.
Length Constraints: Minimum length of 1. Maximum length of 56.
Pattern: [a-zA-Z0-9._+-/=][a-zA-Z0-9 ._+-/=]*
ResourceId (p. 37)
The ID of the resource, either a document or folder.
Length Constraints: Minimum length of 1. Maximum length of 128.
Pattern: [\w+-.@]+
Required: Yes VersionId (p. 37)
The ID of the version, if the custom metadata is being deleted from a document version.
Length Constraints: Minimum length of 1. Maximum length of 128.
Pattern: [\w+-.@]+
Request Body
The request does not have a request body.
Response Syntax
Response Syntax
HTTP/1.1 200
Response Elements
If the action is successful, the service sends back an HTTP 200 response with an empty HTTP body.
Errors
For information about the errors that are common to all actions, see Common Errors (p. 164).
EntityNotExistsException The resource does not exist.
HTTP Status Code: 404 FailedDependencyException
The AWS 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.
HTTP Status Code: 424 ProhibitedStateException
The specified document version is not in the INITIALIZED state.
HTTP Status Code: 409 ServiceUnavailableException
One or more of the dependencies is unavailable.
HTTP Status Code: 503 UnauthorizedOperationException
The operation is not permitted.
HTTP Status Code: 403
UnauthorizedResourceAccessException
The caller does not have access to perform the action on the resource.
HTTP Status Code: 404
See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following:
• AWS Command Line Interface
• AWS SDK for .NET
• AWS SDK for C++
• AWS SDK for Go
• AWS SDK for Java V2
See Also
• AWS SDK for JavaScript
• AWS SDK for PHP V3
• AWS SDK for Python
• AWS SDK for Ruby V3
DeleteDocument
DeleteDocument
Permanently deletes the specified document and its associated metadata.
Request Syntax
DELETE /api/v1/documents/DocumentId HTTP/1.1 Authentication: AuthenticationToken
URI Request Parameters
The request uses the following URI parameters.
AuthenticationToken (p. 40)
Amazon WorkDocs authentication token. Not required when using AWS administrator credentials to access the API.
Length Constraints: Minimum length of 1. Maximum length of 8199.
DocumentId (p. 40)
The ID of the document.
Length Constraints: Minimum length of 1. Maximum length of 128.
Pattern: [\w+-.@]+
Required: Yes
Request Body
The request does not have a request body.
Response Syntax
HTTP/1.1 204
Response Elements
If the action is successful, the service sends back an HTTP 204 response with an empty HTTP body.
Errors
For information about the errors that are common to all actions, see Common Errors (p. 164).
ConcurrentModificationException The resource hierarchy is changing.
HTTP Status Code: 409
See Also
ConflictingOperationException
Another operation is in progress on the resource that conflicts with the current operation.
HTTP Status Code: 409 EntityNotExistsException
The resource does not exist.
HTTP Status Code: 404 FailedDependencyException
The AWS 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.
HTTP Status Code: 424 ProhibitedStateException
The specified document version is not in the INITIALIZED state.
HTTP Status Code: 409 ServiceUnavailableException
One or more of the dependencies is unavailable.
HTTP Status Code: 503 UnauthorizedOperationException
The operation is not permitted.
HTTP Status Code: 403
UnauthorizedResourceAccessException
The caller does not have access to perform the action on the resource.
HTTP Status Code: 404
See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following:
• AWS Command Line Interface
• AWS SDK for .NET
• AWS SDK for C++
• AWS SDK for Go
• AWS SDK for Java V2
• AWS SDK for JavaScript
• AWS SDK for PHP V3
• AWS SDK for Python
• AWS SDK for Ruby V3
DeleteFolder
DeleteFolder
Permanently deletes the specified folder and its contents.
Request Syntax
DELETE /api/v1/folders/FolderId HTTP/1.1 Authentication: AuthenticationToken
URI Request Parameters
The request uses the following URI parameters.
AuthenticationToken (p. 42)
Amazon WorkDocs authentication token. Not required when using AWS administrator credentials to access the API.
Length Constraints: Minimum length of 1. Maximum length of 8199.
FolderId (p. 42)
The ID of the folder.
Length Constraints: Minimum length of 1. Maximum length of 128.
Pattern: [\w+-.@]+
Required: Yes
Request Body
The request does not have a request body.
Response Syntax
HTTP/1.1 204
Response Elements
If the action is successful, the service sends back an HTTP 204 response with an empty HTTP body.
Errors
For information about the errors that are common to all actions, see Common Errors (p. 164).
ConcurrentModificationException The resource hierarchy is changing.
HTTP Status Code: 409
See Also
ConflictingOperationException
Another operation is in progress on the resource that conflicts with the current operation.
HTTP Status Code: 409 EntityNotExistsException
The resource does not exist.
HTTP Status Code: 404 FailedDependencyException
The AWS 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.
HTTP Status Code: 424 ProhibitedStateException
The specified document version is not in the INITIALIZED state.
HTTP Status Code: 409 ServiceUnavailableException
One or more of the dependencies is unavailable.
HTTP Status Code: 503 UnauthorizedOperationException
The operation is not permitted.
HTTP Status Code: 403
UnauthorizedResourceAccessException
The caller does not have access to perform the action on the resource.
HTTP Status Code: 404
See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following:
• AWS Command Line Interface
• AWS SDK for .NET
• AWS SDK for C++
• AWS SDK for Go
• AWS SDK for Java V2
• AWS SDK for JavaScript
• AWS SDK for PHP V3
• AWS SDK for Python
• AWS SDK for Ruby V3
DeleteFolderContents
DeleteFolderContents
Deletes the contents of the specified folder.
Request Syntax
DELETE /api/v1/folders/FolderId/contents HTTP/1.1 Authentication: AuthenticationToken
URI Request Parameters
The request uses the following URI parameters.
AuthenticationToken (p. 44)
Amazon WorkDocs authentication token. Not required when using AWS administrator credentials to access the API.
Length Constraints: Minimum length of 1. Maximum length of 8199.
FolderId (p. 44)
The ID of the folder.
Length Constraints: Minimum length of 1. Maximum length of 128.
Pattern: [\w+-.@]+
Required: Yes
Request Body
The request does not have a request body.
Response Syntax
HTTP/1.1 204
Response Elements
If the action is successful, the service sends back an HTTP 204 response with an empty HTTP body.
Errors
For information about the errors that are common to all actions, see Common Errors (p. 164).
ConflictingOperationException
Another operation is in progress on the resource that conflicts with the current operation.
HTTP Status Code: 409
See Also
EntityNotExistsException The resource does not exist.
HTTP Status Code: 404 FailedDependencyException
The AWS 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.
HTTP Status Code: 424 ProhibitedStateException
The specified document version is not in the INITIALIZED state.
HTTP Status Code: 409 ServiceUnavailableException
One or more of the dependencies is unavailable.
HTTP Status Code: 503 UnauthorizedOperationException
The operation is not permitted.
HTTP Status Code: 403
UnauthorizedResourceAccessException
The caller does not have access to perform the action on the resource.
HTTP Status Code: 404
See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following:
• AWS Command Line Interface
• AWS SDK for .NET
• AWS SDK for C++
• AWS SDK for Go
• AWS SDK for Java V2
• AWS SDK for JavaScript
• AWS SDK for PHP V3
• AWS SDK for Python
• AWS SDK for Ruby V3
DeleteLabels
DeleteLabels
Deletes the specified list of labels from a resource.
Request Syntax
DELETE /api/v1/resources/ResourceId/labels?deleteAll=DeleteAll&labels=Labels HTTP/1.1 Authentication: AuthenticationToken
URI Request Parameters
The request uses the following URI parameters.
AuthenticationToken (p. 46)
Amazon WorkDocs authentication token. Not required when using AWS administrator credentials to access the API.
Length Constraints: Minimum length of 1. Maximum length of 8199.
DeleteAll (p. 46)
Flag to request removal of all labels from the specified resource.
Labels (p. 46)
List of labels to delete from the resource.
Array Members: Maximum number of 20 items.
Length Constraints: Minimum length of 1. Maximum length of 32.
Pattern: [a-zA-Z0-9._+-/=][a-zA-Z0-9 ._+-/=]*
ResourceId (p. 46)
The ID of the resource.
Length Constraints: Minimum length of 1. Maximum length of 128.
Pattern: [\w+-.@]+
Required: Yes
Request Body
The request does not have a request body.
Response Syntax
HTTP/1.1 200
Response Elements
If the action is successful, the service sends back an HTTP 200 response with an empty HTTP body.
Errors
Errors
For information about the errors that are common to all actions, see Common Errors (p. 164).
EntityNotExistsException The resource does not exist.
HTTP Status Code: 404 FailedDependencyException
The AWS 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.
HTTP Status Code: 424 ServiceUnavailableException
One or more of the dependencies is unavailable.
HTTP Status Code: 503 UnauthorizedOperationException
The operation is not permitted.
HTTP Status Code: 403
UnauthorizedResourceAccessException
The caller does not have access to perform the action on the resource.
HTTP Status Code: 404
See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following:
• AWS Command Line Interface
• AWS SDK for .NET
• AWS SDK for C++
• AWS SDK for Go
• AWS SDK for Java V2
• AWS SDK for JavaScript
• AWS SDK for PHP V3
• AWS SDK for Python
• AWS SDK for Ruby V3