Getting Data In

How do I add a new role via REST API?



How could I add a new role via REST API ?

When I try to send the following HTTP POST via Postman:

URL: https://localhost:8089/services/authorization/roles?name=newrole

Method: POST

Authorization: Basic -credentials-, where -credentials- is
the base64 encoding of ID and password joined by a colon.

I got: Cannot perform action "POST" without a target name to act on.

<?xml version="1.0" encoding="UTF-8"?>
        <msg type="ERROR">Cannot perform action "POST" without a target name to act on.</msg>

What does target name refer to? And how could I set the value in order to get the HTTP POST request to work ?

0 Karma


For anyone facing this issue and still looking for an answer, you need to use url encoded parameters to be passed to the request. The request was successful only after this change was made.



0 Karma


@davidtrujillo - Can you please confirm that this resolves your issue?

If so can you please also accept the answer as solution by clicking on "Accept as Solution" button.

0 Karma

Revered Legend

Have you looked at this? (see the example on POST request)

0 Karma
Get Updates on the Splunk Community!

Splunk Forwarders and Forced Time Based Load Balancing

Splunk customers use universal forwarders to collect and send data to Splunk. A universal forwarder can send ...

NEW! Log Views in Splunk Observability Dashboards Gives Context From a Single Page

Today, Splunk Observability releases log views, a new feature for users to add their logs data from Splunk Log ...

Last Chance to Submit Your Paper For BSides Splunk - Deadline is August 12th!

Hello everyone! Don't wait to submit - The deadline is August 12th! We have truly missed the community so ...