Project
A project holds most of the pieces in the Leverege Platform, the project method of api can be used to interact with many of these pieces.
Query Project
Currently, the Project methods require the projectId to work. This id can be found under the settings tab.
let project
try {
project = await api.project( projectId ).get()
} catch ( ex ) {
// error handling
}
The project
variable in the script will then have all of the project information. That information will include systems, users, blueprints and all other information associated with the Project.
Other available methods are:
- update( newProjectInfo ) - patches the project with the
newProjectInfo
- delete() - deletes the project
- users() - object to interact with the project users
- device() - has two methods, one for history and one for events
- members() - collection to interact with the project members
- accounts() - collection to interact with project accounts
- apiAccess() - collection to interact with apiAccess keys
- networks() - collection to interact with networks
- systems() - collection to interact with systems
- messageRoutes() - collection to interact with messageRoutes
- scenarios() - collection to interact with scenarios
- timers() - collection to interact with timers
- blueprints() - collection to interact with the blueprints
- events - lists out the events for the project
- verify( options )
- getByUsername( username ) - gets a user by their username