Project

General

Profile

Actions

Defect #28770

closed

Rest API with Curl API Key?

Added by Maiken Saveljev almost 6 years ago. Updated over 5 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
-
Target version:
-
Start date:
Due date:
% Done:

0%

Estimated time:
Resolution:
Invalid
Affected version:

Description

Hello!

I had this project i'v been working on.
I found that the best way for me to use REST API is with cURL.
But then i came into the problem that with the cURL, Admin account and passwords are shown in the command.

[[http://www.redmine.org/projects/redmine/wiki/Rest_api_with_curl]]
curl -v -H "Content-Type: application/xml" -X PUT --data-binary "@wiki.xml" -u login:password http://redmine/projects/foo/wiki/page_test.xml

Is there a way to do this but with API Key?
I am updating a Wiki page but on my own redmine server.

Or do you guys have any other ways that i could do the same that curl does but with API Key?

(I have bunch of data that will be updated to a Wiki page weekly) Basically rewritten always.

Actions #1

Updated by Go MAEDA over 5 years ago

  • Status changed from New to Closed
  • Resolution set to Invalid

You can pass API key using X-Redmine-API-Key header field.

curl --header 'X-Redmine-API-Key: YourApiKey' 'http://redmine.test/issues.json'

Please use forums for questions. Reading How to request help may be helpful for you.

Actions

Also available in: Atom PDF