I create page and get attachment and upload attachment by REST.
I send REST request page by page. so it's many request. (about 300 pages)
In processing, I got 401 Error. And log says like bottom.
But, I send auth info in request header. So, It's not normal to get 401 error message.
Is that possible that authentication is failed if previous rest request get exception?
------------------------------------------------------------------------------------------------
2018-10-24 15:44:18,096 WARN [catalina-exec-3514] [confluence.impl.hibernate.ConfluenceHibernateTransactionManager] doRollback Performing rollback. Transactions:
[com.atlassian.confluence.api.impl.service.content.AttachmentServiceImpl.addAttachments]: PROPAGATION_REQUIRED,ISOLATION_DEFAULT (Session #727416380)
[tx-metadata-provider]: PROPAGATION_REQUIRED,ISOLATION_DEFAULT,readOnly (Session #148361095)
->[tx-metadata-provider]: PROPAGATION_REQUIRED,ISOLATION_DEFAULT,readOnly (Session #564901555)
-- url: /main/rest/api/latest/content/895197353/child/attachment | traceId: cbe35945b54ac071 | userName: oasis.bot
2018-10-24 15:44:18,097 WARN [catalina-exec-3514] [service.content.factory.DefaultContentMetadataFactory] getAllMetadataFromProviders API metadata provider module threw an exception attempting to expand metadata. Class : com.atlassian.confluence.plugins.restapi.metadata.content.LabelsModelMetadataProvider provides properties [labels]. Exception org.springframework.transaction.UnexpectedRollbackException: Transaction rolled back because it has been marked as rollback-only
-- url: /main/rest/api/latest/content/895197353/child/attachment | traceId: cbe35945b54ac071 | userName: oasis.bot
2018-10-24 15:44:18,196 WARN [catalina-exec-3955] [confluence.util.profiling.DurationThresholdWarningTimingHelperFactory] logMessage Execution time for publishing event com.atlassian.confluence.event.events.content.page.PageCreateEvent@5d8eed6a[context={},updateTrigger=UNKNOWN,page=page: 1주 (20XX.XX.XX ~ 20XX.XX.XX) v.1 (895197385),suppressNotifications=false,timestamp=1540363446540] took 11655 ms (warning threshold is 5000 ms)
-- url: /main/rest/api/latest/content | traceId: fcefaa5916edccc0 | userName: oasis.bot
2018-10-24 15:44:26,228 WARN [catalina-exec-3653] [atlassian.seraph.auth.DefaultAuthenticator] login login : `oasis.bot` tried to login but they do not have USE permission or weren`t found. Deleting remember me cookie.
------------------------------------------------------------------------------------------------
Hi JY Kim,
Take a look at this post which has a similar issue: https://community.atlassian.com/t5/Confluence-Cloud-questions/Getting-a-401-Unauthorized-Error-on-REST-API/qaq-p/1095751
Good luck.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.