Introduction
This information applies only if you use IBM Cloud® Activity Tracker Event Routing.
You can configure IBM Cloud® Activity Tracker Event Routing to manage auditing events in your IBM Cloud account.
IBM Cloud Activity Tracker Event Routing provides a REST API that you can use with the golang language to define, retrieve, and modify targets and routes. For details about using IBM Cloud Activity Tracker Event Routing, see the IBM Cloud documentation.
Endpoint URL
You can use private and public endpoints to manage IBM Cloud Activity Tracker Event Routing.
The IBM Cloud Activity Tracker Event Routing API uses the following regional private endpoint URL.
https://private.<region>.atracker.cloud.ibm.com
The IBM Cloud Activity Tracker Event Routing API uses the following regional public endpoint URL.
https://<region>.atracker.cloud.ibm.com
When you call the API, you must add the path for each method to form the complete API endpoint for your request.
Replace <region>
with the prefix that represents the geographic area where you would like to enable the IBM Cloud Activity Tracker Event Routing service. For more information, see Locations.
For more information about supported endpoints, see Endpoints.
Example API request
curl -X <request_method> "https://private.<region>.atracker.cloud.ibm.com/<method_endpoint>"
Replace <request_method>
, <region
, and <method_endpoint>
in this example with the values for your particular API call. Some API calls require an additional request payload. See the API Schema and examples for details.
Authentication
To call each method, you'll need to be assigned a role that includes the required IAM actions. Each method lists the associated action. For more information about IAM actions and how they map to roles, see Managing access with IAM.
To work with the API, authenticate your app or service by including your IBM Cloud IAM access token.
You can build your API request by pairing a service endpoint with your authentication credentials. For example, if you plan to configure a routing target for the us-south
region for your auditing events, use the following endpoint and API headers to list the targets in your service:
curl -X GET \
"https://private.us-south.atracker.cloud.ibm.com/api/v2/targets" \
-H "accept: application/json" \
-H "Authorization: Bearer <access_token>" \
Replace <access_token>
with your IBM Cloud IAM token.
You can retrieve an access token by first creating an API key, and then exchanging your API key for an IBM Cloud IAM token. For more information, see Retrieving an access token programmatically.
To find out more about setting up the IBM Cloud Activity Tracker Event Routing API, see Getting started.
To retrieve your access token:
curl -X POST "https://iam.cloud.ibm.com/identity/token" -H "Content-Type: application/x-www-form-urlencoded" -H "Accept: application/json" -d "grant_type=urn%3Aibm%3Aparams%3Aoauth%3Agrant-type%3Aapikey&apikey=<API_KEY>" > token.json
Replace <API_KEY>
with your service credentials. Then use the full
access_token
value, prefixed by the Bearer token type, to authenticate your API requests.
Auditing
You can monitor API activity within your account by using IBM Cloud Activity Tracker Event Routing. For more information, see Getting started.
Whenever an API method is called, an auditing event is generated that you can then track and audit in your account. The specific event type is listed for each individual method.
Error handling
The IBM Cloud Activity Tracker Event Routing service uses standard HTTP response codes to indicate whether a method completed successfully. A 200
response always indicates success. A 400
type response is some sort of failure, and a 500
type response usually indicates an internal system error.
Status code | Status | Description |
---|---|---|
200 | OK | The request was successful. |
201 | OK | The request was successful. A resource is created. |
400 | Bad Request | The request was unsuccessful. This is often due to a missing required parameter. |
401 | Unauthorized | The IAM token that is used in the API request is invalid or expired. |
403 | Forbidden | The operation is forbidden due to insufficient permissions. |
404 | Not Found | The requested resource doesn't exist or is already deleted. |
429 | Too Many Requests | Too many requests hit the API too quickly. |
500 | Internal Server Error | Something went wrong when processing your request. |
Methods
Create a target
Creates a target that includes information about the endpoint and the credentials required to write to that target. You can send your logs from all regions to a single target, different targets or multiple targets. One target per region is not required. You can define up to 16 targets per account.
Creates a target that includes information about the endpoint and the credentials required to write to that target. You can send your logs from all regions to a single target, different targets or multiple targets. One target per region is not required. You can define up to 16 targets per account.
POST /api/v2/targets
(atracker *AtrackerV2) CreateTarget(createTargetOptions *CreateTargetOptions) (result *Target, response *core.DetailedResponse, err error)
(atracker *AtrackerV2) CreateTargetWithContext(ctx context.Context, createTargetOptions *CreateTargetOptions) (result *Target, response *core.DetailedResponse, err error)
Request
Instantiate the CreateTargetOptions
struct and set the fields to provide parameter values for the CreateTarget
method.
The request payload to create a target.
The name of the target. The name must be 1000 characters or less, and cannot include any special characters other than
(space) - . _ :
. Do not include any personal identifying information (PII) in any resource names.Possible values: 1 ≤ length ≤ 1000, Value must match regular expression
^[a-zA-Z0-9 -._:]+$
Example:
my-cos-target
The type of the target. It can be cloud_object_storage, logdna, event_streams, or cloud_logs. Based on this type you must include cos_endpoint, logdna_endpoint, eventstreams_endpoint or cloudlogs_endpoint.
Allowable values: [
cloud_object_storage
,event_streams
,logdna
,cloud_logs
]Example:
cloud_object_storage
Property values for a Cloud Object Storage Endpoint in requests.
Property values for a LogDNA Endpoint in requests.
Property values for an Event Streams Endpoint in requests.
Property values for an IBM Cloud Logs endpoint in requests.
Include this optional field if you want to create a target in a different region other than the one you are connected.
Possible values: 3 ≤ length ≤ 1000, Value must match regular expression
^[a-zA-Z0-9 -._:]+$
Example:
us-south
WithContext method only
A context.Context instance that you can use to specify a timeout for the operation or to cancel an in-flight request.
The CreateTarget options.
The name of the target. The name must be 1000 characters or less, and cannot include any special characters other than
(space) - . _ :
. Do not include any personal identifying information (PII) in any resource names.Possible values: 1 ≤ length ≤ 1000, Value must match regular expression
/^[a-zA-Z0-9 -._:]+$/
Examples:my-cos-target
The type of the target. It can be cloud_object_storage, logdna or event_streams. Based on this type you must include cos_endpoint, logdna_endpoint or eventstreams_endpoint.
Allowable values: [
cloud_object_storage
,event_streams
,logdna
]Examples:cloud_object_storage
Property values for a Cloud Object Storage Endpoint in requests.
- CosEndpoint
The host name of the Cloud Object Storage endpoint.
Possible values: 3 ≤ length ≤ 1000, Value must match regular expression
/^[a-zA-Z0-9 -._:]+$/
Examples:s3.private.us-east.cloud-object-storage.appdomain.cloud
The CRN of the Cloud Object Storage instance.
Possible values: 3 ≤ length ≤ 1000, Value must match regular expression
/^[a-zA-Z0-9 -._:\/]+$/
Examples:crn:v1:bluemix:public:cloud-object-storage:global:a/11111111111111111111111111111111:22222222-2222-2222-2222-222222222222::
The bucket name under the Cloud Object Storage instance.
Possible values: 3 ≤ length ≤ 1000, Value must match regular expression
/^[a-zA-Z0-9 -._:\/]+$/
Examples:my-atracker-bucket
The IAM API key that has writer access to the Cloud Object Storage instance. This credential is masked in the response. This is required if service_to_service is not enabled.
Possible values: 3 ≤ length ≤ 1000, Value must match regular expression
/^[a-zA-Z0-9 -._:]+$/
Examples:xxxxxxxxxxxxxx
ATracker service is enabled to support service to service authentication. If service to service is enabled then set this flag is true and do not supply apikey.
Examples:true
Property values for a LogDNA Endpoint in requests.
- LogdnaEndpoint
The CRN of the LogDNA instance.
Possible values: 3 ≤ length ≤ 1000, Value must match regular expression
/^[a-zA-Z0-9 -._:\/]+$/
Examples:crn:v1:bluemix:public:logdna:us-south:a/11111111111111111111111111111111:22222222-2222-2222-2222-222222222222::
The LogDNA ingestion key is used for routing logs to a specific LogDNA instance.
Possible values: 3 ≤ length ≤ 1000, Value must match regular expression
/^[a-zA-Z0-9 -._:\/]+$/
Examples:xxxxxxxxxxxxxx
Property values for an Event Streams Endpoint in requests.
- EventstreamsEndpoint
The CRN of the Event Streams instance.
Possible values: 3 ≤ length ≤ 1000, Value must match regular expression
/^[a-zA-Z0-9 -._:\/]+$/
Examples:crn:v1:bluemix:public:messagehub:us-south:a/11111111111111111111111111111111:22222222-2222-2222-2222-222222222222::
List of broker endpoints.
Possible values: 1 ≤ length ≤ 1000, Value must match regular expression
/^[a-zA-Z0-9 -._:]+$/
The messsage hub topic defined in the Event Streams instance.
Possible values: 3 ≤ length ≤ 1000, Value must match regular expression
/^[a-zA-Z0-9 -._:\/]+$/
Examples:my-topic
The user password (api key) for the message hub topic in the Event Streams instance.
Possible values: 3 ≤ length ≤ 1000, Value must match regular expression
/^[a-zA-Z0-9 -._:\/]+$/
Examples:xxxxxxxxxxxxxx
Include this optional field if you want to create a target in a different region other than the one you are connected.
Possible values: 3 ≤ length ≤ 1000, Value must match regular expression
/^[a-zA-Z0-9 -._:]+$/
Examples:us-south
curl -X POST https://private.<region>.atracker.cloud.ibm.com/api/v2/targets -H "Authorization: Bearer <IAM_TOKEN>" -H 'content-type: application/json' -d '{ "name": "a-name", "target_type": "cloud_object_storage", "cos_endpoint": { "endpoint": "s3.private.us-east.cloud-object-storage.appdomain.cloud", "target_crn": "crn:v1:bluemix:public:cloud-object-storage:global:a/11111111111111111111111111111111:22222222-2222-2222-2222-222222222222::", "bucket": "my-atracker-bucket", "api_key": "xxxxxxxxxxxxxxxxxx", "service_to_service_enabled": false } }'
curl -X POST https://private.<region>.atracker.cloud.ibm.com/api/v2/targets -H "Authorization: Bearer <IAM_TOKEN>" -H 'content-type: application/json' -d '{ "name": "a-name", "target_type": "logdna", "logdna_endpoint": { "target_crn": "crn:v1:staging:public:logdna:us-south:a/11111111111111111111111111111111:22222222-2222-2222-2222-222222222222::", "ingestion_key": "xxxxxxxxxxxxxxxxxx" } }'
curl -X POST https://private.<region>.atracker.cloud.ibm.com/api/v2/targets -H "Authorization: Bearer <IAM_TOKEN>" -H 'content-type: application/json' -d '{ "name": "a-name", "target_type": "event_streams", "eventstreams_endpoint": { "target_crn": "crn:v1:staging:public:messagehub:us-south:a/11111111111111111111111111111111:22222222-2222-2222-2222-222222222222::", "brokers": ["xxxxx.cloud.ibm.com:9093","yyyyy.cloud.ibm.com:9093"], "topic": "test-topic", "api_key": "xxxxxxxxxxxxxxxxxx", } }'
curl -X POST https://private.<region>.atracker.cloud.ibm.com/api/v2/targets -H "Authorization: Bearer <IAM_TOKEN>" -H 'content-type: application/json' -d '{ "name": "a-name", "target_type": "cloud_logs", "cloudlogs_endpoint": { "target_crn": "crn:v1:staging:public:logs:eu-es:a/11111111111111111111111111111111:22222222-2222-2222-2222-222222222222::", } }'
cosEndpointPrototypeModel := &atrackerv2.CosEndpointPrototype{ Endpoint: core.StringPtr("s3.private.us-east.cloud-object-storage.appdomain.cloud"), TargetCRN: core.StringPtr("crn:v1:bluemix:public:cloud-object-storage:global:a/11111111111111111111111111111111:22222222-2222-2222-2222-222222222222::"), Bucket: core.StringPtr("my-atracker-bucket"), APIKey: core.StringPtr("xxxxxxxxxxxxxx"), ServiceToServiceEnabled: core.BoolPtr(false), } createTargetOptions := atrackerService.NewCreateTargetOptions( "my-cos-target", "cloud_object_storage", ) createTargetOptions.SetCosEndpoint(cosEndpointPrototypeModel) target, response, err := atrackerService.CreateTarget(createTargetOptions) if err != nil { panic(err) } b, _ := json.MarshalIndent(target, "", " ") fmt.Println(string(b))
Response
Property values for a target in responses.
The uuid of the target resource.
Example:
f7dcfae6-e7c5-08ca-451b-fdfa696c9bb6
The name of the target resource.
Example:
a-cos-target-us-south
The crn of the target resource.
Example:
crn:v1:bluemix:public:atracker:us-south:a/11111111111111111111111111111111:b6eec08b-5201-08ca-451b-cd71523e3626:target:f7dcfae6-e7c5-08ca-451b-fdfa696c9bb6
The type of the target.
Possible values: [
cloud_object_storage
,event_streams
,logdna
,cloud_logs
]Example:
cloud_object_storage
The status of the write attempt to the target with the provided endpoint parameters.
The timestamp of the target creation time.
Example:
2021-05-18T20:15:12.353Z
The timestamp of the target last updated time.
Example:
2021-05-18T20:15:12.353Z
The API version of the target.
Example:
2
Included this optional field if you used it to create a target in a different region other than the one you are connected.
Example:
us-south
Property values for a Cloud Object Storage Endpoint in responses.
Property values for a LogDNA Endpoint in responses.
Property values for the Event Streams Endpoint in responses.
Property values for the IBM Cloud Logs endpoint in responses.
An optional message containing information about the target.
Example:
This is a valid target. However, there is another target already defined with the same target endpoint.
Property values for a target in responses.
The uuid of the target resource.
Examples:f7dcfae6-e7c5-08ca-451b-fdfa696c9bb6
The name of the target resource.
Examples:a-cos-target-us-south
The crn of the target resource.
Examples:crn:v1:bluemix:public:atracker:us-south:a/11111111111111111111111111111111:b6eec08b-5201-08ca-451b-cd71523e3626:target:f7dcfae6-e7c5-08ca-451b-fdfa696c9bb6
The type of the target.
Possible values: [
cloud_object_storage
,event_streams
,logdna
]Examples:cloud_object_storage
Included this optional field if you used it to create a target in a different region other than the one you are connected.
Examples:us-south
Property values for a Cloud Object Storage Endpoint in responses.
- CosEndpoint
The host name of the Cloud Object Storage endpoint.
Possible values: 3 ≤ length ≤ 1000, Value must match regular expression
/^[a-zA-Z0-9 -._:]+$/
Examples:s3.private.us-east.cloud-object-storage.appdomain.cloud
The CRN of the Cloud Object Storage instance.
Possible values: 3 ≤ length ≤ 1000, Value must match regular expression
/^[a-zA-Z0-9 -._:\/]+$/
Examples:crn:v1:bluemix:public:cloud-object-storage:global:a/11111111111111111111111111111111:22222222-2222-2222-2222-222222222222::
The bucket name under the Cloud Object Storage instance.
Possible values: 3 ≤ length ≤ 1000, Value must match regular expression
/^[a-zA-Z0-9 -._:\/]+$/
Examples:my-atracker-bucket
ATracker service is enabled to support service to service authentication. If service to service is enabled then set this flag is true and do not supply apikey.
Examples:true
Property values for a LogDNA Endpoint in responses.
- LogdnaEndpoint
The CRN of the LogDNA instance.
Possible values: 3 ≤ length ≤ 1000, Value must match regular expression
/^[a-zA-Z0-9 -._:\/]+$/
Examples:crn:v1:bluemix:public:logdna:us-south:a/11111111111111111111111111111111:22222222-2222-2222-2222-222222222222::
Property values for the Event Streams Endpoint in responses.
- EventstreamsEndpoint
The CRN of the Event Streams instance.
Possible values: 3 ≤ length ≤ 1000, Value must match regular expression
/^[a-zA-Z0-9 -._:\/]+$/
Examples:crn:v1:bluemix:public:messagehub:us-south:a/11111111111111111111111111111111:22222222-2222-2222-2222-222222222222::
List of broker endpoints.
Possible values: 1 ≤ length ≤ 1000, Value must match regular expression
/^[a-zA-Z0-9 -._:]+$/
The messsage hub topic defined in the Event Streams instance.
Possible values: 3 ≤ length ≤ 1000, Value must match regular expression
/^[a-zA-Z0-9 -._:\/]+$/
Examples:my-topic
The user password (api key) for the message hub topic in the Event Streams instance.
Possible values: 3 ≤ length ≤ 1000, Value must match regular expression
/^[a-zA-Z0-9 -._:\/]+$/
Examples:xxxxxxxxxxxxxx
The status of the write attempt to the target with the provided endpoint parameters.
- WriteStatus
The status such as failed or success.
Examples:success
The timestamp of the failure.
Examples:2021-05-18T20:15:12.353Z
Detailed description of the cause of the failure.
Examples:Provided API key could not be found
The timestamp of the target creation time.
Examples:2021-05-18T20:15:12.353Z
The timestamp of the target last updated time.
Examples:2021-05-18T20:15:12.353Z
An optional message containing information about the target.
Examples:This is a valid target. However, there is another target already defined with the same target endpoint.
The API version of the target.
Examples:2
Status Code
The COS target was successfully created for this region.
The request could not be understood due to malformed syntax.
Your access token is invalid or authentication of your token failed.
Your access token is valid but does not have the necessary permissions to access this resource.
Too many requests. Please wait a few minutes and try again.
Your request could not be processed. Please try again later. If the problem persists, note the
transaction-id
in the response header and contact IBM Cloud support.
{ "id": "c3af557f-fb0e-4476-85c3-0889e7fe7bc4", "crn": "crn:v1:bluemix:public:atracker:us-south:a/6a1d10334a2e4dd197d4e301e8f87df9::target:c3af557f-fb0e-4476-85c3-0889e7fe7bc4", "target_type": "cloud_object_storage", "name": "a-cos-target-us-south", "cos_endpoint": { "endpoint": "s3.private.us-east.cloud-object-storage.appdomain.cloud", "target_crn": "crn:v1:bluemix:public:cloud-object-storage:global:a/11111111111111111111111111111111:22222222-2222-2222-2222-222222222222::", "bucket": "my-atracker-bucket", "service_to_service_enabled": false }, "created_at": "2022-02-01T19:39:38.174Z", "updated_at": "2022-02-01T19:39:38.174Z", "write_status": { "status": "success" }, "api_version": 2 }
{ "id": "c3af557f-fb0e-4476-85c3-0889e7fe7bc4", "crn": "crn:v1:bluemix:public:atracker:us-south:a/6a1d10334a2e4dd197d4e301e8f87df9::target:c3af557f-fb0e-4476-85c3-0889e7fe7bc4", "target_type": "cloud_object_storage", "name": "a-cos-target-us-south", "cos_endpoint": { "endpoint": "s3.private.us-east.cloud-object-storage.appdomain.cloud", "target_crn": "crn:v1:bluemix:public:cloud-object-storage:global:a/11111111111111111111111111111111:22222222-2222-2222-2222-222222222222::", "bucket": "my-atracker-bucket", "service_to_service_enabled": false }, "created_at": "2022-02-01T19:39:38.174Z", "updated_at": "2022-02-01T19:39:38.174Z", "write_status": { "status": "success" }, "api_version": 2 }
List targets
List all targets that are defined for your account.
List all targets that are defined for your account.
GET /api/v2/targets
(atracker *AtrackerV2) ListTargets(listTargetsOptions *ListTargetsOptions) (result *TargetList, response *core.DetailedResponse, err error)
(atracker *AtrackerV2) ListTargetsWithContext(ctx context.Context, listTargetsOptions *ListTargetsOptions) (result *TargetList, response *core.DetailedResponse, err error)
Request
Instantiate the ListTargetsOptions
struct and set the fields to provide parameter values for the ListTargets
method.
Query Parameters
Limit the query to the specified region
Possible values: 3 ≤ length ≤ 256, Value must match regular expression
^[a-zA-Z0-9 -]
WithContext method only
A context.Context instance that you can use to specify a timeout for the operation or to cancel an in-flight request.
The ListTargets options.
Limit the query to the specified region.
Possible values: 3 ≤ length ≤ 256, Value must match regular expression
/^[a-zA-Z0-9 -]/
curl -X GET https://private.<region>.atracker.cloud.ibm.com/api/v2/targets -H "Authorization: Bearer <IAM_TOKEN>" \
listTargetsOptions := atrackerService.NewListTargetsOptions() targetList, response, err := atrackerService.ListTargets(listTargetsOptions) if err != nil { panic(err) } b, _ := json.MarshalIndent(targetList, "", " ") fmt.Println(string(b))
Response
A list of target resources.
A list of target resources.
A list of target resources.
A list of target resources.
- Targets
The uuid of the target resource.
Examples:f7dcfae6-e7c5-08ca-451b-fdfa696c9bb6
The name of the target resource.
Examples:a-cos-target-us-south
The crn of the target resource.
Examples:crn:v1:bluemix:public:atracker:us-south:a/11111111111111111111111111111111:b6eec08b-5201-08ca-451b-cd71523e3626:target:f7dcfae6-e7c5-08ca-451b-fdfa696c9bb6
The type of the target.
Possible values: [
cloud_object_storage
,event_streams
,logdna
]Examples:cloud_object_storage
Included this optional field if you used it to create a target in a different region other than the one you are connected.
Examples:us-south
Property values for a Cloud Object Storage Endpoint in responses.
- CosEndpoint
The host name of the Cloud Object Storage endpoint.
Possible values: 3 ≤ length ≤ 1000, Value must match regular expression
/^[a-zA-Z0-9 -._:]+$/
Examples:s3.private.us-east.cloud-object-storage.appdomain.cloud
The CRN of the Cloud Object Storage instance.
Possible values: 3 ≤ length ≤ 1000, Value must match regular expression
/^[a-zA-Z0-9 -._:\/]+$/
Examples:crn:v1:bluemix:public:cloud-object-storage:global:a/11111111111111111111111111111111:22222222-2222-2222-2222-222222222222::
The bucket name under the Cloud Object Storage instance.
Possible values: 3 ≤ length ≤ 1000, Value must match regular expression
/^[a-zA-Z0-9 -._:\/]+$/
Examples:my-atracker-bucket
ATracker service is enabled to support service to service authentication. If service to service is enabled then set this flag is true and do not supply apikey.
Examples:true
Property values for a LogDNA Endpoint in responses.
- LogdnaEndpoint
The CRN of the LogDNA instance.
Possible values: 3 ≤ length ≤ 1000, Value must match regular expression
/^[a-zA-Z0-9 -._:\/]+$/
Examples:crn:v1:bluemix:public:logdna:us-south:a/11111111111111111111111111111111:22222222-2222-2222-2222-222222222222::
Property values for the Event Streams Endpoint in responses.
- EventstreamsEndpoint
The CRN of the Event Streams instance.
Possible values: 3 ≤ length ≤ 1000, Value must match regular expression
/^[a-zA-Z0-9 -._:\/]+$/
Examples:crn:v1:bluemix:public:messagehub:us-south:a/11111111111111111111111111111111:22222222-2222-2222-2222-222222222222::
List of broker endpoints.
Possible values: 1 ≤ length ≤ 1000, Value must match regular expression
/^[a-zA-Z0-9 -._:]+$/
The messsage hub topic defined in the Event Streams instance.
Possible values: 3 ≤ length ≤ 1000, Value must match regular expression
/^[a-zA-Z0-9 -._:\/]+$/
Examples:my-topic
The user password (api key) for the message hub topic in the Event Streams instance.
Possible values: 3 ≤ length ≤ 1000, Value must match regular expression
/^[a-zA-Z0-9 -._:\/]+$/
Examples:xxxxxxxxxxxxxx
The status of the write attempt to the target with the provided endpoint parameters.
- WriteStatus
The status such as failed or success.
Examples:success
The timestamp of the failure.
Examples:2021-05-18T20:15:12.353Z
Detailed description of the cause of the failure.
Examples:Provided API key could not be found
The timestamp of the target creation time.
Examples:2021-05-18T20:15:12.353Z
The timestamp of the target last updated time.
Examples:2021-05-18T20:15:12.353Z
An optional message containing information about the target.
Examples:This is a valid target. However, there is another target already defined with the same target endpoint.
The API version of the target.
Examples:2
Status Code
List all targets defined.
The request could not be understood due to malformed syntax.
Your access token is invalid or authentication of your token failed.
Your access token is valid but does not have the necessary permissions to access this resource.
Too many requests. Please wait a few minutes and try again.
Your request could not be processed. Please try again later. If the problem persists, note the
transaction-id
in the response header and contact IBM Cloud support.
{ "targets": [ { "id": "c3af557f-fb0e-4476-85c3-0889e7fe7bc4", "crn": "crn:v1:bluemix:public:atracker:us-south:a/6a1d10334a2e4dd197d4e301e8f87df9::target:c3af557f-fb0e-4476-85c3-0889e7fe7bc4", "target_type": "cloud_object_storage", "name": "a-cos-target-us-south", "cos_endpoint": { "endpoint": "s3.private.us-east.cloud-object-storage.appdomain.cloud", "target_crn": "crn:v1:bluemix:public:cloud-object-storage:global:a/11111111111111111111111111111111:22222222-2222-2222-2222-222222222222::", "bucket": "my-atracker-bucket", "service_to_service_enabled": false }, "created_at": "2022-02-01T19:39:38.174Z", "updated_at": "2022-02-01T19:39:38.174Z", "write_status": { "status": "success" }, "api_version": 2 }, { "id": "18bfa75a-3bb5-4261-ad60-ecd800b1fbae", "crn": "crn:v1:staging:public:atracker:us-south:a/627fcf60ca699ba38ccf1d295f1ee179::target:18bfa75a-3bb5-4261-ad60-ecd800b1fbae", "target_type": "logdna", "name": "logdna-target-01", "logdna_endpoint": { "target_crn": "crn:v1:staging:public:logdna:us-south:a/11111111111111111111111111111111:22222222-2222-2222-2222-222222222222::" }, "created_at": "2022-02-01T20:43:02.719Z", "updated_at": "2022-02-01T20:43:02.719Z", "write_status": { "status": "success" }, "api_version": 2 }, { "id": "6162684d-3318-468b-b4a2-db999f92886c", "crn": "crn:v1:staging:public:atracker:us-south:a/627fcf60ca699ba38ccf1d295f1ee179::target:6162684d-3318-468b-b4a2-db999f92886c", "target_type": "event_streams", "name": "eventstreams-target-01", "eventstreams_endpoint": { "target_crn": "crn:v1:staging:public:messagehub:us-south:a/11111111111111111111111111111111:22222222-2222-2222-2222-222222222222::", "brokers": [ "xxxxx.cloud.ibm.com:9093", "yyyyy.cloud.ibm.com:9093" ], "topic": "test-topic", "api_key": "xxxxxxxxxxxxxxxxxx" }, "created_at": "2022-02-01T20:43:02.719Z", "updated_at": "2022-02-01T20:43:02.719Z", "write_status": { "status": "success" }, "api_version": 2 }, { "id": "97480465-20c7-4ee4-babe-fe13d0e64445", "crn": "crn:v1:staging:public:atracker:us-south:a/627fcf60ca699ba38ccf1d295f1ee179::target:97480465-20c7-4ee4-babe-fe13d0e64445", "target_type": "cloud_logs", "name": "cloud-logs-target-01", "region": "us-south", "cloudlogs_endpoint": { "target_crn": "crn:v1:staging:public:logs:eu-es:a/11111111111111111111111111111111:22222222-2222-2222-2222-222222222222::" }, "created_at": "2024-03-29T16:46:06.726Z", "updated_at": "2024-03-29T16:46:06.726Z", "write_status": { "status": "success" }, "api_version": 2 } ] }
{ "targets": [ { "id": "c3af557f-fb0e-4476-85c3-0889e7fe7bc4", "crn": "crn:v1:bluemix:public:atracker:us-south:a/6a1d10334a2e4dd197d4e301e8f87df9::target:c3af557f-fb0e-4476-85c3-0889e7fe7bc4", "target_type": "cloud_object_storage", "name": "a-cos-target-us-south", "cos_endpoint": { "endpoint": "s3.private.us-east.cloud-object-storage.appdomain.cloud", "target_crn": "crn:v1:bluemix:public:cloud-object-storage:global:a/11111111111111111111111111111111:22222222-2222-2222-2222-222222222222::", "bucket": "my-atracker-bucket", "service_to_service_enabled": false }, "created_at": "2022-02-01T19:39:38.174Z", "updated_at": "2022-02-01T19:39:38.174Z", "write_status": { "status": "success" }, "api_version": 2 }, { "id": "18bfa75a-3bb5-4261-ad60-ecd800b1fbae", "crn": "crn:v1:staging:public:atracker:us-south:a/627fcf60ca699ba38ccf1d295f1ee179::target:18bfa75a-3bb5-4261-ad60-ecd800b1fbae", "target_type": "logdna", "name": "logdna-target-01", "logdna_endpoint": { "target_crn": "crn:v1:staging:public:logdna:us-south:a/11111111111111111111111111111111:22222222-2222-2222-2222-222222222222::" }, "created_at": "2022-02-01T20:43:02.719Z", "updated_at": "2022-02-01T20:43:02.719Z", "write_status": { "status": "success" }, "api_version": 2 }, { "id": "6162684d-3318-468b-b4a2-db999f92886c", "crn": "crn:v1:staging:public:atracker:us-south:a/627fcf60ca699ba38ccf1d295f1ee179::target:6162684d-3318-468b-b4a2-db999f92886c", "target_type": "event_streams", "name": "eventstreams-target-01", "eventstreams_endpoint": { "target_crn": "crn:v1:staging:public:messagehub:us-south:a/11111111111111111111111111111111:22222222-2222-2222-2222-222222222222::", "brokers": [ "xxxxx.cloud.ibm.com:9093", "yyyyy.cloud.ibm.com:9093" ], "topic": "test-topic", "api_key": "xxxxxxxxxxxxxxxxxx" }, "created_at": "2022-02-01T20:43:02.719Z", "updated_at": "2022-02-01T20:43:02.719Z", "write_status": { "status": "success" }, "api_version": 2 }, { "id": "97480465-20c7-4ee4-babe-fe13d0e64445", "crn": "crn:v1:staging:public:atracker:us-south:a/627fcf60ca699ba38ccf1d295f1ee179::target:97480465-20c7-4ee4-babe-fe13d0e64445", "target_type": "cloud_logs", "name": "cloud-logs-target-01", "region": "us-south", "cloudlogs_endpoint": { "target_crn": "crn:v1:staging:public:logs:eu-es:a/11111111111111111111111111111111:22222222-2222-2222-2222-222222222222::" }, "created_at": "2024-03-29T16:46:06.726Z", "updated_at": "2024-03-29T16:46:06.726Z", "write_status": { "status": "success" }, "api_version": 2 } ] }
Get details of a target
Retrieve the configuration details of a target.
Retrieve the configuration details of a target.
GET /api/v2/targets/{id}
(atracker *AtrackerV2) GetTarget(getTargetOptions *GetTargetOptions) (result *Target, response *core.DetailedResponse, err error)
(atracker *AtrackerV2) GetTargetWithContext(ctx context.Context, getTargetOptions *GetTargetOptions) (result *Target, response *core.DetailedResponse, err error)
Request
Instantiate the GetTargetOptions
struct and set the fields to provide parameter values for the GetTarget
method.
Path Parameters
The v4 UUID that uniquely identifies the target.
Possible values: 24 ≤ length ≤ 1028, Value must match regular expression
^[a-zA-Z0-9 -]
WithContext method only
A context.Context instance that you can use to specify a timeout for the operation or to cancel an in-flight request.
The GetTarget options.
The v4 UUID that uniquely identifies the target.
Possible values: 24 ≤ length ≤ 1028, Value must match regular expression
/^[a-zA-Z0-9 -]/
curl -X GET https://private.<region>.atracker.cloud.ibm.com/api/v2/targets/<target_ID> -H "Authorization: Bearer <IAM_TOKEN>" -H 'accept: application/json'
getTargetOptions := atrackerService.NewGetTargetOptions( targetIDLink, ) target, response, err := atrackerService.GetTarget(getTargetOptions) if err != nil { panic(err) } b, _ := json.MarshalIndent(target, "", " ") fmt.Println(string(b))
Response
Property values for a target in responses.
The uuid of the target resource.
Example:
f7dcfae6-e7c5-08ca-451b-fdfa696c9bb6
The name of the target resource.
Example:
a-cos-target-us-south
The crn of the target resource.
Example:
crn:v1:bluemix:public:atracker:us-south:a/11111111111111111111111111111111:b6eec08b-5201-08ca-451b-cd71523e3626:target:f7dcfae6-e7c5-08ca-451b-fdfa696c9bb6
The type of the target.
Possible values: [
cloud_object_storage
,event_streams
,logdna
,cloud_logs
]Example:
cloud_object_storage
The status of the write attempt to the target with the provided endpoint parameters.
The timestamp of the target creation time.
Example:
2021-05-18T20:15:12.353Z
The timestamp of the target last updated time.
Example:
2021-05-18T20:15:12.353Z
The API version of the target.
Example:
2
Included this optional field if you used it to create a target in a different region other than the one you are connected.
Example:
us-south
Property values for a Cloud Object Storage Endpoint in responses.
Property values for a LogDNA Endpoint in responses.
Property values for the Event Streams Endpoint in responses.
Property values for the IBM Cloud Logs endpoint in responses.
An optional message containing information about the target.
Example:
This is a valid target. However, there is another target already defined with the same target endpoint.
Property values for a target in responses.
The uuid of the target resource.
Examples:f7dcfae6-e7c5-08ca-451b-fdfa696c9bb6
The name of the target resource.
Examples:a-cos-target-us-south
The crn of the target resource.
Examples:crn:v1:bluemix:public:atracker:us-south:a/11111111111111111111111111111111:b6eec08b-5201-08ca-451b-cd71523e3626:target:f7dcfae6-e7c5-08ca-451b-fdfa696c9bb6
The type of the target.
Possible values: [
cloud_object_storage
,event_streams
,logdna
]Examples:cloud_object_storage
Included this optional field if you used it to create a target in a different region other than the one you are connected.
Examples:us-south
Property values for a Cloud Object Storage Endpoint in responses.
- CosEndpoint
The host name of the Cloud Object Storage endpoint.
Possible values: 3 ≤ length ≤ 1000, Value must match regular expression
/^[a-zA-Z0-9 -._:]+$/
Examples:s3.private.us-east.cloud-object-storage.appdomain.cloud
The CRN of the Cloud Object Storage instance.
Possible values: 3 ≤ length ≤ 1000, Value must match regular expression
/^[a-zA-Z0-9 -._:\/]+$/
Examples:crn:v1:bluemix:public:cloud-object-storage:global:a/11111111111111111111111111111111:22222222-2222-2222-2222-222222222222::
The bucket name under the Cloud Object Storage instance.
Possible values: 3 ≤ length ≤ 1000, Value must match regular expression
/^[a-zA-Z0-9 -._:\/]+$/
Examples:my-atracker-bucket
ATracker service is enabled to support service to service authentication. If service to service is enabled then set this flag is true and do not supply apikey.
Examples:true
Property values for a LogDNA Endpoint in responses.
- LogdnaEndpoint
The CRN of the LogDNA instance.
Possible values: 3 ≤ length ≤ 1000, Value must match regular expression
/^[a-zA-Z0-9 -._:\/]+$/
Examples:crn:v1:bluemix:public:logdna:us-south:a/11111111111111111111111111111111:22222222-2222-2222-2222-222222222222::
Property values for the Event Streams Endpoint in responses.
- EventstreamsEndpoint
The CRN of the Event Streams instance.
Possible values: 3 ≤ length ≤ 1000, Value must match regular expression
/^[a-zA-Z0-9 -._:\/]+$/
Examples:crn:v1:bluemix:public:messagehub:us-south:a/11111111111111111111111111111111:22222222-2222-2222-2222-222222222222::
List of broker endpoints.
Possible values: 1 ≤ length ≤ 1000, Value must match regular expression
/^[a-zA-Z0-9 -._:]+$/
The messsage hub topic defined in the Event Streams instance.
Possible values: 3 ≤ length ≤ 1000, Value must match regular expression
/^[a-zA-Z0-9 -._:\/]+$/
Examples:my-topic
The user password (api key) for the message hub topic in the Event Streams instance.
Possible values: 3 ≤ length ≤ 1000, Value must match regular expression
/^[a-zA-Z0-9 -._:\/]+$/
Examples:xxxxxxxxxxxxxx
The status of the write attempt to the target with the provided endpoint parameters.
- WriteStatus
The status such as failed or success.
Examples:success
The timestamp of the failure.
Examples:2021-05-18T20:15:12.353Z
Detailed description of the cause of the failure.
Examples:Provided API key could not be found
The timestamp of the target creation time.
Examples:2021-05-18T20:15:12.353Z
The timestamp of the target last updated time.
Examples:2021-05-18T20:15:12.353Z
An optional message containing information about the target.
Examples:This is a valid target. However, there is another target already defined with the same target endpoint.
The API version of the target.
Examples:2
Status Code
Retrieve a target.
The request could not be understood due to malformed syntax.
Your access token is invalid or authentication of your token failed.
Your access token is valid but does not have the necessary permissions to access this resource.
The resource could not be found.
Too many requests. Please wait a few minutes and try again.
Your request could not be processed. Please try again later. If the problem persists, note the
transaction-id
in the response header and contact IBM Cloud support.
{ "id": "c3af557f-fb0e-4476-85c3-0889e7fe7bc4", "crn": "crn:v1:bluemix:public:atracker:us-south:a/6a1d10334a2e4dd197d4e301e8f87df9::target:c3af557f-fb0e-4476-85c3-0889e7fe7bc4", "target_type": "cloud_object_storage", "name": "a-cos-target-us-south", "cos_endpoint": { "endpoint": "s3.private.us-east.cloud-object-storage.appdomain.cloud", "target_crn": "crn:v1:bluemix:public:cloud-object-storage:global:a/11111111111111111111111111111111:22222222-2222-2222-2222-222222222222::", "bucket": "my-atracker-bucket", "service_to_service_enabled": false }, "write_status": { "status": "success" }, "created_at": "2022-01-27T19:22:27.293Z", "updated_at": "2022-01-27T19:22:27.293Z", "api_version": 2 }
{ "id": "c3af557f-fb0e-4476-85c3-0889e7fe7bc4", "crn": "crn:v1:bluemix:public:atracker:us-south:a/6a1d10334a2e4dd197d4e301e8f87df9::target:c3af557f-fb0e-4476-85c3-0889e7fe7bc4", "target_type": "cloud_object_storage", "name": "a-cos-target-us-south", "cos_endpoint": { "endpoint": "s3.private.us-east.cloud-object-storage.appdomain.cloud", "target_crn": "crn:v1:bluemix:public:cloud-object-storage:global:a/11111111111111111111111111111111:22222222-2222-2222-2222-222222222222::", "bucket": "my-atracker-bucket", "service_to_service_enabled": false }, "write_status": { "status": "success" }, "created_at": "2022-01-27T19:22:27.293Z", "updated_at": "2022-01-27T19:22:27.293Z", "api_version": 2 }
Update a target
Update the configuration details of a target.
Update the configuration details of a target.
PUT /api/v2/targets/{id}
(atracker *AtrackerV2) ReplaceTarget(replaceTargetOptions *ReplaceTargetOptions) (result *Target, response *core.DetailedResponse, err error)
(atracker *AtrackerV2) ReplaceTargetWithContext(ctx context.Context, replaceTargetOptions *ReplaceTargetOptions) (result *Target, response *core.DetailedResponse, err error)
Request
Instantiate the ReplaceTargetOptions
struct and set the fields to provide parameter values for the ReplaceTarget
method.
Path Parameters
The v4 UUID that uniquely identifies the target.
Possible values: 24 ≤ length ≤ 1028, Value must match regular expression
^[a-zA-Z0-9 -]
The request payload to update a target.
The name of the target. The name must be 1000 characters or less, and cannot include any special characters other than
(space) - . _ :
. Do not include any personal identifying information (PII) in any resource names.Possible values: 1 ≤ length ≤ 1000, Value must match regular expression
^[a-zA-Z0-9 -._:]+$
Example:
my-cos-target
Property values for a Cloud Object Storage Endpoint in requests.
Property values for a LogDNA Endpoint in requests.
Property values for an Event Streams Endpoint in requests.
Property values for an IBM Cloud Logs endpoint in requests.
WithContext method only
A context.Context instance that you can use to specify a timeout for the operation or to cancel an in-flight request.
The ReplaceTarget options.
The v4 UUID that uniquely identifies the target.
Possible values: 24 ≤ length ≤ 1028, Value must match regular expression
/^[a-zA-Z0-9 -]/
The name of the target. The name must be 1000 characters or less, and cannot include any special characters other than
(space) - . _ :
. Do not include any personal identifying information (PII) in any resource names.Possible values: 1 ≤ length ≤ 1000, Value must match regular expression
/^[a-zA-Z0-9 -._:]+$/
Examples:my-cos-target
Property values for a Cloud Object Storage Endpoint in requests.
- CosEndpoint
The host name of the Cloud Object Storage endpoint.
Possible values: 3 ≤ length ≤ 1000, Value must match regular expression
/^[a-zA-Z0-9 -._:]+$/
Examples:s3.private.us-east.cloud-object-storage.appdomain.cloud
The CRN of the Cloud Object Storage instance.
Possible values: 3 ≤ length ≤ 1000, Value must match regular expression
/^[a-zA-Z0-9 -._:\/]+$/
Examples:crn:v1:bluemix:public:cloud-object-storage:global:a/11111111111111111111111111111111:22222222-2222-2222-2222-222222222222::
The bucket name under the Cloud Object Storage instance.
Possible values: 3 ≤ length ≤ 1000, Value must match regular expression
/^[a-zA-Z0-9 -._:\/]+$/
Examples:my-atracker-bucket
The IAM API key that has writer access to the Cloud Object Storage instance. This credential is masked in the response. This is required if service_to_service is not enabled.
Possible values: 3 ≤ length ≤ 1000, Value must match regular expression
/^[a-zA-Z0-9 -._:]+$/
Examples:xxxxxxxxxxxxxx
ATracker service is enabled to support service to service authentication. If service to service is enabled then set this flag is true and do not supply apikey.
Examples:true
Property values for a LogDNA Endpoint in requests.
- LogdnaEndpoint
The CRN of the LogDNA instance.
Possible values: 3 ≤ length ≤ 1000, Value must match regular expression
/^[a-zA-Z0-9 -._:\/]+$/
Examples:crn:v1:bluemix:public:logdna:us-south:a/11111111111111111111111111111111:22222222-2222-2222-2222-222222222222::
The LogDNA ingestion key is used for routing logs to a specific LogDNA instance.
Possible values: 3 ≤ length ≤ 1000, Value must match regular expression
/^[a-zA-Z0-9 -._:\/]+$/
Examples:xxxxxxxxxxxxxx
Property values for an Event Streams Endpoint in requests.
- EventstreamsEndpoint
The CRN of the Event Streams instance.
Possible values: 3 ≤ length ≤ 1000, Value must match regular expression
/^[a-zA-Z0-9 -._:\/]+$/
Examples:crn:v1:bluemix:public:messagehub:us-south:a/11111111111111111111111111111111:22222222-2222-2222-2222-222222222222::
List of broker endpoints.
Possible values: 1 ≤ length ≤ 1000, Value must match regular expression
/^[a-zA-Z0-9 -._:]+$/
The messsage hub topic defined in the Event Streams instance.
Possible values: 3 ≤ length ≤ 1000, Value must match regular expression
/^[a-zA-Z0-9 -._:\/]+$/
Examples:my-topic
The user password (api key) for the message hub topic in the Event Streams instance.
Possible values: 3 ≤ length ≤ 1000, Value must match regular expression
/^[a-zA-Z0-9 -._:\/]+$/
Examples:xxxxxxxxxxxxxx
curl -X PUT https://private.<region>.atracker.cloud.ibm.com/api/v2/targets/<target_ID> -H "Authorization: Bearer <IAM_TOKEN>" -H 'accept: application/json' -d '{ "name": "a-new-name", "cos_endpoint": { "endpoint": "s3.private.us-east.cloud-object-storage.appdomain.cloud", "target_crn": "crn:v1:bluemix:public:cloud-object-storage:global:a/11111111111111111111111111111111:22222222-2222-2222-2222-222222222222::", "bucket": "my-atracker-bucket", "api_key": "xxxxxxxxxxxxxxxxxx", "service_to_service_enabled": false } }'
replaceTargetOptions := atrackerService.NewReplaceTargetOptions( targetIDLink, ) target, response, err := atrackerService.ReplaceTarget(replaceTargetOptions) if err != nil { panic(err) } b, _ := json.MarshalIndent(target, "", " ") fmt.Println(string(b))
Response
Property values for a target in responses.
The uuid of the target resource.
Example:
f7dcfae6-e7c5-08ca-451b-fdfa696c9bb6
The name of the target resource.
Example:
a-cos-target-us-south
The crn of the target resource.
Example:
crn:v1:bluemix:public:atracker:us-south:a/11111111111111111111111111111111:b6eec08b-5201-08ca-451b-cd71523e3626:target:f7dcfae6-e7c5-08ca-451b-fdfa696c9bb6
The type of the target.
Possible values: [
cloud_object_storage
,event_streams
,logdna
,cloud_logs
]Example:
cloud_object_storage
The status of the write attempt to the target with the provided endpoint parameters.
The timestamp of the target creation time.
Example:
2021-05-18T20:15:12.353Z
The timestamp of the target last updated time.
Example:
2021-05-18T20:15:12.353Z
The API version of the target.
Example:
2
Included this optional field if you used it to create a target in a different region other than the one you are connected.
Example:
us-south
Property values for a Cloud Object Storage Endpoint in responses.
Property values for a LogDNA Endpoint in responses.
Property values for the Event Streams Endpoint in responses.
Property values for the IBM Cloud Logs endpoint in responses.
An optional message containing information about the target.
Example:
This is a valid target. However, there is another target already defined with the same target endpoint.
Property values for a target in responses.
The uuid of the target resource.
Examples:f7dcfae6-e7c5-08ca-451b-fdfa696c9bb6
The name of the target resource.
Examples:a-cos-target-us-south
The crn of the target resource.
Examples:crn:v1:bluemix:public:atracker:us-south:a/11111111111111111111111111111111:b6eec08b-5201-08ca-451b-cd71523e3626:target:f7dcfae6-e7c5-08ca-451b-fdfa696c9bb6
The type of the target.
Possible values: [
cloud_object_storage
,event_streams
,logdna
]Examples:cloud_object_storage
Included this optional field if you used it to create a target in a different region other than the one you are connected.
Examples:us-south
Property values for a Cloud Object Storage Endpoint in responses.
- CosEndpoint
The host name of the Cloud Object Storage endpoint.
Possible values: 3 ≤ length ≤ 1000, Value must match regular expression
/^[a-zA-Z0-9 -._:]+$/
Examples:s3.private.us-east.cloud-object-storage.appdomain.cloud
The CRN of the Cloud Object Storage instance.
Possible values: 3 ≤ length ≤ 1000, Value must match regular expression
/^[a-zA-Z0-9 -._:\/]+$/
Examples:crn:v1:bluemix:public:cloud-object-storage:global:a/11111111111111111111111111111111:22222222-2222-2222-2222-222222222222::
The bucket name under the Cloud Object Storage instance.
Possible values: 3 ≤ length ≤ 1000, Value must match regular expression
/^[a-zA-Z0-9 -._:\/]+$/
Examples:my-atracker-bucket
ATracker service is enabled to support service to service authentication. If service to service is enabled then set this flag is true and do not supply apikey.
Examples:true
Property values for a LogDNA Endpoint in responses.
- LogdnaEndpoint
The CRN of the LogDNA instance.
Possible values: 3 ≤ length ≤ 1000, Value must match regular expression
/^[a-zA-Z0-9 -._:\/]+$/
Examples:crn:v1:bluemix:public:logdna:us-south:a/11111111111111111111111111111111:22222222-2222-2222-2222-222222222222::
Property values for the Event Streams Endpoint in responses.
- EventstreamsEndpoint
The CRN of the Event Streams instance.
Possible values: 3 ≤ length ≤ 1000, Value must match regular expression
/^[a-zA-Z0-9 -._:\/]+$/
Examples:crn:v1:bluemix:public:messagehub:us-south:a/11111111111111111111111111111111:22222222-2222-2222-2222-222222222222::
List of broker endpoints.
Possible values: 1 ≤ length ≤ 1000, Value must match regular expression
/^[a-zA-Z0-9 -._:]+$/
The messsage hub topic defined in the Event Streams instance.
Possible values: 3 ≤ length ≤ 1000, Value must match regular expression
/^[a-zA-Z0-9 -._:\/]+$/
Examples:my-topic
The user password (api key) for the message hub topic in the Event Streams instance.
Possible values: 3 ≤ length ≤ 1000, Value must match regular expression
/^[a-zA-Z0-9 -._:\/]+$/
Examples:xxxxxxxxxxxxxx
The status of the write attempt to the target with the provided endpoint parameters.
- WriteStatus
The status such as failed or success.
Examples:success
The timestamp of the failure.
Examples:2021-05-18T20:15:12.353Z
Detailed description of the cause of the failure.
Examples:Provided API key could not be found
The timestamp of the target creation time.
Examples:2021-05-18T20:15:12.353Z
The timestamp of the target last updated time.
Examples:2021-05-18T20:15:12.353Z
An optional message containing information about the target.
Examples:This is a valid target. However, there is another target already defined with the same target endpoint.
The API version of the target.
Examples:2
Status Code
The target was successfully updated.
The request could not be understood due to malformed syntax.
Your access token is invalid or authentication of your token failed.
Your access token is valid but does not have the necessary permissions to access this resource.
The resource could not be found.
Too many requests. Please wait a few minutes and try again.
Your request could not be processed. Please try again later. If the problem persists, note the
transaction-id
in the response header and contact IBM Cloud support.
{ "id": "c3af557f-fb0e-4476-85c3-0889e7fe7bc4", "crn": "crn:v1:bluemix:public:atracker:us-south:a/6a1d10334a2e4dd197d4e301e8f87df9::target:c3af557f-fb0e-4476-85c3-0889e7fe7bc4", "target_type": "cloud_object_storage", "name": "a-cos-target-us-south", "cos_endpoint": { "endpoint": "s3.private.us-east.cloud-object-storage.appdomain.cloud", "target_crn": "crn:v1:bluemix:public:cloud-object-storage:global:a/11111111111111111111111111111111:22222222-2222-2222-2222-222222222222::", "bucket": "my-atracker-bucket", "service_to_service_enabled": false }, "write_status": { "status": "success" }, "created_at": "2022-01-27T19:22:27.293Z", "updated_at": "2022-01-27T19:22:27.293Z", "api_version": 2 }
{ "id": "c3af557f-fb0e-4476-85c3-0889e7fe7bc4", "crn": "crn:v1:bluemix:public:atracker:us-south:a/6a1d10334a2e4dd197d4e301e8f87df9::target:c3af557f-fb0e-4476-85c3-0889e7fe7bc4", "target_type": "cloud_object_storage", "name": "a-cos-target-us-south", "cos_endpoint": { "endpoint": "s3.private.us-east.cloud-object-storage.appdomain.cloud", "target_crn": "crn:v1:bluemix:public:cloud-object-storage:global:a/11111111111111111111111111111111:22222222-2222-2222-2222-222222222222::", "bucket": "my-atracker-bucket", "service_to_service_enabled": false }, "write_status": { "status": "success" }, "created_at": "2022-01-27T19:22:27.293Z", "updated_at": "2022-01-27T19:22:27.293Z", "api_version": 2 }
Delete a target
Delete a target.
Delete a target.
DELETE /api/v2/targets/{id}
(atracker *AtrackerV2) DeleteTarget(deleteTargetOptions *DeleteTargetOptions) (result *WarningReport, response *core.DetailedResponse, err error)
(atracker *AtrackerV2) DeleteTargetWithContext(ctx context.Context, deleteTargetOptions *DeleteTargetOptions) (result *WarningReport, response *core.DetailedResponse, err error)
Request
Instantiate the DeleteTargetOptions
struct and set the fields to provide parameter values for the DeleteTarget
method.
Path Parameters
The v4 UUID that uniquely identifies the target.
Possible values: 24 ≤ length ≤ 1028, Value must match regular expression
^[a-zA-Z0-9 -]
WithContext method only
A context.Context instance that you can use to specify a timeout for the operation or to cancel an in-flight request.
The DeleteTarget options.
The v4 UUID that uniquely identifies the target.
Possible values: 24 ≤ length ≤ 1028, Value must match regular expression
/^[a-zA-Z0-9 -]/
curl -X DELETE https://private.<region>.atracker.cloud.ibm.com/api/v2/targets/<target_ID> -H "Authorization: Bearer <IAM_TOKEN>" -H 'accept: application/json'
deleteTargetOptions := atrackerService.NewDeleteTargetOptions( targetIDLink, ) warningReport, response, err := atrackerService.DeleteTarget(deleteTargetOptions) if err != nil { panic(err) } b, _ := json.MarshalIndent(warningReport, "", " ") fmt.Println(string(b))
Response
Description of a warning that occurred in a service request.
The status code.
The transaction-id of the API request.
The warning array triggered by the API request.
Description of a warning that occurred in a service request.
The status code.
The transaction-id of the API request.
The warning array triggered by the API request.
- Warnings
The warning code.
The warning message.
Status Code
The target is deleted.
The target is successfully deleted.
The request could not be understood due to malformed syntax.
Your access token is invalid or authentication of your token failed.
Your access token is valid but does not have the necessary permissions to access this resource.
The resource could not be found.
The delete request could not be fulfilled because the target is in use.
Too many requests. Please wait a few minutes and try again.
Your request could not be processed. Please try again later. If the problem persists, note the
transaction-id
in the response header and contact IBM Cloud support.
{ "trace": "11111111-cccc-dddd-eeee-ffffffffffff", "status_code": 200, "warnings": [ { "code": "delete_write_failed", "message": "The Target is deleted but could not write to the target about the deletion." } ] }
{ "trace": "11111111-cccc-dddd-eeee-ffffffffffff", "status_code": 200, "warnings": [ { "code": "delete_write_failed", "message": "The Target is deleted but could not write to the target about the deletion." } ] }
Validate a target
Validate a target by checking the credentials to write to the target. The result is included as additional data of the target in the section "write_status".
Validate a target by checking the credentials to write to the target. The result is included as additional data of the target in the section "write_status".
POST /api/v2/targets/{id}/validate
(atracker *AtrackerV2) ValidateTarget(validateTargetOptions *ValidateTargetOptions) (result *Target, response *core.DetailedResponse, err error)
(atracker *AtrackerV2) ValidateTargetWithContext(ctx context.Context, validateTargetOptions *ValidateTargetOptions) (result *Target, response *core.DetailedResponse, err error)
Request
Instantiate the ValidateTargetOptions
struct and set the fields to provide parameter values for the ValidateTarget
method.
Path Parameters
The v4 UUID that uniquely identifies the target.
Possible values: 24 ≤ length ≤ 1028, Value must match regular expression
^[a-zA-Z0-9 -]
WithContext method only
A context.Context instance that you can use to specify a timeout for the operation or to cancel an in-flight request.
The ValidateTarget options.
The v4 UUID that uniquely identifies the target.
Possible values: 24 ≤ length ≤ 1028, Value must match regular expression
/^[a-zA-Z0-9 -]/
curl -X POST https://private.<region>.atracker.cloud.ibm.com/api/v2/targets/<target_ID>/validate -H "Authorization: Bearer <IAM_TOKEN>" -H 'accept: application/json'
validateTargetOptions := atrackerService.NewValidateTargetOptions( targetIDLink, ) target, response, err := atrackerService.ValidateTarget(validateTargetOptions) if err != nil { panic(err) } b, _ := json.MarshalIndent(target, "", " ") fmt.Println(string(b))
Response
Property values for a target in responses.
The uuid of the target resource.
Example:
f7dcfae6-e7c5-08ca-451b-fdfa696c9bb6
The name of the target resource.
Example:
a-cos-target-us-south
The crn of the target resource.
Example:
crn:v1:bluemix:public:atracker:us-south:a/11111111111111111111111111111111:b6eec08b-5201-08ca-451b-cd71523e3626:target:f7dcfae6-e7c5-08ca-451b-fdfa696c9bb6
The type of the target.
Possible values: [
cloud_object_storage
,event_streams
,logdna
,cloud_logs
]Example:
cloud_object_storage
The status of the write attempt to the target with the provided endpoint parameters.
The timestamp of the target creation time.
Example:
2021-05-18T20:15:12.353Z
The timestamp of the target last updated time.
Example:
2021-05-18T20:15:12.353Z
The API version of the target.
Example:
2
Included this optional field if you used it to create a target in a different region other than the one you are connected.
Example:
us-south
Property values for a Cloud Object Storage Endpoint in responses.
Property values for a LogDNA Endpoint in responses.
Property values for the Event Streams Endpoint in responses.
Property values for the IBM Cloud Logs endpoint in responses.
An optional message containing information about the target.
Example:
This is a valid target. However, there is another target already defined with the same target endpoint.
Property values for a target in responses.
The uuid of the target resource.
Examples:f7dcfae6-e7c5-08ca-451b-fdfa696c9bb6
The name of the target resource.
Examples:a-cos-target-us-south
The crn of the target resource.
Examples:crn:v1:bluemix:public:atracker:us-south:a/11111111111111111111111111111111:b6eec08b-5201-08ca-451b-cd71523e3626:target:f7dcfae6-e7c5-08ca-451b-fdfa696c9bb6
The type of the target.
Possible values: [
cloud_object_storage
,event_streams
,logdna
]Examples:cloud_object_storage
Included this optional field if you used it to create a target in a different region other than the one you are connected.
Examples:us-south
Property values for a Cloud Object Storage Endpoint in responses.
- CosEndpoint
The host name of the Cloud Object Storage endpoint.
Possible values: 3 ≤ length ≤ 1000, Value must match regular expression
/^[a-zA-Z0-9 -._:]+$/
Examples:s3.private.us-east.cloud-object-storage.appdomain.cloud
The CRN of the Cloud Object Storage instance.
Possible values: 3 ≤ length ≤ 1000, Value must match regular expression
/^[a-zA-Z0-9 -._:\/]+$/
Examples:crn:v1:bluemix:public:cloud-object-storage:global:a/11111111111111111111111111111111:22222222-2222-2222-2222-222222222222::
The bucket name under the Cloud Object Storage instance.
Possible values: 3 ≤ length ≤ 1000, Value must match regular expression
/^[a-zA-Z0-9 -._:\/]+$/
Examples:my-atracker-bucket
ATracker service is enabled to support service to service authentication. If service to service is enabled then set this flag is true and do not supply apikey.
Examples:true
Property values for a LogDNA Endpoint in responses.
- LogdnaEndpoint
The CRN of the LogDNA instance.
Possible values: 3 ≤ length ≤ 1000, Value must match regular expression
/^[a-zA-Z0-9 -._:\/]+$/
Examples:crn:v1:bluemix:public:logdna:us-south:a/11111111111111111111111111111111:22222222-2222-2222-2222-222222222222::
Property values for the Event Streams Endpoint in responses.
- EventstreamsEndpoint
The CRN of the Event Streams instance.
Possible values: 3 ≤ length ≤ 1000, Value must match regular expression
/^[a-zA-Z0-9 -._:\/]+$/
Examples:crn:v1:bluemix:public:messagehub:us-south:a/11111111111111111111111111111111:22222222-2222-2222-2222-222222222222::
List of broker endpoints.
Possible values: 1 ≤ length ≤ 1000, Value must match regular expression
/^[a-zA-Z0-9 -._:]+$/
The messsage hub topic defined in the Event Streams instance.
Possible values: 3 ≤ length ≤ 1000, Value must match regular expression
/^[a-zA-Z0-9 -._:\/]+$/
Examples:my-topic
The user password (api key) for the message hub topic in the Event Streams instance.
Possible values: 3 ≤ length ≤ 1000, Value must match regular expression
/^[a-zA-Z0-9 -._:\/]+$/
Examples:xxxxxxxxxxxxxx
The status of the write attempt to the target with the provided endpoint parameters.
- WriteStatus
The status such as failed or success.
Examples:success
The timestamp of the failure.
Examples:2021-05-18T20:15:12.353Z
Detailed description of the cause of the failure.
Examples:Provided API key could not be found
The timestamp of the target creation time.
Examples:2021-05-18T20:15:12.353Z
The timestamp of the target last updated time.
Examples:2021-05-18T20:15:12.353Z
An optional message containing information about the target.
Examples:This is a valid target. However, there is another target already defined with the same target endpoint.
The API version of the target.
Examples:2
Status Code
The target is successfully updated.
The request could not be understood due to malformed syntax.
Your access token is invalid or authentication of your token failed.
Your access token is valid but does not have the necessary permissions to access this resource.
The resource could not be found.
Too many requests. Please wait a few minutes and try again.
Your request could not be processed. Please try again later. If the problem persists, note the
transaction-id
in the response header and contact IBM Cloud support.
{ "id": "c3af557f-fb0e-4476-85c3-0889e7fe7bc4", "crn": "crn:v1:bluemix:public:atracker:us-south:a/6a1d10334a2e4dd197d4e301e8f87df9::target:c3af557f-fb0e-4476-85c3-0889e7fe7bc4", "target_type": "cloud_object_storage", "name": "a-cos-target-us-south", "cos_endpoint": { "endpoint": "s3.private.us-east.cloud-object-storage.appdomain.cloud", "target_crn": "crn:v1:bluemix:public:cloud-object-storage:global:a/11111111111111111111111111111111:22222222-2222-2222-2222-222222222222::", "bucket": "my-atracker-bucket", "service_to_service_enabled": false }, "write_status": { "status": "success" }, "created_at": "2022-01-27T19:22:27.293Z", "updated_at": "2022-01-27T19:22:27.293Z", "api_version": 2 }
{ "id": "c3af557f-fb0e-4476-85c3-0889e7fe7bc4", "crn": "crn:v1:bluemix:public:atracker:us-south:a/6a1d10334a2e4dd197d4e301e8f87df9::target:c3af557f-fb0e-4476-85c3-0889e7fe7bc4", "target_type": "cloud_object_storage", "name": "a-cos-target-us-south", "cos_endpoint": { "endpoint": "s3.private.us-east.cloud-object-storage.appdomain.cloud", "target_crn": "crn:v1:bluemix:public:cloud-object-storage:global:a/11111111111111111111111111111111:22222222-2222-2222-2222-222222222222::", "bucket": "my-atracker-bucket", "service_to_service_enabled": false }, "write_status": { "status": "success" }, "created_at": "2022-01-27T19:22:27.293Z", "updated_at": "2022-01-27T19:22:27.293Z", "api_version": 2 }
Create a route
Create a route to define the rule that specifies how to manage auditing events.
Create a route to define the rule that specifies how to manage auditing events.
POST /api/v2/routes
(atracker *AtrackerV2) CreateRoute(createRouteOptions *CreateRouteOptions) (result *Route, response *core.DetailedResponse, err error)
(atracker *AtrackerV2) CreateRouteWithContext(ctx context.Context, createRouteOptions *CreateRouteOptions) (result *Route, response *core.DetailedResponse, err error)
Request
Instantiate the CreateRouteOptions
struct and set the fields to provide parameter values for the CreateRoute
method.
The request payload to create a route.
The name of the route. The name must be 1000 characters or less and cannot include any special characters other than
(space) - . _ :
. Do not include any personal identifying information (PII) in any resource names.Possible values: 1 ≤ length ≤ 1000, Value must match regular expression
^[a-zA-Z0-9 -._:]+$
Example:
my-route
Routing rules that will be evaluated in their order of the array.
Possible values: 1 ≤ number of items ≤ 10
WithContext method only
A context.Context instance that you can use to specify a timeout for the operation or to cancel an in-flight request.
The CreateRoute options.
The name of the route. The name must be 1000 characters or less and cannot include any special characters other than
(space) - . _ :
. Do not include any personal identifying information (PII) in any resource names.Possible values: 1 ≤ length ≤ 1000, Value must match regular expression
/^[a-zA-Z0-9 -._:]+$/
Examples:my-route
Routing rules that will be evaluated in their order of the array.
- Rules
The target ID List. All the events will be send to all targets listed in the rule. You can include targets from other regions.
Possible values: 3 ≤ length ≤ 1000, Value must match regular expression
/^[a-zA-Z0-9 -._:]+$/
Logs from these locations will be sent to the targets specified. Locations is a superset of regions including global and *.
Possible values: 1 ≤ length ≤ 1000, Value must match regular expression
/^[a-zA-Z0-9 -._:]+$/
curl -X POST https://private.<region>.atracker.cloud.ibm.com/api/v2/routes -H "Authorization: Bearer <IAM_TOKEN>" -H 'content-type: application/json' -d '{ "name": "my-route", "rules": [ { "locations": ["us-south", "us-east", "global"], "target_ids": ["50375218-7cff-4234-bbb4-171bebab8408", "c7519d8a-5f97-498b-a229-8542f60955cd"] } ] }'
rulePrototypeModel := &atrackerv2.RulePrototype{ TargetIds: []string{targetIDLink}, Locations: []string{"us-south"}, } createRouteOptions := atrackerService.NewCreateRouteOptions( "my-route", []atrackerv2.RulePrototype{*rulePrototypeModel}, ) route, response, err := atrackerService.CreateRoute(createRouteOptions) if err != nil { panic(err) } b, _ := json.MarshalIndent(route, "", " ") fmt.Println(string(b))
Response
The route resource. The scope of the route is account wide. That means all the routes are evaluated in all regions, except the ones limited by region.
The uuid of the route resource.
Example:
c3af557f-fb0e-4476-85c3-0889e7fe7bc4
The name of the route.
Example:
my-route
The crn of the route resource.
Example:
crn:v1:bluemix:public:atracker:global:a/11111111111111111111111111111111:b6eec08b-5201-08ca-451b-cd71523e3626:route:c3af557f-fb0e-4476-85c3-0889e7fe7bc4
The routing rules that will be evaluated in their order of the array. Once a rule is matched, the remaining rules in the route definition will be skipped.
Possible values: 1 ≤ number of items ≤ 10
The timestamp of the route creation time.
Example:
2021-05-18T20:15:12.353Z
The timestamp of the route last updated time.
Example:
2021-05-18T20:15:12.353Z
The API version of the route.
Example:
2
The version of the route.
An optional message containing information about the route.
Example:
Route was created successfully.
The route resource. The scope of the route is account wide. That means all the routes are evaluated in all regions, except the ones limited by region.
The uuid of the route resource.
Examples:c3af557f-fb0e-4476-85c3-0889e7fe7bc4
The name of the route.
Examples:my-route
The crn of the route resource.
Examples:crn:v1:bluemix:public:atracker:global:a/11111111111111111111111111111111:b6eec08b-5201-08ca-451b-cd71523e3626:route:c3af557f-fb0e-4476-85c3-0889e7fe7bc4
The version of the route.
Examples:0
The routing rules that will be evaluated in their order of the array. Once a rule is matched, the remaining rules in the route definition will be skipped.
- Rules
The target ID List. All the events will be send to all targets listed in the rule. You can include targets from other regions.
Possible values: 3 ≤ length ≤ 1000, Value must match regular expression
/^[a-zA-Z0-9 -._:]+$/
Logs from these locations will be sent to the targets specified. Locations is a superset of regions including global and *.
Possible values: 3 ≤ length ≤ 1000, Value must match regular expression
/^[a-zA-Z0-9 -._:]+$/
The timestamp of the route creation time.
Examples:2021-05-18T20:15:12.353Z
The timestamp of the route last updated time.
Examples:2021-05-18T20:15:12.353Z
The API version of the route.
Examples:2
An optional message containing information about the route.
Examples:Route was created successfully.
Status Code
A route is successfully created for this region.
The request could not be understood due to malformed syntax.
Your access token is invalid or authentication of your token failed.
Your access token is valid but does not have the necessary permissions to access this resource.
Too many requests. Please wait a few minutes and try again.
Your request could not be processed. Please try again later. If the problem persists, note the
transaction-id
in the response header and contact IBM Cloud support.
{ "id": "ebd9d812-13da-461a-b772-33485e6046fe", "name": "my-route", "crn": "crn:v1:bluemix:public:atracker:global:a/08daa472aa7c4fd087506cca2a3e514e::route:ebd9d812-13da-461a-b772-33485e6046fe", "version": 0, "rules": [ { "locations": [ "us-south", "us-east", "global" ], "target_ids": [ "50375218-7cff-4234-bbb4-171bebab8408", "c7519d8a-5f97-498b-a229-8542f60955cd" ] } ], "created_at": "2022-01-26T16:05:42.728Z", "updated_at": "2022-01-26T16:05:42.728Z", "api_version": 2 }
{ "id": "ebd9d812-13da-461a-b772-33485e6046fe", "name": "my-route", "crn": "crn:v1:bluemix:public:atracker:global:a/08daa472aa7c4fd087506cca2a3e514e::route:ebd9d812-13da-461a-b772-33485e6046fe", "version": 0, "rules": [ { "locations": [ "us-south", "us-east", "global" ], "target_ids": [ "50375218-7cff-4234-bbb4-171bebab8408", "c7519d8a-5f97-498b-a229-8542f60955cd" ] } ], "created_at": "2022-01-26T16:05:42.728Z", "updated_at": "2022-01-26T16:05:42.728Z", "api_version": 2 }
List routes
List the route that is configured for an account.
List the route that is configured for an account.
GET /api/v2/routes
(atracker *AtrackerV2) ListRoutes(listRoutesOptions *ListRoutesOptions) (result *RouteList, response *core.DetailedResponse, err error)
(atracker *AtrackerV2) ListRoutesWithContext(ctx context.Context, listRoutesOptions *ListRoutesOptions) (result *RouteList, response *core.DetailedResponse, err error)
Request
No Request Parameters
WithContext method only
A context.Context instance that you can use to specify a timeout for the operation or to cancel an in-flight request.
No Request Parameters
curl -X GET https://private.<region>.atracker.cloud.ibm.com/api/v2/routes -H "Authorization: Bearer <IAM_TOKEN>" \
listRoutesOptions := atrackerService.NewListRoutesOptions() routeList, response, err := atrackerService.ListRoutes(listRoutesOptions) if err != nil { panic(err) } b, _ := json.MarshalIndent(routeList, "", " ") fmt.Println(string(b))
Response
A list of route resources.
A list of route resources.
Possible values: 0 ≤ number of items ≤ 30
A list of route resources.
A list of route resources.
- Routes
The uuid of the route resource.
Examples:c3af557f-fb0e-4476-85c3-0889e7fe7bc4
The name of the route.
Examples:my-route
The crn of the route resource.
Examples:crn:v1:bluemix:public:atracker:global:a/11111111111111111111111111111111:b6eec08b-5201-08ca-451b-cd71523e3626:route:c3af557f-fb0e-4476-85c3-0889e7fe7bc4
The version of the route.
Examples:0
The routing rules that will be evaluated in their order of the array. Once a rule is matched, the remaining rules in the route definition will be skipped.
- Rules
The target ID List. All the events will be send to all targets listed in the rule. You can include targets from other regions.
Possible values: 3 ≤ length ≤ 1000, Value must match regular expression
/^[a-zA-Z0-9 -._:]+$/
Logs from these locations will be sent to the targets specified. Locations is a superset of regions including global and *.
Possible values: 3 ≤ length ≤ 1000, Value must match regular expression
/^[a-zA-Z0-9 -._:]+$/
The timestamp of the route creation time.
Examples:2021-05-18T20:15:12.353Z
The timestamp of the route last updated time.
Examples:2021-05-18T20:15:12.353Z
The API version of the route.
Examples:2
An optional message containing information about the route.
Examples:Route was created successfully.
Status Code
List routes defined.
The request could not be understood due to malformed syntax.
Your access token is invalid or authentication of your token failed.
Your access token is valid but does not have the necessary permissions to access this resource.
Too many requests. Please wait a few minutes and try again.
Your request could not be processed. Please try again later. If the problem persists, note the
transaction-id
in the response header and contact IBM Cloud support.
{ "routes": [ { "id": "ebd9d812-13da-461a-b772-33485e6046fe", "name": "my-route", "crn": "crn:v1:bluemix:public:atracker:global:a/08daa472aa7c4fd087506cca2a3e514e::route:ebd9d812-13da-461a-b772-33485e6046fe", "version": 0, "rules": [ { "locations": [ "us-south", "us-east", "global" ], "target_ids": [ "50375218-7cff-4234-bbb4-171bebab8408", "c7519d8a-5f97-498b-a229-8542f60955cd" ] } ], "created_at": "2022-01-26T16:05:42.728Z", "updated_at": "2022-01-26T16:05:42.728Z", "api_version": 2 } ] }
{ "routes": [ { "id": "ebd9d812-13da-461a-b772-33485e6046fe", "name": "my-route", "crn": "crn:v1:bluemix:public:atracker:global:a/08daa472aa7c4fd087506cca2a3e514e::route:ebd9d812-13da-461a-b772-33485e6046fe", "version": 0, "rules": [ { "locations": [ "us-south", "us-east", "global" ], "target_ids": [ "50375218-7cff-4234-bbb4-171bebab8408", "c7519d8a-5f97-498b-a229-8542f60955cd" ] } ], "created_at": "2022-01-26T16:05:42.728Z", "updated_at": "2022-01-26T16:05:42.728Z", "api_version": 2 } ] }
Get details of a route
Get the configuration details of a route.
Get the configuration details of a route.
GET /api/v2/routes/{id}
(atracker *AtrackerV2) GetRoute(getRouteOptions *GetRouteOptions) (result *Route, response *core.DetailedResponse, err error)
(atracker *AtrackerV2) GetRouteWithContext(ctx context.Context, getRouteOptions *GetRouteOptions) (result *Route, response *core.DetailedResponse, err error)
Request
Instantiate the GetRouteOptions
struct and set the fields to provide parameter values for the GetRoute
method.
Path Parameters
The v4 UUID that uniquely identifies the route.
Possible values: 24 ≤ length ≤ 1028, Value must match regular expression
^[a-zA-Z0-9 -]
WithContext method only
A context.Context instance that you can use to specify a timeout for the operation or to cancel an in-flight request.
The GetRoute options.
The v4 UUID that uniquely identifies the route.
Possible values: 24 ≤ length ≤ 1028, Value must match regular expression
/^[a-zA-Z0-9 -]/
curl -X GET https://private.<region>.atracker.cloud.ibm.com/api/v2/routes/<route_ID> -H "Authorization: Bearer <IAM_TOKEN>" -H 'accept: application/json'
getRouteOptions := atrackerService.NewGetRouteOptions( routeIDLink, ) route, response, err := atrackerService.GetRoute(getRouteOptions) if err != nil { panic(err) } b, _ := json.MarshalIndent(route, "", " ") fmt.Println(string(b))
Response
The route resource. The scope of the route is account wide. That means all the routes are evaluated in all regions, except the ones limited by region.
The uuid of the route resource.
Example:
c3af557f-fb0e-4476-85c3-0889e7fe7bc4
The name of the route.
Example:
my-route
The crn of the route resource.
Example:
crn:v1:bluemix:public:atracker:global:a/11111111111111111111111111111111:b6eec08b-5201-08ca-451b-cd71523e3626:route:c3af557f-fb0e-4476-85c3-0889e7fe7bc4
The routing rules that will be evaluated in their order of the array. Once a rule is matched, the remaining rules in the route definition will be skipped.
Possible values: 1 ≤ number of items ≤ 10
The timestamp of the route creation time.
Example:
2021-05-18T20:15:12.353Z
The timestamp of the route last updated time.
Example:
2021-05-18T20:15:12.353Z
The API version of the route.
Example:
2
The version of the route.
An optional message containing information about the route.
Example:
Route was created successfully.
The route resource. The scope of the route is account wide. That means all the routes are evaluated in all regions, except the ones limited by region.
The uuid of the route resource.
Examples:c3af557f-fb0e-4476-85c3-0889e7fe7bc4
The name of the route.
Examples:my-route
The crn of the route resource.
Examples:crn:v1:bluemix:public:atracker:global:a/11111111111111111111111111111111:b6eec08b-5201-08ca-451b-cd71523e3626:route:c3af557f-fb0e-4476-85c3-0889e7fe7bc4
The version of the route.
Examples:0
The routing rules that will be evaluated in their order of the array. Once a rule is matched, the remaining rules in the route definition will be skipped.
- Rules
The target ID List. All the events will be send to all targets listed in the rule. You can include targets from other regions.
Possible values: 3 ≤ length ≤ 1000, Value must match regular expression
/^[a-zA-Z0-9 -._:]+$/
Logs from these locations will be sent to the targets specified. Locations is a superset of regions including global and *.
Possible values: 3 ≤ length ≤ 1000, Value must match regular expression
/^[a-zA-Z0-9 -._:]+$/
The timestamp of the route creation time.
Examples:2021-05-18T20:15:12.353Z
The timestamp of the route last updated time.
Examples:2021-05-18T20:15:12.353Z
The API version of the route.
Examples:2
An optional message containing information about the route.
Examples:Route was created successfully.
Status Code
Retrieve a route.
The request could not be understood due to malformed syntax.
Your access token is invalid or authentication of your token failed.
Your access token is valid but does not have the necessary permissions to access this resource.
The resource could not be found.
Too many requests. Please wait a few minutes and try again.
Your request could not be processed. Please try again later. If the problem persists, note the
transaction-id
in the response header and contact IBM Cloud support.
{ "id": "ebd9d812-13da-461a-b772-33485e6046fe", "name": "my-route", "crn": "crn:v1:bluemix:public:atracker:global:a/08daa472aa7c4fd087506cca2a3e514e::route:ebd9d812-13da-461a-b772-33485e6046fe", "version": 0, "rules": [ { "locations": [ "us-south", "us-east", "global" ], "target_ids": [ "50375218-7cff-4234-bbb4-171bebab8408", "c7519d8a-5f97-498b-a229-8542f60955cd" ] } ], "created_at": "2022-01-26T16:05:42.728Z", "updated_at": "2022-01-26T16:05:42.728Z", "api_version": 2 }
{ "id": "ebd9d812-13da-461a-b772-33485e6046fe", "name": "my-route", "crn": "crn:v1:bluemix:public:atracker:global:a/08daa472aa7c4fd087506cca2a3e514e::route:ebd9d812-13da-461a-b772-33485e6046fe", "version": 0, "rules": [ { "locations": [ "us-south", "us-east", "global" ], "target_ids": [ "50375218-7cff-4234-bbb4-171bebab8408", "c7519d8a-5f97-498b-a229-8542f60955cd" ] } ], "created_at": "2022-01-26T16:05:42.728Z", "updated_at": "2022-01-26T16:05:42.728Z", "api_version": 2 }
Update a route
Update the configuration details of a route.
Update the configuration details of a route.
PUT /api/v2/routes/{id}
(atracker *AtrackerV2) ReplaceRoute(replaceRouteOptions *ReplaceRouteOptions) (result *Route, response *core.DetailedResponse, err error)
(atracker *AtrackerV2) ReplaceRouteWithContext(ctx context.Context, replaceRouteOptions *ReplaceRouteOptions) (result *Route, response *core.DetailedResponse, err error)
Request
Instantiate the ReplaceRouteOptions
struct and set the fields to provide parameter values for the ReplaceRoute
method.
Path Parameters
The v4 UUID that uniquely identifies the route.
Possible values: 24 ≤ length ≤ 1028, Value must match regular expression
^[a-zA-Z0-9 -]
The request payload to create a route.
The name of the route. The name must be 1000 characters or less and cannot include any special characters other than
(space) - . _ :
. Do not include any personal identifying information (PII) in any resource names.Possible values: 1 ≤ length ≤ 1000, Value must match regular expression
^[a-zA-Z0-9 -._:]+$
Example:
my-route
Routing rules that will be evaluated in their order of the array.
Possible values: 1 ≤ number of items ≤ 10
WithContext method only
A context.Context instance that you can use to specify a timeout for the operation or to cancel an in-flight request.
The ReplaceRoute options.
The v4 UUID that uniquely identifies the route.
Possible values: 24 ≤ length ≤ 1028, Value must match regular expression
/^[a-zA-Z0-9 -]/
The name of the route. The name must be 1000 characters or less and cannot include any special characters other than
(space) - . _ :
. Do not include any personal identifying information (PII) in any resource names.Possible values: 1 ≤ length ≤ 1000, Value must match regular expression
/^[a-zA-Z0-9 -._:]+$/
Examples:my-route
Routing rules that will be evaluated in their order of the array.
- Rules
The target ID List. All the events will be send to all targets listed in the rule. You can include targets from other regions.
Possible values: 3 ≤ length ≤ 1000, Value must match regular expression
/^[a-zA-Z0-9 -._:]+$/
Logs from these locations will be sent to the targets specified. Locations is a superset of regions including global and *.
Possible values: 1 ≤ length ≤ 1000, Value must match regular expression
/^[a-zA-Z0-9 -._:]+$/
curl -X PUT https://private.<region>.atracker.cloud.ibm.com/api/v2/routes/<route_ID> -H "Authorization: Bearer <IAM_TOKEN>" -H 'accept: application/json' -d '{ "name": "a-new-name", "rules": [ { "locations": ["us-south", "us-east", "global"], "target_ids": ["50375218-7cff-4234-bbb4-171bebab8408", "c7519d8a-5f97-498b-a229-8542f60955cd"] } ] }'
rulePrototypeModel := &atrackerv2.RulePrototype{ TargetIds: []string{targetIDLink}, Locations: []string{"us-south"}, } replaceRouteOptions := atrackerService.NewReplaceRouteOptions( routeIDLink, "my-route", []atrackerv2.RulePrototype{*rulePrototypeModel}, ) route, response, err := atrackerService.ReplaceRoute(replaceRouteOptions) if err != nil { panic(err) } b, _ := json.MarshalIndent(route, "", " ") fmt.Println(string(b))
Response
The route resource. The scope of the route is account wide. That means all the routes are evaluated in all regions, except the ones limited by region.
The uuid of the route resource.
Example:
c3af557f-fb0e-4476-85c3-0889e7fe7bc4
The name of the route.
Example:
my-route
The crn of the route resource.
Example:
crn:v1:bluemix:public:atracker:global:a/11111111111111111111111111111111:b6eec08b-5201-08ca-451b-cd71523e3626:route:c3af557f-fb0e-4476-85c3-0889e7fe7bc4
The routing rules that will be evaluated in their order of the array. Once a rule is matched, the remaining rules in the route definition will be skipped.
Possible values: 1 ≤ number of items ≤ 10
The timestamp of the route creation time.
Example:
2021-05-18T20:15:12.353Z
The timestamp of the route last updated time.
Example:
2021-05-18T20:15:12.353Z
The API version of the route.
Example:
2
The version of the route.
An optional message containing information about the route.
Example:
Route was created successfully.
The route resource. The scope of the route is account wide. That means all the routes are evaluated in all regions, except the ones limited by region.
The uuid of the route resource.
Examples:c3af557f-fb0e-4476-85c3-0889e7fe7bc4
The name of the route.
Examples:my-route
The crn of the route resource.
Examples:crn:v1:bluemix:public:atracker:global:a/11111111111111111111111111111111:b6eec08b-5201-08ca-451b-cd71523e3626:route:c3af557f-fb0e-4476-85c3-0889e7fe7bc4
The version of the route.
Examples:0
The routing rules that will be evaluated in their order of the array. Once a rule is matched, the remaining rules in the route definition will be skipped.
- Rules
The target ID List. All the events will be send to all targets listed in the rule. You can include targets from other regions.
Possible values: 3 ≤ length ≤ 1000, Value must match regular expression
/^[a-zA-Z0-9 -._:]+$/
Logs from these locations will be sent to the targets specified. Locations is a superset of regions including global and *.
Possible values: 3 ≤ length ≤ 1000, Value must match regular expression
/^[a-zA-Z0-9 -._:]+$/
The timestamp of the route creation time.
Examples:2021-05-18T20:15:12.353Z
The timestamp of the route last updated time.
Examples:2021-05-18T20:15:12.353Z
The API version of the route.
Examples:2
An optional message containing information about the route.
Examples:Route was created successfully.
Status Code
The route was successfully updated.
The request could not be understood due to malformed syntax.
Your access token is invalid or authentication of your token failed.
Your access token is valid but does not have the necessary permissions to access this resource.
The resource could not be found.
Too many requests. Please wait a few minutes and try again.
Your request could not be processed. Please try again later. If the problem persists, note the
transaction-id
in the response header and contact IBM Cloud support.
{ "id": "c3af557f-fb0e-4476-85c3-0889e7fe7bc4", "name": "my-route-01", "crn": "crn:v1:bluemix:public:atracker:global:a/6a1d10334a2e4dd197d4e301e8f87df9::route:c3af557f-fb0e-4476-85c3-0889e7fe7bc4", "version": 3, "rules": [ { "locations": [ "us-south", "us-east", "global" ], "target_ids": [ "50375218-7cff-4234-bbb4-171bebab8408", "c7519d8a-5f97-498b-a229-8542f60955cd" ] } ], "created_at": "2022-01-26T17:18:02.487Z", "updated_at": "2022-01-26T17:59:29.763Z", "api_version": 2 }
{ "id": "c3af557f-fb0e-4476-85c3-0889e7fe7bc4", "name": "my-route-01", "crn": "crn:v1:bluemix:public:atracker:global:a/6a1d10334a2e4dd197d4e301e8f87df9::route:c3af557f-fb0e-4476-85c3-0889e7fe7bc4", "version": 3, "rules": [ { "locations": [ "us-south", "us-east", "global" ], "target_ids": [ "50375218-7cff-4234-bbb4-171bebab8408", "c7519d8a-5f97-498b-a229-8542f60955cd" ] } ], "created_at": "2022-01-26T17:18:02.487Z", "updated_at": "2022-01-26T17:59:29.763Z", "api_version": 2 }
Delete a route
Deletes a route.
Deletes a route.
DELETE /api/v2/routes/{id}
(atracker *AtrackerV2) DeleteRoute(deleteRouteOptions *DeleteRouteOptions) (response *core.DetailedResponse, err error)
(atracker *AtrackerV2) DeleteRouteWithContext(ctx context.Context, deleteRouteOptions *DeleteRouteOptions) (response *core.DetailedResponse, err error)
Request
Instantiate the DeleteRouteOptions
struct and set the fields to provide parameter values for the DeleteRoute
method.
Path Parameters
The v4 UUID that uniquely identifies the route.
Possible values: 24 ≤ length ≤ 1028, Value must match regular expression
^[a-zA-Z0-9 -]
WithContext method only
A context.Context instance that you can use to specify a timeout for the operation or to cancel an in-flight request.
The DeleteRoute options.
The v4 UUID that uniquely identifies the route.
Possible values: 24 ≤ length ≤ 1028, Value must match regular expression
/^[a-zA-Z0-9 -]/
curl -X DELETE https://private.<region>.atracker.cloud.ibm.com/api/v2/routes/<route_ID> -H "Authorization: Bearer <IAM_TOKEN>" -H 'accept: application/json'
deleteRouteOptions := atrackerService.NewDeleteRouteOptions( routeIDLink, ) response, err := atrackerService.DeleteRoute(deleteRouteOptions) if err != nil { panic(err) } if response.StatusCode != 204 { fmt.Printf("\nUnexpected response status code received from DeleteRoute(): %d\n", response.StatusCode) }
Response
Status Code
The route is successfully deleted.
The request could not be understood due to malformed syntax.
Your access token is invalid or authentication of your token failed.
Your access token is valid but does not have the necessary permissions to access this resource.
The resource could not be found.
Too many requests. Please wait a few minutes and try again.
Your request could not be processed. Please try again later. If the problem persists, note the
transaction-id
in the response header and contact IBM Cloud support.
No Sample Response
Get settings
Get information about the current settings including default targets.
Get information about the current settings including default targets.
GET /api/v2/settings
(atracker *AtrackerV2) GetSettings(getSettingsOptions *GetSettingsOptions) (result *Settings, response *core.DetailedResponse, err error)
(atracker *AtrackerV2) GetSettingsWithContext(ctx context.Context, getSettingsOptions *GetSettingsOptions) (result *Settings, response *core.DetailedResponse, err error)
Request
No Request Parameters
WithContext method only
A context.Context instance that you can use to specify a timeout for the operation or to cancel an in-flight request.
No Request Parameters
curl -X GET https://private.<region>.atracker.cloud.ibm.com/api/v2/settings -H "Authorization: Bearer <IAM_TOKEN>" \
getSettingsOptions := atrackerService.NewGetSettingsOptions() settings, response, err := atrackerService.GetSettings(getSettingsOptions) if err != nil { panic(err) } b, _ := json.MarshalIndent(settings, "", " ") fmt.Println(string(b))
Response
Activity Tracker Event Routing settings response
The target ID List. In the event that no routing rule causes the event to be sent to a target, these targets will receive the event.
Possible values: 3 ≤ length ≤ 1028, Value must match regular expression
^[a-zA-Z0-9 -]
If present then only these regions may be used to define a target.
Possible values: 3 ≤ length ≤ 1028, Value must match regular expression
^[a-zA-Z0-9 -_]
To store all your meta data in a single region.
Possible values: 3 ≤ length ≤ 256, Value must match regular expression
^[a-zA-Z0-9 -_]
Example:
us-south
If you set this true then you cannot access api through public network.
API version used for configuring IBM Cloud Activity Tracker Event Routing resources in the account.
Example:
2
To store all your meta data in a backup region.
Possible values: 3 ≤ length ≤ 256, Value must match regular expression
^[a-zA-Z0-9 -_]
Example:
eu-de
An optional message containing information about the audit log locations.
Example:
The route and target audit logs can be found in the metadata primary region and everything else can be found in the region it is being called from.
Activity Tracker Event Routing settings response.
The target ID List. In the event that no routing rule causes the event to be sent to a target, these targets will receive the event.
Possible values: 3 ≤ length ≤ 1028, Value must match regular expression
/^[a-zA-Z0-9 -]/
If present then only these regions may be used to define a target.
Possible values: 3 ≤ length ≤ 1028, Value must match regular expression
/^[a-zA-Z0-9 -_]/
To store all your meta data in a single region.
Possible values: 3 ≤ length ≤ 256, Value must match regular expression
/^[a-zA-Z0-9 -_]/
Examples:us-south
To store all your meta data in a backup region.
Possible values: 3 ≤ length ≤ 256, Value must match regular expression
/^[a-zA-Z0-9 -_]/
Examples:eu-de
If you set this true then you cannot access api through public network.
Examples:false
API version used for configuring IBM Cloud Activity Tracker Event Routing resources in the account.
Examples:2
An optional message containing information about the audit log locations.
Examples:The route and target audit logs can be found in the metadata primary region and everything else can be found in the region it is being called from.
Status Code
Get atracker service settings
The request could not be understood due to malformed syntax.
Your access token is invalid or authentication of your token failed.
Your access token is valid but does not have the necessary permissions to access this resource.
Too many requests. Please wait a few minutes and try again.
Your request could not be processed. Please try again later. If the problem persists, note the
transaction-id
in the response header and contact IBM Cloud support.
{ "default_targets": [ "50375218-7cff-4234-bbb4-171bebab8408", "c7519d8a-5f97-498b-a229-8542f60955cd" ], "permitted_target_regions": [ "us-south", "us-east" ], "metadata_region_primary": "us-south", "private_api_endpoint_only": false, "api_version": 2 }
{ "default_targets": [ "50375218-7cff-4234-bbb4-171bebab8408", "c7519d8a-5f97-498b-a229-8542f60955cd" ], "permitted_target_regions": [ "us-south", "us-east" ], "metadata_region_primary": "us-south", "private_api_endpoint_only": false, "api_version": 2 }
Modify settings
Modify the current settings such as default targets, permitted target regions, metadata region primary and secondary.
Modify the current settings such as default targets, permitted target regions, metadata region primary and secondary.
PUT /api/v2/settings
(atracker *AtrackerV2) PutSettings(putSettingsOptions *PutSettingsOptions) (result *Settings, response *core.DetailedResponse, err error)
(atracker *AtrackerV2) PutSettingsWithContext(ctx context.Context, putSettingsOptions *PutSettingsOptions) (result *Settings, response *core.DetailedResponse, err error)
Request
Instantiate the PutSettingsOptions
struct and set the fields to provide parameter values for the PutSettings
method.
Activity Tracker Event Routing settings request
To store all your meta data in a single region.
Possible values: 3 ≤ length ≤ 256, Value must match regular expression
^[a-zA-Z0-9 -_]
Example:
us-south
If you set this true then you cannot access api through public network.
The target ID List. In the event that no routing rule causes the event to be sent to a target, these targets will receive the event.
Possible values: 3 ≤ length ≤ 1028, Value must match regular expression
^[a-zA-Z0-9 -]
If present then only these regions may be used to define a target.
Possible values: 3 ≤ length ≤ 1028, Value must match regular expression
^[a-zA-Z0-9 -_]
To store all your meta data in a backup region.
Possible values: 3 ≤ length ≤ 256, Value must match regular expression
^[a-zA-Z0-9 -_]
Example:
eu-de
WithContext method only
A context.Context instance that you can use to specify a timeout for the operation or to cancel an in-flight request.
The PutSettings options.
To store all your meta data in a single region.
Possible values: 3 ≤ length ≤ 256, Value must match regular expression
/^[a-zA-Z0-9 -_]/
Examples:us-south
If you set this true then you cannot access api through public network.
Examples:false
The target ID List. In the event that no routing rule causes the event to be sent to a target, these targets will receive the event.
Possible values: 3 ≤ length ≤ 1028, Value must match regular expression
/^[a-zA-Z0-9 -]/
If present then only these regions may be used to define a target.
Possible values: 3 ≤ length ≤ 1028, Value must match regular expression
/^[a-zA-Z0-9 -_]/
To store all your meta data in a backup region.
Possible values: 3 ≤ length ≤ 256, Value must match regular expression
/^[a-zA-Z0-9 -_]/
Examples:eu-de
curl -X PUT https://private.<region>.atracker.cloud.ibm.com/api/v2/settings -H "Authorization: Bearer <IAM_TOKEN>" -H 'accept: application/json' -d '{ "default_targets": ["50375218-7cff-4234-bbb4-171bebab8408", "c7519d8a-5f97-498b-a229-8542f60955cd"], "permitted_target_regions": ["us-south", "us-east"], "metadata_region_primary": "us-south", "private_api_endpoint_only": false }'
putSettingsOptions := atrackerService.NewPutSettingsOptions( "us-south", false, ) settings, response, err := atrackerService.PutSettings(putSettingsOptions) if err != nil { panic(err) } b, _ := json.MarshalIndent(settings, "", " ") fmt.Println(string(b))
Response
Activity Tracker Event Routing settings response
The target ID List. In the event that no routing rule causes the event to be sent to a target, these targets will receive the event.
Possible values: 3 ≤ length ≤ 1028, Value must match regular expression
^[a-zA-Z0-9 -]
If present then only these regions may be used to define a target.
Possible values: 3 ≤ length ≤ 1028, Value must match regular expression
^[a-zA-Z0-9 -_]
To store all your meta data in a single region.
Possible values: 3 ≤ length ≤ 256, Value must match regular expression
^[a-zA-Z0-9 -_]
Example:
us-south
If you set this true then you cannot access api through public network.
API version used for configuring IBM Cloud Activity Tracker Event Routing resources in the account.
Example:
2
To store all your meta data in a backup region.
Possible values: 3 ≤ length ≤ 256, Value must match regular expression
^[a-zA-Z0-9 -_]
Example:
eu-de
An optional message containing information about the audit log locations.
Example:
The route and target audit logs can be found in the metadata primary region and everything else can be found in the region it is being called from.
Activity Tracker Event Routing settings response.
The target ID List. In the event that no routing rule causes the event to be sent to a target, these targets will receive the event.
Possible values: 3 ≤ length ≤ 1028, Value must match regular expression
/^[a-zA-Z0-9 -]/
If present then only these regions may be used to define a target.
Possible values: 3 ≤ length ≤ 1028, Value must match regular expression
/^[a-zA-Z0-9 -_]/
To store all your meta data in a single region.
Possible values: 3 ≤ length ≤ 256, Value must match regular expression
/^[a-zA-Z0-9 -_]/
Examples:us-south
To store all your meta data in a backup region.
Possible values: 3 ≤ length ≤ 256, Value must match regular expression
/^[a-zA-Z0-9 -_]/
Examples:eu-de
If you set this true then you cannot access api through public network.
Examples:false
API version used for configuring IBM Cloud Activity Tracker Event Routing resources in the account.
Examples:2
An optional message containing information about the audit log locations.
Examples:The route and target audit logs can be found in the metadata primary region and everything else can be found in the region it is being called from.
Status Code
The settings is successfully modified.
The request could not be understood due to malformed syntax.
Your access token is invalid or authentication of your token failed.
Your access token is valid but does not have the necessary permissions to access this resource.
Too many requests. Please wait a few minutes and try again.
Your request could not be processed. Please try again later. If the problem persists, note the
transaction-id
in the response header and contact IBM Cloud support.
{ "default_targets": [ "50375218-7cff-4234-bbb4-171bebab8408", "c7519d8a-5f97-498b-a229-8542f60955cd" ], "permitted_target_regions": [ "us-south", "us-east" ], "metadata_region_primary": "us-south", "private_api_endpoint_only": false, "api_version": 2 }
{ "default_targets": [ "50375218-7cff-4234-bbb4-171bebab8408", "c7519d8a-5f97-498b-a229-8542f60955cd" ], "permitted_target_regions": [ "us-south", "us-east" ], "metadata_region_primary": "us-south", "private_api_endpoint_only": false, "api_version": 2 }