@(documentation: Seq[(String,String,String)]) @main("Prism API") {
This server is running the Prism API: the API that provides near real-time information about infrastructure.
Some fields have recently been removed from certain objects as they were duplicated in the object metadata.
This includes the account and accountName fields that were previously on instances objects.
For the sake of everyones sanity, this page lists the endpoints that are available to experiment with.
Fields that are prefixed with an _ control the query format in some way - they are meta paramters. Fields that are not prefixed with an _ are interpreted as field filters. Field filters are only useful when the endpoint returns an array of objects, and they are used to filter the objects that are returned. You simply add a query parameter with the same name as a top level field and the parameter value will be used to find matching objects.
Some simple examples:
_brief or _brief=true | return only the id of objects |
_length or _length=true | add companion fields to objects detailing the size of any arrays that are members of the object |
_precodey or _precodey=true | output json results in precodeified format |
_reference=uri | output references to objects as Prism object URI (default is Prism ARN ID) |
_reference=inline | expand references with inline objects |
stage=TEST | return objects whose stage field has the value of TEST |
stage!=TEST | invert - return objects whose stage field does not have the value of TEST |
role~=id.* | regexs - return objects whose role field matches the regular expression id.* (i.e. starts with id) |
role!~=id.* | inverted regex - return objects whose role field does not match the regular expression |
stage=TEST&role~=id.* | multiple fields - an exact match of stage and a regex match of role; this returns objects whose stage field has value of TEST AND whose role field matches the regular expression |
stage=TEST&stage=CODE | fields can be specified twice - here we return objects whose stage field has the value of TEST OR CODE |
stage!=TEST&stage!=CODE | this makes no sense - here we return objects whose stage field has a value that is not TEST OR not CODE (i.e. all objects) |
tag.MongoReplSet=prodprv1 | Nested fields can be filtered using periods to separate the fields |
Note that multiple filters for the same field have the sense of an OR operation and then the filters for each individual field have the sense of an AND operation.
@route._1 | @route._2 | @route._3 |