Ranger Server
Config.yml
The config.yml
file contains configuration settings for the Ranger Server.
config.yml
host: 0.0.0.0
port: 8085
deployers:
your-machiner-deployer: http://ranger-vmware-machiner:9999
your-switcher-deployer: http://ranger-vmware-switcher:9998
your-templater-deployer: http://ranger-vmware-templater:9997
your-executor-deployer: http://ranger-vmware-executor:9996
default_deployment_group: your-deployment-group
deployment_groups:
your-deployment-group:
- your-machiner-deployer
- your-switcher-deployer
- your-templater-deployer
- your-executor-deployer
database_url: mysql://mysql_user:mysql_pass@mariadb:3306/ranger
- Host: the IP address to which Ranger Server is bound
- Port: the port number on which Ranger Server listens for incoming connections
- Deployers: specifies deployment components and their corresponding endpoints
- Default_deployment_group: specifies the default deployment group
- Deployment_groups: lists deployment groups and their associated deployers
- Your-deployment-group: list of deployers under the default deployment group
- Database_url: defines the URL for connecting to the MySQL database
API Functionality
Ranger Server provides a comprehensive API for managing exercises and deployments. The API supports two roles: exercise admin and participant with various functionalities, including user, banner, email and metric related calls.
Manager Endpoints
Users
Endpoint: api/v1/admin/group
Method: GET
Description: Retrieves a list of AD groups
Endpoint: api/v1/admin/group/{groupName}/users
Method: GET
Description: Retrieves users belonging to a specific AD group.
Endpoint: api/v1/admin/exercise/{exerciseId}/deployment/{deploymentId}/users
Method: GET
Description: Retrieves users associated with a particular deployment in an exercise.
Banners
Endpoint: api/v1/admin/exercise/{exerciseId}/banner
Method: GET
Description: Retrieves the banner for a specific exercise.
Endpoint: api/v1/admin/exercise/{exerciseId}/banner
Method: POST
Description: Adds a new banner for a specific exercise.
Endpoint: api/v1/admin/exercise/{exerciseId}/banner
Method: DELETE
Description: Deletes the banner for a specific exercise.
Endpoint: api/v1/admin/exercise/{exerciseId}/banner
Method: PUT
Description: Updates the banner for a specific exercise.
Exercises
Endpoint: api/v1/admin/exercise
Method: GET
Description: Retrieves a list of exercises.
Endpoint: api/v1/admin/exercise/{exerciseId}
Method: GET
Description: Retrieves a specific exercise.
Endpoint: api/v1/admin/exercise
Method: POST
Description: Adds a new exercise.
Endpoint: api/v1/admin/exercise/{exerciseId}
Method: PUT
Description: Updates a specific exercise.
Endpoint: api/v1/admin/exercise/{exerciseId}
Method: DELETE
Description: Deletes a specific exercise.
Deployments
Endpoint: api/v1/admin/exercise/{exerciseId}/deployment
Method: GET
Description: Retrieves a list of deployments for a specific exercise.
Endpoint: api/v1/admin/exercise/{exerciseId}/deployment
Method: POST
Description: Adds a new deployment for a specific exercise.
Endpoint: api/v1/admin/exercise/{exerciseId}/deployment/{deploymentId}
Method: GET
Description: Retrieves a specific deployment.
Endpoint: api/v1/admin/exercise/{exerciseId}/deployment/{deploymentId}
Method: DELETE
Description: Deletes a specific deployment.
Endpoint: api/v1/admin/exercise/{exerciseId}/deployment/{deploymentId}/deployment_element
Method: GET
Description: Retrieves deployment elements for a specific deployment.
Endpoint: api/v1/admin/exercise/{exerciseId}/deployment/{deploymentId}/score
Method: GET
Description: Retrieves scores for a specific deployment.
Endpoint: api/v1/admin/exercise/{exerciseId}/deployment/{deploymentId}/scenario
Method: GET
Description: Retrieves the scenario for a specific deployment.
Deployment groups
Endpoint: api/v1/admin/deployer
Method: GET
Description: Retrieves deployment groups.
Endpoint: api/v1/admin/deployer/default
Method: GET
Description: Retrieves the default deployment group.
Emails
Endpoint: api/v1/admin/exercise/{exerciseId}/email
Method: GET
Description: Retrieves a list of emails for a specific exercise.
Endpoint: api/v1/admin/exercise/{exerciseId}/email
Method: POST
Description: Sends an email for a specific exercise.
Endpoint: api/v1/admin/exercise/{exerciseId}/email-form
Method: GET
Description: Retrieves the email form for a specific exercise.
Endpoint: api/v1/upload
Method: POST
Description: Uploads a file.
Email Templates
Endpoint: api/v1/admin/email_template
Method: GET
Description: Retrieves a list of email templates.
Endpoint: api/v1/admin/email_template
Method: POST
Description: Adds a new email template.
Endpoint: api/v1/admin/email_template/{templateId}
Method: DELETE
Description: Deletes a specific email template.
Participants
Get Deployment Participants
Endpoint: api/v1/admin/exercise/{exerciseId}/deployment/{deploymentId}/participant
Method: GET
Description: Retrieves participants for a specific deployment in an exercise.
Endpoint: api/v1/admin/exercise/{exerciseId}/deployment/{deploymentId}/participant/{participantId}
Method: DELETE
Description: Deletes a specific participant from a deployment in an exercise.
Endpoint: api/v1/admin/exercise/{exerciseId}/deployment/{deploymentId}/participant`
Method: POST
Description: Adds a new participant to a specific deployment in an exercise.
Manual Metrics
Endpoint: api/v1/admin/exercise/{exerciseId}/deployment/{deploymentId}/metric
Method: GET
Description: Retrieves manual metrics for a specific deployment in an exercise.
Endpoint: api/v1/admin/exercise/{exerciseId}/deployment/{deploymentId}/metric/{metricId}
Method: GET
Description: Retrieves details of a specific manual metric.
Endpoint: api/v1/admin/exercise/{exerciseId}/deployment/{deploymentId}/metric/{metricId}
Method: PUT
Description: Updates details of a specific manual metric.
Endpoint: api/v1/admin/exercise/{exerciseId}/deployment/{deploymentId}/metric/{metricId}
Method: DELETE
Description: Deletes a specific manual metric.
Endpoint: api/v1/admin/exercise/{exerciseId}/deployment/{deploymentId}/metric/{metricId}/download
Method: GET
Description: Downloads the artifact associated with a specific manual metric.
Participant Endpoints
Banners
Endpoint: api/v1/participant/exercise/{exerciseId}/banner
Method: GET
Description: Retrieves the banner information for a specific exercise.
Exercises
Endpoint: api/v1/participant/exercise
Method: GET
Description: Retrieves a list of exercises available for a participant.
Endpoint: api/v1/participant/exercise/{exerciseId}
Method: GET
Description: Retrieves details of a specific exercise for a participant.
Deployments
Endpoint: api/v1/participant/exercise/{exerciseId}/deployment
Method: GET
Description: Retrieves a list of deployments for a participant in a specific exercise.
Endpoint: api/v1/participant/exercise/{exerciseId}/deployment/{deploymentId}
Method: GET
Description: Retrieves details of a specific deployment for a participant in an exercise.
Endpoint: api/v1/participant/exercise/{exerciseId}/deployment/{deploymentId}/users
Method: GET
Description: Retrieves a list of users associated with a deployment for a participant.
Endpoint: api/v1/participant/exercise/{exerciseId}/deployment/{deploymentId}/score
Method: GET
Description: Retrieves scores for a participant in a specific deployment.
Endpoint: api/v1/participant/exercise/{exerciseId}/deployment/{deploymentId}/scenario
Method: GET
Description: Retrieves the scenario for a participant in a specific deployment.
Endpoint: api/v1/participant/exercise/{exerciseId}/deployment/{deploymentId}/participant
Method: GET
Description: Retrieves a list of participants associated with the current participant in a deployment.
Metrics
Endpoint: api/v1/participant/exercise/{exerciseId}/deployment/{deploymentId}/entity/{entitySelector}/metric/{metricId}
Method: GET
Description: Retrieves details of a specific manual metric for a participant.
Endpoint: api/v1/participant/exercise/{exerciseId}/deployment/{deploymentId}/entity/{entitySelector}/metric
Method: GET
Description: Retrieves manual metrics for a participant in a specific deployment.
Endpoint: api/v1/participant/exercise/{exerciseId}/deployment/{deploymentId}/entity/{entitySelector}/metric/{metricId}
Method: PUT
Description: Updates details of a specific manual metric for a participant.
Endpoint: api/v1/participant/exercise/{exerciseId}/deployment/{deploymentId}/entity/{entitySelector}/metric
Method: POST
Description: Adds a new manual metric for a participant.
Endpoint: api/v1/participant/exercise/{exerciseId}/deployment/{deploymentId}/entity/{entitySelector}/metric/{metricId}/upload
Method: POST
Description: Uploads an artifact for a specific manual metric associated with a participant.
Deployment Elements
Endpoint: api/v1/participant/exercise/{exerciseId}/deployment/{deploymentId}/entity/{entitySelector}/deployment_element
Method: GET
Description: Retrieves deployment elements for a specific entity in a deployment.
Events
Endpoint: api/v1/participant/exercise/{exerciseId}/deployment/{deploymentId}/entity/{entitySelector}/event
Method: GET
Description: Retrieves events triggered for a specific participant (entity) in a deployment.
Endpoint: api/v1/participant/exercise/{exerciseId}/deployment/{deploymentId}/entity/{entitySelector}/event/{eventInfoDataChecksum}
Method: GET
Description: Retrieves detailed information for a specific event triggered for a participant in a deployment.