• Docs >
  • 4. Customer API for the accelerator
Shortcuts

4. Customer API for the accelerator

4.1. Group Customer

This section groups opt_pipeline Customer resources.

4.1.1. Customers Collection [/presentation-api/v1/customer/]

A Collection of Customers.

4.1.1.1. Retrieve all Customers [GET]

Retrieves all customers.

  • Response 200 (application/json)

      [{"name": "Customer test"}]
    

4.1.2. Customer [/presentation-api/v1/customer/{customer_id}/]

  • Parameters

    • customer_id: 1 (string)

4.1.2.1. Retrieve Customer [GET]

Returns a specific Customer.

  • Response 200 (application/json)

      {
          "name": "Customer test"
      }
    

4.1.2.2. Update Customer [PUT]

Update the Customer.

  • Request (application/json)

      {
          "name": "Customer test updated"
      }
    
  • Response 200 (application/json)

      {
          "name": "Customer test updated"
      }
    

4.1.2.3. Delete Customer [DELETE]

Delete a Customer. The current user must be the same user who created the Customer. It returns the deleted Customer on success.

  • Response 204

4.2. Group DeploymentSite

This section groups opt_pipeline DeploymentSite resources.

4.2.1. DeploymentSites Collection [/presentation-api/v1/deployment-site/]

A Collection of DeploymentSite.

4.2.1.1. Create a DeploymentSite [POST]

Create a new DeploymentSite object. You can add tags to your deployments which is useful to add a domain and link it to all the deployments that belong to a specific tag, or a group of tags. Tags are comma-separated strings.

  • Request (application/json)

      {
          "tags": "shimmercat, tests"
      }
    
  • Response 201 (application/json)

      {
          "customer": {
              "name": "Customer test"
          },
          "name16": "dca01af9710b5b2c",
          "secret16": "e4849447a544d0b0",
          "deployment_tags": "shimmercat, tests"
      }
    

4.2.1.2. Retrieve all DeploymentSites [GET]

Retrieves all deployment sites.

  • Response 200 (application/json)

      [{
          "customer": {
              "name": "Customer test"
          },
          "name16": "dca01af9710b5b2c",
          "secret16": "e4849447a544d0b0"
      }]
    

4.2.2. DeploymentSite [/presentation-api/v1/deployment-site/{deployment_site_id}/]

  • Parameters

    • deployment_site_id: 1 (string) - The id of the DeploymentSite.

4.2.2.1. Retrieve a DeploymentSite [GET]

Returns a specific DeploymentSite.

  • Response 200 (application/json)

      {
          "customer": {
              "name": "Customer test"
          },
          "name16": "dca01af9710b5b2c",
          "secret16": "e4849447a544d0b0"
      }
    

4.2.2.2. Add tags to a DeploymentSite [PUT]

You can add tags to your deployment which is useful to add a domain and link it to all the deployments that belong to a specific tag, or a group of tags. Tags are comma-separated strings.

  • Request (application/json)

      {
          "tags": "shimmercat, tests"
      }
    
  • Response 200 (application/json)

      {
          "customer": {
              "name": "Customer test"
          },
          "name16": "dca01af9710b5b2c",
          "secret16": "e4849447a544d0b0",
          "deployment_tags": "shimmercat, tests"
      }
    

4.2.2.3. Delete a DeploymentSite [DELETE]

Delete a DeploymentSite. The current user must be the same user who created the DeploymentSite. It returns the deleted DeploymentSite on success.

  • Response 204

4.3. Group Domain

This section groups opt_pipeline Domain resources.

4.3.1. Domains Collection [/presentation-api/v1/domain/]

A Collection of Domain.

4.3.1.1. Create a Domain and link with deployments of tags [POST]

Create a new Domain object. If you want to link the domain with deployments you have two options:

  • add the link_to_deployment_sites_with_tags to the request data and the domain will be linked to all the deployments you have with the specified tags.

  • add the deployment_site_id to the request data and the domain will be linked to the deployment with the specified id.

You can not specified both link_to_deployment_sites_with_tags and deployment_site_id on the same request, otherwise a “Bad request” response will be sent.

  • Request (application/json)

      {
          "name": "www.testapi.com",
          "link_to_deployment_sites_with_tags": "shimmercat, tests"
      }
    
  • Response 201 (application/json)

      {
          "name": "www.testapi.com",
          "sub_domains": []
      }
    

4.3.1.2. Create a Domain and link with deployment id [POST]

Create a new Domain object. If you want to link the domain with deployments you have two options:

  • add the link_to_deployment_sites_with_tags to the request data and the domain will be linked to all the deployments you have with the specified tags.

  • add the deployment_site_id to the request data and the domain will be linked to the deployment with the specified id.

You can not specified both link_to_deployment_sites_with_tags and deployment_site_id on the same request, otherwise a “Bad request” response will be sent.

  • Request (application/json)

      {
          "name": "www.testapi.deploymentid.com",
          "deployment_id": 3
      }
    
  • Response 201 (application/json)

      {
          "name": "www.testapi.deploymentid.com",
          "sub_domains": []
      }
    

4.3.1.3. Retrieve all Domains [GET]

Retrieves all domains.

  • Response 200 (application/json)

      [{
          "name": "www.testapi.com",
          "sub_domains": []
      }]
    

4.3.2. Domain [/presentation-api/v1/domain/{name}/]

  • Parameters

    • name: www.shimmercat.tests.com (string) - The Domain name.

4.3.2.1. Retrieve a Domain [GET]

Returns a specific Domain.

  • Response 200 (application/json)

      {
          "name": "www.shimmercat.tests.com",
          "sub_domains": []
      }
    

4.3.2.2. Update a Domain [PUT]

Updates a specific Domain.

  • Request (application/json)

      {
          "sub_domain": {
              "name": "media.shimmercat.tests.com1",
              "share_views_and_views_dir_with_main_domain": false
          }
      }
    
  • Response 200 (application/json)

      {
          "name": "www.shimmercat.tests.com",
          "sub_domains": [
              {
                  "name": "media.shimmercat.tests.com1",
                  "share_views_and_views_dir_with_main_domain": false
              }
          ]
      }
    

4.3.2.4. Delete a Domain [DELETE]

Delete a Domain. The current user must be the same user who created the Domain. It returns the deleted Domain on success.

  • Response 204

4.4. Group IncomingLogs

This section groups opt_pipeline incoming logs of customer’s domains resources.

4.4.1. IncomingLogs Collection [/presentation-api/v1/incominglogs/]

A Collection of incoming logs.

4.4.1.1. Retrieve Incoming Logs [GET]

Retrieves a set of incoming logs of customer’s domains.

  • Response 200 (application/json)

    • Attributes

      • logs_data

        • username (string, required)

        • deployments (array[DeploymentLogs], required)

  • Response 403

4.4.2. Data Structures

4.4.2.1. DeploymentLogs

  • deployment_id (number, required)

  • deployment_desc (string, required)

  • domains (array[DomainLogs], required)

4.4.2.2. DomainLogs

  • domain_name (string, required)

  • domain_logs (array[Log])

4.4.2.3. Log

  • connection (number, required)

  • response_status (number, required)

  • request_method (string, required)

  • uri_path (string, required)

  • backend_time (number, required)

  • when (number, required)

  • authority (string, required)

  • deployment_id (number, required)

4.5. Group SymmetricEncryptionKey

This section groups opt_pipeline SymmetricEncryptionKey resources.

4.5.1. SymmetricEncryptionKey Collection [/presentation-api/v1/symenckeys/]

A Collection of SymmetricEncryptionKey.

4.5.1.1. Create a SymmetricEncryptionKey [POST]

Create a new SymmetricEncryptionKey object.

  • Request (application/json)

      {
          "deployment_site_id": 1
      }
    
  • Response 201 (application/json)

      {
          "name": "+Kf4e6oauSM=",
          "deployment_site_id": 1
      }
    

4.5.1.2. Retrieve all SymmetricEncryptionKey [GET]

Retrieves all SymmetricEncryptionKey.

  • Response 200 (application/json)

      [{
          "name": "uoFl6NJ6Evw=",
          "deployment_site_id": 1
      }]
    

4.5.2. SymmetricEncryptionKey [/presentation-api/v1/symenckeys/{symenckey_id}/]

  • Parameters

    • symenckey_id: 1 (string) - The id of the SymmetricEncryptionKey.

4.5.2.1. Retrieve a SymmetricEncryptionKey [GET]

Returns a specific SymmetricEncryptionKey.

  • Response 200 (application/json)

      {
          "name": "n+PDrLlgGDM=",
          "deployment_site_id": 1
      }
    

4.5.2.2. Update a SymmetricEncryptionKey [PUT]

Updates a specific SymmetricEncryptionKey.

  • Request (application/json)

      {
          "deployment_site_id": 2
      }
    
  • Response 200 (application/json)

      {
          "name": "PK5N1UYPSqs=",
          "deployment_site_id": 2
      }
    

4.6. Group DevloveFile

This section groups opt_pipeline DevloveFile resources.

4.6.1. DevloveFile Collection [/presentation-api/v1/{domain_name}/devlove/{viewset_name}/]

  • Parameters

    • domain_name: www.shimmercat.tests.com (string) - Name of main domain reference.

    • viewset_name: version1 (string) - Name of customer’s viewset version.

4.6.1.1. Create a DevloveFile [POST]

Create new DevloveFile object.

  • Request (application/json)

      {
        "schema": "0",
        "content": "{\"shimmercat-devlove\":{\"domains\":{\"elec www.shimmercat.tests.com\":{\"root-dir\":\"/var/www\"}}}}"
      }
    
  • Response 201 (application/json)

      {
        "schema": "0",
        "content": "{\"shimmercat-devlove\":{\"domains\":{\"elec www.shimmercat.tests.com\":{\"root-dir\":\"/var/www\"}}}}"
      }
    

4.6.1.2. Retrieve all DevloveFile [GET]

Retrieves all DevloveFile.

  • Response 200 (application/json)

    • Attributes (array[DevloveFile])

4.6.2. DevloveFile [/presentation-api/v1/{domain_name}/devlove/{viewset_name}/{devlove_id}/]

  • Parameters

    • domain_name: www.shimmercat.tests.com (string) - Name of main domain reference.

    • viewset_name: version1 (string) - Name of customer’s viewset version.

    • devlove_id: 1 (string) - The id of DevloveFile.

4.6.2.1. Retrieve a DevloveFile [GET]

Returns a specific DevloveFile.

  • Response 200 (application/json)

    • Attributes (DevloveFile)

4.6.2.2. Update a DevloveFile [PUT]

Updates a specific DevloveFile.

  • Request (application/json)

    • Attributes (object)

      • schema: 0 (string)

      • content: {"shimmercat-devlove":{"domains":{"elec www.shimmercat.com":{"root-dir":"/var/www"}}}} (string)

  • Response 200 (application/json)

    { “schema”: “0”, “content”: “{“shimmercat-devlove”:{“domains”:{“elec www.shimmercat.com”:{“root-dir”:”/var/www”}}}}” }

4.6.3. Data Structures

4.6.3.1. DevloveFile (object)

  • schema: 0 (string)

  • content: {"shimmercat-devlove":{"domains":{"elec www.shimmercat.tests.com":{"root-dir":"/var/www"}}}} (string)

4.7. Group DevloveFileValidate

This section groups opt_pipeline devlove file validate action.

4.7.1. DevloveFileValidate [/presentation-api/v1/devlove/validate/]

Validate the content of a devlove file configuration.

4.7.1.1. Execute a DevloveFileValidate [POST]

Validate the content using schema.

  • Request (application/json)

    • Attributes (object)

      • schema: 0 (string)

      • content: {"shimmercat-devlove":{"domains":{"elec www.shimmercat.tests.com":{"root-dir":"/var/www"}}}} (string)

  • Response 200 (application/json)

      {
          "status": "ok",
          "payload": {
              "devlove-valid": "True"
          }
      }
    

4.8. Group ServiceStatus

This section groups the accelerator services status.

4.8.1. ServiceStatus [/presentation-api/v1/{domain_name}/status/]

A list of services status per deployment site.

  • Parameters

    • domain_name: www.shimmercat.tests.com (string) - Name of main domain reference.

4.8.1.1. Retrieve ServiceStatus [GET]

Retrieves a set of services status per deployment site.

  • Request (application/json)

    • Attributes (object)

      • domain_name: www.shimmercat.tests.com (string)

  • Response 200 (application/json)

      {
          "www.shimmercat.tests.com": [{"is_log_agent_reporting_data": false}]
      }
    

4.9. Group ImportDevloveAndViews

This section groups opt_pipeline import devlove file and views endpoint.

4.9.1. ImportDevloveAndViews [/presentation-api/v1/import-viewset/{domain}/{deployment_id}/{viewset}/]

Start import devlove file and views from customer’s deployment site

  • Parameters

    • domain: www.shimmercat.tests.com (string) - Domain name.

    • deployment_id: 1 (string) - Id of customer’s deployment site.

    • viewset: mynewviewset_test (string) - Arbitrary name for the viewset.

4.9.1.1. Exec ImportDevloveAndViews [POST]

Execute task and retrieve the id

  • Request (application/json)

      {}
    
  • Response 200 (application/json)

      {
          "status": "ok"
      }
    

4.10. Group CustomerViewsetVersion

This section groups opt_pipeline customer’s viewset versions.

4.10.1. CustomerViewsetVersion Collection [/presentation-api/v1/active-viewset/{domain}/]

A Collection of CustomerViewsetVersion.

  • Parameters

    • domain: www.shimmercat.tests.com (string) - Domain name.

4.10.1.1. Retrieve all CustomerViewsetVersion [GET]

Get all customer’s viewset versions

  • Response 200 (application/json)

      [{
          "id": 1,
          "name": "version1",
          "comment": "",
          "when_created": "",
          "when_obsoleted": ""
      }]
    

4.10.2. CustomerViewsetVersion [/presentation-api/v1/active-viewset/{domain}/{viewset_id}/]

  • Parameters

    • domain: www.shimmercat.tests.com (string) - Domain name.

    • viewset_id: 1 (string) - Primary key of a viewset version.

4.10.2.1. Retrieve CustomerViewsetVersion [GET]

Returns a specific CustomerViewsetVersion.

  • Response 200 (application/json)

      {
          "id": 1,
          "name": "version1",
          "comment": "",
          "when_created": "",
          "when_obsoleted": ""
      }
    

4.10.2.2. Active CustomerViewsetVersion [PUT]

Sets a specific CustomerViewsetVersion as active viewset.

  • Request (application/json)

      {}
    
  • Response 200 (application/json)

      {
          "id": 1,
          "name": "version1",
          "comment": "",
          "when_created": "",
          "when_obsoleted": ""
      }
    

4.11. Group ScPackVersion

This section groups opt_pipeline Shimmercat pack versions.

4.11.1. ScPackVersion Download [/presentation-api/v1/upload/sc_pack_v2/

4.11.1.1. Retrieve ScPackVersion [GET]

Returns the latest ScPackVersion

  • Request (application/json)

      {}
    
  • Response 200 (application/json)


{
  "bootstrapper_download_url": "https://storage.googleapis.com/downloads-shimmercat-com-561059/sc_pack/rkt/sc_pack-linux-amd64-2020.1.bootstrap",
  "versions": { "bootstrapper": "2020.1", "sc_logs_agent": "develop-rev-324", "shimmercat": "qs-rev-3623", "base_python": "2020.6", "usher3": "master-rev-116", "sc_pack": "v1533" },
  "images": {
      "celery": "aci.shimmercat.io/r/sc_pack:v1533",
      "sc_logs_agent": "aci.shimmercat.io/r/sc_logs_agent:develop-rev-324",
      "sc_pack": "aci.shimmercat.io/r/sc_pack:v1533",
      "shimmercat": "aci.shimmercat.io/r/shimmercat:qs-rev-3623",
      "usher3": "aci.shimmercat.io/r/usher3:master-rev-116"
  }
}

4.11.2. ScPackVersion Upload [/presentation-api/v1/upload/sc_pack/{version}/]

  • Parameters

    • version: 0.1.9 (string) - A Shimmercat Pack version code.

4.11.2.1. Create ScPackVersion [POST]

Create new entry of ScPackVersion

From Linux shell we could use the curl tool as the example below:

  $ USER="username"
  $ PASSWD="password"
  $ VERSION="0.1.9"
  $ FILENAME="sc_pack-${VERSION}-py3-none-any.whl"
  $ URL="https://accelerator.shimmercat.com/presentation-api/v1/upload/sc_pack/$VERSION/"
  $ curl --user "$USER:$PASSWD" \
         -X POST \
         -H "Content-Type: multipart/form-data" \
         -F "file=@$FILENAME" \
         $URL

4.12. Group Certificate

This section groups opt_pipeline Certificate resources.

4.12.1. Certificate [/presentation-api/v1/upload/certificates/{deployment_name}/]

  • Parameters

    • deployment_name: c808e46ae28f9542 (string) - DeploymentSite’s name16

4.12.1.1. Upload Certificate [POST]

Upload the certificate.

  • Request (application/json)

      {}
    
  • Response 200

4.13. Group UserProfileView

This section groups opt_pipeline user’s data API view.

4.13.1. UserProfileView [/presentation-api/v1/user-profile/{pk}/]

  • Parameters

    • pk: 1 (string) - Primary key of a User.

4.13.1.1. Retrieve UserProfileView [GET]

Returns a specific User data.

  • Response 200 (application/json)

      {
          "id": 1,
          "username": "test_user",
          "first_name": "",
          "last_name": "",
          "date_joined": "",
          "email": "vladir@zunzun.se"
      }
    

4.13.1.2. Update UserProfileView [PUT]

Update User’s first name, last name, email and password.

  • Request (application/json)

      {
          "id": 1,
          "username": "test_user",
          "first_name": "Vladir",
          "last_name": "Parrado",
          "email": "vladir_update@zunzun.se",
          "password": "Newpasswd2018"
      }
    
  • Response 200 (application/json)

      {
          "id": 1,
          "username": "test_user",
          "first_name": "Vladir",
          "last_name": "Parrado",
          "date_joined": "",
          "email": "vladir_update@zunzun.se"
      }
    

4.14. Group AuthenticationToken

This section groups how to get an authentication token to use the accelerator.

4.14.1. AuthenticationToken [/presentation-api/v1/trial/]

4.14.1.1. Create AuthenticationToken [POST]

Creates the AuthenticationToken and returns it. The email field on the request data is optional, although we encourage you to set an email address because with it you can recover your authentication token, access to our Grafana Monitoring system, and subscribe for the bot, and traffic report that we send to our customers.

  • Request (application/json)

      {
          "username": "test_trial",
          "email": "tests@shimmercat.com"
      }
    
  • Response 201 (application/json)

      {}
    

4.14.2. StartAuthenticationTokenRecovery [POST /presentation-api/v1/tokens/start-recovery/]

Initiates token recovery procedure. After this request you should get an email with token recovery link.

  • Request (application/json)

      {
          "username": "test_trial",
          "email": "tests@shimmercat.com"
      }
    
  • Response 200 (application/json)

      {"status": "email sent"}
    

4.15. Group Bot

This section groups opt_pipeline Bots handling.

4.15.1. IsIPAddressBadBot [/presentation-api/v1/is-bad-bot/{ip}/]

  • Parameters

    • ip: 127.0.0.1 (string) - Ip address to verify.

4.15.1.1. IsIPAddressBadBot [GET]

Checks if the ip address was already registered in our database as a bad bot. An example of a request using curl:

curl -X GET https://accelerator.shimmercat.com/presentation-api/v1/is-bad-bot/127.0.0.1/ -H 'Authorization: Token <your_authentication_token>' -H 'Content-type: application/json'
  • Response 200 (application/json)

      {
        "is_bad_bot": true,
        "ip_address_or_range": "127.0.0.1"
      }
    

4.15.2. IsIPAddressRangeBadBot [/presentation-api/v1/is-bad-bot/{iprange}/]

  • Parameters

    • iprange: 69.208.0.0_24 (string) - Ip address range to verify.

4.15.2.1. IsIPAddressRangeBadBot [GET]

Checks if the ip address range was already registered in our database as a bad bot. An example of a request using curl:

curl -X GET https://accelerator.shimmercat.com/presentation-api/v1/is-bad-bot/69.208.0.0_24/ -H 'Authorization: Token <your_authentication_token>' -H 'Content-type: application/json'
  • Response 200 (application/json)

      {
        "is_bad_bot": true,
        "ip_address_or_range": "69.208.0.0/24"
      }
    

4.15.3. ListCustomerBadBotsView [/presentation-api/v1/list-bad-bots/]

4.15.3.1. ListCustomerBadBotsView [GET]

Get the list of bad bots reported by the customer. An example of a request using curl:

curl -X GET https://accelerator.shimmercat.com/presentation-api/v1/list-bad-bots/ -H 'Authorization: Token <your_authentication_token>' -H 'Content-type: application/json'
  • Response 200 (application/json)

      [
          {
              "name": "test",
              "ip_addresses": [
                  "127.0.0.1"
              ]
          }
      ]
    

4.15.4. MarkIpAsBadBotView [/presentation-api/v1/mark-as-bad-bot/{ip}/]

  • Parameters

    • ip: 127.1.1.1 (string) - Ip address to mark as bad bot.

4.15.4.1. MarkIpAsBadBotView [POST]

Mark the ip address as bad bot. You need to specify a domain which you want to add this bot to, and the bot name you will attach that ip address to. If a bot with that name does not exist for one of your domains we will add a new one with the specified name. An example using curl about how to request that endpoint to block the ip address 127.1.1.1:

curl -X POST https://accelerator.shimmercat.com/presentation-api/v1/mark-as-bad-bot/127.1.1.1/ -H 'Authorization: Token <your_authentication_token>' -H 'Content-type: application/json' -d '{"attach_to_bot": "test", "attach_to_domain": "www.shimmercat.tests.com"}'
  • Request (application/json)

      {
          "attach_to_bot": "test",
          "attach_to_domain": "www.shimmercat.tests.com"
      }
    
  • Response 200 (application/json)

      {
          "name": "test",
          "ip_addresses": [
              "127.1.1.1",
              "127.0.0.1"
          ]
      }
    

4.15.5. MarkIpRangeAsBadBotView [/presentation-api/v1/mark-as-bad-bot/{iprange}/]

  • Parameters

    • iprange: 69.208.0.0_24 (string) - Ip address range to mark as bad bot.

4.15.5.1. MarkIpRangeAsBadBotView [POST]

Mark the ip address range as bad bot. You need to specify a domain which you want to add this bot to, and the bot name you will attach that ip address range to. If a bot with that name does not exist for one of your domains we will add a new one with the specified name. An example using curl about how to request that endpoint to block all the ip address on the range 69.208.0.0/24:

curl -X POST https://accelerator.shimmercat.com/presentation-api/v1/mark-as-bad-bot/69.208.0.0_24/ -H 'Authorization: Token <your_authentication_token>' -H 'Content-type: application/json' -d '{"attach_to_bot": "test", "attach_to_domain": "www.shimmercat.tests.com"}'

Please notice that we use _ instead of / when sending the ip range on the URL.

  • Request (application/json)

      {
          "attach_to_bot": "test",
          "attach_to_domain": "www.shimmercat.tests.com"
      }
    
  • Response 200 (application/json)

      {
          "name": "test",
          "ip_addresses": [
              "127.1.1.1",
              "127.0.0.1",
              "69.208.0.0/24"
          ]
      }
    

4.15.6. MarkCustomIpRangeAsBadBotView [/presentation-api/v1/mark-as-bad-bot/{iprange}/]

  • Parameters

    • iprange: 69.208.0.0_4 (string) - Custom ip address range to mark as bad bot.

4.15.6.1. MarkCustomIpRangeAsBadBotView [POST]

Mark the custom ip address range as bad bot. It is a special case we implemented where the ip range will be translated a consecutive list of ip addresses e.g 69.208.0.0_4 represents 5 ip addresses: 69.208.0.0, 69.208.0.1, 69.208.0.2, 69.208.0.3, 69.208.0.4, so it is not on a CIDR notation, that’s why we call it “custom ip range”. You need to specify a domain which you want to add this bot to, and the bot name you will attach that ip address range to. If a bot with that name does not exist for one of your domains we will add a new one with the specified name. An example using curl about how to request that endpoint to block all the ip address on the range 69.208.0.0_4:

curl -X POST https://accelerator.shimmercat.com/presentation-api/v1/mark-as-bad-bot/69.208.0.0_4/ -H 'Authorization: Token <your_authentication_token>' -H 'Content-type: application/json' -d '{"attach_to_bot": "test", "attach_to_domain": "www.shimmercat.tests.com", "is_custom_ip_range": "True"}'
  • Request (application/json)

      {
          "attach_to_bot": "test",
          "attach_to_domain": "www.shimmercat.tests.com",
          "is_custom_ip_range": "True"
      }
    
  • Response 200 (application/json)

      {
          "name": "test",
          "ip_addresses": [
              "69.208.0.0",
              "69.208.0.1",
              "69.208.0.2",
              "69.208.0.3",
              "69.208.0.4"
          ]
      }
    

4.15.7. RemoveIpFromBadBotListView [/presentation-api/v1/remove-ip-from-bad-bot-list/{ip}/]

  • Parameters

    • ip: 127.1.1.1 (string) - Ip address to remove from the bad bots list.

4.15.7.1. RemoveIpFromBadBotListView [POST]

Remove the ip address from the bad bots list. You need to specify a domain from which you want to remove this bot from, and the bot name you will remove that ip address from. An example using curl about how to request that endpoint to remove the ip address 127.1.1.1 from the black list:

curl -X POST https://accelerator.shimmercat.com/presentation-api/v1/remove-ip-from-bad-bot-list/127.1.1.1/ -H 'Authorization: Token <your_authentication_token>' -H 'Content-type: application/json' -d '{"remove_from_bot": "test", "remove_from_domain": "www.shimmercat.tests.com"}'
  • Request (application/json)

      {
          "remove_from_bot": "test",
          "remove_from_domain": "www.shimmercat.tests.com"
      }
    
  • Response 200 (application/json)

      {
          "name": "test",
          "ip_addresses": []
      }
    

4.15.8. RemoveIpRangeFromBadBotListView [/presentation-api/v1/remove-ip-from-bad-bot-list/{iprange}/]

  • Parameters

    • iprange: 69.208.0.0_24 (string) - Ip address range to remove from the bad bots list.

4.15.8.1. RemoveIpRangeFromBadBotListView [POST]

Remove the ip address range from the bad bots list. You need to specify a domain from which you want to remove this bot from, and the bot name you will remove that ip address range from. An example using curl about how to request that endpoint to remove the ip address range 69.208.0.0/24:

curl -X POST https://accelerator.shimmercat.com/presentation-api/v1/remove-ip-from-bad-bot-list/69.208.0.0_24/ -H 'Authorization: Token <your_authentication_token>' -H 'Content-type: application/json' -d '{"remove_from_bot": "test", "remove_from_domain": "www.shimmercat.tests.com"}'

Please notice that we use _ instead of / when sending the ip range on the URL.

  • Request (application/json)

      {
          "remove_from_bot": "test",
          "remove_from_domain": "www.shimmercat.tests.com"
      }
    
  • Response 200 (application/json)

      {
          "name": "test",
          "ip_addresses": []
      }
    

4.15.9. RemoveCustomIpRangeFromBadBotListView [/presentation-api/v1/remove-ip-from-bad-bot-list/{iprange}/]

  • Parameters

    • iprange: 69.208.0.0_4 (string) - Custom ip address range to remove from the bad bots list.

4.15.9.1. RemoveCustomIpRangeFromBadBotListView [POST]

Remove the custom ip address range from the bad bots list. It is a special case we implemented where the ip range will be translated a consecutive list of ip addresses e.g 69.208.0.0_4 represents 5 ip addresses: 69.208.0.0, 69.208.0.1, 69.208.0.2, 69.208.0.3, 69.208.0.4, so it is not on a CIDR notation, that’s why we call it “custom ip range”. You need to specify a domain from which you want to remove this bot from, and the bot name you will remove that ip address range from. An example using curl about how to request that endpoint to remove the ip address range 69.208.0.0_4:

curl -X POST https://accelerator.shimmercat.com/presentation-api/v1/remove-ip-from-bad-bot-list/69.208.0.0_4/ -H 'Authorization: Token <your_authentication_token>' -H 'Content-type: application/json' -d '{"remove_from_bot": "test", "remove_from_domain": "www.shimmercat.tests.com", "is_custom_ip_range": "True"}'
  • Request (application/json)

      {
          "remove_from_bot": "test",
          "remove_from_domain": "www.shimmercat.tests.com",
          "is_custom_ip_range": "True"
      }
    
  • Response 200 (application/json)

      {
          "name": "test",
          "ip_addresses": []
      }
    

4.15.10. IsIPAddressVIPBot [/presentation-api/v1/is-vip-bot/{ip}/]

  • Parameters

    • ip: 127.0.1.1 (string) - Ip address to verify.

4.15.10.1. IsIPAddressVIPBot [GET]

Checks if the ip address was already registered in our database as a VIP bot. An example of a request using curl:

curl -X GET https://accelerator.shimmercat.com/presentation-api/v1/is-vip-bot/127.0.1.1/ -H 'Authorization: Token <your_authentication_token>' -H 'Content-type: application/json'
  • Response 200 (application/json)

      {
        "is_vip_bot": true,
        "ip_address_or_range": "127.0.1.1"
      }
    

4.15.11. IsIPAddressRangeVIPBot [/presentation-api/v1/is-vip-bot/{iprange}/]

  • Parameters

    • iprange: 69.209.0.0_24 (string) - Ip address range to verify.

4.15.11.1. IsIPAddressRangeVIPBot [GET]

Checks if the ip address range was already registered in our database as a VIP bot. An example of a request using curl:

curl -X GET https://accelerator.shimmercat.com/presentation-api/v1/is-vip-bot/69.209.0.0_24/ -H 'Authorization: Token <your_authentication_token>' -H 'Content-type: application/json'
  • Response 200 (application/json)

      {
        "is_vip_bot": true,
        "ip_address_or_range": "69.209.0.0/24"
      }
    

4.15.12. ListCustomerVIPBotsView [/presentation-api/v1/list-vip-bots/]

4.15.12.1. ListCustomerVIPBotsView [GET]

Get the list of VIP bots reported by the customer. An example of a request using curl:

curl -X GET https://accelerator.shimmercat.com/presentation-api/v1/list-vip-bots/ -H 'Authorization: Token <your_authentication_token>' -H 'Content-type: application/json'
  • Response 200 (application/json)

      [
          {
              "name": "test vip",
              "ip_addresses": [
                  "127.0.1.1"
              ]
          }
      ]
    

4.15.13. MarkIpAsVIPBotView [/presentation-api/v1/mark-as-vip-bot/{ip}/]

  • Parameters

    • ip: 127.1.2.1 (string) - Ip address to mark as VIP bot.

4.15.13.1. MarkIpAsVIPBotView [POST]

Mark the ip address as VIP bot. You need to specify a domain which you want to add this bot to, and the bot name you will attach that ip address to. If a bot with that name does not exist for one of your domains we will add a new one with the specified name. An example using curl about how to request that endpoint to white-list the ip address 127.1.2.1:

curl -X POST https://accelerator.shimmercat.com/presentation-api/v1/mark-as-vip-bot/127.1.2.1/ -H 'Authorization: Token <your_authentication_token>' -H 'Content-type: application/json' -d '{"attach_to_bot": "test", "attach_to_domain": "www.shimmercat.tests.com"}'
  • Request (application/json)

      {
          "attach_to_bot": "test vip",
          "attach_to_domain": "www.shimmercat.tests.com"
      }
    
  • Response 200 (application/json)

      {
          "name": "test vip",
          "ip_addresses": [
              "127.1.2.1"
          ]
      }
    

4.15.14. MarkIpRangeAsVIPBotView [/presentation-api/v1/mark-as-vip-bot/{iprange}/]

  • Parameters

    • iprange: 69.209.0.0_24 (string) - Ip address range to mark as VIP bot.

4.15.14.1. MarkIpRangeAsVIPBotView [POST]

Mark the ip address range as VIP bot. You need to specify a domain which you want to add this bot to, and the bot name you will attach that ip address range to. If a bot with that name does not exist for one of your domains we will add a new one with the specified name. An example using curl about how to request that endpoint to white-list all the ip address on the range 69.209.0.0/24:

curl -X POST https://accelerator.shimmercat.com/presentation-api/v1/mark-as-vip-bot/69.209.0.0_24/ -H 'Authorization: Token <your_authentication_token>' -H 'Content-type: application/json' -d '{"attach_to_bot": "test", "attach_to_domain": "www.shimmercat.tests.com"}'

Please notice that we use _ instead of / when sending the ip range on the URL. We also have a limit of 24 per request for the mask of the ip range.

  • Request (application/json)

      {
          "attach_to_bot": "test vip",
          "attach_to_domain": "www.shimmercat.tests.com"
      }
    
  • Response 200 (application/json)

      {
          "name": "test vip",
          "ip_addresses": [
              "127.1.2.1",
              "69.209.0.0/24"
          ]
      }
    

4.15.15. MarkCustomIpRangeAsVIPBotView [/presentation-api/v1/mark-as-vip-bot/{iprange}/]

  • Parameters

    • iprange: 69.209.0.0_4 (string) - Custom ip address range to mark as VIP bot.

4.15.15.1. MarkCustomIpRangeAsVIPBotView [POST]

Mark the custom ip address range as VIP bot. It is a special case we implemented where the ip range will be translated a consecutive list of ip addresses e.g 69.208.0.0_4 represents 5 ip addresses: 69.208.0.0, 69.208.0.1, 69.208.0.2, 69.208.0.3, 69.208.0.4, so it is not on a CIDR notation, that’s why we call it “custom ip range”. You need to specify a domain which you want to add this bot to, and the bot name you will attach that ip address range to. If a bot with that name does not exist for one of your domains we will add a new one with the specified name. An example using curl about how to request that endpoint to white-list all the ip address on the range 69.209.0.0_4:

curl -X POST https://accelerator.shimmercat.com/presentation-api/v1/mark-as-vip-bot/69.209.0.0_4/ -H 'Authorization: Token <your_authentication_token>' -H 'Content-type: application/json' -d '{"attach_to_bot": "test", "attach_to_domain": "www.shimmercat.tests.com", "is_custom_ip_range": "True"}'

We also have a limit of 256 per request for the mask of the ip range.

  • Request (application/json)

      {
          "attach_to_bot": "test vip",
          "attach_to_domain": "www.shimmercat.tests.com",
          "is_custom_ip_range": "True"
      }
    
  • Response 200 (application/json)

      {
          "name": "test vip",
          "ip_addresses": [
              "127.1.2.1",
              "69.209.0.0/24"
          ]
      }
    

4.15.16. RemoveIpFromVIPBotListView [/presentation-api/v1/remove-ip-from-vip-bot-list/{ip}/]

  • Parameters

    • ip: 127.1.2.1 (string) - Ip address to remove from the VIP bots list.

4.15.16.1. RemoveIpFromVIPBotListView [POST]

Remove the ip address from the VIP bots list. You need to specify a domain from which you want to remove this bot from, and the bot name you will remove that ip address from. An example using curl about how to request that endpoint to remove the ip address 127.1.2.1 from the white list:

curl -X POST https://accelerator.shimmercat.com/presentation-api/v1/remove-ip-from-vip-bot-list/127.1.2.1/ -H 'Authorization: Token <your_authentication_token>' -H 'Content-type: application/json' -d '{"remove_from_bot": "test", "remove_from_domain": "www.shimmercat.tests.com"}'
  • Request (application/json)

      {
          "remove_from_bot": "test vip",
          "remove_from_domain": "www.shimmercat.tests.com"
      }
    
  • Response 200 (application/json)

      {
          "name": "test vip",
          "ip_addresses": []
      }
    

4.15.17. RemoveIpRangeFromVIPBotListView [/presentation-api/v1/remove-ip-from-vip-bot-list/{iprange}/]

  • Parameters

    • iprange: 69.209.0.0_24 (string) - Ip address range to remove from the VIP bots list.

4.15.17.1. RemoveIpRangeFromVIPBotListView [POST]

Remove the ip address range from the VIP bots list. You need to specify a domain from which you want to remove this bot from, and the bot name you will remove that ip address range from. An example using curl about how to request that endpoint to remove the ip address range 69.209.0.0/24:

curl -X POST https://accelerator.shimmercat.com/presentation-api/v1/remove-ip-from-vip-bot-list/69.209.0.0_24/ -H 'Authorization: Token <your_authentication_token>' -H 'Content-type: application/json' -d '{"remove_from_bot": "test", "remove_from_domain": "www.shimmercat.tests.com"}'

Please notice that we use _ instead of / when sending the ip range on the URL.

  • Request (application/json)

      {
          "remove_from_bot": "test vip",
          "remove_from_domain": "www.shimmercat.tests.com"
      }
    
  • Response 200 (application/json)

      {
          "name": "test",
          "ip_addresses": []
      }
    

4.15.18. RemoveCustomIpRangeFromVIPBotListView [/presentation-api/v1/remove-ip-from-vip-bot-list/{iprange}/]

  • Parameters

    • iprange: 69.209.0.0_4 (string) - custom ip address range to remove from the VIP bots list.

4.15.18.1. RemoveCustomIpRangeFromVIPBotListView [POST]

Remove the custom ip address range from the VIP bots list. It is a special case we implemented where the ip range will be translated a consecutive list of ip addresses e.g 69.208.0.0_4 represents 5 ip addresses: 69.208.0.0, 69.208.0.1, 69.208.0.2, 69.208.0.3, 69.208.0.4, so it is not on a CIDR notation, that’s why we call it “custom ip range”. You need to specify a domain from which you want to remove this bot from, and the bot name you will remove that ip address range from. An example using curl about how to request that endpoint to remove the ip address range 69.209.0.0_4:

curl -X POST https://accelerator.shimmercat.com/presentation-api/v1/remove-ip-from-vip-bot-list/69.209.0.0_4/ -H 'Authorization: Token <your_authentication_token>' -H 'Content-type: application/json' -d '{"remove_from_bot": "test", "remove_from_domain": "www.shimmercat.tests.com", "is_custom_ip_range": "True"}'
  • Request (application/json)

      {
          "remove_from_bot": "test vip",
          "remove_from_domain": "www.shimmercat.tests.com",
          "is_custom_ip_range": "True"
      }
    
  • Response 200 (application/json)

      {
          "name": "test",
          "ip_addresses": []
      }
    

4.15.19. BotsAccessPolicyView [/presentation-api/v1/bot-access-policy/]

4.15.19.1. BotsAccessPolicyView [POST]

Define the bots access policy. You can define policies per domain, or a general policy for all the domains. When the domain policy is defined by you we use this policy to classify the bots that are accessing this domain when we can not classify the bot automatically. If the domain policy has not been defined then we use your general policy to do the classification. By default the domain policy is null, and the general policy is “Unvetted bots can not access the domain”. It means that the list of bots we send on our emails that you should define a policy to is blocked by default and can not access your domains. We suggest you take action over the bots that we can not automatically classify as good or bad, so that you can have more control over them. That’s why we created this API endpoint. On every request to this endpoint you need to specify at least one of the objects: allow_access or deny_access, general_policy, per_domain_policy. The data structure for those objects is specified below. You can not repeat the same bot in both lists allow_access and deny_access, if that happens we will raise a validation error because it does not make sense to allow and deny the same both at the same time. An example using curlabout how to request that endpoint to allow access toGooglebot on the domainwww.shimmercat.tests.com`:

curl -X POST https://accelerator.shimmercat.com/presentation-api/v1/bot-access-policy/ -H 'Authorization: Token <your_authentication_token>' -H 'Content-type: application/json' -d '{"allow_access": [{"domain": "www.shimmercat.tests.com", "bot": "Google"}], "general_policy": {"unknown_bots_can_access": True}, "per_domain_policy": {"www.shimmercat.tests.com": {"unknown_bots_can_access": True}}}'
  • Request (application/json)

      {
          "allow_access": [{"domain": "www.shimmercat.tests.com", "bot": "Google"}],
          "deny_access": [{"domain": "www.shimmercat.tests.com", "bot": "hacker-bot"}],
          "general_policy": {"unknown_bots_can_access": "True"},
          "per_domain_policy": [{"domain": "www.shimmercat.tests.com", "policy": {"unknown_bots_can_access": "True"}}]
      }
    
  • Response 200 (application/json)

      {
          "allow_access": [{"domain": "www.shimmercat.tests.com", "bot": "Google"}],
          "deny_access": [{"domain": "www.shimmercat.tests.com", "bot": "hacker-bot"}],
          "general_policy": {"unknown_bots_can_access": "True"},
          "per_domain_policy": [{"domain": "www.shimmercat.tests.com", "policy": {"unknown_bots_can_access": "True"}}]
      }
    

4.15.19.2. BotsAccessPolicyView [GET]

Get the bots access policy the customer has active. Below example using curl about how to request that endpoint:

curl -X GET https://accelerator.shimmercat.com/presentation-api/v1/bot-access-policy/ -H 'Authorization: Token <your_authentication_token>' -H 'Content-type: application/json'
  • Response 200 (application/json)

      {
          "general_policy": {"unknown_bots_can_access": "True"},
          "per_domain_policy": [{"domain": "www.shimmercat.tests.com", "policy": {"unknown_bots_can_access": "True"}}]
      }
    

4.15.20. ListCustomerUnreviewedBotsView [/presentation-api/v1/unreviewed-bots/]

4.15.20.1. ListCustomerUnreviewedBotsView [GET]

Get the list of unreviewed bots.

Below example using curl about how to request that endpoint:

curl -X GET https://accelerator.shimmercat.com/presentation-api/v1/unreviewed-bots/ -H 'Authorization: Token <your_authentication_token>' -H 'Content-type: application/json'
  • Response 200 (application/json)

      [
          {
              "domain_name": "www.shimmercat.tests.com",
              "domain_policy": "Unreviewed bots can access the domain",
              "bots": [
                  {
                      "name": "Google",
                      "description": null
                  }
              ]
          }
      ]
    

4.15.21. ClearShimmerCatCacheView [/presentation-api/v1/clear-shimmercat-cache/{domain}/]

  • Parameters

    • domain: www.shimmercat.tests.com (string) - Domain name for which the cache should be cleared.

4.15.21.1. ClearShimmerCatCacheView [POST]

Clear ShimmerCat’s caches in all deployments of the given domain. You need to specify a domain for which the cache should be cleared, and the URL path pattern from where the cache will be cleared for that domain.

ShimmerCat deployments index the cache’s URLs using a full text search index in the following way:

  • Static files are indexed using their filesystem path relative to the site’s root directory, e.g. “assets/js/jquery.js”

  • Generated assets are indexed using their URL path, including any query string components, e.g. “assets/js/jquery?ver=1.3.1”

  • Both for static and generated assets, the mime type of the asset is also indexed.

Dynamic assets are not cached nor indexed.

The pattern should be a full text search query as used by SQLite FT5.

When this endpoint is called, each ShimmerCat instance running the given domain does a full text search with the provided pattern on its cache index and removes all entries that match the pattern from the cache.

Here is an example using curl on how to use that endpoint to clear the cache for www.shimmercat.tests.com, and using the patterns ["assets css", "images jpeg"], which is a list of patterns you would like to clear the cache for:

curl -X POST https://accelerator.shimmercat.com/presentation-api/v1/clear-shimmercat-cache/www.shimmercat.tests.com/ -H 'Authorization: Token <your_authentication_token>' -H 'Content-type: application/json' -d '{"url_path_patterns": ["/assets/*", "/images/*"]}'
  • Request (application/json)

      {
          "url_path_patterns": ["assets css", "images jpeg"]
      }
    
  • Response 200

4.16. Group PrometheusConfig

4.16.1. GetPrometheusConfigView [/presentation-api/v1/prometheus-conf/by-deployment-tag/{tag}/]

  • Parameters

    • tag: test (string) - Deployment Tag to get the prometheus config from.

4.16.1.1. GetPrometheusConfigView [GET]

Will get all the deployments with the tag specified, and collect all the deployments metadata to return a data structure useful to build the prometheus config file.

Here is an example using curl on how to use that endpoint to get the prometheus data for the deployments with tag test:

curl -X GET https://accelerator.shimmercat.com/presentation-api/v1/prometheus-conf/by-deployment-tag/test/ -H 'Authorization: Token <your_authentication_token>' -H 'Content-type: application/json''
  • Response 200

      {
          "prometheus_config":[
              {
                  "job_name":"shimmercat__at__test_A_server_Sweden-1",
                  "metrics_path":"/.well-known/shimmercat/metric-scrapping/prometheus.io/",
                  "static_configs":[
                      {
                          "targets":["127.0.0.1:8030"],
                          "labels":{
                              "telemetry_level":"deployment",
                              "customer":"Customer test",
                              "at_directory":"/srv/test_A",
                              "at_edge__server_name":"Sweden-1",
                              "at_edge__edge_ip_address":"127.0.0.1",
                              "at_edge__datacenter__datacenter_place":"Sweden",
                              "at_edge__datacenter__country_code":"SE",
                              "at_edge__datacenter__datacenter_provider_company":"Upcloud"
                          }
                      }
                  ]
              },
              {
                  "job_name":"haproxy_exporter__at__Sweden-1",
                  "metrics_path":"/metrics",
                  "static_configs":[
                      {
                          "targets":["127.0.0.1:9101"],
                          "labels":{
                              "server_name":"Sweden-1",
                              "telemetry_level":"edge_server",
                              "edge_ip_address":"127.0.0.1",
                              "datacenter__datacenter_place":"Sweden",
                              "datacenter__country_code":"SE",
                              "datacenter__datacenter_provider_company":"Upcloud"
                          }
                      }
                  ]
              },
              {
                  "job_name":"node_exporter__at__Sweden-1",
                  "metrics_path":"/metrics/node_exporter",
                  "static_configs":[
                      {
                          "targets":["127.0.0.1:9112"],
                          "labels":{
                              "server_name":"Sweden-1",
                              "telemetry_level":"edge_server",
                              "edge_ip_address":"127.0.0.1",
                              "datacenter__datacenter_place":"Sweden",
                              "datacenter__country_code":"SE",
                              "datacenter__datacenter_provider_company":"Upcloud"
                          }
                      }
                  ]
              }
          ],
          "customer": "Customer test"
      }
    

4.17. Group GrafanaNotificationChannels

4.17.1. Data Structures

4.17.1.1. GrafanaSlackNotificationChannel

  • id (number)

  • grafana_uid (string, required)

  • customer (object)

    • id (number)

  • when_created

  • when_updated

  • slack_channel_name (string, required)

  • slack_hook_url (string, required)

4.17.1.2. GrafanaEmailNotificationChannel

  • id (number)

  • grafana_uid (string, required)

  • customer (object)

    • id (number)

  • when_created

  • when_updated

4.17.2. GrafanaSlackNotificationChannel Collection [/presentation-api/v1/grafana-notification-channel/slack/]

4.17.2.1. Retrieve all Grafana Slack Notification Channels [GET]

Retrieves all Grafana Slack Notification Channels.

  • Response 200 (application/json)

    • Attributes (array[GrafanaSlackNotificationChannel])

4.17.2.2. Create new Grafana Slack Notification Channel [POST]

Creates a new Grafana Slack Notification Channel.

  • Request (application/json)

      {
          "grafana_uid": "new-uid",
          "slack_channel_name": "channel-name",
          "slack_hook_url": "http://example.com"
      }
    
  • Response 201 (application/json)

    • Attributes (GrafanaSlackNotificationChannel)

4.17.3. GrafanaSlackNotificationChannel [/presentation-api/v1/grafana-notification-channel/slack/{channel_id}/]

4.17.3.1. Retrieve a Grafana Slack Notification Channel [GET]

Retrieves information about single Grafana Slack Notification Channel.

  • Parameters

    • channel_id: 1 (number)

  • Response 200 (application/json)

    • Attributes (GrafanaSlackNotificationChannel)

4.17.3.2. Update a Grafana Slack Notification Channel [PUT]

Updates a single Grafana Slack Notification Channel.

  • Parameters

    • channel_id: 1 (number)

  • Request (application/json)

      {
          "grafana_uid": "new-uid-1",
          "slack_channel_name": "channel-name-1",
          "slack_hook_url": "http://example.com/subpath"
      }
    
  • Response 200 (application/json)

    • Attributes (GrafanaSlackNotificationChannel)

4.17.3.3. Delete a Grafana Slack Notification Channel [DELETE]

Deletes a Grafana Slack Notification Channel.

  • Parameters

    • channel_id: 1 (number)

  • Response 204

4.17.4. GrafanaEmailNotificationChannel Collection [/presentation-api/v1/grafana-notification-channel/email/]

4.17.4.1. Retrieve all Grafana Email Notification Channels [GET]

Retrieves all Grafana Email Notification Channels.

  • Response 200 (application/json)

    • Attributes (array[GrafanaEmailNotificationChannel])

4.17.4.2. Create a new Grafana Email Notification Channel [POST]

Creates a new Grafana Email Notification Channel.

  • Request (application/json)

      {
          "grafana_uid": "new-uid"
      }
    
  • Response 201 (application/json)

    • Attributes (GrafanaEmailNotificationChannel)

4.17.5. GrafanaEmailNotificationChannel [/presentation-api/v1/grafana-notification-channel/email/{channel_id}/]

4.17.5.1. Retrieve a Grafana Email Notification Channel [GET]

Retrieves information about single Grafana Email Notification Channel.

  • Parameters

    • channel_id: 1 (number)

  • Response 200 (application/json)

    • Attributes (GrafanaEmailNotificationChannel)

4.17.5.2. Update a Grafana Email Notification Channel [PUT]

Updates a single Grafana Email Notification Channel.

  • Parameters

    • channel_id: 1 (number)

  • Request (application/json)

      {
          "grafana_uid": "new-uid-1"
      }
    
  • Response 200 (application/json)

    • Attributes (GrafanaEmailNotificationChannel)

4.17.5.3. Delete a Grafana Email Notification Channel [DELETE]

Deletes a Grafana Email Notification Channel.

  • Parameters

    • channel_id: 1 (number)

  • Response 204

4.18. Group Notifications

4.18.1. Retrieve email notification types [GET /presentation-api/v1/notifications/email/types/]

Retrieves the list of email notification types available for subscription.

  • Response 200 (application/json)

      {
          "notification_types": {
              "weekly_report_email": "ShimmerCat weekly report",
              "send_email_to_customer_about_certificates_expiring": "Domain Certificates expiring or expired.",
              "send_email_to_customers_about_old_versions_of_sc_pack": "Old version of sc_pack on deployments, sc_pack update command should be run on deployments.",
              "send_email_to_customer_about_sc_pack_push": "Deployments un-synchronized with the cloud database, sc_pack push_all --sync_with_all_deployments command should be run on deployments.",
              "send_email_to_customer_about_domain_images_optimization_blocked_for_today": "Images optimization blocked for today."
          }
      }
    

4.18.2. Subscribe to email notification [POST /presentation-api/v1/notifications/email/subscribe/]

Subscribe a user to one type of email notification. The response will include status field, which value can be "subscription_created", "subscription_reactivated" or "subscription_exists".

  • Request (application/json)

      {
          "notification_type": "weekly_report_email",
          "email": "another-user@customer.com"
      }
    
  • Response 201 (application/json)

      {
          "status": "subscription_created"
      }
    

4.18.3. Unsubscribe from email notification [POST /presentation-api/v1/notifications/email/unsubscribe/]

Unsubscribe a user from an email notification he’s subscribed to. The response will include status field, which value can be "unsubscribed", "subscription_inactive" or "no_subscription".

The request field is_permanent is optional. If it is true then the subscription will be deactivated permanently. Otherwise it will be suspended for 30 days.

  • Request (application/json)

      {
          "notification_type": "weekly_report_email",
          "email": "another-user@customer.com",
          "is_permanent": false
      }
    
  • Response 200 (application/json)

      {
          "status": "unsubscribed"
      }
    

4.18.4. Retrieve grafana notification types [GET /presentation-api/v1/notifications/grafana/types/]

Retrieves the list of grafana notification types available for subscription.

  • Response 200 (application/json)

      {
          "notification_types": {
              "maker.grafana.dashboards.for_alerts.for_domains.domains_backend_slow_response_graphs": "Domain backend slow response",
              "maker.grafana.dashboards.for_alerts.for_edge_servers.customer_backend_unreachable_graphs": "Customer backend unreachable"
          }
      }
    

4.18.5. Subscribe to grafana notification [POST /presentation-api/v1/notifications/grafana/subscribe/]

Subscribe a user to one type of grafana notification. The response will include status field, which value can be "subscription_created", "subscription_reactivated" or "subscription_exists".

  • Request (application/json)

      {
          "notification_type": "maker.grafana.dashboards.for_alerts.for_domains.domains_backend_slow_response_graphs",
          "email": "another-user@customer.com"
      }
    
  • Response 201 (application/json)

      {
          "status": "subscription_created"
      }
    

4.18.6. Unsubscribe from grafana notification [POST /presentation-api/v1/notifications/grafana/unsubscribe/]

Unsubscribe a user from an email notification he’s subscribed to. The response will include status field, which value can be "unsubscribed", "subscription_inactive" or "no_subscription".

The request field is_permanent is optional. If it is true then the subscription will be deactivated permanently. Otherwise it will be suspended for 30 days.

  • Request (application/json)

      {
          "notification_type": "maker.grafana.dashboards.for_alerts.for_domains.domains_backend_slow_response_graphs",
          "email": "another-user@customer.com",
          "is_permanent": false
      }
    
  • Response 200 (application/json)

      {
          "status": "unsubscribed"
      }