CertStore ScheduleInventory

Keyfactor Command Agents typically monitor the contents of cert stores they manage on a pre-configured interval, either once per day or every n minutes. The ScheduleInventory endpointClosed An endpoint is a URL that enables the API to gain access to resources on a server. allows this interval configuration to be updated or switched on and off. Requests are formatted as follows, while the response is formatted as for AddCertStoreServer (see Table 701: POST /AddCertStoreServer Response Body):

Table 713: POST /ScheduleInventory Request Body

Parameter Name

Parameter Value

Id

Guid – Unique identifier of the certificate store. This field is the most specific, and does not require either the ClientMachine or StorePath fields to be provided.

ClientMachine

Machine on which the certificate store resides. This field is optional if the Id field is provided. It is required if used in conjunction with the ClientMachine field.

StorePath

Path and filename of the certificate store. This field is optional if the Id field is provided. It is required if used in conjunction with the ClientMachine field.

ScheduleType

Value indicating whether inventory should be off, on an interval, or daily. Possible values are:

Parameter Name

Parameter Value

0

Off

1

Interval

2

Daily

ScheduleTime

Time of day (hour and minute) that the inventory should run. Used for ScheduleType "Daily".

ScheduleInterval

Integer number of minutes that should elapse between inventories. Used for ScheduleType "Interval".

Overwrite

Boolean indicating whether a previous schedule configuration, if it exists, should be overwritten with the provided schedule configuration.

Example Request

POST http://<host>/CMSApi/CertStore/1/ScheduleInventory HTTP/1.1

{
	"ID": "832f87c7-0af7-4043-9840-3022faeeae45",
	"ClientMachine": "192.168.41.171",
	"StorePath": "/home/pi/cherry/cherrystore",
	"ScheduleType": 2,
	"ScheduleTime: "23:00",
	"Overwrite": true
}

Example Response

Status Code: 200

{
	"Message": "The operation completed successfully.",
	"Result": 1
}