Create a Post
cancel
Showing results for 
Search instead for 
Did you mean: 
david_michael
Participant
Jump to solution

How to create a new ServiceAccount via API?

This is really confusing! https://api-v2-docs.dome9.com/?shell#serviceaccount_postserviceaccount

According to the link I should be able to create a new service account via the API

curl -X POST https://api.dome9.com/v2/service-account \
  --basic -u <key-id>:<key-secret>  \ 
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json'

But that block doesn't make any sense? Does it return a generic ID which I then use to update with another call? If I do post to it I get an error:

 

HTTP Error 411. The request must be chunked or have a content length.

 

 Looking for some guidance, I'd like to be able to create a new service account to onboard Kubernetes clusters, 1 account per cluster. Thanks!!

 

-David

0 Kudos
3 Replies
This widget could not be displayed.