Movatterモバイル変換


[0]ホーム

URL:


CFEngine documentation homepage

Status and settings REST API

Suggest changes
Table of contents

REST API for managing settings, checking hub status.

Get server status

URI:https://hub.cfengine.com/api

Method: GET

Example response:

code
{  "meta": {    "page": 1,    "count": 1,    "total": 1,    "timestamp": 1437396760  },  "data": [    {      "apiName": "CFEngine Enterprise API",      "apiVersion": "v1",      "enterpriseVersion": "3.6.4",      "uiVersion": "ed2766c",      "coreVersion": "3.6.5",      "authenticated": "internal",      "userId": "admin",      "license": {        "expires": "2222-12-25 00:00:00+00",        "owner": "FREE ENTERPRISE - http://cfengine.com/terms for terms",        "licenseType": "Enterprise Free",        "granted": 25      }    }  ]}

Output:

  • apiNameHuman-friendly API name.
  • apiVersionAPI version string.
  • enterpriseVersionVersion of the CFEngine Enterprise build.
  • uiVersionThe internal build number of the Enterprise UI.
  • coreVersionThe version of CFEngine Core (Community) the Enterprise version was built against.
  • authenticated("internal", "external")Whether the request was authenticated using the internal users table or an external source.
  • license.expiresTime when the license expires.
  • license.ownerThe name of the license owner.
  • license.grantedHost number capacity granted by the license.
  • license.licenseTypeLicense description.

Example usage:Checking status

Get settings

URI:https://hub.cfengine.com/api/settings

Method: GET

Check all settings of Mission Portal and REST API.API call allowed only for administrator.

Example response:

code
{  "meta": {    "page": 1,    "count": 1,    "total": 1,    "timestamp": 1350992335  },  "data": [    {      "hostIdentifier": "default.sys.fqhost",      "rbacEnabled": true,      "logLevel": "error",      "ldapEnabled": true,      "blueHostHorizon": 900,      "sameHostsNumberOfRuns": 3    }  ]}

Output:

  • rbacEnabled(boolean)Whether RBAC is applied to requests.
  • hostIdentifier(string)The identfying string for hosts, such as name or IP.
  • ldapEnabled(boolean)Whether external authentication is activated.
  • logLevel("emergency", "alert", "critical", "error", "warning", "notice", "info", "debug")Syslog filter specifying the severity level at which messages produced by the API should be emitted to syslog and apache.log. (default: error).
  • sameHostsNumberOfRuns(integer)Number of samples used to identify a duplicate identity. Default value is 3.

Example usage:Example: Viewing settings

Update settings

URI:https://hub.cfengine.com/api/settings

Method: POST

Update settings for Mission Portal and API's. API call allowed only foradministrator.

Fields:

  • rbacEnabled(boolean)Whether RBAC is applied to requests.
  • hostIdentifier(string)The identfying string for hosts, such as name or IP.
  • ldapEnabled(boolean)Whether external authentication is activated.
  • logLevel("emergency", "alert", "critical", "error", "warning", "notice", "info", "debug")Syslog filter specifying the severity level at which messages produced by the API should be emitted to syslog and apache.log. (default: error).
  • blueHostHorizon(900)Threshold in minutes that hosts are unreachable before they are considered a health issue.
  • sameHostsNumberOfRuns(integer)Number of samples used to identify a duplicate identity. Default value is 3.

Example Request Body:

code
{  "hostIdentifier": "default.sys.fqhost",  "rbacEnabled": false,  "logLevel": "error",  "ldapEnabled": true,  "blueHostHorizon": 900,  "sameHostsNumberOfRuns": 5}

Example usage:Example: Configuring LDAP,Example: Changing the log level

Still need help?

Chat Ask a question on Github Mailing list
Version 
master3.24 (LTS)3.21 (LTS)view all versions

[8]ページ先頭

©2009-2025 Movatter.jp