( Return to API Overview )
Description
Provides methods to access and modify many aspects of configuration channels and server association. basically system.config name space
Namespace:
system.config
Description:
Given a list of servers and configuration channels, this method appends the configuration channels to either the top or the bottom (whichever you specify) of a system's subscribed configuration channels list. The ordering of the configuration channels provided in the add list is maintained while adding. If one of the configuration channels in the 'add' list has been previously subscribed by a server, the subscribed channel will be re-ranked to the appropriate place.
Parameters:
- string sessionKey
- array
- array
- string configChannelLabel
- boolean addToTop
- If true will prepend the given channels to the top of the server's config channel list
- If false will append the given channels to the bottom of the server's config channel list
Returns:
int - 1 on success.
Description:
Create a new file (text or binary) or directory with the given path, or update an existing path on a server.
Parameters:
- string sessionKey
- int serverId
- boolean isDir - True if the path is a directory, False if it is a file.
- string path
- struct (path info)
- string "contents" - Contents of the file (text or base64 encoded if binary), ignored if working with a directory.
- string 'owner' - Owner of the file/directory.
- string 'group' - Group name of the file/directory.
- string 'permissions' - Octal file/directory permissions (eg: 644)
- string "macro-start-delimiter" - Config file macro start delimiter. Use null or empty string to accept the default. (ignored if working with a directory)
- string "macro-end-delimiter" - Config file macro end delimiter. Use null or empty string to accept the default. (ignored if working with a directory)
- int commitToLocal - 1 if to commit the file to the server's local channel, 0 to commit to sandbox.
Returns:
struct (config revision) - string "path"
- string "type" - "file" or "directory".
- string "contents"
- string "revision"
- string "created"
- string "modified"
- string "owner"
- string "group"
- string "permissions"
- string "channel" - Channel name.
- boolean "binary" - Present for files only.
- string "md5" - Present for files only.
- string "macro-start-delimiter" - Present for files only.
- string "macro-end-delimiter" - Present for files only.
Description:
Removes file paths from a local or sandbox channel of a server.
Parameters:
- string sessionKey
- int serverId
- array - File paths to remove.
- boolean deleteFromLocal - True to delete form local channel, false to delete from sandbox.
Returns:
int 1 - on success.
Description:
Schedules a deploy action for all the configuration files on the given list of systems.
Parameters:
- string sessionKey
- array - Systems to schedule config deployment for.
- dateTime.iso8601 date - Earliest date for the deploy action.
Returns:
int - 1 on success.
Description:
List all global configuration channels associated to a system in the order of their ranking.
Parameters:
- string sessionKey
- int serverId
Returns:
array - struct (config channel)
- int "id" - Config channel ID.
- string "label" - Config channel label.
- string "name" - Config channel name.
- string "description"
- int "org_id"
- struct (config channel type)
- int "id"
- string "label"
- string "name"
- string "priority"
Description:
Return the list of files in a given channel.
Parameters:
- string sessionKey
- int serverId
- int listLocal - 1 for local override, 0 for sandbox override.
Returns:
array - struct (config file)
- string "type" - "file" or "directory".
- string "path" - File path.
- dateTime.iso8601 "modified" - Last modified date.
Description:
Given a list of paths and a server, returns details about the latest revisions of the paths.
Parameters:
- string sessionKey
- int serverId
- array - List of paths to examine.
- int searchLocal - 1 for local overrides, 0 for sandbox overrides.
Returns:
array - struct (config revision)
- string "path"
- string "type" - "file" or "directory".
- string "contents"
- string "revision"
- string "created"
- string "modified"
- string "owner"
- string "group"
- string "permissions"
- string "channel" - Channel name.
- boolean "binary" - Present for files only.
- string "md5" - Present for files only.
- string "macro-start-delimiter" - Present for files only.
- string "macro-end-delimiter" - Present for files only.
Description:
Remove config channels from the given servers.
Parameters:
- string sessionKey
- array
- array
- string configChannelLabel
Returns:
int - 1 on success.
Description:
Replace the existing set of config channels on the given servers. Channels are ranked according to their order in the configChannelLabels array.
Parameters:
- string sessionKey
- array
- array
- string configChannelLabel
Returns:
int - 1 on success.