Deleting Server Code

Check the following execution sample to see how to delete server code.

node bin/kii-servercode.js delete \
  --code-version gulsdf6ful8jvf8uq6fe7vjy6 \
  --site jp \
  --app-id <your_app_id> \
  --app-key <your_app_key> \
  --client-id <your_client_id> \
  --client-secret <your_client_secret>

Here are the options you need to set:

  • --code-version: The version of the server code you want to delete.
  • --site: The server location (jp).
  • --app-id: The AppID.
  • --app-key: An arbitrary value.
  • --client-id: The ClientID.
  • --client-secret: The ClientSecret.
  • --token: (optional) The app admin token. Can be used instead of client-id and client-secret.
  • --http-proxy: (optional) Specify http proxy, in case client is running behind a firewall or cannot access directly to Kii Cloud API. Eg: https://my.proxy:8080

Make sure to set the values you've got on the developer portal for --site, --app-id, --app-key, --client-id and -- client-secret (See Parameters for executing the commands for more information). You can optionally specify the app admin token with --token instead of specifying the ClientID and ClientSecret (See Admin Features to learn how to get the app admin token).

When you delete a version of server code that has server hook configuration, the configuration will be also deleted.

When the server code is successfully deleted, Kii Cloud will respond as follows:

27 Feb 15:38:10 - Removing code version 79gainyglqq2xdvtjs52rdan1...
27 Feb 15:38:10 - Version 79gainyglqq2xdvtjs52rdan1 removed
27 Feb 15:38:10 - Trying to remove hook config version 79gainyglqq2xdvtjs52rdan1...
27 Feb 15:38:10 - No hook config for version 79gainyglqq2xdvtjs52rdan1 found.

When the server hook configuration is deleted along with the server code, Kii Cloud will respond as follows:

27 Feb 15:36:53 - Removing code version 34lzbzsds67i7cd6hkzlmqu4a...
27 Feb 15:36:54 - Version 34lzbzsds67i7cd6hkzlmqu4a removed
27 Feb 15:36:54 - Trying to remove hook config version 34lzbzsds67i7cd6hkzlmqu4a...
27 Feb 15:36:54 - Hook config for version 34lzbzsds67i7cd6hkzlmqu4a removed