IBM Cloud API Docs

Introduction

This information applies only if you use IBM Cloud® Activity Tracker Event Routing.

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.

Table 1. Status codes
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)

Authorization

To call this method, you must be assigned one or more IAM access roles that include the following action. You can check your access by going to Users > User > Access.

  • atracker.target.create

Auditing

Calling this method generates the following auditing event.

  • atracker.target.create

Request

Instantiate the CreateTargetOptions struct and set the fields to provide parameter values for the CreateTarget method.

The request payload to create a target.

WithContext method only

The CreateTarget options.

  • 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.

Property values for a target in responses.

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.

Example responses
  • {
      "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)

Authorization

To call this method, you must be assigned one or more IAM access roles that include the following action. You can check your access by going to Users > User > Access.

  • atracker.target.list

Auditing

Calling this method generates the following auditing event.

  • atracker.target.list

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

The ListTargets options.

  • 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.

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.

Example responses
  • {
      "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)

Authorization

To call this method, you must be assigned one or more IAM access roles that include the following action. You can check your access by going to Users > User > Access.

  • atracker.target.get

Auditing

Calling this method generates the following auditing event.

  • atracker.target.get

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

The GetTarget options.

  • 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.

Property values for a target in responses.

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.

Example responses
  • {
      "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)

Authorization

To call this method, you must be assigned one or more IAM access roles that include the following action. You can check your access by going to Users > User > Access.

  • atracker.target.update

Auditing

Calling this method generates the following auditing event.

  • atracker.target.update

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.

WithContext method only

The ReplaceTarget options.

  • 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.

Property values for a target in responses.

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.

Example responses
  • {
      "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)

Authorization

To call this method, you must be assigned one or more IAM access roles that include the following action. You can check your access by going to Users > User > Access.

  • atracker.target.delete

Auditing

Calling this method generates the following auditing event.

  • atracker.target.delete

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

The DeleteTarget options.

  • 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.

Description of a warning that occurred in a service request.

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.

Example responses
  • {
      "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)

Authorization

To call this method, you must be assigned one or more IAM access roles that include the following action. You can check your access by going to Users > User > Access.

  • atracker.target.update

Auditing

Calling this method generates the following auditing event.

  • atracker.target.update

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

The ValidateTarget options.

  • 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.

Property values for a target in responses.

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.

Example responses
  • {
      "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)

Authorization

To call this method, you must be assigned one or more IAM access roles that include the following action. You can check your access by going to Users > User > Access.

  • atracker.route.create

Auditing

Calling this method generates the following auditing event.

  • atracker.route.create

Request

Instantiate the CreateRouteOptions struct and set the fields to provide parameter values for the CreateRoute method.

The request payload to create a route.

WithContext method only

The CreateRoute options.

  • 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 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.

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.

Example responses
  • {
      "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)

Authorization

To call this method, you must be assigned one or more IAM access roles that include the following action. You can check your access by going to Users > User > Access.

  • atracker.route.list

Auditing

Calling this method generates the following auditing event.

  • atracker.route.list

Request

No Request Parameters

This method does not accept any request parameters.

WithContext method only

No Request Parameters

This method does not accept any 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.

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.

Example responses
  • {
      "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)

Authorization

To call this method, you must be assigned one or more IAM access roles that include the following action. You can check your access by going to Users > User > Access.

  • atracker.route.get

Auditing

Calling this method generates the following auditing event.

  • atracker.route.get

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

The GetRoute options.

  • 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 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.

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.

Example responses
  • {
      "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)

Authorization

To call this method, you must be assigned one or more IAM access roles that include the following action. You can check your access by going to Users > User > Access.

  • atracker.route.update

Auditing

Calling this method generates the following auditing event.

  • atracker.route.update

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.

WithContext method only

The ReplaceRoute options.

  • 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 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.

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.

Example responses
  • {
      "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)

Authorization

To call this method, you must be assigned one or more IAM access roles that include the following action. You can check your access by going to Users > User > Access.

  • atracker.route.delete

Auditing

Calling this method generates the following auditing event.

  • atracker.route.delete

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

The DeleteRoute options.

  • 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

This method does not specify any sample responses.

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)

Authorization

To call this method, you must be assigned one or more IAM access roles that include the following action. You can check your access by going to Users > User > Access.

  • atracker.setting.get

Auditing

Calling this method generates the following auditing event.

  • atracker.setting.get

Request

No Request Parameters

This method does not accept any request parameters.

WithContext method only

No Request Parameters

This method does not accept any 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

Activity Tracker Event Routing settings response.

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.

Example responses
  • {
      "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)

Authorization

To call this method, you must be assigned one or more IAM access roles that include the following action. You can check your access by going to Users > User > Access.

  • atracker.setting.set

Auditing

Calling this method generates the following auditing event.

  • atracker.setting.set

Request

Instantiate the PutSettingsOptions struct and set the fields to provide parameter values for the PutSettings method.

Activity Tracker Event Routing settings request

WithContext method only

The PutSettings options.

  • 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

Activity Tracker Event Routing settings response.

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.

Example responses
  • {
      "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
    }
id=curlclassName=tab-item-selected