API
Experimental
The API is very new and experimental. Let us know if you notice any bugs!
If you are a developer and would like to integrate CrystalCraze into your own creations, you can use the experimental CrystalCraze REST api to control your CrystalCraze items.
Creating an API key
You'll first have to create a web account with us. To do so, please visit the Landowner ATM at CrystalCraze HQ and generate a random password via the menu. The randomly generated password is printed out in nearby chat. You'll be able to log into the web-based Landowner Console with your SecondLife username and the password you just generated.
Once logged in, you'll be able to generate an API key under Developer Tools.
API Documentation
The CrystalCraze API is available at https://crystalcraze.net/api
. You will first have to provide the API key you generated and after that will have to execute one of the available operations on one of the endpoints.
Example: https://crystalcraze.net/api/your_api_key/dispensers/region/event/2/15
Endpoints
There are multiple endpoints you can perform operations on.
dispensers
If choosing to perform an operation on the endpoint dispensers
you will have to specify if you want to contact all dispensers in a region at once
Example: https://crystalcraze.net/api/your_api_key/dispensers/region/event/2/15
Or contacting just one specific dispenser:
Example: https://crystalcraze.net/api/your_api_key/dispensers/serial/event/2/15
Dispenser Serials
The serial of your dispenser is a 40-digit character sequence with 5 hyphens of the form 54c8e354-bb5a-19f3-dc2d-3ed60c13ac8b-1100.
You can usually find it in the description of the dispenser.
The serial of your dispenser is a 40-digit character sequence with 5 hyphens of the for 54c8e354-bb5a-19f3-dc2d-3ed60c13ac8b-1100
. You can usually find it in the description of the dispenser.There are multiple actions available to perform on your dispensers.
Actions
activate
This action allows you to activate the selected dispenser(s).
Example: https://crystalcraze.net/api/your_api_key/dispensers/serial/activate
disable
This action allows you to disable the selected dispenser(s).
Example: https://crystalcraze.net/api/your_api_key/dispensers/serial/disable
event
This action allows you to start an event on the selected dispenser(s).
Additional parameters:
- multiplier
- event_time (optional. If no time is provided the event will be classified as "open end")
Example: https://crystalcraze.net/api/your_api_key/dispensers/serial/event/multiplier/(event_time)
set
This action allows you to change a setting on the selected dispenser(s).
Additional parameters:
- setting_code
- value
Example: https://crystalcraze.net/api/your_api_key/dispensers/serial/set/setting_code/value
Setting | Code | Value/Range | Description |
---|---|---|---|
Notifications | 2
|
0 or 1
|
Set if the dispenser should send out owner notifications. |
Intelligent Placement | 3
|
0 or 1
|
Set if the dispenser should try to place crystals intelligently. |
Crystal Dropping | 4
|
0 or 1
|
Set if crystals should be placed below the dispenser. |
Crystal Sounds | 5
|
0 or 1
|
Set if crystal sounds should be audible or not. |
Night Glow | 6
|
0 or 1
|
Set if crystals should be full bright and glow or not. |
Shout-At-Event | 7
|
0 or 1
|
Set if the dispenser should shout out the beginning and end of an event. |
Shutdown-After-Event | 8
|
0 or 1
|
Set if the dispenser should shutdown after the event. |
Burst Rate | 33
|
2 - 30
|
Set how many crystals a dispenser should spawn per minute in normal mode. |
Spawn Area | 34
|
5 - 256 (x,y)
|
Set the spawn area crystals should spawn in. The format for the value is x-y-z. |
clusters
If choosing to perform an operation on the endpoint clusters
you will have to specify if you want to contact all clusters in a region at once
Example: https://crystalcraze.net/api/your_api_key/clusters/region/activate
Or contacting just one specific cluster:
Example: https://crystalcraze.net/api/your_api_key/clusters/serial/activate
Cluster Serials
The serial of your cluster is a 40-digit character sequence with 5 hyphens of the form 54c8e354-bb5a-19f3-dc2d-3ed60c13ac8b-130[1,5].
You can usually find it in the description of the cluster.
There are multiple actions available to perform on your clusters.
Actions
activate
This action allows you to activate the selected cluster(s).
Example: https://crystalcraze.net/api/your_api_key/clusters/region/activate
disable
This action allows you to disable the selected cluster(s).
Example: https://crystalcraze.net/api/your_api_key/clusters/region/disable
uncover
This action allows you to uncover the selected cluster(s).
Example: https://crystalcraze.net/api/your_api_key/clusters/region/uncover
craze
This action allows you to start a ClusterCraze.
Example: https://crystalcraze.net/api/your_api_key/clusters/region/craze