Skip to content

Profile API

Robert Hafner edited this page Apr 15, 2018 · 2 revisions

Nebula allows for Profiles to be created and manipulated through an extremely simple RESTFul API.

Credentials are passed using the username and password HTTP Headers. API users must be either admins or in the API ldap group.

Listing Existing Profiles

GET /api/profiles

Using curl:

curl -H "username: user" -H "password: pass" https://nebula.example/api/profiles

Creating New Profiles

POST /api/profiles

Using curl:

curl -H "Content-Type: application/json" -H "username: user" -H "password: pass" -X POST -d '{"name": "Example (api created)", "ami": "ami-493f2f29", "userdata": "role=deploy"}' https://nebula.example/api/profiles

Updating Existing Profiles

PUT /api/profiles/[PROFILE_ID]

Using curl:

curl -H "Content-Type: application/json" -H "username: user" -H "password: pass" -X PUT -d '{"ami": "ami-493f2f29"}' https://nebula.example/api/profiles/[PROFILE_ID]

Deleting Profiles

DELETE /api/profiles/[PROFILE_ID]

curl -H "username: user" -H "password: pass" -X DELETE https://nebula.example/api/profiles/[PROFILE_ID]