Skip to content

Send-Your-Data Management API

Coralogix provides an API that allows you to manage your Send-Your-Data API keys.

Prerequisites

  • Api Key with ApiKeys preset. Access this in your navigation pane by clicking Data Flow > API Keys.

Create a New 'Send Your Data' API Key

grpcurl -H "Authorization: Bearer <YOUR-API-KEY>" -d @ <CORALOGIX-DOMAIN> com.coralogixapis.aaa.apikeys.v3.ApiKeysService/CreateApiKey <<EOF
{
  "name": "my-api-key",
  "key_permissions": {
    "presets": [    
            "SendData"    
        ]
  },  
  "owner": {
    "team_id": 000000
  },
  "hashed": false
}
EOF

Request Args

FieldDescription
key_nameName of the key
key_permissionsSpecifies the permissions assigned to this key. For 'Send Your Data' keys, the only value that should be used is the SendData permissions preset. (Note: A preset is a predefined group of permissions tailored to a specific role. A key can be assigned either individual permissions directly or through a preset.)
ownerDefines who can be the owner of the key. The only available value at present is the team_id.
hashedWhether the key should be stored securely. If hashed, key value will be disclosed only once in create response.

Response

The response will be a message with information about the created key.

{
  "key_id": "c8d84762-9aff-4f90-93ef-1762757e0c2c",
  "name": "my-api-key",
  "value": "<key_value>",
  }
}
FieldDescription
key_idID of the key
nameAssigned name to the key
ValueValue of the key. For securely stored keys, this is the only time it will be visible.

Update 'Send Your Data' API Key

grpcurl -H "Authorization: Bearer Bearer <YOUR-API-KEY>" -d @ <CORALOGIX-DOMAIN> com.coralogixapis.aaa.apikeys.v3.ApiKeysService/UpdateApiKey <<EOF
{
  "key_id": "252d3765-069a-4f32-b79a-18e60f4c7b61",
  "is_active": false,
  "new_name": "Some new name"
}
EOF

Request args

FieldDescription
key_idID of the key
is_activeIf provided, defines if key should be active or not
new_nameIf provided, new name that will be correlated with the key

Response

The response will be an empty message.

Get a 'Send Your Data' API Key By Id

grpcurl -H "Authorization: Bearer <YOUR-API-KEY>" -d @ <CORALOGIX-DOMAIN> com.coralogixapis.aaa.apikeys.v3.ApiKeysService/GetApiKey <<EOF
{
  "key_id": "252d3765-069a-4f32-b79a-18e60f4c7b61"
}
EOF

Request args

FieldDescription
key_idId of they key send data key to be returned

Response

The response will be an message with API key information:

{
  "key_info": {
    "id": "252d3765-069a-4f32-b79a-18e60f4c7b61",
    "name": "Some key name",
    "owner": {
      "team_id": 0000
    },
    "active": false,
    "hashed": false,
    "key_permissions": {
      "presets": [
        {
          "permissions": [
            "cloud-metadata-ingress:SendData",
            "logs.data-ingress:SendData",
            "metrics.data-ingress:SendData",
            "spans.data-ingress:SendData",
            "contextual-data:SendData"
          ],
          "name": "SendData"
        }
      ],
      "permissions": []
    },
    "value": "<key_value>"
  }
}
FieldDescription
idID of the key
nameAssigned name to the key
ownerWho owns the key
active Key ActiveIf key is in active state
hashedWhether the key is stored securely. If hashed, key value is only disclosed once in create response
key_permissionsPermissions assigned to this key come either from presets (predefined groups of permissions) or directly
valueOptional value of the key. If key is stored securely, this field will not be sent

Get all 'Send Your Data' API Keys Owned by caller of the endpoint

The caller can be either a user or a team, determined by the authentication context in which the call is performed

grpcurl -H "Authorization: Bearer <YOUR-API-KEY>" -d @ <CORALOGIX-DOMAIN> com.coralogixapis.aaa.apikeys.v3.ApiKeysService/GetSendDataApiKeys <<EOF
{
}
EOF

Request args

No args

Response

The response will be a message with list of all 'Send Your Data' API keys owned by caller:

{
  "keys": [
    {
      "key_info": {
        "id": "252d3765-069a-4f32-b79a-18e60f4c7b61",
        "name": "Some key name",
        "owner": {
          "team_id": 0000
        },
        "active": false,
        "hashed": false,
        "key_permissions": {
          "presets": [
            {
              "permissions": [
                "cloud-metadata-ingress:SendData",
                "logs.data-ingress:SendData",
                "metrics.data-ingress:SendData",
                "spans.data-ingress:SendData",
                "contextual-data:SendData"
              ],
              "name": "SendData"
            }
          ],
          "permissions": []
        },
        "value": "<key_value>"
      }
    }
  ]
}
List of
FieldDescription
idID of the key
nameAssigned name to the key
ownerWho owns the key
active Key ActiveIf key is in active state
hashedWhether the key is stored securely. If hashed, key value is only disclosed once in create response
key_permissionsPermissions assigned to this key come either from presets (predefined groups of permissions) or directly
valueOptional value of the key. If key is stored securely, this field will not be sent

Support

Need help?

Our world-class customer success team is available 24/7 to walk you through your setup and answer any questions that may come up.

Feel free to reach out to usvia our in-app chator by sending us an email at [email protected]**.