api

package
v1.0.140 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 4, 2016 License: MIT Imports: 4 Imported by: 0

README

API server information

API path Description
/ Redirects to the /UI path (and the web based user interface)
/config/get Gets a single configuration item
/config/set Sets (creates or updates) a configuration item
/config/remove Removes a configuration item
/config/getall Gets all configuration items
/config/getallforapp Get all configuration items for a single application (plus the default * application)
/applications/getall Get all applications

######Requests Most API operations expect a configitem object in the POST body that will be used to either filter (in a get operation), update or create (in a set operation), or remove an item (in a remove operation).

For example:

{
    "application" : "WickedCool",
    "name": "TestItem42",
    "value": "Magic!"
}

######Responses All operations will return an object that contain the fields status, message, and data.

For Example:

{
  "status": 200,
  "message": "Config items found",
  "data": [
    {
      "id": 1,
      "application": "*",
      "machine": "",
      "name": "Environment",
      "value": "DEV",
      "updated": "2016-04-26T09:11:17.897Z"
    },
    {
      "id": 2,
      "application": "TestApp",
      "machine": "",
      "name": "AppUser",
      "value": "TestApp_dev",
      "updated": "2016-04-26T09:11:40.34Z"
    }
  ]
}
/config/get

This operation retrieves a single configuration item

Example request:

{
  "name": "test"
}

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetAllApplications added in v1.0.49

func GetAllApplications(rw http.ResponseWriter, req *http.Request)

Gets all applications

func GetAllConfig added in v1.0.24

func GetAllConfig(rw http.ResponseWriter, req *http.Request)

Gets all config information

func GetAllConfigForApp added in v1.0.49

func GetAllConfigForApp(rw http.ResponseWriter, req *http.Request)

Gets all config information for a given application

func GetConfig

func GetConfig(rw http.ResponseWriter, req *http.Request)

Gets a specfic config item based on application and config item name

func InitStore added in v1.0.24

func InitStore(rw http.ResponseWriter, req *http.Request)

Initializes a store

func RemoveConfig added in v1.0.28

func RemoveConfig(rw http.ResponseWriter, req *http.Request)

Removes a specific config item

func SetConfig added in v1.0.24

func SetConfig(rw http.ResponseWriter, req *http.Request)

Set a specific config item

func ShowUI added in v1.0.37

func ShowUI(rw http.ResponseWriter, req *http.Request)

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL