Hello everyone.
i'm trying to upload file as attachment via curl... but it's shows 404 not found...
i'm following this documentation:
HTTP/2 404
date: Fri, 06 Oct 2023 09:06:38 GMT
content-type: application/xml;charset=UTF-8
server: AtlassianEdge
timing-allow-origin: *
x-arequestid: 3da2ee41054a480bb06bf2294bf9e3b5
x-seraph-loginreason: AUTHENTICATED_FAILED
set-cookie: atlassian.xsrf.token=a5248455223e43f38a29df9ca9ded53d7fdea435_lout; Path=/; SameSite=None; Secure
cache-control: no-transform
vary: Accept
x-content-type-options: nosniff
x-xss-protection: 1; mode=block
atl-traceid: b94c2e625f098e4c
report-to: {"endpoints": [{"url": "https://dz8aopenkvv6s.cloudfront.net"}], "group": "endpoint-1", "include_subdomains": true, "max_age": 600}
nel: {"failure_fraction": 0.001, "include_subdomains": true, "max_age": 600, "report_to": "endpoint-1"}
strict-transport-security: max-age=63072000; includeSubDomains; preload
curl -D- \
-u nurlan.i@domain.com:mypasswd \
-X POST \
-H 'X-Atlassian-Token: nocheck' \
-F 'file=@"helmsman.git"' \
-F 'minorEdit="true"' \
-F 'comment="Example attachment comment"; type=text/plain; charset=utf-8' \
https://mydomain.atlassian.net/rest/api/content/11111111/child/attachment
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Just to clarify do you need to upload Attachment to Confluence or Jira? :)
The error says that you hit the JIRA url, so there must be smth wrong with the endpoint.
The following endpoint should work fine for adding attachments to Confluence as you have '/wiki' after the .net domain and the correct page ID should be present:
https://xxx.atlassian.net/wiki/rest/api/content/467370120/child/attachment
Please make sure the page ID is correct :)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
i need upload attachment to Confluence Cloud.
as URL i'm using: https://xxx.atlassian.net/wiki/rest/api/content/870219811/child/attachment
Thank you.
Continue troubleshooting.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello @Nurlan Izimbetov ,
Seems like you missed the '/wiki' part for Confluence URL:
https://mydomain.atlassian.net/wiki/rest/api/content/11111111/child/attachment
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
almost fixed, i got 401 unathorized.
as login i'm using e-mail and password.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.