Atlassian Confluence Cloud
Atlassian Confluence Cloud allows users to interact with confluence entities like content, space, users, and groups. Users can also manage the space permissions.
Utilities · Atlassian Confluence Cloud
Details
| ID | Atlassian Confluence Cloud |
|---|---|
| Provider | Atlassian |
| Category | Utilities |
| From Version | 6.2.0 |
| Docker Image | demisto/btfl-soup:1.0.1.10120494 |
| Supported Modules | Agentix XSIAM |
README
Atlassian Confluence Cloud allows users to interact with confluence entities like content, space, users and groups. Users can also manage the space permissions.
This integration was integrated and tested with version 1000.0.0-847bdcbfcd00 of Atlassian Confluence Cloud.
Configure Atlassian Confluence Cloud in Cortex
| Parameter | Description | Required |
|---|---|---|
| Site Name (e.g., https://${site-name}.atlassian.net) | Site name of the Confluence cloud the user wants to connect to. | True |
| The Atlassian account email. | True | |
| API Token | True | |
| Use system proxy settings | False | |
| Trust any certificate (not secure) | False | |
| Events Fetch Interval | False | |
| Max number of events per fetch | False | |
| Fetch Events | False |
Authentication Methods
Basic Authentication (Email + API Token)
- Provide your Email address
- Provide your API Token (generate from Atlassian API Token management)
OAuth 2.0 Authentication
OAuth 2.0 provides a more secure authentication method using the Atlassian Developer Console.
Required OAuth Scopes (must be configured in the Atlassian Developer Console for your OAuth app):
| Scope | Description |
|---|---|
read:audit-log:confluence |
Required for event fetching — Read Confluence audit log records |
read:confluence-content.all |
Read all Confluence content |
read:confluence-space.summary |
Read space summaries |
read:confluence-user |
Read user information |
read:confluence-groups |
Read group information |
write:confluence-content |
Write content |
write:confluence-space |
Write space data |
offline_access |
Enables refresh token for unattended access |
Note: The
read:audit-log:confluencescope is specifically required for the event fetching functionality (fetch-eventsandconfluence-cloud-get-eventscommands). Without this scope, event collection will fail.
Commands
You can execute these commands from the CLI, as part of an automation, or in a playbook.
After you successfully execute a command, a DBot message appears in the War Room with the command details.
confluence-cloud-space-create
Creates a new space.
Note: If no permissions are specified, the default space permissions defined by the Confluence cloud account admin will be used.
Create Space with permissions
-
The command arguments ‘permission_account_id’, ‘permission_group_name’, and ‘permission_operations’ can be used to limit access of the space to one individual or one group.
For Example: !confluence-cloud-space-create unique_key=”Demo” name=”DemoSpace” permission_account_id=”123af245667” permission_group_name=”administrators” permission_operations=”read:space,write:page” -
To limit access of the space to a specific number of people or groups, ‘advanced_permissions’ should contain a valid JSON.
A valid JSON schema can be found here.
Base Command
confluence-cloud-space-create
Input
| Argument Name | Description | Required |
|---|---|---|
| unique_key | The key for the new space. It can contain any alphanumeric character (a-z, 0-9). The maximum length is 255 characters. Note: unique_key cannot change after the space is created. |
Required |
| name | The name of the new space. The maximum length is 200 characters. | Required |
| description | The description of the new space. | Optional |
| is_private_space | Whether the user wants to create a private space. Note: If this option is set to true, permission cannot be applied. Default is false. |
Optional |
| permission_account_id | The account ID of the user to whom permission should be granted. Note: To retrieve the account ID, execute the confluence-cloud-user-list command. |
Optional |
| permission_group_name | The group name to whom permission should be granted. Note: To retrieve the group name, execute the confluence-cloud-group-list command. |
Optional |
| permission_operations | A comma-separated list of the permissions that should be applied. Note: Requires either permission_account_id or permission_group_name. Format accepted: operation1:targetType1, operation2:targetType2 For example: read:space, create:page Possible values for operations: create, read, delete, export, administer. Possible values for targetType: space, page, blogpost, comment, attachment. |
Optional |
| advanced_permissions | Specify ‘advanced_permissions’ to grant access to multiple users or groups. ‘advanced_permissions’ has priority over ‘permission_operations’. Note: Add backslash(\) before quotes. For example: [ { "subjects": { "user": { "results": [ { "accountId": "5ff2e30b4d2179006ea18449" } ] }, "group": { "results": [ { "name": "administrators" } ] } }, "operation": { "operation": "read", "targetType": "space" }, "anonymousAccess": false, "unlicensedAccess": false } ] To prepare a valid JSON for advanced_permissions, navigate to https://developer.atlassian.com/cloud/confluence/rest/api-group-space/#api-wiki-rest-api-space-post and see the permission parameter in it. |
Optional |
Context Output
| Path | Type | Description |
|---|---|---|
| ConfluenceCloud.Space.id | Number | ID of the space. |
| ConfluenceCloud.Space.key | String | Key of the space. |
| ConfluenceCloud.Space.name | String | Name of the space. |
| ConfluenceCloud.Space.description.view.value | String | The description of the space in view format. |
| ConfluenceCloud.Space.description.view.representation | String | Representation format of the description in view format. |
| ConfluenceCloud.Space.description.plain.value | String | The description of the space in plain format. |
| ConfluenceCloud.Space.description.plain.representation | String | Representation format of the description in plain format. |
| ConfluenceCloud.Space.homepage.id | String | ID of the homepage of the space. |
| ConfluenceCloud.Space.homepage.type | String | Type of the homepage of the space. |
| ConfluenceCloud.Space.homepage.status | String | Status of the homepage of the space. |
| ConfluenceCloud.Space.homepage.title | String | Title of the homepage of the space. |
| ConfluenceCloud.Space.homepage.extensions.position | Number | The content extension position. |
| ConfluenceCloud.Space.homepage._links.self | String | Link to the homepage of the space. |
| ConfluenceCloud.Space.homepage._links.tinyui | String | Tiny link to the homepage of the space. |
| ConfluenceCloud.Space.homepage._links.editui | String | Edit the user interface link to the homepage of the space. |
| ConfluenceCloud.Space.homepage._links.webui | String | Web user interface link to the homepage of the space. |
| ConfluenceCloud.Space.type | String | Type of the space. |
| ConfluenceCloud.Space.permissions.id | Number | ID of the space permission. |
| ConfluenceCloud.Space.permissions.subjects.user.results.type | String | Type of the user to whom the space permission applies. |
| ConfluenceCloud.Space.permissions.subjects.user.results.accountId | String | Account ID of the user to whom the space permission applies. |
| ConfluenceCloud.Space.permissions.subjects.user.results.accountType | String | Account type of the user to whom the space permission applies. |
| ConfluenceCloud.Space.permissions.subjects.user.results.email | String | Email of the user to whom the space permission applies. |
| ConfluenceCloud.Space.permissions.subjects.user.results.publicName | String | Public name of the user to whom the space permission applies. |
| ConfluenceCloud.Space.permissions.subjects.user.results.profilePicture.path | String | Path of the user’s profile picture to whom the space permission applies. |
| ConfluenceCloud.Space.permissions.subjects.user.results.profilePicture.width | Number | Width in pixels of the user’s profile picture to whom the space permission applies. |
| ConfluenceCloud.Space.permissions.subjects.user.results.profilePicture.height | Number | Height in pixels of the user’s profile picture to whom the space permission applies. |
| ConfluenceCloud.Space.permissions.subjects.user.results.profilePicture.isDefault | Boolean | Whether the profile picture of the user is default picture to whom the space permission applies. |
| ConfluenceCloud.Space.permissions.subjects.user.results.displayName | String | Display name of the user to whom the space permission applies. |
| ConfluenceCloud.Space.permissions.subjects.user.results.isExternalCollaborator | Boolean | Whether the user is an external collaborator user. |
| ConfluenceCloud.Space.permissions.subjects.user.results._links.self | String | Link to the user to whom the space permission applies. |
| ConfluenceCloud.Space.permissions.subjects.user.size | Number | Size of the list of users for a given space. |
| ConfluenceCloud.Space.permissions.subjects.group.results.type | String | Type of the group to whom the space permission applies. |
| ConfluenceCloud.Space.permissions.subjects.group.results.name | String | Name of the group to whom the space permission applies. |
| ConfluenceCloud.Space.permissions.subjects.group.results.id | String | ID of the group to whom the space permission applies. |
| ConfluenceCloud.Space.permissions.subjects.group.results._links.self | String | Link to the group to whom the space permission applies. |
| ConfluenceCloud.Space.permissions.subjects.group.size | Number | Size of the list of groups for the given space. |
| ConfluenceCloud.Space.permissions.operation.operation | String | Name of the permission operation. |
| ConfluenceCloud.Space.permissions.operation.targetType | String | The space or content type that the operation applies to. |
| ConfluenceCloud.Space.permissions.anonymousAccess | Boolean | Whether anonymous users have permission to use the operation. |
| ConfluenceCloud.Space.permissions.unlicensedAccess | Boolean | Whether unlicensed users have access from JIRA Service Desk when used with the read space operation. |
| ConfluenceCloud.Space.status | String | Status of the space. |
| ConfluenceCloud.Space._links.webui | String | Web user interface link of the space. |
| ConfluenceCloud.Space._links.context | String | Context link of the space. |
| ConfluenceCloud.Space._links.self | String | Link to the space. |
| ConfluenceCloud.Space._links.collection | String | Collection link of the space. |
| ConfluenceCloud.Space._links.base | String | Base link to the space. |
Command Example
!confluence-cloud-space-create name="hello_world" unique_key="helloworld111"
Context Example
{
"ConfluenceCloud": {
"Space": {
"_expandable": {
"lookAndFeel": "/rest/api/settings/lookandfeel?spaceKey=helloworld111",
"settings": "/rest/api/space/helloworld111/settings",
"theme": "/rest/api/space/helloworld111/theme"
},
"_links": {
"base": "https://xsoar-bd.atlassian.net/wiki",
"collection": "/rest/api/space",
"context": "/wiki",
"self": "https://xsoar-bd.atlassian.net/wiki/rest/api/space/helloworld111",
"webui": "/spaces/helloworld111"
},
"description": {
"plain": {
"representation": "plain"
}
},
"homepage": {
"_expandable": {
"children": "/rest/api/content/16711835/child",
"container": "/rest/api/space/helloworld111",
"descendants": "/rest/api/content/16711835/descendant",
"history": "/rest/api/content/16711835/history",
"restrictions": "/rest/api/content/16711835/restriction/byOperation",
"space": "/rest/api/space/helloworld111"
},
"_links": {
"editui": "/pages/resumedraft.action?draftId=16711835",
"self": "https://xsoar-bd.atlassian.net/wiki/rest/api/content/16711835",
"tinyui": "/x/mwD-/",
"webui": "/spaces/helloworld111/overview"
},
"extensions": {
"position": 797
},
"id": "16711835",
"status": "current",
"title": "hello_world Home",
"type": "page"
},
"id": 16711682,
"key": "helloworld111",
"name": "hello_world",
"permissions": [
{
"anonymousAccess": false,
"id": 16711685,
"operation": {
"operation": "create",
"targetType": "attachment"
},
"subjects": {
"group": {
"results": [
{
"_links": {
"self": "https://xsoar-bd.atlassian.net/wiki/rest/experimental/group/administrators"
},
"id": "10453df5-f7fc-47be-8ca7-bc2949c1bd5b",
"name": "administrators",
"type": "group"
}
],
"size": 1
}
},
"unlicensedAccess": false
},
{
"anonymousAccess": false,
"id": 16711686,
"operation": {
"operation": "delete",
"targetType": "page"
},
"subjects": {
"group": {
"results": [
{
"_links": {
"self": "https://xsoar-bd.atlassian.net/wiki/rest/experimental/group/confluence-users"
},
"id": "e50e7fe6-7961-4775-9bbf-99e4b50f8701",
"name": "confluence-users",
"type": "group"
}
],
"size": 1
}
},
"unlicensedAccess": false
},
{
"anonymousAccess": false,
"id": 16711687,
"operation": {
"operation": "restrict_content",
"targetType": "space"
},
"subjects": {
"group": {
"results": [
{
"_links": {
"self": "https://xsoar-bd.atlassian.net/wiki/rest/experimental/group/site-admins"
},
"id": "b7e24fd2-0faa-4eaa-9f87-b764ae157ae7",
"name": "site-admins",
"type": "group"
}
],
"size": 1
}
},
"unlicensedAccess": false
},
{
"anonymousAccess": false,
"id": 16711688,
"operation": {
"operation": "delete",
"targetType": "space"
},
"subjects": {
"group": {
"results": [
{
"_links": {
"self": "https://xsoar-bd.atlassian.net/wiki/rest/experimental/group/confluence-users"
},
"id": "e50e7fe6-7961-4775-9bbf-99e4b50f8701",
"name": "confluence-users",
"type": "group"
}
],
"size": 1
}
},
"unlicensedAccess": false
},
{
"anonymousAccess": false,
"id": 16711689,
"operation": {
"operation": "delete",
"targetType": "blogpost"
},
"subjects": {
"group": {
"results": [
{
"_links": {
"self": "https://xsoar-bd.atlassian.net/wiki/rest/experimental/group/confluence-users"
},
"id": "e50e7fe6-7961-4775-9bbf-99e4b50f8701",
"name": "confluence-users",
"type": "group"
}
],
"size": 1
}
},
"unlicensedAccess": false
},
{
"anonymousAccess": false,
"id": 16711690,
"operation": {
"operation": "delete",
"targetType": "attachment"
},
"subjects": {
"group": {
"results": [
{
"_links": {
"self": "https://xsoar-bd.atlassian.net/wiki/rest/experimental/group/confluence-users"
},
"id": "e50e7fe6-7961-4775-9bbf-99e4b50f8701",
"name": "confluence-users",
"type": "group"
}
],
"size": 1
}
},
"unlicensedAccess": false
},
{
"anonymousAccess": false,
"id": 16711691,
"operation": {
"operation": "export",
"targetType": "space"
},
"subjects": {
"group": {
"results": [
{
"_links": {
"self": "https://xsoar-bd.atlassian.net/wiki/rest/experimental/group/system-administrators"
},
"id": "2fda36d1-e4e0-4307-bc5f-ed0044f6ff2c",
"name": "system-administrators",
"type": "group"
}
],
"size": 1
}
},
"unlicensedAccess": false
},
{
"anonymousAccess": false,
"id": 16711693,
"operation": {
"operation": "restrict_content",
"targetType": "space"
},
"subjects": {
"group": {
"results": [
{
"_links": {
"self": "https://xsoar-bd.atlassian.net/wiki/rest/experimental/group/system-administrators"
},
"id": "2fda36d1-e4e0-4307-bc5f-ed0044f6ff2c",
"name": "system-administrators",
"type": "group"
}
],
"size": 1
}
},
"unlicensedAccess": false
},
{
"anonymousAccess": false,
"id": 16711694,
"operation": {
"operation": "create",
"targetType": "attachment"
},
"subjects": {
"user": {
"results": [
{
"_links": {
"self": "https://xsoar-bd.atlassian.net/wiki/rest/api/user?accountId=5ff2e30b4d2179006ea18449"
},
"accountId": "5ff2e30b4d2179006ea18449",
"accountType": "atlassian",
"displayName": "John Doe",
"email": "dummy.dummy@dummy.com",
"isExternalCollaborator": false,
"profilePicture": {
"height": 48,
"isDefault": false,
"path": "/wiki/aa-avatar/5ff2e30b4d2179006ea18449",
"width": 48
},
"publicName": "John Doe",
"type": "known"
}
],
"size": 1
}
},
"unlicensedAccess": false
},
{
"anonymousAccess": false,
"id": 16711695,
"operation": {
"operation": "delete",
"targetType": "comment"
},
"subjects": {
"group": {
"results": [
{
"_links": {
"self": "https://xsoar-bd.atlassian.net/wiki/rest/experimental/group/confluence-users"
},
"id": "e50e7fe6-7961-4775-9bbf-99e4b50f8701",
"name": "confluence-users",
"type": "group"
}
],
"size": 1
}
},
"unlicensedAccess": false
},
{
"anonymousAccess": false,
"id": 16711696,
"operation": {
"operation": "create",
"targetType": "comment"
},
"subjects": {
"group": {
"results": [
{
"_links": {
"self": "https://xsoar-bd.atlassian.net/wiki/rest/experimental/group/confluence-users"
},
"id": "e50e7fe6-7961-4775-9bbf-99e4b50f8701",
"name": "confluence-users",
"type": "group"
}
],
"size": 1
}
},
"unlicensedAccess": false
},
{
"anonymousAccess": false,
"id": 16711697,
"operation": {
"operation": "create",
"targetType": "page"
},
"subjects": {
"group": {
"results": [
{
"_links": {
"self": "https://xsoar-bd.atlassian.net/wiki/rest/experimental/group/system-administrators"
},
"id": "2fda36d1-e4e0-4307-bc5f-ed0044f6ff2c",
"name": "system-administrators",
"type": "group"
}
],
"size": 1
}
},
"unlicensedAccess": false
},
{
"anonymousAccess": false,
"id": 16711698,
"operation": {
"operation": "create",
"targetType": "blogpost"
},
"subjects": {
"group": {
"results": [
{
"_links": {
"self": "https://xsoar-bd.atlassian.net/wiki/rest/experimental/group/site-admins"
},
"id": "b7e24fd2-0faa-4eaa-9f87-b764ae157ae7",
"name": "site-admins",
"type": "group"
}
],
"size": 1
}
},
"unlicensedAccess": false
},
{
"anonymousAccess": false,
"id": 16711699,
"operation": {
"operation": "create",
"targetType": "blogpost"
},
"subjects": {
"user": {
"results": [
{
"_links": {
"self": "https://xsoar-bd.atlassian.net/wiki/rest/api/user?accountId=5ff2e30b4d2179006ea18449"
},
"accountId": "5ff2e30b4d2179006ea18449",
"accountType": "atlassian",
"displayName": "John Doe",
"email": "dummy.dummy@dummy.com",
"isExternalCollaborator": false,
"profilePicture": {
"height": 48,
"isDefault": false,
"path": "/wiki/aa-avatar/5ff2e30b4d2179006ea18449",
"width": 48
},
"publicName": "John Doe",
"type": "known"
}
],
"size": 1
}
},
"unlicensedAccess": false
},
{
"anonymousAccess": false,
"id": 16711700,
"operation": {
"operation": "create",
"targetType": "page"
},
"subjects": {
"group": {
"results": [
{
"_links": {
"self": "https://xsoar-bd.atlassian.net/wiki/rest/experimental/group/administrators"
},
"id": "10453df5-f7fc-47be-8ca7-bc2949c1bd5b",
"name": "administrators",
"type": "group"
}
],
"size": 1
}
},
"unlicensedAccess": false
},
{
"anonymousAccess": false,
"id": 16711701,
"operation": {
"operation": "delete",
"targetType": "comment"
},
"subjects": {
"group": {
"results": [
{
"_links": {
"self": "https://xsoar-bd.atlassian.net/wiki/rest/experimental/group/trusted-users-9704e596-7b55-4a8b-a77b-f617d67cffd9"
},
"id": "5178e800-9b33-4b4b-9854-1fdd6776bd42",
"name": "trusted-users-9704e596-7b55-4a8b-a77b-f617d67cffd9",
"type": "group"
}
],
"size": 1
}
},
"unlicensedAccess": false
},
{
"anonymousAccess": false,
"id": 16711702,
"operation": {
"operation": "create",
"targetType": "comment"
},
"subjects": {
"group": {
"results": [
{
"_links": {
"self": "https://xsoar-bd.atlassian.net/wiki/rest/experimental/group/trusted-users-9704e596-7b55-4a8b-a77b-f617d67cffd9"
},
"id": "5178e800-9b33-4b4b-9854-1fdd6776bd42",
"name": "trusted-users-9704e596-7b55-4a8b-a77b-f617d67cffd9",
"type": "group"
}
],
"size": 1
}
},
"unlicensedAccess": false
},
{
"anonymousAccess": false,
"id": 16711704,
"operation": {
"operation": "read",
"targetType": "space"
},
"subjects": {
"group": {
"results": [
{
"_links": {
"self": "https://xsoar-bd.atlassian.net/wiki/rest/experimental/group/confluence-users"
},
"id": "e50e7fe6-7961-4775-9bbf-99e4b50f8701",
"name": "confluence-users",
"type": "group"
}
],
"size": 1
}
},
"unlicensedAccess": false
},
{
"anonymousAccess": false,
"id": 16711705,
"operation": {
"operation": "administer",
"targetType": "space"
},
"subjects": {
"user": {
"results": [
{
"_links": {
"self": "https://xsoar-bd.atlassian.net/wiki/rest/api/user?accountId=5ff2e30b4d2179006ea18449"
},
"accountId": "5ff2e30b4d2179006ea18449",
"accountType": "atlassian",
"displayName": "John Doe",
"email": "dummy.dummy@dummy.com",
"isExternalCollaborator": false,
"profilePicture": {
"height": 48,
"isDefault": false,
"path": "/wiki/aa-avatar/5ff2e30b4d2179006ea18449",
"width": 48
},
"publicName": "John Doe",
"type": "known"
}
],
"size": 1
}
},
"unlicensedAccess": false
},
{
"anonymousAccess": false,
"id": 16711706,
"operation": {
"operation": "delete",
"targetType": "attachment"
},
"subjects": {
"group": {
"results": [
{
"_links": {
"self": "https://xsoar-bd.atlassian.net/wiki/rest/experimental/group/site-admins"
},
"id": "b7e24fd2-0faa-4eaa-9f87-b764ae157ae7",
"name": "site-admins",
"type": "group"
}
],
"size": 1
}
},
"unlicensedAccess": false
},
{
"anonymousAccess": false,
"id": 16711708,
"operation": {
"operation": "administer",
"targetType": "space"
},
"subjects": {
"group": {
"results": [
{
"_links": {
"self": "https://xsoar-bd.atlassian.net/wiki/rest/experimental/group/trusted-users-9704e596-7b55-4a8b-a77b-f617d67cffd9"
},
"id": "5178e800-9b33-4b4b-9854-1fdd6776bd42",
"name": "trusted-users-9704e596-7b55-4a8b-a77b-f617d67cffd9",
"type": "group"
}
],
"size": 1
}
},
"unlicensedAccess": false
},
{
"anonymousAccess": false,
"id": 16711709,
"operation": {
"operation": "read",
"targetType": "space"
},
"subjects": {
"group": {
"results": [
{
"_links": {
"self": "https://xsoar-bd.atlassian.net/wiki/rest/experimental/group/trusted-users-9704e596-7b55-4a8b-a77b-f617d67cffd9"
},
"id": "5178e800-9b33-4b4b-9854-1fdd6776bd42",
"name": "trusted-users-9704e596-7b55-4a8b-a77b-f617d67cffd9",
"type": "group"
}
],
"size": 1
}
},
"unlicensedAccess": false
},
{
"anonymousAccess": false,
"id": 16711710,
"operation": {
"operation": "create",
"targetType": "attachment"
},
"subjects": {
"group": {
"results": [
{
"_links": {
"self": "https://xsoar-bd.atlassian.net/wiki/rest/experimental/group/site-admins"
},
"id": "b7e24fd2-0faa-4eaa-9f87-b764ae157ae7",
"name": "site-admins",
"type": "group"
}
],
"size": 1
}
},
"unlicensedAccess": false
},
{
"anonymousAccess": false,
"id": 16711711,
"operation": {
"operation": "restrict_content",
"targetType": "space"
},
"subjects": {
"group": {
"results": [
{
"_links": {
"self": "https://xsoar-bd.atlassian.net/wiki/rest/experimental/group/administrators"
},
"id": "10453df5-f7fc-47be-8ca7-bc2949c1bd5b",
"name": "administrators",
"type": "group"
}
],
"size": 1
}
},
"unlicensedAccess": false
},
{
"anonymousAccess": false,
"id": 16711714,
"operation": {
"operation": "delete",
"targetType": "page"
},
"subjects": {
"group": {
"results": [
{
"_links": {
"self": "https://xsoar-bd.atlassian.net/wiki/rest/experimental/group/system-administrators"
},
"id": "2fda36d1-e4e0-4307-bc5f-ed0044f6ff2c",
"name": "system-administrators",
"type": "group"
}
],
"size": 1
}
},
"unlicensedAccess": false
},
{
"anonymousAccess": false,
"id": 16711715,
"operation": {
"operation": "read",
"targetType": "space"
},
"subjects": {
"group": {
"results": [
{
"_links": {
"self": "https://xsoar-bd.atlassian.net/wiki/rest/experimental/group/system-administrators"
},
"id": "2fda36d1-e4e0-4307-bc5f-ed0044f6ff2c",
"name": "system-administrators",
"type": "group"
}
],
"size": 1
}
},
"unlicensedAccess": false
},
{
"anonymousAccess": false,
"id": 16711716,
"operation": {
"operation": "delete",
"targetType": "comment"
},
"subjects": {
"group": {
"results": [
{
"_links": {
"self": "https://xsoar-bd.atlassian.net/wiki/rest/experimental/group/system-administrators"
},
"id": "2fda36d1-e4e0-4307-bc5f-ed0044f6ff2c",
"name": "system-administrators",
"type": "group"
}
],
"size": 1
}
},
"unlicensedAccess": false
},
{
"anonymousAccess": false,
"id": 16711717,
"operation": {
"operation": "delete",
"targetType": "blogpost"
},
"subjects": {
"group": {
"results": [
{
"_links": {
"self": "https://xsoar-bd.atlassian.net/wiki/rest/experimental/group/system-administrators"
},
"id": "2fda36d1-e4e0-4307-bc5f-ed0044f6ff2c",
"name": "system-administrators",
"type": "group"
}
],
"size": 1
}
},
"unlicensedAccess": false
},
{
"anonymousAccess": false,
"id": 16711718,
"operation": {
"operation": "create",
"targetType": "blogpost"
},
"subjects": {
"group": {
"results": [
{
"_links": {
"self": "https://xsoar-bd.atlassian.net/wiki/rest/experimental/group/administrators"
},
"id": "10453df5-f7fc-47be-8ca7-bc2949c1bd5b",
"name": "administrators",
"type": "group"
}
],
"size": 1
}
},
"unlicensedAccess": false
},
{
"anonymousAccess": false,
"id": 16711719,
"operation": {
"operation": "create",
"targetType": "comment"
},
"subjects": {
"group": {
"results": [
{
"_links": {
"self": "https://xsoar-bd.atlassian.net/wiki/rest/experimental/group/system-administrators"
},
"id": "2fda36d1-e4e0-4307-bc5f-ed0044f6ff2c",
"name": "system-administrators",
"type": "group"
}
],
"size": 1
}
},
"unlicensedAccess": false
},
{
"anonymousAccess": false,
"id": 16711720,
"operation": {
"operation": "delete",
"targetType": "blogpost"
},
"subjects": {
"group": {
"results": [
{
"_links": {
"self": "https://xsoar-bd.atlassian.net/wiki/rest/experimental/group/trusted-users-9704e596-7b55-4a8b-a77b-f617d67cffd9"
},
"id": "5178e800-9b33-4b4b-9854-1fdd6776bd42",
"name": "trusted-users-9704e596-7b55-4a8b-a77b-f617d67cffd9",
"type": "group"
}
],
"size": 1
}
},
"unlicensedAccess": false
},
{
"anonymousAccess": false,
"id": 16711721,
"operation": {
"operation": "administer",
"targetType": "space"
},
"subjects": {
"group": {
"results": [
{
"_links": {
"self": "https://xsoar-bd.atlassian.net/wiki/rest/experimental/group/administrators"
},
"id": "10453df5-f7fc-47be-8ca7-bc2949c1bd5b",
"name": "administrators",
"type": "group"
}
],
"size": 1
}
},
"unlicensedAccess": false
},
{
"anonymousAccess": false,
"id": 16711722,
"operation": {
"operation": "delete",
"targetType": "page"
},
"subjects": {
"group": {
"results": [
{
"_links": {
"self": "https://xsoar-bd.atlassian.net/wiki/rest/experimental/group/trusted-users-9704e596-7b55-4a8b-a77b-f617d67cffd9"
},
"id": "5178e800-9b33-4b4b-9854-1fdd6776bd42",
"name": "trusted-users-9704e596-7b55-4a8b-a77b-f617d67cffd9",
"type": "group"
}
],
"size": 1
}
},
"unlicensedAccess": false
},
{
"anonymousAccess": false,
"id": 16711723,
"operation": {
"operation": "delete",
"targetType": "space"
},
"subjects": {
"user": {
"results": [
{
"_links": {
"self": "https://xsoar-bd.atlassian.net/wiki/rest/api/user?accountId=5ff2e30b4d2179006ea18449"
},
"accountId": "5ff2e30b4d2179006ea18449",
"accountType": "atlassian",
"displayName": "John Doe",
"email": "dummy.dummy@dummy.com",
"isExternalCollaborator": false,
"profilePicture": {
"height": 48,
"isDefault": false,
"path": "/wiki/aa-avatar/5ff2e30b4d2179006ea18449",
"width": 48
},
"publicName": "John Doe",
"type": "known"
}
],
"size": 1
}
},
"unlicensedAccess": false
},
{
"anonymousAccess": false,
"id": 16711725,
"operation": {
"operation": "delete",
"targetType": "space"
},
"subjects": {
"group": {
"results": [
{
"_links": {
"self": "https://xsoar-bd.atlassian.net/wiki/rest/experimental/group/site-admins"
},
"id": "b7e24fd2-0faa-4eaa-9f87-b764ae157ae7",
"name": "site-admins",
"type": "group"
}
],
"size": 1
}
},
"unlicensedAccess": false
},
{
"anonymousAccess": false,
"id": 16711726,
"operation": {
"operation": "delete",
"targetType": "attachment"
},
"subjects": {
"group": {
"results": [
{
"_links": {
"self": "https://xsoar-bd.atlassian.net/wiki/rest/experimental/group/administrators"
},
"id": "10453df5-f7fc-47be-8ca7-bc2949c1bd5b",
"name": "administrators",
"type": "group"
}
],
"size": 1
}
},
"unlicensedAccess": false
},
{
"anonymousAccess": false,
"id": 16711727,
"operation": {
"operation": "export",
"targetType": "space"
},
"subjects": {
"group": {
"results": [
{
"_links": {
"self": "https://xsoar-bd.atlassian.net/wiki/rest/experimental/group/trusted-users-9704e596-7b55-4a8b-a77b-f617d67cffd9"
},
"id": "5178e800-9b33-4b4b-9854-1fdd6776bd42",
"name": "trusted-users-9704e596-7b55-4a8b-a77b-f617d67cffd9",
"type": "group"
}
],
"size": 1
}
},
"unlicensedAccess": false
},
{
"anonymousAccess": false,
"id": 16711728,
"operation": {
"operation": "create",
"targetType": "page"
},
"subjects": {
"group": {
"results": [
{
"_links": {
"self": "https://xsoar-bd.atlassian.net/wiki/rest/experimental/group/trusted-users-9704e596-7b55-4a8b-a77b-f617d67cffd9"
},
"id": "5178e800-9b33-4b4b-9854-1fdd6776bd42",
"name": "trusted-users-9704e596-7b55-4a8b-a77b-f617d67cffd9",
"type": "group"
}
],
"size": 1
}
},
"unlicensedAccess": false
},
{
"anonymousAccess": false,
"id": 16711729,
"operation": {
"operation": "delete",
"targetType": "page"
},
"subjects": {
"group": {
"results": [
{
"_links": {
"self": "https://xsoar-bd.atlassian.net/wiki/rest/experimental/group/administrators"
},
"id": "10453df5-f7fc-47be-8ca7-bc2949c1bd5b",
"name": "administrators",
"type": "group"
}
],
"size": 1
}
},
"unlicensedAccess": false
},
{
"anonymousAccess": false,
"id": 16711730,
"operation": {
"operation": "create",
"targetType": "attachment"
},
"subjects": {
"group": {
"results": [
{
"_links": {
"self": "https://xsoar-bd.atlassian.net/wiki/rest/experimental/group/confluence-users"
},
"id": "e50e7fe6-7961-4775-9bbf-99e4b50f8701",
"name": "confluence-users",
"type": "group"
}
],
"size": 1
}
},
"unlicensedAccess": false
},
{
"anonymousAccess": false,
"id": 16711731,
"operation": {
"operation": "delete",
"targetType": "space"
},
"subjects": {
"group": {
"results": [
{
"_links": {
"self": "https://xsoar-bd.atlassian.net/wiki/rest/experimental/group/administrators"
},
"id": "10453df5-f7fc-47be-8ca7-bc2949c1bd5b",
"name": "administrators",
"type": "group"
}
],
"size": 1
}
},
"unlicensedAccess": false
},
{
"anonymousAccess": false,
"id": 16711732,
"operation": {
"operation": "delete",
"targetType": "page"
},
"subjects": {
"user": {
"results": [
{
"_links": {
"self": "https://xsoar-bd.atlassian.net/wiki/rest/api/user?accountId=5ff2e30b4d2179006ea18449"
},
"accountId": "5ff2e30b4d2179006ea18449",
"accountType": "atlassian",
"displayName": "John Doe",
"email": "dummy.dummy@dummy.com",
"isExternalCollaborator": false,
"profilePicture": {
"height": 48,
"isDefault": false,
"path": "/wiki/aa-avatar/5ff2e30b4d2179006ea18449",
"width": 48
},
"publicName": "John Doe",
"type": "known"
}
],
"size": 1
}
},
"unlicensedAccess": false
},
{
"anonymousAccess": false,
"id": 16711733,
"operation": {
"operation": "delete",
"targetType": "blogpost"
},
"subjects": {
"user": {
"results": [
{
"_links": {
"self": "https://xsoar-bd.atlassian.net/wiki/rest/api/user?accountId=5ff2e30b4d2179006ea18449"
},
"accountId": "5ff2e30b4d2179006ea18449",
"accountType": "atlassian",
"displayName": "John Doe",
"email": "dummy.dummy@dummy.com",
"isExternalCollaborator": false,
"profilePicture": {
"height": 48,
"isDefault": false,
"path": "/wiki/aa-avatar/5ff2e30b4d2179006ea18449",
"width": 48
},
"publicName": "John Doe",
"type": "known"
}
],
"size": 1
}
},
"unlicensedAccess": false
},
{
"anonymousAccess": false,
"id": 16711735,
"operation": {
"operation": "administer",
"targetType": "space"
},
"subjects": {
"group": {
"results": [
{
"_links": {
"self": "https://xsoar-bd.atlassian.net/wiki/rest/experimental/group/system-administrators"
},
"id": "2fda36d1-e4e0-4307-bc5f-ed0044f6ff2c",
"name": "system-administrators",
"type": "group"
}
],
"size": 1
}
},
"unlicensedAccess": false
},
{
"anonymousAccess": false,
"id": 16711737,
"operation": {
"operation": "delete",
"targetType": "comment"
},
"subjects": {
"group": {
"results": [
{
"_links": {
"self": "https://xsoar-bd.atlassian.net/wiki/rest/experimental/group/site-admins"
},
"id": "b7e24fd2-0faa-4eaa-9f87-b764ae157ae7",
"name": "site-admins",
"type": "group"
}
],
"size": 1
}
},
"unlicensedAccess": false
},
{
"anonymousAccess": false,
"id": 16711738,
"operation": {
"operation": "create",
"targetType": "blogpost"
},
"subjects": {
"group": {
"results": [
{
"_links": {
"self": "https://xsoar-bd.atlassian.net/wiki/rest/experimental/group/confluence-users"
},
"id": "e50e7fe6-7961-4775-9bbf-99e4b50f8701",
"name": "confluence-users",
"type": "group"
}
],
"size": 1
}
},
"unlicensedAccess": false
},
{
"anonymousAccess": false,
"id": 16711739,
"operation": {
"operation": "create",
"targetType": "comment"
},
"subjects": {
"group": {
"results": [
{
"_links": {
"self": "https://xsoar-bd.atlassian.net/wiki/rest/experimental/group/site-admins"
},
"id": "b7e24fd2-0faa-4eaa-9f87-b764ae157ae7",
"name": "site-admins",
"type": "group"
}
],
"size": 1
}
},
"unlicensedAccess": false
},
{
"anonymousAccess": false,
"id": 16711740,
"operation": {
"operation": "delete",
"targetType": "attachment"
},
"subjects": {
"group": {
"results": [
{
"_links": {
"self": "https://xsoar-bd.atlassian.net/wiki/rest/experimental/group/trusted-users-9704e596-7b55-4a8b-a77b-f617d67cffd9"
},
"id": "5178e800-9b33-4b4b-9854-1fdd6776bd42",
"name": "trusted-users-9704e596-7b55-4a8b-a77b-f617d67cffd9",
"type": "group"
}
],
"size": 1
}
},
"unlicensedAccess": false
},
{
"anonymousAccess": false,
"id": 16711741,
"operation": {
"operation": "administer",
"targetType": "space"
},
"subjects": {
"group": {
"results": [
{
"_links": {
"self": "https://xsoar-bd.atlassian.net/wiki/rest/experimental/group/confluence-users"
},
"id": "e50e7fe6-7961-4775-9bbf-99e4b50f8701",
"name": "confluence-users",
"type": "group"
}
],
"size": 1
}
},
"unlicensedAccess": false
},
{
"anonymousAccess": false,
"id": 16711742,
"operation": {
"operation": "administer",
"targetType": "space"
},
"subjects": {
"group": {
"results": [
{
"_links": {
"self": "https://xsoar-bd.atlassian.net/wiki/rest/experimental/group/site-admins"
},
"id": "b7e24fd2-0faa-4eaa-9f87-b764ae157ae7",
"name": "site-admins",
"type": "group"
}
],
"size": 1
}
},
"unlicensedAccess": false
},
{
"anonymousAccess": false,
"id": 16711743,
"operation": {
"operation": "export",
"targetType": "space"
},
"subjects": {
"group": {
"results": [
{
"_links": {
"self": "https://xsoar-bd.atlassian.net/wiki/rest/experimental/group/administrators"
},
"id": "10453df5-f7fc-47be-8ca7-bc2949c1bd5b",
"name": "administrators",
"type": "group"
}
],
"size": 1
}
},
"unlicensedAccess": false
},
{
"anonymousAccess": false,
"id": 16711744,
"operation": {
"operation": "restrict_content",
"targetType": "space"
},
"subjects": {
"group": {
"results": [
{
"_links": {
"self": "https://xsoar-bd.atlassian.net/wiki/rest/experimental/group/trusted-users-9704e596-7b55-4a8b-a77b-f617d67cffd9"
},
"id": "5178e800-9b33-4b4b-9854-1fdd6776bd42",
"name": "trusted-users-9704e596-7b55-4a8b-a77b-f617d67cffd9",
"type": "group"
}
],
"size": 1
}
},
"unlicensedAccess": false
},
{
"anonymousAccess": false,
"id": 16711745,
"operation": {
"operation": "delete",
"targetType": "comment"
},
"subjects": {
"user": {
"results": [
{
"_links": {
"self": "https://xsoar-bd.atlassian.net/wiki/rest/api/user?accountId=5ff2e30b4d2179006ea18449"
},
"accountId": "5ff2e30b4d2179006ea18449",
"accountType": "atlassian",
"displayName": "John Doe",
"email": "dummy.dummy@dummy.com",
"isExternalCollaborator": false,
"profilePicture": {
"height": 48,
"isDefault": false,
"path": "/wiki/aa-avatar/5ff2e30b4d2179006ea18449",
"width": 48
},
"publicName": "John Doe",
"type": "known"
}
],
"size": 1
}
},
"unlicensedAccess": false
},
{
"anonymousAccess": false,
"id": 16711746,
"operation": {
"operation": "delete",
"targetType": "attachment"
},
"subjects": {
"user": {
"results": [
{
"_links": {
"self": "https://xsoar-bd.atlassian.net/wiki/rest/api/user?accountId=5ff2e30b4d2179006ea18449"
},
"accountId": "5ff2e30b4d2179006ea18449",
"accountType": "atlassian",
"displayName": "John Doe",
"email": "dummy.dummy@dummy.com",
"isExternalCollaborator": false,
"profilePicture": {
"height": 48,
"isDefault": false,
"path": "/wiki/aa-avatar/5ff2e30b4d2179006ea18449",
"width": 48
},
"publicName": "John Doe",
"type": "known"
}
],
"size": 1
}
},
"unlicensedAccess": false
},
{
"anonymousAccess": false,
"id": 16711747,
"operation": {
"operation": "read",
"targetType": "space"
},
"subjects": {
"user": {
"results": [
{
"_links": {
"self": "https://xsoar-bd.atlassian.net/wiki/rest/api/user?accountId=5ff2e30b4d2179006ea18449"
},
"accountId": "5ff2e30b4d2179006ea18449",
"accountType": "atlassian",
"displayName": "John Doe",
"email": "dummy.dummy@dummy.com",
"isExternalCollaborator": false,
"profilePicture": {
"height": 48,
"isDefault": false,
"path": "/wiki/aa-avatar/5ff2e30b4d2179006ea18449",
"width": 48
},
"publicName": "John Doe",
"type": "known"
}
],
"size": 1
}
},
"unlicensedAccess": false
},
{
"anonymousAccess": false,
"id": 16711748,
"operation": {
"operation": "create",
"targetType": "blogpost"
},
"subjects": {
"group": {
"results": [
{
"_links": {
"self": "https://xsoar-bd.atlassian.net/wiki/rest/experimental/group/trusted-users-9704e596-7b55-4a8b-a77b-f617d67cffd9"
},
"id": "5178e800-9b33-4b4b-9854-1fdd6776bd42",
"name": "trusted-users-9704e596-7b55-4a8b-a77b-f617d67cffd9",
"type": "group"
}
],
"size": 1
}
},
"unlicensedAccess": false
},
{
"anonymousAccess": false,
"id": 16711749,
"operation": {
"operation": "create",
"targetType": "attachment"
},
"subjects": {
"group": {
"results": [
{
"_links": {
"self": "https://xsoar-bd.atlassian.net/wiki/rest/experimental/group/system-administrators"
},
"id": "2fda36d1-e4e0-4307-bc5f-ed0044f6ff2c",
"name": "system-administrators",
"type": "group"
}
],
"size": 1
}
},
"unlicensedAccess": false
},
{
"anonymousAccess": false,
"id": 16711750,
"operation": {
"operation": "read",
"targetType": "space"
},
"subjects": {
"group": {
"results": [
{
"_links": {
"self": "https://xsoar-bd.atlassian.net/wiki/rest/experimental/group/site-admins"
},
"id": "b7e24fd2-0faa-4eaa-9f87-b764ae157ae7",
"name": "site-admins",
"type": "group"
}
],
"size": 1
}
},
"unlicensedAccess": false
},
{
"anonymousAccess": false,
"id": 16711751,
"operation": {
"operation": "delete",
"targetType": "blogpost"
},
"subjects": {
"group": {
"results": [
{
"_links": {
"self": "https://xsoar-bd.atlassian.net/wiki/rest/experimental/group/administrators"
},
"id": "10453df5-f7fc-47be-8ca7-bc2949c1bd5b",
"name": "administrators",
"type": "group"
}
],
"size": 1
}
},
"unlicensedAccess": false
},
{
"anonymousAccess": false,
"id": 16711752,
"operation": {
"operation": "create",
"targetType": "comment"
},
"subjects": {
"user": {
"results": [
{
"_links": {
"self": "https://xsoar-bd.atlassian.net/wiki/rest/api/user?accountId=5ff2e30b4d2179006ea18449"
},
"accountId": "5ff2e30b4d2179006ea18449",
"accountType": "atlassian",
"displayName": "John Doe",
"email": "dummy.dummy@dummy.com",
"isExternalCollaborator": false,
"profilePicture": {
"height": 48,
"isDefault": false,
"path": "/wiki/aa-avatar/5ff2e30b4d2179006ea18449",
"width": 48
},
"publicName": "John Doe",
"type": "known"
}
],
"size": 1
}
},
"unlicensedAccess": false
},
{
"anonymousAccess": false,
"id": 16711754,
"operation": {
"operation": "delete",
"targetType": "page"
},
"subjects": {
"group": {
"results": [
{
"_links": {
"self": "https://xsoar-bd.atlassian.net/wiki/rest/experimental/group/site-admins"
},
"id": "b7e24fd2-0faa-4eaa-9f87-b764ae157ae7",
"name": "site-admins",
"type": "group"
}
],
"size": 1
}
},
"unlicensedAccess": false
},
{
"anonymousAccess": false,
"id": 16711755,
"operation": {
"operation": "delete",
"targetType": "space"
},
"subjects": {
"group": {
"results": [
{
"_links": {
"self": "https://xsoar-bd.atlassian.net/wiki/rest/experimental/group/system-administrators"
},
"id": "2fda36d1-e4e0-4307-bc5f-ed0044f6ff2c",
"name": "system-administrators",
"type": "group"
}
],
"size": 1
}
},
"unlicensedAccess": false
},
{
"anonymousAccess": false,
"id": 16711756,
"operation": {
"operation": "restrict_content",
"targetType": "space"
},
"subjects": {
"user": {
"results": [
{
"_links": {
"self": "https://xsoar-bd.atlassian.net/wiki/rest/api/user?accountId=5ff2e30b4d2179006ea18449"
},
"accountId": "5ff2e30b4d2179006ea18449",
"accountType": "atlassian",
"displayName": "John Doe",
"email": "dummy.dummy@dummy.com",
"isExternalCollaborator": false,
"profilePicture": {
"height": 48,
"isDefault": false,
"path": "/wiki/aa-avatar/5ff2e30b4d2179006ea18449",
"width": 48
},
"publicName": "John Doe",
"type": "known"
}
],
"size": 1
}
},
"unlicensedAccess": false
},
{
"anonymousAccess": false,
"id": 16711757,
"operation": {
"operation": "restrict_content",
"targetType": "space"
},
"subjects": {
"group": {
"results": [
{
"_links": {
"self": "https://xsoar-bd.atlassian.net/wiki/rest/experimental/group/confluence-users"
},
"id": "e50e7fe6-7961-4775-9bbf-99e4b50f8701",
"name": "confluence-users",
"type": "group"
}
],
"size": 1
}
},
"unlicensedAccess": false
},
{
"anonymousAccess": false,
"id": 16711758,
"operation": {
"operation": "create",
"targetType": "blogpost"
},
"subjects": {
"group": {
"results": [
{
"_links": {
"self": "https://xsoar-bd.atlassian.net/wiki/rest/experimental/group/system-administrators"
},
"id": "2fda36d1-e4e0-4307-bc5f-ed0044f6ff2c",
"name": "system-administrators",
"type": "group"
}
],
"size": 1
}
},
"unlicensedAccess": false
},
{
"anonymousAccess": false,
"id": 16711760,
"operation": {
"operation": "create",
"targetType": "attachment"
},
"subjects": {
"group": {
"results": [
{
"_links": {
"self": "https://xsoar-bd.atlassian.net/wiki/rest/experimental/group/trusted-users-9704e596-7b55-4a8b-a77b-f617d67cffd9"
},
"id": "5178e800-9b33-4b4b-9854-1fdd6776bd42",
"name": "trusted-users-9704e596-7b55-4a8b-a77b-f617d67cffd9",
"type": "group"
}
],
"size": 1
}
},
"unlicensedAccess": false
},
{
"anonymousAccess": false,
"id": 16711761,
"operation": {
"operation": "delete",
"targetType": "attachment"
},
"subjects": {
"group": {
"results": [
{
"_links": {
"self": "https://xsoar-bd.atlassian.net/wiki/rest/experimental/group/system-administrators"
},
"id": "2fda36d1-e4e0-4307-bc5f-ed0044f6ff2c",
"name": "system-administrators",
"type": "group"
}
],
"size": 1
}
},
"unlicensedAccess": false
},
{
"anonymousAccess": false,
"id": 16711762,
"operation": {
"operation": "archive",
"targetType": "page"
},
"subjects": {
"user": {
"results": [
{
"_links": {
"self": "https://xsoar-bd.atlassian.net/wiki/rest/api/user?accountId=5ff2e30b4d2179006ea18449"
},
"accountId": "5ff2e30b4d2179006ea18449",
"accountType": "atlassian",
"displayName": "John Doe",
"email": "dummy.dummy@dummy.com",
"isExternalCollaborator": false,
"profilePicture": {
"height": 48,
"isDefault": false,
"path": "/wiki/aa-avatar/5ff2e30b4d2179006ea18449",
"width": 48
},
"publicName": "John Doe",
"type": "known"
}
],
"size": 1
}
},
"unlicensedAccess": false
},
{
"anonymousAccess": false,
"id": 16711763,
"operation": {
"operation": "read",
"targetType": "space"
},
"subjects": {
"group": {
"results": [
{
"_links": {
"self": "https://xsoar-bd.atlassian.net/wiki/rest/experimental/group/administrators"
},
"id": "10453df5-f7fc-47be-8ca7-bc2949c1bd5b",
"name": "administrators",
"type": "group"
}
],
"size": 1
}
},
"unlicensedAccess": false
},
{
"anonymousAccess": false,
"id": 16711764,
"operation": {
"operation": "export",
"targetType": "space"
},
"subjects": {
"group": {
"results": [
{
"_links": {
"self": "https://xsoar-bd.atlassian.net/wiki/rest/experimental/group/site-admins"
},
"id": "b7e24fd2-0faa-4eaa-9f87-b764ae157ae7",
"name": "site-admins",
"type": "group"
}
],
"size": 1
}
},
"unlicensedAccess": false
},
{
"anonymousAccess": false,
"id": 16711765,
"operation": {
"operation": "create",
"targetType": "comment"
},
"subjects": {
"group": {
"results": [
{
"_links": {
"self": "https://xsoar-bd.atlassian.net/wiki/rest/experimental/group/administrators"
},
"id": "10453df5-f7fc-47be-8ca7-bc2949c1bd5b",
"name": "administrators",
"type": "group"
}
],
"size": 1
}
},
"unlicensedAccess": false
},
{
"anonymousAccess": false,
"id": 16711767,
"operation": {
"operation": "create",
"targetType": "page"
},
"subjects": {
"group": {
"results": [
{
"_links": {
"self": "https://xsoar-bd.atlassian.net/wiki/rest/experimental/group/confluence-users"
},
"id": "e50e7fe6-7961-4775-9bbf-99e4b50f8701",
"name": "confluence-users",
"type": "group"
}
],
"size": 1
}
},
"unlicensedAccess": false
},
{
"anonymousAccess": false,
"id": 16711768,
"operation": {
"operation": "create",
"targetType": "page"
},
"subjects": {
"group": {
"results": [
{
"_links": {
"self": "https://xsoar-bd.atlassian.net/wiki/rest/experimental/group/site-admins"
},
"id": "b7e24fd2-0faa-4eaa-9f87-b764ae157ae7",
"name": "site-admins",
"type": "group"
}
],
"size": 1
}
},
"unlicensedAccess": false
},
{
"anonymousAccess": false,
"id": 16711769,
"operation": {
"operation": "create",
"targetType": "page"
},
"subjects": {
"user": {
"results": [
{
"_links": {
"self": "https://xsoar-bd.atlassian.net/wiki/rest/api/user?accountId=5ff2e30b4d2179006ea18449"
},
"accountId": "5ff2e30b4d2179006ea18449",
"accountType": "atlassian",
"displayName": "John Doe",
"email": "dummy.dummy@dummy.com",
"isExternalCollaborator": false,
"profilePicture": {
"height": 48,
"isDefault": false,
"path": "/wiki/aa-avatar/5ff2e30b4d2179006ea18449",
"width": 48
},
"publicName": "John Doe",
"type": "known"
}
],
"size": 1
}
},
"unlicensedAccess": false
},
{
"anonymousAccess": false,
"id": 16711770,
"operation": {
"operation": "delete",
"targetType": "blogpost"
},
"subjects": {
"group": {
"results": [
{
"_links": {
"self": "https://xsoar-bd.atlassian.net/wiki/rest/experimental/group/site-admins"
},
"id": "b7e24fd2-0faa-4eaa-9f87-b764ae157ae7",
"name": "site-admins",
"type": "group"
}
],
"size": 1
}
},
"unlicensedAccess": false
},
{
"anonymousAccess": false,
"id": 16711771,
"operation": {
"operation": "export",
"targetType": "space"
},
"subjects": {
"group": {
"results": [
{
"_links": {
"self": "https://xsoar-bd.atlassian.net/wiki/rest/experimental/group/confluence-users"
},
"id": "e50e7fe6-7961-4775-9bbf-99e4b50f8701",
"name": "confluence-users",
"type": "group"
}
],
"size": 1
}
},
"unlicensedAccess": false
},
{
"anonymousAccess": false,
"id": 16711772,
"operation": {
"operation": "delete",
"targetType": "space"
},
"subjects": {
"group": {
"results": [
{
"_links": {
"self": "https://xsoar-bd.atlassian.net/wiki/rest/experimental/group/trusted-users-9704e596-7b55-4a8b-a77b-f617d67cffd9"
},
"id": "5178e800-9b33-4b4b-9854-1fdd6776bd42",
"name": "trusted-users-9704e596-7b55-4a8b-a77b-f617d67cffd9",
"type": "group"
}
],
"size": 1
}
},
"unlicensedAccess": false
},
{
"anonymousAccess": false,
"id": 16711773,
"operation": {
"operation": "export",
"targetType": "space"
},
"subjects": {
"user": {
"results": [
{
"_links": {
"self": "https://xsoar-bd.atlassian.net/wiki/rest/api/user?accountId=5ff2e30b4d2179006ea18449"
},
"accountId": "5ff2e30b4d2179006ea18449",
"accountType": "atlassian",
"displayName": "John Doe",
"email": "dummy.dummy@dummy.com",
"isExternalCollaborator": false,
"profilePicture": {
"height": 48,
"isDefault": false,
"path": "/wiki/aa-avatar/5ff2e30b4d2179006ea18449",
"width": 48
},
"publicName": "John Doe",
"type": "known"
}
],
"size": 1
}
},
"unlicensedAccess": false
},
{
"anonymousAccess": false,
"id": 16711774,
"operation": {
"operation": "delete",
"targetType": "comment"
},
"subjects": {
"group": {
"results": [
{
"_links": {
"self": "https://xsoar-bd.atlassian.net/wiki/rest/experimental/group/administrators"
},
"id": "10453df5-f7fc-47be-8ca7-bc2949c1bd5b",
"name": "administrators",
"type": "group"
}
],
"size": 1
}
},
"unlicensedAccess": false
}
],
"status": "current",
"type": "global"
}
}
}
Human Readable Output
Space
ID Name Type Status 16711682 hello_world global current
confluence-cloud-content-create
Creates a page or blogpost for a given space.
Note: To view the expansion of content properties, execute confluence-cloud-content-list and confluence-cloud-content-search commands.
Base Command
confluence-cloud-content-create
Input
| Argument Name | Description | Required |
|---|---|---|
| title | The title of the content. Note: The maximum title length is 255 characters. |
Required |
| type | The type of the new content. Possible values: page, blogpost. |
Required |
| space_key | The space key that the content is being created in. | Required |
| status | The status of the new content. Possible values: current, trashed, draft. Note: The term ‘current’ refers to the content that is currently active. Default is current. |
Optional |
| body_value | The body of the new content. Note: ‘body_value’ must be a string. In order to reflect ‘body_value’, ‘body_representation’ is required. |
Optional |
| body_representation | The content format type. Possible values: view, export_view, styled_view, storage, editor2, anonymous_export_view. |
Optional |
| ancestor_id | The ID of the parent content to create the child content. Note: Supported for content type page only. To retrieve the ancestor_id, execute the confluence-cloud-content-search command using the query=”type=page” argument. |
Optional |
Context Output
| Path | Type | Description |
|---|---|---|
| ConfluenceCloud.Content.id | String | The ID of the content. |
| ConfluenceCloud.Content.type | String | Type of the content. |
| ConfluenceCloud.Content.status | String | Status of the content. |
| ConfluenceCloud.Content.title | String | Title of the content. |
| ConfluenceCloud.Content.childTypes.attachment.value | Boolean | Whether the attachment has the given content. |
| ConfluenceCloud.Content.childTypes.attachment._links.self | String | Link to the attachment with the given content. |
| ConfluenceCloud.Content.childTypes.comment.value | Boolean | Whether a comment is associated with the given content. |
| ConfluenceCloud.Content.childTypes.comment._links.self | String | Link to the comment associated with the given content. |
| ConfluenceCloud.Content.childTypes.page.value | Boolean | Whether the page is associated with the given content. |
| ConfluenceCloud.Content.childTypes.page._links.self | String | Link to the page associated with given content. |
| ConfluenceCloud.Content.space.id | Number | ID of the space that the content is being created in. |
| ConfluenceCloud.Content.space.key | String | Key of the space that the content is being created in. |
| ConfluenceCloud.Content.space.name | String | Name of the space that the content is being created in. |
| ConfluenceCloud.Content.space.type | String | Type of the space that the content is being created in. |
| ConfluenceCloud.Content.space.status | String | Status of the space that the content is being created in. |
| ConfluenceCloud.Content.space._links.webui | String | Web user interface link to the space that the content is being created in. |
| ConfluenceCloud.Content.space._links.self | String | Link to the space that the content is being created in. |
| ConfluenceCloud.Content.history.latest | Boolean | Whether the content is the latest content. |
| ConfluenceCloud.Content.history.createdBy.type | String | Type of the user who created the content. |
| ConfluenceCloud.Content.history.createdBy.accountId | String | Account ID of the user creating the content. |
| ConfluenceCloud.Content.history.createdBy.accountType | String | Account type of the user creating the content. |
| ConfluenceCloud.Content.history.createdBy.email | String | Email of the user creating the content. |
| ConfluenceCloud.Content.history.createdBy.publicName | String | Public name of the user creating the content. |
| ConfluenceCloud.Content.history.createdBy.profilePicture.path | String | Profile picture path of the user creating the content. |
| ConfluenceCloud.Content.history.createdBy.profilePicture.width | Number | Width in pixels of the profile picture of the user. |
| ConfluenceCloud.Content.history.createdBy.profilePicture.height | Number | Height in pixels of the profile picture of the user. |
| ConfluenceCloud.Content.history.createdBy.profilePicture.isDefault | Boolean | Whether the profile picture is the default profile picture. |
| ConfluenceCloud.Content.history.createdBy.displayName | String | Display name of the user who created the content. |
| ConfluenceCloud.Content.history.createdBy.isExternalCollaborator | Boolean | Whether the user is an external collaborator. |
| ConfluenceCloud.Content.history.createdBy._links.self | String | Link to the creator of the content. |
| ConfluenceCloud.Content.history.createdDate | Date | Date and time, in ISO 8601 format, when the content was created. |
| ConfluenceCloud.Content.history._links.self | String | Link to the history of the content |
| ConfluenceCloud.Content.version.by.type | String | Type of the user who last updated the content. |
| ConfluenceCloud.Content.version.by.accountId | String | Account ID of the user who last updated the content. |
| ConfluenceCloud.Content.version.by.accountType | String | Account type of the user who last updated the content. |
| ConfluenceCloud.Content.version.by.email | String | Email of the user who last updated the content. |
| ConfluenceCloud.Content.version.by.publicName | String | Public name of the user who last updated the content. |
| ConfluenceCloud.Content.version.by.profilePicture.path | String | Profile picture of the user who last updated the content. |
| ConfluenceCloud.Content.version.by.profilePicture.width | Number | Width in pixels of the profile picture of the user who last updated the content. |
| ConfluenceCloud.Content.version.by.profilePicture.height | Number | Height in pixels of the profile picture of the user who last updated the content. |
| ConfluenceCloud.Content.version.by.profilePicture.isDefault | Boolean | Whether the profile picture is the default profile picture. |
| ConfluenceCloud.Content.version.by.displayName | String | Display name of the user who last updated the content. |
| ConfluenceCloud.Content.version.by.isExternalCollaborator | Boolean | Whether the user is an external collaborator. |
| ConfluenceCloud.Content.version.by._links.self | String | Link to the user who last updated the content. |
| ConfluenceCloud.Content.version.when | Date | Date and time, in ISO 8601 format, when the content was updated. |
| ConfluenceCloud.Content.version.friendlyWhen | String | Displays when the content was created. |
| ConfluenceCloud.Content.version.message | String | Message of the updated content. |
| ConfluenceCloud.Content.version.number | Number | Version number of the updated content. |
| ConfluenceCloud.Content.version.minorEdit | Boolean | Whether the edit was minor. |
| ConfluenceCloud.Content.version.confRev | String | The revision ID provided by Confluence to be used as a revision in Synchrony. |
| ConfluenceCloud.Content.version.contentTypeModified | Boolean | True if the content type is modified in the version. (e.g., page to blog) |
| ConfluenceCloud.Content.version._links.self | String | Link to the new version of the content. |
| ConfluenceCloud.Content.ancestors.id | String | ID of the parent page of the content. |
| ConfluenceCloud.Content.ancestors.type | String | Type of the parent page of the content. |
| ConfluenceCloud.Content.ancestors.status | String | Status of the parent page of the content. |
| ConfluenceCloud.Content.ancestors.title | String | Title of the parent page of the content. |
| ConfluenceCloud.Content.ancestors.extensions.position | Number | The content extension position. |
| ConfluenceCloud.Content.ancestors._links.self | String | Link to the parent page of the content. |
| ConfluenceCloud.Content.ancestors._links.tinyui | String | Tiny link to the parent page of the content. |
| ConfluenceCloud.Content.ancestors._links.editui | String | Edit user interface link to the parent page of the content. |
| ConfluenceCloud.Content.ancestors._links.webui | String | Web user interface link to the parent page of the content. |
| ConfluenceCloud.Content.container.id | Number | ID of the container of the content. |
| ConfluenceCloud.Content.container.key | String | Key of the container of the content. |
| ConfluenceCloud.Content.container.name | String | Name of the container of the content. |
| ConfluenceCloud.Content.container.type | String | Type of the container of the content. |
| ConfluenceCloud.Content.container.status | String | Status of the container of the content. |
| ConfluenceCloud.Content.container._links.webui | String | Web user interface link to the container of the content. |
| ConfluenceCloud.Content.container._links.self | String | Link to the container of the content. |
| ConfluenceCloud.Content.body.storage.value | String | The body of the new content. |
| ConfluenceCloud.Content.body.storage.representation | String | Representation format of the content. |
| ConfluenceCloud.Content.extensions.position | Number | The content extension position. |
| ConfluenceCloud.Content._links.editui | String | Edit user interface link of the content. |
| ConfluenceCloud.Content._links.webui | String | Web user interface link of the content. |
| ConfluenceCloud.Content._links.context | String | Context link of the content. |
| ConfluenceCloud.Content._links.self | String | Link to the content. |
| ConfluenceCloud.Content._links.tinyui | String | Tiny link of the content. |
| ConfluenceCloud.Content._links.collection | String | Collection link of the content. |
| ConfluenceCloud.Content._links.base | String | Base link to the content. |
Command Example
!confluence-cloud-content-create title="XSOAR_Page_234567" type=page space_key="XSOAR"
Context Example
{
"ConfluenceCloud": {
"Content": {
"_expandable": {
"children": "/rest/api/content/16711862/child",
"descendants": "/rest/api/content/16711862/descendant",
"restrictions": "/rest/api/content/16711862/restriction/byOperation"
},
"_links": {
"base": "https://xsoar-bd.atlassian.net/wiki",
"collection": "/rest/api/content",
"context": "/wiki",
"editui": "/pages/resumedraft.action?draftId=16711862",
"self": "https://xsoar-bd.atlassian.net/wiki/rest/api/content/16711862",
"tinyui": "/x/tgD-/",
"webui": "/spaces/XSOAR/pages/16711862/XSOAR_Page_234567"
},
"body": {
"storage": {
"_expandable": {
"content": "/rest/api/content/16711862"
},
"representation": "storage"
}
},
"container": {
"_expandable": {
"lookAndFeel": "/rest/api/settings/lookandfeel?spaceKey=XSOAR",
"settings": "/rest/api/space/XSOAR/settings",
"theme": "/rest/api/space/XSOAR/theme"
},
"_links": {
"self": "https://xsoar-bd.atlassian.net/wiki/rest/api/space/XSOAR",
"webui": "/spaces/XSOAR"
},
"history": {
"createdBy": {
"_links": {
"self": "https://xsoar-bd.atlassian.net/wiki/rest/api/user?accountId=5ff2e30b4d2179006ea18449"
},
"accountId": "5ff2e30b4d2179006ea18449",
"accountType": "atlassian",
"displayName": "John Doe",
"email": "dummy.dummy@dummy.com",
"isExternalCollaborator": false,
"profilePicture": {
"height": 48,
"isDefault": false,
"path": "/wiki/aa-avatar/5ff2e30b4d2179006ea18449",
"width": 48
},
"publicName": "John Doe",
"type": "known"
},
"createdDate": "2021-08-06T06:18:11.470Z"
},
"id": 2064386,
"key": "XSOAR",
"name": "XSOAR_Project",
"status": "current",
"type": "global"
},
"extensions": {
"position": 618
},
"history": {
"_links": {
"self": "https://xsoar-bd.atlassian.net/wiki/rest/api/content/16711862/history"
},
"createdBy": {
"_links": {
"self": "https://xsoar-bd.atlassian.net/wiki/rest/api/user?accountId=5ff2e30b4d2179006ea18449"
},
"accountId": "5ff2e30b4d2179006ea18449",
"accountType": "atlassian",
"displayName": "John Doe",
"email": "dummy.dummy@dummy.com",
"isExternalCollaborator": false,
"profilePicture": {
"height": 48,
"isDefault": false,
"path": "/wiki/aa-avatar/5ff2e30b4d2179006ea18449",
"width": 48
},
"publicName": "John Doe",
"type": "known"
},
"createdDate": "2021-09-02T06:36:33.937Z",
"latest": true
},
"id": "16711862",
"space": {
"_expandable": {
"lookAndFeel": "/rest/api/settings/lookandfeel?spaceKey=XSOAR",
"settings": "/rest/api/space/XSOAR/settings",
"theme": "/rest/api/space/XSOAR/theme"
},
"_links": {
"self": "https://xsoar-bd.atlassian.net/wiki/rest/api/space/XSOAR",
"webui": "/spaces/XSOAR"
},
"id": 2064386,
"key": "XSOAR",
"name": "XSOAR_Project",
"status": "current",
"type": "global"
},
"status": "current",
"title": "XSOAR_Page_234567",
"type": "page",
"version": {
"_expandable": {
"content": "/rest/api/content/16711862"
},
"_links": {
"self": "https://xsoar-bd.atlassian.net/wiki/rest/api/content/16711862/version/1"
},
"by": {
"_links": {
"self": "https://xsoar-bd.atlassian.net/wiki/rest/api/user?accountId=5ff2e30b4d2179006ea18449"
},
"accountId": "5ff2e30b4d2179006ea18449",
"accountType": "atlassian",
"displayName": "John Doe",
"email": "dummy.dummy@dummy.com",
"isExternalCollaborator": false,
"profilePicture": {
"height": 48,
"isDefault": false,
"path": "/wiki/aa-avatar/5ff2e30b4d2179006ea18449",
"width": 48
},
"publicName": "John Doe",
"type": "known"
},
"confRev": "confluence$content$16711862.2",
"contentTypeModified": false,
"friendlyWhen": "just a moment ago",
"minorEdit": false,
"number": 1,
"when": "2021-09-02T06:36:33.937Z"
}
}
}
}
Human Readable Output
Content
ID Title Type Status Space Name Created By Created At 16711862 XSOAR_Page_234567 page current XSOAR_Project John Doe 2021-09-02T06:36:33.937Z
confluence-cloud-comment-create
Creates a comment for the given content.
Note: To view the expansion of content properties, execute the confluence-cloud-content-list and confluence-cloud-content-search commands.
Base Command
confluence-cloud-comment-create
Input
| Argument Name | Description | Required |
|---|---|---|
| status | The status of the new content. Possible values: current, trashed, draft. Note: The term ‘current’ refers to the comment that is currently active. Default is current. |
Optional |
| body_value | The body of the new content. Note: ‘body_value’ must be a string. |
Required |
| body_representation | The content format type. Possible values: storage, editor2, editor. |
Required |
| ancestor_id | The ID of the parent comment for which to create the child comment. Note: To retrieve the ancestor_id, execute the confluence-cloud-content-search command using the query=”type=comment” argument. |
Optional |
| container_id | The ID of the container for which to create a comment. Note: To retrieve the container_id, execute the confluence-cloud-content-list command. |
Required |
| container_type | The type of the container. Possible values: page, blogpost. |
Optional |
Context Output
| Path | Type | Description |
|---|---|---|
| ConfluenceCloud.Comment.id | String | The ID of the comment. |
| ConfluenceCloud.Comment.type | String | Type of the comment. |
| ConfluenceCloud.Comment.status | String | Status of the comment. |
| ConfluenceCloud.Comment.title | String | Title of the comment. |
| ConfluenceCloud.Comment.childTypes.attachment.value | Boolean | Whether the attachment has the given comment. |
| ConfluenceCloud.Comment.childTypes.attachment._links.self | String | Link to the attachment with the given comment. |
| ConfluenceCloud.Comment.childTypes.comment.value | Boolean | Whether a comment is associated with the given comment. |
| ConfluenceCloud.Comment.childTypes.comment._links.self | String | Link to the comment associated with the given comment. |
| ConfluenceCloud.Comment.childTypes.page.value | Boolean | Whether the page is associated with the given comment. |
| ConfluenceCloud.Comment.childTypes.page._links.self | String | Link to the page associated with the given comment. |
| ConfluenceCloud.Comment.space.id | Number | ID of the space that the comment is being created in. |
| ConfluenceCloud.Comment.space.key | String | Key of the space that the comment is being created in. |
| ConfluenceCloud.Comment.space.name | String | Name of the space that the comment is being created in. |
| ConfluenceCloud.Comment.space.type | String | Type of the space that the comment is being created in. |
| ConfluenceCloud.Comment.space.status | String | Status of the space that the comment is being created in. |
| ConfluenceCloud.Comment.space._links.webui | String | Web user interface link to the space that the comment is being created in. |
| ConfluenceCloud.Comment.space._links.self | String | Link to the space that the comment is being created in. |
| ConfluenceCloud.Comment.history.latest | Boolean | Whether the comment is the latest comment. |
| ConfluenceCloud.Comment.history.createdBy.type | String | Type of the user who created the comment. |
| ConfluenceCloud.Comment.history.createdBy.accountId | String | Account ID of the user creating the comment. |
| ConfluenceCloud.Comment.history.createdBy.accountType | String | Account type of the user creating the comment. |
| ConfluenceCloud.Comment.history.createdBy.email | String | Email of the user creating the comment. |
| ConfluenceCloud.Comment.history.createdBy.publicName | String | Public name of the user creating the comment. |
| ConfluenceCloud.Comment.history.createdBy.profilePicture.path | String | Profile picture path of the user creating the comment. |
| ConfluenceCloud.Comment.history.createdBy.profilePicture.width | Number | Width in pixels of the profile picture of the user. |
| ConfluenceCloud.Comment.history.createdBy.profilePicture.height | Number | Height in pixels of the profile picture of the user. |
| ConfluenceCloud.Comment.history.createdBy.profilePicture.isDefault | Boolean | Whether the profile picture is default. |
| ConfluenceCloud.Comment.history.createdBy.displayName | String | Display name of the user who created the comment. |
| ConfluenceCloud.Comment.history.createdBy.isExternalCollaborator | Boolean | Whether the user is an external collaborator. |
| ConfluenceCloud.Comment.history.createdBy._links.self | String | Link to the creator of the comment. |
| ConfluenceCloud.Comment.history.createdDate | Date | Date and time, in ISO 8601 format, when the comment was created. |
| ConfluenceCloud.Comment.history._links.self | String | Link to the history of the comment. |
| ConfluenceCloud.Comment.version.by.type | String | Type of the user who last updated the comment. |
| ConfluenceCloud.Comment.version.by.accountId | String | Account ID of the user who last updated the comment. |
| ConfluenceCloud.Comment.version.by.accountType | String | Account type of the user who last updated the comment. |
| ConfluenceCloud.Comment.version.by.email | String | Email of the user who last updated the comment. |
| ConfluenceCloud.Comment.version.by.publicName | String | Public name of the user who last updated the comment. |
| ConfluenceCloud.Comment.version.by.profilePicture.path | String | Profile picture of the user who last updated the comment. |
| ConfluenceCloud.Comment.version.by.profilePicture.width | Number | Width in pixels of the profile picture of the user who last updated the comment. |
| ConfluenceCloud.Comment.version.by.profilePicture.height | Number | Height in pixels of the profile picture of the user who last updated the comment. |
| ConfluenceCloud.Comment.version.by.profilePicture.isDefault | Boolean | Whether the profile picture is the default profile picture. |
| ConfluenceCloud.Comment.version.by.displayName | String | Display name of the user who last updated the comment. |
| ConfluenceCloud.Comment.version.by.isExternalCollaborator | Boolean | Whether the user is an external collaborator. |
| ConfluenceCloud.Comment.version.by._links.self | String | Link to the user who last updated the comment. |
| ConfluenceCloud.Comment.version.when | Date | Date and time, in ISO 8601 format, when the comment was updated. |
| ConfluenceCloud.Comment.version.friendlyWhen | String | Displays when the content was created. |
| ConfluenceCloud.Comment.version.message | String | Message of the updated comment. |
| ConfluenceCloud.Comment.version.number | Number | Version number of the updated comment. |
| ConfluenceCloud.Comment.version.minorEdit | Boolean | Whether the edit was minor. |
| ConfluenceCloud.Comment.version.confRev | String | The revision ID provided by Confluence to be used as a revision in Synchrony. |
| ConfluenceCloud.Comment.version.contentTypeModified | Boolean | True if the comment type is modified in the version. (e.g., page to blog) |
| ConfluenceCloud.Comment.version._links.self | String | Link to the new version of the comment. |
| ConfluenceCloud.Comment.ancestors.id | String | ID of the parent page of the comment. |
| ConfluenceCloud.Comment.ancestors.type | String | Type of the parent page of the comment. |
| ConfluenceCloud.Comment.ancestors.status | String | Status of the parent page of the comment. |
| ConfluenceCloud.Comment.ancestors.title | String | Title of the parent page of the comment. |
| ConfluenceCloud.Comment.ancestors.extensions.location | String | Location of the comment. |
| ConfluenceCloud.Comment.ancestors._links.self | String | Link to the parent page of the comment. |
| ConfluenceCloud.Comment.ancestors._links.tinyui | String | Tiny link to the parent page of the comment. |
| ConfluenceCloud.Comment.ancestors._links.editui | String | Edit user interface link to the parent page of the comment. |
| ConfluenceCloud.Comment.ancestors._links.webui | String | Web user interface link to the parent page of the comment. |
| ConfluenceCloud.Comment.container.id | Number | ID of the container of the comment. |
| ConfluenceCloud.Comment.container.key | String | Key of the container of the comment. |
| ConfluenceCloud.Comment.container.name | String | Name of the container of the comment. |
| ConfluenceCloud.Comment.container.type | String | Type of the container of the comment. |
| ConfluenceCloud.Comment.container.status | String | Status of the container of the comment. |
| ConfluenceCloud.Comment.container._links.webui | String | Web user interface link to the container of the comment. |
| ConfluenceCloud.Comment.container._links.self | String | Link to the container of the comment. |
| ConfluenceCloud.Comment.body.storage.value | String | The body of the new comment. |
| ConfluenceCloud.Comment.body.storage.representation | String | Representation format of the comment. |
| ConfluenceCloud.Comment.extensions.location | String | Location of the comment. |
| ConfluenceCloud.Comment._links.editui | String | Edit user interface link of the comment. |
| ConfluenceCloud.Comment._links.webui | String | Web user interface link of the comment. |
| ConfluenceCloud.Comment._links.context | String | Context link of the comment. |
| ConfluenceCloud.Comment._links.self | String | Link to the comment. |
| ConfluenceCloud.Comment._links.tinyui | String | Tiny link of the comment. |
| ConfluenceCloud.Comment._links.collection | String | Collection link of the comment. |
| ConfluenceCloud.Comment._links.base | String | Base link to the comment. |
Command Example
!confluence-cloud-comment-create body_value="hello" body_representation="storage" container_id=2031630
Context Example
{
"ConfluenceCloud": {
"Comment": {
"_expandable": {
"children": "/rest/api/content/16711873/child",
"descendants": "/rest/api/content/16711873/descendant",
"restrictions": "/rest/api/content/16711873/restriction/byOperation"
},
"_links": {
"base": "https://xsoar-bd.atlassian.net/wiki",
"collection": "/rest/api/content",
"context": "/wiki",
"self": "https://xsoar-bd.atlassian.net/wiki/rest/api/content/16711873",
"webui": "/spaces/XSOAR/blog/2021/08/06/2031630/XSOAR_blogpost?focusedCommentId=16711873#comment-16711873"
},
"body": {
"storage": {
"_expandable": {
"content": "/rest/api/content/16711873"
},
"representation": "storage",
"value": "hello"
}
},
"container": {
"_expandable": {
"children": "/rest/api/content/2031630/child",
"container": "/rest/api/space/XSOAR",
"descendants": "/rest/api/content/2031630/descendant",
"restrictions": "/rest/api/content/2031630/restriction/byOperation",
"space": "/rest/api/space/XSOAR"
},
"_links": {
"editui": "/pages/resumedraft.action?draftId=2031630",
"self": "https://xsoar-bd.atlassian.net/wiki/rest/api/content/2031630",
"tinyui": "/x/DgAf",
"webui": "/spaces/XSOAR/blog/2021/08/06/2031630/XSOAR_blogpost"
},
"history": {
"_links": {
"self": "https://xsoar-bd.atlassian.net/wiki/rest/api/content/2031630/history"
},
"createdBy": {
"_links": {
"self": "https://xsoar-bd.atlassian.net/wiki/rest/api/user?accountId=5ff2e30b4d2179006ea18449"
},
"accountId": "5ff2e30b4d2179006ea18449",
"accountType": "atlassian",
"displayName": "John Doe",
"email": "dummy.dummy@dummy.com",
"isExternalCollaborator": false,
"profilePicture": {
"height": 48,
"isDefault": false,
"path": "/wiki/aa-avatar/5ff2e30b4d2179006ea18449",
"width": 48
},
"publicName": "John Doe",
"type": "known"
},
"createdDate": "2021-08-06T06:59:04.777Z",
"latest": true
},
"id": "2031630",
"status": "current",
"title": "XSOAR_blogpost",
"type": "blogpost",
"version": {
"_expandable": {
"content": "/rest/api/content/2031630"
},
"_links": {
"self": "https://xsoar-bd.atlassian.net/wiki/rest/api/content/2031630/version/1"
},
"by": {
"_links": {
"self": "https://xsoar-bd.atlassian.net/wiki/rest/api/user?accountId=5ff2e30b4d2179006ea18449"
},
"accountId": "5ff2e30b4d2179006ea18449",
"accountType": "atlassian",
"displayName": "John Doe",
"email": "dummy.dummy@dummy.com",
"isExternalCollaborator": false,
"profilePicture": {
"height": 48,
"isDefault": false,
"path": "/wiki/aa-avatar/5ff2e30b4d2179006ea18449",
"width": 48
},
"publicName": "John Doe",
"type": "known"
},
"confRev": "confluence$content$2031630.4",
"contentTypeModified": false,
"friendlyWhen": "Aug 06, 2021",
"minorEdit": false,
"number": 1,
"syncRev": "0.confluence$content$2031630.3",
"syncRevSource": "synchrony-ack",
"when": "2021-08-06T06:59:04.777Z"
}
},
"extensions": {
"location": "footer"
},
"history": {
"_links": {
"self": "https://xsoar-bd.atlassian.net/wiki/rest/api/content/16711873/history"
},
"createdBy": {
"_links": {
"self": "https://xsoar-bd.atlassian.net/wiki/rest/api/user?accountId=5ff2e30b4d2179006ea18449"
},
"accountId": "5ff2e30b4d2179006ea18449",
"accountType": "atlassian",
"displayName": "John Doe",
"email": "dummy.dummy@dummy.com",
"isExternalCollaborator": false,
"profilePicture": {
"height": 48,
"isDefault": false,
"path": "/wiki/aa-avatar/5ff2e30b4d2179006ea18449",
"width": 48
},
"publicName": "John Doe",
"type": "known"
},
"createdDate": "2021-09-02T06:36:36.737Z",
"latest": true
},
"id": "16711873",
"space": {
"_expandable": {
"lookAndFeel": "/rest/api/settings/lookandfeel?spaceKey=XSOAR",
"settings": "/rest/api/space/XSOAR/settings",
"theme": "/rest/api/space/XSOAR/theme"
},
"_links": {
"self": "https://xsoar-bd.atlassian.net/wiki/rest/api/space/XSOAR",
"webui": "/spaces/XSOAR"
},
"id": 2064386,
"key": "XSOAR",
"name": "XSOAR_Project",
"status": "current",
"type": "global"
},
"status": "current",
"title": "Re: XSOAR_blogpost",
"type": "comment",
"version": {
"_expandable": {
"content": "/rest/api/content/16711873"
},
"_links": {
"self": "https://xsoar-bd.atlassian.net/wiki/rest/api/content/16711873/version/1"
},
"by": {
"_links": {
"self": "https://xsoar-bd.atlassian.net/wiki/rest/api/user?accountId=5ff2e30b4d2179006ea18449"
},
"accountId": "5ff2e30b4d2179006ea18449",
"accountType": "atlassian",
"displayName": "John Doe",
"email": "dummy.dummy@dummy.com",
"isExternalCollaborator": false,
"profilePicture": {
"height": 48,
"isDefault": false,
"path": "/wiki/aa-avatar/5ff2e30b4d2179006ea18449",
"width": 48
},
"publicName": "John Doe",
"type": "known"
},
"contentTypeModified": false,
"friendlyWhen": "just a moment ago",
"minorEdit": false,
"number": 1,
"when": "2021-09-02T06:36:36.737Z"
}
}
}
}
Human Readable Output
Comment
ID Title Type Status Space Name Created By Created At 16711873 Re: XSOAR_blogpost comment current XSOAR_Project John Doe 2021-09-02T06:36:36.737Z
confluence-cloud-space-list
Returns a list of all Confluence spaces.
Base Command
confluence-cloud-space-list
Input
| Argument Name | Description | Required |
|---|---|---|
| limit | Number of records to retrieve in the response. Note: The minimum value supported is 0 and the maximum value supported is int32. Default is 50. |
Optional |
| offset | The starting index of the returned spaces. Note: The minimum value supported is 0 and the maximum value supported is int32. Default is 0. |
Optional |
| space_key | The space key to retrieve the specific space. Note: Supports a comma-separated list of values. |
Optional |
| space_id | The space ID to retrieve the specific space. Note: Supports a comma-separated list of values. |
Optional |
| status | Filter the results to list the spaces based on their status. Possible values: current, archived. Note: The term ‘current’ refers to the space that is currently active. |
Optional |
| type | Filter the results to list the spaces based on their type. Possible values: global, personal. |
Optional |
| favourite | Filter the results to the favorite spaces of the current user. Possible values: true, false. |
Optional |
| expand | Indicates which properties to expand. For reference, visit https://developer.atlassian.com/cloud/confluence/rest/api-group-space/#api-wiki-rest-api-space-get. Note: To separate multiple values, use commas. Expanded properties will be populated in context data only. |
Optional |
Context Output
| Path | Type | Description |
|---|---|---|
| ConfluenceCloud.Space.id | Number | ID of the space. |
| ConfluenceCloud.Space.key | String | Key of the space. |
| ConfluenceCloud.Space.name | String | Name of the space. |
| ConfluenceCloud.Space.description.view.value | String | The description of the space in view format. |
| ConfluenceCloud.Space.description.view.representation | String | Representation format of the description in view format. |
| ConfluenceCloud.Space.description.plain.value | String | The description of the space in plain format. |
| ConfluenceCloud.Space.description.plain.representation | String | Representation format of the description in plain format. |
| ConfluenceCloud.Space.homepage.id | String | ID of the homepage of the space. |
| ConfluenceCloud.Space.homepage.type | String | Type of the homepage of the space. |
| ConfluenceCloud.Space.homepage.status | String | Status of the homepage of the space. |
| ConfluenceCloud.Space.homepage.title | String | Title of the homepage of the space. |
| ConfluenceCloud.Space.homepage.extensions.position | Number | The content extension position. |
| ConfluenceCloud.Space.homepage._links.self | String | Link to the homepage of the space. |
| ConfluenceCloud.Space.homepage._links.tinyui | String | Tiny link to the homepage of the space. |
| ConfluenceCloud.Space.homepage._links.editui | String | Edit the user interface link to the homepage of the space. |
| ConfluenceCloud.Space.homepage._links.webui | String | Web user interface link to the homepage of the space. |
| ConfluenceCloud.Space.type | String | Type of the space. |
| ConfluenceCloud.Space.permissions.id | Number | ID of the space permission. |
| ConfluenceCloud.Space.permissions.subjects.user.results.type | String | Type of the user to whom the space permission applies. |
| ConfluenceCloud.Space.permissions.subjects.user.results.accountId | String | Account ID of the user to whom the space permission applies. |
| ConfluenceCloud.Space.permissions.subjects.user.results.accountType | String | Account type of the user to whom the space permission applies. |
| ConfluenceCloud.Space.permissions.subjects.user.results.email | String | Email of the user to whom the space permission applies. |
| ConfluenceCloud.Space.permissions.subjects.user.results.publicName | String | Public name to whom the space permission applies. |
| ConfluenceCloud.Space.permissions.subjects.user.results.profilePicture.path | String | Path of the user’s profile picture to whom the space permission applies. |
| ConfluenceCloud.Space.permissions.subjects.user.results.profilePicture.width | Number | Width in pixels of the user’s profile picture to whom the space permission applies. |
| ConfluenceCloud.Space.permissions.subjects.user.results.profilePicture.height | Number | Height in pixels of the user’s profile picture to whom the space permission applies. |
| ConfluenceCloud.Space.permissions.subjects.user.results.profilePicture.isDefault | Boolean | Whether the profile picture of the user is the default profile picture to whom the space permission applies. |
| ConfluenceCloud.Space.permissions.subjects.user.results.displayName | String | Display name of the user to whom the space permission applies. |
| ConfluenceCloud.Space.permissions.subjects.user.results.isExternalCollaborator | Boolean | Whether the user is an external collaborator user. |
| ConfluenceCloud.Space.permissions.subjects.user.results._links.self | String | Link to the user to whom the space permission applies. |
| ConfluenceCloud.Space.permissions.subjects.user.size | Number | Size of the list of users for a given space. |
| ConfluenceCloud.Space.permissions.subjects.group.results.type | String | Type of the group to whom the space permission applies. |
| ConfluenceCloud.Space.permissions.subjects.group.results.name | String | Name of the group to whom the space permission applies. |
| ConfluenceCloud.Space.permissions.subjects.group.results.id | String | ID of the group to whom the space permission applies. |
| ConfluenceCloud.Space.permissions.subjects.group.results._links.self | String | Link to the group to whom the space permission applies. |
| ConfluenceCloud.Space.permissions.subjects.group.size | Number | Size of the list of groups for the given space. |
| ConfluenceCloud.Space.permissions.operation.operation | String | Name of the permission operation. |
| ConfluenceCloud.Space.permissions.operation.targetType | String | The space or content type that the operation applies to. |
| ConfluenceCloud.Space.permissions.anonymousAccess | Boolean | Whether anonymous users have permission to use the operation. |
| ConfluenceCloud.Space.permissions.unlicensedAccess | Boolean | Whether unlicensed users have access from JIRA Service Desk when used with the read space operation. |
| ConfluenceCloud.Space.status | String | Status of the space. |
| ConfluenceCloud.Space._links.webui | String | Web user interface link of the space. |
| ConfluenceCloud.Space._links.context | String | Context link of the space. |
| ConfluenceCloud.Space._links.self | String | Link to the space. |
| ConfluenceCloud.Space._links.collection | String | Collection link of the space. |
| ConfluenceCloud.Space._links.base | String | Base link to the space. |
Command Example
!confluence-cloud-space-list limit=2
Context Example
{
"ConfluenceCloud": {
"Space": [
{
"_expandable": {
"homepage": "/rest/api/content/12943822",
"lookAndFeel": "/rest/api/settings/lookandfeel?spaceKey=unique2",
"settings": "/rest/api/space/unique2/settings",
"theme": "/rest/api/space/unique2/theme"
},
"_links": {
"self": "https://xsoar-bd.atlassian.net/wiki/rest/api/space/unique2",
"webui": "/spaces/unique2"
},
"history": {
"createdBy": {
"_links": {
"self": "https://xsoar-bd.atlassian.net/wiki/rest/api/user?accountId=5ff2e30b4d2179006ea18449"
},
"accountId": "5ff2e30b4d2179006ea18449",
"accountType": "atlassian",
"displayName": "John Doe",
"email": "dummy.dummy@dummy.com",
"isExternalCollaborator": false,
"profilePicture": {
"height": 48,
"isDefault": false,
"path": "/wiki/aa-avatar/5ff2e30b4d2179006ea18449",
"width": 48
},
"publicName": "John Doe",
"type": "known"
},
"createdDate": "2021-08-26T08:50:12.879Z"
},
"id": 12943669,
"key": "unique2",
"name": "11Nam quis nulla. Integer malesuada. In in enim a arcu imperdiet malesuada. Sed vel lectus. Donec odio urna, tempus molestie, porttitor ut, iaculis quis, sem. Phasellus rhoncus. Aenean id metus id velit",
"status": "current",
"type": "global"
},
{
"_expandable": {
"homepage": "/rest/api/content/12976407",
"lookAndFeel": "/rest/api/settings/lookandfeel?spaceKey=unique22",
"settings": "/rest/api/space/unique22/settings",
"theme": "/rest/api/space/unique22/theme"
},
"_links": {
"self": "https://xsoar-bd.atlassian.net/wiki/rest/api/space/unique22",
"webui": "/spaces/unique22"
},
"history": {
"createdBy": {
"_links": {
"self": "https://xsoar-bd.atlassian.net/wiki/rest/api/user?accountId=5ff2e30b4d2179006ea18449"
},
"accountId": "5ff2e30b4d2179006ea18449",
"accountType": "atlassian",
"displayName": "John Doe",
"email": "dummy.dummy@dummy.com",
"isExternalCollaborator": false,
"profilePicture": {
"height": 48,
"isDefault": false,
"path": "/wiki/aa-avatar/5ff2e30b4d2179006ea18449",
"width": 48
},
"publicName": "John Doe",
"type": "known"
},
"createdDate": "2021-08-26T13:19:25.526Z"
},
"id": 12976314,
"key": "unique22",
"name": "11Nam quis nulla. Integer malesuada. In in enim a arcu imperdiet malesuada. Sed vel lectus. Donec odio urna, tempus molestie, porttitor ut, iaculis quis, sem. Phasellus rhoncus. Aenean id metus id velit",
"status": "current",
"type": "global"
}
]
}
}
Human Readable Output
Space(s)
ID Space Key Name Type Status Created By Created At 12943669 unique2 11Nam quis nulla. Integer malesuada. In in enim a arcu imperdiet malesuada. Sed vel lectus. Donec odio urna, tempus molestie, porttitor ut, iaculis quis, sem. Phasellus rhoncus. Aenean id metus id velit global current John Doe 2021-08-26T08:50:12.879Z 12976314 unique22 11Nam quis nulla. Integer malesuada. In in enim a arcu imperdiet malesuada. Sed vel lectus. Donec odio urna, tempus molestie, porttitor ut, iaculis quis, sem. Phasellus rhoncus. Aenean id metus id velit global current John Doe 2021-08-26T13:19:25.526Z
confluence-cloud-content-list
Returns the list of content of Confluence.
Base Command
confluence-cloud-content-list
Input
| Argument Name | Description | Required |
|---|---|---|
| limit | Number of records to retrieve in the response. Note: The minimum value supported is 0 and the maximum value supported is int32. Default is 50. |
Optional |
| offset | The starting index of the returned content. Note: The minimum value supported is 0 and the maximum value supported is int32. Default is 0. |
Optional |
| space_key | The space key to retrieve the contents of a specific space. | Optional |
| type | The type to retrieve the contents. Possible values: page, blogpost. Default is page. |
Optional |
| sort_order | Order in which the response will be sorted. Possible values: asc, desc. Note: If ‘sort_key’ is specified, the default value for ‘sort_order’ is ascending. |
Optional |
| sort_key | Key based on which the response will be sorted. Note: If ‘sort_order’ is specified, ‘sort_key’ is required. |
Optional |
| creation_date | The date from which to return the content created on that specific date. Formats accepted: 2 days, 2 weeks, 2 months, 2 years, yyyy-mm-dd. |
Optional |
| status | Filter the results to a set of content based on their status. If set to any, content with any status is returned. Possible values: any, current, trashed, draft, archived. Note: The term ‘current’ refers to the content that is currently active. |
Optional |
| expand | Indicates which properties to expand. For reference, visit https://developer.atlassian.com/cloud/confluence/rest/api-group-content/#api-wiki-rest-api-content-get. Note: To separate multiple values, use commas. Expanded properties will be populated in context data only. |
Optional |
Context Output
| Path | Type | Description |
|---|---|---|
| ConfluenceCloud.Content.id | String | The ID of the content. |
| ConfluenceCloud.Content.type | String | Type of the content. |
| ConfluenceCloud.Content.status | String | Status of the content. |
| ConfluenceCloud.Content.title | String | Title of the content. |
| ConfluenceCloud.Content.childTypes.attachment.value | Boolean | Whether the attachment has the given content. |
| ConfluenceCloud.Content.childTypes.attachment._links.self | String | Link to the attachment with the given content. |
| ConfluenceCloud.Content.childTypes.comment.value | Boolean | Whether a comment is associated with the given content. |
| ConfluenceCloud.Content.childTypes.comment._links.self | String | Link to the comment associated with the given content. |
| ConfluenceCloud.Content.childTypes.page.value | Boolean | Whether the page is associated with the given content. |
| ConfluenceCloud.Content.childTypes.page._links.self | String | Link to page associated with given content. |
| ConfluenceCloud.Content.space.id | Number | ID of the space that the content is being created in. |
| ConfluenceCloud.Content.space.key | String | Key of the space that the content is being created in. |
| ConfluenceCloud.Content.space.name | String | Name of the space that the content is being created in. |
| ConfluenceCloud.Content.space.type | String | Type of the space that the content is being created in. |
| ConfluenceCloud.Content.space.status | String | Status of the space that the content is being created in. |
| ConfluenceCloud.Content.space._links.webui | String | Web user interface link to the space that the content is being created in. |
| ConfluenceCloud.Content.space._links.self | String | Link to the space that the content is being created in. |
| ConfluenceCloud.Content.history.latest | Boolean | Whether the content is the latest content. |
| ConfluenceCloud.Content.history.createdBy.type | String | Type of the user who created the content. |
| ConfluenceCloud.Content.history.createdBy.accountId | String | Account ID of the user creating the content. |
| ConfluenceCloud.Content.history.createdBy.accountType | String | Account type of the user creating the content. |
| ConfluenceCloud.Content.history.createdBy.email | String | Email of the user creating the content. |
| ConfluenceCloud.Content.history.createdBy.publicName | String | Public name of the user creating the content. |
| ConfluenceCloud.Content.history.createdBy.profilePicture.path | String | Profile picture path of the user creating the content. |
| ConfluenceCloud.Content.history.createdBy.profilePicture.width | Number | Width in pixels of the profile picture of the user. |
| ConfluenceCloud.Content.history.createdBy.profilePicture.height | Number | Height in pixels of the profile picture of the user. |
| ConfluenceCloud.Content.history.createdBy.profilePicture.isDefault | Boolean | Whether the profile picture is the default profile picture. |
| ConfluenceCloud.Content.history.createdBy.displayName | String | Display name of the user who created the content. |
| ConfluenceCloud.Content.history.createdBy.isExternalCollaborator | Boolean | Whether the user is an external collaborator. |
| ConfluenceCloud.Content.history.createdBy._links.self | String | Link to the creator of the content. |
| ConfluenceCloud.Content.history.createdDate | Date | Date and time, in ISO 8601 format, when the content was created. |
| ConfluenceCloud.Content.history._links.self | String | Link to the history of the content. |
| ConfluenceCloud.Content.version.by.type | String | Type of the user who last updated the content. |
| ConfluenceCloud.Content.version.by.accountId | String | Account ID of the user who last updated the content. |
| ConfluenceCloud.Content.version.by.accountType | String | Account type of the user who last updated the content. |
| ConfluenceCloud.Content.version.by.email | String | Email of the user who last updated the content. |
| ConfluenceCloud.Content.version.by.publicName | String | Public name of the user who last updated the content. |
| ConfluenceCloud.Content.version.by.profilePicture.path | String | Profile picture path of the user who last updated the content. |
| ConfluenceCloud.Content.version.by.profilePicture.width | Number | Width in pixels of the profile picture of the user who last updated the content. |
| ConfluenceCloud.Content.version.by.profilePicture.height | Number | Height in pixels of the profile picture of the user who last updated the content. |
| ConfluenceCloud.Content.version.by.profilePicture.isDefault | Boolean | Whether the profile picture is the default profile picture. |
| ConfluenceCloud.Content.version.by.displayName | String | Display name of the user who last updated the content. |
| ConfluenceCloud.Content.version.by.isExternalCollaborator | Boolean | Whether the user is an external collaborator. |
| ConfluenceCloud.Content.version.by._links.self | String | Link to the user who last updated the content. |
| ConfluenceCloud.Content.version.when | Date | Date and time, in ISO 8601 format, when the content was updated. |
| ConfluenceCloud.Content.version.friendlyWhen | String | Displays when the content was created. |
| ConfluenceCloud.Content.version.message | String | Message of the updated content. |
| ConfluenceCloud.Content.version.number | Number | Version number of the updated content. |
| ConfluenceCloud.Content.version.minorEdit | Boolean | Whether the edit was minor. |
| ConfluenceCloud.Content.version.confRev | String | The revision ID provided by Confluence to be used as a revision in Synchrony |
| ConfluenceCloud.Content.version.contentTypeModified | Boolean | True if the content type is modified in the version. (e.g., page to blog) |
| ConfluenceCloud.Content.version._links.self | String | Link to the new version of the content. |
| ConfluenceCloud.Content.ancestors.id | String | ID of the parent page of the content. |
| ConfluenceCloud.Content.ancestors.type | String | Type of the parent page of the content. |
| ConfluenceCloud.Content.ancestors.status | String | Status of the parent page of the content. |
| ConfluenceCloud.Content.container.id | Number | ID of the container of the content. |
| ConfluenceCloud.Content.container.key | String | Key of the container of the content. |
| ConfluenceCloud.Content.container.name | String | Name of the container of the content. |
| ConfluenceCloud.Content.container.type | String | Type of the container of the content. |
| ConfluenceCloud.Content.container.status | String | Status of the container of the content. |
| ConfluenceCloud.Content.container._links.webui | String | Web user interface link to the container of the content. |
| ConfluenceCloud.Content.container._links.self | String | Link to the container of the content. |
| ConfluenceCloud.Content.body.storage.value | String | The body of the new content. |
| ConfluenceCloud.Content.body.storage.representation | String | Representation format of the content. |
| ConfluenceCloud.Content.extensions.position | Number | The content extension position. |
| ConfluenceCloud.Content._links.editui | String | Edit the user interface link of the content. |
| ConfluenceCloud.Content._links.webui | String | Web user interface link of the content. |
| ConfluenceCloud.Content._links.self | String | Link to the content. |
| ConfluenceCloud.Content._links.tinyui | String | Tiny link of the content. |
Command Example
!confluence-cloud-content-list limit=2
Context Example
{
"ConfluenceCloud": {
"Content": [
{
"_expandable": {
"children": "/rest/api/content/65639/child",
"descendants": "/rest/api/content/65639/descendant",
"restrictions": "/rest/api/content/65639/restriction/byOperation"
},
"_links": {
"editui": "/pages/resumedraft.action?draftId=65639",
"self": "https://xsoar-bd.atlassian.net/wiki/rest/api/content/65639",
"tinyui": "/x/ZwAB",
"webui": "/spaces/~680738455/pages/65639/demo"
},
"childTypes": {
"attachment": {
"_links": {
"self": "https://xsoar-bd.atlassian.net/wiki/rest/api/content/65639/child/attachment"
},
"value": false
},
"comment": {
"_links": {
"self": "https://xsoar-bd.atlassian.net/wiki/rest/api/content/65639/child/comment"
},
"value": true
},
"page": {
"_links": {
"self": "https://xsoar-bd.atlassian.net/wiki/rest/api/content/65639/child/page"
},
"value": true
}
},
"container": {
"_expandable": {
"lookAndFeel": "/rest/api/settings/lookandfeel?spaceKey=~680738455",
"settings": "/rest/api/space/~680738455/settings",
"theme": "/rest/api/space/~680738455/theme"
},
"_links": {
"self": "https://xsoar-bd.atlassian.net/wiki/rest/api/space/~680738455",
"webui": "/spaces/~680738455"
},
"id": 65538,
"key": "~680738455",
"name": "John Doe",
"status": "current",
"type": "personal"
},
"extensions": {
"position": "none"
},
"history": {
"_links": {
"self": "https://xsoar-bd.atlassian.net/wiki/rest/api/content/65639/history"
},
"createdBy": {
"_links": {
"self": "https://xsoar-bd.atlassian.net/wiki/rest/api/user?accountId=5ff2e30b4d2179006ea18449"
},
"accountId": "5ff2e30b4d2179006ea18449",
"accountType": "atlassian",
"displayName": "John Doe",
"email": "dummy.dummy@dummy.com",
"isExternalCollaborator": false,
"profilePicture": {
"height": 48,
"isDefault": false,
"path": "/wiki/aa-avatar/5ff2e30b4d2179006ea18449",
"width": 48
},
"publicName": "John Doe",
"type": "known"
},
"createdDate": "2021-08-02T09:53:05.077Z",
"latest": true
},
"id": "65639",
"space": {
"_expandable": {
"lookAndFeel": "/rest/api/settings/lookandfeel?spaceKey=~680738455",
"settings": "/rest/api/space/~680738455/settings",
"theme": "/rest/api/space/~680738455/theme"
},
"_links": {
"self": "https://xsoar-bd.atlassian.net/wiki/rest/api/space/~680738455",
"webui": "/spaces/~680738455"
},
"id": 65538,
"key": "~680738455",
"name": "John Doe",
"status": "current",
"type": "personal"
},
"status": "current",
"title": "demo",
"type": "page",
"version": {
"_expandable": {
"content": "/rest/api/content/65639"
},
"_links": {
"self": "https://xsoar-bd.atlassian.net/wiki/rest/api/content/65639/version/4"
},
"by": {
"_links": {
"self": "https://xsoar-bd.atlassian.net/wiki/rest/api/user?accountId=5ff2e30b4d2179006ea18449"
},
"accountId": "5ff2e30b4d2179006ea18449",
"accountType": "atlassian",
"displayName": "John Doe",
"email": "dummy.dummy@dummy.com",
"isExternalCollaborator": false,
"profilePicture": {
"height": 48,
"isDefault": false,
"path": "/wiki/aa-avatar/5ff2e30b4d2179006ea18449",
"width": 48
},
"publicName": "John Doe",
"type": "known"
},
"confRev": "confluence$content$65639.32",
"contentTypeModified": false,
"friendlyWhen": "yesterday at 11:39 AM",
"minorEdit": false,
"number": 4,
"syncRev": "0.confluence$content$65639.30",
"syncRevSource": "synchrony-ack",
"when": "2021-09-01T06:09:38.912Z"
}
},
{
"_expandable": {
"children": "/rest/api/content/65656/child",
"descendants": "/rest/api/content/65656/descendant",
"restrictions": "/rest/api/content/65656/restriction/byOperation"
},
"_links": {
"editui": "/pages/resumedraft.action?draftId=65656",
"self": "https://xsoar-bd.atlassian.net/wiki/rest/api/content/65656",
"tinyui": "/x/eAAB",
"webui": "/spaces/~680738455/pages/65656/Product+requirements"
},
"ancestors": [
{
"_expandable": {
"children": "/rest/api/content/65639/child",
"container": "/rest/api/space/~680738455",
"descendants": "/rest/api/content/65639/descendant",
"history": "/rest/api/content/65639/history",
"restrictions": "/rest/api/content/65639/restriction/byOperation",
"space": "/rest/api/space/~680738455"
},
"_links": {
"editui": "/pages/resumedraft.action?draftId=65639",
"self": "https://xsoar-bd.atlassian.net/wiki/rest/api/content/65639",
"tinyui": "/x/ZwAB",
"webui": "/spaces/~680738455/pages/65639/demo"
},
"extensions": {
"position": "none"
},
"id": "65639",
"status": "current",
"title": "demo",
"type": "page"
}
],
"childTypes": {
"attachment": {
"_links": {
"self": "https://xsoar-bd.atlassian.net/wiki/rest/api/content/65656/child/attachment"
},
"value": false
},
"comment": {
"_links": {
"self": "https://xsoar-bd.atlassian.net/wiki/rest/api/content/65656/child/comment"
},
"value": true
},
"page": {
"_links": {
"self": "https://xsoar-bd.atlassian.net/wiki/rest/api/content/65656/child/page"
},
"value": false
}
},
"container": {
"_expandable": {
"lookAndFeel": "/rest/api/settings/lookandfeel?spaceKey=~680738455",
"settings": "/rest/api/space/~680738455/settings",
"theme": "/rest/api/space/~680738455/theme"
},
"_links": {
"self": "https://xsoar-bd.atlassian.net/wiki/rest/api/space/~680738455",
"webui": "/spaces/~680738455"
},
"id": 65538,
"key": "~680738455",
"name": "John Doe",
"status": "current",
"type": "personal"
},
"extensions": {
"position": 499279072
},
"history": {
"_links": {
"self": "https://xsoar-bd.atlassian.net/wiki/rest/api/content/65656/history"
},
"createdBy": {
"_links": {
"self": "https://xsoar-bd.atlassian.net/wiki/rest/api/user?accountId=5ff2e30b4d2179006ea18449"
},
"accountId": "5ff2e30b4d2179006ea18449",
"accountType": "atlassian",
"displayName": "John Doe",
"email": "dummy.dummy@dummy.com",
"isExternalCollaborator": false,
"profilePicture": {
"height": 48,
"isDefault": false,
"path": "/wiki/aa-avatar/5ff2e30b4d2179006ea18449",
"width": 48
},
"publicName": "John Doe",
"type": "known"
},
"createdDate": "2021-08-02T09:53:05.312Z",
"latest": true
},
"id": "65656",
"space": {
"_expandable": {
"lookAndFeel": "/rest/api/settings/lookandfeel?spaceKey=~680738455",
"settings": "/rest/api/space/~680738455/settings",
"theme": "/rest/api/space/~680738455/theme"
},
"_links": {
"self": "https://xsoar-bd.atlassian.net/wiki/rest/api/space/~680738455",
"webui": "/spaces/~680738455"
},
"id": 65538,
"key": "~680738455",
"name": "John Doe",
"status": "current",
"type": "personal"
},
"status": "current",
"title": "Product requirements",
"type": "page",
"version": {
"_expandable": {
"content": "/rest/api/content/65656"
},
"_links": {
"self": "https://xsoar-bd.atlassian.net/wiki/rest/api/content/65656/version/1"
},
"by": {
"_links": {
"self": "https://xsoar-bd.atlassian.net/wiki/rest/api/user?accountId=5ff2e30b4d2179006ea18449"
},
"accountId": "5ff2e30b4d2179006ea18449",
"accountType": "atlassian",
"displayName": "John Doe",
"email": "dummy.dummy@dummy.com",
"isExternalCollaborator": false,
"profilePicture": {
"height": 48,
"isDefault": false,
"path": "/wiki/aa-avatar/5ff2e30b4d2179006ea18449",
"width": 48
},
"publicName": "John Doe",
"type": "known"
},
"confRev": "confluence$content$65656.5",
"contentTypeModified": false,
"friendlyWhen": "Aug 02, 2021",
"minorEdit": false,
"number": 1,
"syncRev": "0.confluence$content$65656.2",
"syncRevSource": "synchrony-ack",
"when": "2021-08-02T09:53:05.312Z"
}
}
]
}
}
Human Readable Output
Content(s)
ID Title Type Status Space Name Created By Created At Version 65639 demo page current John Doe John Doe 2021-08-02T09:53:05.077Z 2 65656 Product requirements page current John Doe John Doe 2021-08-02T09:53:05.312Z 2
confluence-cloud-content-delete
Delete the content depending on the content’s type and status.
Note: If the content’s type is page or blogpost, it should be moved to trash before deleting permanently.
Base Command
confluence-cloud-content-delete
Input
| Argument Name | Description | Required |
|---|---|---|
| content_id | The ID of the content to be deleted. | Required |
| deletion_type | The deletion type for the content to be deleted. Possible values: move to trash (current), permanent delete (trashed), permanent delete draft (draft). |
Optional |
Context Output
There is no context output for this command.
Command Example
!confluence-cloud-content-delete content_id="3704312"
Human Readable Output
Content with Id 3704312 is deleted successfully.
confluence-cloud-content-update
Update the existing content with new content.
Note: Updating draft content is currently not supported.
Base Command
confluence-cloud-content-update
Input
| Argument Name | Description | Required |
|---|---|---|
| content_id | The ID of the content to be updated. | Required |
| status | The updated status of the content. Possible values: current, trashed, historical, draft. Note: The term ‘current’ refers to the content that is currently active. Default is current. |
Optional |
| version | The new version for the updated content. Set the version to the current version number incremented by one. If the status changed to ‘draft’, then it must be 1. Note: To retrieve the current version, execute the confluence-cloud-content-search command using the query=”id={content_id}” argument. |
Required |
| title | The updated title of the content. If the field is not changing, set the title to the current title. Note: The maximum title length is 255 characters. |
Required |
| type | The type of content. Set the type to the current type of the content. Possible values: page, blogpost, comment, attachment. |
Required |
| body_value | The body of the content in the relevant format. | Optional |
| body_representation | The content format type. Possible values: view, export_view, styled_view, storage, editor2, anonymous_export_view. Note: If type is comment, possible values are editor, editor2 or storage. |
Optional |
Context Output
| Path | Type | Description |
|---|---|---|
| ConfluenceCloud.Content.id | String | The ID of the content. |
| ConfluenceCloud.Content.type | String | Type of the content. |
| ConfluenceCloud.Content.status | String | Status of the content. |
| ConfluenceCloud.Content.title | String | Title of the content. |
| ConfluenceCloud.Content.childTypes.attachment.value | Boolean | Whether the attachment has the given content. |
| ConfluenceCloud.Content.childTypes.attachment._links.self | String | Link to the attachment with the given content. |
| ConfluenceCloud.Content.childTypes.comment.value | Boolean | Whether a comment is associated with the given content. |
| ConfluenceCloud.Content.childTypes.comment._links.self | String | Link to the comment associated with the given content. |
| ConfluenceCloud.Content.childTypes.page.value | Boolean | Whether the page is associated with the given content. |
| ConfluenceCloud.Content.childTypes.page._links.self | String | Link to the page associated with the given content. |
| ConfluenceCloud.Content.space.id | Number | ID of the space that the content is being created in. |
| ConfluenceCloud.Content.space.key | String | Key of the space that the content is being created in. |
| ConfluenceCloud.Content.space.name | String | Name of the space that the content is being created in. |
| ConfluenceCloud.Content.space.type | String | Type of the space that the content is being created in. |
| ConfluenceCloud.Content.space.status | String | Status of the space that the content is being created in. |
| ConfluenceCloud.Content.space._links.webui | String | Web user interface link to the space that the content is being created in. |
| ConfluenceCloud.Content.space._links.self | String | Link to the space that the content is being created in. |
| ConfluenceCloud.Content.history.latest | Boolean | Whether the content is the latest content. |
| ConfluenceCloud.Content.history.createdBy.type | String | Type of the user who created the content. |
| ConfluenceCloud.Content.history.createdBy.accountId | String | Account ID of the user creating the content. |
| ConfluenceCloud.Content.history.createdBy.accountType | String | Account type of the user creating the content. |
| ConfluenceCloud.Content.history.createdBy.email | String | Email of the user creating the content. |
| ConfluenceCloud.Content.history.createdBy.publicName | String | Public name of the user creating the content. |
| ConfluenceCloud.Content.history.createdBy.profilePicture.path | String | Profile picture path of the user creating the content. |
| ConfluenceCloud.Content.history.createdBy.profilePicture.width | Number | Width in pixels of the profile picture of the user. |
| ConfluenceCloud.Content.history.createdBy.profilePicture.height | Number | Height in pixels of the profile picture of the user. |
| ConfluenceCloud.Content.history.createdBy.profilePicture.isDefault | Boolean | Whether the profile picture is default. |
| ConfluenceCloud.Content.history.createdBy.displayName | String | Display name of the user who created the content. |
| ConfluenceCloud.Content.history.createdBy.isExternalCollaborator | Boolean | Whether the user is an external collaborator. |
| ConfluenceCloud.Content.history.createdBy._links.self | String | Link to the creator of the content. |
| ConfluenceCloud.Content.history.createdDate | Date | Date and time, in ISO 8601 format, when the content was created. |
| ConfluenceCloud.Content.history._links.self | String | Link to the history of the content. |
| ConfluenceCloud.Content.version.by.type | String | Type of the user who last updated the content. |
| ConfluenceCloud.Content.version.by.accountId | String | Account ID of the user who last updated the content. |
| ConfluenceCloud.Content.version.by.accountType | String | Account type of the user who last updated the content. |
| ConfluenceCloud.Content.version.by.email | String | Email of the user who last updated the content. |
| ConfluenceCloud.Content.version.by.publicName | String | Public name of the user who last updated the content. |
| ConfluenceCloud.Content.version.by.profilePicture.path | String | Profile picture path of the user who last updated the content. |
| ConfluenceCloud.Content.version.by.profilePicture.width | Number | Width in pixels of the profile picture of the user who last updated the content. |
| ConfluenceCloud.Content.version.by.profilePicture.height | Number | Height in pixels of the profile picture of the user who last updated the content. |
| ConfluenceCloud.Content.version.by.profilePicture.isDefault | Boolean | Whether the profile picture is default. |
| ConfluenceCloud.Content.version.by.displayName | String | Display name of the user who last updated the content. |
| ConfluenceCloud.Content.version.by.isExternalCollaborator | Boolean | Whether the user is an external collaborator. |
| ConfluenceCloud.Content.version.by._links.self | String | Link to the user who last updated the content. |
| ConfluenceCloud.Content.version.when | Date | Date and time, in ISO 8601 format, when the content was updated. |
| ConfluenceCloud.Content.version.friendlyWhen | String | Display the information of when the content was created. |
| ConfluenceCloud.Content.version.message | String | Message of the updated content. |
| ConfluenceCloud.Content.version.number | Number | Version number of the updated content. |
| ConfluenceCloud.Content.version.minorEdit | Boolean | Whether the edit was minor. |
| ConfluenceCloud.Content.version.confRev | String | The revision ID provided by Confluence to be used as a revision in Synchrony. |
| ConfluenceCloud.Content.version.contentTypeModified | Boolean | True if the content type is modified in the version. (e.g. page to blog) |
| ConfluenceCloud.Content.version._links.self | String | Link to the new version of the content. |
| ConfluenceCloud.Content.ancestors.id | String | ID of the parent page of the content. |
| ConfluenceCloud.Content.ancestors.type | String | Type of the parent page of the content. |
| ConfluenceCloud.Content.ancestors.status | String | Status of the parent page of the content. |
| ConfluenceCloud.Content.ancestors.title | String | Title of the parent page of the content. |
| ConfluenceCloud.Content.ancestors.extensions.position | Number | The content extension position. |
| ConfluenceCloud.Content.ancestors._links.self | String | Link to the parent page of the content. |
| ConfluenceCloud.Content.ancestors._links.tinyui | String | Tiny link to the parent page of the content. |
| ConfluenceCloud.Content.ancestors._links.editui | String | Edit the user interface link to the parent page of the content. |
| ConfluenceCloud.Content.ancestors._links.webui | String | Web user interface link to the parent page of the content. |
| ConfluenceCloud.Content.container.id | Number | ID of the container of the content. |
| ConfluenceCloud.Content.container.key | String | Key of the container of the content. |
| ConfluenceCloud.Content.container.name | String | Name of the container of the content. |
| ConfluenceCloud.Content.container.type | String | Type of the container of the content. |
| ConfluenceCloud.Content.container.status | String | Status of the container of the content. |
| ConfluenceCloud.Content.container._links.webui | String | Web user interface link to the container of the content. |
| ConfluenceCloud.Content.container._links.self | String | Link to the container of the content. |
| ConfluenceCloud.Content.body.storage.value | String | The body of the new content. |
| ConfluenceCloud.Content.body.storage.representation | String | Representation format of the content. |
| ConfluenceCloud.Content.extensions.position | Number | The content extension position. |
| ConfluenceCloud.Content._links.editui | String | Edit the user interface link of the content. |
| ConfluenceCloud.Content._links.webui | String | Web user interface link of the content. |
| ConfluenceCloud.Content._links.context | String | Context link of the content. |
| ConfluenceCloud.Content._links.self | String | Link to the content. |
| ConfluenceCloud.Content._links.tinyui | String | Tiny link of the content. |
| ConfluenceCloud.Content._links.collection | String | Collection link of the content. |
| ConfluenceCloud.Content._links.base | String | Base link to the content. |
Command Example
!confluence-cloud-content-update content_id=2097159 title="testing123" type=page version=5
Context Example
{
"ConfluenceCloud": {
"Content": {
"_expandable": {
"children": "/rest/api/content/2097159/child",
"descendants": "/rest/api/content/2097159/descendant",
"restrictions": "/rest/api/content/2097159/restriction/byOperation"
},
"_links": {
"base": "https://xsoar-bd.atlassian.net/wiki",
"collection": "/rest/api/content",
"context": "/wiki",
"editui": "/pages/resumedraft.action?draftId=2097159",
"self": "https://xsoar-bd.atlassian.net/wiki/rest/api/content/2097159",
"tinyui": "/x/BwAg",
"webui": "/spaces/XSOAR/pages/2097159/testing123"
},
"body": {
"storage": {
"_expandable": {
"content": "/rest/api/content/2097159"
},
"representation": "storage"
}
},
"container": {
"_expandable": {
"lookAndFeel": "/rest/api/settings/lookandfeel?spaceKey=XSOAR",
"settings": "/rest/api/space/XSOAR/settings",
"theme": "/rest/api/space/XSOAR/theme"
},
"_links": {
"self": "https://xsoar-bd.atlassian.net/wiki/rest/api/space/XSOAR",
"webui": "/spaces/XSOAR"
},
"history": {
"createdBy": {
"_links": {
"self": "https://xsoar-bd.atlassian.net/wiki/rest/api/user?accountId=5ff2e30b4d2179006ea18449"
},
"accountId": "5ff2e30b4d2179006ea18449",
"accountType": "atlassian",
"displayName": "John Doe",
"email": "dummy.dummy@dummy.com",
"isExternalCollaborator": false,
"profilePicture": {
"height": 48,
"isDefault": false,
"path": "/wiki/aa-avatar/5ff2e30b4d2179006ea18449",
"width": 48
},
"publicName": "John Doe",
"type": "known"
},
"createdDate": "2021-08-06T06:18:11.470Z"
},
"id": 2064386,
"key": "XSOAR",
"name": "XSOAR_Project",
"status": "current",
"type": "global"
},
"extensions": {
"position": "none"
},
"history": {
"_links": {
"self": "https://xsoar-bd.atlassian.net/wiki/rest/api/content/2097159/history"
},
"createdBy": {
"_links": {
"self": "https://xsoar-bd.atlassian.net/wiki/rest/api/user?accountId=5ff2e30b4d2179006ea18449"
},
"accountId": "5ff2e30b4d2179006ea18449",
"accountType": "atlassian",
"displayName": "John Doe",
"email": "dummy.dummy@dummy.com",
"isExternalCollaborator": false,
"profilePicture": {
"height": 48,
"isDefault": false,
"path": "/wiki/aa-avatar/5ff2e30b4d2179006ea18449",
"width": 48
},
"publicName": "John Doe",
"type": "known"
},
"createdDate": "2021-08-06T06:23:36.076Z",
"latest": true
},
"id": "2097159",
"space": {
"_expandable": {
"lookAndFeel": "/rest/api/settings/lookandfeel?spaceKey=XSOAR",
"settings": "/rest/api/space/XSOAR/settings",
"theme": "/rest/api/space/XSOAR/theme"
},
"_links": {
"self": "https://xsoar-bd.atlassian.net/wiki/rest/api/space/XSOAR",
"webui": "/spaces/XSOAR"
},
"id": 2064386,
"key": "XSOAR",
"name": "XSOAR_Project",
"status": "current",
"type": "global"
},
"status": "current",
"title": "testing123",
"type": "page",
"version": {
"_expandable": {
"content": "/rest/api/content/2097159"
},
"_links": {
"self": "https://xsoar-bd.atlassian.net/wiki/rest/api/content/2097159/version/4"
},
"by": {
"_links": {
"self": "https://xsoar-bd.atlassian.net/wiki/rest/api/user?accountId=5ff2e30b4d2179006ea18449"
},
"accountId": "5ff2e30b4d2179006ea18449",
"accountType": "atlassian",
"displayName": "John Doe",
"email": "dummy.dummy@dummy.com",
"isExternalCollaborator": false,
"profilePicture": {
"height": 48,
"isDefault": false,
"path": "/wiki/aa-avatar/5ff2e30b4d2179006ea18449",
"width": 48
},
"publicName": "John Doe",
"type": "known"
},
"confRev": "confluence$content$2097159.25",
"contentTypeModified": false,
"friendlyWhen": "38 minutes ago",
"minorEdit": false,
"number": 4,
"syncRev": "0.confluence$content$2097159.22",
"syncRevSource": "synchrony-ack",
"when": "2021-09-02T05:58:18.823Z"
}
}
}
}
Human Readable Output
Content
ID Title Type Status Space Name Created By Created At 2097159 testing123 page current XSOAR_Project John Doe 2021-08-06T06:23:36.076Z
confluence-cloud-content-search
Retrieves a list of content using the Confluence Query Language (CQL).
For more information on CQL, see: https://developer.atlassian.com/cloud/confluence/advanced-searching-using-cql/.
Base Command
confluence-cloud-content-search
Input
| Argument Name | Description | Required |
|---|---|---|
| query | The CQL (Confluence Query Language) string that is used to find the requested content. | Required |
| limit | Number of records to retrieve in the response. Note: The minimum value supported is 0 and the maximum value supported is int32. Default is 50. |
Optional |
| content_status | Filter the result based on the content status. Possible values: current, draft, archived. Note: Supports multiple comma-separated values. Possible values are: . |
Optional |
| next_page_token | Retrieves the next page records for the given query (next_page_token retrieved in previous content response). | Optional |
| expand | Indicates which properties to expand. For reference, visit https://developer.atlassian.com/cloud/confluence/rest/api-group-content/#api-wiki-rest-api-content-search-get. Note: To separate multiple values, use commas. Expanded properties will be populated in context data only. |
Optional |
Context Output
| Path | Type | Description |
|---|---|---|
| ConfluenceCloud.Content.id | String | The ID of the content. |
| ConfluenceCloud.Content.type | String | Type of the content. |
| ConfluenceCloud.Content.status | String | Status of the content. |
| ConfluenceCloud.Content.title | String | Title of the content. |
| ConfluenceCloud.Content.childTypes.attachment.value | Boolean | Whether the attachment has the given content. |
| ConfluenceCloud.Content.childTypes.attachment._links.self | String | Link to the attachment with the given content. |
| ConfluenceCloud.Content.childTypes.comment.value | Boolean | Whether a comment is associated with the given content. |
| ConfluenceCloud.Content.childTypes.comment._links.self | String | Link to the comment associated with the given content. |
| ConfluenceCloud.Content.childTypes.page.value | Boolean | Whether the page is associated with the given content. |
| ConfluenceCloud.Content.childTypes.page._links.self | String | Link to the page associated with the given content. |
| ConfluenceCloud.Content.space.id | Number | ID of the space that the content is being created in. |
| ConfluenceCloud.Content.space.key | String | Key of the space that the content is being created in. |
| ConfluenceCloud.Content.space.name | String | Name of the space that the content is being created in. |
| ConfluenceCloud.Content.space.type | String | Type of the space that the content is being created in. |
| ConfluenceCloud.Content.space.status | String | Status of the space that the content is being created in. |
| ConfluenceCloud.Content.space._links.webui | String | Web user interface link to the space that the content is being created in. |
| ConfluenceCloud.Content.space._links.self | String | Link to the space that the content is being created in. |
| ConfluenceCloud.Content.history.latest | Boolean | Whether the content is the latest content. |
| ConfluenceCloud.Content.history.createdBy.type | String | Type of the user who created the content. |
| ConfluenceCloud.Content.history.createdBy.accountId | String | Account ID of the user creating the content. |
| ConfluenceCloud.Content.history.createdBy.accountType | String | Account type of the user creating the content. |
| ConfluenceCloud.Content.history.createdBy.email | String | Email of the user creating the content. |
| ConfluenceCloud.Content.history.createdBy.publicName | String | Public name of the user creating the content. |
| ConfluenceCloud.Content.history.createdBy.profilePicture.path | String | Profile picture path of the user creating the content. |
| ConfluenceCloud.Content.history.createdBy.profilePicture.width | Number | Width in pixels of the profile picture of the user. |
| ConfluenceCloud.Content.history.createdBy.profilePicture.height | Number | Height in pixels of the profile picture of the user. |
| ConfluenceCloud.Content.history.createdBy.profilePicture.isDefault | Boolean | Whether the profile picture is the default profile picture. |
| ConfluenceCloud.Content.history.createdBy.displayName | String | Display name of the user who created the content. |
| ConfluenceCloud.Content.history.createdBy.isExternalCollaborator | Boolean | Whether the user is an external collaborator. |
| ConfluenceCloud.Content.history.createdBy._links.self | String | Link to the creator of the content. |
| ConfluenceCloud.Content.history.createdDate | Date | Date and time, in ISO 8601 format, when the content was created (e.g., 2024-01-15T12:34:56Z). |
| ConfluenceCloud.Content.history._links.self | String | Link to the history of the content. |
| ConfluenceCloud.Content.version.by.type | String | Type of the user who last updated the content. |
| ConfluenceCloud.Content.version.by.accountId | String | Account ID of the user who last updated the content. |
| ConfluenceCloud.Content.version.by.accountType | String | Account type of the user who last updated the content. |
| ConfluenceCloud.Content.version.by.email | String | Email of the user who last updated the content. |
| ConfluenceCloud.Content.version.by.publicName | String | Public name of the user who last updated the content. |
| ConfluenceCloud.Content.version.by.profilePicture.path | String | Profile picture path of the user who last updated the content. |
| ConfluenceCloud.Content.version.by.profilePicture.width | Number | Width in pixels of the profile picture of the user who last updated the content. |
| ConfluenceCloud.Content.version.by.profilePicture.height | Number | Height in pixels of the profile picture of the user who last updated the content. |
| ConfluenceCloud.Content.version.by.profilePicture.isDefault | Boolean | Whether the profile picture is the default profile picture. |
| ConfluenceCloud.Content.version.by.displayName | String | Display name of the user who last updated the content. |
| ConfluenceCloud.Content.version.by.isExternalCollaborator | Boolean | Whether the user is an external collaborator. |
| ConfluenceCloud.Content.version.by._links.self | String | Link to the user who last updated the content. |
| ConfluenceCloud.Content.version.when | Date | Date and time, in ISO 8601 format, when the content was updated (e.g., 2024-01-15T12:34:56Z). |
| ConfluenceCloud.Content.version.friendlyWhen | String | Displays when the content was created. |
| ConfluenceCloud.Content.version.message | String | Message of the updated content. |
| ConfluenceCloud.Content.version.number | Number | Version number of the updated content. |
| ConfluenceCloud.Content.version.minorEdit | Boolean | Whether the edit was minor. |
| ConfluenceCloud.Content.version.confRev | String | The revision ID provided by Confluence to be used as a revision in Synchrony. |
| ConfluenceCloud.Content.version.contentTypeModified | Boolean | True if the content type is modified in the version. (e.g., page to blog). |
| ConfluenceCloud.Content.version._links.self | String | Link to the new version of the content. |
| ConfluenceCloud.Content.ancestors.id | String | ID of the parent page of the content. |
| ConfluenceCloud.Content.ancestors.type | String | Type of the parent page of the content. |
| ConfluenceCloud.Content.ancestors.status | String | Status of the parent page of the content. |
| ConfluenceCloud.Content.container.id | Number | ID of the container of the content. |
| ConfluenceCloud.Content.container.key | String | Key of the container of the content. |
| ConfluenceCloud.Content.container.name | String | Name of the container of the content. |
| ConfluenceCloud.Content.container.type | String | Type of the container of the content. |
| ConfluenceCloud.Content.container.status | String | Status of the container of the content. |
| ConfluenceCloud.Content.container._links.webui | String | Web user interface link to the container of the content. |
| ConfluenceCloud.Content.container._links.self | String | Link to the container of the content. |
| ConfluenceCloud.Content.body.storage.value | String | The body of the new content. |
| ConfluenceCloud.Content.body.storage.representation | String | Representation format of the content. |
| ConfluenceCloud.Content.extensions.position | Number | The content extension position. |
| ConfluenceCloud.Content._links.editui | String | Edit the user interface link of the content. |
| ConfluenceCloud.Content._links.webui | String | Web user interface link of the content. |
| ConfluenceCloud.Content._links.self | String | Link to the content. |
| ConfluenceCloud.Content._links.tinyui | String | Tiny link of the content. |
| ConfluenceCloud.PageToken.name | String | The command name. |
| ConfluenceCloud.PageToken.next_token | String | The next page token. |
confluence-cloud-user-list
Returns a list of users.
Base Command
confluence-cloud-user-list
Input
| Argument Name | Description | Required |
|---|---|---|
| limit | Number of records to retrieve in the response. Note: The minimum value supported is 0 and the maximum value supported is int32. Default is 50. |
Optional |
| offset | The starting index of the returned users. Note: The minimum value supported is 0 and the maximum value supported is int32. Default is 0. |
Optional |
Context Output
| Path | Type | Description |
|---|---|---|
| ConfluenceCloud.User.type | String | Type of the user. |
| ConfluenceCloud.User.accountId | String | Account ID of the user. |
| ConfluenceCloud.User.accountType | String | Account type of the user. |
| ConfluenceCloud.User.publicName | String | The public name or nickname of the user. |
| ConfluenceCloud.User.profilePicture.path | String | Path of the user’s profile picture. |
| ConfluenceCloud.User.profilePicture.width | Number | Width in pixels of the user’s profile picture. |
| ConfluenceCloud.User.profilePicture.height | Number | Height in pixels of the user’s profile picture. |
| ConfluenceCloud.User.profilePicture.isDefault | Boolean | Whether the profile picture is the default profile picture. |
| ConfluenceCloud.User.displayName | String | Display name of the user. |
| ConfluenceCloud.User.isExternalCollaborator | Boolean | Whether the user is an external collaborator user. |
| ConfluenceCloud.User._links.self | String | Link to the user. |
Command Example
!confluence-cloud-user-list limit=2
Context Example
{
"ConfluenceCloud": {
"User": [
{
"_links": {
"self": "https://xsoar-bd.atlassian.net/wiki/rest/api/user?accountId=5d9afe0010f4800c341a2bba"
},
"accountId": "5d9afe0010f4800c341a2bba",
"displayName": "Opsgenie Incident Timeline",
"isExternalCollaborator": false,
"profilePicture": {
"height": 48,
"isDefault": false,
"path": "/wiki/aa-avatar/5d9afe0010f4800c341a2bba",
"width": 48
},
"publicName": "Opsgenie Incident Timeline",
"type": "known"
},
{
"_links": {
"self": "https://xsoar-bd.atlassian.net/wiki/rest/api/user?accountId=5d9b2860cd50b80dcea8a5b7"
},
"accountId": "5d9b2860cd50b80dcea8a5b7",
"displayName": "Opsgenie Incident Timeline",
"isExternalCollaborator": false,
"profilePicture": {
"height": 48,
"isDefault": false,
"path": "/wiki/aa-avatar/5d9b2860cd50b80dcea8a5b7",
"width": 48
},
"publicName": "Opsgenie Incident Timeline",
"type": "known"
}
]
}
}
Human Readable Output
User(s)
Account ID Name User Type 5d9afe0010f4800c341a2bba Opsgenie Incident Timeline known 5d9b2860cd50b80dcea8a5b7 Opsgenie Incident Timeline known
confluence-cloud-group-list
Returns all user groups.
Base Command
confluence-cloud-group-list
Input
| Argument Name | Description | Required |
|---|---|---|
| limit | Number of records to retrieve in the response. Note: The minimum value supported is 0 and the maximum value supported is int32. Default is 50. |
Optional |
| offset | The starting index of the returned groups. Note: The minimum value supported is 0 and the maximum value supported is int32. Default is 0. |
Optional |
| access_type | The group permission level for which to filter results. Possible values: user, admin, site-admin. |
Optional |
Context Output
| Path | Type | Description |
|---|---|---|
| ConfluenceCloud.Group.type | String | Type of the group. |
| ConfluenceCloud.Group.name | String | Name of the group. |
| ConfluenceCloud.Group.id | String | ID of the group. |
| ConfluenceCloud.Group._links.self | String | Link to the group. |
Command Example
!confluence-cloud-group-list limit=2
Context Example
{
"ConfluenceCloud": {
"Group": [
{
"_links": {
"self": "https://xsoar-bd.atlassian.net/wiki/rest/experimental/group/administrators"
},
"id": "10453df5-f7fc-47be-8ca7-bc2949c1bd5b",
"name": "administrators",
"type": "group"
},
{
"_links": {
"self": "https://xsoar-bd.atlassian.net/wiki/rest/experimental/group/confluence-users"
},
"id": "e50e7fe6-7961-4775-9bbf-99e4b50f8701",
"name": "confluence-users",
"type": "group"
}
]
}
}
Human Readable Output
Group(s)
ID Name 10453df5-f7fc-47be-8ca7-bc2949c1bd5b administrators e50e7fe6-7961-4775-9bbf-99e4b50f8701 confluence-users
confluence-cloud-get-events
Retrieves a list of events from the Atlassian Confluence Cloud instance.
Base Command
confluence-cloud-get-events
Input
| Argument Name | Description | Required |
|---|---|---|
| should_push_events | Set this argument to True in order to create events, otherwise the command will only display them. Possible values are: true, false. Default is false. | Optional |
| start_date | Filters the results to the records on or after the start date. The start date must be specified as epoch time in milliseconds. | Optional |
| limit | The maximum number of records to return per page. Note, this may be restricted by fixed system limits. | Optional |
Context Output
| Path | Type | Description |
|---|---|---|
| ConfluenceCloud.Event.author.type | String | The type of author who created this event. |
| ConfluenceCloud.Event.author.displayName | String | The display nName of the author who created this event. |
| ConfluenceCloud.Event.author.operations | String | Nullable. Author’s operations. |
| ConfluenceCloud.Event.author.username | String | Username of the author of this event. |
| ConfluenceCloud.Event.author.userKey | String | User key of the author of this event. |
| ConfluenceCloud.Event.author.accountId | String | Account ID of the author of this event. |
| ConfluenceCloud.Event.author.accountType | String | Type of account of the author of this event. |
| ConfluenceCloud.Event.author.externalCollaborator | Boolean | Deprecated. Is the author of this event an external collaborator. |
| ConfluenceCloud.Event.author.isExternalCollaborator | Boolean | Deprecated. Is the author of this event an external collaborator. |
| ConfluenceCloud.Event.author.publicName | String | The public name of the author of this event. |
| ConfluenceCloud.Event.remoteAddress | String | The remote address from which the event was performed. |
| ConfluenceCloud.Event.creationDate | Number | The creation date-time of the audit record, as a timestamp. |
| ConfluenceCloud.Event.summary | Strings | Summary of the audit. |
| ConfluenceCloud.Event.description | String | Description of the audit. |
| ConfluenceCloud.Event.category | String | Category of the event. |
| ConfluenceCloud.Event.sysAdmin | Boolean | Was the event created by a system administrator. |
| ConfluenceCloud.Event.superAdmin | Boolean | Was the event created by a super administrator. |
| ConfluenceCloud.Event.affectedObject.name | String | Name of the object affected by the event. |
| ConfluenceCloud.Event.affectedObject.objectType | String | Type of the object affected by the event. |
| ConfluenceCloud.Event.changedValues.name | String | Name of the changed value. |
| ConfluenceCloud.Event.changedValues.oldValue | String | The old value before the change the event describes. |
| ConfluenceCloud.Event.changedValues.hiddenOldValue | String | The old hidden value before the change the event describes. |
| ConfluenceCloud.Event.changedValues.newValue | String | The new value after the change the event describes. |
| ConfluenceCloud.Event.changedValues.hiddenNewValue | String | The new hidden value after the change the event describes. |
| ConfluenceCloud.Event.associatedObjects.name | String | Name of the associated object. |
| ConfluenceCloud.Event.associatedObjects.objectType | String | Type of the associated object. |
Command Example
!confluence-cloud-get-events limit=1
Context Example
{
"ConfluenceCloud": {
"Event": [
{
"author": {
"type": "user",
"displayName": "<string>",
"operations": {},
"username": "<string>",
"userKey": "<string>",
"accountId": "<string>",
"accountType": "<string>",
"externalCollaborator": true,
"isExternalCollaborator": true,
"publicName": "<string>"
},
"remoteAddress": "<string>",
"creationDate": 59,
"summary": "<string>",
"description": "<string>",
"category": "<string>",
"sysAdmin": true,
"superAdmin": true,
"affectedObject": {
"name": "<string>",
"objectType": "<string>"
},
"changedValues": [
{
"name": "<string>",
"oldValue": "<string>",
"hiddenOldValue": "<string>",
"newValue": "<string>",
"hiddenNewValue": "<string>"
}
],
"associatedObjects": [
{
"name": "<string>",
"objectType": "<string>"
}
]
}
]
}
}
confluence-cloud-content-get
Retrieves a piece of content (e.g., page, blogpost) from Confluence Cloud by its ID.
Base Command
confluence-cloud-content-get
Input
| Argument Name | Description | Required |
|---|---|---|
| content_id | The ID of the content to retrieve. | Required |
Context Output
| Path | Type | Description |
|---|---|---|
| ConfluenceCloud.Content.id | String | The content ID. |
| ConfluenceCloud.Content.type | String | The type of the content (e.g., page, blogpost). |
| ConfluenceCloud.Content.ari | String | The Atlassian Resource Identifier (ARI) for the content. |
| ConfluenceCloud.Content.base64EncodedAri | String | The Base64 encoded ARI of the content. |
| ConfluenceCloud.Content.status | String | The status of the content (e.g., current, archived, draft). |
| ConfluenceCloud.Content.title | String | The title of the content. |
| ConfluenceCloud.Content.body | Unknown | The body of the content. |
| ConfluenceCloud.Content.body.storage.value | String | The raw storage-format value of the content body (may contain HTML/XML). |
| ConfluenceCloud.Content.body.storage.representation | String | The representation format of the body (e.g., storage, view). |
| ConfluenceCloud.Content.body.storage.embeddedContent | Unknown | A list of embedded content objects in the body. |
| ConfluenceCloud.Content.body.storage._expandable | String | Link to the content resource for the body. |
| ConfluenceCloud.Content.extensions.position | Number | Position of the content in the page tree or order. |
| ConfluenceCloud.Content._links.editui | String | Link to edit the content in the UI. |
| ConfluenceCloud.Content._links.webui | String | Web UI link to the content. |
| ConfluenceCloud.Content._links.edituiv2 | String | Link to edit the content in the new UI. |
| ConfluenceCloud.Content._links.context | String | Context path of the Confluence instance. |
| ConfluenceCloud.Content._links.self | String | REST API self link for the content. |
| ConfluenceCloud.Content._links.tinyui | String | Tiny link to the content. |
| ConfluenceCloud.Content._links.collection | String | Link to the collection of content resources. |
| ConfluenceCloud.Content._links.base | String | Base URL of the Confluence site. |
Command Example
!confluence-cloud-content-get content_id="123456"
Context Example
{
"ConfluenceCloud": {
"Content": {
"id": "123456",
"type": "page",
"ari": "ari:cloud:confluence::content/123456",
"base64EncodedAri": "YXJpOmNsb3VkOmNvbmZsdWVuY2U6OmNvbnRlbnQvMTIzNDU2",
"status": "current",
"title": "Demo Page",
"body": {
"storage": {
"value": "<p>This is a demo body.</p>",
"representation": "storage",
"embeddedContent": []
}
},
"extensions": {
"position": 42
},
"_links": {
"editui": "/pages/editpage.action?pageId=123456",
"edituiv2": "/wiki/edit-v2/123456",
"webui": "/spaces/ABC/pages/123456/Demo+Page",
"context": "/wiki",
"self": "https://example.atlassian.net/wiki/rest/api/content/123456",
"tinyui": "/x/abc123",
"collection": "/rest/api/content",
"base": "https://example.atlassian.net/wiki"
}
}
}
}
confluence-cloud-oauth-start
Starts the OAuth 2.0 authentication flow. Returns an authorization URL that the user must visit to authorize the integration.
Base Command
confluence-cloud-oauth-start
Input
There are no input arguments for this command.
Context Output
There is no context output for this command.
Command example
!confluence-cloud-oauth-start
confluence-cloud-oauth-complete
Completes the OAuth 2.0 authentication flow by exchanging the authorization code for access and refresh tokens.
Base Command
confluence-cloud-oauth-complete
Input
| Argument Name | Description | Required |
|---|---|---|
| code | The authorization code received from the OAuth callback URL after user authorization. | Required |
Context Output
There is no context output for this command.
Command example
!confluence-cloud-oauth-complete code=<authorization_code>
confluence-cloud-oauth-test
Tests the OAuth 2.0 authentication by verifying the current access token is valid.
Base Command
confluence-cloud-oauth-test
Input
There are no input arguments for this command.
Context Output
There is no context output for this command.
Command example
!confluence-cloud-oauth-test
confluence-cloud-get-events
Retrieves a list of events from the Atlassian Confluence Cloud instance. Use this command for development and debugging only, as it may produce duplicate events, exceed API rate limits, or disrupt the fetch mechanism.
Base Command
confluence-cloud-get-events
Input
| Argument Name | Description | Required |
|---|---|---|
| should_push_events | Set this argument to True in order to create events, otherwise the command will only display them. Possible values are: true, false. Default is false. | Optional |
| start_date | Filters the results to the records on or after the start date. The start date must be specified as epoch time in milliseconds. | Optional |
| limit | The maximum number of records to return per page. Note, this may be restricted by fixed system limits. | Optional |
Context Output
| Path | Type | Description |
|---|---|---|
| ConfluenceCloud.Event.author.type | String | The type of author who created this event. |
| ConfluenceCloud.Event.author.displayName | String | The display name of the author who created this event. |
| ConfluenceCloud.Event.author.operations | String | Nullable. Author’s operations. |
| ConfluenceCloud.Event.author.username | String | Username of the author of this event. |
| ConfluenceCloud.Event.author.userKey | String | User key of the author of this event. |
| ConfluenceCloud.Event.author.accountId | String | Account ID of the author of this event. |
| ConfluenceCloud.Event.author.accountType | String | Type of account of the author of this event. |
| ConfluenceCloud.Event.author.externalCollaborator | Boolean | Deprecated. Is the author of this event an external collaborator. |
| ConfluenceCloud.Event.author.isExternalCollaborator | Boolean | Deprecated. Is the author of this event an external collaborator. |
| ConfluenceCloud.Event.author.publicName | String | The public name of the author of this event. |
| ConfluenceCloud.Event.remoteAddress | String | The remote address from which the event was performed. |
| ConfluenceCloud.Event.creationDate | Number | The creation date-time of the audit record, as a timestamp. |
| ConfluenceCloud.Event.summary | Strings | Summary of the audit. |
| ConfluenceCloud.Event.description | String | Description of the audit. |
| ConfluenceCloud.Event.category | String | Category of the event. |
| ConfluenceCloud.Event.sysAdmin | Boolean | Was the event created by a system administrator. |
| ConfluenceCloud.Event.superAdmin | Boolean | Was the event created by a super administrator. |
| ConfluenceCloud.Event.affectedObject.name | String | Name of the object affected by the event. |
| ConfluenceCloud.Event.affectedObject.objectType | String | Type of the object affected by the event. |
| ConfluenceCloud.Event.changedValues.name | String | Name of the changed value. |
| ConfluenceCloud.Event.changedValues.oldValue | String | The old value before the change the event describes. |
| ConfluenceCloud.Event.changedValues.hiddenOldValue | String | The old hidden value before the change the event describes. |
| ConfluenceCloud.Event.changedValues.newValue | String | The new value after the change the event describes. |
| ConfluenceCloud.Event.changedValues.hiddenNewValue | String | The new hidden value after the change the event describes. |
| ConfluenceCloud.Event.associatedObjects.name | String | Name of the associated object. |
| ConfluenceCloud.Event.associatedObjects.objectType | String | The type of the associated object. |
confluence-cloud-blogpost-create
Creates a new blog post in Confluence Cloud (REST API v2).
Base Command
confluence-cloud-blogpost-create
Input
| Argument Name | Description | Required |
|---|---|---|
| space_id | The ID of the space where the blog post is created. Retrieve using the confluence-cloud-space-listv2 command. | Required |
| title | The title of the blog post. | Required |
| status | The status of the blog post to be created. Possible values are: current, draft. Default is current. | Optional |
| body_value | The content body value of the blog post. | Required |
| body_representation | The content format type of the body value. Possible values are: storage, atlas_doc_format, wiki. Default is storage. | Optional |
Context Output
| Path | Type | Description |
|---|---|---|
| ConfluenceCloud.Blogpost.id | String | The ID of the blog post. |
| ConfluenceCloud.Blogpost.status | String | The status of the blog post. |
| ConfluenceCloud.Blogpost.title | String | The title of the blog post. |
| ConfluenceCloud.Blogpost.spaceId | String | The ID of the space the blog post belongs to. |
| ConfluenceCloud.Blogpost.authorId | String | The account ID of the blog post author. |
| ConfluenceCloud.Blogpost.createdAt | Date | Date and time, in ISO 8601 format, when the blog post was created (e.g., 2024-01-15T12:34:56Z). |
| ConfluenceCloud.Blogpost.version.number | Number | The version number of the blog post. |
Command example
!confluence-cloud-blogpost-create space_id=98765 title="XSOAR Blogpost" body_value="Blog content" body_representation=storage
Context Example
{
"ConfluenceCloud": {
"Blogpost": {
"id": "12345",
"status": "current",
"title": "XSOAR Blogpost",
"spaceId": "98765",
"authorId": "5ff2e30b4d2179006ea18449",
"createdAt": "2024-01-01T10:00:00.000Z",
"version": {
"number": 1
}
}
}
}
Human Readable Output
Blogpost
ID Title Status Space Id Author Id Created At Version 12345 XSOAR Blogpost current 98765 5ff2e30b4d2179006ea18449 2024-01-01T10:00:00.000Z 1
confluence-cloud-blogpost-update
Updates an existing blog post in Confluence Cloud (REST API v2).
Base Command
confluence-cloud-blogpost-update
Input
| Argument Name | Description | Required |
|---|---|---|
| blogpost_id | The ID of the blog post to update. | Required |
| version_number | The new version number for the blog post. Must be one greater than the current version. | Required |
| title | The title of the blog post. | Required |
| status | The status of the blog post. Possible values are: current, draft. Default is current. | Optional |
| body_value | The content body value of the blog post. | Required |
| body_representation | The content format type of the body value. Possible values are: storage, atlas_doc_format, wiki. Default is storage. | Optional |
| version_message | A message describing the update for the version history. | Optional |
Context Output
| Path | Type | Description |
|---|---|---|
| ConfluenceCloud.Blogpost.id | String | The ID of the blog post. |
| ConfluenceCloud.Blogpost.status | String | The status of the blog post. |
| ConfluenceCloud.Blogpost.title | String | The title of the blog post. |
| ConfluenceCloud.Blogpost.spaceId | String | The ID of the space the blog post belongs to. |
| ConfluenceCloud.Blogpost.version.number | Number | The version number of the blog post. |
Command example
!confluence-cloud-blogpost-update blogpost_id=12345 version_number=2 title="XSOAR Blogpost Updated" body_value="Updated blog"
Context Example
{
"ConfluenceCloud": {
"Blogpost": {
"id": "12345",
"status": "current",
"title": "XSOAR Blogpost Updated",
"spaceId": "98765",
"version": {
"number": 2
}
}
}
}
Human Readable Output
Blogpost
ID Title Status Space Id Version 12345 XSOAR Blogpost Updated current 98765 2
confluence-cloud-footer-comment-create
Creates a footer comment in Confluence Cloud (REST API v2).
Base Command
confluence-cloud-footer-comment-create
Input
| Argument Name | Description | Required |
|---|---|---|
| body_value | The content body value of the comment. | Required |
| body_representation | The content format type of the body value. Possible values are: storage, atlas_doc_format. Default is storage. | Optional |
| page_id | The ID of the page to attach the comment to. One of page_id, blogpost_id, parent_comment_id, attachment_id, or custom_content_id is required. | Optional |
| blogpost_id | The ID of the blog post to attach the comment to. | Optional |
| parent_comment_id | The ID of the parent comment to reply to. | Optional |
| attachment_id | The ID of the attachment to attach the comment to. | Optional |
| custom_content_id | The ID of the custom content to attach the comment to. | Optional |
Context Output
| Path | Type | Description |
|---|---|---|
| ConfluenceCloud.Comment.id | String | The ID of the comment. |
| ConfluenceCloud.Comment.status | String | The status of the comment. |
| ConfluenceCloud.Comment.pageId | String | The ID of the page the comment belongs to. |
| ConfluenceCloud.Comment.blogPostId | String | The ID of the blog post the comment belongs to. |
| ConfluenceCloud.Comment.parentCommentId | String | The ID of the parent comment. |
| ConfluenceCloud.Comment.version.number | Number | The version number of the comment. |
Command example
!confluence-cloud-footer-comment-create page_id=12345 body_value="A footer comment"
Context Example
{
"ConfluenceCloud": {
"Comment": {
"id": "98765",
"status": "current",
"pageId": "12345",
"version": {
"number": 1
}
}
}
}
Human Readable Output
Footer Comment
ID Status Page Id Version 98765 current 12345 1
confluence-cloud-page-update
Updates an existing page in Confluence Cloud (REST API v2).
Base Command
confluence-cloud-page-update
Input
| Argument Name | Description | Required |
|---|---|---|
| page_id | The ID of the page to update. | Required |
| version_number | The new version number for the page. Must be one greater than the current version. | Required |
| title | The title of the page. | Required |
| status | The status of the page. Possible values are: current, draft. Default is current. | Required |
| body_value | The content body value of the page. | Required |
| body_representation | The content format type of the body value. Possible values are: storage, atlas_doc_format, wiki. Default is storage. | Optional |
| space_id | The ID of the space to move the page to. | Optional |
| version_message | A message describing the update for the version history. | Optional |
Context Output
| Path | Type | Description |
|---|---|---|
| ConfluenceCloud.Page.id | String | The ID of the page. |
| ConfluenceCloud.Page.status | String | The status of the page. |
| ConfluenceCloud.Page.title | String | The title of the page. |
| ConfluenceCloud.Page.spaceId | String | The ID of the space the page belongs to. |
| ConfluenceCloud.Page.version.number | Number | The version number of the page. |
Command example
!confluence-cloud-page-update page_id=12345 version_number=2 title="XSOAR Page Updated" body_value="Updated content"
Context Example
{
"ConfluenceCloud": {
"Page": {
"id": "12345",
"status": "current",
"title": "XSOAR Page Updated",
"spaceId": "98765",
"version": {
"number": 2
}
}
}
}
Human Readable Output
Page
ID Title Status Space Id Version 12345 XSOAR Page Updated current 98765 2
confluence-cloud-space-createv2
Creates a new space in Confluence Cloud (REST API v2).
Base Command
confluence-cloud-space-createv2
Input
| Argument Name | Description | Required |
|---|---|---|
| name | The name of the new space. The maximum length is 200 characters. | Required |
| key | The key for the new space. It can contain any alphanumeric character (a-z, 0-9). The maximum length is 255 characters. | Required |
| description_value | The description text of the new space. | Optional |
| description_format | The format of the space description. Possible values are: plain, view. Default is plain. | Optional |
| role_assignments | A JSON array of role assignments granting access to principals. For example: [{“principal”: {“type”: “user”, “id”: “<accountId>”}, “roleId”: “<roleId>”}]. | Optional |
Context Output
| Path | Type | Description |
|---|---|---|
| ConfluenceCloud.Space.id | String | The ID of the space. |
| ConfluenceCloud.Space.key | String | The key of the space. |
| ConfluenceCloud.Space.name | String | The name of the space. |
| ConfluenceCloud.Space.type | String | The type of the space. |
| ConfluenceCloud.Space.status | String | The status of the space. |
Command example
!confluence-cloud-space-createv2 name="Engineering" key="ENG"
Context Example
{
"ConfluenceCloud": {
"Space": {
"id": "98765",
"key": "ENG",
"name": "Engineering",
"status": "current",
"type": "global"
}
}
}
Human Readable Output
Space
Id Key Name Type Status 98765 ENG Engineering global current
confluence-cloud-page-create
Creates a new page in Confluence Cloud (REST API v2).
Base Command
confluence-cloud-page-create
Input
| Argument Name | Description | Required |
|---|---|---|
| space_id | The ID of the space where the page is created. Retrieve using the confluence-cloud-space-listv2 command. | Required |
| title | The title of the page. | Required |
| status | The status of the page to be created. Possible values are: current, draft. Default is current. | Optional |
| body_value | The content body value of the page. | Required |
| body_representation | The content format type of the body value. Possible values are: storage, atlas_doc_format, wiki. Default is storage. | Optional |
| parent_id | The ID of the parent page under which the new page is created. | Optional |
Context Output
| Path | Type | Description |
|---|---|---|
| ConfluenceCloud.Page.id | String | The ID of the page. |
| ConfluenceCloud.Page.status | String | The status of the page. |
| ConfluenceCloud.Page.title | String | The title of the page. |
| ConfluenceCloud.Page.spaceId | String | The ID of the space the page belongs to. |
| ConfluenceCloud.Page.parentId | String | The ID of the parent page. |
| ConfluenceCloud.Page.authorId | String | The account ID of the page author. |
| ConfluenceCloud.Page.createdAt | Date | Date and time, in ISO 8601 format, when the page was created (e.g., 2024-01-15T12:34:56Z). |
| ConfluenceCloud.Page.version.number | Number | The version number of the page. |
Command example
!confluence-cloud-page-create space_id=98765 title="Getting Started" body_value="Welcome to the team"
Context Example
{
"ConfluenceCloud": {
"Page": {
"authorId": "5ff2e30b4d2179006ea18449",
"createdAt": "2024-01-15T12:34:56Z",
"id": "12345",
"spaceId": "98765",
"status": "current",
"title": "Getting Started",
"version": {
"number": 1
}
}
}
}
Human Readable Output
Page
Id Title Status Space Id Author Id Created At Version 12345 Getting Started current 98765 5ff2e30b4d2179006ea18449 2024-01-15T12:34:56Z 1
confluence-cloud-space-listv2
Returns a list of spaces from Confluence Cloud (REST API v2).
Base Command
confluence-cloud-space-listv2
Input
| Argument Name | Description | Required |
|---|---|---|
| ids | A comma-separated list of space IDs to filter by. | Optional |
| keys | A comma-separated list of space keys to filter by. | Optional |
| type | The type of spaces to filter by. Possible values are: global, personal. | Optional |
| status | The status of spaces to filter by. Possible values are: current, archived. | Optional |
| sort | Ordering of the results by a particular field. Prefix with ‘-‘ for descending order. | Optional |
| limit | The maximum number of records to return. Value must be between 1 and 250. Default is 50. | Optional |
| cursor | The cursor to use for fetching the next page of results (from a previous run’s ConfluenceCloud.PageToken output). | Optional |
Context Output
| Path | Type | Description |
|---|---|---|
| ConfluenceCloud.Space.id | String | The ID of the space. |
| ConfluenceCloud.Space.key | String | The key of the space. |
| ConfluenceCloud.Space.name | String | The name of the space. |
| ConfluenceCloud.Space.type | String | The type of the space. |
| ConfluenceCloud.Space.status | String | The status of the space. |
| ConfluenceCloud.PageToken.Content.next_page_token | String | The cursor to use for fetching the next page of results. |
| ConfluenceCloud.PageToken.Content.name | String | The name of the command that produced the page token. |
Command example
!confluence-cloud-space-listv2 limit=2
Context Example
{
"ConfluenceCloud": {
"Space": [
{
"id": "98765",
"key": "ENG",
"name": "Engineering",
"status": "current",
"type": "global"
},
{
"id": "98766",
"key": "MKT",
"name": "Marketing",
"status": "current",
"type": "global"
}
]
}
}
Human Readable Output
Space(s)
Id Key Name Type Status 98765 ENG Engineering global current 98766 MKT Marketing global current
confluence-cloud-blogpost-delete
Deletes a blog post in Confluence Cloud (REST API v2).
Base Command
confluence-cloud-blogpost-delete
Input
| Argument Name | Description | Required |
|---|---|---|
| blogpost_id | The ID of the blog post to delete. | Required |
| purge | Whether to permanently purge the blog post from the trash. Requires the blog post to already be in the trash. Possible values are: true, false. Default is false. | Optional |
Context Output
There is no context output for this command.
Command example
!confluence-cloud-blogpost-delete blogpost_id=12345
Human Readable Output
Blogpost with ID “12345” was deleted successfully.
confluence-cloud-page-list
Returns a list of pages from Confluence Cloud (REST API v2).
Base Command
confluence-cloud-page-list
Input
| Argument Name | Description | Required |
|---|---|---|
| id | A comma-separated list of page IDs to filter by. | Optional |
| space_id | A comma-separated list of space IDs to filter by. | Optional |
| status | The status of pages to filter by. Possible values are: current, archived, deleted, trashed. | Optional |
| title | The title of pages to filter by. | Optional |
| subtype | The subtype of pages to filter by. Possible values are: page, live. | Optional |
| sort | Ordering of the results by a particular field. Prefix with ‘-‘ for descending order. | Optional |
| limit | The maximum number of records to return. Value must be between 1 and 250. Default is 50. | Optional |
| cursor | The cursor to use for fetching the next page of results (from a previous run’s ConfluenceCloud.PageToken output). | Optional |
Context Output
| Path | Type | Description |
|---|---|---|
| ConfluenceCloud.Page.id | String | The ID of the page. |
| ConfluenceCloud.Page.status | String | The status of the page. |
| ConfluenceCloud.Page.title | String | The title of the page. |
| ConfluenceCloud.Page.spaceId | String | The ID of the space the page belongs to. |
| ConfluenceCloud.Page.authorId | String | The account ID of the page author. |
| ConfluenceCloud.Page.createdAt | Date | Date and time, in ISO 8601 format, when the page was created (e.g., 2024-01-15T12:34:56Z). |
| ConfluenceCloud.PageToken.Content.next_page_token | String | The cursor to use for fetching the next page of results. |
| ConfluenceCloud.PageToken.Content.name | String | The name of the command that produced the page token. |
Command example
!confluence-cloud-page-list limit=2
Context Example
{
"ConfluenceCloud": {
"Page": [
{
"authorId": "5ff2e30b4d2179006ea18449",
"createdAt": "2024-01-15T12:34:56Z",
"id": "12345",
"spaceId": "98765",
"status": "current",
"title": "Getting Started"
},
{
"authorId": "5ff2e30b4d2179006ea18449",
"createdAt": "2024-01-14T09:10:11Z",
"id": "12346",
"spaceId": "98765",
"status": "current",
"title": "Onboarding Guide"
}
]
}
}
Human Readable Output
Page(s)
Id Title Status Space Id Author Id Created At 12345 Getting Started current 98765 5ff2e30b4d2179006ea18449 2024-01-15T12:34:56Z 12346 Onboarding Guide current 98765 5ff2e30b4d2179006ea18449 2024-01-14T09:10:11Z
confluence-cloud-blogpost-list
Returns a list of blog posts from Confluence Cloud (REST API v2).
Base Command
confluence-cloud-blogpost-list
Input
| Argument Name | Description | Required |
|---|---|---|
| id | A comma-separated list of blog post IDs to filter by. | Optional |
| space_id | A comma-separated list of space IDs to filter by. | Optional |
| status | The status of blog posts to filter by. Possible values are: current, deleted, trashed. | Optional |
| title | The title of blog posts to filter by. | Optional |
| sort | Ordering of the results by a particular field. Prefix with ‘-‘ for descending order. | Optional |
| limit | The maximum number of records to return. Value must be between 1 and 250. Default is 50. | Optional |
| cursor | The cursor to use for fetching the next page of results (from a previous run’s ConfluenceCloud.PageToken output). | Optional |
Context Output
| Path | Type | Description |
|---|---|---|
| ConfluenceCloud.Blogpost.id | String | The ID of the blog post. |
| ConfluenceCloud.Blogpost.status | String | The status of the blog post. |
| ConfluenceCloud.Blogpost.title | String | The title of the blog post. |
| ConfluenceCloud.Blogpost.spaceId | String | The ID of the space the blog post belongs to. |
| ConfluenceCloud.Blogpost.authorId | String | The account ID of the blog post author. |
| ConfluenceCloud.Blogpost.createdAt | Date | Date and time, in ISO 8601 format, when the blog post was created (e.g., 2024-01-15T12:34:56Z). |
| ConfluenceCloud.PageToken.Content.next_page_token | String | The cursor to use for fetching the next page of results. |
| ConfluenceCloud.PageToken.Content.name | String | The name of the command that produced the page token. |
Command example
!confluence-cloud-blogpost-list limit=2
Context Example
{
"ConfluenceCloud": {
"Blogpost": [
{
"authorId": "5ff2e30b4d2179006ea18449",
"createdAt": "2024-01-15T12:34:56Z",
"id": "12345",
"spaceId": "98765",
"status": "current",
"title": "Quarterly Update"
},
{
"authorId": "5ff2e30b4d2179006ea18449",
"createdAt": "2024-01-14T09:10:11Z",
"id": "12346",
"spaceId": "98765",
"status": "current",
"title": "Release Announcement"
}
]
}
}
Human Readable Output
Blogpost(s)
Id Title Status Space Id Author Id Created At 12345 Quarterly Update current 98765 5ff2e30b4d2179006ea18449 2024-01-15T12:34:56Z 12346 Release Announcement current 98765 5ff2e30b4d2179006ea18449 2024-01-14T09:10:11Z
confluence-cloud-page-delete
Deletes a page in Confluence Cloud (REST API v2).
Base Command
confluence-cloud-page-delete
Input
| Argument Name | Description | Required |
|---|---|---|
| page_id | The ID of the page to delete. | Required |
| purge | Whether to permanently purge the page from the trash. Requires the page to already be in the trash. Possible values are: true, false. Default is false. | Optional |
Context Output
There is no context output for this command.
Command example
!confluence-cloud-page-delete page_id=12345
Human Readable Output
Page with ID “12345” was deleted successfully.
<~PLATFORM>
License Requirements
The following configuration parameters require the Cortex XSIAM license:
- Fetch Events
</~PLATFORM>
Configuration parameters
url— Site Name (e.g., https://${site-name}.atlassian.net) (required)auth_method— Authentication Methodusername— Emailcloud_id— Cloud IDcallback_url— Callback URLclient_credentials— Client IDproxy— Use system proxy settingsinsecure— Trust any certificate (not secure)eventFetchInterval— Events Fetch Intervalmax_events_per_fetch— Max number of events per fetchisFetchEvents— Fetch Events
Commands (27)
-
confluence-cloud-blogpost-createCreates a new blog post in Confluence Cloud (REST API v2).
-
confluence-cloud-blogpost-deleteDeletes a blog post in Confluence Cloud (REST API v2).
-
confluence-cloud-blogpost-listReturns a list of blog posts from Confluence Cloud (REST API v2).
-
confluence-cloud-blogpost-updateUpdates an existing blog post in Confluence Cloud (REST API v2).
-
confluence-cloud-comment-createDeprecatedDeprecated. Use confluence-cloud-footer-comment-create instead. Creates a comment for the given content. Note: To view the expansion of the content properties, execute the confluence-cloud-content-list and confluence-cloud-content-search commands.
-
confluence-cloud-content-createDeprecatedDeprecated. Use confluence-cloud-page-create or confluence-cloud-blogpost-create instead. Creates a page or blogpost for a given space. Note: To view the expansion of content properties, execute the confluence-cloud-content-list and confluence-cloud-content-search commands.
-
confluence-cloud-content-deleteDeprecatedDeprecated. Use confluence-cloud-page-delete or confluence-cloud-blogpost-delete instead. Delete the content depending on the content's type and status. Note: If the content's type is page or blogpost, it should be moved to trash before deleting permanently.
-
confluence-cloud-content-getDeprecatedDeprecated. Use confluence-cloud-page-list or confluence-cloud-blogpost-list instead. Retrieves a Content Item by its Content ID.
-
confluence-cloud-content-listDeprecatedDeprecated. Use confluence-cloud-page-list or confluence-cloud-blogpost-list instead. Returns the list of content of Confluence.
-
confluence-cloud-content-searchRetrieves a list of content using the Confluence Query Language (CQL). For more information on CQL, see: https://developer.atlassian.com/cloud/confluence/advanced-searching-using-cql/.
-
confluence-cloud-content-updateDeprecatedDeprecated. Use confluence-cloud-page-update or confluence-cloud-blogpost-update instead. Update the existing content with new content. Note: Updating draft content is currently not supported.
-
confluence-cloud-footer-comment-createCreates a footer comment in Confluence Cloud (REST API v2).
-
confluence-cloud-get-eventsRetrieves a list of events from the Atlassian Confluence Cloud instance. Use this command for development and debugging only, as it may produce duplicate events, exceed API rate limits, or disrupt the fetch mechanism.
-
confluence-cloud-group-listReturns all user groups.
-
confluence-cloud-oauth-completeCompletes the OAuth 2.0 authentication flow by exchanging the authorization code for access and refresh tokens.
-
confluence-cloud-oauth-startStarts the OAuth 2.0 authentication flow. Returns an authorization URL that the user must visit to authorize the integration.
-
confluence-cloud-oauth-testTests the OAuth 2.0 authentication by verifying the current access token is valid.
-
confluence-cloud-page-createCreates a new page in Confluence Cloud (REST API v2).
-
confluence-cloud-page-deleteDeletes a page in Confluence Cloud (REST API v2).
-
confluence-cloud-page-listReturns a list of pages from Confluence Cloud (REST API v2).
-
confluence-cloud-page-updateUpdates an existing page in Confluence Cloud (REST API v2).
-
confluence-cloud-space-createCreates a new space. Note: If no permissions are specified, the default space permissions defined by the Confluence cloud account admin will be used.
-
confluence-cloud-space-createv2Creates a new space in Confluence Cloud (REST API v2).
-
confluence-cloud-space-listDeprecatedDeprecated. Use confluence-cloud-space-listv2 instead. Returns a list of all Confluence spaces.
-
confluence-cloud-space-listv2Returns a list of spaces from Confluence Cloud (REST API v2).
-
confluence-cloud-user-listReturns a list of users.
-
get-file-contentRetrieves content from a Confluence page by its URL and returns it in a generic unified format under the FileContent context key. The command automatically extracts the content ID from the URL.
import time from unittest.mock import MagicMock, patch import pytest from AtlassianConfluenceCloud import ( DEFAULT_GET_EVENTS_LIMIT, MESSAGES, URL_SUFFIX, URL_SUFFIX_V2, Client, create_client, create_oauth_client, fetch_events, get_events, oauth_complete_command, oauth_start_command, oauth_test_command, ) from CommonServerPython import * from pytest_mock import MockerFixture from test_data import input_data BASE_URL = "https://dummy.atlassian.com" client = Client(BASE_URL, True, False, headers={"Accept": "application/json"}, auth=("user", "user123")) def util_load_json(path): with open(path, encoding="utf-8") as f: return json.loads(f.read()) collector_test_data = util_load_json("./test_data/collector/api_responses.json") def test_test_module_when_valid_response_is_returned(requests_mock): """ To test test_module command when success response come. Given - A valid response When - The status code returned is 200 Then - Ensure test module should return success """ from AtlassianConfluenceCloud import test_module requests_mock.get(BASE_URL + URL_SUFFIX["CONTENT_SEARCH"], status_code=200) assert test_module(client) == "ok" @pytest.mark.parametrize("status_code, error_msg", input_data.exception_handler_params) def test_exception_handler(status_code, error_msg, requests_mock): """ To test exception handler in various http error code. Given - a dictionary containing http code When - they are the error codes Then - raise DemistoException """ requests_mock.get(BASE_URL, status_code=status_code) with pytest.raises(DemistoException) as ve: Client.http_request(client, method="GET") assert str(ve.value) == error_msg @pytest.mark.parametrize("status_code, error_msg", input_data.exception_handler_forbidden_response) def test_exception_handler_when_403_error_occurred(status_code, error_msg, requests_mock, capfd): """ To test exception handler when 403 error code occurred. Given - a dictionary containing http error code 403 Then - raise DemistoException """ api_error_msg = util_load_json("test_data/error_msg_for_403_error_code.json") requests_mock.get(BASE_URL, json=api_error_msg, status_code=status_code) with capfd.disabled(): with pytest.raises(DemistoException) as de: Client.http_request(client, method="GET") assert str(de.value) == error_msg def test_validate_url(): """ To test validate_url helper function when empty url is given. Given - whitespaces provided in Site Name Then - Returns the response message of invalid input """ from AtlassianConfluenceCloud import validate_url with pytest.raises(ValueError) as ve: validate_url("") assert str(ve.value) == "Site Name can not be empty." def test_confluence_cloud_group_list_command_when_valid_response_is_returned(requests_mock): """ To test confluence_cloud_group_list command when valid response return. Given: - command arguments for list group command When: - Calling `confluence-cloud-group-list` command Then: - Returns the response data """ from AtlassianConfluenceCloud import confluence_cloud_group_list_command expected_response = util_load_json(os.path.join("test_data", "group/group_list_command_response.json")) requests_mock.get(BASE_URL + URL_SUFFIX["GROUP"], json=expected_response) expected_context_output = util_load_json(os.path.join("test_data", "group/group_list_command_context.json")) with open(os.path.join("test_data", "group/group_list_command.md")) as f: expected_readable_output = f.read() args = {"limit": "2", "access_type": "site-admin"} response = confluence_cloud_group_list_command(client, args) assert response.outputs_prefix == "ConfluenceCloud.Group" assert response.outputs_key_field == "id" assert response.outputs == expected_context_output assert response.readable_output == expected_readable_output @pytest.mark.parametrize("args, err_msg", input_data.list_group_invalid_args) def test_confluence_cloud_group_list_command_when_invalid_args_are_provided(args, err_msg): """ To test confluence_cloud_group_list command when invalid arguments are provided. Given: - invalid command arguments for list group command When - Calling `confluence-cloud-group-list` Then: - Returns the response message of invalid input arguments """ from AtlassianConfluenceCloud import confluence_cloud_group_list_command with pytest.raises(ValueError) as de: confluence_cloud_group_list_command(client, args) assert str(de.value) == err_msg def test_confluence_cloud_group_list_command_when_empty_response_is_returned(requests_mock): """ Test case scenario for successful execution of confluence_cloud_group_list command with an empty response. Given: - command arguments for list group command When: - Calling `confluence-cloud-group-list` command Then: - Returns no records for the given input arguments """ from AtlassianConfluenceCloud import confluence_cloud_group_list_command requests_mock.get(BASE_URL + URL_SUFFIX["GROUP"], json={"results": []}, status_code=200) command_results = confluence_cloud_group_list_command(client, {"limit": "0"}) assert command_results.readable_output == "No group(s) were found for the given argument(s)." def test_confluence_cloud_content_delete_command_when_valid_response_is_returned(requests_mock): """ To test confluence_cloud_content_delete command when valid response return. Given: - command arguments for delete content command When: - Calling `confluence-cloud-content-delete` command Then: - Returns the response data """ from AtlassianConfluenceCloud import confluence_cloud_content_delete_command requests_mock.delete(BASE_URL + URL_SUFFIX["CONTENT"] + "/123", status_code=204) args = {"content_id": "123"} response = confluence_cloud_content_delete_command(client, args) assert response.readable_output == MESSAGES["HR_DELETE_CONTENT"].format("123") @pytest.mark.parametrize("args, error_msg", input_data.delete_content_invalid_args) def test_confluence_cloud_content_delete_command_when_invalid_argument_given(args, error_msg): """ To test confluence_cloud_content_delete command when invalid argument is provided. Given: - invalid command arguments for delete content command When - Calling `confluence-cloud-content-delete` Then: - Returns the response message of invalid input arguments """ from AtlassianConfluenceCloud import confluence_cloud_content_delete_command with pytest.raises(ValueError) as de: confluence_cloud_content_delete_command(client, args) assert str(de.value) == error_msg def test_confluence_cloud_content_delete_command_when_api_returns_error(requests_mock, capfd): """ To test confluence_cloud_content_delete_command when 400 error code occurred. Given: - invalid command arguments for delete content command When: - Calling `confluence-cloud-content-delete` command Then: - Raise DemistoException """ from AtlassianConfluenceCloud import confluence_cloud_content_delete_command api_error_msg = util_load_json("test_data/content_delete/content_delete_command_bad_request_error.json") requests_mock.delete(BASE_URL + URL_SUFFIX["CONTENT"] + "/123", json=api_error_msg, status_code=400) args = {"content_id": "123", "status": "draft"} with capfd.disabled(): with pytest.raises(DemistoException) as de: confluence_cloud_content_delete_command(client, args) assert str(de.value) == f"{api_error_msg.get('data').get('errors')[0].get('message').get('translation')} \n" def test_confluence_cloud_content_create_command_when_valid_response_is_returned(requests_mock): """ To test confluence_cloud_content_create command when valid response return. Given: - command arguments for create content command When: - Calling `confluence-cloud-content-create` command Then: - Returns the response data """ from AtlassianConfluenceCloud import confluence_cloud_content_create_command expected_response = util_load_json(os.path.join("test_data", "content_create/content_create_command_response.json")) requests_mock.post(BASE_URL + URL_SUFFIX["CONTENT"], json=expected_response) expected_context_output = util_load_json(os.path.join("test_data", "content_create/content_create_command_context.json")) with open(os.path.join("test_data", "content_create/content_create_command.md")) as f: expected_readable_output = f.read() args = {"title": "test_page", "type": "page", "space_key": "XSOAR"} response = confluence_cloud_content_create_command(client, args) assert response.outputs_prefix == "ConfluenceCloud.Content" assert response.outputs_key_field == "id" assert response.outputs == expected_context_output assert response.readable_output == expected_readable_output @pytest.mark.parametrize("args, err_msg", input_data.content_create_invalid_args) def test_confluence_cloud_content_create_command_when_invalid_args_are_provided(args, err_msg): """ To test confluence_cloud_content_create command when invalid arguments are provided. Given: - invalid command arguments for create content command When - Calling `confluence-cloud-content-create` command Then: - Returns the response message of invalid input arguments """ from AtlassianConfluenceCloud import validate_create_content_args with pytest.raises(ValueError) as de: validate_create_content_args(args, is_update=False) assert str(de.value) == err_msg def test_confluence_cloud_content_create_command_when_object_not_present(requests_mock): """ To test confluence_cloud_content_create command when valid response return. Given: - command arguments for list group command When: - Calling `confluence-cloud-group-list` command Then: - Returns the response with some missing values """ from AtlassianConfluenceCloud import confluence_cloud_content_create_command expected_response = util_load_json(os.path.join("test_data", "content_create/content_create_object_not_present.json")) requests_mock.post(BASE_URL + URL_SUFFIX["CONTENT"], json=expected_response[0]) expected_context_output = util_load_json(os.path.join("test_data", "content_create/content_create_object_not_present.json")) with open(os.path.join("test_data", "content_create/content_create_object_not_present.md")) as f: expected_readable_output = f.read() args = {"title": "test_page", "type": "page", "space_key": "XSOAR"} response = confluence_cloud_content_create_command(client, args) assert response.outputs_prefix == "ConfluenceCloud.Content" assert response.outputs_key_field == "id" assert response.outputs == expected_context_output[1] assert response.readable_output == expected_readable_output def test_confluence_cloud_comment_create_command_when_valid_response_is_returned(requests_mock): """ To test confluence_cloud_comment_create command when valid response return. Given: - command arguments for create comment command When: - Calling `confluence-cloud-comment-create` command Then: - Returns the response data """ from AtlassianConfluenceCloud import confluence_cloud_comment_create_command expected_response = util_load_json(os.path.join("test_data", "comment_create/comment_create_command_response.json")) requests_mock.post(BASE_URL + URL_SUFFIX["CONTENT"], json=expected_response) expected_context_output = util_load_json(os.path.join("test_data", "comment_create/comment_create_command_context.json")) with open(os.path.join("test_data", "comment_create/comment_create_command.md")) as f: expected_readable_output = f.read() args = {"container_id": "2031630", "body_value": "hello", "body_representation": "storage"} response = confluence_cloud_comment_create_command(client, args) assert response.outputs_prefix == "ConfluenceCloud.Comment" assert response.outputs_key_field == "id" assert response.outputs == expected_context_output assert response.readable_output == expected_readable_output @pytest.mark.parametrize("args, err_msg", input_data.comment_create_invalid_args) def test_confluence_cloud_comment_create_command_when_invalid_args_provided(args, err_msg): """ To test confluence_cloud_comment_create command when invalid args are provided. Given: - invalid command arguments for create comment command When: - Calling `confluence-cloud-comment-create` command Then: - Returns the response message of invalid input arguments """ from AtlassianConfluenceCloud import confluence_cloud_comment_create_command with pytest.raises(ValueError) as de: confluence_cloud_comment_create_command(client, args) assert str(de.value) == err_msg def test_confluence_cloud_user_list_command_when_valid_response_is_returned(requests_mock): """ To test confluence_cloud_user_list command when valid response return. Given: - command arguments for list user command When: - Calling `confluence-cloud-user-list` command Then: - Returns the response data """ from AtlassianConfluenceCloud import confluence_cloud_user_list_command expected_response = util_load_json("test_data/User/user_list_command_response.json") requests_mock.get(BASE_URL + URL_SUFFIX["USER"], json=expected_response, status_code=200) expected_context_output = util_load_json("test_data/User/user_list_command_context.json") with open("test_data/User/user_list_command.md") as f: expected_readable_output = f.read() args = {"limit": "2", "start": "1"} response = confluence_cloud_user_list_command(client, args) assert response.outputs_prefix == "ConfluenceCloud.User" assert response.outputs_key_field == "accountId" assert response.outputs == expected_context_output assert response.readable_output == expected_readable_output @pytest.mark.parametrize("args, err_msg", input_data.list_user_invalid_args) def test_confluence_cloud_user_list_command_when_invalid_args_are_provided(args, err_msg): """ To test confluence_cloud_user_list command when invalid arguments are provided. Given: - invalid command arguments for list user command When: - Calling `confluence-cloud-user-list` command Then: - Returns the response message of invalid input arguments """ from AtlassianConfluenceCloud import confluence_cloud_user_list_command with pytest.raises(ValueError) as de: confluence_cloud_user_list_command(client, args) assert str(de.value) == err_msg def test_confluence_cloud_user_list_command_when_empty_response_is_returned(requests_mock): """ Test case scenario for successful execution of confluence_cloud_user_list command with an empty response. Given: - command arguments for list user command When: - Calling `confluence-cloud-user-list` command Then: - Returns no records for the given input arguments """ from AtlassianConfluenceCloud import confluence_cloud_user_list_command requests_mock.get(BASE_URL + URL_SUFFIX["USER"], json={"results": []}, status_code=200) command_results = confluence_cloud_user_list_command(client, {"limit": "0"}) assert command_results.readable_output == MESSAGES["NO_RECORDS_FOUND"].format("user(s)") def test_confluence_cloud_content_search_command_when_valid_response_is_returned(requests_mock): """ To test confluence_cloud_content_search command when valid response return. Given: - command arguments for search content command When: - Calling `confluence-cloud-content-search` command Then: - Returns the response data """ from AtlassianConfluenceCloud import DEFAULT_EXPANDED_FIELD_CONTENT, confluence_cloud_content_search_command expected_response = util_load_json(os.path.join("test_data", "content_search/content_search_command_response.json")) requests_mock.get(BASE_URL + URL_SUFFIX["CONTENT_SEARCH"], json=expected_response) expected_context_output = util_load_json(os.path.join("test_data", "content_search/content_search_command_context.json")) with open(os.path.join("test_data", "content_search/content_search_command.md")) as f: expected_readable_output = f.read() args = {"query": "type=page", "expand": DEFAULT_EXPANDED_FIELD_CONTENT, "next_token": "1223344resfdczcxdvcdsv"} response = confluence_cloud_content_search_command(client, args) assert response.outputs == expected_context_output assert response.readable_output == expected_readable_output @pytest.mark.parametrize("args, err_msg", input_data.content_search_invalid_args) def test_confluence_cloud_content_search_command_when_invalid_arguments_are_provided(args, err_msg): """ To test confluence_cloud_content_search command when invalid arguments are provided. Given: - invalid command arguments for search content command When: - Calling `confluence-cloud-content-search` command Then: - Returns the response message of invalid input arguments """ from AtlassianConfluenceCloud import confluence_cloud_content_search_command with pytest.raises(ValueError) as de: confluence_cloud_content_search_command(client, args) assert str(de.value) == err_msg @pytest.mark.parametrize("args, err_msg", input_data.content_search_invalid_arg_value) def test_confluence_cloud_content_search_command_when_invalid_argument_value_are_provided(args, err_msg, requests_mock, capfd): """ To test confluence_cloud_content_search command when invalid argument value are provided. Given: - invalid command arguments for search content command When: - Calling `confluence-cloud-content-search` command Then: - Raise DemistoException """ from AtlassianConfluenceCloud import confluence_cloud_content_search_command expected_response = util_load_json(os.path.join("test_data", "content_search/content_search_invalid_query_argument.json")) requests_mock.get(BASE_URL + URL_SUFFIX["CONTENT_SEARCH"], status_code=400, json=expected_response) with capfd.disabled(): with pytest.raises(DemistoException) as ve: confluence_cloud_content_search_command(client, args) assert str(ve.value) == err_msg def test_confluence_cloud_content_search_command_when_empty_response_is_returned(requests_mock): """ To test confluence_cloud_content_search command when empty response returned. Given: - command arguments for search content command When: - Calling `confluence-cloud-content-search` command Then: - Returns no records for the given input arguments """ from AtlassianConfluenceCloud import confluence_cloud_content_search_command requests_mock.get(BASE_URL + URL_SUFFIX["CONTENT_SEARCH"], json={"results": []}, status_code=200) args = {"query": "type=page", "limit": 0} response = confluence_cloud_content_search_command(client, args) assert response.readable_output == MESSAGES["NO_RECORDS_FOUND"].format("content(s)") def test_confluence_cloud_content_list_command_when_valid_response_is_returned(requests_mock): """ To test confluence_cloud_content_list command when valid response return. Given: - command arguments for list content command When: - Calling `confluence-cloud-content-list` command Then: - Returns the response data """ from AtlassianConfluenceCloud import DEFAULT_EXPANDED_FIELD_CONTENT, confluence_cloud_content_list_command expected_response = util_load_json(os.path.join("test_data", "content_list/content_list_command_response.json")) requests_mock.get(BASE_URL + URL_SUFFIX["CONTENT"], json=expected_response) expected_context_output = util_load_json(os.path.join("test_data", "content_list/content_list_command_context.json")) with open(os.path.join("test_data", "content_list/content_list_command.md")) as f: expected_readable_output = f.read() args = { "limit": 2, "expand": DEFAULT_EXPANDED_FIELD_CONTENT, "space_key": "~680738455", "sort_order": "asc", "sort_key": "id", "status": "current", "creation_date": "6 Aug 2021", } response = confluence_cloud_content_list_command(client, args) assert response.outputs_prefix == "ConfluenceCloud.Content" assert response.outputs_key_field == "id" assert response.outputs == expected_context_output assert response.readable_output == expected_readable_output def test_confluence_cloud_content_list_command_when_empty_response_is_returned(requests_mock): """ To test confluence_cloud_content_list command when empty response returned. Given: - command arguments for list content command When: - Calling `confluence-cloud-content-list` command Then: - Returns no records for the given input arguments """ from AtlassianConfluenceCloud import confluence_cloud_content_list_command requests_mock.get(BASE_URL + URL_SUFFIX["CONTENT"], json={"results": []}, status_code=200) args = {"limit": "0"} response = confluence_cloud_content_list_command(client, args) assert response.readable_output == MESSAGES["NO_RECORDS_FOUND"].format("content(s)") @pytest.mark.parametrize("args, err_msg", input_data.content_list_invalid_arg_value) def test_confluence_cloud_content_list_command_when_invalid_arguments_are_provided(args, err_msg): """ To test confluence_cloud_content_list command when invalid arguments are provided. Given: - invalid command arguments for list content command When: - Calling `confluence-cloud-content-list` command Then: - Returns the response message of invalid input arguments """ from AtlassianConfluenceCloud import confluence_cloud_content_list_command with pytest.raises(ValueError) as de: confluence_cloud_content_list_command(client, args) assert str(de.value) == err_msg def test_confluence_cloud_space_create_command_when_valid_response_is_returned(requests_mock): """ To test confluence_cloud_space_create command when valid response return. Given: - command arguments for create space command When: - Calling `confluence-cloud-space-create` command Then: - Returns the response data """ from AtlassianConfluenceCloud import confluence_cloud_space_create_command expected_response = util_load_json(os.path.join("test_data", "space_create/space_create_command_response.json")) requests_mock.post(BASE_URL + URL_SUFFIX["SPACE"], json=expected_response) expected_context_output = util_load_json(os.path.join("test_data", "space_create/space_create_command_context.json")) with open(os.path.join("test_data", "space_create/space_create_command.md")) as f: expected_readable_output = f.read() args = { "name": "XSOAR_Project", "unique_key": "XSOAR", } response = confluence_cloud_space_create_command(client, args) assert response.outputs_prefix == "ConfluenceCloud.Space" assert response.outputs_key_field == "id" assert response.outputs == expected_context_output assert response.readable_output == expected_readable_output @pytest.mark.parametrize("args, err_msg", input_data.create_space_invalid_args) def test_confluence_cloud_space_create_command_when_invalid_args_are_provided(args, err_msg): """ To test confluence_cloud_space_create command when invalid arguments are provided. Given: - invalid command arguments for create space command When: - Calling `confluence-cloud-space-create` command Then: - Returns the response message of invalid input arguments """ from AtlassianConfluenceCloud import validate_create_space_args with pytest.raises(ValueError) as de: validate_create_space_args(args) assert str(de.value) == err_msg @pytest.mark.parametrize("args, err_msg", input_data.create_space_invalid_permission) def test_confluence_cloud_space_create_command_when_invalid_permission_are_provided(args, err_msg): """ To test confluence_cloud_space_create command when invalid permissions are provided. Given: - invalid permission arguments for create space command When: - Calling `confluence-cloud-space-create` command Then: - Returns the response message of invalid input arguments """ from AtlassianConfluenceCloud import validate_permissions with pytest.raises(ValueError) as de: validate_permissions(args) assert str(de.value) == err_msg def test_confluence_cloud_space_create_command_when_valid_permission_are_provided(): """ To test confluence_cloud_space_create command when valid permissions are provided. Given: - valid permission arguments for create space command When: - Calling `confluence-cloud-space-create` command Then: - Returns the response """ from AtlassianConfluenceCloud import validate_permissions args = {"permission_account_id": "123", "permission_group_name": "abc", "permission_operations": "read:space"} expected_result = util_load_json(os.path.join("test_data", "space_create/space_create_valid_permission.json")) actual_result = validate_permissions(args) assert expected_result == actual_result def test_confluence_cloud_space_list_command_when_valid_response_is_returned(requests_mock): """ To test confluence_cloud_space_list command when valid response return. Given: - command arguments for list space command When: - Calling `confluence-cloud-space-list` command Then: - Returns the response data """ from AtlassianConfluenceCloud import confluence_cloud_space_list_command expected_response = util_load_json(os.path.join("test_data", "space_list/space_list_command_response.json")) requests_mock.get(BASE_URL + URL_SUFFIX["SPACE"], json=expected_response) expected_context_output = util_load_json(os.path.join("test_data", "space_list/space_list_command_context.json")) with open(os.path.join("test_data", "space_list/space_list_command.md")) as f: expected_readable_output = f.read() args = {"limit": "2", "status": "current", "favourite": "false", "type": "global"} response = confluence_cloud_space_list_command(client, args) assert response.outputs_prefix == "ConfluenceCloud.Space" assert response.outputs_key_field == "id" assert response.outputs == expected_context_output assert response.readable_output == expected_readable_output def test_confluence_cloud_space_list_command_when_empty_response_is_returned(requests_mock): """ To test confluence_cloud_space_list command when empty response returned. Given: - command arguments for list space command When: - Calling `confluence-cloud-space-list` command Then: - Returns no records for the given input arguments """ from AtlassianConfluenceCloud import confluence_cloud_space_list_command requests_mock.get(BASE_URL + URL_SUFFIX["SPACE"], json={"results": []}, status_code=200) args = {"limit": "0"} response = confluence_cloud_space_list_command(client, args) assert response.readable_output == MESSAGES["NO_RECORDS_FOUND"].format("space(s)") @pytest.mark.parametrize("args, err_msg", input_data.list_space_invalid_args) def test_confluence_cloud_space_list_command_when_invalid_args_are_provided(args, err_msg): """ To test confluence_cloud_space_list command when invalid arguments are provided. Given: - invalid command arguments for list space command When: - Calling `confluence-cloud-space-list` command Then: - Returns the response message of invalid input arguments """ from AtlassianConfluenceCloud import confluence_cloud_space_list_command with pytest.raises(ValueError) as de: confluence_cloud_space_list_command(client, args) assert str(de.value) == err_msg def test_confluence_cloud_content_update_command_when_valid_response_is_returned(requests_mock): """ To test confluence_cloud_content_update command when valid response return. Given: - command arguments for update content command When: - Calling `confluence-cloud-content-update` command Then: - Returns the response data """ from AtlassianConfluenceCloud import confluence_cloud_content_update_command expected_response = util_load_json(os.path.join("test_data", "content_create/content_create_command_response.json")) requests_mock.put(BASE_URL + URL_SUFFIX["CONTENT"] + "/2097159", json=expected_response) expected_context_output = util_load_json(os.path.join("test_data", "content_create/content_create_command_context.json")) with open(os.path.join("test_data", "content_create/content_create_command.md")) as f: expected_readable_output = f.read() args = {"content_id": "2097159", "title": "test_page", "type": "page", "version": 2} response = confluence_cloud_content_update_command(client, args) assert response.outputs_prefix == "ConfluenceCloud.Content" assert response.outputs_key_field == "id" assert response.outputs == expected_context_output assert response.readable_output == expected_readable_output @pytest.mark.parametrize("args, err_msg", input_data.content_update_invalid_arg_value) def test_confluence_cloud_content_update_command_when_invalid_args_are_provided(args, err_msg): """ To test confluence_cloud_content_update command when invalid arguments are provided. Given: - invalid command arguments for update content command When: - Calling `confluence-cloud-content-update` command Then: - Returns the response message of invalid input arguments """ from AtlassianConfluenceCloud import confluence_cloud_content_update_command with pytest.raises(ValueError) as de: confluence_cloud_content_update_command(client, args) assert str(de.value) == err_msg def test_confluence_cloud_content_update_command_when_object_not_present(requests_mock): """ To test confluence_cloud_content_update command when object is not present in response. Given: - command arguments for update content command When: - Calling `confluence-cloud-content-update` command Then: - Returns the response data with some missing values """ from AtlassianConfluenceCloud import confluence_cloud_content_update_command expected_response = util_load_json(os.path.join("test_data", "content_create/content_create_object_not_present.json")) requests_mock.put(BASE_URL + URL_SUFFIX["CONTENT"] + "/2097159", json=expected_response[0]) expected_context_output = util_load_json(os.path.join("test_data", "content_create/content_create_object_not_present.json")) with open(os.path.join("test_data", "content_create/content_create_object_not_present.md")) as f: expected_readable_output = f.read() args = {"content_id": "2097159", "title": "test_page", "type": "page", "version": 2} response = confluence_cloud_content_update_command(client, args) assert response.outputs_prefix == "ConfluenceCloud.Content" assert response.outputs_key_field == "id" assert response.outputs == expected_context_output[1] assert response.readable_output == expected_readable_output def test_confluence_cloud_comment_create_command_when_object_not_present(requests_mock): """ To test confluence_cloud_comment_create command when object not present. Given: - command arguments for create comment command When: - Calling `confluence-cloud-comment-create` command Then: - Returns the response data with some missing values """ from AtlassianConfluenceCloud import confluence_cloud_comment_create_command expected_response = util_load_json(os.path.join("test_data", "comment_create/comment_create_object_not_present.json")) requests_mock.post(BASE_URL + URL_SUFFIX["CONTENT"], json=expected_response[0]) expected_context_output = util_load_json(os.path.join("test_data", "comment_create/comment_create_object_not_present.json")) with open(os.path.join("test_data", "comment_create/comment_create_object_not_present.md")) as f: expected_readable_output = f.read() args = {"container_id": "2031630", "body_value": "hello", "body_representation": "storage"} response = confluence_cloud_comment_create_command(client, args) assert response.outputs_prefix == "ConfluenceCloud.Comment" assert response.outputs_key_field == "id" assert response.outputs == expected_context_output[1] assert response.readable_output == expected_readable_output def test_confluence_cloud_space_list_command_when_key_not_present(requests_mock): """ To test confluence_cloud_space_list command when key not present. Given: - command arguments for list space command When: - Calling `confluence-cloud-space-list` command Then: - Returns the response data with some missing values """ from AtlassianConfluenceCloud import confluence_cloud_space_list_command expected_response = util_load_json(os.path.join("test_data", "space_list/space_list_command_key_not_present_response.json")) requests_mock.get(BASE_URL + URL_SUFFIX["SPACE"], json=expected_response) expected_context_output = util_load_json( os.path.join("test_data", "space_list/space_list_command_key_not_present_context.json") ) with open(os.path.join("test_data", "space_list/space_list_command_key_not_present.md")) as f: expected_readable_output = f.read() args = {"limit": "2", "status": "current", "favourite": "false", "type": "global"} response = confluence_cloud_space_list_command(client, args) assert response.outputs_prefix == "ConfluenceCloud.Space" assert response.outputs_key_field == "id" assert response.outputs == expected_context_output assert response.readable_output == expected_readable_output def test_confluence_cloud_content_search_command_when_object_not_present(requests_mock): """ To test confluence_cloud_content_search command when object is not present in response. Given: - command arguments for search content command When: - Calling `confluence-cloud-content-search` command Then: - Returns the response data with some missing values """ from AtlassianConfluenceCloud import DEFAULT_EXPANDED_FIELD_CONTENT, confluence_cloud_content_search_command expected_response = util_load_json( os.path.join("test_data", "content_search/content_search_object_not_present_response.json") ) requests_mock.get(BASE_URL + URL_SUFFIX["CONTENT_SEARCH"], json=expected_response) expected_context_output = util_load_json( os.path.join("test_data", "content_search/content_search_object_not_present_context.json") ) with open(os.path.join("test_data", "content_search/content_search_object_not_present.md")) as f: expected_readable_output = f.read() args = {"query": "type=page", "expand": DEFAULT_EXPANDED_FIELD_CONTENT, "next_token": "1223344resfdczcxdvcdsv"} response = confluence_cloud_content_search_command(client, args) assert response.outputs == expected_context_output assert response.readable_output == expected_readable_output def test_confluence_cloud_content_list_command_when_when_object_not_present(requests_mock): """ To test confluence_cloud_content_list command when object is not present in response. Given: - command arguments for list content command When: - Calling `confluence-cloud-content-list` command Then: - Returns the response data with some missing values """ from AtlassianConfluenceCloud import DEFAULT_EXPANDED_FIELD_CONTENT, confluence_cloud_content_list_command expected_response = util_load_json(os.path.join("test_data", "content_list/content_list_object_not_present_response.json")) requests_mock.get(BASE_URL + URL_SUFFIX["CONTENT"], json=expected_response) expected_context_output = util_load_json( os.path.join("test_data", "content_list/content_list_object_not_present_context.json") ) with open(os.path.join("test_data", "content_list/content_list_object_not_present.md")) as f: expected_readable_output = f.read() args = { "limit": 2, "expand": DEFAULT_EXPANDED_FIELD_CONTENT, "space_key": "~680738455", "sort_order": "asc", "sort_key": "id", "status": "current", "date": "6 Aug 2021", } response = confluence_cloud_content_list_command(client, args) assert response.outputs_prefix == "ConfluenceCloud.Content" assert response.outputs_key_field == "id" assert response.outputs == expected_context_output assert response.readable_output == expected_readable_output def test_fetch_events_empty_last_run(mocker: MockerFixture): """ Given: - First time running fetch_events (last_run is empty) When: - The fetch_events function is called with an empty last_run dictionary and a fetch_limit of 100 Then: - Ensure the events are returned - Ensure the last_run object is returned correctly - Ensure client.search_events is called with the correct arguments """ fetch_limit = 100 response = collector_test_data["get-audit-records-no-links"] # mock values mock_time = 1680000000 mocker.patch("demistomock.getLastRun", return_value={}) mocker.patch("time.time", return_value=mock_time) mock_search = mocker.patch.object(client, "search_events", return_value=response) # expected values expected_end_date = (mock_time - 5) * 1000 expected_start_date = expected_end_date - 60000 # call actual_events, last_run = fetch_events(client, fetch_limit, {}) # assertions mock_search.assert_called_with(limit=fetch_limit, start_date=str(expected_start_date), end_date=str(expected_end_date)) assert actual_events == response["results"] assert last_run == {"next_link": None, "end_date": expected_end_date} def test_fetch_events_with_partial_last_run(mocker: MockerFixture): """ Given: - Running fetch_events with a previous end date in last_run but no next_link in last_run When: - There are events to fetch Then: - Ensure client.search_events is called with the correct arguments """ fetch_limit = 100 last_run = {"end_date": 1670000000} first_page_response = collector_test_data["get-audit-records-no-links"] # mock values mock_time = 1680000000 mocker.patch("time.time", return_value=mock_time) mocker.patch("demistomock.getLastRun", return_value=last_run) mock_search = mocker.patch.object(client, "search_events", return_value=first_page_response) # expected values expected_end_date = (mock_time - 5) * 1000 expected_start_date = last_run["end_date"] + 1 actual_events, actual_last_run = fetch_events(client, fetch_limit, last_run) mock_search.assert_called_with(limit=fetch_limit, start_date=str(expected_start_date), end_date=str(expected_end_date)) assert actual_events == first_page_response["results"] assert actual_last_run == {"end_date": expected_end_date, "next_link": None} def test_fetch_events_with_full_last_run(mocker: MockerFixture): """ Given: - Running fetch_events with a last_run that has a next_link and an end_date When: - There are events to fetch Then: - Ensure the events are returned - Ensure the last_run object is returned correctly - Ensure client.search_events is called with the correct arguments """ fetch_limit = 100 last_run = {"end_date": 1670000000, "next_link": "https://example.com/next-page"} first_page_response = collector_test_data["get-audit-records-no-links"] first_page_results = first_page_response["results"] # mock values mock_time = 1680000000 mocker.patch("time.time", return_value=mock_time) mocker.patch("demistomock.getLastRun", return_value=last_run) mock_search = mocker.patch.object(client, "search_events", return_value=first_page_response) # expected values expected_end_date = (mock_time - 5) * 1000 expected_start_date = last_run["end_date"] + 1 actual_events, actual_last_run = fetch_events(client, fetch_limit, last_run) assert actual_events == first_page_response["results"] * 2 assert actual_last_run == {"end_date": int(expected_end_date), "next_link": None} mock_search.assert_has_calls( [ mocker.call(limit=fetch_limit, next_link=last_run["next_link"]), mocker.call( limit=fetch_limit - len(first_page_results), start_date=str(expected_start_date), end_date=str(expected_end_date) ), ] ) def test_fetch_events_fetch_limit_reached_with_link(mocker: MockerFixture): """ Given: - Running fetch_events with a fetch limit the same as the number of events in the first page response When: - The fetch limit is reached - The last response had no next link Then: - search_events is called ONCE with the correct page_size - The returned last_run object contains a next_link property with the value from the response, indicating there are more pages to fetch """ first_page_response = collector_test_data["get-audit-records-with-links"] first_page_events = first_page_response["results"] fetch_limit = len(first_page_events) # mock values mock_time = 1680000000 mocker.patch("time.time", return_value=mock_time) mock_search = mocker.patch.object(client, "search_events", return_value=first_page_response) # expected values expected_end_date = (mock_time - 5) * 1000 expected_start_date = expected_end_date - 60000 _, last_run = fetch_events(client, fetch_limit, {}) mock_search.assert_called_once_with(limit=fetch_limit, start_date=str(expected_start_date), end_date=str(expected_end_date)) assert last_run == {"next_link": first_page_response["_links"]["next"], "end_date": expected_end_date} def test_fetch_events_limit_is_0(mocker: MockerFixture): """ Given: - Running fetch_events with a fetch limit of 0 When: - The fetch_events function is called Then: - Ensure client.search_events is not called - Ensure the returned events are empty - Ensure the returned last_run contains no next_link and the end_date is the same as the input last_run """ last_run = {"end_date": 1670000000, "next_link": "https://example.com/next-page"} # mock values mocker.patch("demistomock.getLastRun", return_value=last_run) mock_search = mocker.patch.object(client, "search_events") actual_events, actual_last_run = fetch_events(client, 0, last_run) mock_search.assert_not_called() assert actual_events == [] assert actual_last_run == {"next_link": None, "end_date": last_run["end_date"]} def test_get_events_default_values(mocker: MockerFixture): """ Given: - Using default values for start_date, end_date and limit When: - Calling get_events Then: - Ensure the events are returned - Ensure client.search_events is called with the correct arguments """ # mock values mock_time = 1680000000 mocker.patch("time.time", return_value=mock_time) mocked_response = collector_test_data["get-audit-records-with-links"] mock_search = mocker.patch.object(client, "search_events", return_value=mocked_response) # expected value expected_events = (mocked_response.get("results")) * 2 expected_next_link = mocked_response["_links"]["next"] expected_end_date = (mock_time - 5) * 1000 expected_start_date = expected_end_date - 60000 expected_first_page_size = int(DEFAULT_GET_EVENTS_LIMIT) expected_second_page_size = int(DEFAULT_GET_EVENTS_LIMIT) - 25 # call actual_events, _ = get_events(client, {}) # assertions assert actual_events == expected_events mock_search.assert_has_calls( [ mocker.call(limit=expected_first_page_size, start_date=str(expected_start_date), end_date=str(expected_end_date)), mocker.call(limit=expected_second_page_size, next_link=expected_next_link), ] ) def test_get_events_with_arguments(mocker: MockerFixture): """ Given: - Providing start_date, end_date and limit as arguments When: - Calling get_events Then: - Ensure the events are returned - Ensure client.search_events is called with the correct arguments """ args = {"start_date": 1670000000, "end_date": 1680000000, "limit": 50} mocked_response = collector_test_data["get-audit-records-no-links"] mocked_search = mocker.patch.object(client, "search_events", return_value=mocked_response) actual_events, _ = get_events(client, args) assert actual_events == mocked_response["results"] mocked_search.assert_called_once_with(limit=int(DEFAULT_GET_EVENTS_LIMIT), start_date="1670000000", end_date="1680000000") def test_confluence_cloud_content_get_command_when_resource_not_found(mocker: MockerFixture): from AtlassianConfluenceCloud import confluence_cloud_content_get_command, HTTP_ERROR mock_client = mocker.Mock(spec=Client) mock_client.http_request.side_effect = Exception(HTTP_ERROR[404]) args = {"content_id": "65639"} with pytest.raises(Exception) as de: confluence_cloud_content_get_command(mock_client, args) assert str(de.value) == HTTP_ERROR[404] def test_confluence_cloud_content_get_command_when_valid_response_is_returned(requests_mock): """ To test confluence_cloud_content_get command when valid response return. Given: - command arguments for get content command When: - Calling `confluence-cloud-content-get` command Then: - Returns the response data """ from AtlassianConfluenceCloud import confluence_cloud_content_get_command expected_response = util_load_json(os.path.join("test_data", "content_get/content_get_command_context.json")) requests_mock.get( "https://dummy.atlassian.com/wiki/rest/api/content/test-page-id?expand=body.storage", json=expected_response ) expected_context_output = util_load_json(os.path.join("test_data", "content_get/content_get_command_context.json")) with open(os.path.join("test_data", "content_get/content_get_command.md")) as f: expected_readable_output = f.read() args = {"content_id": "test-page-id"} response = confluence_cloud_content_get_command(client, args) assert response.outputs_prefix == "ConfluenceCloud.Content" assert response.outputs_key_field == "id" assert response.outputs == expected_context_output assert response.readable_output == expected_readable_output class TestOAuthFunctions: """Tests for OAuth-related functions in AtlassianConfluenceCloud.""" def test_create_oauth_client_basic_auth(self): """Test that create_oauth_client returns None for Basic auth.""" params = {"auth_method": "Basic"} result = create_oauth_client(params) assert result is None def test_create_oauth_client_default_auth(self): """Test that create_oauth_client returns None when auth_method is not set (defaults to Basic).""" params = {} result = create_oauth_client(params) assert result is None @patch("AtlassianApiModule.get_integration_context", return_value={}) @patch("AtlassianApiModule.set_integration_context") def test_create_oauth_client_oauth(self, mock_set_ctx, mock_get_ctx): """Test that create_oauth_client creates a client for OAuth 2.0.""" params = { "auth_method": "OAuth 2.0", "client_credentials": {"identifier": "test-id", "password": "test-secret"}, "cloud_id": "test-cloud-id", "callback_url": "https://localhost/callback", "url": "https://mysite.atlassian.net", "insecure": False, "proxy": False, } result = create_oauth_client(params) assert result is not None assert result.client_id == "test-id" assert result.cloud_id == "test-cloud-id" def test_create_oauth_client_missing_credentials(self): """Test that create_oauth_client raises error when credentials are missing.""" params = { "auth_method": "OAuth 2.0", "client_credentials": {"identifier": "", "password": ""}, "callback_url": "https://localhost/callback", } with pytest.raises(DemistoException, match="Client ID and Client Secret are required"): create_oauth_client(params) def test_create_oauth_client_missing_callback(self): """Test that create_oauth_client raises error when callback URL is missing.""" params = { "auth_method": "OAuth 2.0", "client_credentials": {"identifier": "test-id", "password": "test-secret"}, "callback_url": "", } with pytest.raises(DemistoException, match="Callback URL is required"): create_oauth_client(params) def test_create_client_basic_auth(self): """Test create_client with Basic authentication.""" params = { "url": "https://mysite.atlassian.net", "auth_method": "Basic", "username": {"identifier": "user@example.com", "password": "api-token"}, "insecure": False, "proxy": False, } result = create_client(params) assert isinstance(result, Client) def test_create_client_basic_auth_missing_credentials(self): """Test create_client raises error when Basic auth credentials are missing.""" params = { "url": "https://mysite.atlassian.net", "auth_method": "Basic", "username": {"identifier": "", "password": ""}, "insecure": False, "proxy": False, } with pytest.raises(ValueError, match="Basic authentication requires Email and API Token"): create_client(params) @patch("AtlassianApiModule.get_integration_context") def test_create_client_oauth(self, mock_get_ctx): """Test create_client with OAuth 2.0 uses the correct API gateway base URL.""" mock_get_ctx.return_value = { "token": "test-access-token", "valid_until": time.time() + 3600, "refresh_token": "test-refresh-token", } mock_oauth_client = MagicMock() mock_oauth_client.get_access_token.return_value = "test-access-token" mock_oauth_client.cloud_id = "test-cloud-id-123" mock_oauth_client.verify = True params = { "url": "https://mysite.atlassian.net", "auth_method": "OAuth 2.0", "insecure": False, "proxy": False, } result = create_client(params, oauth_client=mock_oauth_client) assert isinstance(result, Client) # Verify the base URL uses the Atlassian API gateway with cloud_id assert result._base_url == "https://api.atlassian.com/ex/confluence/test-cloud-id-123" @patch("AtlassianApiModule.get_integration_context") def test_create_client_oauth_no_cloud_id_raises(self, mock_get_ctx): """Test create_client with OAuth 2.0 raises DemistoException when cloud_id is empty.""" mock_get_ctx.return_value = { "token": "test-access-token", "valid_until": time.time() + 3600, "refresh_token": "test-refresh-token", } mock_oauth_client = MagicMock() mock_oauth_client.get_access_token.return_value = "test-access-token" mock_oauth_client.cloud_id = "" mock_oauth_client.verify = True params = { "url": "https://mysite.atlassian.net", "auth_method": "OAuth 2.0", "insecure": False, "proxy": False, } with pytest.raises(DemistoException, match="Cloud ID is required for OAuth 2.0 authentication"): create_client(params, oauth_client=mock_oauth_client) def test_create_client_oauth_request_url(self, requests_mock): """Test that OAuth client builds request URLs correctly with the /ex/confluence/{cloud_id} prefix. This validates that the XSOAR urljoin correctly appends url_suffix to the OAuth base URL (which contains a path component) without dropping the /ex/confluence/{cloud_id} segment. """ cloud_id = "test-cloud-id-123" oauth_base_url = f"https://api.atlassian.com/ex/confluence/{cloud_id}" # Create a Client directly with the OAuth base URL (as create_client does for OAuth) oauth_client_obj = Client( base_url=oauth_base_url, verify=False, proxy=False, headers={"Authorization": "Bearer test-token"}, ) # Register a mock for the expected full URL including /ex/confluence/{cloud_id} expected_url = f"{oauth_base_url}{URL_SUFFIX['CONTENT_SEARCH']}" requests_mock.get(expected_url, json={"results": []}, status_code=200) # Make the request oauth_client_obj.http_request(method="GET", url_suffix=URL_SUFFIX["CONTENT_SEARCH"]) # Verify the request was sent to the correct URL, including the /ex/confluence/{cloud_id} path assert requests_mock.called assert f"/ex/confluence/{cloud_id}/wiki/" in requests_mock.last_request.url @patch("AtlassianApiModule.get_integration_context", return_value={}) @patch("AtlassianApiModule.set_integration_context") def test_oauth_start_command(self, mock_set_ctx, mock_get_ctx): """Test oauth_start_command returns authorization URL.""" from AtlassianApiModule import ConfluenceCloudOAuthClient oauth_client = ConfluenceCloudOAuthClient( client_id="test-id", client_secret="test-secret", callback_url="https://localhost/callback", cloud_id="test-cloud-id", ) result = oauth_start_command(oauth_client) assert "Authorization Instructions" in result.readable_output assert "https://auth.atlassian.com/authorize" in result.readable_output @patch("AtlassianApiModule.get_integration_context", return_value={}) @patch("AtlassianApiModule.set_integration_context") @patch("requests.post") def test_oauth_complete_command(self, mock_post, mock_set_ctx, mock_get_ctx): """Test oauth_complete_command exchanges code for tokens.""" from AtlassianApiModule import ConfluenceCloudOAuthClient mock_response = MagicMock() mock_response.json.return_value = { "access_token": "new-token", "refresh_token": "new-refresh", "expires_in": 3600, "scope": "read:audit-log:confluence", } mock_post.return_value = mock_response oauth_client = ConfluenceCloudOAuthClient( client_id="test-id", client_secret="test-secret", callback_url="https://localhost/callback", cloud_id="test-cloud-id", ) result = oauth_complete_command(oauth_client, code="test-code") assert "Successfully authenticated" in result.readable_output @patch("AtlassianApiModule.get_integration_context") @patch("requests.get") def test_oauth_test_command_success(self, mock_get, mock_get_ctx): """Test oauth_test_command with valid token.""" mock_get_ctx.return_value = { "token": "valid-token", "valid_until": time.time() + 3600, "refresh_token": "refresh-token", } mock_response = MagicMock() mock_response.json.return_value = [ { "id": "cloud-123", "name": "My Site", "url": "https://mysite.atlassian.net", "scopes": ["read:confluence-content.all"], } ] mock_get.return_value = mock_response from AtlassianApiModule import ConfluenceCloudOAuthClient oauth_client = ConfluenceCloudOAuthClient( client_id="test-id", client_secret="test-secret", callback_url="https://localhost/callback", cloud_id="test-cloud-id", ) result = oauth_test_command(oauth_client) assert "Authentication successful" in result.readable_output @patch("AtlassianApiModule.get_integration_context") def test_oauth_test_command_failure(self, mock_get_ctx): """Test oauth_test_command with no token.""" mock_get_ctx.return_value = {} from AtlassianApiModule import ConfluenceCloudOAuthClient oauth_client = ConfluenceCloudOAuthClient( client_id="test-id", client_secret="test-secret", callback_url="https://localhost/callback", cloud_id="test-cloud-id", ) with pytest.raises(DemistoException, match="Authentication failed"): oauth_test_command(oauth_client) def test_create_client_url_normalization(self): """Test that create_client normalizes various URL formats.""" params = { "url": "https://mysite.atlassian.net/wiki/", "auth_method": "Basic", "username": {"identifier": "user@example.com", "password": "api-token"}, "insecure": False, "proxy": False, } result = create_client(params) assert isinstance(result, Client) def test_create_client_site_name_only(self): """Test that create_client handles site name without full URL.""" params = { "url": "mysite", "auth_method": "Basic", "username": {"identifier": "user@example.com", "password": "api-token"}, "insecure": False, "proxy": False, } result = create_client(params) assert isinstance(result, Client) # --- REST API v2 command tests --- def test_confluence_cloud_page_create_command(requests_mock): """ Given: Command arguments for the page-create command. When: Calling `confluence-cloud-page-create`. Then: The response data is returned in the ConfluenceCloud.Page context. """ from AtlassianConfluenceCloud import confluence_cloud_page_create_command expected_response = util_load_json(os.path.join("test_data", "page_create/page_create_command_response.json")) requests_mock.post(BASE_URL + URL_SUFFIX_V2["PAGES"], json=expected_response) expected_context = util_load_json(os.path.join("test_data", "page_create/page_create_command_context.json")) with open(os.path.join("test_data", "page_create/page_create_command.md")) as f: expected_readable_output = f.read() args = {"space_id": "98765", "title": "XSOAR_Page", "body_value": "<p>Hello</p>"} response = confluence_cloud_page_create_command(client, args) assert response.outputs_prefix == "ConfluenceCloud.Page" assert response.outputs_key_field == "id" assert response.outputs == expected_context assert response.readable_output == expected_readable_output @pytest.mark.parametrize("args, err_msg", input_data.content_create_v2_invalid_args) def test_confluence_cloud_page_create_command_invalid_args(args, err_msg): """ Given: Invalid command arguments for the page-create command. When: Calling the validation helper. Then: A ValueError with the expected message is raised. """ from AtlassianConfluenceCloud import validate_content_create_args_v2 with pytest.raises(ValueError) as de: validate_content_create_args_v2(args) assert str(de.value) == err_msg def test_confluence_cloud_page_list_command(requests_mock): """ Given: Command arguments for the page-list command with a single page of results. When: Calling `confluence-cloud-page-list` with a limit larger than the available results. Then: The results are returned and no manual next-page token is emitted (auto-pagination). """ from AtlassianConfluenceCloud import confluence_cloud_page_list_command expected_response = util_load_json(os.path.join("test_data", "page_list/page_list_command_response.json")) requests_mock.get(BASE_URL + URL_SUFFIX_V2["PAGES"], json=expected_response) expected_context = util_load_json(os.path.join("test_data", "page_list/page_list_command_context.json")) response = confluence_cloud_page_list_command(client, {"space_id": "98765"}) assert response.outputs["ConfluenceCloud.Page(val.id == obj.id)"] == expected_context # Auto-pagination replaced the manual cursor output; no PageToken should be emitted. assert "ConfluenceCloud.PageToken.Content(val.name == obj.name)" not in response.outputs def test_confluence_cloud_page_list_command_empty(requests_mock): """ Given: A page-list response with no results. When: Calling `confluence-cloud-page-list`. Then: A no-records-found message is returned. """ from AtlassianConfluenceCloud import confluence_cloud_page_list_command requests_mock.get(BASE_URL + URL_SUFFIX_V2["PAGES"], json={"results": []}) response = confluence_cloud_page_list_command(client, {}) assert response.readable_output == MESSAGES["NO_RECORDS_FOUND"].format("page(s)") @pytest.mark.parametrize("args, err_msg", input_data.content_list_v2_invalid_args) def test_confluence_cloud_page_list_command_invalid_args(args, err_msg): """ Given: Invalid arguments for the page-list command. When: Calling the validation helper. Then: A ValueError with the expected message is raised. """ from AtlassianConfluenceCloud import CONTENT_V2_CONFIG, validate_content_list_args_v2 with pytest.raises(ValueError) as de: validate_content_list_args_v2(args, CONTENT_V2_CONFIG["page"]) assert str(de.value) == err_msg def test_confluence_cloud_page_update_command(requests_mock): """ Given: Command arguments for the page-update command. When: Calling `confluence-cloud-page-update`. Then: The updated page is returned. """ from AtlassianConfluenceCloud import confluence_cloud_page_update_command expected_response = util_load_json(os.path.join("test_data", "page_create/page_create_command_response.json")) requests_mock.put(BASE_URL + URL_SUFFIX_V2["PAGES"] + "/12345", json=expected_response) args = {"page_id": "12345", "version_number": "2", "title": "XSOAR_Page", "body_value": "<p>Updated</p>"} response = confluence_cloud_page_update_command(client, args) assert response.outputs_prefix == "ConfluenceCloud.Page" assert response.outputs_key_field == "id" def test_confluence_cloud_page_delete_command(requests_mock): """ Given: Command arguments for the page-delete command. When: Calling `confluence-cloud-page-delete`. Then: A success message is returned. """ from AtlassianConfluenceCloud import confluence_cloud_page_delete_command requests_mock.delete(BASE_URL + URL_SUFFIX_V2["PAGES"] + "/12345", status_code=204) response = confluence_cloud_page_delete_command(client, {"page_id": "12345"}) assert response.readable_output == MESSAGES["HR_PAGE_DELETE"].format("12345") def test_confluence_cloud_blogpost_create_command(requests_mock): """ Given: Command arguments for the blogpost-create command. When: Calling `confluence-cloud-blogpost-create`. Then: The response data is returned in the ConfluenceCloud.Blogpost context. """ from AtlassianConfluenceCloud import confluence_cloud_blogpost_create_command expected_response = util_load_json(os.path.join("test_data", "page_create/page_create_command_response.json")) requests_mock.post(BASE_URL + URL_SUFFIX_V2["BLOGPOSTS"], json=expected_response) args = {"space_id": "98765", "title": "XSOAR_Page", "body_value": "<p>Hello</p>"} response = confluence_cloud_blogpost_create_command(client, args) assert response.outputs_prefix == "ConfluenceCloud.Blogpost" assert response.outputs_key_field == "id" def test_confluence_cloud_blogpost_delete_command(requests_mock): """ Given: Command arguments for the blogpost-delete command. When: Calling `confluence-cloud-blogpost-delete`. Then: A success message is returned. """ from AtlassianConfluenceCloud import confluence_cloud_blogpost_delete_command requests_mock.delete(BASE_URL + URL_SUFFIX_V2["BLOGPOSTS"] + "/12345", status_code=204) response = confluence_cloud_blogpost_delete_command(client, {"blogpost_id": "12345"}) assert response.readable_output == MESSAGES["HR_BLOGPOST_DELETE"].format("12345") def test_confluence_cloud_footer_comment_create_command(requests_mock): """ Given: Command arguments for the footer-comment-create command. When: Calling `confluence-cloud-footer-comment-create`. Then: The response data is returned in the ConfluenceCloud.Comment context. """ from AtlassianConfluenceCloud import confluence_cloud_footer_comment_create_command expected_response = util_load_json( os.path.join("test_data", "footer_comment_create/footer_comment_create_command_response.json") ) requests_mock.post(BASE_URL + URL_SUFFIX_V2["FOOTER_COMMENTS"], json=expected_response) expected_context = util_load_json( os.path.join("test_data", "footer_comment_create/footer_comment_create_command_context.json") ) with open(os.path.join("test_data", "footer_comment_create/footer_comment_create_command.md")) as f: expected_readable_output = f.read() args = {"body_value": "<p>This is a footer comment</p>", "page_id": "12345"} response = confluence_cloud_footer_comment_create_command(client, args) assert response.outputs_prefix == "ConfluenceCloud.Comment" assert response.outputs == expected_context assert response.readable_output == expected_readable_output @pytest.mark.parametrize("args, err_msg", input_data.comment_create_v2_invalid_args) def test_confluence_cloud_comment_create_command_invalid_args(args, err_msg): """ Given: Invalid arguments for the comment-create commands. When: Calling the validation helper. Then: A ValueError with the expected message is raised. """ from AtlassianConfluenceCloud import validate_comment_create_args_v2 with pytest.raises(ValueError) as de: validate_comment_create_args_v2(args) assert str(de.value) == err_msg def test_confluence_cloud_space_list_command_v2(requests_mock): """ Given: Command arguments for the space-listv2 command. When: Calling `confluence-cloud-space-listv2`. Then: The space results are returned. """ from AtlassianConfluenceCloud import confluence_cloud_space_list_command_v2 expected_response = util_load_json(os.path.join("test_data", "space_list_v2/space_list_v2_command_response.json")) requests_mock.get(BASE_URL + URL_SUFFIX_V2["SPACES"], json=expected_response) expected_context = util_load_json(os.path.join("test_data", "space_list_v2/space_list_v2_command_context.json")) with open(os.path.join("test_data", "space_list_v2/space_list_v2_command.md")) as f: expected_readable_output = f.read() response = confluence_cloud_space_list_command_v2(client, {}) assert response.outputs["ConfluenceCloud.Space(val.id == obj.id)"] == expected_context assert response.readable_output == expected_readable_output @pytest.mark.parametrize("args, err_msg", input_data.space_list_v2_invalid_args) def test_confluence_cloud_space_list_command_v2_invalid_args(args, err_msg): """ Given: Invalid arguments for the space-listv2 command. When: Calling the validation helper. Then: A ValueError with the expected message is raised. """ from AtlassianConfluenceCloud import validate_space_list_args_v2 with pytest.raises(ValueError) as de: validate_space_list_args_v2(args) assert str(de.value) == err_msg def test_confluence_cloud_space_create_command_v2(requests_mock): """ Given: Command arguments for the space-createv2 command. When: Calling `confluence-cloud-space-createv2`. Then: The created space is returned. """ from AtlassianConfluenceCloud import confluence_cloud_space_create_command_v2 expected_response = util_load_json(os.path.join("test_data", "space_create_v2/space_create_v2_command_response.json")) requests_mock.post(BASE_URL + URL_SUFFIX_V2["SPACES"], json=expected_response) expected_context = util_load_json(os.path.join("test_data", "space_create_v2/space_create_v2_command_context.json")) with open(os.path.join("test_data", "space_create_v2/space_create_v2_command.md")) as f: expected_readable_output = f.read() args = {"name": "XSOAR Space", "key": "XSOAR"} response = confluence_cloud_space_create_command_v2(client, args) assert response.outputs_prefix == "ConfluenceCloud.Space" assert response.outputs == expected_context assert response.readable_output == expected_readable_output @pytest.mark.parametrize("args, err_msg", input_data.space_create_v2_invalid_args) def test_confluence_cloud_space_create_command_v2_invalid_args(args, err_msg): """ Given: Invalid arguments for the space-createv2 command. When: Calling the validation helper. Then: A ValueError with the expected message is raised. """ from AtlassianConfluenceCloud import validate_space_create_args_v2 with pytest.raises(ValueError) as de: validate_space_create_args_v2(args) assert str(de.value) == err_msg def test_confluence_cloud_blogpost_list_command(requests_mock): """ Given: Command arguments for the blogpost-list command with a single page of results. When: Calling `confluence-cloud-blogpost-list`. Then: The results are returned under the Blogpost context and no next-page token is emitted. """ from AtlassianConfluenceCloud import confluence_cloud_blogpost_list_command expected_response = util_load_json(os.path.join("test_data", "page_list/page_list_command_response.json")) requests_mock.get(BASE_URL + URL_SUFFIX_V2["BLOGPOSTS"], json=expected_response) response = confluence_cloud_blogpost_list_command(client, {"space_id": "98765"}) assert "ConfluenceCloud.Blogpost(val.id == obj.id)" in response.outputs assert len(response.outputs["ConfluenceCloud.Blogpost(val.id == obj.id)"]) == 2 assert "ConfluenceCloud.PageToken.Content(val.name == obj.name)" not in response.outputs def test_confluence_cloud_blogpost_list_command_empty(requests_mock): """ Given: A blogpost-list response with no results. When: Calling `confluence-cloud-blogpost-list`. Then: A no-records-found message is returned. """ from AtlassianConfluenceCloud import confluence_cloud_blogpost_list_command requests_mock.get(BASE_URL + URL_SUFFIX_V2["BLOGPOSTS"], json={"results": []}) response = confluence_cloud_blogpost_list_command(client, {}) assert response.readable_output == MESSAGES["NO_RECORDS_FOUND"].format("blog post(s)") def test_confluence_cloud_blogpost_update_command(requests_mock): """ Given: Command arguments for the blogpost-update command. When: Calling `confluence-cloud-blogpost-update`. Then: The updated blogpost is returned under the Blogpost context. """ from AtlassianConfluenceCloud import confluence_cloud_blogpost_update_command expected_response = util_load_json(os.path.join("test_data", "page_create/page_create_command_response.json")) requests_mock.put(BASE_URL + URL_SUFFIX_V2["BLOGPOSTS"] + "/12345", json=expected_response) args = {"blogpost_id": "12345", "version_number": "2", "title": "XSOAR_Blogpost", "body_value": "<p>Updated</p>"} response = confluence_cloud_blogpost_update_command(client, args) assert response.outputs_prefix == "ConfluenceCloud.Blogpost" assert response.outputs_key_field == "id" def test_confluence_cloud_page_list_command_auto_paginates_to_limit(requests_mock): """ Given: A page-list request with limit=3 and an API that returns 2 results per page with a next cursor. When: Calling `confluence-cloud-page-list`. Then: The command follows the cursor across pages and returns exactly `limit` (3) records. """ from AtlassianConfluenceCloud import confluence_cloud_page_list_command first_page = { "results": [{"id": "1", "title": "P1"}, {"id": "2", "title": "P2"}], "_links": {"base": f"{BASE_URL}/wiki"}, } second_page = { "results": [{"id": "3", "title": "P3"}, {"id": "4", "title": "P4"}], "_links": {"base": f"{BASE_URL}/wiki"}, } next_link = f'<{BASE_URL}/wiki/api/v2/pages?cursor=NEXT_CURSOR>; rel="next"' requests_mock.get( BASE_URL + URL_SUFFIX_V2["PAGES"], [ {"json": first_page, "headers": {"Link": next_link}}, {"json": second_page}, ], ) response = confluence_cloud_page_list_command(client, {"space_id": "98765", "limit": "3"}) results = response.outputs["ConfluenceCloud.Page(val.id == obj.id)"] assert [item["id"] for item in results] == ["1", "2", "3"] assert requests_mock.call_count == 2 def test_confluence_cloud_page_list_command_stops_when_no_next_cursor(requests_mock): """ Given: A page-list request with a large limit but the API returns a single page with no next cursor. When: Calling `confluence-cloud-page-list`. Then: The command returns the available results without issuing further requests. """ from AtlassianConfluenceCloud import confluence_cloud_page_list_command single_page = {"results": [{"id": "1", "title": "P1"}], "_links": {"base": f"{BASE_URL}/wiki"}} requests_mock.get(BASE_URL + URL_SUFFIX_V2["PAGES"], json=single_page) response = confluence_cloud_page_list_command(client, {"space_id": "98765", "limit": "500"}) assert len(response.outputs["ConfluenceCloud.Page(val.id == obj.id)"]) == 1 assert requests_mock.call_count == 1 def test_paginate_v2_results_caps_per_page_request_at_max(requests_mock): """ Given: A total limit larger than the API single-page maximum (MAX_LIMIT_V2). When: Calling paginate_v2_results. Then: The first per-page request uses limit=MAX_LIMIT_V2, not the full total. """ from AtlassianConfluenceCloud import MAX_LIMIT_V2, URL_SUFFIX_V2, paginate_v2_results page = {"results": [{"id": str(i)} for i in range(MAX_LIMIT_V2)], "_links": {}} next_link = f'<{BASE_URL}/wiki/api/v2/pages?cursor=C2>; rel="next"' last_page = {"results": [{"id": "last"}], "_links": {}} requests_mock.get( BASE_URL + URL_SUFFIX_V2["PAGES"], [ {"json": page, "headers": {"Link": next_link}}, {"json": last_page}, ], ) results, _ = paginate_v2_results(client, URL_SUFFIX_V2["PAGES"], {}, MAX_LIMIT_V2 + 1) assert len(results) == MAX_LIMIT_V2 + 1 assert int(requests_mock.request_history[0].qs["limit"][0]) == MAX_LIMIT_V2 def test_validate_limit_v2_allows_value_above_previous_cap(): """ Given: A limit value larger than the old 250 hard cap. When: Calling validate_limit_v2. Then: The value is accepted and returned (the artificial cap was removed). """ from AtlassianConfluenceCloud import validate_limit_v2 assert validate_limit_v2({"limit": "1000"}) == 1000 @pytest.mark.parametrize("bad_limit", ["0", "-5"]) def test_validate_limit_v2_rejects_non_positive(bad_limit): """ Given: A non-positive limit value. When: Calling validate_limit_v2. Then: A ValueError with the INVALID_LIMIT_V2 message is raised. """ from AtlassianConfluenceCloud import validate_limit_v2 with pytest.raises(ValueError) as de: validate_limit_v2({"limit": bad_limit}) assert str(de.value) == MESSAGES["INVALID_LIMIT_V2"].format(int(bad_limit)) def test_prepare_space_create_params_v2_invalid_role_assignments(): """ Given: A role_assignments argument that is not valid JSON. When: Building space-create v2 params. Then: A ValueError with the role_assignments-specific message is raised (not the advanced_permissions one). """ from AtlassianConfluenceCloud import prepare_space_create_params_v2 args = {"name": "XSOAR Space", "key": "XSOAR", "role_assignments": "not-json"} with pytest.raises(ValueError) as de: prepare_space_create_params_v2(args) assert str(de.value) == MESSAGES["INVALID_ROLE_ASSIGNMENTS_V2"] def test_validate_content_update_args_v2_invalid_status_uses_update_message(): """ Given: An invalid status on the content-update v2 path. When: Validating update args. Then: The error uses the update-specific message and echoes the received value. """ from AtlassianConfluenceCloud import CONTENT_V2_CONFIG, validate_content_update_args_v2 args = {"page_id": "12345", "version_number": "2", "status": "archived"} with pytest.raises(ValueError) as de: validate_content_update_args_v2(args, CONTENT_V2_CONFIG["page"]) assert str(de.value) == f"{MESSAGES['INVALID_STATUS_UPDATE_V2']} Received: 'archived'." def test_prepare_hr_for_content_v2_handles_null_version(): """ Given: A content object where the API returned version as null. When: Preparing the human-readable output. Then: No AttributeError is raised and the Version field is empty. """ from AtlassianConfluenceCloud import prepare_hr_for_content_list_v2 content = [{"id": "1", "title": "P1", "status": "current", "createdAt": "2024-01-01T10:00:00.000Z", "version": None}] # Should not raise AttributeError on null version. hr = prepare_hr_for_content_list_v2(content, "Page") assert "P1" in hr def test_prepare_hr_for_comment_v2_handles_null_version(): """ Given: A comment object where the API returned version as null. When: Preparing the human-readable output. Then: No AttributeError is raised. """ from AtlassianConfluenceCloud import prepare_hr_for_comment_v2 comment = {"id": "1", "status": "current", "version": None} # Should not raise AttributeError on null version. prepare_hr_for_comment_v2(comment, "Footer Comment") def test_prepare_cursor_from_link_header(): """ Given: A requests.Response with a Link header containing a next cursor. When: Calling prepare_cursor_from_link_header. Then: The cursor value is extracted correctly. """ from AtlassianConfluenceCloud import prepare_cursor_from_link_header response = MagicMock() response.headers = {"Link": f'<{BASE_URL}/wiki/api/v2/pages?limit=25&cursor=ABC123>; rel="next"'} assert prepare_cursor_from_link_header(response) == "ABC123" response.headers = {} assert prepare_cursor_from_link_header(response) == "" response.headers = {"Link": f'<{BASE_URL}/wiki/api/v2/pages?cursor=PREV>; rel="prev"'} assert prepare_cursor_from_link_header(response) == "" @pytest.mark.parametrize( "url, expected_id", [ ("https://mysite.atlassian.net/wiki/spaces/TEST/pages/2097159/My+Page", "2097159"), ("https://mysite.atlassian.net/wiki/rest/api/content/12345", "12345"), ("https://mysite.atlassian.net/wiki/pages/viewpage.action?pageId=99999", "99999"), ("https://mysite.atlassian.net/wiki/spaces/DEV/pages/111222/Some+Title?extra=param", "111222"), ], ) def test_extract_content_id_from_url(url: str, expected_id: str): """ Given: A Confluence page URL in various supported formats. When: Calling _extract_content_id_from_url to parse the URL. Then: The correct content ID is extracted from the URL. """ from AtlassianConfluenceCloud import _extract_content_id_from_url assert _extract_content_id_from_url(url) == expected_id def test_extract_content_id_from_url_invalid(): """ Given: An unsupported URL format that does not contain a Confluence content ID. When: Calling _extract_content_id_from_url to parse the URL. Then: A ValueError is raised with a descriptive error message. """ from AtlassianConfluenceCloud import _extract_content_id_from_url with pytest.raises(ValueError, match="Could not extract content ID from URL"): _extract_content_id_from_url("https://example.com/not-a-confluence-url") def test_generic_file_get_command_success(requests_mock): """ Given: A valid Confluence page URL pointing to an existing page. When: Calling the generic-file-get command with the URL. Then: The command returns a FileContent output with the correct title, type, content, and ID. """ from AtlassianConfluenceCloud import confluence_cloud_generic_file_get_command expected_response = util_load_json(os.path.join("test_data", "content_get/generic_file_get_response.json")) requests_mock.get( "https://dummy.atlassian.com/wiki/rest/api/content/2097159?expand=body.storage", json=expected_response, ) args = {"url": "https://dummy.atlassian.net/wiki/spaces/TEST/pages/2097159/test_page"} result = confluence_cloud_generic_file_get_command(client, args) assert result.outputs_prefix == "FileContent" assert result.outputs["Id"] == "2097159" assert result.outputs["Title"] == "test_page" assert result.outputs["Type"] == "text/markdown" # Content is the storage-format HTML converted to Markdown. assert isinstance(result.outputs["Content"], str) content = result.outputs["Content"] assert "This is the page content" in content # Assert specific Markdown syntax to ensure the HTML was actually converted to Markdown: # - the <h1> is rendered as a setext heading (underlined with '='). assert "Heading\n=======" in content # - the <li> items are rendered as Markdown bullet-list markers. assert "* Item one" in content assert "* Item two" in content # No raw HTML tags should remain after the conversion. assert "<p>" not in content assert "<h1>" not in content assert "<ul>" not in content assert "<li>" not in content assert result.outputs["Url"] == args["url"] def test_generic_file_get_command_missing_url(): """ Given: No URL argument provided to the generic-file-get command. When: Calling the generic-file-get command without a URL. Then: A ValueError is raised indicating the url argument is required. """ from AtlassianConfluenceCloud import confluence_cloud_generic_file_get_command with pytest.raises(ValueError, match="'url' argument is required"): confluence_cloud_generic_file_get_command(client, {})