I have duplicate assets in my object schema, So I am trying to remove those assets using rest API.
I tried using " https://api.atlassian.com/jsm/assets/workspace/{workspaceId}/v1/object/{id}" rest API but when I am sending "delete" request then it showing an error.
For reference please find the attached screenshot below.
thanks for your question.
Would you mind sharing the request body and headers you are sending?
Please do not post credentials.
Hi @Kai Becker
Thanks for the reply.
I do not send any headers in the request body only follow the Jira rest API documentation for delete.
I tried using - curl --request DELETE \ --url 'https://api.atlassian.com/jsm/assets/workspace/{workspaceId}/v1/object/{id}'
So can you please give any idea about headers, which is help me to delete the assets through the rest API.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
thanks for clarification. Did you check, that you replace the placeholders for workspace and object with the correct ids?
How do you authenticaticate when using curl?
Could you also please paste the whole curl error here?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Kai Becker
Thanks for the reply.
I have cross checked the workspace and object Id that are correct.
Authenticate using email and token.
This is the screenshot of error.
Regards,
Risikanta
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
do you use curl on the command line or a browser / http client?
500 means server error and usually comes from wrong input, so it is essential to see everything you entered / send.
I just tried this in my demo environment and it worked without any problems:
curl --request DELETE --url 'https://api.atlassian.com/jsm/assets/workspace/{workspaceId}/v1/object/{objectId}' --header 'Accept: application/json' --user 'email:token'
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Kai Becker
I have sent as you suggested, but that not working.
Any other way to do the task.
Regards,
Risikanta
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
it is kinda hard to debug your problem if you won't provide further information.
I have asked several questions, which you haven't yet answered:
How do you authenticaticate when using curl?
Could you also please paste the whole curl error here?
Other things:
Without this information it is quite impossible to solve your issue.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Kai Becker
I use Postman for now to send the delete request not the curl on the command line.
And authenticate using email and token.
The whole error is
So, could you please assist me to delete the assets.
Regards,
Risikanta
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
just downloaded postman entered the url from the curl command and changed to another objectId. Worked without any problems.
For authorization I've been using basic auth with username and token.
Everything else is postman default. If this does not work for you, I would recommend to open up a support request here https://support.atlassian.com/
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Kai Becker
Thanks for reply,
I have Postman and I am using that. So I have been using basic auth with username and token for authentication.
But it does not work for me.
So I raised a request in Atlassian community.
Regards,
Risikanta
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.