Your suggested change has been received. Thank you.

close

Suggest A Change

https://thales.na.market.dpondemand.io/docs/dpod/services/kmo….

back

Scheduler APIs

Scheduling Synchronization

search

Please Note:

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

ParameterTypeDescription
AUTHTOKENstringAuthorization token.
namestringName of the job configuration.
operationstringType of operation that can be scheduled. For synchronization, specify cckm_synchronization. Also, specify cckm_synchronization_params.
run_atstringTime when a job will run. Specify this parameter using the cron expression format: "* * * * *".
cckm_synchronization_paramsJSONParameters required for configuring a synchronization job. Refer to Synchronization Parameters for details.
descriptionstringDescription for the job configuration.
disabledbooleanFlag to disable job configuration. Set to true to disable the job.
end_datestringEnd date for a job configuration. The job becomes inactive at this time. Specify the value in the RFC3339 format.
run_onstringNode 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_datestringTime to start a job configuration. The job becomes active at this time. Specify the value in the RFC3339 format.

Synchronization Parameters

ParameterTypeDescription
cloud_namestringName 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.
oci: Oracle Cloud Infrastructure (OCI). Also, specify oci_vaults.
sfdc: Salesforce cloud. Also, specify organizations.
sap: SAP Data Custodian. Also, specify groups.
kmsarray of stringsName or ID of the AWS KMS.
oci_vaultsarray of stringsName or ID of the OCI vaults. Provide the resource ID of the OCI vault on the CipherTrust Manager. At least one vault ID is required for the synchronization operation.
partitionsarray of stringsName or ID of the Luna HSM partitions.
domainsarray of stringsName or ID of the DSM domains.
groupsarray of stringsName or ID of the SAP Data Custodian groups. Provide the resource ID of the SAP Data Custodian group on the CipherTrust Manager. At least one group ID is required for the synchronization operation.
key_vaultsarray of stringsName or ID of the Azure key vaults.
key_ringsarray of stringsName 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.
organizationsarray of stringsOrganization ID on Salesforce cloud or resource ID of Salesforce organization on the CipherTrust Manager. At least one ID is required for the synchronization operation.
sync_itemarray of stringsItems that need to be synchronized. For Azure synchronization, specify at least one of the following values:
• key
• secret
• certificate
• all
synchronize_allbooleanWhether to synchronize all keys from all vaults, kms, organizations, or key rings etc. from the specified cloud_name. Set to true or false.

kms, partitions, domains, key_vaults, key_rings, oci_vaults, organizations, and groups 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 CodeDescription
2xxSuccess
4xxClient errors
5xxServer 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

ParameterTypeDescription
AUTHTOKENstringAuthorization token.

Request Query Parameters

ParameterTypeDescription
skipintegerNumber of records to skip. For example, if "skip":5 is specified, the first five records will not be displayed in the output.
limitintegerNumbers 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.
sortstringComma-delimited list of properties to sort the results.
namestringName of the job configuration.
idstringID of the job.
operationstringName of the operation.
disabledstringDisabled job configuration.
cloud_namestringName of the cloud. The cloud names can be:
aws
hsm-luna
dsm
AzureCloud
gcp
oci
sfdc
sap
createdBeforestringJob configurations created on or before the specified time.
createdAfterstringJob 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 CodeDescription
2xxSuccess
4xxClient errors
5xxServer 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

ParameterTypeDescription
AUTHTOKENstringAuthorization 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 CodeDescription
2xxSuccess
4xxClient errors
5xxServer 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, oci_vaults, organizations, or groups.

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

ParameterTypeDescription
AUTHTOKENstringAuthorization token.
cckm_synchronization_paramsJSONCCKM synchronization specific parameters. Refer to Synchronization Parameters for details.

Synchronization Parameters

ParameterTypeDescription
kmsarray of stringsName or ID of the AWS KMS.
partitionsarray of stringsName or ID of the Luna HSM partitions.
domainsarray of stringsName or ID of the DSM domains.
groupsarray of stringsName or ID of the SAP Data Custodian groups from which keys will be synchronized. At least one group is required for the synchronization operation.
key_vaultsarray of stringsName or ID of the Azure key vaults.
key_ringsarray of stringsName 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.
oci_vaultsarray of stringsName or ID of the OCI vaults from which keys will be synchronized. At least one vault ID is required for the synchronization operation.
organizationsarray of stringsOrganization 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_allbooleanWhether to synchronize all keys from all vaults, kms, organizations, or key rings etc. from the specified cloud_name. Set to true or false.

kms, partitions, domains, key_vaults, key_rings, oci_vaults, organizations, and groups 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 CodeDescription
2xxSuccess
4xxClient errors
5xxServer 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

ParameterTypeDescription
AUTHTOKENstringAuthorization 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 CodeDescription
2xxSuccess
4xxClient errors
5xxServer 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

ParameterTypeDescription
AUTHTOKENstringAuthorization 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 CodeDescription
2xxSuccess
4xxClient errors
5xxServer 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

ParameterTypeDescription
AUTHTOKENstringAuthorization token.

Request Query Parameters

ParameterTypeDescription
skipintegerNumber of records to skip. For example, if "skip":5 is specified, the first five records will not be displayed in the output.
limitintegerNumbers 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.
sortstringComma-delimited list of properties to sort the results.
idstringID of the scheduler job.
namestringName of the job configuration.
accountstringName of the logged in account.
job_config_idstringID of the job configuration.
operationstringName of the operation.
statusstringStatus of the job run.
createdBeforestringJobs created on or before the specified time.
createdAfterstringJobs created on or after the specified time.
processing_nodestringNode 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 CodeDescription
2xxSuccess
4xxClient errors
5xxServer 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

ParameterTypeDescription
AUTHTOKENstringAuthorization 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 CodeDescription
2xxSuccess
4xxClient errors
5xxServer 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

ParameterTypeDescription
AUTHTOKENstringAuthorization 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 CodeDescription
2xxSuccess
4xxClient errors
5xxServer errors

Refer to HTTP status codes for details.