Академический Документы
Профессиональный Документы
Культура Документы
com/help/scm/api
Tivoli Endpoint Manager: Security and Configuration Analytics supports a HTTP-based data API. Using this API, you make HTTP GET requests to the Tivoli Endpoint Manager
Analytics server, and receive responses containing JSON-encoded representation of the requested resource. Using URL query parameters, you can apply filters to the data, specify
what order it should be returned in, and select a subset of columns or rows.
Resources
Resources are sources of specific information, each of which is referenced by a distinct URI. There are two types of resources, collections and elements.
A collection URI follows the pattern /api/scm/:resource/ where :resource uses the plural form. For example, the collection URI for computers would be
http://damashii.bigfix.com/api/scm/computers/
An element URI follows the pattern /api/scm/:resource/:id where :id is the unique identifier for the element being addressed. For example, the element URI for the computer
with ID 42 would be http://damashii.bigfix.com/api/scm/computers/42
Authentication
Each Tivoli Endpoint Manager Analytics user is assigned an unique API access token. This token must accompany every API request as the token parameter. If the token is invalid,
the server will block the request and respond with HTTP code 401. A user may view their API token in the Account Preferences screen of the Tivoli Endpoint Manager Analytics
interface.
Request Format
Parameters
API options are specified using URL query parameters. The query parameters are formatted according to HTTP browser form submission conventions. Parameters will vary
depending on the resource type being addressed.
Some parameter values are logically lists (arrays) of multiple items. These "array valued" parameters are specified by providing one URL parameter for each item, with the name of
the parameter suffixed by [] (open and close square brackets). For example, to specify the values "Joe" and "Susan" for the "names" parameter, the URL query string would be
names[]=Joe&names[]=Susan. (This is the format that the jQuery function jQuery.param generates.)
Common Parameters
ccoolluummnnss
1 of 11 5/20/11 3:22 PM
Tivoli Endpoint Manager Analytics http://damashii.bigfix.com/help/scm/api
The columns parameter is an array-valued parameter specifying which columns to retrieve. See the documentation for each resource type to find out which columns are supported.
If no columns parameter is specified, a set of default columns will be retrieved. The set of default columns are subject to change with each release.
Examples:
columns[]=name&columns[]=version
Some resource URLs support retrieving data of nested records inline with the main record. For example, you may want to get data about the check associated with each check
result. In those cases, you can specify which columns from the association you want by prefixing each of them by the name of the association followed by a period:
Retrieve the name column from the base record and time column from an associated record:
columns[]=name&columns[]=rollup_history.time
Only one level of nested retrieval is supported in a single request; to retrieve data for data nested more than one level deep, make multiple requests to the appropriate resources
URLs.
ttiimmee
The time parameter specifies the time range desired for historical data. It is an array-valued parameter with exactly two elements, the starting and ending time encoded using the
ISO 8601 datetime format.
Example:
time[]=2011-01-01T00:00:00+00:00&time[]=2011-12-31T23:59:59+00:00
The rollup and rollup_history associations and the state column and history association of check and exception results respect the time parameter. Additionally, if the time
parameter is specified, the exceptions API will reflect the last imported state of exceptions, whereas if the time parameter is omitted, the current state is returned, which may differ if
exceptions have been modified in the management screens since the last import.
The data for other resources and associations always reflect the last imported value, and are not affected by the time parameter.
Collection Parameters
In addition to the common parameters listed above, a collection resource supports the following parameters.
ccrriitteerriiaa
The criteria parameter allows you to retrieve records which match specific conditions. The criteria parameter is expected to conform to the following JSON structure:
<criteria> ::= <left-brace> <boolean-operator><colon> <left-bracket> <criterion> [ { <comma> <criterion> }... ] <right-bracket> <right-brace>
<boolean-operator> ::= "and" | "or"
<criterion> ::= <criteria> | <left-bracket> <column> <comma> <operator> <comma> <value> <right-bracket>
<column> ::= <json-string>
<operator> ::= <json-string>
<value> ::= <json-array> | <json-string> | <json-number> | <json-null>
The valid operators will depend on the datatype of the <column> being filtered.
Example:
Retrieve computers whose name begins with 'R23PO' AND compliance is less than 100
2 of 11 5/20/11 3:22 PM
Tivoli Endpoint Manager Analytics http://damashii.bigfix.com/help/scm/api
Example:
Retrieve computers whose operating system contains "xp" OR the last seen date within a specific date range
{ or: [ ["os", "contains", "xp"], { and: [ ["last_seen", ">", "1970-01-01T00:00:00+00:00"], ["last_seen", "<", "1970-01-02T00:00:00+00:00"] ] } ] }
oorrddeerr
The order parameter is an array-valued parameter specifying how to sort the returned data. The default direction for sorting columns is ascending. To specify a descending sort,
you must append desc to the column name.
Examples:
order[]=name&order[]=version desc
lliimmiitt
The limit parameter specifies the number of rows to retrieve. If omitted, all rows will be retrieved. This does not affect the total property of the top-level JSON object.
ooffffsseett
The offset parameter specifies the number of rows to skip. It can be used in conjunction with the limit parameter to paginate results.
Examples:
limit=50&offset=2050
Response Format
The API response body is a JSON object. The exact format will depend on the resource type.
Collection Format
The collection response format contains a list of resource instances. It consists of a JSON object with two properties: total, whose integer value gives the total number of rows for
that resource, without regard to the limit parameter; and rows, an array of objects representing the resource instances. Each element will conform to the JSON schema for that
resource; see the "Schemas" section below for details.
Element Format
The element response format represents a single resource instance. It is a single JSON object conforming to the JSON schema for that resource.
Errors
If a server side processing error occurs, the API will return a JSON object with a single property error, whose value contains the error message.
Cross-domain Requests
The Tivoli Endpoint Manager Analytics API supports Cross Origin Resource Sharing and JSONP for cross-domain requests.
Schemas
For each resource type provided by the API, a corresponding JSON schema is provided that specifies the structure of that resource type. These schemas can be downloaded from
your Tivoli Endpoint Manager Analytics server:
http://[your.server.domain]/api/schemas/scm/[resource].json
http://damashii.bigfix.com/api/schemas/scm/exception.json
The schema shows you what columns are available and what each column means. It follows the JSON schema draft standard.
API Bookmarklet
For exploring the API and testing the various parameters, the following bookmarklet may be useful. Drag it to your bookmark bar, and when you are on an SCM list report, you can
3 of 11 5/20/11 3:22 PM
Tivoli Endpoint Manager Analytics http://damashii.bigfix.com/help/scm/api
click it to see the URL and resulting data for the corresponding API call. Note that if you wish to use the resulting URL outside of your browser, you will need to include your API
token as well.
Inspect API
Resources
Security and Configuration Analytics supports the following data API resources.
Overview
URLs
/api/scm/overview (show)
Retrieves information about the entire deployment.
Associations
rollup_history (array)
An array of rollups, ordered by time. Each element contains aggregated statistics about the compliance state of all visible computers across all content. If a range of times is
given, the history will be limited to the rollups which cover that range.
Element Columns
Exceptions
Schema
/api/schemas/scm/exception.json
URLs
/api/scm/exceptions (index)
Retrieves information about all exceptions accessible to the API user.
4 of 11 5/20/11 3:22 PM
Tivoli Endpoint Manager Analytics http://damashii.bigfix.com/help/scm/api
/api/scm/exceptions/:id (show)
Retrieves information about a specific exception identified by ID.
Columns
id (integer)
The database ID of the exception.
version (integer)
The version of the exception. Begins at 0 and is incremented by one each time the exception is updated.
updated_at (date-time string)
The time the exception was last updated.
expiration_date (string or null)
The exception expiration date, or null if it never expires.
reason (string)
The reason given by the user for the exception.
Associations
user
The user who created or last edited the exception.
checklist
The targeted checklist, or null if targeted by checks. All base columns from the checklist schema are also available via this association (for example, checklist.name).
checks
Targeted checks, or null if targeted by checklist. All base columns from the check schema are also available via this association (for example, checks.name).
computer_group
Targeted computer group, or null if targeted by computers. All base columns from the computer group schema are also available via this association (for example,
computer_group.name).
computers
Targeted computers, or null if targeted by computer group. All base columns from the computer schema are also available via this association (for example, computers.name).
Computer Groups
Schema
/api/schemas/scm/computer_group.json
URLs
/api/scm/computer_groups (index)
Retrieves information about the root computer groups accessible to the API user.
/api/scm/computer_groups/:id (show)
Retrieves information about a specific computer group identified by ID.
/api/scm/computer_groups/:id/children (index)
Retrieves information about children of a specific computer group.
/api/scm/checklists/:id/computer_groups (index)
Retrieves information about computer groups, including checklist-specific rollup data.
/api/scm/checks/:id/computer_groups (index)
Retrieves information about computer groups, including check-specific rollup data.
Columns
id (integer)
The database ID of the computer group.
updated_at (date-time string)
The time the computer group was last updated.
name (string)
The name of the computer group.
Associations
rollup_history (array)
An array of rollups, ordered by time. Each element contains aggregated statistics about the compliance state of the computer group across all content, or across a single
checklist or single check specified in the request path. If a range of times is given, the history will be limited to the rollups which cover that range.
Element Columns
5 of 11 5/20/11 3:22 PM
Tivoli Endpoint Manager Analytics http://damashii.bigfix.com/help/scm/api
The number of checklists in the deployment. This column is not available if the request path specifies a single checklist or check.
count_checks (integer)
The number of checks in the deployment, or in the checklist specified in the request path. This column is not available if the request path specifies a single checklist.
count_quartile_0 (integer)
The number of computers that are between 0% and 24% compliant across all subscribed checks, or across the checks in the checklist specified in the request path.
This column is not available if the request path specifies a single check.
count_quartile_1 (integer)
The number of computers that are between 25% and 49% compliant across all subscribed checks, or across the checks in the checklist specified in the request path.
This column is not available if the request path specifies a single check.
count_quartile_2 (integer)
The number of computers that are between 50% and 74% compliant across all subscribed checks, or across the checks in the checklist specified in the request path.
This column is not available if the request path specifies a single check.
count_quartile_3 (integer)
The number of computers that are between 75% and 99% compliant across all subscribed checks, or across the checks in the checklist specified in the request path.
This column is not available if the request path specifies a single check.
count_quartile_4 (integer)
The number of computers that are 100% compliant across all subscribed checks, or across the checks in the checklist specified in the request path. This column is not
available if the request path specifies a single check.
total_passed (integer)
The number of compliant, non-excepted results for the appropriate computers and checks.
total_excepted_passed (integer)
The number of compliant, excepted results for the appropriate computers and checks.
total_excepted_failed (integer)
The number of non-compliant, excepted results for the appropriate computers and checks.
total_failed (integer)
The number of non-compliant, non-excepted results for the appropriate computers and checks.
total_na (integer)
The number of non-applicable results for the appropriate computers and checks.
total_compliant (integer)
The sum of total_passed + total_excepted_passed + total_excepted_failed.
total_applicable (integer)
The sum of total_passed + total_failed + total_excepted_passed + total_excepted_failed.
total_by_states (integer)
The sum of total_passed + total_failed + total_excepted_passed + total_excepted_failed + total_na.
compliance_percentage (integer or null)
Equal to floor(total_compliant / total_applicable) 100, or null if no results are applicable
rollup
A single rollup having the same properties as the rollup_history association. If no time parameter is given, the most recent rollup is returned. If a range of times is given, the
most recent rollup within that range is returned. If a single time is given, the rollup closest in time is returned.
Computers
Schema
/api/schemas/scm/computer.json
URLs
/api/scm/computers (index)
Retrieves information about all computers accessible to the API user.
/api/scm/computers/:id (show)
Retrieves information about a specific computer identified by ID.
/api/scm/computer_groups/:id/computers (index)
Retrieves information about the members of a specific computer group.
/api/scm/checklists/:id/computers (index)
Retrieves information about computers subscribed to a specific checklist.
Columns
id (integer)
The database ID of the computer.
remote_id (integer)
The unique identifier of the computer in the source database.
last_seen (date-time string)
The time new data from the computer was last received.
os (string, array, or null)
OS
dns_name (string, array, or null)
DNS Name
name (string, array, or null)
Computer Name
ip_address (string, array, or null)
6 of 11 5/20/11 3:22 PM
Tivoli Endpoint Manager Analytics http://damashii.bigfix.com/help/scm/api
IP Address
Associations
rollup_history (array)
An array of rollups, ordered by time. Each element contains aggregated statistics about the compliance state of the computer across all subscribed checklists, or across a
single checklist specified in the request path. If a range of times is given, the history will be limited to the rollups which cover that range.
Element Columns
Checklists
Schema
/api/schemas/scm/checklist.json
URLs
/api/scm/checklists (index)
Retrieves information about all checklists.
/api/scm/checklists/:id (show)
Retrieves information about a specific checklist identified by ID.
/api/scm/computer_groups/:id/checklists (index)
Retrieves information about checklists, including computer-group specific rollup data.
/api/scm/computers/:id/checklists (index)
Retrieves information about checklists to which a specific computer is subscribed.
Columns
id (integer)
The database ID of the checklist.
site_tag (string)
The unique identifier of the checklist's site in the source database.
updated_at (date-time string)
The time the checklist was last updated.
name (string)
The name of the checklist.
Associations
rollup_history (array)
An array of rollups, ordered by time. Each element contains aggregated statistics about the compliance state of the checklist across all computers visible to the user, or
across a single computer or group of computers specified in the request path. If a range of times is given, the history will be limited to the rollups which cover that range.
Element Columns
7 of 11 5/20/11 3:22 PM
Tivoli Endpoint Manager Analytics http://damashii.bigfix.com/help/scm/api
Checks
Schema
/api/schemas/scm/check.json
URLs
/api/scm/checks (index)
Retrieves information about all checks.
/api/scm/checks/:id (show)
Retrieves information about a specific check identified by ID.
/api/scm/checklists/:id/checks (index)
Retrieves information the checks belonging to a specific checklist.
/api/scm/computer_groups/:id/checks (index)
Retrieves information about checks, including computer-group specific rollup data.
Columns
id (integer)
The database ID of the check.
remote_id (string or null)
The unique identifier of the check. This is the value of the 'x-fixlet-scm-id' custom MIME field.
updated_at (string or null)
The time the check was last updated.
name (string or null)
The name of the check.
checklist_name (string or null)
The name of the check's checklist.
8 of 11 5/20/11 3:22 PM
Tivoli Endpoint Manager Analytics http://damashii.bigfix.com/help/scm/api
Associations
rollup_history (array)
An array of rollups, ordered by time. Each element contains aggregated statistics about the compliance state of the check across all computers visible to the user, or across a
particular computer group specified in the request path. If a range of times is given, the history will be limited to the rollups which cover that range.
Element Columns
9 of 11 5/20/11 3:22 PM
Tivoli Endpoint Manager Analytics http://damashii.bigfix.com/help/scm/api
Element Columns
name (string)
The machine-readable name of this desired value.
human_name (string)
The human-readable name of this desired value.
description (string or null)
The description of this desired value.
type (string)
The type of this desired value.
default_value (string or null)
The value that the desired value takes if not customized.
desired_value (string or null)
The value set as the desired value. A null value can indicate that the desired value is null, or that no desired value has been set. Use the 'customized' property to
distinguish between these two cases.
current_value (string or null)
The current desired value. Equal to desired_value if customized, otherwise default_value.
customized (boolean)
Whether or not a custom desired value has been set.
Check Results
Schema
/api/schemas/scm/check_result.json
URLs
/api/scm/check_results (index)
Retrieves information about all check results.
/api/scm/checklists/:id/check_results (index)
Retrieves information about results from a specific checklist.
/api/scm/checks/:id/check_results (index)
Retrieves information about results from a specific check.
/api/scm/computer_groups/:id/check_results (index)
Retrieves information about results from a specific computer group.
/api/scm/computer/:id/check_results (index)
Retrieves information about results from a specific computer.
Columns
state (string)
The current state of the check on the computer.
Associations
check
The check for which this is a result. All base columns from the check schema are also available via this association (for example, check.name).
computer
The computer for which this is a result. All base columns from the computer schema are also available via this association (for example, computer.name).
history (array)
The history of results for the check on the computer.
Element Columns
10 of 11 5/20/11 3:22 PM
Tivoli Endpoint Manager Analytics http://damashii.bigfix.com/help/scm/api
Element Columns
name (string)
The name of this measured value.
type (string)
The type of this measured value.
value (string, array, or null)
The measured value. If the measured value is plural, this is an array. If a value has not been reported or if the property is inactive, it is null.
Exception Results
Schema
/api/schemas/scm/exception_result.json
URLs
/api/scm/exception_results (index)
Retrieves information about all exception results.
/api/scm/checklists/:id/exception_results (index)
Retrieves information about results from a specific checklist.
/api/scm/checks/:id/exception_results (index)
Retrieves information about results from a specific check.
/api/scm/computer_groups/:id/exception_results (index)
Retrieves information about results from a specific computer group.
/api/scm/computer/:id/exception_results (index)
Retrieves information about results from a specific computer.
Columns
state (string)
The current state of the check/computer/exception combination.
Associations
check
The check for which this is a result. All base columns from the check schema are also available via this association (for example, check.name).
computer
The computer for which this is a result. All base columns from the computer schema are also available via this association (for example, computer.name).
exception
The exception for which this is a result. All base columns from the exception schema are also available via this association (for example, exception.reason).
history (array)
The history of results for the check/computer/exception combination.
Element Columns
11 of 11 5/20/11 3:22 PM