{"openapi":"3.0.1","info":{"title":"Confluence Data Center","description":"This is the reference document for the Atlassian Confluence DC REST API. The REST API is for developers who want to: \n\n - integrate Confluence with other applications;\n\n - create scripts that interact with Confluence; or\n\n - develop plugins that enhance the Confluence UI, using REST to interact with the backend. \n\n You can read more about developing Confluence plugins in the [Confluence Developer Documentation](https://developer.atlassian.com/server/confluence/).","termsOfService":"https://www.atlassian.com/legal/software-license-agreement","version":"9.1.1"},"servers":[{"url":"http://{baseurl}/confluence","variables":{"baseurl":{"default":"example.com:7990","description":"Address of your Confluence instance"}}}],"components":{"securitySchemes":{"basic":{"type":"http","description":"In order to use basic authorization, provide username:password Base64 encoded in the 'Authorization' header.","scheme":"basic"}},"schemas":{"Group":{},"Credentials":{"type":"object","properties":{"password":{"type":"string","example":"password"}}},"UserDetailsForCreation":{"type":"object","properties":{"userName":{"type":"string","example":"user1"},"fullName":{"type":"string","example":"Some User"},"email":{"type":"string","example":"someuser@someemail.com"},"password":{"type":"string","example":"password"},"notifyViaEmail":{"type":"boolean","example":true}}},"MockAttachmentRequest":{"type":"object","properties":{"file":{"type":"string","description":"The name of the multipart/form-data parameter that contains attachments must be \\\"file\\\"."},"comment":{"type":"string","description":"(optional) a list of \\\"comments\\\" matching the list of attachment data.\\nIf supplied, the size of this list must match the size of the fileParts list."},"minorEdit":{"type":"boolean","description":"(optional) form parameter indicating whether the attachments should be \\\"minorEdits\\\".If \\\"minorEdits\\\" is set to true, no notification email will be generated for that attachment."},"hidden":{"type":"boolean","description":"(optional) form parameter indicating whether the attachments should be \\\"hidden\\\".If \\\"hidden\\\" is set to true, no notification email or activity stream will be generated for that attachment."}}},"Anonymous":{},"Container":{},"Content":{"properties":{"id":{"type":"string","example":"123456"},"type":{"type":"string","example":"page"},"status":{"type":"string","example":"current"},"title":{"type":"string","example":"My Page"},"links":{"type":"object"},"space":{"$ref":"#/components/schemas/Space"},"history":{"$ref":"#/components/schemas/History"},"version":{"$ref":"#/components/schemas/Version"},"ancestors":{"type":"array","items":{"$ref":"#/components/schemas/Content"}},"position":{"type":"integer","format":"int32","example":1},"operations":{"type":"array","items":{"$ref":"#/components/schemas/OperationCheckResult"}},"children":{"type":"object"},"descendants":{"type":"object"},"container":{"$ref":"#/components/schemas/Container"},"body":{"type":"object"},"metadata":{"type":"object","example":{"key":"value"}},"extensions":{"type":"object","example":{"key":"value"}},"restrictions":{"type":"object","example":{"use":{"operation":"use","restrictions":[]}}},"containerRef":{"$ref":"#/components/schemas/ReferenceContainer"},"versionRef":{"$ref":"#/components/schemas/ReferenceVersion"},"historyRef":{"$ref":"#/components/schemas/ReferenceHistory"},"spaceRef":{"$ref":"#/components/schemas/ReferenceSpace"}}},"ContentBody":{"properties":{"representation":{"type":"string"},"value":{"type":"string","example":"This is a body"},"webresource":{"$ref":"#/components/schemas/WebResourceDependencies"},"content":{"$ref":"#/components/schemas/ReferenceContent"},"contentRef":{"$ref":"#/components/schemas/ReferenceContent"}}},"ContentRestriction":{"properties":{"content":{"$ref":"#/components/schemas/ReferenceContent"},"operation":{"type":"string"},"restrictions":{"type":"object"}}},"Cursor":{"properties":{"reverse":{"type":"boolean"},"cursorType":{"type":"string","enum":["SPACE","CONTENT"]}}},"FormattedBody":{"properties":{"representation":{"type":"string"},"value":{"type":"string","example":"This is a body"},"webresource":{"$ref":"#/components/schemas/WebResourceDependencies"}}},"History":{"properties":{"previousVersion":{"$ref":"#/components/schemas/ReferenceVersion"},"nextVersion":{"$ref":"#/components/schemas/ReferenceVersion"},"lastUpdated":{"$ref":"#/components/schemas/ReferenceVersion"},"latest":{"type":"boolean","example":true},"createdBy":{"$ref":"#/components/schemas/Person"},"createdDate":{"type":"string","format":"date-time","example":"2020-01-01T00:00:00Z"},"contributors":{"$ref":"#/components/schemas/ReferenceContributors"},"lastUpdatedRef":{"$ref":"#/components/schemas/ReferenceVersion"},"nextVersionRef":{"$ref":"#/components/schemas/ReferenceVersion"},"previousVersionRef":{"$ref":"#/components/schemas/ReferenceVersion"},"contentParentRef":{"$ref":"#/components/schemas/ReferenceContent"}}},"Icon":{"properties":{"path":{"type":"string","example":"http://www.example.com/path/to/image.png"},"width":{"type":"integer","format":"int32","example":16},"height":{"type":"integer","format":"int32","example":16},"isDefault":{"type":"boolean","example":true}}},"KnownUser":{},"Link":{"properties":{"type":{"type":"string"},"path":{"type":"string"}}},"OperationCheckResult":{"properties":{"operation":{"type":"string","example":"read"},"targetType":{"type":"string","example":"page"}}},"PageRequest":{"properties":{"start":{"type":"integer","format":"int32"},"cursor":{"$ref":"#/components/schemas/Cursor"},"limit":{"type":"integer","format":"int32"}}},"PageResponseContent":{"properties":{"pageRequest":{"$ref":"#/components/schemas/PageRequest"},"nextCursor":{"$ref":"#/components/schemas/Cursor"},"prevCursor":{"$ref":"#/components/schemas/Cursor"},"results":{"type":"array","items":{"$ref":"#/components/schemas/Content"}}}},"PageResponseSubject":{"properties":{"pageRequest":{"$ref":"#/components/schemas/PageRequest"},"nextCursor":{"$ref":"#/components/schemas/Cursor"},"prevCursor":{"$ref":"#/components/schemas/Cursor"},"results":{"type":"array","items":{"$ref":"#/components/schemas/Subject"}}}},"Person":{"properties":{"profilePicture":{"$ref":"#/components/schemas/Icon"},"displayName":{"type":"string","example":"Joe Smith"},"type":{"type":"string"}}},"ReferenceContainer":{"properties":{"expanded":{"type":"boolean"},"idProperties":{"type":"object"}}},"ReferenceContent":{"properties":{"expanded":{"type":"boolean"},"idProperties":{"type":"object"}}},"ReferenceContributors":{"properties":{"expanded":{"type":"boolean"},"idProperties":{"type":"object"}}},"ReferenceHistory":{"properties":{"expanded":{"type":"boolean"},"idProperties":{"type":"object"}}},"ReferenceIcon":{"properties":{"expanded":{"type":"boolean"},"idProperties":{"type":"object"}}},"ReferenceSpace":{"properties":{"expanded":{"type":"boolean"},"idProperties":{"type":"object"}}},"ReferenceSpaceRetentionPolicy":{"properties":{"expanded":{"type":"boolean"},"idProperties":{"type":"object"}}},"ReferenceUserStatus":{"properties":{"expanded":{"type":"boolean"},"idProperties":{"type":"object"}}},"ReferenceVersion":{"properties":{"expanded":{"type":"boolean"},"idProperties":{"type":"object"}}},"RestListContent":{"type":"array","properties":{"pageRequest":{"$ref":"#/components/schemas/PageRequest"},"results":{"type":"array","items":{"$ref":"#/components/schemas/Content"}},"nextCursor":{"$ref":"#/components/schemas/Cursor"},"prevCursor":{"$ref":"#/components/schemas/Cursor"},"pageResponse":{"$ref":"#/components/schemas/PageResponseContent"}},"items":{"$ref":"#/components/schemas/Content"}},"Space":{"properties":{"id":{"type":"integer","format":"int64","example":123456},"key":{"type":"string","example":"TEST"},"name":{"type":"string","example":"Test Space"},"status":{"type":"string","example":"current"},"icon":{"$ref":"#/components/schemas/ReferenceIcon"},"description":{"type":"object"},"homepage":{"$ref":"#/components/schemas/ReferenceContent"},"links":{"type":"object"},"type":{"type":"string","example":"global"},"metadata":{"type":"object","example":{"labels":["label1","label2"]}},"retentionPolicy":{"$ref":"#/components/schemas/ReferenceSpaceRetentionPolicy"}}},"Subject":{"properties":{"displayName":{"type":"string"},"type":{"type":"string"}}},"SuperBatchWebResources":{"properties":{"uris":{"type":"object"},"tags":{"type":"object"},"metatags":{"type":"string"}}},"UnknownUser":{},"User":{},"Version":{"properties":{"by":{"$ref":"#/components/schemas/Person"},"when":{"type":"string","format":"date-time","example":"2020-01-01T00:00:00Z"},"message":{"type":"string","example":"A message"},"number":{"type":"integer","format":"int32","example":1},"minorEdit":{"type":"boolean","example":true},"hidden":{"type":"boolean","example":true},"syncRev":{"type":"string","example":"123456"},"content":{"$ref":"#/components/schemas/ReferenceContent"},"contentRef":{"$ref":"#/components/schemas/ReferenceContent"}}},"WebResourceDependencies":{"properties":{"keys":{"type":"array","example":["key1","key2","key3"],"items":{"type":"string","example":"[\"key1\",\"key2\",\"key3\"]"}},"contexts":{"type":"array","example":["context1","context2","context3"],"items":{"type":"string","example":"[\"context1\",\"context2\",\"context3\"]"}},"uris":{"type":"object"},"tags":{"type":"object"},"superbatch":{"$ref":"#/components/schemas/SuperBatchWebResources"}}},"FilePart":{"type":"object","properties":{"formField":{"type":"boolean"},"name":{"type":"string"},"value":{"type":"string"},"size":{"type":"integer","format":"int64"},"inputStream":{"type":"object"},"contentType":{"type":"string"}}},"SiteBackupSettings":{"properties":{"skipAttachments":{"type":"boolean","example":true},"keepPermanently":{"type":"boolean","example":true},"fileNamePrefix":{"type":"string","example":"backup"}}},"SiteRestoreSettings":{"properties":{"filename":{"type":"string","writeOnly":true},"skipReindex":{"type":"boolean","example":true},"fileName":{"type":"string","example":"backup-2020-01-01-01-01-01.zip"}}},"ExampleMultipartFormData":{"type":"object","properties":{"file":{"type":"string","description":"backup file uploaded. Has to be a zip file."}}},"SpaceBackupSettings":{"properties":{"spaceKeys":{"uniqueItems":true,"type":"array","example":"['SPACE1', 'SPACE2']","items":{"type":"string","example":"['SPACE1', 'SPACE2']"}},"keepPermanently":{"type":"boolean","example":true},"fileNamePrefix":{"type":"string","example":"backup"}}},"SpaceRestoreSettings":{"properties":{"filename":{"type":"string","writeOnly":true},"skipReindex":{"type":"boolean","example":true},"fileName":{"type":"string","example":"space123.zip"}}},"JobDetails":{"properties":{"id":{"type":"integer","format":"int64","example":1},"jobOperation":{"type":"string","example":"BACKUP","enum":["BACKUP","RESTORE"]},"jobScope":{"type":"string","example":"SITE","enum":["SPACE","SITE"]},"jobState":{"type":"string","example":"IN_PROGRESS","enum":["QUEUED","PROCESSING","COMPLETING","FINISHED","CANCELLING","CANCELLED","FAILED"]},"createTime":{"type":"string","format":"date-time","example":"2020-01-01T01:01:01Z"},"startProcessingTime":{"type":"string","format":"date-time","example":"2020-01-01T01:01:01Z"},"finishProcessingTime":{"type":"string","format":"date-time","example":"2020-01-01T01:01:01Z"},"cancelTime":{"type":"string","format":"date-time","example":"2020-01-01T01:01:01Z"},"errorMessage":{"type":"string","example":"Error message"},"owner":{"type":"string","example":"admin"},"cancelledBy":{"type":"string","example":"admin"},"fileName":{"type":"string","example":"backup-2020-01-01.zip"},"spaceKeys":{"type":"string","example":"spaceKey1,spaceKey2"},"fileDeleteTime":{"type":"string","format":"date-time","example":"2020-01-01T01:01:01Z"},"fileExists":{"type":"boolean","example":true}}},"FileInfo":{"type":"object","properties":{"name":{"type":"string","example":"backup-2020-01-01-01-01-01.zip"},"creationTime":{"type":"string","example":"2020-01-01T01:01:01.000Z"},"size":{"type":"integer","format":"int64","example":1000},"jobScope":{"type":"string","example":"SITE","enum":["SPACE","SITE"]}}},"Label":{"properties":{"prefix":{"type":"string","example":"my"},"name":{"type":"string","example":"label"},"id":{"type":"string","example":"1234"},"label":{"type":"string"}}},"PageResponseLabel":{"type":"object","properties":{"pageRequest":{"$ref":"#/components/schemas/PageRequest"},"nextCursor":{"$ref":"#/components/schemas/Cursor"},"prevCursor":{"$ref":"#/components/schemas/Cursor"},"results":{"type":"array","items":{"$ref":"#/components/schemas/Label"}}}},"JsonContentProperty":{"properties":{"key":{"type":"string"},"value":{"$ref":"#/components/schemas/JsonString"},"version":{"$ref":"#/components/schemas/Version"},"id":{"type":"string"},"content":{"$ref":"#/components/schemas/Content"},"contentRef":{"$ref":"#/components/schemas/ReferenceContent"}}},"JsonString":{"properties":{"value":{"type":"string"}}},"PageResponseJsonContentProperty":{"type":"object","properties":{"pageRequest":{"$ref":"#/components/schemas/PageRequest"},"nextCursor":{"$ref":"#/components/schemas/Cursor"},"prevCursor":{"$ref":"#/components/schemas/Cursor"},"results":{"type":"array","items":{"$ref":"#/components/schemas/JsonContentProperty"}}}},"RestListJsonContentProperty":{"type":"array","properties":{"pageRequest":{"$ref":"#/components/schemas/PageRequest"},"results":{"type":"array","items":{"$ref":"#/components/schemas/JsonContentProperty"}},"nextCursor":{"$ref":"#/components/schemas/Cursor"},"prevCursor":{"$ref":"#/components/schemas/Cursor"},"pageResponse":{"$ref":"#/components/schemas/PageResponseJsonContentProperty"}},"items":{"$ref":"#/components/schemas/JsonContentProperty"}},"MacroInstance":{"properties":{"name":{"type":"string","example":"panel"},"body":{"type":"string","example":"This is the body of the panel macro."},"parameters":{"type":"object"}}},"MacroParameterInstance":{"properties":{"value":{"type":"string","example":"value"}}},"PageResponseContentRestriction":{"type":"object","properties":{"pageRequest":{"$ref":"#/components/schemas/PageRequest"},"nextCursor":{"$ref":"#/components/schemas/Cursor"},"prevCursor":{"$ref":"#/components/schemas/Cursor"},"results":{"type":"array","items":{"$ref":"#/components/schemas/ContentRestriction"}}}},"PageResponseUser":{"type":"object","properties":{"pageRequest":{"$ref":"#/components/schemas/PageRequest"},"nextCursor":{"$ref":"#/components/schemas/Cursor"},"prevCursor":{"$ref":"#/components/schemas/Cursor"},"results":{"type":"array","items":{"$ref":"#/components/schemas/User"}}}},"RestListUser":{"type":"array","properties":{"pageRequest":{"$ref":"#/components/schemas/PageRequest"},"results":{"type":"array","items":{"$ref":"#/components/schemas/User"}},"nextCursor":{"$ref":"#/components/schemas/Cursor"},"prevCursor":{"$ref":"#/components/schemas/Cursor"},"pageResponse":{"$ref":"#/components/schemas/PageResponseUser"}},"items":{"$ref":"#/components/schemas/User"}},"ColorSchemeModel":{"properties":{"topBarColor":{"type":"string","example":"#000000"},"topBarMenuSelectedBgColor":{"type":"string","example":"#000000"},"topBarMenuSelectedTextColor":{"type":"string","example":"#000000"},"breadcrumbsTextColor":{"type":"string","example":"#000000"},"headerButtonBgColor":{"type":"string","example":"#000000"},"headerButtonTextColor":{"type":"string","example":"#000000"},"searchFieldTextColor":{"type":"string","example":"#000000"},"searchFieldBgColor":{"type":"string","example":"#000000"},"menuItemSelectedBgColor":{"type":"string","example":"#000000"},"menuItemSelectedTextColor":{"type":"string","example":"#000000"},"menuItemTextColor":{"type":"string","example":"#000000"},"headingTextColor":{"type":"string","example":"#000000"},"linkColor":{"type":"string","example":"#000000"}}},"ColorSchemeThemeBasedModel":{"properties":{"colorSchemeModelLight":{"$ref":"#/components/schemas/ColorSchemeModel"},"colorSchemeModelDark":{"$ref":"#/components/schemas/ColorSchemeModel"}}},"RestInvocationHistory":{"properties":{}},"RestWebhook":{"properties":{"scopeType":{"type":"string"},"events":{"uniqueItems":true,"type":"array","items":{"type":"string"}},"active":{"type":"boolean"},"sslVerificationRequired":{"type":"boolean"},"name":{"type":"string"},"configuration":{"type":"object"},"url":{"type":"string"},"credentials":{"$ref":"#/components/schemas/RestWebhookCredentials"},"statistics":{"type":"object","properties":{},"writeOnly":true}}},"RestWebhookCredentials":{"properties":{"username":{"type":"string"},"password":{"type":"string"}}},"PageResponseGroup":{"type":"object","properties":{"pageRequest":{"$ref":"#/components/schemas/PageRequest"},"nextCursor":{"$ref":"#/components/schemas/Cursor"},"prevCursor":{"$ref":"#/components/schemas/Cursor"},"results":{"type":"array","items":{"$ref":"#/components/schemas/Group"}}}},"PageResponsePerson":{"type":"object","properties":{"pageRequest":{"$ref":"#/components/schemas/PageRequest"},"nextCursor":{"$ref":"#/components/schemas/Cursor"},"prevCursor":{"$ref":"#/components/schemas/Cursor"},"results":{"type":"array","items":{"$ref":"#/components/schemas/Person"}}}},"LongTaskStatus":{"properties":{"id":{"type":"string"},"name":{"$ref":"#/components/schemas/Message"},"elapsedTime":{"type":"integer","format":"int64","example":123456},"percentageComplete":{"type":"integer","format":"int32","example":50},"successful":{"type":"boolean","example":true},"messages":{"type":"array","items":{"$ref":"#/components/schemas/Message"}}}},"Message":{"properties":{"translation":{"type":"string"},"key":{"type":"string"},"args":{"type":"array","items":{"type":"object"}}}},"PageResponseLongTaskStatus":{"type":"object","properties":{"pageRequest":{"$ref":"#/components/schemas/PageRequest"},"nextCursor":{"$ref":"#/components/schemas/Cursor"},"prevCursor":{"$ref":"#/components/schemas/Cursor"},"results":{"type":"array","items":{"$ref":"#/components/schemas/LongTaskStatus"}}}},"RestListLongTaskStatus":{"type":"array","properties":{"pageRequest":{"$ref":"#/components/schemas/PageRequest"},"results":{"type":"array","items":{"$ref":"#/components/schemas/LongTaskStatus"}},"nextCursor":{"$ref":"#/components/schemas/Cursor"},"prevCursor":{"$ref":"#/components/schemas/Cursor"},"pageResponse":{"$ref":"#/components/schemas/PageResponseLongTaskStatus"}},"items":{"$ref":"#/components/schemas/LongTaskStatus"}},"ContainerSummary":{"properties":{"title":{"type":"string","example":"Demo Title"},"displayUrl":{"type":"string","example":"http://localhost:8080/confluence/display/SPACEKEY/Page+Title"}}},"ContentSearchResult":{},"ReferenceContainerSummary":{"properties":{"expanded":{"type":"boolean"},"idProperties":{"type":"object"}}},"ReferenceObject":{"properties":{"expanded":{"type":"boolean"},"idProperties":{"type":"object"}}},"ReferenceUser":{"properties":{"expanded":{"type":"boolean"},"idProperties":{"type":"object"}}},"ResourceType":{"properties":{"name":{"type":"string"},"type":{"type":"string"},"url":{"type":"string"}}},"SearchPageResponseSearchResult":{"type":"object","properties":{"results":{"type":"array","items":{"$ref":"#/components/schemas/SearchResult"}},"hasMore":{"type":"boolean"},"cqlQuery":{"type":"string"},"pageRequest":{"$ref":"#/components/schemas/PageRequest"},"totalSize":{"type":"integer","format":"int32"},"searchDuration":{"type":"integer","format":"int32"},"archivedResultCount":{"type":"integer","format":"int32"},"nextCursor":{"$ref":"#/components/schemas/Cursor"},"prevCursor":{"$ref":"#/components/schemas/Cursor"}}},"SearchResult":{"properties":{"title":{"type":"string","example":"Page Title"},"excerpt":{"type":"string","example":"This is an excerpt of the page content"},"url":{"type":"string","example":"http://localhost:8080/confluence/display/SPACEKEY/Page+Title"},"resultParentContainer":{"$ref":"#/components/schemas/ContainerSummary"},"resultGlobalContainer":{"$ref":"#/components/schemas/ContainerSummary"},"iconCssClass":{"type":"string"},"lastModified":{"type":"string","format":"date-time"},"friendlyLastModified":{"type":"string"},"entityRef":{"$ref":"#/components/schemas/ReferenceObject"},"resultParentRef":{"$ref":"#/components/schemas/ReferenceContainerSummary"},"resultGlobalContainerRef":{"$ref":"#/components/schemas/ReferenceContainerSummary"},"resourceType":{"$ref":"#/components/schemas/ResourceType"},"entity":{"type":"object"},"entityType":{"type":"string"}}},"SpaceSearchResult":{},"UserSearchResult":{},"SpaceColorSchemeTypeModel":{"properties":{"type":{"type":"string","example":"global"}}},"RestListLabel":{"type":"array","properties":{"pageRequest":{"$ref":"#/components/schemas/PageRequest"},"results":{"type":"array","items":{"$ref":"#/components/schemas/Label"}},"nextCursor":{"$ref":"#/components/schemas/Cursor"},"prevCursor":{"$ref":"#/components/schemas/Cursor"},"pageResponse":{"$ref":"#/components/schemas/PageResponseLabel"}},"items":{"$ref":"#/components/schemas/Label"}},"OperationDescription":{"type":"object","properties":{"targetType":{"type":"string","example":"space"},"operationKey":{"type":"string","example":"read"}}},"SpacePermission":{"type":"object","properties":{"operation":{"$ref":"#/components/schemas/OperationDescription"},"subject":{"$ref":"#/components/schemas/Subject"},"spaceKey":{"type":"string"}}},"SpacePermissionsForSubject":{"type":"object","properties":{"userKey":{"type":"string"},"groupName":{"type":"string"},"operations":{"uniqueItems":true,"type":"array","items":{"$ref":"#/components/schemas/OperationDescription"}}}},"JsonSpaceProperty":{"properties":{"key":{"type":"string"},"value":{"$ref":"#/components/schemas/JsonString"},"version":{"$ref":"#/components/schemas/Version"},"space":{"$ref":"#/components/schemas/Space"},"spaceRef":{"$ref":"#/components/schemas/ReferenceSpace"}}},"PageResponseJsonSpaceProperty":{"type":"object","properties":{"pageRequest":{"$ref":"#/components/schemas/PageRequest"},"nextCursor":{"$ref":"#/components/schemas/Cursor"},"prevCursor":{"$ref":"#/components/schemas/Cursor"},"results":{"type":"array","items":{"$ref":"#/components/schemas/JsonSpaceProperty"}}}},"PageResponseSpace":{"type":"object","properties":{"pageRequest":{"$ref":"#/components/schemas/PageRequest"},"nextCursor":{"$ref":"#/components/schemas/Cursor"},"prevCursor":{"$ref":"#/components/schemas/Cursor"},"results":{"type":"array","items":{"$ref":"#/components/schemas/Space"}}}},"PasswordChangeDetails":{"type":"object","properties":{"oldPassword":{"type":"string","example":"oldPassword"},"newPassword":{"type":"string","example":"newPassword"}}},"ContentWatch":{"properties":{"watcher":{"$ref":"#/components/schemas/User"},"contentId":{"type":"string","writeOnly":true},"content":{"$ref":"#/components/schemas/Content"}}},"UserKey":{"properties":{"userKey":{"type":"string","example":"4028d6768851c8900188556ba6000014"}}},"SpaceWatch":{"properties":{"watcher":{"$ref":"#/components/schemas/User"},"space":{"$ref":"#/components/schemas/Space"},"contentTypes":{"type":"array","items":{"type":"string"}}}},"ValidationResult":{"properties":{"successful":{"type":"boolean"},"authorized":{"type":"boolean"},"valid":{"type":"boolean"},"errors":{"type":"object"},"allowedInReadOnlyMode":{"type":"boolean"}}},"RestError":{"properties":{"statusCode":{"type":"integer","format":"int32"},"data":{"$ref":"#/components/schemas/ValidationResult"},"message":{"type":"string"},"reason":{"type":"string"}}},"LongTaskSubmission":{"properties":{"id":{"type":"string"},"links":{"type":"object","example":{"result":"http://localhost:8080/confluence/rest/api/longtask/123/result","status":"http://localhost:8080/confluence/rest/api/longtask/123/status"}},"resultPath":{"type":"string","example":"result"},"statusPath":{"type":"string","example":"status"}}},"Links":{"properties":{"self":{"type":"string","description":"Self link","example":"https://instenv-320828-cq6e.instenv.internal.atlassian.com/rest/api/content/2326529/restriction/byOperation/read"},"base":{"type":"string","description":"Base link","example":"https://instenv-320828-cq6e.instenv.internal.atlassian.com"},"context":{"type":"string","description":"Context link"}}},"PageResponseObject":{"properties":{"results":{"type":"array","description":"Results of the page response","example":[],"items":{"type":"object","description":"Results of the page response","example":[]}},"start":{"type":"integer","description":"Start index of the page response","format":"int32","example":0},"limit":{"type":"integer","description":"Limit of the page response","format":"int32","example":200},"size":{"type":"integer","description":"Size of the results","format":"int32","example":0}}},"Restrictions":{"properties":{"user":{"$ref":"#/components/schemas/PageResponseObject"},"group":{"$ref":"#/components/schemas/PageResponseObject"}}},"Expandable":{"properties":{"content":{"type":"string","description":"Content link","example":"/rest/api/content/2326529"}}},"OperationRestriction":{"properties":{"operation":{"type":"string","description":"The operation type","example":"read"},"restrictions":{"$ref":"#/components/schemas/Restrictions"},"get_links":{"$ref":"#/components/schemas/Links"},"get_expandable":{"$ref":"#/components/schemas/Expandable"}}},"MockRestrictionsResponse":{"properties":{"restrictions":{"type":"object","description":"Map of operation to OperationRestriction, representing the restrictions by operation","example":{"read":{"operation":"read","restrictions":{"user":{"results":[],"start":0,"limit":200,"size":0},"group":{"results":[],"start":0,"limit":200,"size":0}},"_links":{"self":"https://instenv-320828-cq6e.instenv.internal.atlassian.com/rest/api/content/2326529/restriction/byOperation/read"},"_expandable":{"content":"/rest/api/content/2326529"}},"update":{"operation":"update","restrictions":{"user":{"results":[],"start":0,"limit":200,"size":0},"group":{"results":[],"start":0,"limit":200,"size":0}},"_links":{"self":"https://instenv-320828-cq6e.instenv.internal.atlassian.com/rest/api/content/2326529/restriction/byOperation/update"},"_expandable":{"content":"/rest/api/content/2326529"}}}},"get_links":{"$ref":"#/components/schemas/Links"}}},"ServerInformation":{"properties":{"baseUrl":{"type":"string"},"version":{"type":"string"},"buildNumber":{"type":"integer","format":"int32"},"marketplaceBuildNumber":{"type":"integer","format":"int32"},"buildDate":{"type":"string"}}},"JobStatistics":{"properties":{"totalObjectsCount":{"type":"integer","format":"int64","example":100},"processedObjectsCount":{"type":"integer","format":"int64","example":50},"persistedObjectsCount":{"type":"integer","format":"int64","example":50},"skippedObjectsCount":{"type":"integer","format":"int64","example":0},"reusedObjectsCount":{"type":"integer","format":"int64","example":10}}},"SpaceBackupJobDetails":{"properties":{"id":{"type":"integer","format":"int64","example":1},"jobOperation":{"type":"string","example":"BACKUP","enum":["BACKUP","RESTORE"]},"jobScope":{"type":"string","example":"SITE","enum":["SPACE","SITE"]},"jobState":{"type":"string","example":"IN_PROGRESS","enum":["QUEUED","PROCESSING","COMPLETING","FINISHED","CANCELLING","CANCELLED","FAILED"]},"createTime":{"type":"string","format":"date-time","example":"2020-01-01T01:01:01Z"},"startProcessingTime":{"type":"string","format":"date-time","example":"2020-01-01T01:01:01Z"},"finishProcessingTime":{"type":"string","format":"date-time","example":"2020-01-01T01:01:01Z"},"cancelTime":{"type":"string","format":"date-time","example":"2020-01-01T01:01:01Z"},"errorMessage":{"type":"string","example":"Error message"},"owner":{"type":"string","example":"admin"},"cancelledBy":{"type":"string","example":"admin"},"fileName":{"type":"string","example":"backup-2020-01-01.zip"},"spaceKeys":{"type":"string","example":"spaceKey1,spaceKey2"},"fileDeleteTime":{"type":"string","format":"date-time","example":"2020-01-01T01:01:01Z"},"fileExists":{"type":"boolean","example":true},"jobSettings":{"$ref":"#/components/schemas/SpaceBackupSettings"},"statistics":{"$ref":"#/components/schemas/JobStatistics"},"jobStatistics":{"$ref":"#/components/schemas/JobStatistics"}}},"SiteBackupJobDetails":{"properties":{"id":{"type":"integer","format":"int64","example":1},"jobOperation":{"type":"string","example":"BACKUP","enum":["BACKUP","RESTORE"]},"jobScope":{"type":"string","example":"SITE","enum":["SPACE","SITE"]},"jobState":{"type":"string","example":"IN_PROGRESS","enum":["QUEUED","PROCESSING","COMPLETING","FINISHED","CANCELLING","CANCELLED","FAILED"]},"createTime":{"type":"string","format":"date-time","example":"2020-01-01T01:01:01Z"},"startProcessingTime":{"type":"string","format":"date-time","example":"2020-01-01T01:01:01Z"},"finishProcessingTime":{"type":"string","format":"date-time","example":"2020-01-01T01:01:01Z"},"cancelTime":{"type":"string","format":"date-time","example":"2020-01-01T01:01:01Z"},"errorMessage":{"type":"string","example":"Error message"},"owner":{"type":"string","example":"admin"},"cancelledBy":{"type":"string","example":"admin"},"fileName":{"type":"string","example":"backup-2020-01-01.zip"},"spaceKeys":{"type":"string","example":"spaceKey1,spaceKey2"},"fileDeleteTime":{"type":"string","format":"date-time","example":"2020-01-01T01:01:01Z"},"fileExists":{"type":"boolean","example":true},"jobSettings":{"$ref":"#/components/schemas/SiteBackupSettings"},"statistics":{"$ref":"#/components/schemas/JobStatistics"},"jobStatistics":{"$ref":"#/components/schemas/JobStatistics"}}},"SpaceRestoreJobDetails":{"properties":{"id":{"type":"integer","format":"int64","example":1},"jobOperation":{"type":"string","example":"BACKUP","enum":["BACKUP","RESTORE"]},"jobScope":{"type":"string","example":"SITE","enum":["SPACE","SITE"]},"jobState":{"type":"string","example":"IN_PROGRESS","enum":["QUEUED","PROCESSING","COMPLETING","FINISHED","CANCELLING","CANCELLED","FAILED"]},"createTime":{"type":"string","format":"date-time","example":"2020-01-01T01:01:01Z"},"startProcessingTime":{"type":"string","format":"date-time","example":"2020-01-01T01:01:01Z"},"finishProcessingTime":{"type":"string","format":"date-time","example":"2020-01-01T01:01:01Z"},"cancelTime":{"type":"string","format":"date-time","example":"2020-01-01T01:01:01Z"},"errorMessage":{"type":"string","example":"Error message"},"owner":{"type":"string","example":"admin"},"cancelledBy":{"type":"string","example":"admin"},"fileName":{"type":"string","example":"backup-2020-01-01.zip"},"spaceKeys":{"type":"string","example":"spaceKey1,spaceKey2"},"fileDeleteTime":{"type":"string","format":"date-time","example":"2020-01-01T01:01:01Z"},"fileExists":{"type":"boolean","example":true},"jobSettings":{"$ref":"#/components/schemas/SpaceRestoreSettings"},"statistics":{"$ref":"#/components/schemas/JobStatistics"},"jobStatistics":{"$ref":"#/components/schemas/JobStatistics"}}},"SiteRestoreJobDetails":{"properties":{"id":{"type":"integer","format":"int64","example":1},"jobOperation":{"type":"string","example":"BACKUP","enum":["BACKUP","RESTORE"]},"jobScope":{"type":"string","example":"SITE","enum":["SPACE","SITE"]},"jobState":{"type":"string","example":"IN_PROGRESS","enum":["QUEUED","PROCESSING","COMPLETING","FINISHED","CANCELLING","CANCELLED","FAILED"]},"createTime":{"type":"string","format":"date-time","example":"2020-01-01T01:01:01Z"},"startProcessingTime":{"type":"string","format":"date-time","example":"2020-01-01T01:01:01Z"},"finishProcessingTime":{"type":"string","format":"date-time","example":"2020-01-01T01:01:01Z"},"cancelTime":{"type":"string","format":"date-time","example":"2020-01-01T01:01:01Z"},"errorMessage":{"type":"string","example":"Error message"},"owner":{"type":"string","example":"admin"},"cancelledBy":{"type":"string","example":"admin"},"fileName":{"type":"string","example":"backup-2020-01-01.zip"},"spaceKeys":{"type":"string","example":"spaceKey1,spaceKey2"},"fileDeleteTime":{"type":"string","format":"date-time","example":"2020-01-01T01:01:01Z"},"fileExists":{"type":"boolean","example":true},"jobSettings":{"$ref":"#/components/schemas/SiteRestoreSettings"},"statistics":{"$ref":"#/components/schemas/JobStatistics"},"jobStatistics":{"$ref":"#/components/schemas/JobStatistics"}}},"InstanceMetrics":{"properties":{"pages":{"type":"integer","format":"int32"},"spaces":{"type":"integer","format":"int32"},"users":{"type":"integer","format":"int32"}}},"Webhook":{"properties":{"createdDate":{"type":"string","format":"date-time"},"updatedDate":{"type":"string","format":"date-time"},"sslVerificationRequired":{"type":"boolean"},"events":{"uniqueItems":true,"type":"array","items":{"$ref":"#/components/schemas/WebhookEvent"}},"name":{"type":"string"},"id":{"type":"integer","format":"int32"},"active":{"type":"boolean"},"configuration":{"type":"object"},"scope":{"$ref":"#/components/schemas/WebhookScope"},"url":{"type":"string"},"credentials":{"$ref":"#/components/schemas/WebhookCredentials"}}},"WebhookCredentials":{"properties":{"username":{"type":"string"},"password":{"type":"string"}}},"WebhookScope":{"properties":{"id":{"maxLength":255,"minLength":0,"type":"string"},"type":{"maxLength":255,"minLength":0,"type":"string"}}},"WebhookEvent":{"properties":{"id":{"type":"string"},"i18nKey":{"type":"string"}}},"DetailedInvocationResult":{"properties":{"description":{"type":"string"},"outcome":{"type":"string","enum":["ERROR","FAILURE","SUCCESS"]}}},"DetailedInvocationRequest":{"properties":{"headers":{"type":"object"},"body":{"type":"string"},"method":{"type":"string","enum":["GET","POST","PUT","DELETE","OPTIONS","HEAD"]},"url":{"type":"string"}}},"DetailedInvocation":{"properties":{"result":{"$ref":"#/components/schemas/DetailedInvocationResult"},"request":{"$ref":"#/components/schemas/DetailedInvocationRequest"},"finish":{"type":"string","format":"date-time"},"start":{"type":"string","format":"date-time"},"eventScope":{"$ref":"#/components/schemas/WebhookScope"},"id":{"type":"string"},"duration":{"type":"object","properties":{"seconds":{"type":"integer","format":"int64"},"zero":{"type":"boolean"},"nano":{"type":"integer","format":"int32"},"negative":{"type":"boolean"},"units":{"type":"array","items":{"type":"object","properties":{"durationEstimated":{"type":"boolean"},"duration":{"type":"object","properties":{"seconds":{"type":"integer","format":"int64"},"zero":{"type":"boolean"},"nano":{"type":"integer","format":"int32"},"negative":{"type":"boolean"}}},"timeBased":{"type":"boolean"},"dateBased":{"type":"boolean"}}}}}},"event":{"$ref":"#/components/schemas/WebhookEvent"}}}}},"x-atlassian-narrative":{"documents":[{"title":"About","anchor":"about","body":"\nThe REST APIs are for developers who want to integrate Confluence into their application and for administrators who want to script interactions with the Confluence server.\nThis page documents the REST resources available in Confluence, including the HTTP methods, example request and responses and error codes and messages.\n\nBecause the REST API is based on open standards, you can use any web development language to access the API.\n\n
\n
\n\n### Transition from docs.atlassian.com\nWe’ve recently moved our Confluence Data Center REST API and it now uses Swagger. This REST API is applicable for Confluence Data Center 9.0 and later. If you’re looking for the REST API for earlier versions of Confluence, visit\n
Confluence 8.9.3 REST API Documentation.\n\nWhile we transition our content, note that in some cases documented responses may differ slightly from actual application responses either in their response code or response body. We’ve noticed this in calls that require custom enrichers for processing, we're currently working on resolving this shortly. For example this can be seen in the Child Content (comments) and Content Watchers (watchers) properties.\n
\n\n## Structure of the REST URIs\n\nURIs for the Confluence REST API resource have the following structure:\n\nWith context: `http://host:port/context/rest/api/resource-name`\n\nOr without context: `http://host:port/rest/api/resource-name`\n\nExample with context: `http://host:port/confluence/rest/api/space/ds`\n\nExample without context: `http://host:port/rest/api/space/ds`\n"},{"title":"Confluence Data Center REST API","anchor":"confluence-server-rest-api","body":"---\naliases:\n- /server/confluence/confluence-server-rest-api-2031699.html\n- /server/confluence/confluence-server-rest-api-2031699.md\ncategory: reference\nconfluence_id: 2031699\ndac_edit_link: https://developer.atlassian.com/pages/editpage.action?cjm=wozere&pageId=2031699\ndac_view_link: https://developer.atlassian.com/pages/viewpage.action?cjm=wozere&pageId=2031699\ndate: '2020-10-08'\nlegacy_title: Confluence Server REST API\nplatform: server\nproduct: confluence\nsubcategory: api\ntitle: Confluence Data Center REST API\n---\n# Confluence Data Center REST API\n\n| | |\n|------------|---------------------------------|\n| Applicable | Confluence Server 5.5 - 8.5
Confluence Data Center 5.6 and later|\n\nThe Confluence Server and Data Center REST API is for admins who want to script interactions with Confluence Server or Confluence Data Center and developers who want to integrate with or build on top of the Confluence platform.\n\n
\n
\nFor REST API documentation, see Confluence Server and Data Center REST API reference.\n
\n\nUsing Cloud? Find out about the [Confluence Cloud REST API](/cloud/confluence/rest).\n\n\n## CRUD Operations\n\nConfluence's REST APIs provide access to resources (data entities) via URI paths. To use a REST API, your application will make an HTTP request and parse the response. By default, the response format is JSON. Your methods will be the standard HTTP methods: GET, PUT, POST and DELETE. The REST API is based on open standards, so you can use any web development language to access the API.\n\nFor some examples of what you can do with the REST API, see [Confluence REST API Examples](/server/confluence/confluence-rest-api-examples).\n\n## Pagination\n\nConfluence's REST API provides a way to paginate your calls to limit the amount of data you are fetching. Read more about this in [Pagination in the REST API](/server/confluence/pagination-in-the-rest-api).\n\n## Expansions\n\nConfluence's REST API also provides a way to fetch more data in a single call through REST API Expansions. Read more about this in [Expansions in the REST API](/server/confluence/expansions-in-the-rest-api).\n\n## Advanced Search Through CQL\n\nConfluence's REST API provides an [advanced search](/server/confluence/advanced-searching-using-cql) that lets you use structured queries to search for content within Confluence. Your search results will take the same form as the Content model returned by the Content REST API. \n\n## Content and Space Properties\n\nContent and Space Properties are JSON key-value storages that you can access through the REST API. This is a great way, for example, to store metadata about a piece (or pieces) of content. Read more about [Content Properties](/server/confluence/content-properties-in-the-rest-api).\n\n\n## Authentication\n\nAccessing Confluence using the REST API involves the same authentication and permissions checks that are required when accessing Confluence in your browser. If you don't log in, you are accessing Confluence anonymously. If you log in but don't have permission to view a particular page or space for example, you will not be able to view it using the Confluence REST API either.\n\nFor personal use and scripts, you can use basic authentication with either a username and password, or by creating a [personal access token](https://confluence.atlassian.com/display/ENTERPRISE/Using+Personal+Access+Tokens) (available from Confluence Data Center 7.9). \n\n## REST API Policy\n\nRead the [Atlassian REST API Policy ](/platform/marketplace/atlassian-rest-api-policy)for information on compatibility, versioning and deprecation. \n\n## REST API Browser\n\nThe Atlassian REST API Browser is a tool for discovering the REST APIs available in Atlassian applications, including Confluence. This is available as part of the Atlassian SDK or can be downloaded from the Atlassian Marketplace.\n\nSee [Using the REST API Browser](/server/framework/atlassian-sdk/using-the-rest-api-browser).\n"},{"title":"Advanced Searching using CQL","anchor":"advanced-searching-using-cql","body":"---\naliases:\n- /server/confluence/advanced-searching-using-cql-29951914.html\n- /server/confluence/advanced-searching-using-cql-29951914.md\ncategory: reference\nconfluence_id: 29951914\ndac_edit_link: https://developer.atlassian.com/pages/editpage.action?cjm=wozere&pageId=29951914\ndac_view_link: https://developer.atlassian.com/pages/viewpage.action?cjm=wozere&pageId=29951914\ndate: '2019-08-06'\nlegacy_title: Advanced Searching using CQL\nplatform: server\nproduct: confluence\nsubcategory: api\ntitle: Advanced Searching using CQL\n---\n# Advanced Searching using CQL\n\nThe instructions on this page describe how to define and execute a search using the advanced search capabilities of the Confluence REST API. \n\n## What is an advanced search?\n\nAn advanced search allows you to use structured queries to search for content in Confluence. Your search results will take the same form as the Content model returned by the Content REST API.\n\nWhen you perform an advanced search, you use the Confluence Query Language (CQL).\n\nA simple query in CQL (also known as a 'clause') consists of a *[field](#field)*, followed by an *[operator](#cql-operators)*, followed by one or more *values* or *[functions](/server/confluence/cql-function-reference)*. For example, the following simple query will find all content in the \"TEST\" space. It uses the Space *[field](#field)*, the [EQUALS](#equals) *operator*, and the *value* `\"TEST\"`.)\n\n``` bash\nspace = \"TEST\"\n```\n\nIt is not possible to compare two [fields](#fields).\n\nNOTE: CQL gives you some SQL-like syntax, such as the [ORDER BY](#order-by) SQL keyword. However, CQL is not a database query language.\nFor example, CQL does not have a `SELECT` statement.\n\n* [Function Reference](/server/confluence/cql-function-reference)\n\n**Related topics:**\n\n* [Performing text searches using CQL](/server/confluence/performing-text-searches-using-cql).\n* [Adding a field to CQL](/server/confluence/adding-a-field-to-cql).\n* [CQL Field Module](/server/confluence/cql-field-module).\n* [CQL Function Module](/server/confluence/cql-function-module).\n\n### How to perform an advanced search\n\nThe Content API REST Resource now supports CQL as a query parameter to filter the list of returned content.\n\n``` bash\ncurl -u username:password http://myhost:8080/rest/api/content/search?cql=space=TEST\n```\n\nThe previous example is a simple query, if your query is more complicated you can use the following example:\n\n``` bash\ncurl -u username:password -G \"http://myhost:8080/context/rest/api/content/search\" \\\n--data-urlencode \"cql=(type=page and space=DEV) OR (creator=admin and type=blogpost)\" \\\n| python -m json.tool\n```\n\nTo perform an advanced search:\n\n1. Add your query using the [fields](#fields), [operators](#cql-operators), and field values or [functions](#functions) as the value for the CQL query parameter.\n\n1. Execute a GET request on the resource, you can apply expansions and pagination as you would normally do in the Confluence REST API.\n\n### Performing text searches\n\nYou can use the [CONTAINS](#contains) operator to use Lucene's text-searching features when performing searches on these fields:\n\n* title\n* text\n* space.title\n\nFor details, see the page on [Performing text searches](/server/confluence/performing-text-searches-using-cql).\n\n### Setting precedence of operators\n\nTo enforce the precedence of [operators](#cql-operators), you can use parentheses in complex CQL statements.\n\nFor example, if you want to find all pages in the Developer space as well as all blog posts created by the the system administrator (bobsmith),\nyou can use parentheses to enforce the precedence of the boolean operators in your query. For example:\n\n``` sql\n(type=page and Space=DEV) OR (creator=bobsmith and type=blogpost)\n```\n\nNote: if you do not use parentheses, the statement will be evaluated left to right.\n\nYou can also use parentheses to group clauses, so that you can apply the [NOT](#not) operator to the group.\n\n## Keyword reference\n\nA keyword in CQL is a word or phrase that:\n\n* Joins two or more clauses together to form a complex CQL query.\n* Alters the logic of one or more clauses.\n* Alters the logic of [operators](https://developer.atlassian.com/display/CONFDEV/Advanced+Searching+using+CQL#AdvancedSearchingusingCQL-operators).\n* Has an explicit definition in a CQL query.\n* Performs a specific function that alters the results of a CQL query.\n\nSee the detailed examples for each keyword next.\n\n#### AND\n\nUsed to combine multiple clauses, allowing you to refine your search.\n\nNote: to control the order in which clauses are executed, you can use [parentheses](https://developer.atlassian.com/display/CONFDEV/Advanced+Searching+using+CQL#AdvancedSearchingusingCQL-parentheses).\n\n##### Examples\n\n* Find all blogposts with the label \"performance\".\n\n ``` sql\n label = \"performance\" and type = \"blogpost\"\n ```\n\n* Find all pages created by jsmith in the DEV space.\n\n ``` sql\n type = page and creator = jsmith and space = DEV\n ```\n\n* Find all content that mentions jsmith but was not created by jsmith.\n\n ``` sql\n mention = jsmith and creator != jsmith\n ```\n\n#### OR\n\nUsed to combine multiple clauses, allowing you to expand your search.\n\nNote: to control the order in which clauses are executed, you can use [parentheses](https://developer.atlassian.com/display/CONFDEV/Advanced+Searching+using+CQL#AdvancedSearchingusingCQL-parentheses).\nAlso see [IN](/server/confluence/cql-operators-reference/#CQLOperatorsReference-IN),\nwhich can be a more convenient way to search for multiple values of a field.)\n\n##### Examples\n\n* Find all content in the IDEAS space or with the label idea.\n\n ``` sql\n space = IDEAS or label = idea\n ```\n\n* Find all content last modified before the start of the year or with the label `needs\\_review`.\n\n ``` sql\n lastModified < startOfYear() or label = needs_review\n ```\n\n#### NOT\n\nUsed to negate individual clauses or a complex CQL query (a query made up of more than one clause) using [parentheses](https://developer.atlassian.com/display/CONFDEV/Advanced+Searching+using+CQL#AdvancedSearchingusingCQL-parentheses), allowing you to refine your search.\n\n(Note: also see [NOT EQUALS](/server/confluence/cql-operators-reference/#CQLOperatorsReference-NOT_EQUALS) (\"!=\"), [DOES NOT CONTAIN](#does-not-contain) (\"!~\") and [NOT IN](https://developer.atlassian.com/display/CONFDEV/CQL+Operators+Reference#CQLOperatorsReference-NOT_IN).)\n\n##### Example\n\n* Find all pages with the \"cql\" label that aren't in the dev space.\n\n ``` sql\n label = cql and not space = dev\n ```\n\n#### ORDER BY\n\nUsed to specify the fields by whose values the search results will be sorted.\n\nBy default, the field's own sorting order is used. You can override this by specifying ascending order (\"`asc`\") or descending order (\"`desc`\").\n\nNot all fields support ordering. Generally, ordering is not supported where a piece of content can have multiple values for a field,\nfor instance ordering is not supported on labels.\n\n##### Examples\n\n* Find content in the DEV space ordered by creation date.\n\n ``` sql\n space = DEV order by created\n ```\n\n* Find content in the DEV space ordered by creation date with the newest first, then title.\n\n ``` sql\n space = DEV order by created desc, title\n ```\n\n* Find pages created by jsmith ordered by created, then title.\n\n ``` sql\n creator = jsmith order by created, title asc\n ```\n\n## Operator reference\n\nCQL Operators\n\nAn operator in CQL is one or more symbols or words that compare the value of a [field](https://developer.atlassian.com/display/CONFDEV/Advanced+Searching+using+CQL#AdvancedSearchingusingCQL-field) on its left with one or more values (or [functions](https://developer.atlassian.com/display/CONFDEV/Advanced+Searching+using+CQL#AdvancedSearchingusingCQL-functions)) on its right, such that only true results are retrieved by the clause. Some operators may use the [NOT](https://developer.atlassian.com/display/CONFDEV/CQL+Keywords+Reference#CQLKeywordsReference-NOT) keyword.\n\n**List of Operators:**\n\n* [EQUALS: =](#equals)\n* [NOT EQUALS: !=](#not-equals)\n* [GREATER THAN: >](#greater-than-gt)\n* [GREATER THAN EQUALS: >=](#greater-than-equals-gt)\n* [LESS THAN: <](#less-than-lt)\n* [LESS THAN EQUALS: <=](#less-than-equals-lt)\n* [IN](#in)\n* [NOT IN](#not-in)\n* [CONTAINS: ~](#contains)\n* [DOES NOT CONTAIN: !~](#does-not-contain)\n\n#### EQUALS: =\n\nThe \"`=`\" operator is used to search for content where the value of the specified field exactly matches the specified value. (Note: cannot be used with [text](https://developer.atlassian.com/display/CONFDEV/Advanced+Searching+using+CQL#AdvancedSearchingusingCQL-text) fields; see the [CONTAINS](#contains) operator instead.)\n\nTo find content where the value of a specified field exactly matches *multiple* values, use multiple \"`=`\" statements with the [AND](https://developer.atlassian.com/display/CONFDEV/CQL+Keywords+Reference#CQLKeywordsReference-AND) operator.\n\n##### Examples\n\n* Find all content that were created by jsmith.\n\n ``` sql\n creator = jsmith\n ```\n\n* Find all content that has the title \"Advanced Searching\".\n\n ``` sql\n title = \"Advanced Searching\"\n ```\n\n#### NOT EQUALS: !=\n\nThe \"`!=`\" operator is used to search for content where the value of the specified field does not match the specified value. (Note: cannot be used with [text](#performing-text-searches) fields; see the [DOES NOT MATCH](#does-not-match) (\"`!~`\") operator instead.)\n\nNote: typing `field != value` is the same as typing `NOT field = value`.\n\n
\n
\nCurrently a negative expression cannot be the first clause in a CQL statement.\n
\n\n##### Examples\n\n* Find all content in the DEV space that was created by someone other than jsmith.\n\n ``` sql\n space = DEV and not creator = jsmith\n ```\n\n or:\n\n ``` sql\n space = DEV and creator != jsmith\n ```\n\n* Find all content that was created by me but doesn't mention me.\n\n ``` sql\n creator = currentUser() and mention != currentUser()\n ```\n\n#### GREATER THAN: >\n\nThe \"`>`\" operator is used to search for content where the value of the specified field is greater than the specified value.\nCannot be used with [text](#performing-text-searches) fields.\n\nNote that the \"`>`\" operator can only be used with fields which support range operators (e.g. date fields and numeric fields).\nTo see a field's supported operators, check the individual [field](https://developer.atlassian.com/display/CONFDEV/Advanced+Searching+using+CQL#AdvancedSearchingusingCQL-field) reference.\n\n##### Examples\n\n* Find all content created in the last 4 weeks.\n\n ``` sql\n created > now(\"-4w\")\n ```\n\n* Find all attachments last modified since the start of the month.\n\n ``` sql\n created > startOfMonth() and type = attachment\n ```\n\n#### GREATER THAN EQUALS: >=\n\nThe \"`>=`\" operator is used to search for content where the value of the specified field is greater than or equal to the specified value.\nCannot be used with [text](#performing-text-searches) fields.\n\nNote that the \"`>=`\" operator can only be used with fields which support range operators (e.g. date fields).\nTo see a field's supported operators, check the individual [field](https://developer.atlassian.com/display/CONFDEV/Advanced+Searching+using+CQL#AdvancedSearchingusingCQL-field) reference.\n\n##### Examples\n\n* Find all content created on or after 31/12/2008.\n\n ``` sql\n created >= \"2008/12/31\"\n ```\n\n#### LESS THAN: <\n\nThe \"`<`\" operator is used to search for content where the value of the specified field is less than the specified value. Cannot be used with [text](https://developer.atlassian.com/display/CONFDEV/Advanced+Searching+using+CQL#AdvancedSearchingusingCQL-text) fields.\n\nNote that the \"`<`\" operator can only be used with fields which support range operators (e.g. date fields). To see a field's supported operators, check the individual [field](https://developer.atlassian.com/display/CONFDEV/Advanced+Searching+using+CQL#AdvancedSearchingusingCQL-field) reference.\n\n##### Examples\n\n* Find all pages `lastModified` before the start of the year.\n\n ``` sql\n lastModified < startOfYear() and type = page\n ```\n\n#### LESS THAN EQUALS: <=\n\nThe \"`<=`\" operator is used to search for content where the value of the specified field is less than or equals to the specified value.\nCannot be used with [text](#performing-text-searches) fields.\n\nNote that the \"`<=`\" operator can only be used with fields which support range operators (e.g. date fields). To see a field's supported operators,\ncheck the individual [field](https://developer.atlassian.com/display/CONFDEV/Advanced+Searching+using+CQL#AdvancedSearchingusingCQL-field) reference.\n\n##### Examples\n\n* Find blog posts created in the since the start of the fortnight.\n\n ``` sql\n created >= startOfWeek(\"-1w\") and type = blogpost\n ```\n\n#### IN\n\nThe \"`IN`\" operator is used to search for content where the value of the specified field is one of multiple specified values.\nThe values are specified as a comma-delimited list, surrounded by parentheses.\n\nUsing \"`IN`\" is equivalent to using multiple [EQUALS](#equals) (=) statements with the OR keyword, but is shorter and more convenient.\nThat is, typing `creator IN (tom, jane, harry)` is the same as typing `creator = \"tom\" `[OR](https://developer.atlassian.com/display/CONFDEV/CQL+Keywords+Reference#CQLKeywordsReference-OR)` creator = \"jane\" `[OR](https://developer.atlassian.com/display/CONFDEV/CQL+Keywords+Reference#CQLKeywordsReference-OR) `creator = \"harry\"`.\n\n##### Examples\n\n* Find all content that mentions either jsmith or jbrown or jjones.\n\n ``` sql\n mention in (jsmith,jbrown,jjones)\n ```\n\n* Find all content where the creator or contributor is either Jack or Jill.\n\n ``` sql\n creator in (Jack,Jill) or contributor in (Jack,Jill)\n ```\n\n#### NOT IN\n\nThe \"`NOT IN`\" operator is used to search for content where the value of the specified field is not one of multiple specified values.\n\nUsing \"`NOT IN`\" is equivalent to using multiple\n\n[NOT\\_EQUALS](#not-equals) (`!=`) statements, but is shorter and more convenient. That is, typing `creator NOT IN (tom, jane, harry)` is the same as typing `creator != \"tom\"` [AND](https://developer.atlassian.com/display/CONFDEV/CQL+Keywords+Reference#CQLKeywordsReference-AND) `creator != \"jane\"` [AND](#and) `creator != \"harry\"`.\n\n##### Examples\n\n* Find all content where the creator is someone other than Jack, Jill or John.\n\n ``` sql\n space = DEV and creator not in (Jack,Jill,John)\n ```\n\n#### CONTAINS: ~\n\nThe \"`~`\" operator is used to search for content where the value of the specified field matches the specified value (either an exact match or a \"fuzzy\" match -- see examples below). The \"~\" operator can only be used with text fields, for example:\n\n* title\n* text\n\nNote: when using the \"`~`\" operator, the value on the right-hand side of the operator can be specified using [Confluence text-search syntax](https://developer.atlassian.com/display/CONFDEV/Performing+text+searches+using+CQL).\n\n##### Examples\n\n* Find all content where the title contains the word \"win\" (or simple derivatives of that word, such as \"wins\").\n\n ``` sql\n title ~ win\n ```\n\n* Find all content where the title contains a [wild-card](/server/confluence/cql-operators-reference) match for the word \"win\".\n\n ``` sql\n title ~ \"win*\"\n ```\n\n* Find all content where the text contains the word \"advanced\" and the word \"search\".\n\n ``` sql\n text ~ \"advanced search\"\n ```\n\n#### DOES NOT CONTAIN: !~\n\nThe \"`!~`\" operator is used to search for content where the value of the specified field is not a \"fuzzy\" match for the specified value.\nThe \"!~\" operator can only be used with text fields, for example:\n\n* title\n* text\n\nNote: when using the \"`!~`\" operator, the value on the right-hand side of the operator can be specified using [Confluence text-search syntax](https://developer.atlassian.com/display/CONFDEV/Performing+text+searches+using+CQL).\n\n##### Examples\n\n* Find all content where the title does not contain the word \"run\" (or derivatives of that word, such as \"running\" or \"ran\").\n\n ``` sql\n space = DEV and title !~ run\n ```\n\n## Field reference\n\nA field in CQL is a word that represents an indexed property of content in Confluence. In a clause, a field is followed by an [operator](https://developer.atlassian.com/display/CONFDEV/Advanced+Searching+using+CQL#AdvancedSearchingusingCQL-operator),\nthat in turn is followed by one or more values (or [functions](https://developer.atlassian.com/display/CONFDEV/CQL+Function+Reference#CQLFunctionReference-function)).\nThe operator compares the value of the field with one or more values or functions on the right, such that only true results are retrieved by the clause.\n\n**List of Fields:**\n\n* [Ancestor](#ancestor)\n* [Container](#container)\n* [Content](#content)\n* [Created](#created)\n* [Creator](#creator)\n* [Contributor](#contributor)\n* [Favourite, favorite](#favourite-favorite)\n* [ID](#id)\n* [Label](#label)\n* [Last modified](#lastmodified)\n* [Macro](#macro)\n* [Mention](#mention)\n* [Parent](#parent)\n* [Space](#space)\n\t* [Space category](#space-category)\n\t* [Space key](#space-key)\n\t* [Space title](#space-title)\n\t* [Space type](#space-type)\n* [Text](#text)\n* [Title](#title)\n* [Type](#type)\n* [Watcher](#watcher)\n\n#### Ancestor\n\nSearch for all pages that are descendants of a given ancestor page. This includes direct child pages and their descendents. It is more general than the [parent](#parent) field.\n\n###### Syntax\n\n``` sql\nancestor\n```\n\n###### Field Type\n\nCONTENT\n\n###### Supported Operators\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n

=

!=

~

!~

>

>=

<

<=

IN

NOT IN

Yes

Yes

No

No

No

No

No

No

Yes

Yes

\n\n###### Supported Functions\n\nNone\n\n###### Examples\n\n* Find all descendent pages with a given anscestor page.\n\n ``` sql\n ancestor = 123\n ```\n\n* Find descendants of a group of ancestor pages.\n\n ``` sql\n ancestor in (123, 456, 789)\n ```\n\n#### Container\n\nSearch for content that is contained in the content with the given ID\n\n###### Syntax\n\n``` sql\ncontainer\n```\n\n###### Field Type\n\nCONTENT\n\n###### Supported Operators\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n

=

!=

~

!~

>

>=

<

<=

IN

NOT IN

Yes

Yes

No

No

No

No

No

No

Yes

Yes

\n\n###### Supported Functions\n\nNone\n\n###### Examples\n\n* Find attachments contained in a page with the given content ID.\n\n ``` sql\n container = 123 and type = attachment\n ```\n\n* Find content container in a set of pages with the given IDs.\n\n ``` sql\n container in (123, 223, 323)\n ```\n\n#### Content\n\nSearch for content that have a given content ID. This is an alias of the [ID](https://developer.atlassian.com/display/CONFDEV/CQL+Field+Reference#ID) field.\n\n###### Syntax\n\n``` sql\ncontent\n```\n\n###### Field Type\n\nCONTENT\n\n###### Supported Operators\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n

=

!=

~

!~

>

>=

<

<=

IN

NOT IN

Yes

Yes

No

No

No

No

No

No

Yes

Yes

\n\n###### Supported Functions\n\nNone \n\n###### Examples\n\n* Find content with a given content ID.\n\n ``` sql\n content = 123\n ```\n\n* Find content in a set of content IDs.\n\n ``` sql\n content in (123, 223, 323)\n ```\n\n#### Created\n\nSearch for content that was created on, before or after a particular date (or date range).\n\nNote: search results will be relative to your configured time zone (which is by default the Confluence server time zone).\n\nUse one of the following formats:\n\n`\"yyyy/MM/dd HH:mm\"` \n`\"yyyy-MM-dd HH:mm\"` \n`\"yyyy/MM/dd\"` \n`\"yyyy-MM-dd\"`\n\n###### Syntax\n\n``` sql\ncreated\n```\n\n###### Field Type\n\nDATE\n\n###### Supported Operators\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n

=

!=

~

!~

>

>=

<

<=

IN

NOT IN

Yes

Yes

No

No

Yes

Yes

Yes

Yes

No

No

\n\n###### Supported Functions\n\n- [endOfDay()](https://developer.atlassian.com/display/CONFDEV/CQL+Function+Reference#CQLFunctionReference-endOfDay)\n- [endOfMonth()](https://developer.atlassian.com/display/CONFDEV/CQL+Function+Reference#CQLFunctionReference-endOfMonth)\n- [endOfWeek()](https://developer.atlassian.com/display/CONFDEV/CQL+Function+Reference#CQLFunctionReference-endOfWeek)\n- [endOfYear()](https://developer.atlassian.com/display/CONFDEV/CQL+Function+Reference#CQLFunctionReference-endOfYear)\n- [startOfDay()](https://developer.atlassian.com/display/CONFDEV/CQL+Function+Reference#CQLFunctionReference-startOfDay)\n- [startOfMonth()](https://developer.atlassian.com/display/CONFDEV/CQL+Function+Reference#CQLFunctionReference-startOfMonth)\n- [startOfWeek()](https://developer.atlassian.com/display/CONFDEV/CQL+Function+Reference#CQLFunctionReference-startOfWeek)\n- [startOfYear()](https://developer.atlassian.com/display/CONFDEV/CQL+Function+Reference#CQLFunctionReference-startOfYear)\n\n###### Examples\n\n* Find content created after the 1st September 2014.\n\n ``` sql\n created > 2014/09/01\n ```\n\n* Find content created in the last 4 weeks.\n\n ``` sql\n created >= now(\"-4w\")\n ```\n\n#### Creator\n\nSearch for content that was created by a particular user. You can search by the user's username.\n\n###### Syntax\n\n``` javascript\ncreator\n```\n\n###### Field Type\n\nUSER\n\n###### Supported Operators\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n

=

!=

~

!~

>

>=

<

<=

IN

NOT IN

Yes

Yes

No

No

No

No

No

No

Yes

Yes

\n\n###### Supported Functions\n\n- [currentUser()](https://developer.atlassian.com/display/CONFDEV/CQL+Function+Reference#CQLFunctionReference-currentUser())\n\n###### Examples\n\n* Find content created by jsmith.\n\n ``` sql\n created = jsmith\n ```\n\n* Find content created by john smith or bob nguyen.\n\n ``` sql\n created in (jsmith, bnguyen)\n ```\n\n#### Contributor\n\nSearch for content that was created or edited by a particular user. You can search by the user's username.\n\n###### Syntax\n\n``` sql\ncontributor\n```\n\n###### Field Type\n\nUSER\n\n###### Supported Operators\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n

=

!=

~

!~

>

>=

<

<=

IN

NOT IN

Yes

Yes

No

No

No

No

No

No

Yes

Yes

\n\n###### Supported Functions\n\n* [currentUser()](https://developer.atlassian.com/display/CONFDEV/CQL+Function+Reference#CQLFunctionReference-currentUser())\n\n###### Examples\n\n* Find content created by jsmith.\n\n ``` sql\n contributor = jsmith\n ```\n\n* Find content created by john smith or bob nguyen.\n\n ``` sql\n contributor in (jsmith, bnguyen)\n ```\n\n#### Favourite, favorite\n\nSearch for content that was favorited by a particular user. You can search by the user's username.\n\nDue to security restrictions you are only allowed to filter on the logged in user's favourites.\nThis field is available in both British and American spellings.\n\n###### Syntax\n\n``` sql\nfavourite\n```\n\n###### Field Type\n\nUSER\n\n###### Supported Operators\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n

=

!=

~

!~

>

>=

<

<=

IN

NOT IN

Yes

Yes

No

No

No

No

No

No

Yes

Yes

\n\n###### Supported Functions\n\n* [currentUser()](https://developer.atlassian.com/display/CONFDEV/CQL+Function+Reference#CQLFunctionReference-currentUser())\n\n###### Examples\n\n* Find content that is favorited by the current user.\n\n ``` sql\n favourite = currentUser()\n ```\n\n* Find content favorited by jsmith, where jsmith is also the logged in user.\n\n ``` sql\n favourite = jsmith\n ```\n\n#### ID\n\nSearch for content that has a given content ID.\n\n###### Syntax\n\n``` sql\nid\n```\n\n###### Field Type\n\nCONTENT\n\n###### Supported Operators\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n

=

!=

~

!~

>

>=

<

<=

IN

NOT IN

Yes

Yes

No

No

No

No

No

No

Yes

Yes

\n\n###### Supported Functions\n\nNone\n\n###### Examples\n\n* Find content with the ID 123.\n\n ``` sql\n id = 123\n ```\n\n* Find content in a set of content IDs.\n\n ``` sql\n id in (123, 223, 323)\n ```\n\n#### Label\n\nSearch for content that has a particular label.\n\n###### Syntax\n\n``` sql\nlabel\n```\n\n###### Field Type\n\nSTRING\n\n###### Supported Operators\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n

=

!=

~

!~

>

>=

<

<=

IN

NOT IN

Yes

Yes

No

No

No

No

No

No

Yes

Yes

\n\n###### Supported Functions\n\nNone\n\n###### Examples\n\n* Find content that has the label finished.\n\n ``` sql\n label = finished\n ```\n\n* Find content that doesn't have the label draft or review.\n\n ``` sql\n label not in (draft, review)\n ```\n\n#### LastModified\n\nSearch for content that was last modified on, before, or after a particular date (or date range).\n\nThe search results will be relative to your configured time zone (which is by default the Confluence server time zone).\n\nUse one of the following formats:\n\n`\"yyyy/MM/dd HH:mm\"` \n`\"yyyy-MM-dd HH:mm\"` \n`\"yyyy/MM/dd\"` \n`\"yyyy-MM-dd\"`\n\n###### Syntax\n\n``` sql\nlastmodified\n```\n\n###### Field Type\n\nDATE\n\n###### Supported Operators\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n

=

!=

~

!~

>

>=

<

<=

IN

NOT IN

Yes

Yes

No

No

Yes

Yes

Yes

Yes

No

No

\n\n###### Supported Functions\n\n- [endOfDay()](https://developer.atlassian.com/display/CONFDEV/CQL+Function+Reference#CQLFunctionReference-endOfDay)\n- [endOfMonth()](https://developer.atlassian.com/display/CONFDEV/CQL+Function+Reference#CQLFunctionReference-endOfMonth)\n- [endOfWeek()](https://developer.atlassian.com/display/CONFDEV/CQL+Function+Reference#CQLFunctionReference-endOfWeek)\n- [endOfYear()](https://developer.atlassian.com/display/CONFDEV/CQL+Function+Reference#CQLFunctionReference-endOfYear)\n- [startOfDay()](https://developer.atlassian.com/display/CONFDEV/CQL+Function+Reference#CQLFunctionReference-startOfDay)\n- [startOfMonth()](https://developer.atlassian.com/display/CONFDEV/CQL+Function+Reference#CQLFunctionReference-startOfMonth)\n- [startOfWeek()](https://developer.atlassian.com/display/CONFDEV/CQL+Function+Reference#CQLFunctionReference-startOfWeek)\n- [startOfYear()](https://developer.atlassian.com/display/CONFDEV/CQL+Function+Reference#CQLFunctionReference-startOfYear)\n\n###### Examples\n\n* Find content that was last modified on 1st September 2014.\n\n ``` sql\n lastmodified = 2014-09-01\n ```\n\n* Find content that was last modified before the start of the year.\n\n ``` sql\n lastmodified < startOfYear()\n ```\n\n* Find content that was last modified on or after 1st September but before 9am on 3rd September 2014.\n\n ``` sql\n lastmodified >= 2014-09-01 and lastmodified < \"2014-09-03 09:00\"\n ```\n\n#### Macro\n\nSearch for content that has an instance of the macro with the given name in the body of the content.\n\n###### Syntax\n\n``` sql\nmacro\n```\n\n###### Field Type\n\nSTRING\n\n###### Supported Operators\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n

=

!=

~

!~

>

>=

<

<=

IN

NOT IN

Yes

Yes

No

No

No

No

No

No

Yes

Yes

\n\n###### Supported Functions\n\nnone\n\n###### Examples\n\n* Find content that has the JIRA issue macro.\n\n ``` sql\n macro = jira\n ```\n\n* Find content that has Table of content macro or the widget macro.\n\n ``` sql\n macro in (toc, widget)\n ```\n\n#### Mention\n\nSearch for content that mentions a particular user. You can search by the user's username.\n\n###### Syntax\n\n``` sql\nmention\n```\n\n###### Field Type\n\nUSER\n\n###### Supported Operators\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n

=

!=

~

!~

>

>=

<

<=

IN

NOT IN

Yes

Yes

No

No

No

No

No

No

Yes

Yes

\n\n###### Supported Functions\n\n* [currentUser()](https://developer.atlassian.com/display/CONFDEV/CQL+Function+Reference#CQLFunctionReference-currentUser())\n\n###### Examples\n\n* Find content that mentions jsmith or kjones.\n\n ``` sql\n mention in (jsmith, kjones)\n ```\n\n* Find content that mentions jsmith.\n\n ``` sql\n mention = jsmith\n ```\n\n#### Parent\n\nSearch for child content of a particular parent page.\n\n###### Syntax\n\n``` sql\nparent\n```\n\n###### Field Type\n\nCONTENT\n\n###### Supported Operators\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n

=

!=

~

!~

>

>=

<

<=

IN

NOT IN

Yes

Yes

No

No

No

No

No

No

Yes

Yes

\n\n###### Supported Functions\n\n###### Examples\n\n* Find child pages of a parent page with ID 123.\n\n ``` sql\n parent = 123\n ```\n\n#### Space\n\nSearch for content that is in a particular Space. By default, this searches by space key. You can also search by category, title, and type (see below). \n\n###### Syntax\n\n``` sql\nspace\n```\n\n###### Field Type\n\nSPACE\n\n###### Supported Operators\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n

=

!=

~

!~

>

>=

<

<=

IN

NOT IN

Yes

Yes

No

No

No

No

No

No

Yes

Yes

\n\n###### Supported Functions\n\nnone\n\n###### Examples\n\n* Find content in the development space or the QA space.\n\n ``` sql\n space in (DEV, QA)\n ```\n\n* Find content in the development space.\n\n ``` sql\n space = DEV\n ```\n\n#### Space category\n\nSearch for spaces with a particular space category applied. Categories are used to organise spaces in the space directory. Available from Confluence 6.15 and later. \n\n###### Syntax\n\n``` sql\nspace.category\n```\n\n###### Field Type\n\nSTRING\n\n###### Supported Operators\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n

=

!=

~

!~

>

>=

<

<=

IN

NOT IN

Yes

Yes

No

No

No

No

No

No

Yes

Yes

\n\n###### Supported Functions\n\nNone\n\n###### Examples\n\n- Find spaces that have the category 'development'\n\n ``` sql\n space.category = development\n ```\n\n- Find spaces that don't have the category 'marketing' or 'operations'\n\n ``` sql\n space.category not in (marketing, operations)\n ```\n\n#### Space key\n\nSearch for spaces by space key. \n\n###### Syntax\n\n``` sql\nspace.key\n```\n\n###### Field Type\n\nSTRING\n\n###### Supported Operators\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n

=

!=

~

!~

>

>=

<

<=

IN

NOT IN

Yes

Yes

No

No

No

No

No

No

Yes

Yes

\n\n###### Supported Functions\n\nNone\n\n###### Examples\n\n- Find the space that has the key 'DEV'\n\n ``` sql\n space.key = DEV\n ```\n\n- Find spaces that have either 'MKT' or 'OPS' or 'DEV'\n\n ``` sql\n space.key in (MKT, OPS, DEV)\n ``` \n \n#### Space title\n\nSearch for spaces by title. \n\n###### Syntax\n\n``` sql\nspace.title\n```\n\n###### Field Type\n\nTEXT\n\n###### Supported Operators\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n

=

!=

~

!~

>

>=

<

<=

IN

NOT IN

No

No

Yes

Yes

No

No

No

No

No

No

\n\n###### Supported Functions\n\nNone\n\n###### Examples\n\n- Find spaces with titles that match 'Development Team' (fuzzy match)\n\n ``` sql\n space.title ~ \"Development Team\"\n ```\n\n- Find spaces with titles that don't match \"Project\" (fuzzy match)\n\n ``` sql\n space.title !~ \"Project\"\n ``` \n\n#### Space type\n\nSearch for spaces of a particular type. Supported content types are:\n\n* personal\n* global (also known as site spaces)\n* favourite, favorite (also known as My Spaces) \n\n###### Syntax\n\n``` sql\nspace.type\n```\n\n###### Field Type\n\nTYPE\n\n###### Supported Operators\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n

=

!=

~

!~

>

>=

<

<=

IN

NOT IN

Yes

Yes

No

No

No

No

No

No

Yes

Yes

\n\n###### Supported Functions\n\nNone\n\n###### Examples\n\n- Find only personal spaces\n\n ``` sql\n space.type = personal\n ```\n\n- Find only site / global spaces\n\n ``` sql\n space.type = global\n ``` \n- Find only site / favorite spaces\n\n ``` sql\n space.type = favorite\n ``` \n\n#### Text\n\nThis is a \"master-field\" that allows you to search for text across a number of other text fields.\nThese are the same fields used by Confluence search user interface.\n\n* Title\n* Content body\n* Labels\n\nNote: [Confluence text-search syntax](https://developer.atlassian.com/display/CONFDEV/Performing+text+searches+using+CQL) can be used with this field.\n\n###### Syntax\n\n``` sql\ntext\n```\n\n###### Field Type\n\nTEXT\n\n###### Supported Operators\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n

=

!=

~

!~

>

>=

<

<=

IN

NOT IN

No

No

Yes

Yes

No

No

No

No

No

No

\n\n###### Supported Functions\n\nnone\n\n###### Examples\n\n* Find content that contains the word Confluence.\n\n ``` sql\n text ~ Confluence\n ```\n\n* Find content in the development space.\n\n ``` sql\n space = DEV\n ```\n\n#### Title\n\nSearch for content by title, or with a title that contains particular text.\n\nNote: [Confluence text-search syntax](https://developer.atlassian.com/display/CONFDEV/Performing+text+searches+using+CQL) can be used with this fields when used with the [CONTAINS](https://developer.atlassian.com/display/CONFDEV/Advanced+Searching+using+CQL#AdvancedSearchingusingCQL-CONTAINS:~) operator (\"~\", \"!~\")\n\n###### Syntax\n\n``` sql\ntitle\n```\n\n###### Field Type\n\nTEXT\n\n###### Supported Operators\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n

=

!=

~

!~

>

>=

<

<=

IN

NOT IN

Yes

Yes

Yes

Yes

No

No

No

No

Yes

Yes

\n\n###### Supported Functions\n\nnone\n\n###### Examples\n\n* Find content with the title \"Advanced Searching using CQL\".\n\n ``` sql\n title = \"Advanced Searching using CQL\"\n ```\n\n* Find content that matches Searching CQL (i.e. a \"fuzzy\" match).\n\n ``` sql\n title ~ \"Searching CQL\"\n ```\n\n#### Type\n\nSearch for content of a particular type. Supported content types are:\n\n* page\n* blogpost\n* comment\n* attachment\n\n###### Syntax\n\n``` sql\ntype\n```\n\n###### Field Type\n\nTYPE\n\n###### Supported Operators\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n

=

!=

~

!~

>

>=

<

<=

IN

NOT IN

Yes

Yes

No

No

No

No

No

No

Yes

Yes

\n\n###### Supported Functions\n\nnone\n\n###### Examples\n\n- Find blogposts or pages\n\n ``` sql\n type IN (blogpost, page)\n ```\n\n- Find attachments\n\n ``` sql\n type = attachment\n ```\n\n#### Watcher\n\nSearch for content that a particular user is watching. You can search by the user's username.\n\n###### Syntax\n\n``` sql\nwatcher\n```\n\n###### Field Type\n\nUSER\n\n###### Supported Operators\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n

=

!=

~

!~

>

>=

<

<=

IN

NOT IN

Yes

Yes

No

No

No

No

No

No

Yes

Yes

\n\n###### Supported Functions\n\n* [currentUser()](https://developer.atlassian.com/display/CONFDEV/CQL+Function+Reference#CQLFunctionReference-currentUser())\n\n###### Examples\n\n* Search for content that you are watching.\n\n ``` sql\n watcher = currentUser()\n ```\n\n* Search for content that the user \"jsmith\" is watching.\n\n ``` sql\n watcher = \"jsmith\"\n ```\n"},{"title":"Confluence REST API examples","anchor":"confluence-rest-api-examples","body":"---\naliases:\n- /server/confluence/confluence-rest-api-examples-27558000.html\n- /server/confluence/confluence-rest-api-examples-27558000.md\ncategory: reference\nconfluence_id: 27558000\ndac_edit_link: https://developer.atlassian.com/pages/editpage.action?cjm=wozere&pageId=27558000\ndac_view_link: https://developer.atlassian.com/pages/viewpage.action?cjm=wozere&pageId=27558000\ndate: '2022-05-02'\nlegacy_title: Confluence REST API Examples\nplatform: server\nproduct: confluence\nsubcategory: api\ntitle: Confluence REST API examples\n---\n# Confluence REST API examples\n\n
\n
\n\nThis page contains examples of using the Confluence Content REST API using `curl`. The responses are piped into `python -mjson.tool` JSON encoder / decoder to make them easier to read.\n\n
\n\nBecause the REST API is based on open standards, you can use any web development language to access the API.\n\nThese examples use basic authentication with a username and password. You can also create a [personal access token](https://confluence.atlassian.com/display/ENTERPRISE/Using+Personal+Access+Tokens) for authentication (Confluence 7.9 and later).\n\n## Browse content\n\nThis example shows how you can browse content. If you're using Confluence 7.18 or later, there's a more performant option that might be useful below.  \n\n``` bash\ncurl -u admin:admin http://localhost:8080/confluence/rest/api/content?limit=2 | python -mjson.tool\n```\n\nExample result:\n\n``` javascript\n{\n \"results\": [\n {\n \"id\": \"393219\",\n \"type\": \"page\",\n \"status\": \"current\",\n \"title\": \"First space\",\n \"extensions\": {\n \"position\": 0\n },\n \"_links\": {\n \"webui\": \"/display/FS/First+space\",\n \"edit\": \"/pages/resumedraft.action?draftId=393219\",\n \"tinyui\": \"/x/AwAG\",\n \"self\": \"http://localhost:8080/confluence/rest/api/content/393219\"\n },\n \"_expandable\": {\n \"container\": \"/rest/api/space/FS\",\n \"metadata\": \"\",\n \"operations\": \"\",\n \"children\": \"/rest/api/content/393219/child\",\n \"restrictions\": \"/rest/api/content/393219/restriction/byOperation\",\n \"history\": \"/rest/api/content/393219/history\",\n \"ancestors\": \"\",\n \"body\": \"\",\n \"version\": \"\",\n \"descendants\": \"/rest/api/content/393219/descendant\",\n \"space\": \"/rest/api/space/FS\"\n }\n },\n {\n \"id\": \"393229\",\n \"type\": \"page\",\n \"status\": \"current\",\n \"title\": \"Page 1\",\n \"extensions\": {\n \"position\": 0\n },\n \"_links\": {\n \"webui\": \"/display/FS/Page+1\",\n \"edit\": \"/pages/resumedraft.action?draftId=393229&draftShareId=f16d9e64-9373-4719-9df5-aec8102e5252\",\n \"tinyui\": \"/x/DQAG\",\n \"self\": \"http://localhost:8080/confluence/rest/api/content/393229\"\n },\n \"_expandable\": {\n \"container\": \"/rest/api/space/FS\",\n \"metadata\": \"\",\n \"operations\": \"\",\n \"children\": \"/rest/api/content/393229/child\",\n \"restrictions\": \"/rest/api/content/393229/restriction/byOperation\",\n \"history\": \"/rest/api/content/393229/history\",\n \"ancestors\": \"\",\n \"body\": \"\",\n \"version\": \"\",\n \"descendants\": \"/rest/api/content/393229/descendant\",\n \"space\": \"/rest/api/space/FS\"\n }\n }\n ],\n \"start\": 0,\n \"limit\": 2,\n \"size\": 2,\n \"_links\": {\n \"self\": \"http://localhost:8080/confluence/rest/api/content\",\n \"next\": \"/rest/api/content?limit=2&start=2\",\n \"base\": \"http://localhost:8080/confluence\",\n \"context\": \"/confluence\"\n }\n}\n```\n### Browse content (Confluence 7.18 and later)\n\nThis example shows how you can browse content in Confluence 7.18 and later. The `scan` endpoint provides better performance, but can only be used to browse pages (not blogs), and doesn't support `offset`, `title`, or `creationdate` parameters.  \n\n``` bash\ncurl -u admin:admin http://localhost:8080/confluence/rest/api/content/scan?limit=2 | python -mjson.tool\n```\n\nExample result:\n\n``` javascript\n{\n \"results\": [\n {\n \"id\": \"393219\",\n \"type\": \"page\",\n \"status\": \"current\",\n \"title\": \"First space\",\n \"extensions\": {\n \"position\": 0\n },\n \"_links\": {\n \"webui\": \"/display/FS/First+space\",\n \"edit\": \"/pages/resumedraft.action?draftId=393219\",\n \"tinyui\": \"/x/AwAG\",\n \"self\": \"http://localhost:8080/confluence/rest/api/content/393219\"\n },\n \"_expandable\": {\n \"container\": \"/rest/api/space/FS\",\n \"metadata\": \"\",\n \"operations\": \"\",\n \"children\": \"/rest/api/content/393219/child\",\n \"restrictions\": \"/rest/api/content/393219/restriction/byOperation\",\n \"history\": \"/rest/api/content/393219/history\",\n \"ancestors\": \"\",\n \"body\": \"\",\n \"version\": \"\",\n \"descendants\": \"/rest/api/content/393219/descendant\",\n \"space\": \"/rest/api/space/FS\"\n }\n },\n {\n \"id\": \"393229\",\n \"type\": \"page\",\n \"status\": \"current\",\n \"title\": \"Page 1\",\n \"extensions\": {\n \"position\": 0\n },\n \"_links\": {\n \"webui\": \"/display/FS/Page+1\",\n \"edit\": \"/pages/resumedraft.action?draftId=393229&draftShareId=f16d9e64-9373-4719-9df5-aec8102e5252\",\n \"tinyui\": \"/x/DQAG\",\n \"self\": \"http://localhost:8080/confluence/rest/api/content/393229\"\n },\n \"_expandable\": {\n \"container\": \"/rest/api/space/FS\",\n \"metadata\": \"\",\n \"operations\": \"\",\n \"children\": \"/rest/api/content/393229/child\",\n \"restrictions\": \"/rest/api/content/393229/restriction/byOperation\",\n \"history\": \"/rest/api/content/393229/history\",\n \"ancestors\": \"\",\n \"body\": \"\",\n \"version\": \"\",\n \"descendants\": \"/rest/api/content/393229/descendant\",\n \"space\": \"/rest/api/space/FS\"\n }\n }\n ],\n \"cursor\": \"content:false:null\",\n \"nextCursor\": \"content:false:393229\",\n \"limit\": 2,\n \"size\": 2,\n \"_links\": {\n \"self\": \"http://localhost:8080/confluence/rest/api/content/scan\",\n \"next\": \"/rest/api/content/scan?cursor=content:false:393229&limit=2\",\n \"base\": \"http://localhost:8080/confluence\",\n \"context\": \"/confluence\"\n }\n}\n```\n\n## Browse content with pagination\n\nTo browse content with next or previous pagination use `_links.next` or `_links.prev`.\n\n``` bash\ncurl -u admin:admin http://localhost:8080/confluence/rest/api/content?limit=2&start=2 | python -mjson.tool\n```\n\nExample result:\n\n``` javascript\n{\n \"results\": [\n {\n \"id\": \"393239\",\n \"type\": \"page\",\n \"status\": \"current\",\n \"title\": \"Page 3\",\n \"extensions\": {\n \"position\": 2\n },\n \"_links\": {\n \"webui\": \"/display/FS/Page+3\",\n \"edit\": \"/pages/resumedraft.action?draftId=393239&draftShareId=9041c7ee-064e-448e-a354-d2117661ec0c\",\n \"tinyui\": \"/x/FwAG\",\n \"self\": \"http://localhost:8080/confluence/rest/api/content/393239\"\n },\n \"_expandable\": {\n \"container\": \"/rest/api/space/FS\",\n \"metadata\": \"\",\n \"operations\": \"\",\n \"children\": \"/rest/api/content/393239/child\",\n \"restrictions\": \"/rest/api/content/393239/restriction/byOperation\",\n \"history\": \"/rest/api/content/393239/history\",\n \"ancestors\": \"\",\n \"body\": \"\",\n \"version\": \"\",\n \"descendants\": \"/rest/api/content/393239/descendant\",\n \"space\": \"/rest/api/space/FS\"\n }\n },\n {\n \"id\": \"393244\",\n \"type\": \"page\",\n \"status\": \"current\",\n \"title\": \"Second space Home\",\n \"extensions\": {\n \"position\": \"none\"\n },\n \"_links\": {\n \"webui\": \"/display/SS/Second+space+Home\",\n \"edit\": \"/pages/resumedraft.action?draftId=393244\",\n \"tinyui\": \"/x/HAAG\",\n \"self\": \"http://localhost:8080/confluence/rest/api/content/393244\"\n },\n \"_expandable\": {\n \"container\": \"/rest/api/space/SS\",\n \"metadata\": \"\",\n \"operations\": \"\",\n \"children\": \"/rest/api/content/393244/child\",\n \"restrictions\": \"/rest/api/content/393244/restriction/byOperation\",\n \"history\": \"/rest/api/content/393244/history\",\n \"ancestors\": \"\",\n \"body\": \"\",\n \"version\": \"\",\n \"descendants\": \"/rest/api/content/393244/descendant\",\n \"space\": \"/rest/api/space/SS\"\n }\n }\n ],\n \"start\": 2,\n \"limit\": 2,\n \"size\": 2,\n \"_links\": {\n \"self\": \"http://localhost:8080/confluence/rest/api/content\",\n \"next\": \"/rest/api/content?limit=2&start=4\",\n \"prev\": \"/rest/api/content?limit=2&start=0\",\n \"base\": \"http://localhost:8080/confluence\",\n \"context\": \"/confluence\"\n }\n}\n```\n### Browse content with pagination (Confluence 7.18 and later)\n\nThis example shows how you can browse content with pagination in Confluence 7.18 and later. The `scan` endpoint provides better performance, but can only be used to browse pages (not blogs), and doesn't support `offset`, `title`, or `creationdate` parameters.\n\nTo browse content with next or previous pagination you can still use `_links.next` or `_links.prev`, or you can use the value of `nextCursor` and `prevCursor` to set the cursor in the next request. \n\nTo navigate forward using the value of `nextCursor` from the previous example:\n\n``` bash\ncurl -u admin:admin http://localhost:8080/confluence/rest/api/content/scan?cursor=content:false:393229&limit=2 | python -mjson.tool\n```\n\nExample result:\n\n``` javascript\n{\n \"results\": [\n {\n \"id\": \"393239\",\n \"type\": \"page\",\n \"status\": \"current\",\n \"title\": \"Page 3\",\n \"extensions\": {\n \"position\": 2\n },\n \"_links\": {\n \"webui\": \"/display/FS/Page+3\",\n \"edit\": \"/pages/resumedraft.action?draftId=393239&draftShareId=9041c7ee-064e-448e-a354-d2117661ec0c\",\n \"tinyui\": \"/x/FwAG\",\n \"self\": \"http://localhost:8080/confluence/rest/api/content/393239\"\n },\n \"_expandable\": {\n \"container\": \"/rest/api/space/FS\",\n \"metadata\": \"\",\n \"operations\": \"\",\n \"children\": \"/rest/api/content/393239/child\",\n \"restrictions\": \"/rest/api/content/393239/restriction/byOperation\",\n \"history\": \"/rest/api/content/393239/history\",\n \"ancestors\": \"\",\n \"body\": \"\",\n \"version\": \"\",\n \"descendants\": \"/rest/api/content/393239/descendant\",\n \"space\": \"/rest/api/space/FS\"\n }\n },\n {\n \"id\": \"393244\",\n \"type\": \"page\",\n \"status\": \"current\",\n \"title\": \"Second space Home\",\n \"extensions\": {\n \"position\": \"none\"\n },\n \"_links\": {\n \"webui\": \"/display/SS/Second+space+Home\",\n \"edit\": \"/pages/resumedraft.action?draftId=393244\",\n \"tinyui\": \"/x/HAAG\",\n \"self\": \"http://localhost:8080/confluence/rest/api/content/393244\"\n },\n \"_expandable\": {\n \"container\": \"/rest/api/space/SS\",\n \"metadata\": \"\",\n \"operations\": \"\",\n \"children\": \"/rest/api/content/393244/child\",\n \"restrictions\": \"/rest/api/content/393244/restriction/byOperation\",\n \"history\": \"/rest/api/content/393244/history\",\n \"ancestors\": \"\",\n \"body\": \"\",\n \"version\": \"\",\n \"descendants\": \"/rest/api/content/393244/descendant\",\n \"space\": \"/rest/api/space/SS\"\n }\n }\n ],\n \"cursor\": \"content:false:393229\",\n \"nextCursor\": \"content:false:393244\",\n \"prevCursor\": \"content:true:393239\",\n \"limit\": 2,\n \"size\": 2,\n \"_links\": {\n \"self\": \"http://localhost:8080/confluence/rest/api/content/scan?cursor=content:false:393229\",\n \"next\": \"/rest/api/content/scan?cursor=content:false:393244&limit=2\",\n \"prev\": \"/rest/api/content/scan?cursor=content:true:393239&limit=2\",\n \"base\": \"http://localhost:8080/confluence\",\n \"context\": \"/confluence\"\n }\n}\n```\n\n## Read content, and expand the body\n\nThis example shows how you can read content of a page with the body [expanded](/server/confluence/expansions-in-the-rest-api).\n\n``` bash\ncurl -u admin:admin http://localhost:8080/confluence/rest/api/content/3965072?expand=body.storage |\npython -mjson.tool\n```\n\nExample result:\n\n``` javascript\n{\n \"_expandable\": {\n \"ancestors\": \"\",\n \"children\": \"\",\n \"container\": \"\",\n \"history\": \"/rest/api/content/3965072/history\",\n \"metadata\": \"\",\n \"space\": \"/rest/api/space/TST\",\n \"version\": \"\"\n },\n \"_links\": {\n \"base\": \"http://localhost:8080/confluence\",\n \"collection\": \"/rest/api/contents\",\n \"self\": \"http://localhost:8080/confluence/rest/api/content/3965072\",\n \"tinyui\": \"/x/kIA8\",\n \"webui\": \"/display/TST/Test+Page\"\n },\n \"body\": {\n \"editor\": {\n \"_expandable\": {\n \"content\": \"/rest/api/content/3965072\"\n },\n \"representation\": \"editor\"\n },\n \"export_view\": {\n \"_expandable\": {\n \"content\": \"/rest/api/content/3965072\"\n },\n \"representation\": \"export_view\"\n },\n \"storage\": {\n \"_expandable\": {\n \"content\": \"/rest/api/content/3965072\"\n },\n \"representation\": \"storage\",\n \"value\": \"

blah blah

\"\n },\n \"view\": {\n \"_expandable\": {\n \"content\": \"/rest/api/content/3965072\"\n },\n \"representation\": \"view\"\n }\n },\n \"id\": \"3965072\",\n \"title\": \"Test Page\",\n \"type\": \"page\"\n}\n```\n\n## Find pages or blogs \n\n### Find pages by space key (Confluence 7.18 or later)\n\nThis example shows how you can find pages in Confluence 7.18 and later. The `scan` endpoint provides better performance, but can only be used to browse pages (not blogs), and doesn't support `offset`, `title`, or `creationdate` parameters.\n\nThis example shows how you can find a page by space key, with history expanded to find the creator.\n\n``` bash\ncurl -u admin:admin http://localhost:8080/confluence/rest/api/content/scan?spaceKey=FS&limit=2&expand=history | python -mjson.tool\n```\n\nExample result:\n\n``` javascript\n{\n \"results\": [\n {\n \"id\": \"393219\",\n \"type\": \"page\",\n \"status\": \"current\",\n \"title\": \"First space\",\n \"history\": {\n \"latest\": true,\n \"createdBy\": {\n \"type\": \"anonymous\",\n \"profilePicture\": {\n \"path\": \"/confluence/s/-ze4av5/8804/0/_/images/icons/profilepics/anonymous.svg\",\n \"width\": 48,\n \"height\": 48,\n \"isDefault\": true\n },\n \"displayName\": \"Anonymous\"\n },\n \"createdDate\": \"2022-04-27T07:15:13.012+10:00\",\n \"_links\": {\n \"self\": \"http://localhost:8080/confluence/rest/api/content/393219/history\"\n },\n \"_expandable\": {\n \"lastUpdated\": \"\",\n \"previousVersion\": \"\",\n \"contributors\": \"\",\n \"nextVersion\": \"\"\n }\n },\n \"extensions\": {\n \"position\": 0\n },\n \"_links\": {\n \"webui\": \"/display/FS/First+space\",\n \"edit\": \"/pages/resumedraft.action?draftId=393219\",\n \"tinyui\": \"/x/AwAG\",\n \"self\": \"http://localhost:8080/confluence/rest/api/content/393219\"\n },\n \"_expandable\": {\n \"container\": \"/rest/api/space/FS\",\n \"metadata\": \"\",\n \"operations\": \"\",\n \"children\": \"/rest/api/content/393219/child\",\n \"restrictions\": \"/rest/api/content/393219/restriction/byOperation\",\n \"ancestors\": \"\",\n \"body\": \"\",\n \"version\": \"\",\n \"descendants\": \"/rest/api/content/393219/descendant\",\n \"space\": \"/rest/api/space/FS\"\n }\n },\n {\n \"id\": \"393229\",\n \"type\": \"page\",\n \"status\": \"current\",\n \"title\": \"Page 1\",\n \"history\": {\n \"latest\": true,\n \"createdBy\": {\n \"type\": \"known\",\n \"username\": \"admin\",\n \"userKey\": \"2c9d802a8067b72f018067b876420000\",\n \"profilePicture\": {\n \"path\": \"/confluence/images/icons/profilepics/default.svg\",\n \"width\": 48,\n \"height\": 48,\n \"isDefault\": true\n },\n \"displayName\": \"admin\",\n \"_links\": {\n \"self\": \"http://localhost:8080/confluence/rest/api/user?key=2c9d802a8067b72f018067b876420000\"\n },\n \"_expandable\": {\n \"status\": \"\"\n }\n },\n \"createdDate\": \"2022-04-27T07:15:18.097+10:00\",\n \"_links\": {\n \"self\": \"http://localhost:8080/confluence/rest/api/content/393229/history\"\n },\n \"_expandable\": {\n \"lastUpdated\": \"\",\n \"previousVersion\": \"\",\n \"contributors\": \"\",\n \"nextVersion\": \"\"\n }\n },\n \"extensions\": {\n \"position\": 0\n },\n \"_links\": {\n \"webui\": \"/display/FS/Page+1\",\n \"edit\": \"/pages/resumedraft.action?draftId=393229&draftShareId=f16d9e64-9373-4719-9df5-aec8102e5252\",\n \"tinyui\": \"/x/DQAG\",\n \"self\": \"http://localhost:8080/confluence/rest/api/content/393229\"\n },\n \"_expandable\": {\n \"container\": \"/rest/api/space/FS\",\n \"metadata\": \"\",\n \"operations\": \"\",\n \"children\": \"/rest/api/content/393229/child\",\n \"restrictions\": \"/rest/api/content/393229/restriction/byOperation\",\n \"ancestors\": \"\",\n \"body\": \"\",\n \"version\": \"\",\n \"descendants\": \"/rest/api/content/393229/descendant\",\n \"space\": \"/rest/api/space/FS\"\n }\n }\n ],\n \"cursor\": \"content:false:null\",\n \"nextCursor\": \"content:false:393229\",\n \"limit\": 2,\n \"size\": 2,\n \"_links\": {\n \"self\": \"http://localhost:8080/confluence/rest/api/content/scan?spaceKey=FS&expand=history\",\n \"next\": \"/rest/api/content/scan?spaceKey=FS&cursor=content:false:393229&expand=history&limit=2\",\n \"base\": \"http://localhost:8080/confluence\",\n \"context\": \"/confluence\"\n }\n}\n```\n\n### Find a page by title and space key\n\nThis example shows how you can find a page by space key and title with history [expanded](/server/confluence/expansions-in-the-rest-api) to find the creator.\n\n``` bash\ncurl -u admin:admin -X GET \"http://localhost:8080/confluence/rest/api/content?title=myPage%20Title\n&spaceKey=TST&expand=history\" | python -mjson.tool\n```\n\nExample result: \n\n``` javascript\n{\n \"_links\": {\n \"self\": \"http://localhost:8080/confluence/rest/api/content\"\n },\n \"limit\": 100,\n \"results\": [\n {\n \"_expandable\": {\n \"ancestors\": \"\",\n \"body\": \"\",\n \"children\": \"/rest/api/content/950276/child\",\n \"container\": \"\",\n \"descendants\": \"/rest/api/content/950276/descendant\",\n \"metadata\": \"\",\n \"space\": \"/rest/api/space/TST\",\n \"version\": \"\"\n },\n \"_links\": {\n \"self\": \"http://localhost:8080/confluence/rest/api/content/950276\",\n \"tinyui\": \"/x/BIAO\",\n \"webui\": \"/display/TST/myPage+Title\"\n },\n \"history\": {\n \"_expandable\": {\n \"lastUpdated\": \"\"\n },\n \"_links\": {\n \"self\": \"http://localhost:8080/confluence/rest/api/content/950276/history\"\n },\n \"createdBy\": {\n \"displayName\": \"A. D. Ministrator\",\n \"profilePicture\": {\n \"height\": 48,\n \"isDefault\": true,\n \"path\": \"/confluence/s/en_GB-1988229788/4960/NOCACHE1/_/images/icons/profilepics/default.png\",\n \"width\": 48\n },\n \"type\": \"known\",\n \"username\": \"admin\"\n },\n \"createdDate\": \"2014-03-07T17:08:20.326+1100\",\n \"latest\": true\n },\n \"id\": \"950276\",\n \"title\": \"myPage Title\",\n \"type\": \"page\"\n }\n ],\n \"size\": 1,\n \"start\": 0\n}\n```\n\n### Find blog posts\n\nThis example finds blog posts to display in a blog roll with labels.\n\n``` bash\ncurl -u admin:admin -X GET \"http://localhost:8080/confluence/rest/api/content?type=blogpost&start=0\n&limit=10&expand=space,history,body.view,metadata.labels\" | python -mjson.tool\n```\n\nExample result:\n\n``` javascript\n{\n \"_links\": {\n \"self\": \"http://localhost:8080/confluence/rest/api/content\"\n },\n \"limit\": 10,\n \"results\": [\n {\n \"_expandable\": {\n \"ancestors\": \"\",\n \"children\": \"/rest/api/content/557065/child\",\n \"container\": \"\",\n \"descendants\": \"/rest/api/content/557065/descendant\",\n \"version\": \"\"\n },\n \"_links\": {\n \"self\": \"http://localhost:8080/confluence/rest/api/content/557065\",\n \"tinyui\": \"/x/CYAI\",\n \"webui\": \"/display/TST/Test+Space+Home\"\n },\n \"body\": {\n \"editor\": {\n \"_expandable\": {\n \"content\": \"/rest/api/content/557065\"\n },\n \"representation\": \"editor\"\n },\n \"export_view\": {\n \"_expandable\": {\n \"content\": \"/rest/api/content/557065\"\n },\n \"representation\": \"export_view\"\n },\n \"storage\": {\n \"_expandable\": {\n \"content\": \"/rest/api/content/557065\"\n },\n \"representation\": \"storage\"\n },\n \"view\": {\n \"_expandable\": {\n \"content\": \"/rest/api/content/557065\"\n },\n \"representation\": \"view\",\n \"value\": \"

Example page

\"\n }\n },\n \"history\": {\n \"_expandable\": {\n \"lastUpdated\": \"\"\n },\n \"_links\": {\n \"self\": \"http://localhost:8080/confluence/rest/api/content/557065/history\"\n },\n \"createdBy\": {\n \"displayName\": \"A. D. Ministrator\",\n \"profilePicture\": {\n \"height\": 48,\n \"isDefault\": true,\n \"path\": \"/confluence/s/en_GB-1988229788/4960/NOCACHE1/_/images/icons/profilepics/default.png\",\n \"width\": 48\n },\n \"type\": \"known\",\n \"username\": \"admin\"\n },\n \"createdDate\": \"2014-03-07T16:14:35.220+1100\",\n \"latest\": true\n },\n \"id\": \"557065\",\n \"metadata\": {\n \"labels\": {\n \"_links\": {\n \"self\": \"http://localhost:8080/confluence/rest/api/content/557065/label\"\n },\n \"limit\": 200,\n \"results\": [],\n \"size\": 0,\n \"start\": 0\n },\n \"likesCount\": null\n },\n \"space\": {\n \"_links\": {\n \"self\": \"http://localhost:8080/confluence/rest/api/space/TST\"\n },\n \"id\": 786433,\n \"key\": \"TST\",\n \"name\": \"Test Space\"\n },\n \"title\": \"Test Space Home\",\n \"type\": \"page\"\n },\n {\n \"_expandable\": {\n \"ancestors\": \"\",\n \"children\": \"/rest/api/content/557067/child\",\n \"container\": \"\",\n \"descendants\": \"/rest/api/content/557067/descendant\",\n \"version\": \"\"\n },\n \"_links\": {\n \"self\": \"http://localhost:8080/confluence/rest/api/content/557067\",\n \"tinyui\": \"/x/C4AI\",\n \"webui\": \"/display/TST/A+new+page\"\n },\n \"body\": {\n \"editor\": {\n \"_expandable\": {\n \"content\": \"/rest/api/content/557067\"\n },\n \"representation\": \"editor\"\n },\n \"export_view\": {\n \"_expandable\": {\n \"content\": \"/rest/api/content/557067\"\n },\n \"representation\": \"export_view\"\n },\n \"storage\": {\n \"_expandable\": {\n \"content\": \"/rest/api/content/557067\"\n },\n \"representation\": \"storage\"\n },\n \"view\": {\n \"_expandable\": {\n \"content\": \"/rest/api/content/557067\"\n },\n \"representation\": \"view\",\n \"value\": \"\"\n }\n },\n \"history\": {\n \"_expandable\": {\n \"lastUpdated\": \"\"\n },\n \"_links\": {\n \"self\": \"http://localhost:8080/confluence/rest/api/content/557067/history\"\n },\n \"createdBy\": {\n \"displayName\": \"A. D. Ministrator\",\n \"profilePicture\": {\n \"height\": 48,\n \"isDefault\": true,\n \"path\": \"/confluence/s/en_GB-1988229788/4960/NOCACHE1/_/images/icons/profilepics/default.png\",\n \"width\": 48\n },\n \"type\": \"known\",\n \"username\": \"admin\"\n },\n \"createdDate\": \"2014-03-07T16:18:33.554+1100\",\n \"latest\": true\n },\n \"id\": \"557067\",\n \"metadata\": {\n \"labels\": {\n \"_links\": {\n \"self\": \"http://localhost:8080/confluence/rest/api/content/557067/label\"\n },\n \"limit\": 200,\n \"results\": [],\n \"size\": 0,\n \"start\": 0\n },\n \"likesCount\": null\n },\n \"space\": {\n \"_links\": {\n \"self\": \"http://localhost:8080/confluence/rest/api/space/TST\"\n },\n \"id\": 786433,\n \"key\": \"TST\",\n \"name\": \"Test Space\"\n },\n \"title\": \"A new page\",\n \"type\": \"page\"\n },\n {\n \"_expandable\": {\n \"ancestors\": \"\",\n \"children\": \"/rest/api/content/950276/child\",\n \"container\": \"\",\n \"descendants\": \"/rest/api/content/950276/descendant\",\n \"version\": \"\"\n },\n \"_links\": {\n \"self\": \"http://localhost:8080/confluence/rest/api/content/950276\",\n \"tinyui\": \"/x/BIAO\",\n \"webui\": \"/display/TST/myPage+Title\"\n },\n \"body\": {\n \"editor\": {\n \"_expandable\": {\n \"content\": \"/rest/api/content/950276\"\n },\n \"representation\": \"editor\"\n },\n \"export_view\": {\n \"_expandable\": {\n \"content\": \"/rest/api/content/950276\"\n },\n \"representation\": \"export_view\"\n },\n \"storage\": {\n \"_expandable\": {\n \"content\": \"/rest/api/content/950276\"\n },\n \"representation\": \"storage\"\n },\n \"view\": {\n \"_expandable\": {\n \"content\": \"/rest/api/content/950276\"\n },\n \"representation\": \"view\",\n \"value\": \"

Some content

\"\n }\n },\n \"history\": {\n \"_expandable\": {\n \"lastUpdated\": \"\"\n },\n \"_links\": {\n \"self\": \"http://localhost:8080/confluence/rest/api/content/950276/history\"\n },\n \"createdBy\": {\n \"displayName\": \"A. D. Ministrator\",\n \"profilePicture\": {\n \"height\": 48,\n \"isDefault\": true,\n \"path\": \"/confluence/s/en_GB-1988229788/4960/NOCACHE1/_/images/icons/profilepics/default.png\",\n \"width\": 48\n },\n \"type\": \"known\",\n \"username\": \"admin\"\n },\n \"createdDate\": \"2014-03-07T17:08:20.326+1100\",\n \"latest\": true\n },\n \"id\": \"950276\",\n \"metadata\": {\n \"labels\": {\n \"_links\": {\n \"self\": \"http://localhost:8080/confluence/rest/api/content/950276/label\"\n },\n \"limit\": 200,\n \"results\": [],\n \"size\": 0,\n \"start\": 0\n },\n \"likesCount\": null\n },\n \"space\": {\n \"_links\": {\n \"self\": \"http://localhost:8080/confluence/rest/api/space/TST\"\n },\n \"id\": 786433,\n \"key\": \"TST\",\n \"name\": \"Test Space\"\n },\n \"title\": \"myPage Title\",\n \"type\": \"page\"\n }\n ],\n \"size\": 3,\n \"start\": 0\n}\n```\n\n## Create a new page\n\nThis example shows how you can create a new page with content in a specific space. \n\n``` bash\ncurl -u admin:admin -X POST -H 'Content-Type: application/json' -d '{\"type\":\"page\",\"title\":\"new page\",\n\"space\":{\"key\":\"TST\"},\"body\":{\"storage\":{\"value\":\"

This is
a new page

\",\"representation\":\n\"storage\"}}}' http://localhost:8080/confluence/rest/api/content/ | python -mjson.tool\n```\n\nExample result:\n\n``` javascript\n{\n \"_expandable\": {\n \"children\": \"/rest/api/content/3604482/child\",\n \"descendants\": \"/rest/api/content/3604482/descendant\",\n \"metadata\": \"\"\n },\n \"_links\": {\n \"base\": \"http://localhost:8080/confluence\",\n \"collection\": \"/rest/api/contents\",\n \"self\": \"http://localhost:8080/confluence/rest/api/content/3604482\",\n \"tinyui\": \"/x/AgA3\",\n \"webui\": \"/display/TST/new+page\"\n },\n \"ancestors\": [],\n \"body\": {\n \"editor\": {\n \"_expandable\": {\n \"content\": \"/rest/api/content/3604482\"\n },\n \"representation\": \"editor\"\n },\n \"export_view\": {\n \"_expandable\": {\n \"content\": \"/rest/api/content/3604482\"\n },\n \"representation\": \"export_view\"\n },\n \"storage\": {\n \"_expandable\": {\n \"content\": \"/rest/api/content/3604482\"\n },\n \"representation\": \"storage\",\n \"value\": \"

This is a new page

\"\n },\n \"view\": {\n \"_expandable\": {\n \"content\": \"/rest/api/content/3604482\"\n },\n \"representation\": \"view\"\n }\n },\n \"container\": {\n \"_links\": {\n \"self\": \"http://localhost:8080/confluence/rest/api/space/TST\"\n },\n \"id\": 2719747,\n \"key\": \"TST\",\n \"name\": \"Test Space\"\n },\n \"history\": {\n \"_expandable\": {\n \"lastUpdated\": \"\"\n },\n \"_links\": {\n \"self\": \"http://localhost:8080/confluence/rest/api/content/3604482/history\"\n },\n \"createdBy\": {\n \"displayName\": \"A. D. Ministrator\",\n \"profilePicture\": {\n \"height\": 48,\n \"isDefault\": true,\n \"path\": \"/confluence/s/en_GB-1988229788/4960/NOCACHE1/_/images/icons/profilepics/default.png\",\n \"width\": 48\n },\n \"type\": \"known\",\n \"username\": \"admin\"\n },\n \"createdDate\": \"2014-03-10T23:14:35.031+1100\",\n \"latest\": true\n },\n \"id\": \"3604482\",\n \"space\": {\n \"_links\": {\n \"self\": \"http://localhost:8080/confluence/rest/api/space/TST\"\n },\n \"id\": 2719747,\n \"key\": \"TST\",\n \"name\": \"Test Space\"\n },\n \"title\": \"new page\",\n \"type\": \"page\",\n \"version\": {\n \"by\": {\n \"displayName\": \"A. D. Ministrator\",\n \"profilePicture\": {\n \"height\": 48,\n \"isDefault\": true,\n \"path\": \"/confluence/s/en_GB-1988229788/4960/NOCACHE1/_/images/icons/profilepics/default.png\",\n \"width\": 48\n },\n \"type\": \"known\",\n \"username\": \"admin\"\n },\n \"message\": \"\",\n \"minorEdit\": false,\n \"number\": 1,\n \"when\": \"2014-03-10T23:14:35.031+1100\"\n }\n}\n```\n\n## Create a new page (jQuery)\n\n``` javascript\n//This creates a page in a space.\nvar username = \"admin\";\nvar password = \"admin\";\nvar jsondata = {\"type\":\"page\",\n \"title\":\"My Test Page\",\n \"space\":{\"key\":\"TST\"},\n \"body\":{\"storage\":{\"value\":\"

This is a new page

\",\"representation\":\"storage\"}}};\n\n$.ajax\n ({\n type: \"POST\",\n url: \"http://localhost:8080/confluence/rest/api/content/\",\n contentType:\"application/json; charset=utf-8\",\n dataType: \"json\",\n async: false,\n headers: {\n \"Authorization\": \"Basic \" + btoa(username+ \":\" + password)\n },\n data: JSON.stringify(jsondata),\n success: function (){\n console.log('Page saved!');\n },\n error : function(xhr, errorText){\n console.log('Error '+ xhr.responseText);\n }\n});\n```\n\n## Create a new page as a child of another page\n\nThis example shows how you can create a new page, with content, as a child of another page with ID 456\n\n``` bash\ncurl -u admin:admin -X POST -H 'Content-Type: application/json' -d '{\"type\":\"page\",\"title\":\"new page\",\n\"ancestors\":[{\"id\":456}], \"space\":{\"key\":\"TST\"},\"body\":{\"storage\":{\"value\":\n\"

This is a new page

\",\"representation\":\"storage\"}}}'\nhttp://localhost:8080/confluence/rest/api/content/ | python -mjson.tool\n```\n\n## Update a page\n\nThis example shows how you can update the content of an existing page. \n\n``` bash\ncurl -u admin:admin -X PUT -H 'Content-Type: application/json' -d '{\"id\":\"3604482\",\"type\":\"page\",\n\"title\":\"new page\",\"space\":{\"key\":\"TST\"},\"body\":{\"storage\":{\"value\":\n\"

This is the updated text for the new page

\",\"representation\":\"storage\"}},\n\"version\":{\"number\":2}}' http://localhost:8080/confluence/rest/api/content/3604482 | python -mjson.tool\n```\n\nExample result:\n\n``` javascript\n{\n \"_expandable\": {\n \"children\": \"/rest/api/content/3604482/child\",\n \"descendants\": \"/rest/api/content/3604482/descendant\",\n \"metadata\": \"\"\n },\n \"_links\": {\n \"base\": \"http://localhost:8080/confluence\",\n \"collection\": \"/rest/api/contents\",\n \"self\": \"http://localhost:8080/confluence/rest/api/content/3604482\",\n \"tinyui\": \"/x/AgA3\",\n \"webui\": \"/display/TST/new+page\"\n },\n \"ancestors\": [],\n \"body\": {\n \"editor\": {\n \"_expandable\": {\n \"content\": \"/rest/api/content/3604482\"\n },\n \"representation\": \"editor\"\n },\n \"export_view\": {\n \"_expandable\": {\n \"content\": \"/rest/api/content/3604482\"\n },\n \"representation\": \"export_view\"\n },\n \"storage\": {\n \"_expandable\": {\n \"content\": \"/rest/api/content/3604482\"\n },\n \"representation\": \"storage\",\n \"value\": \"

This is the updated text for the new page

\"\n },\n \"view\": {\n \"_expandable\": {\n \"content\": \"/rest/api/content/3604482\"\n },\n \"representation\": \"view\"\n }\n },\n \"container\": {\n \"_links\": {\n \"self\": \"http://localhost:8080/confluence/rest/api/space/TST\"\n },\n \"id\": 2719747,\n \"key\": \"TST\",\n \"name\": \"Test Space\"\n },\n \"history\": {\n \"_expandable\": {\n \"lastUpdated\": \"\",\n \"previousVersion\": \"\"\n },\n \"_links\": {\n \"self\": \"http://localhost:8080/confluence/rest/api/content/3604482/history\"\n },\n \"createdBy\": {\n \"displayName\": \"A. D. Ministrator\",\n \"profilePicture\": {\n \"height\": 48,\n \"isDefault\": true,\n \"path\": \"/confluence/s/en_GB-1988229788/4960/NOCACHE1/_/images/icons/profilepics/default.png\",\n \"width\": 48\n },\n \"type\": \"known\",\n \"username\": \"admin\"\n },\n \"createdDate\": \"2014-03-10T23:14:35.031+1100\",\n \"latest\": true\n },\n \"id\": \"3604482\",\n \"space\": {\n \"_links\": {\n \"self\": \"http://localhost:8080/confluence/rest/api/space/TST\"\n },\n \"id\": 2719747,\n \"key\": \"TST\",\n \"name\": \"Test Space\"\n },\n \"title\": \"new page\",\n \"type\": \"page\",\n \"version\": {\n \"by\": {\n \"displayName\": \"A. D. Ministrator\",\n \"profilePicture\": {\n \"height\": 48,\n \"isDefault\": true,\n \"path\": \"/confluence/s/en_GB-1988229788/4960/NOCACHE1/_/images/icons/profilepics/default.png\",\n \"width\": 48\n },\n \"type\": \"known\",\n \"username\": \"admin\"\n },\n \"minorEdit\": false,\n \"number\": 2,\n \"when\": \"2014-03-10T23:16:50.757+1100\"\n }\n}\n```\n\n## Delete a page\n\nThis example shows how you can delete a page by content ID.\n\n``` bash\ncurl -v -S -u admin:admin -X DELETE http://localhost:8080/confluence/rest/api/content/3604482 | python -mjson.tool\n```\n\nExpect a `HTTP/1.1 204 No Content` response after a successful deletion.\n\n## Upload an attachment\n\nThis example shows how you can upload an attachment to a specific page (where `3604482` is the content ID), and add a comment.\n\n``` bash\ncurl -v -S -u admin:admin -X POST -H \"X-Atlassian-Token: no-check\" -F \"file=@myfile.txt\" -F\n\"comment=this is my file\" \"http://localhost:8080/confluence/rest/api/content/3604482/child/attachment\"\n| python -mjson.tool\n```\n\n``` javascript\n{\n \"_expandable\": {\n \"icon\": \"\"\n },\n \"_links\": {\n \"base\": \"http://localhost:8080/confluence\",\n \"collection\": \"/rest/api/space\",\n \"context\": \"/confluence\",\n \"self\": \"http://localhost:8080/confluence/rest/api/space/RAID4\"\n },\n \"description\": {\n \"_expandable\": {\n \"view\": \"\"\n },\n \"plain\": {\n \"representation\": \"plain\",\n \"value\": \"Raider Space for raiders\"\n }\n },\n \"homepage\": {\n \"_expandable\": {\n \"ancestors\": \"\",\n \"body\": \"\",\n \"children\": \"/rest/api/content/3997704/child\",\n \"container\": \"\",\n \"descendants\": \"/rest/api/content/3997704/descendant\",\n \"history\": \"/rest/api/content/3997704/history\",\n \"metadata\": \"\",\n \"space\": \"/rest/api/space/RAID4\",\n \"version\": \"\"\n },\n \"_links\": {\n \"self\": \"http://localhost:8080/confluence/rest/api/content/3997704\",\n \"tinyui\": \"/x/CAA9\",\n \"webui\": \"/display/RAID4/Raider+Home\"\n },\n \"id\": \"3997704\",\n \"title\": \"Raider Home\",\n \"type\": \"page\"\n },\n \"id\": 4030468,\n \"key\": \"RAID\",\n \"name\": \"Raider\",\n \"type\": \"global\"\n}\n```\n\n## Download an attachment\n\nThis example shows how you can download an attachment from a specific page (where `1998856` is the content ID).\n\n``` bash\ncurl -u admin:admin \"http://localhost:8080/confluence/rest/api/content/1998856/child/attachment\" | python -m json.tool\n```\n\nThe download link is inside output:\n\n``` javascript\n\"_links\": {\n \"download\": \"/download/attachments/1998856/test.txt?version=1&modificationDate=1519985997040&api=v2\",\n \"self\": \"http://localhost:8080/confluence/rest/api/content/att1998865\",\n \"webui\":\"/display/dsada/new4+page?preview=%2F1998856%2F1998865%2Ftest.txt\"\n}\n```\n\n## Get comments from a page\n\n``` bash\ncurl -u admin:admin \"http://localhost:8080/confluence/rest/api/content/1998856/child/comment?expand=body.view&depth=all\" | python -m json.tool\n```\n\n``` javascript\n{\n \"_links\": {\n \"base\": \"http://localhost:8080/confluence\",\n \"context\": \"/confluence\",\n \"self\": \"http://localhost:8080/confluence/rest/api/content/1998856/child/comment?expand=body.view\"\n },\n \"limit\": 25,\n \"results\": [\n {\n \"_expandable\": {\n \"ancestors\": \"\",\n \"children\": \"/rest/api/content/1998866/child\",\n \"container\": \"/rest/api/content/1998856\",\n \"descendants\": \"/rest/api/content/1998866/descendant\",\n \"history\": \"/rest/api/content/1998866/history\",\n \"metadata\": \"\",\n \"operations\": \"\",\n \"restrictions\": \"/rest/api/content/1998866/restriction/byOperation\",\n \"space\": \"/rest/api/space/dsada\",\n \"version\": \"\"\n },\n \"_links\": {\n \"self\": \"http://localhost:8080/confluence/rest/api/content/1998866\",\n \"webui\": \"/display/dsada/new4+page?focusedCommentId=1998866#comment-1998866\"\n },\n \"body\": {\n \"_expandable\": {\n \"anonymous_export_view\": \"\",\n \"editor\": \"\",\n \"export_view\": \"\",\n \"storage\": \"\",\n \"styled_view\": \"\"\n },\n \"view\": {\n \"_expandable\": {\n \"content\": \"/rest/api/content/1998866\",\n \"webresource\": \"\"\n },\n \"representation\": \"storage\",\n \"value\": \"

I am a comment

\"\n }\n },\n \"extensions\": {\n \"_expandable\": {\n \"resolution\": \"\"\n },\n \"location\": \"footer\"\n },\n \"id\": \"1998866\",\n \"status\": \"current\",\n \"title\": \"Re: new4 page\",\n \"type\": \"comment\"\n }\n ],\n \"size\": 1,\n \"start\": 0\n}\n```\n\n## Add a comment to a page (Python)\n\nThis Python example shows how you can add a comment to a page. First, the page for commenting is fetched from API by title, and then used as the container of the comment.\n\n**comment.py**\n\n``` py\nimport requests, json\ndef printResponse(r):\n print '{} {}\\n'.format(json.dumps(r.json(), sort_keys=True, indent=4, separators=(',', ': ')), r)\nr = requests.get('http://localhost:8080/confluence/rest/api/content',\n params={'title' : 'Page title to comment on'},\n auth=('admin', 'admin'))\nprintResponse(r)\nparentPage = r.json()['results'][0]\npageData = {'type':'comment', 'container':parentPage,\n 'body':{'storage':{'value':\"

A new comment

\",'representation':'storage'}}}\nr = requests.post('http://localhost:8080/confluence/rest/api/content',\n data=json.dumps(pageData),\n auth=('admin','admin'),\n headers=({'Content-Type':'application/json'}))\nprintResponse(r)\n```\n\n## Create a page with a task \n\nThis examples is similar to creating a page but you need to use the following JSON body, see [Confluence Storage Format](https://confluence.atlassian.com/display/DOC/Confluence+Storage+Format) documenation for other storage format markup that you can use.\n\n``` javascript\nPOST /rest/api/content :\n\n{\n \"type\":\"page\",\n \"title\":\"Another planning specs with username\",\n \"body\":{ \"storage\":{\"value\":\n \"\n \n incomplete\n \n \n do something\n \n \n \",\n \"representation\":\"storage\"}},\n \"space\":{\"key\":\"TST\"}\n}\n```\n\n## Create a space\n\nThis example shows how you can create a new space.\n\n``` bash\ncurl -u admin:admin -X POST -H 'Content-Type: application/json' -d' { \"key\":\"RAID\", \"name\":\"Raider\",\n\"type\":\"global\", \"description\":{\"plain\": { \"value\": \"Raider Space for raiders\",\"representation\":\n\"plain\" }}}' http://localhost:8080/confluence/rest/api/space\n```\n\n## Converting content\n\n### Convert storage format to view format\n\nThis example shows how to convert storage format to view format.\n\n``` bash\ncurl -u admin:admin -X POST -H 'Content-Type: application/json' -d'{\"value\":\"\",\"representation\":\"storage\"}'\n\"http://localhost:8080/confluence/rest/api/contentbody/convert/view\" | python -mjson.tool\n```\n\nExample result:\n\n``` javascript\n{\n \"_links\": {\n \"base\": \"http://localhost:8080/confluence\"\n },\n \"representation\": \"view\",\n \"value\": \"I like cheese!\"\n}\n```\n\n### Convert wiki markup to storage format\n\nThis example shows how to convert wiki markup to storage format.\n\n``` bash\ncurl -u admin:admin -X POST -H 'Content-Type: application/json' -d'{\"value\":\"{cheese}\",\n\"representation\":\"wiki\"}' \"http://localhost:8080/confluence/rest/api/contentbody/convert/storage\"\n| python -mjson.tool\n```\n\nExample result:\n\n``` javascript\n{\n \"_links\": {\n \"base\": \"http://localhost:8080/confluence\"\n },\n \"representation\": \"storage\",\n \"value\": \"\"\n}\n```\n\n### Convert storage format to view using a particular page for the conversion context\n\nThis example also shows how to convert storage format to view format, but this time using an existing piece of content for the conversion context. Some macros require a page context when they are executed. I'm using the space attachments macro. To determine what attachments to show on the page, this macro uses the space that the page is in.\n\n``` bash\ncurl -u admin:admin -X POST -H 'Content-Type: application/json' -d'{\"representation\":\"storage\",\n\"value\":\"

\",\"content\":{\"id\":\"1448805348\"}}'\n\"http://localhost:8080/confluence/rest/api/contentbody/convert/view\" | python -mjson.tool\n```\n"},{"title":"Content properties in the REST API","anchor":"content-properties-in-the-rest-api","body":"---\naliases:\n- /server/confluence/content-properties-in-the-rest-api-32243810.html\n- /server/confluence/content-properties-in-the-rest-api-32243810.md\ncategory: reference\nconfluence_id: 32243810\ndac_edit_link: https://developer.atlassian.com/pages/editpage.action?cjm=wozere&pageId=32243810\ndac_view_link: https://developer.atlassian.com/pages/viewpage.action?cjm=wozere&pageId=32243810\ndate: '2021-10-07'\nlegacy_title: Content Properties in the REST API\nplatform: server\nproduct: confluence\nsubcategory: api\ntitle: Content properties in the REST API\n---\n# Content properties in the REST API\n\n## What are content properties?\n\nContent properties are a form of key-value storage, where the key is associated with a piece of Confluence Content.\nContent properties are one of the forms of persistence available to you as an add-on developer. Content properties allow\nto store up to 32 KB of JSON with each piece of content (for example, a page, blog post, or attachment), so,\nyou do not have to use your own data store.\nIf you need to store metadata, for example, about a piece (or pieces) of content, content property is a great way to do it.\n\nContent properties are accessible both by Java and REST APIs.\n\n## Query content properties with CQL\n\nYou can use CQL to query content properties in your Confluence instance. For example,\na plugin can store the number of likes on a page in a content property. You can create an index schema module for that property,\nand then you can query the values to see how many pieces of content have more than 20 likes.\n\n## GET, POST, and DELETE content properties\n\n**GET content properties**\n\nTo retrieve any existing content properties for a piece of content, perform a **GET** on the\nendpoint `/rest/api/content/{content_ID}/property`.\n\n``` bash\n# Retrieves content properties associated with a piece of content with ID 12345\ncurl -u admin:admin -X GET \"http://localhost:8080/confluence/rest/api/content/12345/property\" | python -mjson.tool\n```\n\n**POST new content properties**\n\nTo add content properties to a piece of Confluence content, perform a **POST** to the same endpoint. The key in your\ncontent property can be an arbitrary string (like \"myprop\"), whereas the value must be a structured JSON.\n\n``` bash\n# Stores a JSON document under the key \"myprop\" against content with ID 12345\ncurl -i -u admin:admin -X POST -H \"Content-Type: application/json\" \\\n-d '{ \"key\" : \"myprop\", \"value\" : \n{\n \"id\": \"507f1f77bcf86cd799439011\",\n \"editDate\": \"2000-01-01T11:00:00.000+11:00\",\n \"description\": \"If you have any questions please address them to admin@example.com\",\n \"content\": {\n \"likes\": 5,\n \"tags\": [\"cql\", \"confluence\"]\n }\n}\n }' http://localhost:8080/confluence/rest/api/content/12345/property\n```\n\n**DELETE content properties**\n\nIf you need to delete content properties, you can perform a **DELETE** on the\nendpoint.\n\n``` bash\n# Removes JSON document associated with key \"myprop from content with ID 12345\ncurl -i -u admin:admin -X DELETE \"http://localhost:8080/confluence/rest/api/content/12345/property/myprop\"\n```\n\n## Fetch content properties as an expansion when retrieving content\n\nContent properties are available as an expansion on the content resource. This allows content properties to be\nretrieved in the same REST call as fetching the content itself. This expansion is available from any resource that\nreturns content, including the [CQL search resource](/server/confluence/advanced-searching-using-cql).\n\n**GET content properties as an expansion on content.**\n\n``` bash\n# fetch properties at the same time as fetching content, note the expand=metadata.properties.myprop\ncurl -u admin:admin -X GET \n \"http://localhost:8080/confluence/rest/api/content/12345?expand=metadata.properties.myprop\" | python -mjson.tool\n{  \n id: \"12345\",\n type: \"page\",\n status: \"current\",\n title: \"New in the platform team? Read me first\",\n metadata: {\n _expandable: {\n currentuser: \"\",\n labels: \"\",\n properties: {\n myprop: {\n \"id\": \"507f1f77bcf86cd799439011\",\n \"editDate\": \"2000-01-01T11:00:00.000+11:00\",\n \"description\": \"If you have any questions please address them to admin@example.com\",\n \"content\": {\n \"likes\": 5,\n \"tags\": [\"cql\", \"confluence\"]\n }\n }\n }\n }\n }\n}\n```\n\n## CQL search extension\n\nTo allow searching of content properties using CQL, you can enable indexing of data stored as content properties by\ndefining an index schema. You can define an exclusive index schema for each content property key; then, whenever a\ncontent property is saved, Confluence checks if a schema is defined for its key. If a schema exists, indexable values\nare extracted from content property values and stored in an index. There can only be one index schema definition for\na content property key, so any duplicates are disabled. In the case of offending keys, an appropriate log message is available.\n\n### Index schema definition\n\nWhen defining an index schema for content properties, you need to provide a set of extraction expressions and field\ntype pairs, which are used to retrieve a specific value from a JSON document and transform it into the desired representation.\nSupported index field types are: `string`, `text`, `number`, and `date`.\n\nFor an example, see the JSON document and its index schema later on this page.\n\n*Example of content property value.*\n\n``` javascript\n{\n \"id\": \"507f1f77bcf86cd799439011\",\n \"editDate\": \"2000-01-01T11:00:00.000+11:00\",\n \"description\": \"If you have any questions please address them to admin@example.com\",\n \"content\": {\n \"likes\": 5,\n \"tags\": [\"cql\", \"confluence\"]\n }\n}\n```\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
Extraction definition for a P2 pluginExtracted value
<extract path="id" type="string" />"507f1f77bcf86cd799439011"
<extract path="editDate" type="date" />1st of Jan 2000 00:00:00.000 UTC
<extract path="content.tags" type="string" />An array containing "cql", "confluence"
<extract path="content.likes" type="number" />5
\n\nTo access an embedded field in a document, use dot notation as shown in the following example. After successful validation,\nall extracted values are stored inside an index, and you can address them in CQL queries.\n\nPutting it all together, here's a sample index schema definition:\n\n`atlassian-plugin.xml`\n\n*Example of P2 add-on index schema definition*\n\n``` xml\n\n \n \n \n \n \n \n \n \n \n\n```\n\nField type doesn't only specify how data is stored in the index, but also determines which CQL operators are available in your query.\n\n#### Supported index field types\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
TypeDescriptionSupported CQL operators
stringEntire extracted value will be indexed as a single token, without any filtering. When extraction expression evaluates to a JSON array, each element will be indexed separately. Enables searching for an exact value, e.g. unique identifier.IN, NOT IN, =, !=
textExtracted value will be tokenized before indexing, allowing searching for a particular words.~, !~
numberExtracted number will be indexed as a double value for efficient range filtering.\n<, <=, =, !=, >, >=\n
dateTwo representation are possible, either a String following the ISO 8601 datetime format, or a long value in the Unix time. Enables efficient range filtering.\n<, <=, =, !=, >, >=\n
\n\nYou can't currently sort by these fields. See [CONFSERVER-58077](https://jira.atlassian.com/browse/).\n\n### Querying with CQL\n\nYou can address indexed content properties in a CQL query using the `content.property` field handler.\nAny content that contains content properties matching the query is returned in the results.\n\nThe query syntax is as follows: `content.property[]. value`.\n\n*Examples of CQL queries on content properties.*\n\n``` sql\ncontent.property[attachments].editDate >= 2001-01-01\ncontent.property[attachments].description ~ \"questions\"\ncontent.property[metadata].content.tags IN (\"cql\", \"help\")\ncontent.property[metadata].content.likes <= 5\n```\n\nNote the dot notation when referencing embedded fields like 'content.likes'.\n\n**Legend**\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
SymbolMeaning
KEYThe key of the content properties you search.
PATHThe path to the value you'd like to search in the JSON document (use dot notation for embedded fields).
OPERATOROne of the supported CQL operators for the field type.
\n\n## Custom content and search body property module descriptors\n\nContent properties which are attached to custom content can also be indexed in the content body field by defining search body property module descriptors \nwhich make reference to the custom content type and content property key. This makes custom content searchable by content \nproperties via the [CQL 'text' field](/server/confluence/cql-field-reference/#text) and also the quick-nav search bar.\n\nFor the following examples assume we have two custom content types `com.company.product.plugins.pluginName:customType` and `myCustomType` with\ndefined content with IDs `123456789` and `987654321` respectively.\n\n*Examples of search body property definitions in `atlassian-plugin.xml`*\n\n``` xml\n\n\n```\n\n`content-type` refers to the custom content type.
\n`content-property` refers to the content property key to extract the value to be added to the content body field.\n\n*Examples of corresponding content properties POST requests for custom content*\n\n``` bash\n# Stores a JSON document under the key \"myprop\" against content with ID 12345\ncurl -i -u admin:admin -X POST -H \"Content-Type: application/json\" \\\n-d '{ \"key\" : \"attachments\", \"value\" : \n \"This text will be added to the content body field\"\n }' http://localhost:8080/confluence/rest/api/content/123456789/property\n```\n\n``` bash\n# Stores a JSON document under the key \"myprop\" against content with ID 12345\ncurl -i -u admin:admin -X POST -H \"Content-Type: application/json\" \\\n-d '{ \"key\" : \"metadata\", \"value\" : \n{\n \"description\": \"The whole json value be added to the content body field\",\n \"content\": {\n \"likes\": 5,\n \"tags\": [\"cql\", \"confluence\"]\n }\n}\n }' http://localhost:8080/confluence/rest/api/content/987654321/property\n```\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
Custom content typeContent idWhat is added to content body field
com.company.product.plugins.pluginName:customType123456789\"This text will be added to the content body field\"
myCustomType987654321\"{\n \"description\": \"The whole json value be added to the content body field\",\n \"content\": {\n \"likes\": 5,\n \"tags\": [\"cql\", \"confluence\"]\n }\n}\"
\n\n### Can I use JSON expressions to specify a path?\n\nJSON expressions and extractions that are available when using the index schema are not available as part of the search body property descriptors. \nIn the second content properties example above, the JSON inside the value field will be converted into text and \nstored in the content body field, even the JSON field names \"description\" and \"content\" will be used in indexing for search.\n\n## Read also\n\n* [Custom actions with the blueprint API.](/server/confluence/custom-actions-with-the-blueprint-api/)\n* [Expansions in the REST API.](/server/confluence/expansions-in-the-rest-api/)\n* [Pagination in the REST API.](/server/confluence/pagination-in-the-rest-api/)\n"},{"title":"Custom actions with the blueprint API","anchor":"custom-actions-with-the-blueprint-api","body":"---\naliases:\n- /server/confluence/custom-actions-with-the-blueprint-api-22020367.html\n- /server/confluence/custom-actions-with-the-blueprint-api-22020367.md\ncategory: reference\nconfluence_id: 22020367\ndac_edit_link: https://developer.atlassian.com/pages/editpage.action?cjm=wozere&pageId=22020367\ndac_view_link: https://developer.atlassian.com/pages/viewpage.action?cjm=wozere&pageId=22020367\ndate: '2018-04-09'\nlegacy_title: Custom actions with the Blueprint API\nplatform: server\nproduct: confluence\nsubcategory: api\ntitle: Custom actions with the Blueprint API\n---\n# Custom actions with the blueprint API\n\nThe `confluence-create-content-plugin` provides an  `AbstractCreateBlueprintPageAction`  that you can extend to add custom behavior.\nTo use this module, make sure your `pom.xml` includes the following dependency:\n\n``` xml\n\n com.atlassian.confluence.plugins\n confluence-create-content-plugin\n ${create-content.version}\n provided\n \n```\n\nThe `AbstractCreateBlueprintPageAction` provides a couple of useful methods for working with blueprints:\n\n* `populateBlueprintPage` loads the blueprint content template and generates a blueprint page from the template and the context.\n* `getOrCreateIndexPage` gets the index page for the blueprint or creates one if it doesn't exist, and pins it to the sidebar.\n\nFor more details on how to write and link an action in Confluence, see [Struts module](/server/confluence/struts-module).\n\n
\n
\nYou cannot, at this stage, use custom names for your Struts actions that render the editor. You must use `createpage` and `docreatepage`.\nUsing anything else prevents the buttons on the bottom left of the Confluence editor from displaying.\n
\n\n\n
\n
\n\n**Deprecation Warning:**\n\nThe `AbstractCreateBlueprintPageAction` is no longer used internally and is slated for removal in a future release.\nPlease let us know via the feedback form if your plugin currently extends this action, or if you plan to extend it.\n\n
\n\n\n## BlueprintManager interface\n\nIf you need to interact with the blueprints API at a low level, you can use `BlueprintManager` ([see how to retrieve it](/server/confluence/how-do-i-get-a-reference-to-a-component)).\nIt gives access to the following method.\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
Method 
createAndPinIndexPage

Creates an index page if required for this blueprint, and pins it to the Space Sidebar.

\n\n## UserBlueprintConfigManager\n\nIf you need to interact with the blueprint configuration, you can use `UserBlueprintConfigManager` ([see how to retrieve it](/server/confluence/how-do-i-get-a-reference-to-a-component)).\nIt gives an access to the following method.\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
Method 
setBlueprintCreatedByUser

Flags that a Blueprint of a certain type has been created by a given user

\n\n## BlueprintContentGenerator interface\n\nIf you need to interact with the blueprint API at a low level, you can also use `BlueprintContentGenerator` ([see how to retrieve it](/server/confluence/how-do-i-get-a-reference-to-a-component))\nto get access to the render context. It gives an access to following methods.\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
Component KeyMethods
createIndexPageObject

Creates an index page object given a plugin template and a render context.

generateBlueprintPageObject

Creates an unsaved content page object for a create-Blueprint-page request.

\n"},{"title":"Expansions in the REST API","anchor":"expansions-in-the-rest-api","body":"---\naliases:\n- /server/confluence/expansions-in-the-rest-api-31517427.html\n- /server/confluence/expansions-in-the-rest-api-31517427.md\ncategory: reference\nconfluence_id: 31517427\ndac_edit_link: https://developer.atlassian.com/pages/editpage.action?cjm=wozere&pageId=31517427\ndac_view_link: https://developer.atlassian.com/pages/viewpage.action?cjm=wozere&pageId=31517427\ndate: '2019-08-06'\nlegacy_title: Expansions in the REST API\nplatform: server\nproduct: confluence\nsubcategory: api\ntitle: Expansions in the REST API\n---\n# Expansions in the REST API\n\n
\n
\nThe examples on this page use `curl`, and the responses are piped into `python -mjson.tool`.\n
\n\n\nTo limit the number of calls to the API, and the size of the responses, Confluence REST API supports the expansion\nof certain elements. If your GET returns a list of results and you don't choose to expand anything, the response is short,\ndisplaying only a basic representation of the resource.\n\n
\n
\nThe response contains a list under the `_expandable` property; you can specify any of its values separated by commas. For instance, `expand=body,version,history`.\n\n
\n\n\nIf you GET a specific piece of content – like a page by page ID (for example, http://localhost:8080/confluence/rest/api/content/12345,\nwhere `12345` is the page ID) – Confluence expands some properties by default. For a specific page, it will expand the space,\nhistory, and version information, but you can explicitly request expansion of different properties in your call.\n\nIn this example, we send a GET to return a list of pages in the space with the space key 'TEST':\n\n``` bash\ncurl -u admin:admin -X GET \"http://localhost:8080/confluence/rest/api/content?type=page&spaceKey=TEST\" | python -mjson.tool\n```\n\n*Notice that only id, status, title, and type are expanded, but the `\\_expandable` block contains the properties that can be expanded.*\n\n``` javascript\n{\n \"_links\": {\n \"base\": \"http://localhost:8080/confluence\",\n \"context\": \"\",\n \"self\": \"http://localhost:8080/confluence/rest/api/content\"\n },\n \"limit\": 25,\n \"results\": [\n {\n \"_expandable\": {\n \"ancestors\": \"\",\n \"body\": \"\",\n \"children\": \"/rest/api/content/589828/child\",\n \"container\": \"\",\n \"descendants\": \"/rest/api/content/589828/descendant\",\n \"history\": \"/rest/api/content/589828/history\",\n \"metadata\": \"\",\n \"space\": \"/rest/api/space/TEST\",\n \"version\": \"\"\n },\n \"_links\": {\n \"self\": \"http://localhost:8080/confluence/rest/api/content/589828\",\n \"tinyui\": \"/x/BAAJ\",\n \"webui\": \"/display/TEST/Test+Space+Home\"\n },\n \"id\": \"589828\",\n \"status\": \"current\",\n \"title\": \"Test Space Home\",\n \"type\": \"page\"\n }\n ],\n \"size\": 1,\n \"start\": 0\n}\n```\n\nIn the previous example, even though there's only one piece of content returned, nothing is expanded by default because\nwe didn't request a *specific* piece of content. However, we get a list of expandable items.\n\n## Expand one or more items\n\nAs you know from the previous example, you can use the `expand` parameter to explicitly expand any or all of the following\nitems relating to the returned content item(s):\n\n* history\n* body\n* container\n* ancestors\n* children\n* descendants\n* space\n* version\n* metadata.\n\nRather than creating multiple calls to return the information you need, you can make one call and expand only the items you need.\n\nIf you need to expand more than one item, you can add them as a comma-separated list in the expand parameter. For example, if you need the `history` and `version` information for the resource(s), you can do the following:\n\n``` bash\ncurl -u admin:admin -X GET \"http://localhost:8080/confluence/rest/api/content?type=page&spaceKey=TEST&expand=history,version\" | python -mjson.tool\n```\n\n*Notice that version and history are expanded because we specify `expand=history,version` as a query parameter in the request.*\n\n``` javascript\n{\n \"_links\": {\n \"base\": \"http://localhost:8080/confluence\",\n \"context\": \"\",\n \"self\": \"http://localhost:8080/confluence/rest/api/content\"\n },\n \"limit\": 25,\n \"results\": [\n {\n \"_expandable\": {\n \"ancestors\": \"\",\n \"body\": \"\",\n \"children\": \"/rest/api/content/589828/child\",\n \"container\": \"\",\n \"descendants\": \"/rest/api/content/589828/descendant\",\n \"metadata\": \"\",\n \"space\": \"/rest/api/space/TEST\"\n },\n \"_links\": {\n \"self\": \"http://localhost:8080/confluence/rest/api/content/589828\",\n \"tinyui\": \"/x/BAAJ\",\n \"webui\": \"/display/TEST/Test+Space+Home\"\n },\n \"history\": {\n \"_expandable\": {\n \"lastUpdated\": \"\",\n \"nextVersion\": \"\",\n \"previousVersion\": \"\"\n },\n \"_links\": {\n \"self\": \"http://localhost:8080/confluence/rest/api/content/589828/history\"\n },\n \"createdBy\": {\n \"displayName\": \"Gil Admin\",\n \"profilePicture\": {\n \"height\": 48,\n \"isDefault\": true,\n \"path\": \"/s/en_GB/5723/dfa6f4056bde4993312ffa3cb0f626ca41e68821.1/_/images/icons/profilepics/default.png\",\n \"width\": 48\n },\n \"type\": \"known\",\n \"userKey\": \"2c968271494ecbb701494ecc80dd0002\",\n \"username\": \"admin\"\n },\n \"createdDate\": \"2014-10-27T11:57:01.915+1100\",\n \"latest\": true\n },\n \"id\": \"589828\",\n \"status\": \"current\",\n \"title\": \"Test Space Home\",\n \"type\": \"page\",\n \"version\": {\n \"by\": {\n \"displayName\": \"Gil Admin\",\n \"profilePicture\": {\n \"height\": 48,\n \"isDefault\": true,\n \"path\": \"/s/en_GB/5723/dfa6f4056bde4993312ffa3cb0f626ca41e68821.1/_/images/icons/profilepics/default.png\",\n \"width\": 48\n },\n \"type\": \"known\",\n \"userKey\": \"2c968271494ecbb701494ecc80dd0002\",\n \"username\": \"admin\"\n },\n \"minorEdit\": false,\n \"number\": 3,\n \"when\": \"2014-10-27T14:17:30.558+1100\"\n }\n }\n ],\n \"size\": 1,\n \"start\": 0\n}\n```\n\nThe response provides an expanded view of the page history and version information. Notice that\nthe expanded items can also contain nested items that can be further expanded. The `history` element also contains: \n`nextVersion`, `previousVersion`, and `lastUpdated`, which can all be expanded in the response.\n\n## Expand nested items\n\nApart from using a comma-separated list for expanding multiple elements, you can use dot-separated notation to expand nested elements.\n\nFor example, if you need only the `history` expanded, but you want to expand `lastUpdated`, call the following:\n\n``` bash\ncurl -u admin:admin -X GET \"http://localhost:8080/confluence/rest/api/content?type=page&spaceKey=TEST&expand=history.lastUpdated\" | python -mjson.tool\n```\n\n*Notice that the `history` object now includes the expanded `lastUpdated` object.*\n\n``` javascript\n{\n \"_links\": {\n \"base\": \"http://localhost:8080/confluence\",\n \"context\": \"\",\n \"self\": \"http://localhost:8080/confluence/rest/api/content\"\n },\n \"limit\": 25,\n \"results\": [\n {\n \"_expandable\": {\n \"ancestors\": \"\",\n \"body\": \"\",\n \"children\": \"/rest/api/content/589828/child\",\n \"container\": \"\",\n \"descendants\": \"/rest/api/content/589828/descendant\",\n \"metadata\": \"\",\n \"space\": \"/rest/api/space/TEST\",\n \"version\": \"\"\n },\n \"_links\": {\n \"self\": \"http://localhost:8080/confluence/rest/api/content/589828\",\n \"tinyui\": \"/x/BAAJ\",\n \"webui\": \"/display/TEST/Test+Space+Home\"\n },\n \"history\": {\n \"_expandable\": {\n \"nextVersion\": \"\",\n \"previousVersion\": \"\"\n },\n \"_links\": {\n \"self\": \"http://localhost:8080/confluence/rest/api/content/589828/history\"\n },\n \"createdBy\": {\n \"displayName\": \"Gil Admin\",\n \"profilePicture\": {\n \"height\": 48,\n \"isDefault\": true,\n \"path\": \"/s/en_GB/5723/dfa6f4056bde4993312ffa3cb0f626ca41e68821.1/_/images/icons/profilepics/default.png\",\n \"width\": 48\n },\n \"type\": \"known\",\n \"userKey\": \"2c968271494ecbb701494ecc80dd0002\",\n \"username\": \"admin\"\n },\n \"createdDate\": \"2014-10-27T11:57:01.915+1100\",\n \"lastUpdated\": {\n \"by\": {\n \"displayName\": \"Gil Admin\",\n \"profilePicture\": {\n \"height\": 48,\n \"isDefault\": true,\n \"path\": \"/s/en_GB/5723/dfa6f4056bde4993312ffa3cb0f626ca41e68821.1/_/images/icons/profilepics/default.png\",\n \"width\": 48\n },\n \"type\": \"known\",\n \"userKey\": \"2c968271494ecbb701494ecc80dd0002\",\n \"username\": \"admin\"\n },\n \"minorEdit\": false,\n \"number\": 3,\n \"when\": \"2014-10-27T14:17:30.558+1100\"\n },\n \"latest\": true\n },\n \"id\": \"589828\",\n \"status\": \"current\",\n \"title\": \"Test Space Home\",\n \"type\": \"page\"\n }\n ],\n \"size\": 1,\n \"start\": 0\n}\n```\n\n## Modify expanded elements\n\nAnother example is to expand the body of returned content in Confluence storage format (XHTML). If you GET the body in storage format,\nyou can then PUT changes to that information to update the content.\n\nWe'll also expand the version in this call because we'll need to increment the version number when we PUT our changes.\n\n``` bash\ncurl -u admin:admin -X GET \"http://localhost:8080/confluence/rest/api/content?type=page&spaceKey=TEST&expand=body.storage,version\" | python -mjson.tool\n```\n\n``` javascript\n{\n \"_links\": {\n \"base\": \"http://localhost:8080/confluence\",\n \"context\": \"\",\n \"self\": \"http://localhost:8080/confluence/rest/api/content\"\n },\n \"limit\": 20,\n \"results\": [\n {\n \"_expandable\": {\n \"ancestors\": \"\",\n \"children\": \"/rest/api/content/589828/child\",\n \"container\": \"\",\n \"descendants\": \"/rest/api/content/589828/descendant\",\n \"history\": \"/rest/api/content/589828/history\",\n \"metadata\": \"\",\n \"space\": \"/rest/api/space/TEST\"\n },\n \"_links\": {\n \"self\": \"http://localhost:8080/confluence/rest/api/content/589828\",\n \"tinyui\": \"/x/BAAJ\",\n \"webui\": \"/display/TEST/Test+Space+Home\"\n },\n \"body\": {\n \"_expandable\": {\n \"anonymous_export_view\": \"\",\n \"editor\": \"\",\n \"export_view\": \"\",\n \"view\": \"\"\n },\n \"storage\": {\n \"_expandable\": {\n \"content\": \"/rest/api/content/589828\"\n },\n \"representation\": \"storage\",\n \"value\": \"\\nWelcome to my new space!\\n

Confluence spaces are great for sharing content and news with your team. This is your home page. Right now it shows recent space activity, but you can customize this page in anyway you like.

\\n

Complete these tasks to get started

\\n\\n1\\nincomplete\\n\\n Edit this home page - Click Edit in the top right of this screen to customize your Space home page\\n \\n\\n\\n2\\nincomplete\\n\\n Create your first page - Click the Create button in the header to get started\\n \\n\\n\\n3\\nincomplete\\n\\n Brand your Space - Click Configure Sidebar in the left panel to update space details and logo\\n \\n\\n\\n4\\nincomplete\\n\\n Set permissions - Click Space Tools in the left sidebar to update permissions and give others access\\n \\n\\n\\n\\n

 

\\n

Recent space activity

\\n true5socialpage, comment, blogpost\\n

\\n

Space contributors

\\n 5descendantsupdatetruelist\\n

\\n

 

\"\n }\n },\n \"id\": \"589828\",\n \"status\": \"current\",\n \"title\": \"Test Space Home\",\n \"type\": \"page\",\n \"version\": {\n \"by\": {\n \"displayName\": \"Gil Admin\",\n \"profilePicture\": {\n \"height\": 48,\n \"isDefault\": true,\n \"path\": \"/s/en_GB/5723/dfa6f4056bde4993312ffa3cb0f626ca41e68821.1/_/images/icons/profilepics/default.png\",\n \"width\": 48\n },\n \"type\": \"known\",\n \"userKey\": \"2c968271494ecbb701494ecc80dd0002\",\n \"username\": \"admin\"\n },\n \"message\": \"\",\n \"minorEdit\": false,\n \"number\": 4,\n \"when\": \"2014-10-27T16:09:24.368+1100\"\n }\n }\n ],\n \"size\": 1,\n \"start\": 0\n}\n```\n\nYou can then PUT your changes as follows:\n\n``` bash\ncurl -u admin:admin -X PUT -H 'Content-Type: application/json' -d'{\"id\":\"589828\",\"type\":\"page\",\"title\":\"Test Space Home\",\"space\":{\"key\":\"TEST\"},\"body\":{\"storage\":{\"value\":\"

This is the newly updated text for my page

\",\"representation\":\"storage\"}},\"version\":{\"number\":5}}' http://localhost:8080/confluence/rest/api/content/589828 | python -mjson.tool\n```\n\n*Note that Confluence pages and blog posts are versioned, so you need to add the version number in your call.*\n\n``` javascript\n{\n \"_expandable\": {\n \"children\": \"/rest/api/content/589828/child\",\n \"descendants\": \"/rest/api/content/589828/descendant\",\n \"metadata\": \"\"\n },\n \"_links\": {\n \"base\": \"http://localhost:8080/confluence\",\n \"collection\": \"/rest/api/content\",\n \"context\": \"\",\n \"self\": \"http://localhost:8080/confluence/rest/api/content/589828\",\n \"tinyui\": \"/x/BAAJ\",\n \"webui\": \"/display/TEST/Test+Space+Home\"\n },\n \"ancestors\": [],\n \"body\": {\n \"_expandable\": {\n \"anonymous_export_view\": \"\",\n \"editor\": \"\",\n \"export_view\": \"\",\n \"view\": \"\"\n },\n \"storage\": {\n \"_expandable\": {\n \"content\": \"/rest/api/content/589828\"\n },\n \"representation\": \"storage\",\n \"value\": \"

This is the newly updated text for my page

\"\n }\n },\n \"container\": {\n \"_expandable\": {\n \"description\": \"\",\n \"homepage\": \"/rest/api/content/589828\",\n \"icon\": \"\"\n },\n \"_links\": {\n \"self\": \"http://localhost:8080/confluence/rest/api/space/TEST\"\n },\n \"id\": 753665,\n \"key\": \"TEST\",\n \"name\": \"Test Space\",\n \"type\": \"global\"\n },\n \"history\": {\n \"_expandable\": {\n \"lastUpdated\": \"\",\n \"nextVersion\": \"\",\n \"previousVersion\": \"\"\n },\n \"_links\": {\n \"self\": \"http://localhost:8080/confluence/rest/api/content/589828/history\"\n },\n \"createdBy\": {\n \"displayName\": \"Gil Admin\",\n \"profilePicture\": {\n \"height\": 48,\n \"isDefault\": true,\n \"path\": \"/s/en_GB/5723/dfa6f4056bde4993312ffa3cb0f626ca41e68821.1/_/images/icons/profilepics/default.png\",\n \"width\": 48\n },\n \"type\": \"known\",\n \"userKey\": \"2c968271494ecbb701494ecc80dd0002\",\n \"username\": \"admin\"\n },\n \"createdDate\": \"2014-10-27T11:57:01.915+1100\",\n \"latest\": true\n },\n \"id\": \"589828\",\n \"space\": {\n \"_expandable\": {\n \"description\": \"\",\n \"homepage\": \"/rest/api/content/589828\",\n \"icon\": \"\"\n },\n \"_links\": {\n \"self\": \"http://localhost:8080/confluence/rest/api/space/TEST\"\n },\n \"id\": 753665,\n \"key\": \"TEST\",\n \"name\": \"Test Space\",\n \"type\": \"global\"\n },\n \"status\": \"current\",\n \"title\": \"Test Space Home\",\n \"type\": \"page\",\n \"version\": {\n \"by\": {\n \"displayName\": \"Gil Admin\",\n \"profilePicture\": {\n \"height\": 48,\n \"isDefault\": true,\n \"path\": \"/s/en_GB/5723/dfa6f4056bde4993312ffa3cb0f626ca41e68821.1/_/images/icons/profilepics/default.png\",\n \"width\": 48\n },\n \"type\": \"known\",\n \"userKey\": \"2c968271494ecbb701494ecc80dd0002\",\n \"username\": \"admin\"\n },\n \"minorEdit\": false,\n \"number\": 5,\n \"when\": \"2014-10-27T16:09:24.368+1100\"\n }\n}\n```\n"},{"title":"Pagination in the REST API","anchor":"pagination-in-the-rest-api","body":"---\naliases:\n- /server/confluence/pagination-in-the-rest-api-31517431.html\n- /server/confluence/pagination-in-the-rest-api-31517431.md\ncategory: reference\nconfluence_id: 31517431\ndac_edit_link: https://developer.atlassian.com/pages/editpage.action?cjm=wozere&pageId=31517431\ndac_view_link: https://developer.atlassian.com/pages/viewpage.action?cjm=wozere&pageId=31517431\ndate: '2018-10-02'\nlegacy_title: Pagination in the REST API\nplatform: server\nproduct: confluence\nsubcategory: api\ntitle: Pagination in the REST API\n---\n# Pagination in the REST API\n\n
\n
\nThe examples on this page use `curl`, and the responses are piped into `python -mjson.tool`\n
\n\n\n## Why pagination?\n\nA lot of the time, when you're making calls to the Confluence REST API, there'll be a lot of results to return. For that reason, we paginate the results to make sure responses are easier to handle.\n\nLet's say your initial call is asking for all the pages in a Confluence instance; the result could be a massive response with hundreds of thousands of pages. That's not a good place to start.\n\nRather than that, we've built in a default limit on results, but we recommend you always explicitly set the `limit` parameter to ensure you know how many results per page you'll get. Don't rely on the defaults as they'll be different depending on what parts of the response you're expanding, so the response you get might not be what you expected.\n\n## Set the limit parameter\n\nFor example, you might need to request all pages in the Demonstration space (ds is the spaceKey) of your Confluence instance, but you only want the results 5 at a time. The endpoint we're going to hit here to specifically get the pages in that space is `/rest/api/space/{spaceKey}/content/{type}`, with the` type` being `page` (you could also use `blogpost`).\n\nYour GET would look something like this:\n\n``` bash\ncurl -u admin:admin -X GET \"http://localhost:8080/confluence/rest/api/space/ds/content/page?limit=5\" | python -mjson.tool\n```\n\nNote the `limit` parameter in this call is set to 5, so the response shows items 0 through 4.\n\n``` javascript\n{\n \"_links\": {\n \"base\": \"http://localhost:8080/confluence\",\n \"context\": \"\",\n \"next\": \"/rest/api/space/ds/content/page?limit=5&start=5\",\n \"self\": \"http://localhost:8080/confluence/rest/api/space/ds/content/page\"\n },\n \"limit\": 5,\n \"results\": [\n {\n \"_expandable\": {\n \"ancestors\": \"\",\n \"body\": \"\",\n \"children\": \"/rest/api/content/98308/child\",\n \"container\": \"\",\n \"descendants\": \"/rest/api/content/98308/descendant\",\n \"history\": \"/rest/api/content/98308/history\",\n \"metadata\": \"\",\n \"space\": \"/rest/api/space/ds\",\n \"version\": \"\"\n },\n \"_links\": {\n \"self\": \"http://localhost:8080/confluence/rest/api/content/98308\",\n \"tinyui\": \"/x/BIAB\",\n \"webui\": \"/pages/viewpage.action?pageId=98308\"\n },\n \"id\": \"98308\",\n \"status\": \"current\",\n \"title\": \"What is Confluence? (step 1 of 9)\",\n \"type\": \"page\"\n },\n {\n \"_expandable\": {\n \"ancestors\": \"\",\n \"body\": \"\",\n \"children\": \"/rest/api/content/98309/child\",\n \"container\": \"\",\n \"descendants\": \"/rest/api/content/98309/descendant\",\n \"history\": \"/rest/api/content/98309/history\",\n \"metadata\": \"\",\n \"space\": \"/rest/api/space/ds\",\n \"version\": \"\"\n },\n \"_links\": {\n \"self\": \"http://localhost:8080/confluence/rest/api/content/98309\",\n \"tinyui\": \"/x/BYAB\",\n \"webui\": \"/pages/viewpage.action?pageId=98309\"\n },\n \"id\": \"98309\",\n \"status\": \"current\",\n \"title\": \"A quick look at the editor (step 2 of 9)\",\n \"type\": \"page\"\n },\n {\n \"_expandable\": {\n \"ancestors\": \"\",\n \"body\": \"\",\n \"children\": \"/rest/api/content/98306/child\",\n \"container\": \"\",\n \"descendants\": \"/rest/api/content/98306/descendant\",\n \"history\": \"/rest/api/content/98306/history\",\n \"metadata\": \"\",\n \"space\": \"/rest/api/space/ds\",\n \"version\": \"\"\n },\n \"_links\": {\n \"self\": \"http://localhost:8080/confluence/rest/api/content/98306\",\n \"tinyui\": \"/x/AoAB\",\n \"webui\": \"/pages/viewpage.action?pageId=98306\"\n },\n \"id\": \"98306\",\n \"status\": \"current\",\n \"title\": \"Get serious with a table (step 5 of 9)\",\n \"type\": \"page\"\n },\n {\n \"_expandable\": {\n \"ancestors\": \"\",\n \"body\": \"\",\n \"children\": \"/rest/api/content/98307/child\",\n \"container\": \"\",\n \"descendants\": \"/rest/api/content/98307/descendant\",\n \"history\": \"/rest/api/content/98307/history\",\n \"metadata\": \"\",\n \"space\": \"/rest/api/space/ds\",\n \"version\": \"\"\n },\n \"_links\": {\n \"self\": \"http://localhost:8080/confluence/rest/api/content/98307\",\n \"tinyui\": \"/x/A4AB\",\n \"webui\": \"/display/ds/Welcome+to+Confluence\"\n },\n \"id\": \"98307\",\n \"status\": \"current\",\n \"title\": \"Welcome to Confluence\",\n \"type\": \"page\"\n },\n {\n \"_expandable\": {\n \"ancestors\": \"\",\n \"body\": \"\",\n \"children\": \"/rest/api/content/98305/child\",\n \"container\": \"\",\n \"descendants\": \"/rest/api/content/98305/descendant\",\n \"history\": \"/rest/api/content/98305/history\",\n \"metadata\": \"\",\n \"space\": \"/rest/api/space/ds\",\n \"version\": \"\"\n },\n \"_links\": {\n \"self\": \"http://localhost:8080/confluence/rest/api/content/98305\",\n \"tinyui\": \"/x/AYAB\",\n \"webui\": \"/pages/viewpage.action?pageId=98305\"\n },\n \"id\": \"98305\",\n \"status\": \"current\",\n \"title\": \"Share your page with a team member (step 9 of 9)\",\n \"type\": \"page\"\n }\n ],\n \"size\": 5,\n \"start\": 0\n}\n```\n\nIn the above response, line 5 shows the link for the `next` page of results (`/rest/api/space/ds/content/page?limit=5&start=5`). Note there's no `previous` link in the response, meaning there's no results before this page.\n\n## GET the next page of results\n\nYou can then make a call to return the next page. The `start` parameter in the `next` link is 5, so the next page of results will show items 5 through 9.\n\nThe call will be as follows:\n\n``` bash\ncurl -u admin:admin -X GET \"http://localhost:8080/confluence/rest/api/space/ds/content/page?limit=5&start=5\" | python -mjson.tool\n```\n\nWhich will deliver the next set of results, this time with links for the `next` and `previous` pages.\n\n
\n
\nYou could use these `next` and `previous` links to submit calls via next and previous buttons in a UI, for example.\n
\n\n\n``` javascript\n{\n \"_links\": {\n \"base\": \"http://localhost:8080/confluence\",\n \"context\": \"\",\n \"next\": \"/rest/api/space/ds/content/page?limit=5&start=10\",\n \"prev\": \"/rest/api/space/ds/content/page?limit=5&start=0\",\n \"self\": \"http://localhost:8080/confluence/rest/api/space/ds/content/page\"\n },\n \"limit\": 5,\n \"results\": [\n {\n \"_expandable\": {\n \"ancestors\": \"\",\n \"body\": \"\",\n \"children\": \"/rest/api/content/98314/child\",\n \"container\": \"\",\n \"descendants\": \"/rest/api/content/98314/descendant\",\n \"history\": \"/rest/api/content/98314/history\",\n \"metadata\": \"\",\n \"space\": \"/rest/api/space/ds\",\n \"version\": \"\"\n },\n \"_links\": {\n \"self\": \"http://localhost:8080/confluence/rest/api/content/98314\",\n \"tinyui\": \"/x/CoAB\",\n \"webui\": \"/pages/viewpage.action?pageId=98314\"\n },\n \"id\": \"98314\",\n \"status\": \"current\",\n \"title\": \"Let's edit this page (step 3 of 9)\",\n \"type\": \"page\"\n },\n {\n \"_expandable\": {\n \"ancestors\": \"\",\n \"body\": \"\",\n \"children\": \"/rest/api/content/98313/child\",\n \"container\": \"\",\n \"descendants\": \"/rest/api/content/98313/descendant\",\n \"history\": \"/rest/api/content/98313/history\",\n \"metadata\": \"\",\n \"space\": \"/rest/api/space/ds\",\n \"version\": \"\"\n },\n \"_links\": {\n \"self\": \"http://localhost:8080/confluence/rest/api/content/98313\",\n \"tinyui\": \"/x/CYAB\",\n \"webui\": \"/pages/viewpage.action?pageId=98313\"\n },\n \"id\": \"98313\",\n \"status\": \"current\",\n \"title\": \"Tell people what you think in a comment (step 8 of 9)\",\n \"type\": \"page\"\n },\n {\n \"_expandable\": {\n \"ancestors\": \"\",\n \"body\": \"\",\n \"children\": \"/rest/api/content/98312/child\",\n \"container\": \"\",\n \"descendants\": \"/rest/api/content/98312/descendant\",\n \"history\": \"/rest/api/content/98312/history\",\n \"metadata\": \"\",\n \"space\": \"/rest/api/space/ds\",\n \"version\": \"\"\n },\n \"_links\": {\n \"self\": \"http://localhost:8080/confluence/rest/api/content/98312\",\n \"tinyui\": \"/x/CIAB\",\n \"webui\": \"/pages/viewpage.action?pageId=98312\"\n },\n \"id\": \"98312\",\n \"status\": \"current\",\n \"title\": \"Prettify the page with an image (step 4 of 9)\",\n \"type\": \"page\"\n },\n {\n \"_expandable\": {\n \"ancestors\": \"\",\n \"body\": \"\",\n \"children\": \"/rest/api/content/98311/child\",\n \"container\": \"\",\n \"descendants\": \"/rest/api/content/98311/descendant\",\n \"history\": \"/rest/api/content/98311/history\",\n \"metadata\": \"\",\n \"space\": \"/rest/api/space/ds\",\n \"version\": \"\"\n },\n \"_links\": {\n \"self\": \"http://localhost:8080/confluence/rest/api/content/98311\",\n \"tinyui\": \"/x/B4AB\",\n \"webui\": \"/pages/viewpage.action?pageId=98311\"\n },\n \"id\": \"98311\",\n \"status\": \"current\",\n \"title\": \"Lay out your page (step 6 of 9)\",\n \"type\": \"page\"\n },\n {\n \"_expandable\": {\n \"ancestors\": \"\",\n \"body\": \"\",\n \"children\": \"/rest/api/content/98310/child\",\n \"container\": \"\",\n \"descendants\": \"/rest/api/content/98310/descendant\",\n \"history\": \"/rest/api/content/98310/history\",\n \"metadata\": \"\",\n \"space\": \"/rest/api/space/ds\",\n \"version\": \"\"\n },\n \"_links\": {\n \"self\": \"http://localhost:8080/confluence/rest/api/content/98310\",\n \"tinyui\": \"/x/BoAB\",\n \"webui\": \"/pages/viewpage.action?pageId=98310\"\n },\n \"id\": \"98310\",\n \"status\": \"current\",\n \"title\": \"Learn the wonders of autoconvert (step 7 of 9)\",\n \"type\": \"page\"\n }\n ],\n \"size\": 5,\n \"start\": 5\n}\n```\n\n## How do I know if there are more pages?\n\nWhen the response doesn't contain a link to the `next` page of results, you know that you've reached the end. Below you'll see the call for the next page of results, and the response which doesn't contain a `next` link.\n\n``` bash\ncurl -u admin:admin -X GET \"http://localhost:8080/confluence/rest/api/space/ds/content/page?limit=5&start=10\" | python -mjson.tool\n```\n\n``` javascript\n{\n \"_links\": {\n \"base\": \"http://localhost:8080/confluence\",\n \"context\": \"\",\n \"prev\": \"/rest/api/space/ds/content/page?limit=5&start=5\",\n \"self\": \"http://localhost:8080/confluence/rest/api/space/ds/content/page\"\n },\n \"limit\": 5,\n \"results\": [\n {\n \"_expandable\": {\n \"ancestors\": \"\",\n \"body\": \"\",\n \"children\": \"/rest/api/content/589845/child\",\n \"container\": \"\",\n \"descendants\": \"/rest/api/content/589845/descendant\",\n \"history\": \"/rest/api/content/589845/history\",\n \"metadata\": \"\",\n \"space\": \"/rest/api/space/ds\",\n \"version\": \"\"\n },\n \"_links\": {\n \"self\": \"http://localhost:8080/confluence/rest/api/content/589845\",\n \"tinyui\": \"/x/FQAJ\",\n \"webui\": \"/display/ds/The+eleventh+page\"\n },\n \"id\": \"589845\",\n \"status\": \"current\",\n \"title\": \"The eleventh page\",\n \"type\": \"page\"\n }\n ],\n \"size\": 1,\n \"start\": 10\n}\n```\n"}]},"tags":[{"name":"Access Mode"},{"name":"Admin Group"},{"name":"Admin User"},{"name":"Attachments"},{"name":"Backup and Restore"},{"name":"Category"},{"name":"Child Content"},{"name":"Content Blueprint"},{"name":"Content Body"},{"name":"Content Descendant"},{"name":"Content Labels"},{"name":"Content Property"},{"name":"Content Resource"},{"name":"Content Restrictions"},{"name":"Content Version"},{"name":"Content Watchers"},{"name":"GlobalColorScheme"},{"name":"Group"},{"name":"Instance Metrics"},{"name":"Label"},{"name":"Long Task"},{"name":"Search"},{"name":"Server Information"},{"name":"Space"},{"name":"Space Label"},{"name":"Space Permissions"},{"name":"Space Property"},{"name":"Space Watchers"},{"name":"SpaceColorScheme"},{"name":"User"},{"name":"User Group"},{"name":"User Watch"},{"name":"Webhooks"}],"paths":{"/rest/api/accessmode":{"get":{"tags":["Access Mode"],"summary":"Get access mode status","description":"Returns the access mode status for Confluence.","operationId":"getAccessModeStatus","responses":{"200":{"description":"Returns the access mode status for Confluence. Example: {\"mode\":\"PUBLIC\"}","content":{"application/json":{}}}}}},"/rest/api/admin/group":{"post":{"tags":["Admin Group"],"summary":"Create group","description":"Creates the given group identified by name.","operationId":"create","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Group"}}}},"responses":{"200":{"description":"returns the new group if group is created successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Group"}}}},"400":{"description":"returned if request does not provide a name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestError"}}}},"403":{"description":"returned if user does not have enough permission","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestError"}}}},"409":{"description":"returned if group with the same name already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestError"}}}}}}},"/rest/api/admin/group/{groupName}":{"delete":{"tags":["Admin Group"],"summary":"Delete group","description":"Deletes the given group identified by name.","operationId":"delete","parameters":[{"name":"groupName","in":"path","description":"the group name to be deleted","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"returns no content if group is deleted successfully"},"400":{"description":"returned if user is attempting to delete the last admin group","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestError"}}}},"403":{"description":"returned if user does not have correct permission","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestError"}}}},"404":{"description":"returned if group cannot be found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestError"}}}}}}},"/rest/api/admin/user/{username}/password":{"post":{"tags":["Admin User"],"summary":"Change password","description":"Change the password for the user identified by the username. \n\n**Validation rules** : \n\n- The new password should not be null or blank. \n\n","operationId":"changePassword","parameters":[{"name":"username","in":"path","description":"the username identifying the given user","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Credentials"}}}},"responses":{"204":{"description":"returns no content if the password is changed successfully"},"400":{"description":"returned if any error occurs while changing user password. Refer to the validation rules above.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestError"}}}},"403":{"description":"returned if user does not have enough permission to change another user's password. User should be a System admin","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestError"}}}},"404":{"description":"returned if user with specified userName not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestError"}}}}}}},"/rest/api/admin/user":{"post":{"tags":["Admin User"],"summary":"Create user","description":"One of the following options could be used:\n\n1. Create a user with a specified password. The userName, fullName, email and password needs to be specified.\n\n2. Create a user with an email notification to the user. The userName, fullName, email and notifyViaEmail (true) needs to be specified.\n\n**Requirements**:\n\n- The userName should not be null or blank\n\n- The userName should not contain any of these characters \\ , + < > ' \"\n\n- The userName should not contain any whitespace characters\n\n- The userName should not be \"anonymous\"\n\n- The userName should not contain any upper case characters\n\n- The fullName should not be null or blank\n\n- The fullName should not contain any of these characters\n\n- The fullName should not be \"anonymous\"\n\n- The email should not be null or blank\n\n- The email should be a valid email address\n\n- If notifyViaEmail is false then the password should not be null or blank\n\n- If notifyViaEmail is true then the password should not be specified","operationId":"createUser","requestBody":{"description":"Details of the user to be created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserDetailsForCreation"}}}},"responses":{"201":{"description":"returns a response with generated UserKey for the created user.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserKey"}}}},"400":{"description":"returned if any error occurs while creating the user","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestError"}}}},"401":{"description":"returned if an anonymous (or unauthenticated) user tries to create a user","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestError"}}}},"402":{"description":"returned if no more licenses available to create a user","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestError"}}}},"403":{"description":"returned if user does not have enough permission to create a user","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestError"}}}},"409":{"description":"returned if the user with the same userName already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestError"}}}}}}},"/rest/api/admin/user/{username}":{"delete":{"tags":["Admin User"],"summary":"Delete user","description":"Deletes the given User identified by username. This action is processed asynchronously.","operationId":"delete_1","parameters":[{"name":"username","in":"path","description":"the username identifying the given user","required":true,"schema":{"type":"string"}}],"responses":{"202":{"description":"Produces a HTTP Accept 202 response from some other resource pointing to this class's LongTaskStatus resource.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LongTaskSubmission"}}}},"401":{"description":"The calling user is not authenticated or does not have the LICENSED permission.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestError"}}}},"403":{"description":"The calling user does not have permission to perform this action.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestError"}}}},"404":{"description":"No User exists for the provided username.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestError"}}}}}}},"/rest/api/admin/user/{username}/disable":{"put":{"tags":["Admin User"],"summary":"Disable user","description":"Disables the given User identified by username. This method is idempotent i.e. if the user is already disabled then no action will be taken.","operationId":"disable","parameters":[{"name":"username","in":"path","description":"the username identifying the given user","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"returns no content if the user is disabled"},"401":{"description":"The calling user is not authenticated or does not have the LICENSED permission.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestError"}}}},"403":{"description":"The calling user does not have permission to perform this action.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestError"}}}},"404":{"description":"No User exists for the provided username.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestError"}}}}}}},"/rest/api/admin/user/{username}/enable":{"put":{"tags":["Admin User"],"summary":"Enable user","description":"Enables the given User identified by username. This method is idempotent i.e. if the user is already enabled then no action will be taken.","operationId":"enable","parameters":[{"name":"username","in":"path","description":"the username identifying the given user","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"returns no content if the user is enabled"},"401":{"description":"The calling user is not authenticated or does not have the LICENSED permission.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestError"}}}},"403":{"description":"The calling user does not have permission to perform this action.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestError"}}}},"404":{"description":"No User exists for the provided username.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestError"}}}}}}},"/rest/api/content/{id}/child/attachment":{"get":{"tags":["Attachments"],"summary":"Get attachment","description":"Returns a paginated list of attachment Content entities within a single container.","operationId":"getAttachments","parameters":[{"name":"expand","in":"query","description":"(optional) a comma separated list of properties to expand on the Attachments returned. Optional.","schema":{"type":"string"}},{"name":"filename","in":"query","description":"(optional) filter parameter to return only the Attachment with the matching file name.","schema":{"type":"string"}},{"name":"limit","in":"query","description":"(optional) how many items should be returned after the start index.","schema":{"type":"string"}},{"name":"start","in":"query","description":"(optional) the index of the first item within the result set that should be returned.","schema":{"type":"string"}},{"name":"mediaType","in":"query","description":"(optional) a comma separated list of properties to expand on the Attachments returned.","schema":{"type":"string"}},{"name":"id","in":"path","description":"The id of the content the attachment is on.","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"Returns a JSON representation of a list of attachment Content entities.","content":{"application/json":{"schema":{"type":"object","properties":{"results":{"type":"array","items":{"$ref":"#/components/schemas/Content"}},"start":{"type":"number","example":25},"limit":{"type":"number","example":25},"size":{"type":"number","example":25},"_links":{"type":"object","properties":{"base":{"type":"string","example":"http://localhost:8085/rest/api"},"self":{"type":"string","example":"http://localhost:8085/rest/api"},"context":{"type":"string","example":"http://localhost:8085/rest/api"},"next":{"type":"string","example":"http://localhost:8085/rest/api/latest/../paginate?limit=25&start=50"},"prev":{"type":"string","example":"http://localhost:8085/rest/api/latest/../paginate?limit=25&start=0"}}}}}}}},"404":{"description":" Returned if there is no content with the given id, or if the calling user does not have permission to view the content.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestError"}}}}}},"post":{"tags":["Attachments"],"summary":"Create attachments","description":"Add one or more attachments to a Confluence Content entity, with optional comments.\n\n**Comments are optional**, but if included there must be as many comments as there are files, and the comments must be in the same order as the files.\n\nThis resource expects a multipart post. The media-type multipart/form-data is defined in RFC 1867. Most client libraries have classes that make dealing with multipart posts simple. For instance, in Java the Apache HTTP Components library provides a `MultiPartEntity` that makes it simple to submit a multipart POST.\n\nIn order to protect against XSRF attacks, because this method accepts multipart/form-data, it has XSRF protection on it. This means you must submit a header of `X-Atlassian-Token: nocheck` with the request, otherwise it will be blocked.\n\nThe name of the multipart/form-data parameter that contains attachments must be 'file'.","operationId":"createAttachments","parameters":[{"name":"expand","in":"query","description":"(optional) a comma separated list of properties to expand on the Attachments returned. Optional.","schema":{"type":"string"}},{"name":"id","in":"path","description":"The id of the content the attachment is on.","required":true,"schema":{"type":"string"}},{"name":"allowDuplicated","in":"query","description":"(optional) allows to upload an attachment with an existing filename.","schema":{"type":"string"}},{"name":"status","in":"query","description":"a string containing the status of the attachments content container, supports current or draft, defaults to current","schema":{"type":"string"}}],"requestBody":{"description":"The attachments to be added. The name of the multipart/form-data parameter that contains attachments must be 'file'.","content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/MockAttachmentRequest"}}}},"responses":{"200":{"description":"returns a JSON representation of the attachments added.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Content"}}}},"403":{"description":"Returned if attachments is disabled or if you don't have permission to add attachments to this content.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestError"}}}},"404":{"description":" Returned if the requested content is not found, the user does not have permission to view it, or if the attachments exceeds the maximum configured attachment size.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestError"}}}}}}},"/rest/api/content/{id}/child/attachment/{attachmentId}/move":{"post":{"tags":["Attachments"],"summary":"Move attachment","description":"Move an attachment to a different content entity object. \n\n**When moving the attachment**, the name of the attachment can be updated as well. \n\nIn order to protect against XSRF attacks, because this method accepts multipart/form-data, it has XSRF protection on it. This means you must submit a header of `X-Atlassian-Token: nocheck` with the request, otherwise it will be blocked. \n\nA simple example to move an attachment with id \"456\" in a container with id \"123\" to a container with \"789\": \n\n`curl -D- -u admin:admin -X POST -H \"X-Atlassian-Token: nocheck\" \"http://myhost/rest/api/content/123/child/attachment/456/move?newContentId=789\"` \n\nAn example to move the same file, while also renaming it to \"my-new-name\": \n\n`curl -D- -u admin:admin -X POST -H \"X-Atlassian-Token: nocheck\" \"http://myhost/rest/api/content/123/child/attachment/456/move?newContentId=789&newName=my-new-name\"` \n\nThis can also be used to only rename an attachment: \n\n`curl -D- -u admin:admin -X POST -H \"X-Atlassian-Token: nocheck\" \"http://myhost/rest/api/content/123/child/attachment/456/move?newContentId=123&newName=my-new-name\"`","operationId":"move","parameters":[{"name":"newName","in":"query","schema":{"type":"string"}},{"name":"newContentId","in":"query","schema":{"type":"string"}},{"name":"attachmentId","in":"path","description":"the id of the attachment to upload the new file for.","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","description":"The id of the content the attachment is on.","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"Returned if the operation is successful."},"400":{"description":" Returned if the attachment id is invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestError"}}}},"404":{"description":" Returned if no attachment is found for the attachmentId.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestError"}}}}}}},"/rest/api/content/{id}/child/attachment/{attachmentId}":{"put":{"tags":["Attachments"],"summary":"Update non-binary data of an Attachment","description":"Update the non-binary data of an attachment.This resource can be used to update an attachment's filename, media-type, comment, and parent container.","operationId":"update","parameters":[{"name":"attachmentId","in":"path","description":"the id of the attachment to update.","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","description":"The id of the content the attachment is on.","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Content"}}}},"responses":{"200":{"description":"returns a JSON representation of the attachment after being updated.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Content"}}}},"400":{"description":" Returned if the attachment id or the attachment version number are invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestError"}}}},"403":{"description":"Returned if you are not permitted to update or move the attachment to a different container.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestError"}}}},"404":{"description":" Returned if no attachment is found for the attachmentId.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestError"}}}},"409":{"description":"Returned if the version of the supplied Attachment does not match the exact version of the Attachment stored in the database.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestError"}}}}}},"delete":{"tags":["Attachments"],"summary":"Remove attachment","description":"This method will delete the attachment identified by attachmentId.\n\nIt returns a boolean response indicating whether the operation was successful or not. If the specified attachment or version does not exist, or if the user does not have permission to remove the attachment, appropriate exceptions are thrown and mapped to their corresponding HTTP responses.","operationId":"removeAttachment","parameters":[{"name":"attachmentId","in":"path","description":"the id of the attachment to be removed.","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","description":"The id of the content the attachment is on.","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"Returns no response if the specified attachment is successfully removed."},"400":{"description":"Returned if the user does not have permission to remove the attachment.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestError"}}}},"404":{"description":" Returned if the specified attachment does not exist.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestError"}}}}}}},"/rest/api/content/{id}/child/attachment/{attachmentId}/version/{version}":{"delete":{"tags":["Attachments"],"summary":"Remove attachment version","description":"This method will delete the specified version of an attachment identified by attachmentId and version.\n\nIf the operation is successful, it returns a response indicating that no content is returned. If the specified attachment or version does not exist, or if the user does not have permission to remove the attachment, appropriate exceptions are thrown and mapped to their corresponding HTTP responses.","operationId":"removeAttachmentVersion","parameters":[{"name":"attachmentId","in":"path","description":"The id of the attachment to be removed.","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","description":"The id of the content the attachment is on.","required":true,"schema":{"type":"string"}},{"name":"version","in":"path","required":true,"schema":{"type":"integer","format":"int32"}}],"responses":{"204":{"description":"Returns no content if the specified attachment version is successfully removed."},"400":{"description":"Returned if the user does not have permission to remove the attachment.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestError"}}}},"404":{"description":"Returned if the specified attachment or version does not exist.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestError"}}}}}}},"/rest/api/content/{id}/child/attachment/{attachmentId}/data":{"post":{"tags":["Attachments"],"summary":"Update binary data of an attachment","description":"Update the binary data of an Attachment, and optionally the comment and the minor edit field.\n\nThis adds a new version of the attachment, containing the new binary data, filename, and content-type.\n\n**When updating the binary data of an attachment**, the comment related to it together with the field that specifies if it's a minor edit can be updated as well, but are not required.\n\nIf an update is considered to be a minor edit, notifications will not be sent to the watchers of that content.\n\nThis resource expects a multipart post. The media-type multipart/form-data is defined in RFC 1867. Most client libraries have classes that make dealing with multipart posts simple. For instance, in Java the Apache HTTP Components library provides a `MultiPartEntity` that makes it simple to submit a multipart POST.\n\nIn order to protect against XSRF attacks, because this method accepts multipart/form-data, it has XSRF protection on it. This means you must submit a header of `X-Atlassian-Token: nocheck` with the request, otherwise it will be blocked.\n\nThe name of the multipart/form-data parameter that contains attachments must be 'file'.","operationId":"updateData","parameters":[{"name":"attachmentId","in":"path","description":"the id of the attachment to upload the new file for.","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","description":"The id of the content the attachment is on.","required":true,"schema":{"type":"string"}}],"requestBody":{"description":"The attachment to be updated.","content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/MockAttachmentRequest"}}}},"responses":{"200":{"description":"returns JSON representation of the updated attachment.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Content"}}}},"400":{"description":" Returned if the attachment id is invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestError"}}}},"404":{"description":" Returned if no attachment is found for the attachmentId.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestError"}}}}}}},"/rest/api/audit":{"get":{"operationId":"getAuditRecords","responses":{"default":{"description":"default response","content":{"application/json":{}}}},"deprecated":true}},"/rest/api/backup-restore/jobs/clear-queue":{"put":{"tags":["Backup and Restore"],"summary":"Cancel all queued jobs","description":"Cancels all queued jobs. Does not affect jobs that are being processed at the moment.","operationId":"cancelAllQueuedJobs","responses":{"200":{"description":"Returns the number of cancelled jobs. If no jobs were cancelled, 0 is returned.\nExample response: `1`","content":{"application/json":{}}},"403":{"description":"Returned if user doesn't have permission to cancel jobs","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestError"}}}}}}},"/rest/api/backup-restore/jobs/{jobId}/cancel":{"put":{"tags":["Backup and Restore"],"summary":"Cancel job","description":"Cancels the job. If the job is already cancelled or failed, the method will do nothing.","operationId":"cancelJob","parameters":[{"name":"jobId","in":"path","description":"id of the backup/restore job","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Returns a JSON representation of the cancelled job.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JobDetails"}}}},"404":{"description":"Returned if job not found or user doesn't have permission to cancel it","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestError"}}}}}}},"/rest/api/backup-restore/backup/site":{"post":{"tags":["Backup and Restore"],"summary":"Create site backup job","description":"Starts the new site backup job.","operationId":"createSiteBackupJob","requestBody":{"description":"Site backup settings","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SiteBackupSettings"}}}},"responses":{"200":{"description":"Returns a JSON representation of the site backup job details.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SiteBackupJobDetails"}}}},"400":{"description":" Returned if invalid settings provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestError"}}}},"409":{"description":"Returned if user doesn't have permission to create site backups","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestError"}}}}}}},"/rest/api/backup-restore/restore/site":{"post":{"tags":["Backup and Restore"],"summary":"Create site restore job","description":"Starts the new site restore job.","operationId":"createSiteRestoreJob","requestBody":{"description":"space restore settings","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SiteRestoreSettings"}}}},"responses":{"200":{"description":"Returns a JSON representation of the site restore job.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SiteRestoreJobDetails"}}}},"400":{"description":" Returned if invalid filename provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestError"}}}},"403":{"description":"Returned if user doesn't have permission to restore site","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestError"}}}}}}},"/rest/api/backup-restore/restore/site/upload":{"post":{"tags":["Backup and Restore"],"summary":"Create site restore job for upload backup file","description":"This resource expects a multipart post. The media-type multipart/form-data is defined in RFC 1867. \n\nMost client libraries have classes that make dealing with multipart posts simple. \n\nFor instance, in Java the Apache HTTP Components library provides a MultiPartEntity that makes it simple to submit a multipart POST. \n\n In order to protect against XSRF attacks, because this method accepts multipart/form-data, it has XSRF protection on it. This means you must submit a header of X-Atlassian-Token: nocheck with the request, otherwise it will be blocked. \n\n The name of the multipart/form-data parameter that contains attachments must be \"file\". \n\n An example to attach the file: \n\n curl -D- -u admin:admin -X POST -H \"X-Atlassian-Token: nocheck\" -F file=@myfile.zip http://myhost/rest/api/backup-restore/restore/space/upload \n\n.","operationId":"createSiteRestoreJobForUploadedBackupFile","requestBody":{"description":"Backup file to be uploaded. Has to be a zip file.","content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/ExampleMultipartFormData"}}}},"responses":{"200":{"description":"Returns a JSON representation of the site restore job details.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SiteRestoreJobDetails"}}}},"400":{"description":" Returned if the uploaded file is not a zip file","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestError"}}}},"403":{"description":" Returned if user doesn't have permission to restore space","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestError"}}}}}}},"/rest/api/backup-restore/backup/space":{"post":{"tags":["Backup and Restore"],"summary":"Create space backup job","description":"Creates new space backup job and adds it to the queue.","operationId":"createSpaceBackupJob","requestBody":{"description":"Space backup settings","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SpaceBackupSettings"}}}},"responses":{"200":{"description":"Returns a JSON representation of the space backup job","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SpaceBackupJobDetails"}}}},"400":{"description":"Returned if invalid settings provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestError"}}}},"403":{"description":"Returned if user doesn't have permission to create space backups","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestError"}}}},"409":{"description":"Returned if backup with the same spaces selected is already in PROGRESS or QUEUED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestError"}}}}}}},"/rest/api/backup-restore/restore/space":{"post":{"tags":["Backup and Restore"],"summary":"Create space restore job","description":"Creates new space restore job and adds it to the queue.","operationId":"createSpaceRestoreJob","requestBody":{"description":"space restore settings","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SpaceRestoreSettings"}}}},"responses":{"200":{"description":"Returns a JSON representation of the space restore job.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SpaceRestoreJobDetails"}}}},"400":{"description":" Returned if invalid filename provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestError"}}}},"403":{"description":"Returned if user doesn't have permission to restore spaces","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestError"}}}}}}},"/rest/api/backup-restore/restore/space/upload":{"post":{"tags":["Backup and Restore"],"summary":"Create space restore job for upload backup file","description":"This resource expects a multipart post. The media-type multipart/form-data is defined in RFC 1867. \n\nMost client libraries have classes that make dealing with multipart posts simple. \n\nFor instance, in Java the Apache HTTP Components library provides a MultiPartEntity that makes it simple to submit a multipart POST. \n\n In order to protect against XSRF attacks, because this method accepts multipart/form-data, it has XSRF protection on it. This means you must submit a header of X-Atlassian-Token: nocheck with the request, otherwise it will be blocked. \n\n The name of the multipart/form-data parameter that contains attachments must be \"file\". \n\n An example to attach the file: \n\n curl -D- -u admin:admin -X POST -H \"X-Atlassian-Token: nocheck\" -F file=@myfile.zip http://myhost/rest/api/backup-restore/restore/space/upload \n\n.","operationId":"createSpaceRestoreJobForUploadedBackupFile","requestBody":{"description":"backup file uploaded. Has to be a zip file.","content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/ExampleMultipartFormData"}}}},"responses":{"200":{"description":"Returns a JSON representation of the space restore job details.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SpaceRestoreJobDetails"}}}},"400":{"description":" Returned if the uploaded file is not a zip file","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestError"}}}},"403":{"description":" Returned if user doesn't have permission to restore space","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestError"}}}}}}},"/rest/api/backup-restore/jobs/{jobId}/download":{"get":{"tags":["Backup and Restore"],"summary":"Download backup file","description":"Downloads the backup file for the given job. Requires site admin or space export permissions for all spaces included in the backup job.","operationId":"downloadBackupFile","parameters":[{"name":"jobId","in":"path","description":"id of the backup/restore job","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Returns a data stream of the backup file content.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JobDetails"}}}},"404":{"description":"Returned if job not found or user doesn't have permissions for the job or the file is missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestError"}}}}}}},"/rest/api/backup-restore/jobs":{"get":{"tags":["Backup and Restore"],"summary":"Find jobs by filters","description":"Returns jobs based on the filters provided. The user must have permission to see the jobs.","operationId":"findJobs","parameters":[{"name":"owner","in":"query","description":"userName of user who had created a job.","schema":{"type":"string"}},{"name":"spaceKey","in":"query","description":"the key of the Space the User is attempting to view.","schema":{"type":"string"}},{"name":"fromDate","in":"query","description":"minimum job creation date. Supported date format is `yyyy-MM-ddTHH:mm:ss.SSSZ`","schema":{"type":"string"}},{"name":"jobStates","in":"query","description":"list of job states. Acceptable values: \"QUEUED\", \"PROCESSING\", \"FINISHED\", \"CANCELLING\", \"CANCELLED\", \"FAILED\"","schema":{"type":"string"}},{"name":"toDate","in":"query","description":"maximum job create date. Supported date format is `yyyy-MM-ddTHH:mm:ss.SSSZ`","schema":{"type":"string"}},{"name":"jobOperation","in":"query","description":"job operation. Acceptable values: \"BACKUP\" and \"RESTORE\"","schema":{"type":"string"}},{"name":"limit","in":"query","description":"amount of jobs that should be returned","schema":{"type":"string"}},{"name":"jobScope","in":"query","description":"scope of the job. Acceptable values: \"SPACE\" and \"SITE\" ","schema":{"type":"string"}}],"responses":{"200":{"description":"Returns the List of backup/restore jobs visible to user based on the filter provided and the user's permissions.","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/JobDetails"}}}}},"400":{"description":"Returned if invalid filter parameters were passed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestError"}}}}}}},"/rest/api/backup-restore/restore/files":{"get":{"tags":["Backup and Restore"],"summary":"Get files in restore directory","description":"returns list of information on files in conf-home/restore/(jobScope).","operationId":"getFiles","parameters":[{"name":"jobScope","in":"query","description":"name of type of restore job (SITE or SPACE or null), if null, all backup files are listed","schema":{"type":"string"}}],"responses":{"200":{"description":"Returns a list of FileInfo objects, containing fileName, fileCreationTime, fileSize, and jobScope.","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/FileInfo"}}}}},"400":{"description":"Returned if user is not a system administrator","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestError"}}}}}}},"/rest/api/backup-restore/jobs/{jobId}":{"get":{"tags":["Backup and Restore"],"summary":"Get job by ID","description":"Get job by id. The user must be a sysadmin or the owner of the job.","operationId":"getJob","parameters":[{"name":"jobId","in":"path","description":"id of the backup/restore job","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Returns a JSON representation of the backup/restore job","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JobDetails"}}}},"400":{"description":" Returned if jobId is null","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestError"}}}},"403":{"description":" Returned if job not found or user doesn't have permission to see it","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestError"}}}}}}},"/rest/api/space/{spaceKey}/category/{categoryName}":{"delete":{"tags":["Category"],"summary":"Remove a category from a space","description":"Removes a category from a space, identified by spaceKey.\n\nExample request URI:\n`https://example.com/confluence/rest/api/space/TEST/category/example-category`","operationId":"removeCategory","parameters":[{"name":"spaceKey","in":"path","description":"The key of the space to remove the category from","required":true,"schema":{"type":"string"}},{"name":"categoryName","in":"path","description":"The name of the category to remove","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"Returned if the category is removed successfully."},"401":{"description":"Returned if the calling user is not authenticated.","content":{"application/json":{}}},"403":{"description":"Returned if the calling user does not have permission to edit the Space.","content":{"application/json":{}}},"404":{"description":"Returned if there is no space with the given key","content":{"application/json":{}}}}}},"/rest/api/content/{id}/child":{"get":{"tags":["Child Content"],"summary":"Get children of content","description":"Returns a map of the direct children of a piece of Content. Content can have multiple types of children. For example, a Page can have children that are also Pages, but it can also have Comments and Attachments. \n\nThe types of the children returned is specified by the `expand` query parameter in the request. This parameter can include expands for multiple child types. If no types are included in the `expand` parameter, the map returned will just list the child types that are available to be expanded for the content referenced by the `id` path parameter.","operationId":"children","parameters":[{"name":"expand","in":"query","description":"a comma separated list of properties to expand on the children","schema":{"type":"string"}},{"name":"limit","in":"query","description":"how many items should be returned after the start index","schema":{"type":"string"}},{"name":"start","in":"query","description":"the index of the first item within the result set that should be returned","schema":{"type":"string"}},{"name":"id","in":"path","description":"The id of the content to retrieve children for","required":true,"schema":{"type":"string"}},{"name":"parentVersion","in":"query","schema":{"type":"integer","format":"int32","default":0}}],"responses":{"200":{"description":"Returned if the children are successfully retrieved. The response body contains a JSON map representing multiple ordered collections of content children, keyed by content type.","content":{"application/json":{"schema":{"type":"object","properties":{"results":{"type":"array","items":{"$ref":"#/components/schemas/Content"}},"start":{"type":"number","example":25},"limit":{"type":"number","example":25},"size":{"type":"number","example":25},"_links":{"type":"object","properties":{"base":{"type":"string","example":"http://localhost:8085/rest/api"},"self":{"type":"string","example":"http://localhost:8085/rest/api"},"context":{"type":"string","example":"http://localhost:8085/rest/api"},"next":{"type":"string","example":"http://localhost:8085/rest/api/latest/../paginate?limit=25&start=50"},"prev":{"type":"string","example":"http://localhost:8085/rest/api/latest/../paginate?limit=25&start=0"}}}}}}}},"404":{"description":" Returned if there is no content with the given id, or if the calling user does not have permission to view the content.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestError"}}}}}}},"/rest/api/content/{id}/child/{type}":{"get":{"tags":["Child Content"],"summary":"Get children of content by type","description":"Returns the direct children of a piece of Content, limited to a single child type.The types of the children returned is specified by the \"type\" path parameter in the request.","operationId":"childrenOfType","parameters":[{"name":"expand","in":"query","description":"a comma separated list of properties to expand on the children","schema":{"type":"string"}},{"name":"limit","in":"query","description":"how many items should be returned after the start index","schema":{"type":"string"}},{"name":"start","in":"query","description":"the index of the first item within the result set that should be returned","schema":{"type":"string"}},{"name":"id","in":"path","description":"The id of the content to retrieve children for","required":true,"schema":{"type":"string"}},{"name":"type","in":"path","description":"a content type to filter children on.","required":true,"schema":{"type":"string"}},{"name":"parentVersion","in":"query","schema":{"type":"integer","format":"int32","default":0}}],"responses":{"200":{"description":"Returns a JSON map representing multiple ordered collections of content children, keyed by content type","content":{"application/json":{"schema":{"type":"object","properties":{"results":{"type":"array","items":{"$ref":"#/components/schemas/Content"}},"start":{"type":"number","example":25},"limit":{"type":"number","example":25},"size":{"type":"number","example":25},"_links":{"type":"object","properties":{"base":{"type":"string","example":"http://localhost:8085/rest/api"},"self":{"type":"string","example":"http://localhost:8085/rest/api"},"context":{"type":"string","example":"http://localhost:8085/rest/api"},"next":{"type":"string","example":"http://localhost:8085/rest/api/latest/../paginate?limit=25&start=50"},"prev":{"type":"string","example":"http://localhost:8085/rest/api/latest/../paginate?limit=25&start=0"}}}}}}}},"404":{"description":" Returned if there is no content with the given id, or if the calling user does not have permission to view the content.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestError"}}}}}}},"/rest/api/content/{id}/child/comment":{"get":{"tags":["Child Content"],"summary":"Get comments of content","description":"Returns the comments of a piece of Content. Example request URI(s): \n\n- `http://example.com/confluence/rest/api/content/1234/child/comment`\n- `http://example.com/confluence/rest/api/content/1234/child/comment?expand=body.view`\n- `http://example.com/confluence/rest/api/content/1234/child/comment?start=20&limit=10`\n- `http://example.com/confluence/rest/api/content/1234/child/comment?location=footer&location=inline&location=resolved`\n- `http://example.com/confluence/rest/api/content/1234/child/comment?expand=extensions.inlineProperties,extensions.resolution`","operationId":"commentsOfContent","parameters":[{"name":"expand","in":"query","description":"a comma separated list of properties to expand on the children","schema":{"type":"string"}},{"name":"depth","in":"query","description":"(optional, default: \"\") the depth of the comments. Possible values are: \"\" (ROOT only), \"all\"","schema":{"type":"string"}},{"name":"limit","in":"query","description":"how many items should be returned after the start index","schema":{"type":"string"}},{"name":"start","in":"query","description":"the index of the first item within the result set that should be returned","schema":{"type":"string"}},{"name":"location","in":"query","description":"(optional, default: \"\" means all) the location of the comments. Possible values are: \"inline\", \"footer\", \"resolved\".\nYou can define multiple location params. The results will be the comments matched by any location.","schema":{"type":"string"}},{"name":"id","in":"path","description":"The id of the content to retrieve children for","required":true,"schema":{"type":"string"}},{"name":"parentVersion","in":"query","schema":{"type":"integer","format":"int32","default":0}}],"responses":{"200":{"description":"Returns a JSON map representing multiple ordered collections of content children, keyed by content type","content":{"application/json":{"schema":{"type":"object","properties":{"results":{"type":"array","items":{"$ref":"#/components/schemas/Content"}},"start":{"type":"number","example":25},"limit":{"type":"number","example":25},"size":{"type":"number","example":25},"_links":{"type":"object","properties":{"base":{"type":"string","example":"http://localhost:8085/rest/api"},"self":{"type":"string","example":"http://localhost:8085/rest/api"},"context":{"type":"string","example":"http://localhost:8085/rest/api"},"next":{"type":"string","example":"http://localhost:8085/rest/api/latest/../paginate?limit=25&start=50"},"prev":{"type":"string","example":"http://localhost:8085/rest/api/latest/../paginate?limit=25&start=0"}}}}}}}},"404":{"description":"Returned if there is no content with the given id, or if the calling user does not have permission to\nview the content.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestError"}}}}}}},"/rest/api/content/blueprint/instance/{draftId}":{"put":{"tags":["Content Blueprint"],"summary":"Publish shared draft","description":"Publishes a shared draft of a Content created from a ContentBlueprint.","operationId":"publishSharedDraft","parameters":[{"name":"expand","in":"query","description":"A comma separated list of properties to expand on the content. Default value: body.storage,history,space,version,ancestors","schema":{"type":"string"}},{"name":"draftId","in":"path","description":"the id of the draft","required":true,"schema":{"type":"string"}},{"name":"status","in":"query","description":"only support 'draft' status for now.","schema":{"type":"string"}}],"requestBody":{"description":"he content to be created, where the status of the included content is \"current\",\nand the content has an ID (which will be the draft ID)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Content"}}}},"responses":{"200":{"description":"returns a JSON representation of the content","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Content"}}}}}},"post":{"tags":["Content Blueprint"],"summary":"Publish legacy draft","description":"Publishes a legacy draft of a Content created from a ContentBlueprint.","operationId":"publishLegacyDraft","parameters":[{"name":"expand","in":"query","description":"A comma separated list of properties to expand on the content. Default value: body.storage,history,space,version,ancestors","schema":{"type":"string"}},{"name":"draftId","in":"path","description":"the id of the draft","required":true,"schema":{"type":"string"}},{"name":"status","in":"query","description":"only support 'draft' status for now.","schema":{"type":"string"}}],"requestBody":{"description":"The content to be created, where the status of the included content is \"current\",\nand the content has an ID (which will be the draft ID)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Content"}}}},"responses":{"200":{"description":"returns a JSON representation of the content","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Content"}}}}}}},"/rest/api/contentbody/convert/{to}":{"post":{"tags":["Content Body"],"summary":"Convert body representation","description":"Converts between content body representations. Not all representations can be converted to/from other formats. Supported conversions: \n\n- `storage -> view,export_view,styled_view,editor`\n- `editor -> storage`\n- `view -> None`\n- `export_view -> None`\n- `styled_view -> None`\n\nExample request URI(s):\n\n- `http://example.com/confluence/rest/api/contentbody/convert/view`","operationId":"convert","parameters":[{"name":"expand","in":"query","description":"A comma separated list of properties to expand on the content. Default value: body.storage,history,space,version,ancestors","schema":{"type":"string"}},{"name":"to","in":"path","description":"the representation to convert to.","required":true,"schema":{"type":"string"}}],"requestBody":{"description":"the body to convert from","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContentBody"}}}},"responses":{"200":{"description":"returns the converted body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContentBody"}}}}}}},"/rest/api/content/{id}/label":{"get":{"tags":["Content Labels"],"summary":"Get labels","description":"Returns the list of labels on a piece of Content. Example request URI(s): \n\n- `http://example.com/confluence/rest/api/content/1234/label`\n- `http://example.com/confluence/rest/api/content/1234/label?prefix=global&start=0&limit=200`","operationId":"labels","parameters":[{"name":"prefix","in":"query","description":"the prefixes to filter the labels with.","schema":{"type":"string"}},{"name":"limit","in":"query","description":"the limit of the number of labels to return, this may be restricted by fixed system limits","schema":{"type":"string"}},{"name":"start","in":"query","description":"he start point of the collection to return.","schema":{"type":"string"}},{"name":"id","in":"path","description":"the id of the content to get the labels for","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"returns a JSON representation of the existing labels on the content with the given id","content":{"application/json":{"schema":{"type":"object","properties":{"results":{"type":"array","items":{"$ref":"#/components/schemas/Label"}},"start":{"type":"number","example":25},"limit":{"type":"number","example":25},"size":{"type":"number","example":25},"_links":{"type":"object","properties":{"base":{"type":"string","example":"http://localhost:8085/rest/api"},"self":{"type":"string","example":"http://localhost:8085/rest/api"},"context":{"type":"string","example":"http://localhost:8085/rest/api"},"next":{"type":"string","example":"http://localhost:8085/rest/api/latest/../paginate?limit=25&start=50"},"prev":{"type":"string","example":"http://localhost:8085/rest/api/latest/../paginate?limit=25&start=0"}}}}}}}},"404":{"description":" Returned if there is no content with the given id, or if the calling user does not have permission to view the content.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestError"}}}}}},"post":{"tags":["Content Labels"],"summary":"Add Labels","description":"Adds a list of labels to the specified content. The body is the json representation of the list.","operationId":"addLabels","parameters":[{"name":"id","in":"path","description":"the id of the content to get the labels for","required":true,"schema":{"type":"string"}}],"requestBody":{"description":"a single label object or a list of labels to add","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Label"}}}},"responses":{"200":{"description":"returns a JSON representation of the existing and added labels on the content with the given id, or a 404 NOT FOUND if there is no content with the given id or if the user is not permitted. An empty list will be returned if there are no labels on the given content","content":{"application/json":{"schema":{"type":"object","properties":{"results":{"type":"array","items":{"$ref":"#/components/schemas/Label"}},"start":{"type":"number","example":25},"limit":{"type":"number","example":25},"size":{"type":"number","example":25},"_links":{"type":"object","properties":{"base":{"type":"string","example":"http://localhost:8085/rest/api"},"self":{"type":"string","example":"http://localhost:8085/rest/api"},"context":{"type":"string","example":"http://localhost:8085/rest/api"},"next":{"type":"string","example":"http://localhost:8085/rest/api/latest/../paginate?limit=25&start=50"},"prev":{"type":"string","example":"http://localhost:8085/rest/api/latest/../paginate?limit=25&start=0"}}}}}}}},"404":{"description":"Returned if there is no content with the given id, or if the calling user does not have permission to view the content.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestError"}}}}}},"delete":{"tags":["Content Labels"],"summary":"Delete label with query param","description":"Deletes a labels to the specified content.","operationId":"deleteLabelWithQueryParam","parameters":[{"name":"name","in":"query","description":"the name of the label to be removed from the content","schema":{"type":"string"}},{"name":"id","in":"path","description":"the id of the content to get the labels for","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"returns no response on successful delete"},"403":{"description":" Returned if user has view permission, but no edit permission to the content.permission to the content.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestError"}}}},"404":{"description":"Returned if content or label doesn't exist, or calling user doesn't have view permission to the content.permission to the content.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestError"}}}}}}},"/rest/api/content/{id}/label/{label}":{"delete":{"tags":["Content Labels"],"summary":"Delete label","description":"Deletes a labels to the specified content. The body is the json representation of the list. When calling this method through REST the label parameter doesn't accept `/` characters in label names, because of security constraints. For this case please use the query parameter version of this method (`/content/{id}/label?name={label}`)","operationId":"deleteLabel","parameters":[{"name":"id","in":"path","description":"the id of the content to get the labels for","required":true,"schema":{"type":"string"}},{"name":"label","in":"path","description":"the name of the label to be removed from the content","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"returns no response on successful delete"},"400":{"description":"Returned if trying to delete a label with \"/\" in the name.permission to the content.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestError"}}}},"403":{"description":"Returned if user has view permission, but no edit permission to the content.permission to the content.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestError"}}}},"404":{"description":"Returned if content or label doesn't exist, or calling user doesn't have view permission to the content.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestError"}}}}}}},"/rest/api/content/{id}/property":{"get":{"tags":["Content Property"],"summary":"Find all content properties","description":"Returns a paginated list of content properties. Example request URI(s): \n\n- `http://example.com/confluence/rest/api/content/1234/property?expand=content,version`","operationId":"findAll","parameters":[{"name":"expand","in":"query","description":"a comma separated list of properties to expand on the content properties. Default value: version.","schema":{"type":"string"}},{"name":"limit","in":"query","description":"the limit of the number of labels to return, this may be restricted by fixed system limits","schema":{"type":"string"}},{"name":"start","in":"query","description":"the start point of the collection to return.","schema":{"type":"string"}},{"name":"id","in":"path","description":"the id of the content","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"returns a JSON representation of the content properties, or a 404 NOT FOUND if there is no content with the given id or if the user is not permitted..","content":{"application/json":{"schema":{"type":"object","properties":{"results":{"type":"array","items":{"$ref":"#/components/schemas/JsonContentProperty"}},"start":{"type":"number","example":25},"limit":{"type":"number","example":25},"size":{"type":"number","example":25},"_links":{"type":"object","properties":{"base":{"type":"string","example":"http://localhost:8085/rest/api"},"self":{"type":"string","example":"http://localhost:8085/rest/api"},"context":{"type":"string","example":"http://localhost:8085/rest/api"},"next":{"type":"string","example":"http://localhost:8085/rest/api/latest/../paginate?limit=25&start=50"},"prev":{"type":"string","example":"http://localhost:8085/rest/api/latest/../paginate?limit=25&start=0"}}}}}}}},"404":{"description":" Returned if there is no content with the given id, or if the calling user does not have permission to view the content.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestError"}}}}}},"post":{"tags":["Content Property"],"summary":"Create a content property","description":"Creates a new content property.","operationId":"create_1","parameters":[{"name":"id","in":"path","description":"the id of the content","required":true,"schema":{"type":"string"}}],"requestBody":{"description":"content property to be created.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JsonContentProperty"}}}},"responses":{"200":{"description":"Returns a full JSON representation of the content property.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JsonContentProperty"}}}},"400":{"description":" Returned if the given property has a different ContentId to the one in the path, or\n\n if the content already has a value with the given key, or the value is missing, or the value is too long.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestError"}}}},"403":{"description":" Returned if the user does not have permission to edit the content with the given ContentId.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestError"}}}},"413":{"description":"Returned if the value is too long.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestError"}}}}}}},"/rest/api/content/{id}/property/{key}":{"get":{"tags":["Content Property"],"summary":"Find content property by key","description":"Returns a content property. Example request URI(s): \n\n- `http://example.com/confluence/rest/api/content/1234/property/example-property-key?expand=content,version`","operationId":"findByKey","parameters":[{"name":"expand","in":"query","description":"a comma separated list of properties to expand on the content properties. Default value: version.","schema":{"type":"string"}},{"name":"limit","in":"query","description":"the limit of the number of labels to return, this may be restricted by fixed system limits","schema":{"type":"string"}},{"name":"id","in":"path","description":"the id of the content","required":true,"schema":{"type":"string"}},{"name":"key","in":"path","description":"the key of the content property. Required.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"returns a JSON representation of the content property.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JsonContentProperty"}}}},"404":{"description":"Returned if there is no content with the given id, or no property with the given key, or if the calling user does not have permission to view the content.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestError"}}}}}},"put":{"tags":["Content Property"],"summary":"Update content property","description":"Updates a content property. The body contains the representation of the content property. Must include the property id, and the new version number. Attempts to create a new content property if the given version number is `1`","operationId":"update_1","parameters":[{"name":"expand","in":"query","description":"a comma separated list of properties to expand on the content properties. Default value: version.","schema":{"type":"string"}},{"name":"id","in":"path","description":"the id of the content","required":true,"schema":{"type":"string"}},{"name":"key","in":"path","description":"the key of the content property. Required.","required":true,"schema":{"type":"string"}}],"requestBody":{"description":"the content property being updated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JsonContentProperty"}}}},"responses":{"200":{"description":"returns a JSON representation of the content property, or a 404 NOT FOUND if there is no content with the given id, or no property with the given key, or if the user is not permitted.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JsonContentProperty"}}}},"400":{"description":"Returned if the given property has a different ContentId to the one in the path, or if the property has a different key to the one in the path, or the value is missing, or the value is too long.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestError"}}}},"403":{"description":"Returned if the user does not have permission to edit the content with the given ContentId.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestError"}}}},"404":{"description":"eturned if there is no content with the given id, or no property with the given key, or if the calling user does not have permission to view the content.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestError"}}}},"409":{"description":"Returned if the given version is does not match the expected target version of the updated property.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestError"}}}},"413":{"description":"Returned if the value is too long.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestError"}}}}}},"post":{"tags":["Content Property"],"operationId":"create_2","parameters":[{"name":"id","in":"path","description":"the id of the content","required":true,"schema":{"type":"string"}},{"name":"key","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/JsonContentProperty"}}}},"responses":{"default":{"description":"default response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JsonContentProperty"}}}}}},"delete":{"tags":["Content Property"],"summary":"Delete content property","description":"Deletes a content property.","operationId":"delete_2","parameters":[{"name":"id","in":"path","description":"the id of the content","required":true,"schema":{"type":"string"}},{"name":"key","in":"path","description":"the key of the content property. Required.","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"Returned if successfully deleted."},"404":{"description":"Returned if there is no content with the given id, or if the calling user does not have permission to view the content.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestError"}}}}}}},"/rest/api/content":{"get":{"tags":["Content Resource"],"summary":"Get content","description":"Returns a paginated list of Content. Example request URI(s): \n\n- `http://example.com/confluence/rest/api/content?spaceKey=TST&title=Cheese&expand=space,body.view,version,container`\n- `http://example.com/confluence/rest/api/content?type=blogpost&spaceKey=TST&title=Bacon&postingDay=2014-02-13&expand=space,body.view,version,container`","operationId":"getContent","parameters":[{"name":"spaceKey","in":"query","description":" the space key to find content under.","schema":{"type":"string"}},{"name":"expand","in":"query","description":"a comma separated list of properties to expand on the content. Default value: history,space,version.","schema":{"type":"string"}},{"name":"limit","in":"query","description":"the limit of the number of items to return, this may be restricted by fixed system limits.","schema":{"type":"string"}},{"name":"start","in":"query","description":"the start point of the collection to return.","schema":{"type":"string"}},{"name":"postingDay","in":"query","description":"the posting day of the blog post. Required for blogpost type. Format: yyyy-mm-dd. Example: 2013-02-13","schema":{"type":"string"}},{"name":"title","in":"query","description":" the title of the page to find. Required for page type.","schema":{"type":"string"}},{"name":"type","in":"query","description":"the content type to return. Default value: page. Valid values: page, blogpost.","schema":{"type":"string"}},{"name":"status","in":"query","description":" list of statuses the content to be found is in. Defaults to current is not specified. If set to 'any', content in 'current' and 'trashed' status will be fetched. Does not support 'historical' status for now.","schema":{"type":"string"}}],"responses":{"200":{"description":"Returns a full JSON representation of a list of content.","content":{"application/json":{"schema":{"type":"object","properties":{"results":{"type":"array","items":{"$ref":"#/components/schemas/Content"}},"start":{"type":"number","example":25},"limit":{"type":"number","example":25},"size":{"type":"number","example":25},"_links":{"type":"object","properties":{"base":{"type":"string","example":"http://localhost:8085/rest/api"},"self":{"type":"string","example":"http://localhost:8085/rest/api"},"context":{"type":"string","example":"http://localhost:8085/rest/api"},"next":{"type":"string","example":"http://localhost:8085/rest/api/latest/../paginate?limit=25&start=50"},"prev":{"type":"string","example":"http://localhost:8085/rest/api/latest/../paginate?limit=25&start=0"}}}}}}}},"404":{"description":"Returned if the calling user does not have permission to view the content.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestError"}}}}}},"post":{"tags":["Content Resource"],"summary":"Create content","description":"Creates a new piece of Content or publishes the draft if the content id is present. For the case publishing draft, a new piece of content will be created and all metadata from the draft will be transferred into the newly created content.","operationId":"createContent","parameters":[{"name":"expand","in":"query","description":" comma separated list of properties to expand on the content. Default value: history,space,version","schema":{"type":"string"}},{"name":"status","in":"query","description":"list of Content statuses to filter results on. \n\n Default value: [current].","schema":{"type":"string"}}],"requestBody":{"description":"new content to be created.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Content"}}},"required":true},"responses":{"200":{"description":"returns a JSON representation of the content.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Content"}}}},"404":{"description":"returned if there is no content with the given id or if the user is not permitted.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestError"}}}}}}},"/rest/api/content/{id}":{"get":{"tags":["Content Resource"],"summary":"Get content by ID","description":"Returns a piece of Content. Example request URI(s): \n\n- `http://example.com/confluence/rest/api/content/1234?expand=space,body.view,version,container`\n- `http://example.com/confluence/rest/api/content/1234?status=any`","operationId":"getContentById","parameters":[{"name":"expand","in":"query","description":"A comma separated list of properties to expand on the content. Default value: history,space,version. \n\n We can also specify some extensions such as extensions.inlineProperties (for getting inline comment-specific properties) or extensions.resolution for the resolution status of each comment in the results","schema":{"type":"string"}},{"name":"id","in":"path","description":"the id of the content.","required":true,"schema":{"type":"string"}},{"name":"version","in":"query","description":"version of the content.","schema":{"type":"string"}},{"name":"status","in":"query","description":"list of Content statuses to filter results on. \n\n Default value: [current].","schema":{"type":"string"}}],"responses":{"200":{"description":"returns a JSON representation of the content, or a 404 NOT FOUND if there is no content with the given id or if the user is not permitted.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Content"}}}},"404":{"description":"Returned if there is no content with the given id, or if the calling user does not have permission to view the content.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestError"}}}}}},"delete":{"tags":["Content Resource"],"summary":"Delete content","description":"Trashes or purges a piece of Content, based on its ContentType and ContentStatus. \n\nThere are three cases:\n\n- If the content is trashable and its status is current, it will be trashed.\n\n- If the content is trashable, its status is trashed and the status query parameter in the request is trashed, the content will be purged from the trash and deleted permanently.\n\n- If the content is not trashable it will be deleted permanently without being trashed.","operationId":"delete_3","parameters":[{"name":"id","in":"path","description":" the id of the content.","required":true,"schema":{"type":"string"}},{"name":"status","in":"query","description":"the status of the content to be deleted.","schema":{"type":"string"}}],"responses":{"200":{"description":"Returned if successfully trashed.","content":{"application/json":{}}},"204":{"description":"Returned if successfully purged."},"404":{"description":"Returned if there is no content with the given id, or if the calling user does not have permission to trash or purge the content.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestError"}}}},"409":{"description":"Returned if there is a stale data object conflict when trying to delete a draft.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestError"}}}}}}},"/rest/api/content/{id}/history":{"get":{"tags":["Content Resource"],"summary":"Get history of content","description":"Returns the history of a particular piece of content. Example request URI(s): \n\n- `http://example.com/confluence/rest/api/content/1234/history`\n- `http://example.com/confluence/rest/api/content/1234/history?expand=previousVersion,nextVersion,lastUpdated`\n- `http://example.com/confluence/rest/api/content/1234/history?cql=creator=currentUser()&cqlcontext={\"spaceKey\":\"TST\", \"contentId\":\"55\"}&expand=previousVersion,nextVersion,lastUpdated`\n- `http://example.com/confluence/rest/api/content/1234/history?cql=creator=currentUser()&cqlcontext={\"spaceKey\":\"TST\", \"contentId\":\"55\"}&expand=previousVersion,nextVersion,lastUpdated&start=0&limit=10`","operationId":"getHistory","parameters":[{"name":"expand","in":"query","description":"a comma separated list of properties to expand on the content. Default value: previousVersion,nextVersion,lastUpdated.","schema":{"type":"string"}},{"name":"id","in":"path","description":" the id of the content.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Returns a full JSON representation of the content's history","content":{"application/json":{"schema":{"$ref":"#/components/schemas/History"}}}},"404":{"description":"Returned if there is no content with the given id, or if the calling user does not have permission to view the content.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestError"}}}}}}},"/rest/api/content/{id}/history/{version}/macro/hash/{hash}":{"get":{"tags":["Content Resource"],"summary":"Get macro body by hash","description":"Returns the body of a macro (in storage format) with the given hash. This resource is primarily used by connect applications that require the body of macro to perform their work. \n\nThe hash is generated by connect during render time of the local macro holder and is usually only relevant during the scope of one request. For optimisation purposes, this hash will usually live for multiple requests. \n\nCollecting a macro by its hash should now be considered deprecated and will be replaced, transparently with macroIds. This resource is currently only called from connect addons which will eventually all use the `getContentById` resource. \n\nTo make the migration as seamless as possible, this resource will match macros against a generated hash or a stored macroId. This will allow add ons to work during the migration period.","operationId":"getMacroBodyByHash","parameters":[{"name":"id","in":"path","description":" the id of the content.","required":true,"schema":{"type":"string"}},{"name":"version","in":"path","description":"the version of the content which the hash belongs.","required":true,"schema":{"type":"string"}},{"name":"hash","in":"path","description":"the macroId to find the correct macro.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Returns a json representation of a macro.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MacroInstance"}}}},"404":{"description":"Returned if there is no content with the given id, or if the calling user does not have permission to view the content, or there is no macro matching the given hash or id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestError"}}}}},"deprecated":true}},"/rest/api/content/{id}/history/{version}/macro/id/{macroId}":{"get":{"tags":["Content Resource"],"summary":"Get macro body by macro ID","description":"Returns the body of a macro (in storage format) with the given id. This resource is primarily used by connect applications that require the body of macro to perform their work. \n\nWhen content is created, if no macroId is specified, then Confluence will generate a random id. The id is persisted as the content is saved and only modified by Confluence if there are conflicting IDs. \n\nTo preserve backwards compatibility this resource will also match on the hash of the macro body, even if a macroId is found. This check will become redundant as pages get macroId's generated for them and transparently propagate out to all instances.","operationId":"getMacroBodyByMacroId","parameters":[{"name":"macroId","in":"path","description":"the macroId to find the correct macro.","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","description":" the id of the content.","required":true,"schema":{"type":"string"}},{"name":"version","in":"path","description":"the version of the content which the hash belongs.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Returns a json representation of a macro.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MacroInstance"}}}},"404":{"description":"Returned if there is no content with the given id, or if the calling user does not have permission to view the content, or there is no macro matching the given id or hash.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestError"}}}}}}},"/rest/api/content/scan":{"get":{"tags":["Content Resource"],"summary":"Scan content by space key","description":"Returns a paginated list of Content. Example request URI(s): \n\n- `http://example.com/confluence/rest/api/content/scan?spaceKey=TST&limit=100&expand=space,body.view,version,container`\n- `http://example.com/confluence/rest/api/content/scan?limit=100&expand=space,body.view,version,container`","operationId":"scanContent","parameters":[{"name":"cursor","in":"query","description":"the identifier which is used to skip results from a previous query when paginating. Cursor is empty in first request, to move forward or backward use cursor provided in response.","schema":{"type":"string"}},{"name":"spaceKey","in":"query","description":" the space key to find content under.","schema":{"type":"string"}},{"name":"expand","in":"query","description":"a comma separated list of properties to expand on the content. Default value: history,space,version.","schema":{"type":"string"}},{"name":"limit","in":"query","description":"the limit of the number of items to return, this may be restricted by fixed system limits.","schema":{"type":"string"}},{"name":"status","in":"query","description":" list of statuses the content to be found is in. Defaults to current is not specified. If set to 'any', content in 'current' and 'trashed' status will be fetched. Does not support 'historical' status for now.","schema":{"type":"string"}}],"responses":{"200":{"description":"returns a JSON representation of the list of content.","content":{"application/json":{"schema":{"type":"object","properties":{"results":{"type":"array","items":{"$ref":"#/components/schemas/Content"}},"start":{"type":"number","example":25},"limit":{"type":"number","example":25},"size":{"type":"number","example":25},"_links":{"type":"object","properties":{"base":{"type":"string","example":"http://localhost:8085/rest/api"},"self":{"type":"string","example":"http://localhost:8085/rest/api"},"context":{"type":"string","example":"http://localhost:8085/rest/api"},"next":{"type":"string","example":"http://localhost:8085/rest/api/latest/../paginate?limit=25&start=50"},"prev":{"type":"string","example":"http://localhost:8085/rest/api/latest/../paginate?limit=25&start=0"}}}}}}}},"404":{"description":"returned if the user is not permitted.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestError"}}}}}}},"/rest/api/content/search":{"get":{"tags":["Content Resource"],"summary":"Search content using CQL","description":"Fetch a list of content using the Confluence Query Language (CQL). See: [Advanced searching using CQL](https://developer.atlassian.com/display/CONFDEV/Advanced+Searching+using+CQL) \n\n Example request URI(s): \n\n- `http://localhost:8080/confluence/rest/api/content/search?cql=creator=currentUser()&cqlcontext={\"spaceKey\":\"TST\", \"contentId\":\"55\"}`\n- `http://localhost:8080/confluence/rest/api/content/search?cql=space=DEV AND label=docs&expand=space,metadata.labels&limit=10`","operationId":"search","parameters":[{"name":"cqlcontext","in":"query","description":" the context to execute a cql search in, this is the json serialized form of SearchContext","schema":{"type":"string"}},{"name":"expand","in":"query","description":"a comma separated list of properties to expand on the content. Default value: history,space,version.","schema":{"type":"string"}},{"name":"limit","in":"query","description":"the limit of the number of items to return, this may be restricted by fixed system limits.","schema":{"type":"string"}},{"name":"start","in":"query","description":"the start point of the collection to return.","schema":{"type":"string"}},{"name":"cql","in":"query","description":" a cql query string to use to locate content.","schema":{"type":"string"}}],"responses":{"200":{"description":"returns a paginated list of content.","content":{"application/json":{"schema":{"type":"object","properties":{"results":{"type":"array","items":{"$ref":"#/components/schemas/Content"}},"start":{"type":"number","example":25},"limit":{"type":"number","example":25},"size":{"type":"number","example":25},"_links":{"type":"object","properties":{"base":{"type":"string","example":"http://localhost:8085/rest/api"},"self":{"type":"string","example":"http://localhost:8085/rest/api"},"context":{"type":"string","example":"http://localhost:8085/rest/api"},"next":{"type":"string","example":"http://localhost:8085/rest/api/latest/../paginate?limit=25&start=50"},"prev":{"type":"string","example":"http://localhost:8085/rest/api/latest/../paginate?limit=25&start=0"}}}}}}}},"404":{"description":"Returned if the CQL is invalid or missing.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestError"}}}}}}},"/rest/api/content/{contentId}":{"put":{"tags":["Content Resource"],"summary":"Update content","description":"Updates a piece of Content, including changes to content status. \n\nTo update a piece of content you must increment the `version.number`, supplying the number of the version you are creating. The `title` property can be updated on all content, `body` can be updated on all content that has a body (not attachments). For instance to update the content of a blogpost that currently has version 1:\n\n`PUT /rest/api/content/456`\n\n```json\n{\n \"version\":{\n \"number\": 2\n },\n \"title\":\"My new title\",\n \"type\":\"page\",\n \"body\":{\n \"storage\":{\n \"value\":\"

New page data.

\",\n \"representation\":\"storage\"\n }\n }\n}\n```\n\nTo update a page and change its parent page, supply the `ancestors` property with the request with the parent as the first ancestor i.e. to move a page to be a child of page with ID 789:\n\n`PUT /rest/api/content/456`\n\n```json\n{\n \"version\":{\n \"number\": 2\n },\n \"ancestors\": [{\"id\":789}],\n \"type\":\"page\",\n \"body\":{\n \"storage\":{\n \"value\":\"

New page data.

\",\n \"representation\":\"storage\"\n }\n }\n}\n```\n\nChanging status\n\nTo restore a piece of content that has the status of trashed the content must have it's `version` incremented, and `status` set to `current`. No other field modifications will be performed when restoring a piece of content from the trash.\n\nRequest example to restore from trash: `{\"id\": \"557059\",\"status\": \"current\",\"version\": {\"number\": 2}}`\n\nIf the content you're updating has a draft, specifying `status=draft` will delete that draft and the `body` of the content will be replaced with the `body` specified in the request.\n\nRequest example to delete a draft:\n\n`PUT: http://localhost:9096/confluence/rest/api/content/2149384202?status=draft`\n\n```json\n{\n \"id\":\"2149384202\",\n \"status\":\"current\",\n \"version\":{\n \"number\":4\n },\n \"space\":{\n \"key\":\"TST\"\n },\n \"type\":\"page\",\n \"title\":\"page title\",\n \"body\":{\n \"storage\":{\n \"value\":\"

New page data.

\",\n \"representation\":\"storage\"\n }\n }\n}\n```\n\nChanging page position\n\nTo set page position, supply the `position` property in the request body with a positive integer. Content with unset positions will have a `position` value of -1. To unset a content position, supply `position` property with -1.\n\nRequest example to set page position to 1\n\n`PUT /rest/api/content/2149384202`\n\n```json\n{\n \"id\":\"2149384202\",\n \"version\":{\n \"number\":2\n },\n \"type\":\"page\",\n \"title\":\"page title\",\n \"position\":1\n}\n```\n\n Request example to unset page position \n\n`PUT /rest/api/content/2149384202`\n\n```json\n{\n \"id\":\"2149384202\",\n \"version\":{\n \"number\":2\n },\n \"type\":\"page\",\n \"position\":-1\n}\n```\n\n","operationId":"update_2","parameters":[{"name":"asyncReconciliation","in":"query","schema":{"type":"boolean","default":false}},{"name":"conflictPolicy","in":"query","description":"the conflict policy, default value: abort","schema":{"type":"string"}},{"name":"contentId","in":"path","description":" the id of the content.","required":true,"schema":{"type":"string"}},{"name":"status","in":"query","description":"the existing status of the content to be updated.","schema":{"type":"string"}}],"requestBody":{"description":"new content to be created.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Content"}}},"required":true},"responses":{"200":{"description":"Returns a full JSON representation of a piece of content.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Content"}}}},"400":{"description":"Returned if no space or no content type, or setup a wrong version type set to content, or status param is not draft and status content is current","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestError"}}}},"404":{"description":"Returned if can not find draft with current content.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestError"}}}}}}},"/rest/api/content/{id}/restriction/byOperation":{"get":{"tags":["Content Restrictions"],"summary":"Get all restrictions by Operation","description":"Returns info about all restrictions by operation.","operationId":"byOperation","parameters":[{"name":"expand","in":"query","description":"A comma separated list of properties to expand on the content properties. Default value: group.","schema":{"type":"string"}},{"name":"id","in":"path","description":"The id of the content","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Returns a JSON representation of the restrictions group by operations.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MockRestrictionsResponse"}}}}}}},"/rest/api/content/{id}/restriction/byOperation/{operationKey}":{"get":{"tags":["Content Restrictions"],"summary":"Get all restrictions for given operation","description":"Returns info about all restrictions of given operation.","operationId":"forOperation","parameters":[{"name":"operationKey","in":"path","description":"key of the operation.","required":true,"schema":{"type":"string"}},{"name":"expand","in":"query","description":"Aa comma separated list of properties to expand on the content properties. Default value: group.","schema":{"type":"string"}},{"name":"limit","in":"query","description":"pagination limit.","schema":{"type":"string"}},{"name":"start","in":"query","description":"pagination start.","schema":{"type":"string"}},{"name":"id","in":"path","description":"The id of the content","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Returns a JSON representation of the restrictions of given operation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OperationRestriction"}}}}}}},"/rest/api/content/{id}/restriction":{"put":{"tags":["Content Restrictions"],"summary":"Update restrictions","description":"Sets all the restrictions specified to a piece of content identified by `contentId`. Setting per-content restrictions is currently allowed for Pages or BlogPosts only. \n\nExample request URI: \n\n`http://example.com/confluence/rest/content/1234567/restriction?expand=`\n\nThe payload uses the same schema as returned by the GET requests from `/rest/api/content/{id}/restriction/byOperation*` which can be used as a template but is not necessary. \n\nExample request for a single content restriction: \n\n```json\n[ { \"operation\": \"update\", \"restrictions\": { \"user\": [ { \"type\": \"known\", \"username\": \"admin\" } ] } } ]\n```\n\nExample request for updating two ContentRestrictions: \n\n```json\n[ { \"operation\": \"update\", \"restrictions\": { \"user\": [ { \"type\": \"known\", \"username\": \"admin\" } ] } }, { \"operation\": \"read\", \"restrictions\": { \"user\": [ { \"type\": \"known\", \"username\": \"fred\" } ] } } ]\n```\n\nRules for using this method: \n\n- The provided ContentRestrictions will overwrite any existing restrictions on the Content for the corresponding operations. \n- If the provided `ContentRestriction` lacks any supported operations, the restrictions for the operations will not be altered. \n- Setting `users` and/or `groups` map entries as empty arrays will remove the corresponding content restrictions. \n- Missing `users` and/or `groups` map entries means the corresponding operation's user/group content restrictions won't be changed. \n- Modifying restrictions to revoke the requesting user's access is prohibited.","operationId":"updateRestrictions","parameters":[{"name":"expand","in":"query","description":"A comma separated list of properties to expand in the response. Default is restrictions.user, restrictions.group Default value: group.","schema":{"type":"string"}},{"name":"limit","in":"query","description":"pagination limit.","schema":{"type":"string"}},{"name":"start","in":"query","description":"pagination start.","schema":{"type":"string"}},{"name":"id","in":"path","description":"The id of the content","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ContentRestriction"}}}}},"responses":{"200":{"description":"Returns a full JSON representation of the restrictions present directly on piece of content after the update operation.","content":{"application/json":{"schema":{"type":"object","properties":{"results":{"type":"array","items":{"$ref":"#/components/schemas/OperationRestriction"}},"start":{"type":"number","example":25},"limit":{"type":"number","example":25},"size":{"type":"number","example":25},"_links":{"type":"object","properties":{"base":{"type":"string","example":"http://localhost:8085/rest/api"},"self":{"type":"string","example":"http://localhost:8085/rest/api"},"context":{"type":"string","example":"http://localhost:8085/rest/api"},"next":{"type":"string","example":"http://localhost:8085/rest/api/latest/../paginate?limit=25&start=50"},"prev":{"type":"string","example":"http://localhost:8085/rest/api/latest/../paginate?limit=25&start=0"}}}}}}}},"400":{"description":"Returned if any of the above validation rules are violated.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestError"}}}},"401":{"description":"Returned if the calling user is not authenticated.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestError"}}}},"403":{"description":"Returned if the calling user does not have permission to edit the restrictions.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestError"}}}},"404":{"description":"Returned if there is no content with the given id, or if the calling user does not have permission to view the content.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestError"}}}}}}},"/rest/api/content/{id}/version/{versionNumber}":{"delete":{"tags":["Content Version"],"summary":"Delete content history","description":"Delete a historical version of a page or a blogpost. Current user must have edit permission on content, or it will throw a permission exception.","operationId":"deleteContentHistory","parameters":[{"name":"id","in":"path","description":"The id of the content","required":true,"schema":{"type":"string"}},{"name":"versionNumber","in":"path","description":"version number starts from 1 up to current version.","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"Returns a Successful deletion of a page/blogpost version."},"400":{"description":"Returned if versionNumber is less than 1, does not exist or has already been deleted.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestError"}}}},"403":{"description":"Returned if the calling user doesn't have permission to edit the content.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestError"}}}},"404":{"description":"Returned if the contentId cannot be found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestError"}}}}}}},"/rest/api/content/{contentId}/watchers":{"get":{"tags":["Content Watchers"],"summary":"Fetch users watching a given content","description":"Returns a paginated list of Users watching the given Content identified by contentId. Only a Confluence Administrator or Space Administrator can perform this action.","operationId":"index","parameters":[{"name":"contentId","in":"path","description":"the ID of the Content the User is attempting to view the watchers for.","required":true,"schema":{"type":"string"}},{"name":"limit","in":"query","description":"The limit of the number of users to return, this may be restricted by fixed system limit.","schema":{"type":"string"}},{"name":"start","in":"query","description":"The start point of the collection to return.","schema":{"type":"string"}}],"responses":{"200":{"description":"The list of Users watching the Content.","content":{"application/json":{"schema":{"type":"object","properties":{"results":{"type":"array","items":{"$ref":"#/components/schemas/User"}},"start":{"type":"number","example":25},"limit":{"type":"number","example":25},"size":{"type":"number","example":25},"_links":{"type":"object","properties":{"base":{"type":"string","example":"http://localhost:8085/rest/api"},"self":{"type":"string","example":"http://localhost:8085/rest/api"},"context":{"type":"string","example":"http://localhost:8085/rest/api"},"next":{"type":"string","example":"http://localhost:8085/rest/api/latest/../paginate?limit=25&start=50"},"prev":{"type":"string","example":"http://localhost:8085/rest/api/latest/../paginate?limit=25&start=0"}}}}}}}},"400":{"description":"Returned if the requested Content is not of type BlogPost or Page.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestError"}}}},"401":{"description":"Returned if the calling User is not authenticated.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestError"}}}},"403":{"description":"Returned if the calling User is not a Confluence Administrator or Space Administrator.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestError"}}}},"404":{"description":"Returned if the Content does not exist.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestError"}}}}}}},"/rest/api/content/{id}/descendant":{"get":{"tags":["Content Descendant"],"summary":"Get Descendants","description":"Returns a map of the descendants of a piece of Content. Content can have multiple types of descendants - for example a Page can have descendants that are also Pages, but it can also have Comments and Attachments. \n\nThe ContentType(s) of the descendants returned is specified by the `expand` query parameter in the request - this parameter can include expands for multiple descendant types. If no types are included in the expand parameter, the map returned will just list the descendant types that are available to be expanded for the Content referenced by the `id` path parameter. \n\nCurrently the only supported descendants are comment descendants of non-comment Content. \n\nExample request URI(s): \n\n`http://example.com/confluence/rest/api/content/1234/descendant` \n\n`http://example.com/confluence/rest/api/content/1234/descendant?expand=comment.body.VIEW` \n\n`http://example.com/confluence/rest/api/content/1234/descendant?expand=comment`","operationId":"descendants","parameters":[{"name":"expand","in":"query","description":" a comma separated list of properties to expand on the descendants.","schema":{"type":"string"}},{"name":"id","in":"path","description":"the ID of the Content the User is attempting to view the descendants for.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Returns a JSON map representing multiple ordered collections of content descendants,keyed by content type.","content":{"application/json":{"schema":{"type":"object","properties":{"results":{"type":"array","items":{"$ref":"#/components/schemas/Content"}},"start":{"type":"number","example":25},"limit":{"type":"number","example":25},"size":{"type":"number","example":25},"_links":{"type":"object","properties":{"base":{"type":"string","example":"http://localhost:8085/rest/api"},"self":{"type":"string","example":"http://localhost:8085/rest/api"},"context":{"type":"string","example":"http://localhost:8085/rest/api"},"next":{"type":"string","example":"http://localhost:8085/rest/api/latest/../paginate?limit=25&start=50"},"prev":{"type":"string","example":"http://localhost:8085/rest/api/latest/../paginate?limit=25&start=0"}}}}}}}},"404":{"description":"Returned if there is no content with the given id, or if the calling user does not have permission to view the content.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestError"}}}}}}},"/rest/api/content/{id}/descendant/{type}":{"get":{"tags":["Content Descendant"],"summary":"Get descendants of type","description":"Returns the direct descendants of a piece of Content. The ContentType(s) of the descendants returned is specified by the `type` path parameter in the request. Currently the only supported descendants are comment descendants of non-comment Content. \n\nExample request URI(s): \n\n`http://example.com/confluence/rest/api/content/1234/descendant/comment` \n\n`http://example.com/confluence/rest/api/content/1234/descendant/comment?expand=body.VIEW` \n\n`http://example.com/confluence/rest/api/content/1234/descendant/comment?start=20&limit=10`","operationId":"descendantsOfType","parameters":[{"name":"expand","in":"query","description":"a comma separated list of properties to expand on the descendants.","schema":{"type":"string"}},{"name":"limit","in":"query","description":" (optional, default: site limit) how many items should be returned after the start index.","schema":{"type":"string"}},{"name":"start","in":"query","description":"(optional, default: 0) the index of the first item within the result set that should be returned.","schema":{"type":"string"}},{"name":"id","in":"path","description":"the ID of the Content the User is attempting to view the descendants for.","required":true,"schema":{"type":"string"}},{"name":"type","in":"path","description":" content type to filter descendants on.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Returns a JSON map representing multiple ordered collections of content descendants, keyed by content type.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Content"}}}},"404":{"description":"Returned if there is no content with the given id, or if the calling user does not have permission to view the content.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestError"}}}}}}},"/rest/api/color-scheme/default":{"get":{"tags":["GlobalColorScheme"],"summary":"Get default global color scheme","description":"Get default color scheme for the instance\n\n","operationId":"getDefaultColorScheme","responses":{"200":{"description":"Returns a full JSON representation of color scheme including light and dark theme","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ColorSchemeThemeBasedModel"}}}}}}},"/rest/api/color-scheme":{"get":{"tags":["GlobalColorScheme"],"summary":"Get global color scheme","description":"Get information about the current color scheme for the instance\n\n","operationId":"getGlobalColorScheme","responses":{"200":{"description":"Returns a full JSON representation of color scheme including light and dark theme","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ColorSchemeThemeBasedModel"}}}}}},"put":{"tags":["GlobalColorScheme"],"summary":"Set global color scheme","description":"Update the current color scheme of the instance\n\n","operationId":"updateColorScheme","requestBody":{"description":"New color scheme","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ColorSchemeThemeBasedModel"}}}},"responses":{"200":{"description":"Returns a full JSON representation of the updated color scheme","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ColorSchemeThemeBasedModel"}}}},"400":{"description":"Returned if there are invalid colors in the request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestError"}}}},"403":{"description":"Returned if the user is not a site admin","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestError"}}}}}}},"/rest/api/color-scheme/reset":{"put":{"tags":["GlobalColorScheme"],"summary":"Reset global color scheme","description":"Reset the global color scheme colors to default\n\n","operationId":"resetGlobalColorScheme","responses":{"200":{"description":"Returns a full JSON representation of color scheme","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ColorSchemeThemeBasedModel"}}}},"403":{"description":"Returned if the user is not a site admin","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestError"}}}}}}},"/rest/api/webhooks":{"get":{"tags":["Webhooks"],"summary":"Find webhooks","description":"Find webhooks. The authenticated user must be an administrator to call this resource.","operationId":"findWebhooks","parameters":[{"name":"limit","in":"query","description":"the limit of the number of items to return, this may be restricted by fixed system limits.","schema":{"type":"string"}},{"name":"start","in":"query","description":"the start point of the collection to return","schema":{"type":"string"}},{"name":"event","in":"query","description":"list of webhook event ids to filter for","schema":{"type":"string"}},{"name":"statistics","in":"query","description":"if statistics should be provided for all found webhooks.","schema":{"type":"string"}}],"responses":{"200":{"description":"returns a list of webhooks.","content":{"application/json":{"schema":{"type":"object","properties":{"results":{"type":"array","items":{"$ref":"#/components/schemas/RestWebhook"}},"start":{"type":"number","example":25},"limit":{"type":"number","example":25},"size":{"type":"number","example":25},"_links":{"type":"object","properties":{"base":{"type":"string","example":"http://localhost:8085/rest/api"},"self":{"type":"string","example":"http://localhost:8085/rest/api"},"context":{"type":"string","example":"http://localhost:8085/rest/api"},"next":{"type":"string","example":"http://localhost:8085/rest/api/latest/../paginate?limit=25&start=50"},"prev":{"type":"string","example":"http://localhost:8085/rest/api/latest/../paginate?limit=25&start=0"}}}}}}}},"401":{"description":"returned if the currently authenticated user has insufficient permissions to find webhooks.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestError"}}}}}},"post":{"tags":["Webhooks"],"summary":"Create webhook","description":"Create a webhook via the URL. The authenticated user must be an administrator to call this resource.","operationId":"createWebhook","requestBody":{"description":"the webhook to be created.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestWebhook"}}},"required":true},"responses":{"201":{"description":"returns a created webhook.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Webhook"}}}},"400":{"description":"returned if The webhook parameters were invalid or not supplied.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestError"}}}},"401":{"description":"The currently authenticated user has insufficient permissions to create webhooks.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestError"}}}}}}},"/rest/api/webhooks/{webhookId}":{"get":{"tags":["Webhooks"],"summary":"Get webhook","description":"Get a webhook by id. The authenticated user must be an administrator to call this resource.","operationId":"getWebhook","parameters":[{"name":"webhookId","in":"path","description":"id of the webhook","required":true,"schema":{"type":"string"}},{"name":"statistics","in":"query","schema":{"type":"boolean","default":false}}],"responses":{"200":{"description":"returns a webhook.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestWebhook"}}}},"401":{"description":"returned if the currently authenticated user has insufficient permissions to get webhook.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestError"}}}},"404":{"description":"returned if the webhook does not exist.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestError"}}}}}},"put":{"tags":["Webhooks"],"summary":" Update webhook","description":" Update an existing webhook. The authenticated user must be an administrator to call this resource.","operationId":"updateWebhook","parameters":[{"name":"webhookId","in":"path","description":"the existing webhook id","required":true,"schema":{"type":"string"}}],"requestBody":{"description":"the representation of the updated values for the webhook","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestWebhook"}}},"required":true},"responses":{"200":{"description":"returns a webhook.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestWebhook"}}}},"401":{"description":"returned if the currently authenticated user has insufficient permissions to update a webhook.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestError"}}}},"404":{"description":"returned if the webhook does not exist.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestError"}}}}}},"delete":{"tags":["Webhooks"],"summary":"Delete webhook","description":"Delete a webhook via the URL. The authenticated user must be an administrator to call this resource.","operationId":"deleteWebhook","parameters":[{"name":"webhookId","in":"path","description":"the id of the webhook to be deleted.","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"returned if deleted successfully."},"401":{"description":"returned if the currently authenticated user has insufficient permissions to delete webhooks.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestError"}}}},"404":{"description":"returned if the webhook does not exist.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestError"}}}}}}},"/rest/api/webhooks/{webhookId}/latest":{"get":{"tags":["Webhooks"],"summary":"Get latest invocations","description":"Get the latest invocations for a specific webhook. The authenticated user must be an administrator to call this resource.","operationId":"getLatestInvocation","parameters":[{"name":"webhookId","in":"path","description":"id of the webhook","required":true,"schema":{"type":"string"}},{"name":"outcomes","in":"query","description":"the outcome to filter for. Can be SUCCESS, FAILURE, ERROR. None specified means that the all will be considered.","schema":{"type":"string"}},{"name":"event","in":"query","description":"the string id of a specific event to retrieve the last invocation for.","schema":{"type":"string"}},{"name":"outcome","in":"query","schema":{"uniqueItems":true,"type":"array","items":{"type":"string"}}}],"responses":{"200":{"description":"returns a webhook invocation dataset.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DetailedInvocation"}}}},"401":{"description":"returned if the currently authenticated user has insufficient permissions to get webhook.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestError"}}}},"404":{"description":"returned if the webhook does not exist.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestError"}}}}}}},"/rest/api/webhooks/{webhookId}/statistics":{"get":{"tags":["Webhooks"],"summary":"Get statistic","description":"Get the statistics for a specific webhook. The authenticated user must be an administrator to call this resource.","operationId":"getStatistics","parameters":[{"name":"webhookId","in":"path","description":"id of the webhook","required":true,"schema":{"type":"string"}},{"name":"event","in":"query","description":"the string id of a specific event to retrieve the last invocation for.","schema":{"type":"string"}}],"responses":{"200":{"description":"returns a webhook invocation dataset.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestInvocationHistory"}}}},"401":{"description":"returned if the currently authenticated user has insufficient permissions to get webhook.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestError"}}}},"404":{"description":"returned if the webhook does not exist.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestError"}}}}}}},"/rest/api/webhooks/{webhookId}/statistics/summary":{"get":{"tags":["Webhooks"],"summary":"Get statistics summary","description":"Get the statistics summary for a specific webhook. The authenticated user must be an administrator to call this resource.","operationId":"getStatisticsSummary","parameters":[{"name":"webhookId","in":"path","description":"id of the webhook","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"returns a webhook invocation dataset.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestInvocationHistory"}}}},"401":{"description":"returned if the currently authenticated user has insufficient permissions to get webhook.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestError"}}}},"404":{"description":"returned if the webhook does not exist.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestError"}}}}}}},"/rest/api/webhooks/test":{"post":{"tags":["Webhooks"],"summary":"Test webhook","description":"Test connectivity to a specific endpoint. The authenticated user must be an administrator to call this resource.","operationId":"testWebhook","parameters":[{"name":"url","in":"query","description":"the url in which to connect to","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"returns a webhook.","content":{"application/json":{}}},"401":{"description":"returned if the currently authenticated user has insufficient permissions to test a connection.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestError"}}}},"404":{"description":"returned if repository does not exist.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestError"}}}}}}},"/rest/api/group/{groupName}":{"get":{"tags":["Group"],"summary":"Get group by name","description":"Get the user group with the group name","operationId":"getGroup","parameters":[{"name":"expand","in":"query","schema":{"type":"string"}},{"name":"groupName","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The user group with the group name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Group"}}}},"403":{"description":"The calling user does not have permission to view groups","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestError"}}}}}}},"/rest/api/group":{"get":{"tags":["Group"],"summary":"Get groups","description":"Get a paginated collection of user groups","operationId":"getGroups","parameters":[{"name":"expand","in":"query","schema":{"type":"string","default":""}},{"name":"limit","in":"query","schema":{"type":"integer","format":"int32","default":200}},{"name":"start","in":"query","schema":{"type":"integer","format":"int32"}}],"responses":{"200":{"description":"The number of user groups in the system","content":{"application/json":{"schema":{"type":"object","properties":{"results":{"type":"array","items":{"$ref":"#/components/schemas/Group"}},"start":{"type":"number","example":25},"limit":{"type":"number","example":25},"size":{"type":"number","example":25},"_links":{"type":"object","properties":{"base":{"type":"string","example":"http://localhost:8085/rest/api"},"self":{"type":"string","example":"http://localhost:8085/rest/api"},"context":{"type":"string","example":"http://localhost:8085/rest/api"},"next":{"type":"string","example":"http://localhost:8085/rest/api/latest/../paginate?limit=25&start=50"},"prev":{"type":"string","example":"http://localhost:8085/rest/api/latest/../paginate?limit=25&start=0"}}}}}}}},"403":{"description":"The calling user does not have permission to view groups","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestError"}}}}}}},"/rest/api/group/{groupName}/member":{"get":{"tags":["Group"],"summary":"Get members of group","description":"Get a paginated collection of users in the given group","operationId":"getMembers","parameters":[{"name":"expand","in":"query","schema":{"type":"string"}},{"name":"groupName","in":"path","required":true,"schema":{"$ref":"#/components/schemas/Group"}},{"name":"limit","in":"query","schema":{"type":"integer","format":"int32","default":200}},{"name":"start","in":"query","schema":{"type":"integer","format":"int32"}}],"responses":{"200":{"description":"a collection of users in the given group","content":{"application/json":{"schema":{"type":"object","properties":{"results":{"type":"array","items":{"$ref":"#/components/schemas/Person"}},"start":{"type":"number","example":25},"limit":{"type":"number","example":25},"size":{"type":"number","example":25},"_links":{"type":"object","properties":{"base":{"type":"string","example":"http://localhost:8085/rest/api"},"self":{"type":"string","example":"http://localhost:8085/rest/api"},"context":{"type":"string","example":"http://localhost:8085/rest/api"},"next":{"type":"string","example":"http://localhost:8085/rest/api/latest/../paginate?limit=25&start=50"},"prev":{"type":"string","example":"http://localhost:8085/rest/api/latest/../paginate?limit=25&start=0"}}}}}}}},"403":{"description":"The calling user does not have permission to view groups","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestError"}}}}}}},"/rest/api/instance-metrics":{"get":{"tags":["Instance Metrics"],"summary":"Get instance metrics","description":"Returns simple metrics about this instance.","operationId":"index_1","responses":{"200":{"description":"The instance metrics.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InstanceMetrics"}}}},"401":{"description":"Returned if the calling User is not authenticated.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestError"}}}},"403":{"description":"Returned if the calling User does not have necessary permission.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestError"}}}}}}},"/rest/api/label/{labelName}/related":{"get":{"tags":["Label"],"summary":"Get related labels, currently returning global labels only.","description":"Return labels related to the given label name sorted by frequency of use in descending order,\nwith a specified limit of results. The current process for identifying related labels solely\nexamines global labels, but it may change in the future.\n\nExample request URI's:\n`https://example.com/confluence/rest/api/label/test_label_name/related`\n`https://example.com/confluence/rest/api/label/my:test_label_name/related?limit=200`","operationId":"getRelatedLabels","parameters":[{"name":"limit","in":"query","description":"the maximum number of related labels to return. Default to be 100.","schema":{"type":"string"}},{"name":"labelName","in":"path","description":"the name of the label (namespace prefixes permitted).","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Return a JSON representation of related labels to the given label name","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Label"}}}},"400":{"description":"Return a bad request error if the given label name is invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestError"}}}},"404":{"description":"Return a not found error if the given label name is not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestError"}}}}}}},"/rest/api/label/recent":{"get":{"tags":["Label"],"summary":"Get recently used labels","description":"Returns a paginated list of recently used labels within a Confluence instance. Labels are sorted\nfrom most to least recently used.\n\nExample request URI's:\n`https://example.com/confluence/rest/api/label/recent`\n`https://example.com/confluence/rest/api/label/recent?start=2&limit=1`","operationId":"recent","parameters":[{"name":"limit","in":"query","description":"the limit of the number of labels to return, this may be restricted by fixed system limits","schema":{"type":"string"}},{"name":"start","in":"query","description":"the start point of the collection to return.","schema":{"type":"string"}}],"responses":{"200":{"description":"a JSON representation of a list of labels, or an empty list if no labels are found.","content":{"application/json":{"schema":{"type":"object","properties":{"results":{"type":"array","items":{"$ref":"#/components/schemas/Label"}},"start":{"type":"number","example":25},"limit":{"type":"number","example":25},"size":{"type":"number","example":25},"_links":{"type":"object","properties":{"base":{"type":"string","example":"http://localhost:8085/rest/api"},"self":{"type":"string","example":"http://localhost:8085/rest/api"},"context":{"type":"string","example":"http://localhost:8085/rest/api"},"next":{"type":"string","example":"http://localhost:8085/rest/api/latest/../paginate?limit=25&start=50"},"prev":{"type":"string","example":"http://localhost:8085/rest/api/latest/../paginate?limit=25&start=0"}}}}}}}},"403":{"description":"If the calling user does not have permission to retrieve recently used labels.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestError"}}}}}}},"/rest/api/longtask/{id}":{"get":{"tags":["Long Task"],"summary":"Get task by ID","description":"Returns information about a long-running task.","operationId":"getTask","parameters":[{"name":"expand","in":"query","description":"a comma separated list of properties to expand on the task.","schema":{"type":"string"}},{"name":"id","in":"path","description":" the key of the task to be returned.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"returns a full JSON representation of a long task.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LongTaskStatus"}}}},"404":{"description":"Returned if there is no task with the given key, or if the calling user does not have permission to view it","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestError"}}}}}}},"/rest/api/longtask":{"get":{"tags":["Long Task"],"summary":"Get tasks","description":"Returns information about all tracked long-running tasks.","operationId":"getTasks","parameters":[{"name":"expand","in":"query","description":"comma separated list of properties to expand on the tasks.","schema":{"type":"string"}},{"name":"limit","in":"query","description":"the limit of the number of items to return, this may be restricted by fixed system limits","schema":{"type":"string"}},{"name":"start","in":"query","description":"the start point of the collection to return.","schema":{"type":"string"}}],"responses":{"200":{"description":"returns a full JSON representation of a list of long tasks.","content":{"application/json":{"schema":{"type":"object","properties":{"results":{"type":"array","items":{"$ref":"#/components/schemas/LongTaskStatus"}},"start":{"type":"number","example":25},"limit":{"type":"number","example":25},"size":{"type":"number","example":25},"_links":{"type":"object","properties":{"base":{"type":"string","example":"http://localhost:8085/rest/api"},"self":{"type":"string","example":"http://localhost:8085/rest/api"},"context":{"type":"string","example":"http://localhost:8085/rest/api"},"next":{"type":"string","example":"http://localhost:8085/rest/api/latest/../paginate?limit=25&start=50"},"prev":{"type":"string","example":"http://localhost:8085/rest/api/latest/../paginate?limit=25&start=0"}}}}}}}}}}},"/rest/api/search":{"get":{"tags":["Search"],"summary":"Search for entities in confluence","description":"Search for entities in Confluence using the [Confluence Query Language (CQL)](https://developer.atlassian.com/confdev/confluence-rest-api/advanced-searching-using-cql). For example:\n\nExample request URI(s):\n\n- `http://localhost:8080/confluence/rest/api/search?cql=creator=currentUser()&type%20in%20(space,page,user)&cqlcontext={\"spaceKey\":\"TST\", \"contentId\":\"55\"}`\n\n- `http://localhost:8080/confluence/rest/api/search?cql=siteSearch~'example'%20AND%20label=docs&expand=content.space,space.homepage&limit=10`","operationId":"search_1","parameters":[{"name":"cqlcontext","in":"query","description":"the execution context for CQL functions, provides current space key and content id. If this is not provided some CQL functions will not be available.","schema":{"type":"string"}},{"name":"expand","in":"query","description":"the properties to expand on the search result, this may cause database requests for some properties","schema":{"type":"string"}},{"name":"includeArchivedSpaces","in":"query","description":"whether to include content in archived spaces in the result, this defaults to false.","schema":{"type":"string"}},{"name":"limit","in":"query","description":"the limit of the number of items to return, this may be restricted by fixed system limits.","schema":{"type":"string"}},{"name":"start","in":"query","description":"he start point of the collection to return.","schema":{"type":"string"}},{"name":"excerpt","in":"query","description":"the excerpt strategy to apply to the result, one of : indexed, highlight, none. This defaults to highlight.","schema":{"type":"string"}},{"name":"cql","in":"query","description":"the CQL query see advanced searching in confluence using CQL","schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"string"}}}},"responses":{"200":{"description":"returns a full JSON representation of a list of search results.","content":{"application/json":{"schema":{"type":"object","properties":{"results":{"type":"array","items":{"$ref":"#/components/schemas/SearchResult"}},"start":{"type":"number","example":25},"limit":{"type":"number","example":25},"size":{"type":"number","example":25},"_links":{"type":"object","properties":{"base":{"type":"string","example":"http://localhost:8085/rest/api"},"self":{"type":"string","example":"http://localhost:8085/rest/api"},"context":{"type":"string","example":"http://localhost:8085/rest/api"},"next":{"type":"string","example":"http://localhost:8085/rest/api/latest/../paginate?limit=25&start=50"},"prev":{"type":"string","example":"http://localhost:8085/rest/api/latest/../paginate?limit=25&start=0"}}}}}}}},"400":{"description":"returned if the query cannot be parsed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestError"}}}}}}},"/rest/api/server-information":{"get":{"tags":["Server Information"],"summary":"Get server information","description":"Returns information about the current application build running on this instance.","operationId":"index_2","responses":{"200":{"description":"The server build information.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ServerInformation"}}}},"401":{"description":"Returned if the calling User is not authenticated.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestError"}}}}}}},"/rest/api/space/{spaceKey}/color-scheme/type":{"get":{"tags":["SpaceColorScheme"],"summary":"Get Space color scheme type","description":"Get the current color scheme type used for a space, it can be global or custom\n\n","operationId":"getColorSchemeType","parameters":[{"name":"spaceKey","in":"path","description":"Space key of the space to request color scheme type for.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Returns a color scheme type","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SpaceColorSchemeTypeModel"}}}},"403":{"description":"Returned if a space with the user for given space key is not space admin.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestError"}}}},"404":{"description":"Returned if a space with the given space key does not exist.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestError"}}}}}},"put":{"tags":["SpaceColorScheme"],"summary":"Update Space color scheme type","description":"Update the color scheme type used for a space, currently it can be global or custom\n\n","operationId":"updateColorSchemeType","parameters":[{"name":"spaceKey","in":"path","description":"space key of the space to update color scheme type for.","required":true,"schema":{"type":"string"}}],"requestBody":{"description":"New color scheme type","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SpaceColorSchemeTypeModel"}}}},"responses":{"200":{"description":"Returns the updated color scheme type","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SpaceColorSchemeTypeModel"}}}},"400":{"description":"Returned if space type is invalid in the request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestError"}}}},"403":{"description":"Returned if a space with the user is not space admin for the given space.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestError"}}}},"404":{"description":"Returned if a space with the given space key does not exist.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestError"}}}}}}},"/rest/api/space/{spaceKey}/color-scheme":{"get":{"tags":["SpaceColorScheme"],"summary":"Get Space color scheme","description":"Get information about the current color scheme for a space\n\n","operationId":"getSpaceColorScheme","parameters":[{"name":"spaceKey","in":"path","description":"space key of the space to request color scheme for.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Returns a full JSON representation of color scheme","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ColorSchemeThemeBasedModel"}}}},"403":{"description":"Returned if a space with the user is not space admin for the given space.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestError"}}}},"404":{"description":"Returned if a space with the given space key does not exist.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestError"}}}}}},"put":{"tags":["SpaceColorScheme"],"summary":"Update Space color scheme","description":"Update the color scheme for a space\n\n","operationId":"updateSpaceColorScheme","parameters":[{"name":"spaceKey","in":"path","description":"space key of the space to set color scheme for.","required":true,"schema":{"type":"string"}}],"requestBody":{"description":"New color scheme","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ColorSchemeThemeBasedModel"}}}},"responses":{"200":{"description":"Returns a full JSON representation of color scheme","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ColorSchemeThemeBasedModel"}}}},"400":{"description":"Returned if there are invalid colors in the request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestError"}}}},"403":{"description":"Returned if a space with the user is not space admin for the given space.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestError"}}}},"404":{"description":"Returned if a space with the given space key does not exist.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestError"}}}}}}},"/rest/api/space/{spaceKey}/color-scheme/reset":{"put":{"tags":["SpaceColorScheme"],"summary":"Reset Space color scheme","description":"Reset the space color scheme to use global color scheme\n\n","operationId":"resetSpaceColorScheme","parameters":[{"name":"spaceKey","in":"path","description":"Space key of the space to reset color scheme for.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Returns a JSON representation of color scheme","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ColorSchemeThemeBasedModel"}}}},"403":{"description":"Returned if a space with the user is not space admin for the given space.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestError"}}}},"404":{"description":"Returned if a space with the given space key does not exist.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestError"}}}}}}},"/rest/api/space/{spaceKey}/labels":{"get":{"tags":["Space Label"],"summary":"Fetch all labels","description":"Returns a paginated list of all Labels used by Content within the given Space. This includes Labels used by Pages, Blog Posts, and other Content types.\n\nExample request URI:\n`https://example.com/confluence/rest/api/space/TEST/labels`","operationId":"index_3","parameters":[{"name":"spaceKey","in":"path","description":"a string containing the key of the space","required":true,"schema":{"type":"string"}},{"name":"limit","in":"query","description":"the limit of the number of labels to return, this may be restricted by fixed system limits","schema":{"type":"string"}},{"name":"start","in":"query","description":"the start point of the collection to return.","schema":{"type":"string"}}],"responses":{"200":{"description":"a JSON representation of the lists label, or an empty list if no labels are found.","content":{"application/json":{"schema":{"type":"object","properties":{"results":{"type":"array","items":{"$ref":"#/components/schemas/Label"}},"start":{"type":"number","example":25},"limit":{"type":"number","example":25},"size":{"type":"number","example":25},"_links":{"type":"object","properties":{"base":{"type":"string","example":"http://localhost:8085/rest/api"},"self":{"type":"string","example":"http://localhost:8085/rest/api"},"context":{"type":"string","example":"http://localhost:8085/rest/api"},"next":{"type":"string","example":"http://localhost:8085/rest/api/latest/../paginate?limit=25&start=50"},"prev":{"type":"string","example":"http://localhost:8085/rest/api/latest/../paginate?limit=25&start=0"}}}}}}}},"403":{"description":"If the calling user does not have permission to view the given space.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestError"}}}},"404":{"description":"Returned if there is no space with the given spaceKey.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestError"}}}}}}},"/rest/api/space/{spaceKey}/labels/popular":{"get":{"tags":["Space Label"],"summary":"Get popular labels","description":"Returns a paginated list of all Labels used by Content within the given Space. This includes Labels used by Pages, Blog Posts, and other Content types.\n\nExample request URI(s):\n`https://example.com/confluence/rest/api/space/TEST/labels`","operationId":"popular","parameters":[{"name":"spaceKey","in":"path","description":"a string containing the key of the space","required":true,"schema":{"type":"string"}},{"name":"limit","in":"query","description":"the limit of the number of labels to return, this may be restricted by fixed system limits","schema":{"type":"string"}},{"name":"start","in":"query","description":"the start point of the collection to return.","schema":{"type":"string"}}],"responses":{"200":{"description":"returns a JSON representation of the lists label, or an empty list if no labels are found.","content":{"application/json":{"schema":{"type":"object","properties":{"results":{"type":"array","items":{"$ref":"#/components/schemas/Label"}},"start":{"type":"number","example":25},"limit":{"type":"number","example":25},"size":{"type":"number","example":25},"_links":{"type":"object","properties":{"base":{"type":"string","example":"http://localhost:8085/rest/api"},"self":{"type":"string","example":"http://localhost:8085/rest/api"},"context":{"type":"string","example":"http://localhost:8085/rest/api"},"next":{"type":"string","example":"http://localhost:8085/rest/api/latest/../paginate?limit=25&start=50"},"prev":{"type":"string","example":"http://localhost:8085/rest/api/latest/../paginate?limit=25&start=0"}}}}}}}},"403":{"description":"returned if the calling user does not have permission to view the given space.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestError"}}}},"404":{"description":"returned if there is no space with the given spaceKey.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestError"}}}}}}},"/rest/api/space/{spaceKey}/labels/recent":{"get":{"tags":["Space Label"],"summary":"Get recent labels","description":"Returns a paginated list of the most recent Labels used by Content within the given Space. This includes Labels used by Pages, Blog Posts, and other Content types.\n\nExample request URI:\n`https://example.com/confluence/rest/api/space/TEST/labels/recent`","operationId":"recent_1","parameters":[{"name":"spaceKey","in":"path","description":"a string containing the key of the space","required":true,"schema":{"type":"string"}},{"name":"limit","in":"query","description":"the limit of the number of labels to return, this may be restricted by fixed system limits","schema":{"type":"string"}},{"name":"start","in":"query","description":"the start point of the collection to return.","schema":{"type":"string"}}],"responses":{"200":{"description":"returns a full JSON representation of a piece of content.","content":{"application/json":{"schema":{"type":"object","properties":{"results":{"type":"array","items":{"$ref":"#/components/schemas/Label"}},"start":{"type":"number","example":25},"limit":{"type":"number","example":25},"size":{"type":"number","example":25},"_links":{"type":"object","properties":{"base":{"type":"string","example":"http://localhost:8085/rest/api"},"self":{"type":"string","example":"http://localhost:8085/rest/api"},"context":{"type":"string","example":"http://localhost:8085/rest/api"},"next":{"type":"string","example":"http://localhost:8085/rest/api/latest/../paginate?limit=25&start=50"},"prev":{"type":"string","example":"http://localhost:8085/rest/api/latest/../paginate?limit=25&start=0"}}}}}}}},"403":{"description":"If the calling user does not have permission to view the given space.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestError"}}}},"404":{"description":"Returned if there is no space with the given spaceKey.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestError"}}}}}}},"/rest/api/space/{spaceKey}/labels/{labelName}/related":{"get":{"tags":["Space Label"],"summary":"Get related labels","description":"Returns a paginated list of related Labels used by Content within the given Space. A Label is defined as being related to another when it is found attached to the same Content as the Label specified in the request.\n\nExample request URI:\n`https://example.com/confluence/rest/api/space/TEST/labels/example-label/related`","operationId":"related","parameters":[{"name":"spaceKey","in":"path","description":"a string containing the key of the space","required":true,"schema":{"type":"string"}},{"name":"limit","in":"query","description":"the limit of the number of labels to return, this may be restricted by fixed system limits","schema":{"type":"string"}},{"name":"start","in":"query","description":"the start point of the collection to return.","schema":{"type":"string"}},{"name":"labelName","in":"path","description":"a string containing the name of the label","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"a JSON representation of the lists label, or an empty list if no labels are found.","content":{"application/json":{"schema":{"type":"object","properties":{"results":{"type":"array","items":{"$ref":"#/components/schemas/Label"}},"start":{"type":"number","example":25},"limit":{"type":"number","example":25},"size":{"type":"number","example":25},"_links":{"type":"object","properties":{"base":{"type":"string","example":"http://localhost:8085/rest/api"},"self":{"type":"string","example":"http://localhost:8085/rest/api"},"context":{"type":"string","example":"http://localhost:8085/rest/api"},"next":{"type":"string","example":"http://localhost:8085/rest/api/latest/../paginate?limit=25&start=50"},"prev":{"type":"string","example":"http://localhost:8085/rest/api/latest/../paginate?limit=25&start=0"}}}}}}}},"403":{"description":"If the calling user does not have permission to view the given space.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestError"}}}},"404":{"description":"Returned if there is no space with the given spaceKey.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestError"}}}}}}},"/rest/api/space/{spaceKey}/permissions":{"get":{"tags":["Space Permissions"],"summary":"Get all space permissions","description":"Returns list of permissions granted to users and groups in the particular space.\n\nExample request URI's:\n`https://example.com/confluence/rest/api/space/TESTSPACE/permissions`","operationId":"getAllSpacePermissions","parameters":[{"name":"spaceKey","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Returns a JSON representation of all permissions granted to users/groups/anonymous user in specified space.","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/SpacePermission"}}}}},"401":{"description":"Returned if the calling User is not authenticated.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestError"}}}},"403":{"description":"Returned if the calling User does not have necessary permission.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestError"}}}}}},"post":{"tags":["Space Permissions"],"summary":"Set permissions to multiple users/groups/anonymous user in the given space","description":"Sets permissions to multiple users/groups in the given space.\nRequest should contain all permissions that user/group/anonymous user will have in a given space.\nIf permission is absent in the request, but was granted before, it will be revoked.\nIf empty list of permissions passed to user/group/anonymous user, then all their existing permissions will be revoked.\nIf user/group/anonymous user not mentioned in the request, their permissions will not be revoked.\n\nMaximum 40 different users/groups/anonymous user could be passed in the request.\n\nSee Space Permissions documentation for additional information about supported permissions.\n\nExample request URI's:\n`https://example.com/confluence/rest/api/space/TESTSPACE/permissions`","operationId":"setPermissions","parameters":[{"name":"spaceKey","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/SpacePermissionsForSubject"}},"example":[{"userKey":"4028ae289154667d0191546e11a10001","operations":[{"operationKey":"read","targetType":"space"},{"operationKey":"administer","targetType":"space"}]},{"groupName":"group1","operations":[{"operationKey":"read","targetType":"space"},{"operationKey":"create","targetType":"comment"}]},{"operations":[{"operationKey":"read","targetType":"space"}]}]}}},"responses":{"200":{"description":"Space permissions successfully set.","content":{"application/json":{}}},"400":{"description":"Returned if incorrect permissions are passed in request (for e.g. non existing operation or global permission).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestError"}}}},"401":{"description":"Returned if the calling User is not authenticated.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestError"}}}},"403":{"description":"Returned if the calling User does not have necessary permission.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestError"}}}},"404":{"description":"Returned if user or group with specified key not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestError"}}}}}}},"/rest/api/space/{spaceKey}/permissions/anonymous":{"get":{"tags":["Space Permissions"],"summary":"Gets the permissions granted to an anonymous user in a space","description":"Returns list of permissions granted to anonymous user in the particular space.\n\nExample request URI's:\n`https://example.com/confluence/rest/api/space/TESTSPACE/permissions/anonymous`","operationId":"getPermissionsGrantedToAnonymousUsers","parameters":[{"name":"spaceKey","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Returns a JSON representation of the space permissions granted to the anonymous user.","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/SpacePermission"}}}}},"401":{"description":"Returned if the calling User is not authenticated.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestError"}}}},"403":{"description":"Returned if the calling User does not have necessary permission.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestError"}}}}}}},"/rest/api/space/{spaceKey}/permissions/group/{groupName}":{"get":{"tags":["Space Permissions"],"summary":"Gets the permissions granted to a group in a space","description":"Returns list of permissions granted to a group in the particular space.\n\nExample request URI's:\n`https://example.com/confluence/rest/api/space/TESTSPACE/permissions/group/test-group-name`","operationId":"getPermissionsGrantedToGroup","parameters":[{"name":"spaceKey","in":"path","required":true,"schema":{"type":"string"}},{"name":"groupName","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Returns a JSON representation of the space permissions granted to the group.","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/SpacePermission"}}}}},"401":{"description":"Returned if the calling User is not authenticated.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestError"}}}},"403":{"description":"Returned if the calling User does not have necessary permission.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestError"}}}},"404":{"description":"Returned if group with specified name not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestError"}}}}}}},"/rest/api/space/{spaceKey}/permissions/user/{userKey}":{"get":{"tags":["Space Permissions"],"summary":"Gets the permissions granted to a user in a space","description":"Returns list of permissions granted to user in the particular space.\n\nExample request URI's:\n`https://example.com/confluence/rest/api/space/TESTSPACE/permissions/user/4028ae289154667d0191546bd5840000`","operationId":"getPermissionsGrantedToUser","parameters":[{"name":"spaceKey","in":"path","required":true,"schema":{"type":"string"}},{"name":"userKey","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Returns a JSON representation of the space permissions granted to the user.","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/SpacePermission"}}}}},"401":{"description":"Returned if the calling User is not authenticated.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestError"}}}},"403":{"description":"Returned if the calling User does not have necessary permission.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestError"}}}},"404":{"description":"Returned if the user with specified key not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestError"}}}}}}},"/rest/api/space/{spaceKey}/permissions/anonymous/grant":{"put":{"tags":["Space Permissions"],"summary":"Grants space permissions to anonymous user","description":"Grant permissions to anonymous user in the given space.\nOperation doesn't override existing permissions, will only add those one that weren't granted before.\nMultiple permissions could be passed in one request. Supported targetType and operationKey pairs:\n* space read\n* space administer\n* space export\n* space restrict\n* space delete_own\n* space delete_mail\n* page create\n* page delete\n* blogpost create\n* blogpost delete\n* comment create\n* comment delete\n* attachment create\n* attachment delete\n\nSee Space Permissions documentation for additional information about supported permissions.\n\nExample request URI's:\n`https://example.com/confluence/rest/api/space/TESTSPACE/permissions/anonymous/grant`","operationId":"grantPermissionsToAnonymousUsers","parameters":[{"name":"spaceKey","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/OperationDescription"}},"example":[{"targetType":"space","operationKey":"read"},{"targetType":"page","operationKey":"create"}]}}},"responses":{"204":{"description":"Space permissions successfully granted to anonymous user."},"400":{"description":"Returned if incorrect permissions are passed in request (for e.g. non existing operation or global permission).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestError"}}}},"401":{"description":"Returned if the calling User is not authenticated.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestError"}}}},"403":{"description":"Returned if the calling User does not have necessary permission.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestError"}}}}}}},"/rest/api/space/{spaceKey}/permissions/group/{groupName}/grant":{"put":{"tags":["Space Permissions"],"summary":"Grants space permissions to a group","description":"Grant permissions to a group in the given space.\nOperation doesn't override existing permissions, will only add those one that weren't granted before.\nMultiple permissions could be passed in one request. Supported targetType and operationKey pairs:\n* space read\n* space administer\n* space export\n* space restrict\n* space delete_own\n* space delete_mail\n* page create\n* page delete\n* blogpost create\n* blogpost delete\n* comment create\n* comment delete\n* attachment create\n* attachment delete\n\nSee Space Permissions documentation for additional information about supported permissions.\n\nExample request URI's:\n`https://example.com/confluence/rest/api/space/TESTSPACE/permissions/group/test-group-name/grant`","operationId":"grantPermissionsToGroup","parameters":[{"name":"spaceKey","in":"path","required":true,"schema":{"type":"string"}},{"name":"groupName","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/OperationDescription"}},"example":[{"targetType":"space","operationKey":"read"},{"targetType":"page","operationKey":"create"}]}}},"responses":{"204":{"description":"Space permissions successfully granted to a group."},"400":{"description":"Returned if incorrect permissions are passed in request (for e.g. non existing operation or global permission).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestError"}}}},"401":{"description":"Returned if the calling User is not authenticated.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestError"}}}},"403":{"description":"Returned if the calling User does not have necessary permission.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestError"}}}},"404":{"description":"Returned if group with specified name not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestError"}}}}}}},"/rest/api/space/{spaceKey}/permissions/user/{userKey}/grant":{"put":{"tags":["Space Permissions"],"summary":"Grants space permissions to a user","description":"Grant permissions to a user in the given space.\nOperation doesn't override existing permissions, will only add those one that weren't granted before.\nMultiple permissions could be passed in one request. Supported targetType and operationKey pairs:\n* space read\n* space administer\n* space export\n* space restrict\n* space delete_own\n* space delete_mail\n* page create\n* page delete\n* blogpost create\n* blogpost delete\n* comment create\n* comment delete\n* attachment create\n* attachment delete\n\nSee Space Permissions documentation for additional information about supported permissions.\n\nExample request URI's:\n`https://example.com/confluence/rest/api/space/TESTSPACE/permissions/user/4028ae289154667d0191546bd5840000/grant`","operationId":"grantPermissionsToUser","parameters":[{"name":"spaceKey","in":"path","required":true,"schema":{"type":"string"}},{"name":"userKey","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/OperationDescription"}},"example":[{"targetType":"space","operationKey":"read"},{"targetType":"page","operationKey":"create"}]}}},"responses":{"204":{"description":"Space permissions successfully granted to a user."},"400":{"description":"Returned if incorrect permissions are passed in request (for e.g. non existing operation or global permission).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestError"}}}},"401":{"description":"Returned if the calling User is not authenticated.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestError"}}}},"403":{"description":"Returned if the calling User does not have necessary permission.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestError"}}}},"404":{"description":"Returned if user with specified key not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestError"}}}}}}},"/rest/api/space/{spaceKey}/permissions/anonymous/revoke":{"put":{"tags":["Space Permissions"],"summary":"Revoke space permissions from anonymous user","description":"Revoke permissions from anonymous user in the given space.\nIf anonymous user doesn't have permissions that we are trying to revoke, those permissions will be silently skipped.\nMultiple permissions could be passed in one request. Supported targetType and operationKey pairs:\n* space read\n* space administer\n* space export\n* space restrict\n* space delete_own\n* space delete_mail\n* page create\n* page delete\n* blogpost create\n* blogpost delete\n* comment create\n* comment delete\n* attachment create\n* attachment delete\n\nSee Space Permissions documentation for additional information about supported permissions.\n\nExample request URI's:\n`https://example.com/confluence/rest/api/space/TESTSPACE/permissions/anonymous/revoke`","operationId":"revokePermissionsFromAnonymousUser","parameters":[{"name":"spaceKey","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/OperationDescription"}},"example":[{"targetType":"page","operationKey":"delete"},{"targetType":"page","operationKey":"create"}]}}},"responses":{"204":{"description":"Space permissions successfully removed for anonymous user."},"400":{"description":"Returned if incorrect permissions are passed in request (for e.g. non existing operation or global permission).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestError"}}}},"401":{"description":"Returned if the calling User is not authenticated.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestError"}}}},"403":{"description":"Returned if the calling User does not have necessary permission.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestError"}}}}}}},"/rest/api/space/{spaceKey}/permissions/group/{groupName}/revoke":{"put":{"tags":["Space Permissions"],"summary":"Revoke space permissions from a group","description":"Revoke permissions from a group in the given space.\nIf group doesn't have permissions that we are trying to revoke, those permissions will be silently skipped.\nMultiple permissions could be passed in one request. Supported targetType and operationKey pairs:\n* space read\n* space administer\n* space export\n* space restrict\n* space delete_own\n* space delete_mail\n* page create\n* page delete\n* blogpost create\n* blogpost delete\n* comment create\n* comment delete\n* attachment create\n* attachment delete\n\nSee Space Permissions documentation for additional information about supported permissions.\n\nExample request URI's:\n`https://example.com/confluence/rest/api/space/TESTSPACE/permissions/group/test-group-name/revoke`","operationId":"revokePermissionsFromGroup","parameters":[{"name":"spaceKey","in":"path","required":true,"schema":{"type":"string"}},{"name":"groupName","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/OperationDescription"}},"example":[{"targetType":"page","operationKey":"delete"},{"targetType":"page","operationKey":"create"}]}}},"responses":{"204":{"description":"Space permissions successfully removed for a group."},"400":{"description":"Returned if incorrect permissions are passed in request (for e.g. non existing operation or global permission).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestError"}}}},"401":{"description":"Returned if the calling User is not authenticated.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestError"}}}},"403":{"description":"Returned if the calling User does not have necessary permission.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestError"}}}},"404":{"description":"Returned if group with specified key not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestError"}}}}}}},"/rest/api/space/{spaceKey}/permissions/user/{userKey}/revoke":{"put":{"tags":["Space Permissions"],"summary":"Revoke space permissions from a user","description":"Revoke permissions from a user in the given space.\nIf user doesn't have permissions that we are trying to revoke, those permissions will be silently skipped.\nMultiple permissions could be passed in one request. Supported targetType and operationKey pairs:\n* space read\n* space administer\n* space export\n* space restrict\n* space delete_own\n* space delete_mail\n* page create\n* page delete\n* blogpost create\n* blogpost delete\n* comment create\n* comment delete\n* attachment create\n* attachment delete\n\nSee Space Permissions documentation for additional information about supported permissions.\n\nExample request URI's:\n`https://example.com/confluence/rest/api/space/TESTSPACE/permissions/user/4028ae289154667d0191546bd5840000/revoke`","operationId":"revokePermissionsFromUser","parameters":[{"name":"spaceKey","in":"path","required":true,"schema":{"type":"string"}},{"name":"userKey","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/OperationDescription"}},"example":[{"targetType":"page","operationKey":"delete"},{"targetType":"page","operationKey":"create"}]}}},"responses":{"204":{"description":"Space permissions successfully removed for a user."},"400":{"description":"Returned if incorrect permissions are passed in request (for e.g. non existing operation or global permission).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestError"}}}},"401":{"description":"Returned if the calling User is not authenticated.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestError"}}}},"403":{"description":"Returned if the calling User does not have necessary permission.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestError"}}}},"404":{"description":"Returned if user with specified key not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestError"}}}}}}},"/rest/api/space/{spaceKey}/property":{"get":{"tags":["Space Property"],"summary":"Get space properties","description":"Returns a paginated list of space properties. \n\nExample request URI: \n\n`http://example.com/confluence/rest/api/space/TST/property?expand=space,version`","operationId":"get_1","parameters":[{"name":"spaceKey","in":"path","description":"The key of the space","required":true,"schema":{"type":"string"}},{"name":"expand","in":"query","description":"a comma separated list of properties to expand on the space properties. Default value: version.","schema":{"type":"string"}},{"name":"limit","in":"query","description":"the limit of the number of items to return, this may be restricted by fixed system limits.","schema":{"type":"string"}},{"name":"start","in":"query","description":"he start point of the collection to return.","schema":{"type":"string"}}],"responses":{"200":{"description":"a JSON representation of the space properties.","content":{"application/json":{"schema":{"type":"object","properties":{"results":{"type":"array","items":{"$ref":"#/components/schemas/JsonSpaceProperty"}},"start":{"type":"number","example":25},"limit":{"type":"number","example":25},"size":{"type":"number","example":25},"_links":{"type":"object","properties":{"base":{"type":"string","example":"http://localhost:8085/rest/api"},"self":{"type":"string","example":"http://localhost:8085/rest/api"},"context":{"type":"string","example":"http://localhost:8085/rest/api"},"next":{"type":"string","example":"http://localhost:8085/rest/api/latest/../paginate?limit=25&start=50"},"prev":{"type":"string","example":"http://localhost:8085/rest/api/latest/../paginate?limit=25&start=0"}}}}}}}},"404":{"description":"Returned if there is no space with the given key, or if the calling user does not have permission to view the space.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestError"}}}}}},"post":{"tags":["Space Property"],"summary":"Create a space property","description":"Creates a new space property.","operationId":"create_3","parameters":[{"name":"spaceKey","in":"path","description":"The key of the space","required":true,"schema":{"type":"string"}}],"requestBody":{"description":"space property to be created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JsonSpaceProperty"}}}},"responses":{"200":{"description":"Returns a full JSON representation of the space property.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JsonSpaceProperty"}}}},"400":{"description":"Returned if the space already has a value with the given key, or no property value was provided, or the value is too long.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestError"}}}},"403":{"description":"Returned if the user does not have permission to edit the space with the given key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestError"}}}},"413":{"description":"Returned if the value is too long.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestError"}}}}}}},"/rest/api/space/{spaceKey}/property/{key}":{"get":{"tags":["Space Property"],"summary":"Get space property by key","description":"Returns a space property. \n\nExample request URI: \n\n`http://example.com/confluence/rest/api/space/TST/property/example-property-key?expand=space,version`","operationId":"get","parameters":[{"name":"spaceKey","in":"path","description":"The key of the space","required":true,"schema":{"type":"string"}},{"name":"expand","in":"query","description":"a comma separated list of properties to expand on the space properties. Default value: version.","schema":{"type":"string"}},{"name":"limit","in":"query","description":"the limit of the number of items to return, this may be restricted by fixed system limits.","schema":{"type":"string"}},{"name":"start","in":"query","description":"he start point of the collection to return.","schema":{"type":"string"}},{"name":"key","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Returns a full JSON representation of the space property.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JsonSpaceProperty"}}}},"404":{"description":"Returned if there is no space with the given key, or no property with the given key, or if the calling user does not have permission to view the space.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestError"}}}}}},"put":{"tags":["Space Property"],"summary":"Update space property","description":"Updates a space property.The body contains the representation of the space property. Must include new version number.If the given version number is 1, attempts to create a new space property.","operationId":"update_3","parameters":[{"name":"spaceKey","in":"path","description":"The key of the space","required":true,"schema":{"type":"string"}},{"name":"key","in":"path","description":"the key of the property","required":true,"schema":{"type":"string"}}],"requestBody":{"description":"space property to be updated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JsonSpaceProperty"}}}},"responses":{"200":{"description":"Returns a full JSON representation of the property.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JsonSpaceProperty"}}}},"400":{"description":"Returned if the given property has a different spaceKey to the one in the path, or if the property has a different key to the one in the path, or no property value was provided, or the value is too long.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestError"}}}},"403":{"description":"returned if the user does not have permission to edit the space with the given spaceKey.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestError"}}}},"404":{"description":"Returned if there is no space with the given key, or no property with the given key, or if the calling user does not have permission to view the space.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestError"}}}},"409":{"description":"Returned if the given version is does not match the expected target version of the updated property.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestError"}}}},"413":{"description":"Returned if the value is too long.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestError"}}}}}},"post":{"tags":["Space Property"],"summary":"Create a space property with a specific key","description":"Create a space property with a specific key.","operationId":"create_4","parameters":[{"name":"spaceKey","in":"path","description":"The key of the space","required":true,"schema":{"type":"string"}},{"name":"key","in":"path","description":"property key of the property to be created","required":true,"schema":{"type":"string"}}],"requestBody":{"description":"space property to be created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JsonSpaceProperty"}}}},"responses":{"200":{"description":"Returns a full JSON representation of the space property.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JsonSpaceProperty"}}}},"400":{"description":"Returned if the space already has a value with the given key, or no property value was provided, or the value is too long.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestError"}}}},"403":{"description":"Returned if the user does not have permission to edit the space with the given key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestError"}}}},"413":{"description":"Returned if the value is too long.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestError"}}}}}},"delete":{"tags":["Space Property"],"summary":"Delete space property","description":"Deletes a space property. \n\nExample request URI: \n\n`http://example.com/confluence/rest/api/space/TST/property/example-property-key?expand=space,version`","operationId":"delete_4","parameters":[{"name":"spaceKey","in":"path","description":"The key of the space","required":true,"schema":{"type":"string"}},{"name":"key","in":"path","description":"the key of the property.","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"Returned if successfully deleted."},"404":{"description":"Returned if there is no space with the give key, property with the given property key, or if the calling user does not have permission to view the space.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestError"}}}}}}},"/rest/api/space/{spaceKey}/archive":{"put":{"tags":["Space"],"summary":"Archive space","description":"Archive the given Space identified by spaceKey. This method is idempotent i.e., if the Space is already archived then no action will be taken.","operationId":"archive","parameters":[{"name":"spaceKey","in":"path","description":"the key of the space to update.","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"No Content if the Space is archived successfully or already has status 'ARCHIVED'."},"401":{"description":"Returned if the calling user is not authenticated.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestError"}}}},"403":{"description":"Returned if the calling user does not have permission to edit the Space.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestError"}}}},"404":{"description":" Returned if there is no space with the given key, or if the calling user does not have permission to view it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestError"}}}}}}},"/rest/api/space/{spaceKey}/content":{"get":{"tags":["Space"],"summary":"Get contents in space","description":"Returns the content in this given space. \n\nExample request URI: \n\n`http://example.com/confluence/rest/api/space/TEST/content?expand=history`","operationId":"contents","parameters":[{"name":"spaceKey","in":"path","description":"the key of the space to update.","required":true,"schema":{"type":"string"}},{"name":"expand","in":"query","description":"a comma separated list of properties to expand on the space.","schema":{"type":"string"}},{"name":"depth","in":"query","description":"a string indicating if all content, or just the root content of the space is returned. Default value: all. Valid values: all, root.","schema":{"type":"string"}},{"name":"limit","in":"query","description":"the limit of the number of labels to return, this may be restricted by fixed system limits.","schema":{"type":"string"}},{"name":"start","in":"query","description":"he start point of the collection to return.","schema":{"type":"string"}}],"responses":{"200":{"description":"Returns a full JSON representation of a piece of content.","content":{"application/json":{"schema":{"type":"object","properties":{"results":{"type":"array","items":{"$ref":"#/components/schemas/Content"}},"start":{"type":"number","example":25},"limit":{"type":"number","example":25},"size":{"type":"number","example":25},"_links":{"type":"object","properties":{"base":{"type":"string","example":"http://localhost:8085/rest/api"},"self":{"type":"string","example":"http://localhost:8085/rest/api"},"context":{"type":"string","example":"http://localhost:8085/rest/api"},"next":{"type":"string","example":"http://localhost:8085/rest/api/latest/../paginate?limit=25&start=50"},"prev":{"type":"string","example":"http://localhost:8085/rest/api/latest/../paginate?limit=25&start=0"}}}}}}}},"404":{"description":"Returned if there is no content with the given id, or if the calling user does not have permission to view the content.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestError"}}}}}}},"/rest/api/space/{spaceKey}/content/{type}":{"get":{"tags":["Space"],"summary":"Get contents by type","description":"Returns the content in this given space with the given type. \n\nExample request URI: \n\n`http://example.com/confluence/rest/api/space/TEST/content/page?expand=history`","operationId":"contentsWithType","parameters":[{"name":"spaceKey","in":"path","description":"the key of the space to update.","required":true,"schema":{"type":"string"}},{"name":"expand","in":"query","description":"a comma separated list of properties to expand on the space.","schema":{"type":"string"}},{"name":"depth","in":"query","description":"a string indicating if all content, or just the root content of the space is returned. Default value: all. Valid values: all, root.","schema":{"type":"string"}},{"name":"limit","in":"query","description":"the limit of the number of labels to return, this may be restricted by fixed system limits.","schema":{"type":"string"}},{"name":"start","in":"query","description":"he start point of the collection to return.","schema":{"type":"string"}},{"name":"type","in":"path","description":"the type of content to return with the space. Valid values: page, blogpost.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Returns a full JSON representation of a piece of content.","content":{"application/json":{"schema":{"type":"object","properties":{"results":{"type":"array","items":{"$ref":"#/components/schemas/Content"}},"start":{"type":"number","example":25},"limit":{"type":"number","example":25},"size":{"type":"number","example":25},"_links":{"type":"object","properties":{"base":{"type":"string","example":"http://localhost:8085/rest/api"},"self":{"type":"string","example":"http://localhost:8085/rest/api"},"context":{"type":"string","example":"http://localhost:8085/rest/api"},"next":{"type":"string","example":"http://localhost:8085/rest/api/latest/../paginate?limit=25&start=50"},"prev":{"type":"string","example":"http://localhost:8085/rest/api/latest/../paginate?limit=25&start=0"}}}}}}}},"404":{"description":"Returned if there is no content with the given id, or if the calling user does not have permission to view the content.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestError"}}}}}}},"/rest/api/space/_private":{"post":{"tags":["Space"],"summary":"Create private space","description":"Creates a new private Space, viewable only by its creator. The incoming Space does not include an id, but must include a Key and Name, and should include a Description.","operationId":"createPrivateSpace","requestBody":{"description":"The space to be created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Space"}}},"required":true},"responses":{"200":{"description":"Returns a full JSON representation of a space.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Space"}}}}}}},"/rest/api/space":{"get":{"tags":["Space"],"summary":"Get spaces by key","description":"Returns information about a number of spaces. \n\nExample request URI(s): \n\n`http://example.com/confluence/rest/api/space?spaceKey=TST&spaceKey=ds`","operationId":"spaces","parameters":[{"name":"spaceKeySingle","in":"query","schema":{"type":"string"}},{"name":"spaceKey","in":"query","description":"the key of the space to update.","schema":{"type":"string"}},{"name":"expand","in":"query","description":"a comma separated list of properties to expand on the spaces.","schema":{"type":"string"}},{"name":"hasRetentionPolicy","in":"query","description":"filter the list of spaces returned by retention policy.","schema":{"type":"string"}},{"name":"limit","in":"query","description":"the limit of the number of spaces to return, this may be restricted by fixed system limits","schema":{"type":"string"}},{"name":"start","in":"query","description":"the start point of the collection to return.","schema":{"type":"string"}},{"name":"label","in":"query","description":"filter the list of spaces returned by label.","schema":{"type":"string"}},{"name":"favourite","in":"query","description":"filter the list of spaces returned by favourites.","schema":{"type":"string"}},{"name":"type","in":"query","description":"filter the list of spaces returned by type (global, personal).","schema":{"type":"string"}},{"name":"status","in":"query","description":"filter the list of spaces returned by status (current, archived).","schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"string"}}}},"responses":{"200":{"description":"Returns an array of full JSON representations of found space.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Space"}}}}}},"post":{"tags":["Space"],"summary":"Creates a new Space.","description":"Creates a new Space. The incoming Space does not include an id, but must include a Key and Name, and should include a Description.","operationId":"createSpace","requestBody":{"description":"The space to be created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Space"}}},"required":true},"responses":{"200":{"description":"Returns a full JSON representation of a space.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Space"}}}}}}},"/rest/api/space/{spaceKey}":{"get":{"tags":["Space"],"summary":"Get space","description":"Returns information about a space. \n\nExample request URI: \n\n`http://example.com/confluence/rest/api/space/TST?expand=description`","operationId":"space","parameters":[{"name":"spaceKey","in":"path","description":"the key of the space to update.","required":true,"schema":{"type":"string"}},{"name":"expand","in":"query","description":"a comma separated list of properties to expand on the space.","schema":{"type":"string"}}],"responses":{"200":{"description":"Returns a full JSON representation of a space.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Space"}}}},"404":{"description":"Returned if there is no space with the given key, or if the calling user does not have permission to view the space.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestError"}}}}}},"put":{"tags":["Space"],"summary":"Update Space","description":"Updates a Space. The incoming Space must include a Key and Name, and should include a Description","operationId":"update_4","parameters":[{"name":"spaceKey","in":"path","description":"the key of the space to update.","required":true,"schema":{"type":"string"}}],"requestBody":{"description":"the space being updated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Space"}}},"required":true},"responses":{"200":{"description":"Returns a full JSON representation of a space.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Space"}}}},"404":{"description":"Returned if there is no space with the given key, or if the calling userdoes not have permission to update it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestError"}}}}}},"delete":{"tags":["Space"],"summary":"Delete Space","description":"Deletes a Space. The space is deleted in a long running task, so the space cannot be considered deleted when this resource returns. Clients can follow the status link in the response and poll it until the task completes.","operationId":"delete_5","parameters":[{"name":"spaceKey","in":"path","description":"the key of the space to update.","required":true,"schema":{"type":"string"}}],"responses":{"202":{"description":"Returns a pointer to the status of the space-deletion task.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LongTaskSubmission"}}}},"404":{"description":"Returned if there is no space with the given key, or if the calling user does not have permission to delete it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestError"}}}}}}},"/rest/api/space/{spaceKey}/restore":{"put":{"tags":["Space"],"summary":"Restore space","description":"Restore the given Space identified by spaceKey. This method is idempotent i.e., if the Space is already restored then no action will be taken.","operationId":"restore","parameters":[{"name":"spaceKey","in":"path","description":"the key of the space to update.","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"No Content if the Space is restored successfully or already has status 'CURRENT'."},"401":{"description":"Returned if the calling user is not authenticated.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestError"}}}},"403":{"description":"Returned if the calling user does not have permission to edit the Space.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestError"}}}},"404":{"description":" Returned if there is no space with the given key, or if the calling user does not have permission to view it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestError"}}}}}}},"/rest/api/space/{spaceKey}/watchers":{"get":{"tags":["Space Watchers"],"summary":"Fetch users watching space","description":"Returns a paginated list of users watching the given Space identified by spaceKey. Only a Confluence Administrator or Space Administrator can perform this action.","operationId":"index_4","parameters":[{"name":"spaceKey","in":"path","description":"the key of the Space the User is attempting to view.","required":true,"schema":{"type":"string"}},{"name":"limit","in":"query","schema":{"type":"integer","format":"int32","default":25}},{"name":"start","in":"query","schema":{"type":"integer","format":"int32"}}],"responses":{"200":{"description":"returns a paginated list of users watching the given Space identified by spaceKey","content":{"application/json":{"schema":{"type":"object","properties":{"results":{"type":"array","items":{"$ref":"#/components/schemas/User"}},"start":{"type":"number","example":25},"limit":{"type":"number","example":25},"size":{"type":"number","example":25},"_links":{"type":"object","properties":{"base":{"type":"string","example":"http://localhost:8085/rest/api"},"self":{"type":"string","example":"http://localhost:8085/rest/api"},"context":{"type":"string","example":"http://localhost:8085/rest/api"},"next":{"type":"string","example":"http://localhost:8085/rest/api/latest/../paginate?limit=25&start=50"},"prev":{"type":"string","example":"http://localhost:8085/rest/api/latest/../paginate?limit=25&start=0"}}}}}}}},"401":{"description":"The user is not authenticated or does not have the LICENSED permission.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestError"}}}},"403":{"description":"The user is not a Confluence Administrator or Space Administrator.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestError"}}}},"404":{"description":"The Space does not exist.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestError"}}}}}}},"/rest/api/user/{username}/group/{groupName}":{"put":{"tags":["User Group"],"summary":"Update user group","description":"Add the given User identified by username to the given Group identified by groupName. \n\nThis method is idempotent i.e., if the membership already exists then no action will be taken.","operationId":"update_5","parameters":[{"name":"groupName","in":"path","description":"The group name identifying the given group.","required":true,"schema":{"type":"string"}},{"name":"username","in":"path","description":"The username identifying the given user.","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"No Content if the user is successfully added to the group"}}},"delete":{"tags":["User Group"],"summary":"Delete user group","description":"Removes the given User identified by username from the given Group identified by groupName. \n\nThis method is idempotent i.e., if the membership already exists then no action will be taken.","operationId":"delete_6","parameters":[{"name":"groupName","in":"path","description":"The group name identifying the given group.","required":true,"schema":{"type":"string"}},{"name":"username","in":"path","description":"The username identifying the given user.","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"No Content if the user is successfully removed from the group"}}}},"/rest/api/user/current/password":{"post":{"tags":["User"],"summary":"Change password","description":"Change the password for the current user. \n\n Validation Rules: \n\n- New password supplied cannot be null or blank\n\nExample request URI(s):\n\n`http://example.com/confluence/rest/api/user/current/password`","operationId":"changePassword_1","requestBody":{"description":"password change details","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PasswordChangeDetails"}}}},"responses":{"204":{"description":"returned if the password changed successfully."},"400":{"description":" returned if any error occurs while changing user password. Refer the validation rules above.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestError"}}}},"401":{"description":"returned if the user is not authenticated.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestError"}}}},"403":{"description":"returned if current password is wrong or if the user has exceeded number of allowed failed login attempts\n.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestError"}}}}}}},"/rest/api/user/anonymous":{"get":{"tags":["User"],"summary":"Get information about anonymous user type","description":"Get information about how anonymous is represented in Confluence. Example request URI(s):\n\n`http://example.com/confluence/rest/api/user/anonymous`","operationId":"getAnonymous","parameters":[{"name":"expand","in":"query","description":"properties to expand on the user.","schema":{"type":"string"}}],"responses":{"200":{"description":"Returns a full JSON representation of a user.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Person"}}}},"403":{"description":"Returned if the calling user does not have permission to use confluence.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestError"}}}}}}},"/rest/api/user/current":{"get":{"tags":["User"],"summary":"Get current user","description":"Get information about the current logged in user. Example request URI(s):\n\n`http://example.com/confluence/rest/api/user/current`","operationId":"getCurrent","parameters":[{"name":"expand","in":"query","description":"properties to expand on the user.","schema":{"type":"string"}}],"responses":{"200":{"description":"Returns a full JSON representation of a user.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Person"}}}},"403":{"description":"Returned if the calling user does not have permission to use confluence.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestError"}}}}}}},"/rest/api/user/memberof":{"get":{"tags":["User"],"summary":"Get groups","description":"Get a paginated collection of groups that the given user is a member of. Example request URI(s):\n\n`http://example.com/confluence/rest/api/user/memberof?username=jblogs`\n`http://example.com/confluence/rest/api/user/memberof?key=402880824ff933a4014ff9345d7c0002`","operationId":"getGroups_1","parameters":[{"name":"expand","in":"query","description":"properties to expand on the user.","schema":{"type":"string"}},{"name":"limit","in":"query","description":"the limit of the number of users to return, this may be restricted by fixed system limits.","schema":{"type":"string"}},{"name":"start","in":"query","description":"the start point of the collection to return. This must be non-negative. Default value is 0.","schema":{"type":"string"}},{"name":"key","in":"query","description":"userkey of the user to request from this resource","schema":{"type":"string"}},{"name":"username","in":"query","description":"userName of the user to get the groups for.","schema":{"type":"string"}}],"responses":{"200":{"description":"Returns a full JSON representation of a user.","content":{"application/json":{"schema":{"type":"object","properties":{"results":{"type":"array","items":{"$ref":"#/components/schemas/Person"}},"start":{"type":"number","example":25},"limit":{"type":"number","example":25},"size":{"type":"number","example":25},"_links":{"type":"object","properties":{"base":{"type":"string","example":"http://localhost:8085/rest/api"},"self":{"type":"string","example":"http://localhost:8085/rest/api"},"context":{"type":"string","example":"http://localhost:8085/rest/api"},"next":{"type":"string","example":"http://localhost:8085/rest/api/latest/../paginate?limit=25&start=50"},"prev":{"type":"string","example":"http://localhost:8085/rest/api/latest/../paginate?limit=25&start=0"}}}}}}}},"403":{"description":"Returned if the calling user does not have permission to use confluence.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestError"}}}}}}},"/rest/api/user":{"get":{"tags":["User"],"summary":"Get user","description":"Get information about a user identified by either user key or username. Example request URI(s):\n\n`http://example.com/confluence/rest/api/user?username=jblogs`\n`http://example.com/confluence/rest/api/user?key=402880824ff933a4014ff9345d7c0002`","operationId":"getUser","parameters":[{"name":"expand","in":"query","description":"properties to expand on the user.","schema":{"type":"string"}},{"name":"key","in":"query","description":"userkey of the user to request from this resource.","schema":{"type":"string"}},{"name":"username","in":"query","description":"userName of the user to create the new watcher for.","schema":{"type":"string"}}],"responses":{"200":{"description":"Returns a full JSON representation of a user","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Person"}}}},"403":{"description":"Returned if the calling user does not have permission to view users.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestError"}}}},"404":{"description":"Returned if a user with the given username or userkey does not exist.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestError"}}}}}}},"/rest/api/user/list":{"get":{"tags":["User"],"summary":"Get registered users","description":"Gets a paginated collection of all registered users, including but not limited to:\n\n- Disabled users\n- Enabled users\n- Enabled users which count towards the license count on the site\n- Enabled users which do not count towards the license count on the site\n- Enabled users which have \"can use\" global permissions\n- Enabled users which do not have \"can use\" global permissions\n\nExample request URI(s):\n\n`http://example.com/confluence/rest/api/user/list`\n`http://example.com/confluence/rest/api/user/list?start=0`\n`http://example.com/confluence/rest/api/user/list?start=0&limit=100`\n`http://example.com/confluence/rest/api/user/list?start=0&limit=100&expand=status`","operationId":"getUsers","parameters":[{"name":"expand","in":"query","description":"properties to expand on the user.","schema":{"type":"string"}},{"name":"limit","in":"query","description":"the limit of the number of users to return, this may be restricted by fixed system limits.","schema":{"type":"string"}},{"name":"start","in":"query","description":"the start point of the collection to return. This must be non-negative. Default value is 0.","schema":{"type":"string"}}],"responses":{"200":{"description":"returns a paginated collection of users.","content":{"application/json":{"schema":{"type":"object","properties":{"results":{"type":"array","items":{"$ref":"#/components/schemas/Person"}},"start":{"type":"number","example":25},"limit":{"type":"number","example":25},"size":{"type":"number","example":25},"_links":{"type":"object","properties":{"base":{"type":"string","example":"http://localhost:8085/rest/api"},"self":{"type":"string","example":"http://localhost:8085/rest/api"},"context":{"type":"string","example":"http://localhost:8085/rest/api"},"next":{"type":"string","example":"http://localhost:8085/rest/api/latest/../paginate?limit=25&start=50"},"prev":{"type":"string","example":"http://localhost:8085/rest/api/latest/../paginate?limit=25&start=0"}}}}}}}},"403":{"description":"Returned if the calling user does not have permission to view users. This is possible for anonymous or un-licensed users.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestError"}}}}}}},"/rest/api/user/watch/content/{contentId}":{"get":{"tags":["User Watch"],"summary":"Get information about content watcher","description":"Get information about whether a user is watching a specified content. User is optional. If not specified, currently logged-in user will be used. Otherwise, it can be specified by either user key or username. When a user is specified and is different from the logged-in user, the logged-in user needs to be a Confluence administrator. \n\n Example request URI(s):\n\n`http://example.com/confluence/rest/api/user/watch/content/131213`\n`http://example.com/confluence/rest/api/user/watch/content/131213?username=jblogs`\n`http://example.com/confluence/rest/api/user/watch/content/131213?key=ff8080815a58e24c015a58e263710000`","operationId":"isWatchingContent","parameters":[{"name":"contentId","in":"path","description":"id of the content.","required":true,"schema":{"type":"string"}},{"name":"key","in":"query","description":"userkey of the user to check for watching state.","schema":{"type":"string"}},{"name":"username","in":"query","description":"username of the user to check for watching state.","schema":{"type":"string"}}],"responses":{"200":{"description":"Returns a JSON representation containing the watching state.","content":{"application/json":{"examples":{"watching":{"description":"watching","value":true}}}}},"404":{"description":"Returned if no content exists for the specified content id or calling user does not have permission to perform the operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestError"}}}}}},"post":{"tags":["User Watch"],"summary":"Add content watcher","description":"Create a new watcher for the given user and content id. User is optional. If not specified, currently logged-in user will be used. Otherwise, it can be specified by either user key or username. When a user is specified and is different from the logged-in user, the logged-in user needs to be a Confluence administrator. \n\n Example request URI(s):\n\n`http://example.com/confluence/rest/api/user/watch/content/131213`\n`http://example.com/confluence/rest/api/user/watch/content/131213?username=jblogs`\n`http://example.com/confluence/rest/api/user/watch/content/131213?key=ff8080815a58e24c015a58e263710000`","operationId":"addContentWatcher","parameters":[{"name":"contentId","in":"path","description":"id of the content.","required":true,"schema":{"type":"string"}},{"name":"key","in":"query","description":"userkey of the user to check for watching state.","schema":{"type":"string"}},{"name":"username","in":"query","description":"username of the user to check for watching state.","schema":{"type":"string"}}],"responses":{"200":{"description":"Returned if the watcher was successfully created.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContentWatch"}}}},"404":{"description":"Returned if no content exists for the specified content id or the calling user does not have permission to perform the operation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestError"}}}}}},"delete":{"tags":["User Watch"],"summary":"Remove content watcher","description":"Delete an existing watcher for the given user and content id. User is optional. If not specified, currently logged-in user will be used. Otherwise, it can be specified by either user key or username. When a user is specified and is different from the logged-in user, the logged-in user needs to be a Confluence administrator. \n\n Example request URI(s):\n\n`http://example.com/confluence/rest/api/user/watch/content/131213`\n`http://example.com/confluence/rest/api/user/watch/content/131213?username=jblogs`\n`http://example.com/confluence/rest/api/user/watch/content/131213?key=ff8080815a58e24c015a58e263710000`","operationId":"removeContentWatcher","parameters":[{"name":"contentId","in":"path","description":"id of the content.","required":true,"schema":{"type":"string"}},{"name":"key","in":"query","description":"userkey of the user to check for watching state.","schema":{"type":"string"}},{"name":"username","in":"query","description":"username of the user to check for watching state.","schema":{"type":"string"}}],"responses":{"204":{"description":"Returned if the watcher was successfully deleted"},"404":{"description":"Returned if no content exists for the specified content id or the calling user does not have permission to perform the operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestError"}}}}}}},"/rest/api/user/watch/space/{spaceKey}":{"get":{"tags":["User Watch"],"summary":"Get information about space watcher","description":"Get information about whether a user is watching a specified space. User is optional. If not specified, currently logged-in user will be used. Otherwise, it can be specified by either user key or username. When a user is specified and is different from the logged-in user, the logged-in user needs to be a Confluence administrator. \n\n Example request URI(s):\n\n`http://example.com/confluence/rest/api/user/watch/space/SPACEKEY`\n`http://example.com/confluence/rest/api/user/watch/space/SPACEKEY?username=jblogs`\n`http://example.com/confluence/rest/api/user/watch/space/SPACEKEY?key=ff8080815a58e24c015a58e263710000`\n`http://example.com/confluence/rest/api/user/watch/space/SPACEKEY?contentType=blostpost`","operationId":"isWatchingSpace","parameters":[{"name":"spaceKey","in":"path","required":true,"schema":{"type":"string"}},{"name":"contentType","in":"query","description":"an optional content type to check for watching state.","schema":{"type":"string"}},{"name":"key","in":"query","description":"userkey of the user to check for watching state.","schema":{"type":"string"}},{"name":"username","in":"query","description":"username of the user to check for watching state.","schema":{"type":"string"}}],"responses":{"200":{"description":"Returns a JSON representation containing the watching state.","content":{"application/json":{"examples":{"watching":{"description":"watching","value":true}}}}},"404":{"description":"Returned if no space exists for the specified space key or the calling user does not have permission to perform the operation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestError"}}}}}},"post":{"tags":["User Watch"],"summary":"Add space watcher","description":"Create a new watcher for the given user and space key. User is optional. If not specified, currently logged-in user will be used. Otherwise, it can be specified by either user key or username. When a user is specified and is different from the logged-in user, the logged-in user needs to be a Confluence administrator. \n\n Example request URI(s):\n\n`http://example.com/confluence/rest/api/user/watch/space/SPACEKEY`\n`http://example.com/confluence/rest/api/user/watch/space/SPACEKEY?username=jblogs`\n`http://example.com/confluence/rest/api/user/watch/space/SPACEKEY?key=ff8080815a58e24c015a58e263710000`\n`http://example.com/confluence/rest/api/user/watch/space/SPACEKEY?contentType=blogpost`","operationId":"addSpaceWatch","parameters":[{"name":"spaceKey","in":"path","required":true,"schema":{"type":"string"}},{"name":"contentType","in":"query","description":"the optional content type to delete the watcher for.","schema":{"type":"string"}},{"name":"key","in":"query","description":"userKey of the user to create the new watcher for.","schema":{"type":"string"}},{"name":"username","in":"query","description":"userName of the user to create the new watcher for.","schema":{"type":"string"}}],"responses":{"200":{"description":"Returned if the watcher was successfully created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SpaceWatch"}}}},"404":{"description":"Returned if no content exists for the specified space key or the calling user does not have permission to perform the operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestError"}}}}}},"delete":{"tags":["User Watch"],"summary":"Remove space watcher","description":"Delete an existing watcher for the given user and space key. User is optional. If not specified, currently logged-in user will be used. Otherwise, it can be specified by either user key or username. When a user is specified and is different from the logged-in user, the logged-in user needs to be a Confluence administrator. \n\n Example request URI(s):\n\n`http://example.com/confluence/rest/api/user/watch/space/SPACEKEY`\n`http://example.com/confluence/rest/api/user/watch/space/SPACEKEY?username=jblogs`\n`http://example.com/confluence/rest/api/user/watch/space/SPACEKEY?key=ff8080815a58e24c015a58e263710000`\n`http://example.com/confluence/rest/api/user/watch/space/SPACEKEY?contentType=blogpost`","operationId":"removeSpaceWatch","parameters":[{"name":"spaceKey","in":"path","required":true,"schema":{"type":"string"}},{"name":"contentType","in":"query","description":"the optional content type to delete the watcher for.","schema":{"type":"string"}},{"name":"key","in":"query","description":"userkey of the user to delete the watcher for.","schema":{"type":"string"}},{"name":"username","in":"query","description":"username of the user to delete the watcher for.","schema":{"type":"string"}}],"responses":{"204":{"description":"Returned if the watcher was successfully deleted"},"404":{"description":"Returned if no content exists for the specified space key or the calling user does not have permission to perform the operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestError"}}}}}}}}}