Scheduling Synchronization
This section describes the APIs that are used to create job configuration and run jobs for different clouds and key sources. These APIs are used to perform the following tasks:
Creating Job Configurations
Fetching List of Job Configurations
Viewing Details of Job Configurations
Updating Job Configurations
Deleting Job Configurations
Manually Running Jobs
Viewing List of Job Runs
Viewing Details of Job Runs
Deleting Job Runs
Creating Job Configurations
Use the post /v1/scheduler/job-configs
API to create a new job configuration.
Syntax
curl -k '<IP>/api/v1/scheduler/job-configs' -H 'Authorization: Bearer AUTHTOKEN' -H 'Content-Type: application/json' --data-binary $'{\n "name": "<configuration name> ",\n "operation": "<operation>",\n "description": "<description>",\n "run_on": "<run on>",\n "run_at": "<time when you want to run the job>,\n "cckm_synchronization_params": {<synchronization parameters>}\n} ' --compressed
Request Parameters
Parameter | Type | Description |
---|---|---|
AUTHTOKEN | string | Authorization token. |
name | string | Name of the job configuration. |
operation | string | Type of operation that can be scheduled. For synchronization, specify cckm_synchronization . Also, specify cckm_synchronization_params . |
run_at | string | Time when a job will run. Specify this parameter using the cron expression format: "* * * * *" . |
cckm_synchronization_params | JSON | Parameters required for configuring a synchronization job. Refer to Synchronization Parameters for details. |
description | string | Description for the job configuration. |
disabled | boolean | Flag to disable job configuration. Set to true to disable the job. |
end_date | string | End date for a job configuration. The job becomes inactive at this time. Specify the value in the RFC3339 format. |
run_on | string | Node in a cluster on which the job configuration will run. Possible values are: • any : Runs the job configuration on any node.• <specific node id> : Runs the job configuration on the specified node. |
start_date | string | Time to start a job configuration. The job becomes active at this time. Specify the value in the RFC3339 format. |
Synchronization Parameters
Parameter | Type | Description |
---|---|---|
cloud_name | string | Name of the cloud. The cloud names can be: • aws : AWS cloud. Also, specify kms .• hsm-luna : Luna HSM. Also, specify partitions .• dsm : Data Security Manager. Also, specify domains .• AzureCloud : Azure cloud. Also, specify key_vaults .• gcp : Google cloud platform. Also, specify key_rings .• sfdc : Salesforce cloud. Also, specify organizations . |
kms | array of strings | Name or ID of the AWS KMS. |
partitions | array of strings | Name or ID of the Luna HSM partitions. |
domains | array of strings | Name or ID of the DSM domains. |
key_vaults | array of strings | Name or ID of the Azure key vaults. |
key_rings | array of strings | Name or ID of the Google key rings from which Google cryptographic keys will be synchronized. At least one key ring is required for the synchronization operation. |
organizations | array of strings | Organization ID on Salesforce cloud or resource ID of Salesforce organization on the CipherTrust Manager. At least one ID is required for the synchronization operation. |
synchronize_all | boolean | Whether to synchronize all keys from all vaults, kms, organizations, or key rings etc. from the specified cloud_name . Set to true or false . |
Note
kms
, partitions
, domains
, key_vaults
, key_rings
, and organizations
are mutually exclusive. Specify only one based on the cloud_name
. Also, if you want to synchronize all keys from the specified cloud_name
, then specify only synchronize_all
.
Example Request
curl -k 'https://127.0.0.1/api/v1/scheduler/job-configs' -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJiYzc5M2E4ZC00YWVhLTRlM2EtYWRiYy05YmRlMDhjYjE5MDYiLCJzdWIiOiJsb2NhbHw2MjgyZDZkNC0wZGI5LTRmZmEtYjc4Ny0xNzY0NTFiMmViNGQiLCJpc3MiOiJreWxvIiwiYWNjIjoia3lsbyIsInByZWZlcnJlZF91c2VybmFtZSI6ImFkbWluIiwiY3VzdCI6eyJkb21haW5faWQiOiIwMDAwMDAwMC0wMDAwLTAwMDAtMDAwMC0wMDAwMDAwMDAwMDAiLCJncm91cHMiOlsiYWRtaW4iXSwic2lkIjoiODI1OWFhZTEtNjkzMi00NzE2LTlhMjItNzAzZWFlNzc2MWUzIiwiem9uZV9pZCI6IjAwMDAwMDAwLTAwMDAtMDAwMC0wMDAwLTAwMDAwMDAwMDAwMCJ9LCJqd3RpZCI6IjRjYzQ4Y2I1LTRjMGQtNGZiOS1hMmE1LTg4Njg3ZDE1YzQ4MyIsImlhdCI6MTU5NDcyNjU1MSwiZXhwIjoxNTk0NzI2ODUxfQ.Nx2JsU7eD1QUdPOxE94DbCuWBjh9N5a6c96oVpnaKLs' -H 'Content-Type: application/json' --data-binary $'{\n "name": "Sync CCKM AWS keys ",\n "operation": "cckm_synchronization",\n "description": "This is to sync CCKM AWS gov keys",\n "run_on": "any",\n "run_at": "0 1 * * *",\n "cckm_synchronization_params": {\n "cloud_name": "aws",\n "kms": [\n "connection_for_aws"\n ]\n }\n}' --compressed
Example Response
{
"id": "122d35bf-fa22-4227-9174-04ea8cbc671f",
"uri": "kylo:kylo:scheduler:job_configs:122d35bf-fa22-4227-9174-04ea8cbc671f",
"account": "kylo:kylo:admin:accounts:kylo",
"application": "ncryptify:gemalto:admin:apps:kylo",
"devAccount": "ncryptify:gemalto:admin:accounts:gemalto",
"createdAt": "2020-07-14T11:39:36.723320516Z",
"name": "Sync CCKM AWS keys ",
"updatedAt": "2020-07-14T11:39:36.723320516Z",
"description": "This is to sync CCKM AWS gov keys",
"operation": "cckm_synchronization",
"run_at": "0 1 * * *",
"run_on": "any",
"job_config_params": {
"cloud_name": "aws",
"kms": [
"connection_for_aws"
]
}
}
The sample output shows that a job configuration is created and a unique ID (122d35bf-fa22-4227-9174-04ea8cbc671f
) for the job configuration is returned.
To know more about response parameters, refer to Response Parameters.
Response Codes
Response Code | Description |
---|---|
2xx | Success |
4xx | Client errors |
5xx | Server errors |
Refer to HTTP status codes for details.
Fetching List of Job Configurations
Use the get /v1/scheduler/job-configs
API to view the list of job configurations for a specified account. The results can be filtered using the query parameters.
Syntax
curl -k '<IP>/api/v1/cckm/aws/keys?skip=0&limit=10' -H 'Authorization: Bearer AUTHTOKEN' --compressed
Request Parameter
Parameter | Type | Description |
---|---|---|
AUTHTOKEN | string | Authorization token. |
Request Query Parameters
Parameter | Type | Description |
---|---|---|
skip | integer | Number of records to skip. For example, if "skip":5 is specified, the first five records will not be displayed in the output. |
limit | integer | Numbers of records to display. For example, if "limit":10 is specified, then the next 10 records (after skipping the number of records specified in the skip parameter) will be displayed in the output. |
sort | string | Comma-delimited list of properties to sort the results. |
name | string | Name of the job configuration. |
id | string | ID of the job. |
operation | string | Name of the operation. |
disabled | string | Disabled job configuration. |
cloud_name | string | Name of the cloud. The cloud names can be: • aws • hsm-luna • dsm • AzureCloud • gcp • sfdc |
createdBefore | string | Job configurations created on or before the specified time. |
createdAfter | string | Job configurations created on or after the specified time. |
Example Request
curl -k 'https://127.0.0.1/api/v1/scheduler/job-configs?skip=0&limit=10' -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJiYzc5M2E4ZC00YWVhLTRlM2EtYWRiYy05YmRlMDhjYjE5MDYiLCJzdWIiOiJsb2NhbHw2MjgyZDZkNC0wZGI5LTRmZmEtYjc4Ny0xNzY0NTFiMmViNGQiLCJpc3MiOiJreWxvIiwiYWNjIjoia3lsbyIsInByZWZlcnJlZF91c2VybmFtZSI6ImFkbWluIiwiY3VzdCI6eyJkb21haW5faWQiOiIwMDAwMDAwMC0wMDAwLTAwMDAtMDAwMC0wMDAwMDAwMDAwMDAiLCJncm91cHMiOlsiYWRtaW4iXSwic2lkIjoiODI1OWFhZTEtNjkzMi00NzE2LTlhMjItNzAzZWFlNzc2MWUzIiwiem9uZV9pZCI6IjAwMDAwMDAwLTAwMDAtMDAwMC0wMDAwLTAwMDAwMDAwMDAwMCJ9LCJqd3RpZCI6IjYzMzFmODc5LWJlMTUtNDQ5OC1iOGIxLTMwZDVlZGU0MjVmOSIsImlhdCI6MTU5NDcyNjg3NywiZXhwIjoxNTk0NzI3MTc3fQ.EObiI9lbTtu80nD-0H08apwCMprhQZFj6gCueJAumsk' --compressed
Example Response
{
"skip": 0,
"limit": 10,
"total": 2,
"resources": [
{
"id": "83bb1bda-e6dd-438d-9a66-9e3026792b20",
"uri": "kylo:kylo:scheduler:job_configs:83bb1bda-e6dd-438d-9a66-9e3026792b20",
"account": "kylo:kylo:admin:accounts:kylo",
"application": "ncryptify:gemalto:admin:apps:kylo",
"devAccount": "ncryptify:gemalto:admin:accounts:gemalto",
"createdAt": "2020-07-14T11:42:02.587962Z",
"name": "Sync CCKM AWSkeys ",
"updatedAt": "2020-07-14T11:42:02.587962Z",
"description": "This is to sync CCKM AWS keys",
"operation": "cckm_synchronization",
"run_at": "0 1 * * *",
"run_on": "any",
"job_config_params": {
"kms": [
"test_aws"
],
"cloud_name": "aws",
}
},
{
"id": "122d35bf-fa22-4227-9174-04ea8cbc671f",
"uri": "kylo:kylo:scheduler:job_configs:122d35bf-fa22-4227-9174-04ea8cbc671f",
"account": "kylo:kylo:admin:accounts:kylo",
"application": "ncryptify:gemalto:admin:apps:kylo",
"devAccount": "ncryptify:gemalto:admin:accounts:gemalto",
"createdAt": "2020-07-14T11:39:36.723321Z",
"name": "Sync CCKM AWS keys ",
"updatedAt": "2020-07-14T11:39:36.723321Z",
"description": "This is to sync CCKM AWS gov keys",
"operation": "cckm_synchronization",
"run_at": "0 1 * * *",
"run_on": "any",
"job_config_params": {
"kms": [
"connection_for_aws"
],
"cloud_name": "aws",
}
}
]
}
The sample output shows the list of job configurations for a specified account.
To know more about response parameters, refer to Response Parameters.
Response Codes
Response Code | Description |
---|---|
2xx | Success |
4xx | Client errors |
5xx | Server errors |
Refer to HTTP status codes for details.
Viewing Details of Job Configurations
Use the get /v1/scheduler/job-configs/{id}
API to view the details of a job configuration with a specific ID.
Syntax
curl -k '<IP>/api/v1/scheduler/job-configs/{id}' -H 'Authorization: Bearer AUTHTOKEN' --compressed
Here, {id}
represents the ID of the job configuration.
Request Parameter
Parameter | Type | Description |
---|---|---|
AUTHTOKEN | string | Authorization token. |
Example Request
curl -k 'https://127.0.0.1/api/v1/scheduler/job-configs/c574efd3-10f2-48c6-ae18-e0700ac8145e' -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJiYzc5M2E4ZC00YWVhLTRlM2EtYWRiYy05YmRlMDhjYjE5MDYiLCJzdWIiOiJsb2NhbHw2MjgyZDZkNC0wZGI5LTRmZmEtYjc4Ny0xNzY0NTFiMmViNGQiLCJpc3MiOiJreWxvIiwiYWNjIjoia3lsbyIsInByZWZlcnJlZF91c2VybmFtZSI6ImFkbWluIiwiY3VzdCI6eyJkb21haW5faWQiOiIwMDAwMDAwMC0wMDAwLTAwMDAtMDAwMC0wMDAwMDAwMDAwMDAiLCJncm91cHMiOlsiYWRtaW4iXSwic2lkIjoiODI1OWFhZTEtNjkzMi00NzE2LTlhMjItNzAzZWFlNzc2MWUzIiwiem9uZV9pZCI6IjAwMDAwMDAwLTAwMDAtMDAwMC0wMDAwLTAwMDAwMDAwMDAwMCJ9LCJqd3RpZCI6IjU4OWU2NjBjLWU1MzgtNGZmOS04MWQzLWNiMWI3MWYzZDNhYiIsImlhdCI6MTU5NDcyNjE3OCwiZXhwIjoxNTk0NzI2NDc4fQ.xzoksM7OjCC65lPg3keDS3iGnz4C6ZHFUgNlAHl7dVQ' --compressed
Example Response
{
"id": "122d35bf-fa22-4227-9174-04ea8cbc671f",
"uri": "kylo:kylo:scheduler:job_configs:122d35bf-fa22-4227-9174-04ea8cbc671f",
"account": "kylo:kylo:admin:accounts:kylo",
"application": "ncryptify:gemalto:admin:apps:kylo",
"devAccount": "ncryptify:gemalto:admin:accounts:gemalto",
"createdAt": "2020-07-14T11:39:36.723321Z",
"name": "Sync CCKM AWS keys ",
"updatedAt": "2020-07-14T11:39:36.723321Z",
"description": "This is to sync CCKM AWS gov keys",
"operation": "cckm_synchronization",
"run_at": "0 1 * * *",
"run_on": "any",
"job_config_params": {
"kms": [
"connection_for_aws"
],
"cloud_name": "aws",
}
}
The sample output shows the details corresponding to a specific job configuration ID (122d35bf-fa22-4227-9174-04ea8cbc671f
).
To know more about response parameters, refer to Response Parameters.
Response Codes
Response Code | Description |
---|---|
2xx | Success |
4xx | Client errors |
5xx | Server errors |
Refer to HTTP status codes for details.
Updating Job Configurations
Use the patch /v1/scheduler/job-configs/{id}
API to update an existing synchronization job configuration.
If you are synchronizing cloud keys, you can only update kms
, partitions
, domains
, key_rings
, key_vaults
, or organizations
.
Syntax
curl -k '<IP>/api/v1/scheduler/job-configs/{id}' -X PATCH -H 'Authorization: Bearer AUTHTOKEN' -H 'Content-Type: application/json' --data-binary $'{\n "cckm_synchronization_params": {<synchronization parameter>}' --compressed
Here, {id}
represents the ID of the job configuration.
Request Parameters
Parameter | Type | Description |
---|---|---|
AUTHTOKEN | string | Authorization token. |
cckm_synchronization_params | JSON | CCKM synchronization specific parameters. Refer to Synchronization Parameters for details. |
Synchronization Parameters
Parameter | Type | Description |
---|---|---|
kms | array of strings | Name or ID of the AWS KMS. |
partitions | array of strings | Name or ID of the Luna HSM partitions. |
domains | array of strings | Name or ID of the DSM domains. |
key_vaults | array of strings | Name or ID of the Azure key vaults. |
key_rings | array of strings | Name or ID of the Google key rings from which Google cryptographic keys will be synchronized. At least one key ring is required for the synchronization operation. |
organizations | array of strings | Organization ID on Salesforce cloud or resource ID of Salesforce organization on the CipherTrust Manager. At least one ID is required for the synchronization operation. |
synchronize_all | boolean | Whether to synchronize all keys from all vaults, kms, organizations, or key rings etc. from the specified cloud_name . Set to true or false . |
Note
kms
, partitions
, domains
, key_vaults
, key_rings
, and organizations
are mutually exclusive. Specify only one based on the cloud_name
. Also, if you want to synchronize all keys from the specified cloud_name
, then specify only synchronize_all
.
Example Request
curl -k 'https://127.0.0.1/api/v1/scheduler/job-configs/122d35bf-fa22-4227-9174-04ea8cbc671f' -X PATCH -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiI3MDZhYzYzOC04MTI0LTRmMjYtYjhlYy05OGI0ZWIyYWY0MTgiLCJzdWIiOiJsb2NhbHxlNWViZjc3Ni0xYzlkLTRjMjEtOWI4YS01ZTVhZTJmY2RmMzAiLCJpc3MiOiJreWxvIiwiYWNjIjoia3lsbyIsInByZWZlcnJlZF91c2VybmFtZSI6ImFkbWluIiwiY3VzdCI6eyJkb21haW5faWQiOiIwMDAwMDAwMC0wMDAwLTAwMDAtMDAwMC0wMDAwMDAwMDAwMDAiLCJncm91cHMiOlsiYWRtaW4iXSwic2lkIjoiZmIzMDU2ZTItYWRhZi00NGMzLWE2OWEtN2JjZjM1ZTFjNTViIiwiem9uZV9pZCI6IjAwMDAwMDAwLTAwMDAtMDAwMC0wMDAwLTAwMDAwMDAwMDAwMCJ9LCJqd3RpZCI6ImQ4MzcxNmRmLTZlODctNGIxNy04ODIwLWQ3ZGI3ZjRkNGMwOSIsImlhdCI6MTU5Njg2OTEwMSwiZXhwIjoxNTk2ODY5NDAxfQ.wKJ4Z1decizfs13b15KvgrSuf46NEVI-DLatbrm1XdY' -H 'Content-Type: application/json' --data-binary $'{\n "cckm_synchronization_params": {\n "kms": [\n "a1"\n ]\n}\n \n}' --compressed
Example Response
{
"id": "122d35bf-fa22-4227-9174-04ea8cbc671f",
"uri": "kylo:kylo:scheduler:job_configs:122d35bf-fa22-4227-9174-04ea8cbc671f",
"account": "kylo:kylo:admin:accounts:kylo",
"application": "ncryptify:gemalto:admin:apps:kylo",
"devAccount": "ncryptify:gemalto:admin:accounts:gemalto",
"createdAt": "2020-07-14T11:39:36.723321Z",
"name": "Sync CCKM AWS keys ",
"updatedAt": "2020-07-14T12:07:17.2538561Z",
"description": "This is to sync CCKM AWS gov keys",
"operation": "cckm_synchronization",
"run_at": "0 1 * * *",
"run_on": "any",
"job_config_params": {
"cloud_name": "aws",
"kms": [
"a1"
]
}
{
To know more about response parameters, refer to Response Parameters.
Response Codes
Response Code | Description |
---|---|
2xx | Success |
4xx | Client errors |
5xx | Server errors |
Refer to HTTP status codes for details.
Deleting Job Configurations
Use the delete /v1/scheduler/job-configs/{id}
API to delete a job configuration.
Syntax
curl -k 'https://<IP>/api/v1/scheduler/job-configs/{id}' -X DELETE -H 'Authorization: Bearer AUTHTOKEN' --compressed
Here, {id}
represents the ID of the job configuration.
Request Parameter
Parameter | Type | Description |
---|---|---|
AUTHTOKEN | string | Authorization token. |
Example Request
curl -k 'https://127.0.0.1/api/v1/scheduler/job-configs/122d35bf-fa22-4227-9174-04ea8cbc671f' -X DELETE -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJiYzc5M2E4ZC00YWVhLTRlM2EtYWRiYy05YmRlMDhjYjE5MDYiLCJzdWIiOiJsb2NhbHw2MjgyZDZkNC0wZGI5LTRmZmEtYjc4Ny0xNzY0NTFiMmViNGQiLCJpc3MiOiJreWxvIiwiYWNjIjoia3lsbyIsInByZWZlcnJlZF91c2VybmFtZSI6ImFkbWluIiwiY3VzdCI6eyJkb21haW5faWQiOiIwMDAwMDAwMC0wMDAwLTAwMDAtMDAwMC0wMDAwMDAwMDAwMDAiLCJncm91cHMiOlsiYWRtaW4iXSwic2lkIjoiODI1OWFhZTEtNjkzMi00NzE2LTlhMjItNzAzZWFlNzc2MWUzIiwiem9uZV9pZCI6IjAwMDAwMDAwLTAwMDAtMDAwMC0wMDAwLTAwMDAwMDAwMDAwMCJ9LCJqd3RpZCI6IjViNmI2ZjQ3LTg2MmItNDg3YS04NzE1LWM3YTEyYzUyMWNiZSIsImlhdCI6MTU5NDcyODQzNiwiZXhwIjoxNTk0NzI4NzM2fQ.J0WANDAoL40KDZNWKHsR9hVaz5pW7JXIoYOSLJtgNKk' --compressed
Example Response
{
"status": 204
}
The sample output shows that the job configuration is deleted successfully and "status": 204
is returned in response.
Response Codes
Response Code | Description |
---|---|
2xx | Success |
4xx | Client errors |
5xx | Server errors |
Refer to HTTP status codes for details.
Manually Running Jobs
Use the post /v1/scheduler/job-configs/{id}/run-now
API to manually run a job when needed.
Syntax
curl -k '<IP>/api/v1/scheduler/job-configs/{id}/run-now' -X POST -H 'Authorization: Bearer AUTHTOKEN' --compressed
Here, {id}
represents the ID of the job configuration.
Request Parameter
Parameter | Type | Description |
---|---|---|
AUTHTOKEN | string | Authorization token. |
Example Request
curl -k 'https://127.0.0.1/api/v1/scheduler/job-configs/122d35bf-fa22-4227-9174-04ea8cbc671f/run-now' -X POST -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJiYzc5M2E4ZC00YWVhLTRlM2EtYWRiYy05YmRlMDhjYjE5MDYiLCJzdWIiOiJsb2NhbHw2MjgyZDZkNC0wZGI5LTRmZmEtYjc4Ny0xNzY0NTFiMmViNGQiLCJpc3MiOiJreWxvIiwiYWNjIjoia3lsbyIsInByZWZlcnJlZF91c2VybmFtZSI6ImFkbWluIiwiY3VzdCI6eyJkb21haW5faWQiOiIwMDAwMDAwMC0wMDAwLTAwMDAtMDAwMC0wMDAwMDAwMDAwMDAiLCJncm91cHMiOlsiYWRtaW4iXSwic2lkIjoiODI1OWFhZTEtNjkzMi00NzE2LTlhMjItNzAzZWFlNzc2MWUzIiwiem9uZV9pZCI6IjAwMDAwMDAwLTAwMDAtMDAwMC0wMDAwLTAwMDAwMDAwMDAwMCJ9LCJqd3RpZCI6IjU4OWU2NjBjLWU1MzgtNGZmOS04MWQzLWNiMWI3MWYzZDNhYiIsImlhdCI6MTU5NDcyNjE3OCwiZXhwIjoxNTk0NzI2NDc4fQ.xzoksM7OjCC65lPg3keDS3iGnz4C6ZHFUgNlAHl7dVQ' --compressed
Example Response
{
"job_id": "a10b45e0-dc71-48d3-a50c-d40954abed80",
"job_config_id": "122d35bf-fa22-4227-9174-04ea8cbc671f"
}
This API creates a new job and waits for the job to be posted on the job queue. A "job_id"
is returned if the job is posted within about 30 seconds.
To know more about response parameters, refer to Response Parameters.
Response Codes
Response Code | Description |
---|---|
2xx | Success |
4xx | Client errors |
5xx | Server errors |
Refer to HTTP status codes for details.
Viewing List of Job Runs
Use the get /v1/scheduler/jobs
API to view the list of job runs for the logged in account. You can view the results of jobs executed in the past, including status and error count.
Syntax
curl -k '<IP>/api/v1/scheduler/jobs?skip=0&limit=10' -H 'Authorization: Bearer AUTHTOKEN' --compressed
Request Parameter
Parameter | Type | Description |
---|---|---|
AUTHTOKEN | string | Authorization token. |
Request Query Parameters
Parameter | Type | Description |
---|---|---|
skip | integer | Number of records to skip. For example, if "skip":5 is specified, the first five records will not be displayed in the output. |
limit | integer | Numbers of records to display. For example, if "limit":10 is specified, then the next 10 records (after skipping the number of records specified in the skip parameter) will be displayed in the output. |
sort | string | Comma-delimited list of properties to sort the results. |
id | string | ID of the scheduler job. |
name | string | Name of the job configuration. |
account | string | Name of the logged in account. |
job_config_id | string | ID of the job configuration. |
operation | string | Name of the operation. |
status | string | Status of the job run. |
createdBefore | string | Jobs created on or before the specified time. |
createdAfter | string | Jobs created on or after the specified time. |
processing_node | string | Node or IP address on which the job is run. |
Example Request
curl -k 'https://127.0.0.1/api/v1/scheduler/jobs?skip=0&limit=10' -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJiYzc5M2E4ZC00YWVhLTRlM2EtYWRiYy05YmRlMDhjYjE5MDYiLCJzdWIiOiJsb2NhbHw2MjgyZDZkNC0wZGI5LTRmZmEtYjc4Ny0xNzY0NTFiMmViNGQiLCJpc3MiOiJreWxvIiwiYWNjIjoia3lsbyIsInByZWZlcnJlZF91c2VybmFtZSI6ImFkbWluIiwiY3VzdCI6eyJkb21haW5faWQiOiIwMDAwMDAwMC0wMDAwLTAwMDAtMDAwMC0wMDAwMDAwMDAwMDAiLCJncm91cHMiOlsiYWRtaW4iXSwic2lkIjoiODI1OWFhZTEtNjkzMi00NzE2LTlhMjItNzAzZWFlNzc2MWUzIiwiem9uZV9pZCI6IjAwMDAwMDAwLTAwMDAtMDAwMC0wMDAwLTAwMDAwMDAwMDAwMCJ9LCJqd3RpZCI6IjFlYzE1MDZlLTYxZjEtNGM5NS1iMTA3LWNlM2U0NWNmZTVmNyIsImlhdCI6MTU5NDcyNzE4MiwiZXhwIjoxNTk0NzI3NDgyfQ.DvFtLaHZH2uO7RSxf9O6V3xEP8qaPsZpbjfFNo0NdTI' --compressed
Example Response
{
"skip": 0,
"limit": 10,
"total": 1,
"resources": [
{
"id": "a10b45e0-dc71-48d3-a50c-d40954abed80",
"uri": "kylo:kylo:scheduler:jobs:f121094b-3a25-476a-bddf-903d55111963",
"account": "kylo:kylo:admin:accounts:kylo",
"application": "ncryptify:gemalto:admin:apps:kylo",
"devAccount": "ncryptify:gemalto:admin:accounts:gemalto",
"createdAt": "2020-07-14T12:02:41.704669Z",
"name": "Sync CCKM Aws keys ",
"updatedAt": "2020-07-14T12:02:57.274065Z",
"job_config_id": "ffbf9054-d1f2-450d-825d-ab85bb2af96e",
"description": "This is to sync CCKM AWS keys",
"operation": "cckm_synchronization",
"job_config_params": {
"kms": [
"a2"
],
"cloud_name": "aws",
},
"enqueued_at": "2020-07-14T12:02:41.704516Z",
"status": "completed",
"processing_node": "local-node",
"details": {
"job_id": "a10b45e0-dc71-48d3-a50c-d40954abed80",
"job_config_id": "122d35bf-fa22-4227-9174-04ea8cbc671f",
"name": "Sync CCKM Aws keys ",
"operation": "cckm_synchronization",
"status": "completed",
"details": {
"ap-northeast-2": "region synchronized successfully",
"ca-central-1": "region synchronized successfully"
}
}
}
]
}
The sample output shows the list of jobs for a logged in account.
To know more about response parameters, refer to Response Parameters.
Response Codes
Response Code | Description |
---|---|
2xx | Success |
4xx | Client errors |
5xx | Server errors |
Refer to HTTP status codes for details.
Viewing Details of Job Runs
Use the get /v1/scheduler/jobs/{id}
API to view the details of a specific job run.
Syntax
curl -k '<IP>/api/v1/scheduler/jobs/{id}' -H 'Authorization: Bearer AUTHTOKEN' --compressed
Here, {id}
represents the ID of the scheduler job.
Request Parameter
Parameter | Type | Description |
---|---|---|
AUTHTOKEN | string | Authorization token. |
Example Request
curl -k 'https://127.0.0.1/api/v1/scheduler/jobs/a10b45e0-dc71-48d3-a50c-d40954abed80' -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJiYzc5M2E4ZC00YWVhLTRlM2EtYWRiYy05YmRlMDhjYjE5MDYiLCJzdWIiOiJsb2NhbHw2MjgyZDZkNC0wZGI5LTRmZmEtYjc4Ny0xNzY0NTFiMmViNGQiLCJpc3MiOiJreWxvIiwiYWNjIjoia3lsbyIsInByZWZlcnJlZF91c2VybmFtZSI6ImFkbWluIiwiY3VzdCI6eyJkb21haW5faWQiOiIwMDAwMDAwMC0wMDAwLTAwMDAtMDAwMC0wMDAwMDAwMDAwMDAiLCJncm91cHMiOlsiYWRtaW4iXSwic2lkIjoiODI1OWFhZTEtNjkzMi00NzE2LTlhMjItNzAzZWFlNzc2MWUzIiwiem9uZV9pZCI6IjAwMDAwMDAwLTAwMDAtMDAwMC0wMDAwLTAwMDAwMDAwMDAwMCJ9LCJqd3RpZCI6IjJhOTk4YWM4LTIwMDQtNDBlMi04ZmQ1LWQ2ZmU1MzZmNDZiNCIsImlhdCI6MTU5NDcyODc0NywiZXhwIjoxNTk0NzI5MDQ3fQ.iYyPxNEjzlLuIkro3vWx0ul3iZavmVJOp8S5WXxKdtc' --compressed
Example Response
{
"id": "a10b45e0-dc71-48d3-a50c-d40954abed80",
"uri": "kylo:kylo:scheduler:jobs:f121094b-3a25-476a-bddf-903d55111963",
"account": "kylo:kylo:admin:accounts:kylo",
"application": "ncryptify:gemalto:admin:apps:kylo",
"devAccount": "ncryptify:gemalto:admin:accounts:gemalto",
"createdAt": "2020-07-14T12:02:41.704669Z",
"name": "Sync CCKM Aws keys ",
"updatedAt": "2020-07-14T12:02:57.274065Z",
"job_config_id": "ffbf9054-d1f2-450d-825d-ab85bb2af96e",
"description": "This is to sync CCKM AWS keys",
"operation": "cckm_synchronization",
"job_config_params": {
"kms": [
"a2"
],
"cloud_name": "aws",
},
"enqueued_at": "2020-07-14T12:02:41.704516Z",
"status": "completed",
"processing_node": "local-node",
"details": {
"job_id": "a10b45e0-dc71-48d3-a50c-d40954abed80",
"job_config_id": "122d35bf-fa22-4227-9174-04ea8cbc671f",
"name": "Sync CCKM Aws keys ",
"operation": "cckm_synchronization",
"status": "completed",
"details": {
"ap-northeast-2": "region synchronized successfully",
"ca-central-1": "region synchronized successfully"
}
}
}
The sample output shows the details corresponding to a specific job ID (a10b45e0-dc71-48d3-a50c-d40954abed80
).
To know more about response parameters, refer to Response Parameters.
Response Codes
Response Code | Description |
---|---|
2xx | Success |
4xx | Client errors |
5xx | Server errors |
Refer to HTTP status codes for details.
Deleting Job Runs
Use the delete /v1/scheduler/jobs/{id}
API to delete a job run.
Syntax
curl -k '<IP>/api/v1/scheduler/jobs/{id}' -X DELETE -H 'Authorization: Bearer AUTHTOKEN' --compressed
Here, {id}
represents the ID of the scheduler job.
Request Parameter
Parameter | Type | Description |
---|---|---|
AUTHTOKEN | string | Authorization token. |
Example Request
curl -k 'https://127.0.0.1/api/v1/scheduler/jobs/a10b45e0-dc71-48d3-a50c-d40954abed80' -X DELETE -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJiYzc5M2E4ZC00YWVhLTRlM2EtYWRiYy05YmRlMDhjYjE5MDYiLCJzdWIiOiJsb2NhbHw2MjgyZDZkNC0wZGI5LTRmZmEtYjc4Ny0xNzY0NTFiMmViNGQiLCJpc3MiOiJreWxvIiwiYWNjIjoia3lsbyIsInByZWZlcnJlZF91c2VybmFtZSI6ImFkbWluIiwiY3VzdCI6eyJkb21haW5faWQiOiIwMDAwMDAwMC0wMDAwLTAwMDAtMDAwMC0wMDAwMDAwMDAwMDAiLCJncm91cHMiOlsiYWRtaW4iXSwic2lkIjoiODI1OWFhZTEtNjkzMi00NzE2LTlhMjItNzAzZWFlNzc2MWUzIiwiem9uZV9pZCI6IjAwMDAwMDAwLTAwMDAtMDAwMC0wMDAwLTAwMDAwMDAwMDAwMCJ9LCJqd3RpZCI6IjJhOTk4YWM4LTIwMDQtNDBlMi04ZmQ1LWQ2ZmU1MzZmNDZiNCIsImlhdCI6MTU5NDcyODc0NywiZXhwIjoxNTk0NzI5MDQ3fQ.iYyPxNEjzlLuIkro3vWx0ul3iZavmVJOp8S5WXxKdtc' --compressed
Example Response
{
"status": 204
}
The sample output shows that the job is deleted successfully and "status": 204
is returned in response.
Response Codes
Response Code | Description |
---|---|
2xx | Success |
4xx | Client errors |
5xx | Server errors |
Refer to HTTP status codes for details.