IBM Cloud API Docs

Introduction

IBM Cloud App Configuration is a centralized feature management and configuration service for use with web and mobile applications, microservices, and distributed environments.

Instrument your applications with App Configuration SDKs, and use the App Configuration dashboard or App Configuration administrator API to define features flags, which are organized into collections and targeted to segments. Change feature flag states in the cloud to activate or deactivate features in your application or environment, often without restarting.

  • App Owners - Roll out features by segment and independent from code deployments.
  • Developers - Reduce source code branch complexity and troublesome merges by including untested or unfinished features behind a feature flag in your master branch.
  • Testers - Increase confidence that new features will smoothly transition to production by testing there. Use flags to activate untested features only for testers and QA personnel until it's time to release.

Before you begin

Make sure that you have access to a paid IBM Cloud account.

SDKs

For more information about installation and technical concepts, see the 'README' document in the SDK.

Table 1. List of App Configuration server, client, and admin SDKs
Server SDKs Client SDKs Admin SDKs
Node SDK
Documentation
Android SDK
Documentation
Go Admin SDK
Python SDK
Documentation
JavaScript SDK
Documentation
Go SDK
Documentation
React SDK
Documentation
Java SDK
Documentation

Installing the Go SDK

Go modules (recommended): Add the following import in your code, and then run go build or go mod tidy

import (
  "github.com/IBM/appconfiguration-go-admin-sdk/appconfigurationv1"
)

Go get

go get -u github.com/IBM/appconfiguration-go-admin-sdk

View on GitHub

Endpoint URLs

The following URLs represents the base URLs for the App Configuration API endpoints. When you call the API, use the URL that corresponds to the region where your service instance is deployed. Add the path for each method to form the complete API endpoint for your requests.

  • Dallas: https://us-south.apprapp.cloud.ibm.com/apprapp/feature/v1/instances/{guid}
  • Washington DC: https://us-east.apprapp.cloud.ibm.com/apprapp/feature/v1/instances/{guid}
  • London: https://eu-gb.apprapp.cloud.ibm.com/apprapp/feature/v1/instances/{guid}
  • Sydney: https://au-syd.apprapp.cloud.ibm.com/apprapp/feature/v1/instances/{guid}

If you have enabled service endpoints in your account, you can send API requests over the IBM Cloud® private network at the following base endpoint URLs.

  • Dallas: https://private.us-south.apprapp.cloud.ibm.com/apprapp/feature/v1/instances/{guid}
  • Washington DC: https://private.us-east.apprapp.cloud.ibm.com/apprapp/feature/v1/instances/{guid}
  • London: https://private.eu-gb.apprapp.cloud.ibm.com/apprapp/feature/v1/instances/{guid}
  • Sydney: https://private.au-syd.apprapp.cloud.ibm.com/apprapp/feature/v1/instances/{guid}

The following table details the location where the App Configuration actions run, data stored and replicated:

Table 2. Location where App Configuration actions run, data storage and replication
Location Location where App Configuration actions run Data is stored in Data is replicated to
Dallas All App Configuration actions run in the Dallas (us-south) location. All metadata for the app's features are stored in the Dallas (us-south) location. Data is replicated between three zones within us-south for high-availability.
Washington DC All App Configuration actions run in the Washington DC (us-east) location. All metadata for the app's features are stored in the Washington DC (us-east) location. Data is replicated between three zones within us-east for high-availability.
London All App Configuration actions run in the London (eu-gb) location. All metadata for the app's features are stored in the London (eu-gb) location. Data is replicated between three zones within eu-gb for high-availability.
Sydney All App Configuration actions run in the Sydney (au-syd) location. All metadata for the app's features are stored in the Sydney (au-syd) location. Data is replicated between three zones within au-syd for high-availability.

Base URL

https://{region}.apprapp.cloud.ibm.com/apprapp/feature/v1/instances/{guid}

Example request to a Dallas endpoint:

curl -H "Authorization:Bearer {token}" -X "https://us-south.apprapp.cloud.ibm.com/apprapp/feature/v1/instances/{guid}"

Replace {token} and {guid} in this example with the values for your particular API call.

Example request to a Dallas endpoint:

import (
    "encoding/json"
    "fmt"
    "github.com/IBM/go-sdk-core/v5/core"
    ac "github.com/IBM/appconfiguration-go-admin-sdk/appconfigurationv1"
)

func main() {

    appConfigurationService, err := ac.NewAppConfigurationV1(&ac.AppConfigurationV1Options {
        URL: "https://us-south.apprapp.cloud.ibm.com/apprapp/feature/v1/instances/{guid}",
        Authenticator: & core.IamAuthenticator {
            ApiKey: "<API_KEY>",
        },
    })

    if err != nil {
        panic(err)
    }
}

Authentication

Authorization to the App Configuration API is enforced by using an IBM Cloud Identity and Access Management (IAM) access token. The token is used to determine the actions that a user or service ID has access to when they use the API.

To work with the API, include a valid IAM token in each outgoing request to the service. You can generate an access token by first creating an API key and then exchanging your API key for an IBM Cloud IAM token. By default, the IAM access token have a lifetime of 60 minutes. See Managing access token expiration to decrease the IAM access token lifetime.

Don't have an API key? Try running ibmcloud iam oauth-tokens in the IBM Cloud Shell to quickly generate a personal access token.

When you use the SDK, configure an IAM authenticator with an IBM Cloud IAM API key. The authenticator automatically obtains the IAM access token for the API key and includes it with each request. You can configure an authenticator in either of two ways:

  • Programmatically by constructing an IAM authenticator instance and supplying your IAM API key.
  • By defining the API key in external configuration properties and then using the SDK authenticator factory to construct an IAM authenticator that uses the configured IAM API key.

For more information, see the Authentication section of the IBM Cloud SDK Common documentation.

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 Assigning access to account management services.

To retrieve your access token:

curl -X POST   "https://iam.cloud.ibm.com/identity/token"   --header 'Content-Type: application/x-www-form-urlencoded'   --header 'Accept: application/json'   --data-urlencode 'grant_type=urn:ibm:params:oauth:grant-type:apikey'   --data-urlencode 'apikey={API_KEY}'

Replace {API_KEY} with your IAM API key.

Setting client options through external configuration

Example environment variables, where {SERVICE_URL} is the endpoint URL and {API_KEY} is your IAM API key

export APP_CONFIGURATION_URL={SERVICE_URL}
export APP_CONFIGURATION_AUTH_TYPE=iam
export APP_CONFIGURATION_APIKEY={API_KEY}

Example of constructing the service client

import {
     ac "github.com/IBM/appconfiguration-go-admin-sdk/appconfigurationv1"
}
...
serviceClientOptions := &ac.AppConfigurationV1Options{}
serviceClient, err := ac.NewAppConfigurationV1UsingExternalConfig(serviceClientOptions)

Auditing

You can monitor API activity within your account by using the IBM Cloud Activity Tracker service. Whenever an API method is called, an event is generated that you can then track and audit from within Activity Tracker. The specific event type is listed for each individual method.

For more information about how to track App Configuration activity, see Auditing events for App Configuration.

Error handling

This API uses standard HTTP response codes to indicate whether a method completed successfully. A 2xx response always indicates success. A 4xx type response is some sort of failure, and a 5xx type response usually indicates an internal system error.

Table 3. List of HTTP response codes
HTTP status code Description Recovery
200 Success The request was successful.
201 Success The resource was successfully created and added to your IBM Cloud account.
400 Bad Request The input parameters in the request body are either incomplete or in the wrong format. Be sure to include all required parameters in your request.
401 Unauthorized You are not authorized to make this request. Log in to IBM Cloud and try again. If this error persists, contact the account owner to check your permissions.
403 Forbidden The supplied authentication is not authorized to access the apps. Check that you have the correct access credentials and permissions.
404 Not Found The requested resource could not be found.
408 Request timeout The connection to the server timed out. Wait a few minutes, then try again.
409 Conflict The entity is already in the requested state.
429 Too Many Requests Too many requests have been made within a time window. Wait before calling the API again.
500 Internal Server Error IBM Cloud App Configuration is not available. Your request could not be processed. Wait a few minutes and try again. If you still encounter this problem, note the incident ID and contact IBM Cloud support.
503 Service Temporarily Unavailable IBM Cloud App Configuration could not process the request, due to a temporary overloading or maintenance. Try to reduce your request rate, or retry after a few minutes. If the error persists, contact IBM Cloud support.

Example error handling

import ac "github.com/IBM/appconfiguration-go-admin-sdk/appconfigurationv1"

// Instantiate a service
appConfigurationService, err := ac.NewAppConfigurationV1(&ac.AppConfigurationV1Options)

// Check for errors
if err != nil {
  panic(err)
}

// Call a method
result, response, err := appConfigurationService.MethodName(&methodOptions)

// Check for errors
if err != nil {
  panic(err)
}

Methods

Get list of Environments

List all the environments in the App Configuration service instance.

List all the environments in the App Configuration service instance.

GET /environments
(appConfiguration *AppConfigurationV1) ListEnvironments(listEnvironmentsOptions *ListEnvironmentsOptions) (result *EnvironmentList, response *core.DetailedResponse, err error)
(appConfiguration *AppConfigurationV1) ListEnvironmentsWithContext(ctx context.Context, listEnvironmentsOptions *ListEnvironmentsOptions) (result *EnvironmentList, 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.

  • apprapp.environments.list

Auditing

Calling this method generates the following auditing event.

  • apprapp.environments.list

Request

Instantiate the ListEnvironmentsOptions struct and set the fields to provide parameter values for the ListEnvironments method.

Query Parameters

  • If set to true, returns expanded view of the resource details.

    Example: true

  • Sort the environment details based on the specified attribute. By default, items are sorted by name.

    Allowable values: [created_time,updated_time,id,name]

    Example: created_time

  • Filter the resources to be returned based on the associated tags. Specify the parameter as a list of comma separated tags. Returns resources associated with any of the specified tags.

    Example: version 1.1,pre-release

  • Include feature, property, snapshots details in the response.

    Allowable values: [features,properties,snapshots]

    Examples:
    View
  • The number of records to retrieve. By default, the list operation return the first 10 records. To retrieve different set of records, use limit with offset to page through the available records.

    Possible values: 1 ≤ value ≤ 100

    Default: 10

  • The number of records to skip. By specifying offset, you retrieve a subset of items that starts with the offset value. Use offset with limit to page through the available records.

    Possible values: value ≥ 0

    Default: 0

  • Searches for the provided keyword and returns the appropriate row with that value. Here the search happens on the '[Name OR Tag]' of the entity

    Example: test tag

WithContext method only

The ListEnvironments options.

  • curl -X GET --location --header "Authorization: Bearer {iam_token}"   --header "Accept: application/json"   "{base_url}/environments?expand=true&sort=created_time&tags=version 1.1,pre-release&include=features,properties,snapshots&search=test tag"
  • listEnvironmentsOptions := &appconfigurationv1.ListEnvironmentsOptions{
      Expand: core.BoolPtr(true),
      Sort: core.StringPtr("created_time"),
      Tags: core.StringPtr("version 1.1,pre-release"),
      Include: []string{"features", "properties", "snapshots"},
      Limit: core.Int64Ptr(int64(10)),
      Search: core.StringPtr("test tag"),
    }
    
    pager, err := appConfigurationService.NewEnvironmentsPager(listEnvironmentsOptions)
    if err != nil {
      panic(err)
    }
    
    var allResults []appconfigurationv1.Environment
    for pager.HasNext() {
      nextPage, err := pager.GetNext()
      if err != nil {
        panic(err)
      }
      allResults = append(allResults, nextPage...)
    }
    b, _ := json.MarshalIndent(allResults, "", "  ")
    fmt.Println(string(b))

Response

List of all environments.

List of all environments.

Examples:
View

Status Code

  • Successfully listed the environments.

  • Unauthorized

Example responses
  • {
      "environments": [
        {
          "name": "Dev environment",
          "environment_id": "dev-environment",
          "description": "Dev environment description",
          "tags": "development",
          "color_code": "#FDD13A",
          "created_time": "2021-05-12T23:20:50.52Z",
          "updated_time": "2021-05-12T23:20:50.52Z",
          "href": "https://us-south.apprapp.cloud.ibm.com/apprapp/feature/v1/instances/9xxxxx-xxxxx-xxxxx-b3cd-xxxxx/environments/dev-environment"
        }
      ],
      "limit": 10,
      "offset": 0,
      "total_count": 1,
      "first": {
        "href": "https://us-south.apprapp.cloud.ibm.com/apprapp/feature/v1/instances/9xxxxx-xxxxx-xxxxx-b3cd-xxxxx/environments?limit=10&offset=0"
      },
      "last": {
        "href": "https://us-south.apprapp.cloud.ibm.com/apprapp/feature/v1/instances/9xxxxx-xxxxx-xxxxx-b3cd-xxxxx/environments?limit=10&offset=0"
      }
    }
  • {
      "environments": [
        {
          "name": "Dev environment",
          "environment_id": "dev-environment",
          "description": "Dev environment description",
          "tags": "development",
          "color_code": "#FDD13A",
          "created_time": "2021-05-12T23:20:50.52Z",
          "updated_time": "2021-05-12T23:20:50.52Z",
          "href": "https://us-south.apprapp.cloud.ibm.com/apprapp/feature/v1/instances/9xxxxx-xxxxx-xxxxx-b3cd-xxxxx/environments/dev-environment"
        }
      ],
      "limit": 10,
      "offset": 0,
      "total_count": 1,
      "first": {
        "href": "https://us-south.apprapp.cloud.ibm.com/apprapp/feature/v1/instances/9xxxxx-xxxxx-xxxxx-b3cd-xxxxx/environments?limit=10&offset=0"
      },
      "last": {
        "href": "https://us-south.apprapp.cloud.ibm.com/apprapp/feature/v1/instances/9xxxxx-xxxxx-xxxxx-b3cd-xxxxx/environments?limit=10&offset=0"
      }
    }
  • {
      "message": "Unauthorized"
    }
  • {
      "message": "Unauthorized"
    }

Create Environment

Create an environment.

Create an environment.

POST /environments
(appConfiguration *AppConfigurationV1) CreateEnvironment(createEnvironmentOptions *CreateEnvironmentOptions) (result *Environment, response *core.DetailedResponse, err error)
(appConfiguration *AppConfigurationV1) CreateEnvironmentWithContext(ctx context.Context, createEnvironmentOptions *CreateEnvironmentOptions) (result *Environment, 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.

  • apprapp.environments.create

Auditing

Calling this method generates the following auditing event.

  • apprapp.environments.create

Request

Instantiate the CreateEnvironmentOptions struct and set the fields to provide parameter values for the CreateEnvironment method.

The request body to create a new environment.

Examples:
View

WithContext method only

The CreateEnvironment options.

  • curl -X POST --location --header "Authorization: Bearer {iam_token}"   --header "Accept: application/json"   --header "Content-Type: application/json"   --data '{ "name": "Dev environment", "environment_id": "dev-environment", "description": "Dev environment description", "tags": "development", "color_code": "#FDD13A" }'   "{base_url}/environments"
  • createEnvironmentOptions := appConfigurationService.NewCreateEnvironmentOptions(
      "Dev environment",
      "dev-environment",
    )
    createEnvironmentOptions.SetDescription("Dev environment description")
    createEnvironmentOptions.SetTags("development")
    createEnvironmentOptions.SetColorCode("#FDD13A")
    
    environment, response, err := appConfigurationService.CreateEnvironment(createEnvironmentOptions)
    if err != nil {
      panic(err)
    }
    b, _ := json.MarshalIndent(environment, "", "  ")
    fmt.Println(string(b))

Response

Details of the environment.

Details of the environment.

Examples:
View

Status Code

  • Successfully created the environment.

  • Bad request. Verify that the information in the request body is complete and correct.

Example responses
  • {
      "name": "Dev environment",
      "environment_id": "dev-environment",
      "description": "Dev environment description",
      "tags": "development",
      "color_code": "#FDD13A",
      "created_time": "2021-05-12T23:20:50.52Z",
      "updated_time": "2021-05-12T23:20:50.52Z",
      "href": "https://us-south.apprapp.cloud.ibm.com/apprapp/feature/v1/instances/9xxxxx-xxxxx-xxxxx-b3cd-xxxxx/environments/dev-environment"
    }
  • {
      "name": "Dev environment",
      "environment_id": "dev-environment",
      "description": "Dev environment description",
      "tags": "development",
      "color_code": "#FDD13A",
      "created_time": "2021-05-12T23:20:50.52Z",
      "updated_time": "2021-05-12T23:20:50.52Z",
      "href": "https://us-south.apprapp.cloud.ibm.com/apprapp/feature/v1/instances/9xxxxx-xxxxx-xxxxx-b3cd-xxxxx/environments/dev-environment"
    }
  • {
      "code": "FTEC1000E",
      "message": "Error while creating the environment."
    }
  • {
      "code": "FTEC1000E",
      "message": "Error while creating the environment."
    }

Update Environment

Update an environment.

Update an environment.

PUT /environments/{environment_id}
(appConfiguration *AppConfigurationV1) UpdateEnvironment(updateEnvironmentOptions *UpdateEnvironmentOptions) (result *Environment, response *core.DetailedResponse, err error)
(appConfiguration *AppConfigurationV1) UpdateEnvironmentWithContext(ctx context.Context, updateEnvironmentOptions *UpdateEnvironmentOptions) (result *Environment, 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.

  • apprapp.environments.update

Auditing

Calling this method generates the following auditing event.

  • apprapp.environments.update

Request

Instantiate the UpdateEnvironmentOptions struct and set the fields to provide parameter values for the UpdateEnvironment method.

Path Parameters

  • Environment Id

    Example: environment_id

The request body to update a environment.

Examples:
View

WithContext method only

The UpdateEnvironment options.

  • curl -X PUT --location --header "Authorization: Bearer {iam_token}"   --header "Accept: application/json"   --header "Content-Type: application/json"   --data '{"name":"Dev environment","description":"Dev environment description","tags":"development","color_code":"#FDD13A"}'   "{base_url}/environments/{environment_id}"
  • updateEnvironmentOptions := appConfigurationService.NewUpdateEnvironmentOptions(
      "environment_id",
    )
    
    environment, response, err := appConfigurationService.UpdateEnvironment(updateEnvironmentOptions)
    if err != nil {
      panic(err)
    }
    b, _ := json.MarshalIndent(environment, "", "  ")
    fmt.Println(string(b))

Response

Details of the environment.

Details of the environment.

Examples:
View

Status Code

  • Successfully updated the environment details.

  • Bad request. Verify that the information in the request body is complete and correct.

  • Not Found. Verify that the environment id is correct.

Example responses
  • {
      "name": "Dev environment",
      "environment_id": "dev-environment",
      "description": "Dev environment description",
      "tags": "development",
      "color_code": "#FDD13A",
      "created_time": "2021-05-12T23:20:50.52Z",
      "updated_time": "2021-05-12T23:20:50.52Z",
      "href": "https://us-south.apprapp.cloud.ibm.com/apprapp/feature/v1/instances/9xxxxx-xxxxx-xxxxx-b3cd-xxxxx/environments/dev-environment"
    }
  • {
      "name": "Dev environment",
      "environment_id": "dev-environment",
      "description": "Dev environment description",
      "tags": "development",
      "color_code": "#FDD13A",
      "created_time": "2021-05-12T23:20:50.52Z",
      "updated_time": "2021-05-12T23:20:50.52Z",
      "href": "https://us-south.apprapp.cloud.ibm.com/apprapp/feature/v1/instances/9xxxxx-xxxxx-xxxxx-b3cd-xxxxx/environments/dev-environment"
    }
  • {
      "code": "FTEC1007E",
      "message": "Error while updating the environment."
    }
  • {
      "code": "FTEC1007E",
      "message": "Error while updating the environment."
    }
  • {
      "code": "FTEC1000E",
      "message": "Error while updating the environment. The queried resource 'Environment' is not available on the server."
    }
  • {
      "code": "FTEC1000E",
      "message": "Error while updating the environment. The queried resource 'Environment' is not available on the server."
    }

Get Environment

Retrieve the details of the environment.

Retrieve the details of the environment.

GET /environments/{environment_id}
(appConfiguration *AppConfigurationV1) GetEnvironment(getEnvironmentOptions *GetEnvironmentOptions) (result *Environment, response *core.DetailedResponse, err error)
(appConfiguration *AppConfigurationV1) GetEnvironmentWithContext(ctx context.Context, getEnvironmentOptions *GetEnvironmentOptions) (result *Environment, 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.

  • apprapp.environments.list

Auditing

Calling this method generates the following auditing event.

  • apprapp.environments.read

Request

Instantiate the GetEnvironmentOptions struct and set the fields to provide parameter values for the GetEnvironment method.

Path Parameters

  • Environment Id

    Example: environment_id

Query Parameters

  • If set to true, returns expanded view of the resource details.

    Example: true

  • Include feature, property, snapshots details in the response.

    Allowable values: [features,properties,snapshots]

    Examples:
    View

WithContext method only

The GetEnvironment options.

  • curl -X GET --location --header "Authorization: Bearer {iam_token}"   --header "Accept: application/json"   "{base_url}/environments/{environment_id}?expand=true&include=features,properties,snapshots"
  • getEnvironmentOptions := appConfigurationService.NewGetEnvironmentOptions(
      "environment_id",
    )
    getEnvironmentOptions.SetExpand(true)
    getEnvironmentOptions.SetInclude([]string{"features", "properties", "snapshots"})
    
    environment, response, err := appConfigurationService.GetEnvironment(getEnvironmentOptions)
    if err != nil {
      panic(err)
    }
    b, _ := json.MarshalIndent(environment, "", "  ")
    fmt.Println(string(b))

Response

Details of the environment.

Details of the environment.

Examples:
View

Status Code

  • Successfully retrieved the environment details.

  • Not Found. Verify that the environment id is correct.

Example responses
  • {
      "name": "Dev environment",
      "environment_id": "dev-environment",
      "description": "Dev environment description",
      "tags": "development",
      "color_code": "#FDD13A",
      "created_time": "2021-05-12T23:20:50.52Z",
      "updated_time": "2021-05-12T23:20:50.52Z",
      "href": "https://us-south.apprapp.cloud.ibm.com/apprapp/feature/v1/instances/9xxxxx-xxxxx-xxxxx-b3cd-xxxxx/environments/dev-environment"
    }
  • {
      "name": "Dev environment",
      "environment_id": "dev-environment",
      "description": "Dev environment description",
      "tags": "development",
      "color_code": "#FDD13A",
      "created_time": "2021-05-12T23:20:50.52Z",
      "updated_time": "2021-05-12T23:20:50.52Z",
      "href": "https://us-south.apprapp.cloud.ibm.com/apprapp/feature/v1/instances/9xxxxx-xxxxx-xxxxx-b3cd-xxxxx/environments/dev-environment"
    }
  • {
      "code": "FTEC1000E",
      "message": "Error while retrieving the environment. The queried resource 'Environment' is not available on the server."
    }
  • {
      "code": "FTEC1000E",
      "message": "Error while retrieving the environment. The queried resource 'Environment' is not available on the server."
    }

Delete Environment

Delete an Environment.

Delete an Environment.

DELETE /environments/{environment_id}
(appConfiguration *AppConfigurationV1) DeleteEnvironment(deleteEnvironmentOptions *DeleteEnvironmentOptions) (response *core.DetailedResponse, err error)
(appConfiguration *AppConfigurationV1) DeleteEnvironmentWithContext(ctx context.Context, deleteEnvironmentOptions *DeleteEnvironmentOptions) (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.

  • apprapp.environments.delete

Auditing

Calling this method generates the following auditing event.

  • apprapp.environments.delete

Request

Instantiate the DeleteEnvironmentOptions struct and set the fields to provide parameter values for the DeleteEnvironment method.

Path Parameters

  • Environment Id

    Example: environment_id

WithContext method only

The DeleteEnvironment options.

  • curl -X DELETE --location --header "Authorization: Bearer {iam_token}"   "{base_url}/environments/{environment_id}"
  • deleteEnvironmentOptions := appConfigurationService.NewDeleteEnvironmentOptions(
      "environment_id",
    )
    
    response, err := appConfigurationService.DeleteEnvironment(deleteEnvironmentOptions)
    if err != nil {
      panic(err)
    }
    if response.StatusCode != 204 {
      fmt.Printf("\nUnexpected response status code received from DeleteEnvironment(): %d\n", response.StatusCode)
    }

Response

Status Code

  • Successfully deleted the specified environment.

  • Bad request. Ensure that at least one environment should exist in the instance.

  • Not Found. Verify that the environment id is correct.

Example responses
  • {
      "code": "FTEC1008E",
      "message": "Error while deleting the environment."
    }
  • {
      "code": "FTEC1008E",
      "message": "Error while deleting the environment."
    }
  • {
      "code": "FTEC1000E",
      "message": "Error while deleting the environment. The queried resource 'Environment' is not available on the server."
    }
  • {
      "code": "FTEC1000E",
      "message": "Error while deleting the environment. The queried resource 'Environment' is not available on the server."
    }

Get list of Collections

List of all the collections in the App Configuration service instance.

List of all the collections in the App Configuration service instance.

GET /collections
(appConfiguration *AppConfigurationV1) ListCollections(listCollectionsOptions *ListCollectionsOptions) (result *CollectionList, response *core.DetailedResponse, err error)
(appConfiguration *AppConfigurationV1) ListCollectionsWithContext(ctx context.Context, listCollectionsOptions *ListCollectionsOptions) (result *CollectionList, 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.

  • apprapp.collections.list

Auditing

Calling this method generates the following auditing event.

  • apprapp.collections.list

Request

Instantiate the ListCollectionsOptions struct and set the fields to provide parameter values for the ListCollections method.

Query Parameters

  • If set to true, returns expanded view of the resource details.

    Example: true

  • Sort the collection details based on the specified attribute. By default, items are sorted by name.

    Allowable values: [created_time,updated_time,id,name]

    Example: created_time

  • Filter the resources to be returned based on the associated tags. Specify the parameter as a list of comma separated tags. Returns resources associated with any of the specified tags.

    Example: version 1.1,pre-release

  • Filter collections by a list of comma separated features.

    Examples:
    View
  • Filter collections by a list of comma separated properties.

    Examples:
    View
  • Include feature, property, snapshots details in the response.

    Allowable values: [features,properties,snapshots]

    Examples:
    View
  • The number of records to retrieve. By default, the list operation return the first 10 records. To retrieve different set of records, use limit with offset to page through the available records.

    Possible values: 1 ≤ value ≤ 100

    Default: 10

  • The number of records to skip. By specifying offset, you retrieve a subset of items that starts with the offset value. Use offset with limit to page through the available records.

    Possible values: value ≥ 0

    Default: 0

  • Searches for the provided keyword and returns the appropriate row with that value. Here the search happens on the '[Name OR Tag]' of the entity

    Example: test tag

WithContext method only

The ListCollections options.

  • curl -X GET --location --header "Authorization: Bearer {iam_token}"   --header "Accept: application/json"   "{base_url}/collections?expand=true&sort=created_time&tags=version 1.1,pre-release&features=my-feature-id,cycle-rentals&properties=my-property-id,email-property&include=features,properties,snapshots&search=test tag"
  • listCollectionsOptions := &appconfigurationv1.ListCollectionsOptions{
      Expand: core.BoolPtr(true),
      Sort: core.StringPtr("created_time"),
      Tags: core.StringPtr("version 1.1,pre-release"),
      Features: []string{"my-feature-id", "cycle-rentals"},
      Properties: []string{"my-property-id", "email-property"},
      Include: []string{"features", "properties", "snapshots"},
      Limit: core.Int64Ptr(int64(10)),
      Search: core.StringPtr("test tag"),
    }
    
    pager, err := appConfigurationService.NewCollectionsPager(listCollectionsOptions)
    if err != nil {
      panic(err)
    }
    
    var allResults []appconfigurationv1.Collection
    for pager.HasNext() {
      nextPage, err := pager.GetNext()
      if err != nil {
        panic(err)
      }
      allResults = append(allResults, nextPage...)
    }
    b, _ := json.MarshalIndent(allResults, "", "  ")
    fmt.Println(string(b))

Response

List of all Collections

List of all Collections.

Examples:
View

Status Code

  • Successfully listed the collections.

  • Unauthorized

Example responses
  • {
      "collections": [
        {
          "name": "GHz India Pvt Ltd",
          "collection_id": "ghzindiapvtltd",
          "description": "Collection for GHz Inc",
          "tags": "version: 1.1, pre-release",
          "created_time": "2020-01-09T00:16:07Z",
          "updated_time": "2020-03-09T12:16:07Z",
          "href": "https://us-south.apprapp.cloud.ibm.com/apprapp/feature/v1/instances/9xxxxx-xxxxx-xxxxx-b3cd-xxxxx/collections/ghzindiapvtltd",
          "features": [
            {
              "feature_id": "cycle-rentals",
              "name": "Cycle Rentals"
            },
            {
              "feature_id": "discountRate",
              "name": "Discount Rate"
            },
            {
              "feature_id": "longDistanceLimit",
              "name": "Long Distance Limit"
            }
          ],
          "properties": [
            {
              "property_id": "bigbillionday",
              "name": "BigBillionDay"
            },
            {
              "property_id": "newyear",
              "name": "NewYear"
            }
          ],
          "features_count": 3,
          "properties_count": 2
        }
      ],
      "limit": 10,
      "offset": 0,
      "total_count": 1,
      "first": {
        "href": "https://us-south.apprapp.cloud.ibm.com/apprapp/feature/v1/instances/9xxxxx-xxxxx-xxxxx-b3cd-xxxxx/collections?limit=10&offset=0"
      },
      "last": {
        "href": "https://us-south.apprapp.cloud.ibm.com/apprapp/feature/v1/instances/9xxxxx-xxxxx-xxxxx-b3cd-xxxxx/collections?limit=10&offset=0"
      }
    }
  • {
      "collections": [
        {
          "name": "GHz India Pvt Ltd",
          "collection_id": "ghzindiapvtltd",
          "description": "Collection for GHz Inc",
          "tags": "version: 1.1, pre-release",
          "created_time": "2020-01-09T00:16:07Z",
          "updated_time": "2020-03-09T12:16:07Z",
          "href": "https://us-south.apprapp.cloud.ibm.com/apprapp/feature/v1/instances/9xxxxx-xxxxx-xxxxx-b3cd-xxxxx/collections/ghzindiapvtltd",
          "features": [
            {
              "feature_id": "cycle-rentals",
              "name": "Cycle Rentals"
            },
            {
              "feature_id": "discountRate",
              "name": "Discount Rate"
            },
            {
              "feature_id": "longDistanceLimit",
              "name": "Long Distance Limit"
            }
          ],
          "properties": [
            {
              "property_id": "bigbillionday",
              "name": "BigBillionDay"
            },
            {
              "property_id": "newyear",
              "name": "NewYear"
            }
          ],
          "features_count": 3,
          "properties_count": 2
        }
      ],
      "limit": 10,
      "offset": 0,
      "total_count": 1,
      "first": {
        "href": "https://us-south.apprapp.cloud.ibm.com/apprapp/feature/v1/instances/9xxxxx-xxxxx-xxxxx-b3cd-xxxxx/collections?limit=10&offset=0"
      },
      "last": {
        "href": "https://us-south.apprapp.cloud.ibm.com/apprapp/feature/v1/instances/9xxxxx-xxxxx-xxxxx-b3cd-xxxxx/collections?limit=10&offset=0"
      }
    }
  • {
      "message": "Unauthorized"
    }
  • {
      "message": "Unauthorized"
    }

Create Collection

Create a collection.

Create a collection.

POST /collections
(appConfiguration *AppConfigurationV1) CreateCollection(createCollectionOptions *CreateCollectionOptions) (result *CollectionLite, response *core.DetailedResponse, err error)
(appConfiguration *AppConfigurationV1) CreateCollectionWithContext(ctx context.Context, createCollectionOptions *CreateCollectionOptions) (result *CollectionLite, 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.

  • apprapp.collections.create

Auditing

Calling this method generates the following auditing event.

  • apprapp.collections.create

Request

Instantiate the CreateCollectionOptions struct and set the fields to provide parameter values for the CreateCollection method.

The request body to create a new collection.

Examples:
View

WithContext method only

The CreateCollection options.

  • curl -X POST --location --header "Authorization: Bearer {iam_token}"   --header "Accept: application/json"   --header "Content-Type: application/json"   --data '{ "name": "Web App Collection", "collection_id": "web-app-collection", "description": "Collection for Web application", "tags": "version: 1.1, pre-release" }'   "{base_url}/collections"
  • createCollectionOptions := appConfigurationService.NewCreateCollectionOptions(
      "Web App Collection",
      "web-app-collection",
    )
    createCollectionOptions.SetDescription("Collection for Web application")
    createCollectionOptions.SetTags("version: 1.1, pre-release")
    
    collectionLite, response, err := appConfigurationService.CreateCollection(createCollectionOptions)
    if err != nil {
      panic(err)
    }
    b, _ := json.MarshalIndent(collectionLite, "", "  ")
    fmt.Println(string(b))

Response

Details of the collection.

Details of the collection.

Examples:
View

Status Code

  • Successfully created the collection.

  • Bad request. Verify that the information in the request body is complete and correct.

Example responses
  • {
      "name": "GHz India Pvt Ltd",
      "collection_id": "ghzindiapvtltd",
      "description": "Collection for GHz Inc",
      "tags": "version: 1.1, pre-release",
      "created_time": "2020-01-09T00:16:07Z",
      "updated_time": "2020-03-09T12:16:07Z",
      "href": "https://us-south.apprapp.cloud.ibm.com/apprapp/feature/v1/instances/9xxxxx-xxxxx-xxxxx-b3cd-xxxxx/collections/ghzindiapvtltd"
    }
  • {
      "name": "GHz India Pvt Ltd",
      "collection_id": "ghzindiapvtltd",
      "description": "Collection for GHz Inc",
      "tags": "version: 1.1, pre-release",
      "created_time": "2020-01-09T00:16:07Z",
      "updated_time": "2020-03-09T12:16:07Z",
      "href": "https://us-south.apprapp.cloud.ibm.com/apprapp/feature/v1/instances/9xxxxx-xxxxx-xxxxx-b3cd-xxxxx/collections/ghzindiapvtltd"
    }
  • {
      "code": "FTEC1003E",
      "message": "Error while creating the collection."
    }
  • {
      "code": "FTEC1003E",
      "message": "Error while creating the collection."
    }

Update Collection

Update the collection name, tags and description. Collection Id cannot be updated.

Update the collection name, tags and description. Collection Id cannot be updated.

PUT /collections/{collection_id}
(appConfiguration *AppConfigurationV1) UpdateCollection(updateCollectionOptions *UpdateCollectionOptions) (result *CollectionLite, response *core.DetailedResponse, err error)
(appConfiguration *AppConfigurationV1) UpdateCollectionWithContext(ctx context.Context, updateCollectionOptions *UpdateCollectionOptions) (result *CollectionLite, 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.

  • apprapp.collections.update

Auditing

Calling this method generates the following auditing event.

  • apprapp.collections.update

Request

Instantiate the UpdateCollectionOptions struct and set the fields to provide parameter values for the UpdateCollection method.

Path Parameters

  • Collection Id of the collection

    Example: collection_id

The request body to update a collection.

Examples:
View

WithContext method only

The UpdateCollection options.

  • curl -X PUT --location --header "Authorization: Bearer {iam_token}"   --header "Accept: application/json"   --header "Content-Type: application/json"   --data '{"name":"Web Application","description":"Collection for Web Application.","tags":"version: 1.1, pre-release"}'   "{base_url}/collections/{collection_id}"
  • updateCollectionOptions := appConfigurationService.NewUpdateCollectionOptions(
      "collection_id",
    )
    
    collectionLite, response, err := appConfigurationService.UpdateCollection(updateCollectionOptions)
    if err != nil {
      panic(err)
    }
    b, _ := json.MarshalIndent(collectionLite, "", "  ")
    fmt.Println(string(b))

Response

Details of the collection.

Details of the collection.

Examples:
View

Status Code

  • Successfully updated the collection details.

  • Bad request. Verify that the information in the request body is complete and correct.

  • Not Found. Verify that the collection id is correct.

Example responses
  • {
      "name": "GHz India Pvt Ltd",
      "collection_id": "ghzindiapvtltd",
      "description": "Collection for GHz Inc",
      "tags": "version: 1.1, pre-release",
      "created_time": "2020-01-09T00:16:07Z",
      "updated_time": "2020-03-09T12:16:07Z",
      "href": "https://us-south.apprapp.cloud.ibm.com/apprapp/feature/v1/instances/9xxxxx-xxxxx-xxxxx-b3cd-xxxxx/collections/ghzindiapvtltd"
    }
  • {
      "name": "GHz India Pvt Ltd",
      "collection_id": "ghzindiapvtltd",
      "description": "Collection for GHz Inc",
      "tags": "version: 1.1, pre-release",
      "created_time": "2020-01-09T00:16:07Z",
      "updated_time": "2020-03-09T12:16:07Z",
      "href": "https://us-south.apprapp.cloud.ibm.com/apprapp/feature/v1/instances/9xxxxx-xxxxx-xxxxx-b3cd-xxxxx/collections/ghzindiapvtltd"
    }
  • {
      "code": "FTEC1007E",
      "message": "Error while updating the collection."
    }
  • {
      "code": "FTEC1007E",
      "message": "Error while updating the collection."
    }
  • {
      "code": "FTEC1000E",
      "message": "Error while updating the collection. The queried resource 'Collection' is not available on the server."
    }
  • {
      "code": "FTEC1000E",
      "message": "Error while updating the collection. The queried resource 'Collection' is not available on the server."
    }

Get Collection

Retrieve the details of the collection.

Retrieve the details of the collection.

GET /collections/{collection_id}
(appConfiguration *AppConfigurationV1) GetCollection(getCollectionOptions *GetCollectionOptions) (result *Collection, response *core.DetailedResponse, err error)
(appConfiguration *AppConfigurationV1) GetCollectionWithContext(ctx context.Context, getCollectionOptions *GetCollectionOptions) (result *Collection, 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.

  • apprapp.collections.list

Auditing

Calling this method generates the following auditing event.

  • apprapp.collections.read

Request

Instantiate the GetCollectionOptions struct and set the fields to provide parameter values for the GetCollection method.

Path Parameters

  • Collection Id of the collection

    Example: collection_id

Query Parameters

  • If set to true, returns expanded view of the resource details.

    Example: true

  • Include feature, property, snapshots details in the response.

    Allowable values: [features,properties,snapshots]

    Examples:
    View

WithContext method only

The GetCollection options.

  • curl -X GET --location --header "Authorization: Bearer {iam_token}"   --header "Accept: application/json"   "{base_url}/collections/{collection_id}?expand=true&include=features,properties,snapshots"
  • getCollectionOptions := appConfigurationService.NewGetCollectionOptions(
      "collection_id",
    )
    getCollectionOptions.SetExpand(true)
    getCollectionOptions.SetInclude([]string{"features", "properties", "snapshots"})
    
    collection, response, err := appConfigurationService.GetCollection(getCollectionOptions)
    if err != nil {
      panic(err)
    }
    b, _ := json.MarshalIndent(collection, "", "  ")
    fmt.Println(string(b))

Response

Details of the collection.

Details of the collection.

Examples:
View

Status Code

  • Successfully retrieved the collection details.

  • Not Found. Verify that the collection id is correct.

Example responses
  • {
      "name": "GHz India Pvt Ltd",
      "collection_id": "ghzindiapvtltd",
      "description": "Collection for GHz Inc",
      "tags": "version: 1.1, pre-release",
      "created_time": "2020-01-09T00:16:07Z",
      "updated_time": "2020-03-09T12:16:07Z",
      "href": "https://us-south.apprapp.cloud.ibm.com/apprapp/feature/v1/instances/9xxxxx-xxxxx-xxxxx-b3cd-xxxxx/collections/ghzindiapvtltd",
      "features": [
        {
          "feature_id": "cycle-rentals",
          "name": "Cycle Rentals"
        },
        {
          "feature_id": "discountRate",
          "name": "Discount Rate"
        },
        {
          "feature_id": "longDistanceLimit",
          "name": "Long Distance Limit"
        }
      ],
      "properties": [
        {
          "property_id": "bigbillionday",
          "name": "BigBillionDay"
        },
        {
          "property_id": "newyearday",
          "name": "NewYearDay"
        }
      ],
      "features_count": 3,
      "properties_count": 2
    }
  • {
      "name": "GHz India Pvt Ltd",
      "collection_id": "ghzindiapvtltd",
      "description": "Collection for GHz Inc",
      "tags": "version: 1.1, pre-release",
      "created_time": "2020-01-09T00:16:07Z",
      "updated_time": "2020-03-09T12:16:07Z",
      "href": "https://us-south.apprapp.cloud.ibm.com/apprapp/feature/v1/instances/9xxxxx-xxxxx-xxxxx-b3cd-xxxxx/collections/ghzindiapvtltd",
      "features": [
        {
          "feature_id": "cycle-rentals",
          "name": "Cycle Rentals"
        },
        {
          "feature_id": "discountRate",
          "name": "Discount Rate"
        },
        {
          "feature_id": "longDistanceLimit",
          "name": "Long Distance Limit"
        }
      ],
      "properties": [
        {
          "property_id": "bigbillionday",
          "name": "BigBillionDay"
        },
        {
          "property_id": "newyearday",
          "name": "NewYearDay"
        }
      ],
      "features_count": 3,
      "properties_count": 2
    }
  • {
      "code": "FTEC1000E",
      "message": "Error while retrieving the collection. The queried resource 'Collection' is not available on the server."
    }
  • {
      "code": "FTEC1000E",
      "message": "Error while retrieving the collection. The queried resource 'Collection' is not available on the server."
    }

Delete Collection

Delete the collection.

Delete the collection.

DELETE /collections/{collection_id}
(appConfiguration *AppConfigurationV1) DeleteCollection(deleteCollectionOptions *DeleteCollectionOptions) (response *core.DetailedResponse, err error)
(appConfiguration *AppConfigurationV1) DeleteCollectionWithContext(ctx context.Context, deleteCollectionOptions *DeleteCollectionOptions) (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.

  • apprapp.collections.delete

Auditing

Calling this method generates the following auditing event.

  • apprapp.collections.delete

Request

Instantiate the DeleteCollectionOptions struct and set the fields to provide parameter values for the DeleteCollection method.

Path Parameters

  • Collection Id of the collection

    Example: collection_id

WithContext method only

The DeleteCollection options.

  • curl -X DELETE --location --header "Authorization: Bearer {iam_token}"   "{base_url}/collections/{collection_id}"
  • deleteCollectionOptions := appConfigurationService.NewDeleteCollectionOptions(
      "collection_id",
    )
    
    response, err := appConfigurationService.DeleteCollection(deleteCollectionOptions)
    if err != nil {
      panic(err)
    }
    if response.StatusCode != 204 {
      fmt.Printf("\nUnexpected response status code received from DeleteCollection(): %d\n", response.StatusCode)
    }

Response

Status Code

  • Successfully deleted the specified collection.

  • Not Found. Verify that the collection id is correct.

Example responses
  • {
      "code": "FTEC1000E",
      "message": "Error while deleting the collection. The queried resource 'Collection' is not available on the server."
    }
  • {
      "code": "FTEC1000E",
      "message": "Error while deleting the collection. The queried resource 'Collection' is not available on the server."
    }

Get list of Features

List all the feature flags in the specified environment.

List all the feature flags in the specified environment.

GET /environments/{environment_id}/features
(appConfiguration *AppConfigurationV1) ListFeatures(listFeaturesOptions *ListFeaturesOptions) (result *FeaturesList, response *core.DetailedResponse, err error)
(appConfiguration *AppConfigurationV1) ListFeaturesWithContext(ctx context.Context, listFeaturesOptions *ListFeaturesOptions) (result *FeaturesList, 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.

  • apprapp.features.list

Auditing

Calling this method generates the following auditing event.

  • apprapp.features.list

Request

Instantiate the ListFeaturesOptions struct and set the fields to provide parameter values for the ListFeatures method.

Path Parameters

  • Environment Id

    Example: environment_id

Query Parameters

  • If set to true, returns expanded view of the resource details.

    Example: true

  • Sort the feature details based on the specified attribute. By default, items are sorted by name.

    Allowable values: [created_time,updated_time,id,name]

    Example: created_time

  • Filter the resources to be returned based on the associated tags. Specify the parameter as a list of comma separated tags. Returns resources associated with any of the specified tags.

    Example: version 1.1,pre-release

  • Filter features by a list of comma separated collections.

    Examples:
    View
  • Filter features by a list of comma separated segments.

    Examples:
    View
  • Include the associated collections or targeting rules or change request details in the response.

    Allowable values: [collections,rules,change_request]

    Examples:
    View
  • The number of records to retrieve. By default, the list operation return the first 10 records. To retrieve different set of records, use limit with offset to page through the available records.

    Possible values: 1 ≤ value ≤ 100

    Default: 10

  • The number of records to skip. By specifying offset, you retrieve a subset of items that starts with the offset value. Use offset with limit to page through the available records.

    Possible values: value ≥ 0

    Default: 0

  • Searches for the provided keyword and returns the appropriate row with that value. Here the search happens on the '[Name OR Tag]' of the entity

    Example: test tag

WithContext method only

The ListFeatures options.

  • curl -X GET --location --header "Authorization: Bearer {iam_token}"   --header "Accept: application/json"   "{base_url}/environments/{environment_id}/features?expand=true&sort=created_time&tags=version 1.1,pre-release&collections=my-collection-id,ghzindiapvtltd&segments=my-segment-id,beta-users&include=collections,rules,change_request&search=test tag"
  • listFeaturesOptions := &appconfigurationv1.ListFeaturesOptions{
      EnvironmentID: core.StringPtr("environment_id"),
      Expand: core.BoolPtr(true),
      Sort: core.StringPtr("created_time"),
      Tags: core.StringPtr("version 1.1,pre-release"),
      Collections: []string{"my-collection-id", "ghzindiapvtltd"},
      Segments: []string{"my-segment-id", "beta-users"},
      Include: []string{"collections", "rules", "change_request"},
      Limit: core.Int64Ptr(int64(10)),
      Search: core.StringPtr("test tag"),
    }
    
    pager, err := appConfigurationService.NewFeaturesPager(listFeaturesOptions)
    if err != nil {
      panic(err)
    }
    
    var allResults []appconfigurationv1.Feature
    for pager.HasNext() {
      nextPage, err := pager.GetNext()
      if err != nil {
        panic(err)
      }
      allResults = append(allResults, nextPage...)
    }
    b, _ := json.MarshalIndent(allResults, "", "  ")
    fmt.Println(string(b))

Response

List of all features

List of all features.

Examples:
View

Status Code

  • Successfully listed all the features.

  • Unauthorized

Example responses
  • {
      "features": [
        {
          "name": "Cycle Rentals",
          "feature_id": "cycle-rentals",
          "description": "Feature flags to enable Cycle Rentals",
          "type": "BOOLEAN",
          "enabled_value": true,
          "disabled_value": false,
          "rollout_percentage": 90,
          "tags": "version: 1.1, pre-release",
          "change_request_status": "PENDING",
          "change_request_number": "CHG0030423",
          "segment_rules": [
            {
              "rules": [
                {
                  "segments": [
                    "betausers"
                  ]
                }
              ],
              "value": 25,
              "order": 1,
              "rollout_percentage": 10
            }
          ],
          "segment_exists": true,
          "collections": [
            {
              "collection_id": "web-app-collection"
            },
            {
              "collection_id": "mobile-app-collection"
            }
          ],
          "created_time": "2020-06-09T00:16:07Z",
          "updated_time": "2020-06-09T12:16:07Z",
          "href": "https://us-south.apprapp.cloud.ibm.com/apprapp/feature/v1/instances/9xxxxx-xxxxx-xxxxx-b3cd-xxxxx/environments/dev/features/cycle-rentals"
        }
      ],
      "limit": 10,
      "offset": 0,
      "total_count": 1,
      "first": {
        "href": "https://us-south.apprapp.cloud.ibm.com/apprapp/feature/v1/instances/9xxxxx-xxxxx-xxxxx-b3cd-xxxxx/environments/dev/features?limit=10&offset=0"
      },
      "last": {
        "href": "https://us-south.apprapp.cloud.ibm.com/apprapp/feature/v1/instances/9xxxxx-xxxxx-xxxxx-b3cd-xxxxx/environments/dev/features?limit=10&offset=0"
      }
    }
  • {
      "features": [
        {
          "name": "Cycle Rentals",
          "feature_id": "cycle-rentals",
          "description": "Feature flags to enable Cycle Rentals",
          "type": "BOOLEAN",
          "enabled_value": true,
          "disabled_value": false,
          "rollout_percentage": 90,
          "tags": "version: 1.1, pre-release",
          "change_request_status": "PENDING",
          "change_request_number": "CHG0030423",
          "segment_rules": [
            {
              "rules": [
                {
                  "segments": [
                    "betausers"
                  ]
                }
              ],
              "value": 25,
              "order": 1,
              "rollout_percentage": 10
            }
          ],
          "segment_exists": true,
          "collections": [
            {
              "collection_id": "web-app-collection"
            },
            {
              "collection_id": "mobile-app-collection"
            }
          ],
          "created_time": "2020-06-09T00:16:07Z",
          "updated_time": "2020-06-09T12:16:07Z",
          "href": "https://us-south.apprapp.cloud.ibm.com/apprapp/feature/v1/instances/9xxxxx-xxxxx-xxxxx-b3cd-xxxxx/environments/dev/features/cycle-rentals"
        }
      ],
      "limit": 10,
      "offset": 0,
      "total_count": 1,
      "first": {
        "href": "https://us-south.apprapp.cloud.ibm.com/apprapp/feature/v1/instances/9xxxxx-xxxxx-xxxxx-b3cd-xxxxx/environments/dev/features?limit=10&offset=0"
      },
      "last": {
        "href": "https://us-south.apprapp.cloud.ibm.com/apprapp/feature/v1/instances/9xxxxx-xxxxx-xxxxx-b3cd-xxxxx/environments/dev/features?limit=10&offset=0"
      }
    }
  • {
      "message": "Unauthorized"
    }
  • {
      "message": "Unauthorized"
    }

Create Feature

Create a feature flag

Create a feature flag.

POST /environments/{environment_id}/features
(appConfiguration *AppConfigurationV1) CreateFeature(createFeatureOptions *CreateFeatureOptions) (result *Feature, response *core.DetailedResponse, err error)
(appConfiguration *AppConfigurationV1) CreateFeatureWithContext(ctx context.Context, createFeatureOptions *CreateFeatureOptions) (result *Feature, 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.

  • apprapp.features.create

Auditing

Calling this method generates the following auditing event.

  • apprapp.features.create

Request

Instantiate the CreateFeatureOptions struct and set the fields to provide parameter values for the CreateFeature method.

Path Parameters

  • Environment Id

    Example: environment_id

The request body to create a new feature.

Examples:
type_boolean
type_numeric
type_string_text
type_string_json
type_string_yaml

WithContext method only

The CreateFeature options.

  • curl -X POST --location --header "Authorization: Bearer {iam_token}"   --header "Accept: application/json"   --header "Content-Type: application/json"   --data '{ "name": "Cycle Rentals", "feature_id": "cycle-rentals", "description": "Feature flag to enable Cycle Rentals", "type": "BOOLEAN", "enabled_value": true, "disabled_value": false, "enabled": true, "rollout_percentage": 100, "tags": "version: 1.1, pre-release", "segment_rules": [ { "rules": [ { "segments": [ "betausers", "premiumusers" ] } ], "value": true, "order": 1, "rollout_percentage": 50 }, { "rules": [ { "segments": [ "freeusers" ] } ], "value": false, "order": 2, "rollout_percentage": 70 } ], "collections": [ { "collection_id": "ghzinc" }, { "collection_id": "phzsystems" }, { "collection_id": "ghzglobal" } ] }'   "{base_url}/environments/{environment_id}/features"
  • targetSegmentsModel := &appconfigurationv1.TargetSegments{
      Segments: []string{"betausers", "premiumusers"},
    }
    
    featureSegmentRuleModel := &appconfigurationv1.FeatureSegmentRule{
      Rules: []appconfigurationv1.TargetSegments{*targetSegmentsModel},
      Value: core.StringPtr("true"),
      Order: core.Int64Ptr(int64(1)),
      RolloutPercentage: core.Int64Ptr(int64(50)),
    }
    
    collectionRefModel := &appconfigurationv1.CollectionRef{
      CollectionID: core.StringPtr("ghzinc"),
    }
    
    createFeatureOptions := appConfigurationService.NewCreateFeatureOptions(
      "environment_id",
      "Cycle Rentals",
      "cycle-rentals",
      "BOOLEAN",
      "true",
      "false",
    )
    createFeatureOptions.SetDescription("Feature flag to enable Cycle Rentals")
    createFeatureOptions.SetEnabled(true)
    createFeatureOptions.SetRolloutPercentage(int64(100))
    createFeatureOptions.SetTags("version: 1.1, pre-release")
    createFeatureOptions.SetSegmentRules([]appconfigurationv1.FeatureSegmentRule{*featureSegmentRuleModel})
    createFeatureOptions.SetCollections([]appconfigurationv1.CollectionRef{*collectionRefModel})
    
    feature, response, err := appConfigurationService.CreateFeature(createFeatureOptions)
    if err != nil {
      panic(err)
    }
    b, _ := json.MarshalIndent(feature, "", "  ")
    fmt.Println(string(b))

Response

Details of the feature.

Details of the feature.

Examples:
View

Status Code

  • Successfully created the feature flag.

  • Bad request. . Verify that the information in the request body is complete and correct.

  • Not Implemented.

Example responses
  • {
      "name": "Cycle Rentals",
      "feature_id": "cycle-rentals",
      "description": "Feature flag to enable Cycle Rentals",
      "type": "BOOLEAN",
      "enabled_value": true,
      "disabled_value": false,
      "enabled": true,
      "rollout_percentage": 100,
      "tags": "version: 1.1, pre-release",
      "change_request_status": "PENDING",
      "change_request_number": "CHG0030423",
      "segment_rules": [
        {
          "rules": [
            {
              "segments": [
                "betausers",
                "premiumusers"
              ]
            }
          ],
          "value": true,
          "order": 1,
          "rollout_percentage": 50
        },
        {
          "rules": [
            {
              "segments": [
                "freeusers"
              ]
            }
          ],
          "value": false,
          "order": 2,
          "rollout_percentage": 70
        }
      ],
      "segment_exists": true,
      "collections": [
        {
          "collection_id": "ghzinc",
          "name": "GHz Inc"
        },
        {
          "collection_id": "phzsystems",
          "name": "PHz Systems"
        },
        {
          "collection_id": "ghzglobal",
          "name": "GHz Global"
        }
      ],
      "created_time": "2021-05-12T23:20:50.52Z",
      "updated_time": "2021-05-12T23:20:50.52Z",
      "href": "https://us-south.apprapp.cloud.ibm.com/apprapp/feature/v1/instances/9xxxxx-xxxxx-xxxxx-b3cd-xxxxx/environments/dev/features/cycle-rentals"
    }
  • {
      "name": "Cycle Rentals",
      "feature_id": "cycle-rentals",
      "description": "Feature flag to enable Cycle Rentals",
      "type": "BOOLEAN",
      "enabled_value": true,
      "disabled_value": false,
      "enabled": true,
      "rollout_percentage": 100,
      "tags": "version: 1.1, pre-release",
      "change_request_status": "PENDING",
      "change_request_number": "CHG0030423",
      "segment_rules": [
        {
          "rules": [
            {
              "segments": [
                "betausers",
                "premiumusers"
              ]
            }
          ],
          "value": true,
          "order": 1,
          "rollout_percentage": 50
        },
        {
          "rules": [
            {
              "segments": [
                "freeusers"
              ]
            }
          ],
          "value": false,
          "order": 2,
          "rollout_percentage": 70
        }
      ],
      "segment_exists": true,
      "collections": [
        {
          "collection_id": "ghzinc",
          "name": "GHz Inc"
        },
        {
          "collection_id": "phzsystems",
          "name": "PHz Systems"
        },
        {
          "collection_id": "ghzglobal",
          "name": "GHz Global"
        }
      ],
      "created_time": "2021-05-12T23:20:50.52Z",
      "updated_time": "2021-05-12T23:20:50.52Z",
      "href": "https://us-south.apprapp.cloud.ibm.com/apprapp/feature/v1/instances/9xxxxx-xxxxx-xxxxx-b3cd-xxxxx/environments/dev/features/cycle-rentals"
    }
  • {
      "name": "Cycle Rentals",
      "feature_id": "cycle-rentals",
      "description": "Feature flag to enable Cycle Rentals",
      "type": "NUMERIC",
      "enabled_value": 1,
      "disabled_value": 0,
      "enabled": true,
      "rollout_percentage": 100,
      "tags": "version: 1.1, pre-release",
      "change_request_status": "PENDING",
      "change_request_number": "CHG0030423",
      "segment_rules": [
        {
          "rules": [
            {
              "segments": [
                "betausers",
                "premiumusers"
              ]
            }
          ],
          "value": 10,
          "order": 1,
          "rollout_percentage": 40
        },
        {
          "rules": [
            {
              "segments": [
                "freeusers"
              ]
            }
          ],
          "value": 5,
          "order": 2,
          "rollout_percentage": 70
        }
      ],
      "segment_exists": true,
      "collections": [
        {
          "collection_id": "ghzinc",
          "name": "GHz Inc"
        },
        {
          "collection_id": "phzsystems",
          "name": "PHz Systems"
        },
        {
          "collection_id": "ghzglobal",
          "name": "GHz Global"
        }
      ],
      "created_time": "2021-05-12T23:20:50.52Z",
      "updated_time": "2021-05-12T23:20:50.52Z",
      "href": "https://us-south.apprapp.cloud.ibm.com/apprapp/feature/v1/instances/9xxxxx-xxxxx-xxxxx-b3cd-xxxxx/environments/dev/features/cycle-rentals"
    }
  • {
      "name": "Cycle Rentals",
      "feature_id": "cycle-rentals",
      "description": "Feature flag to enable Cycle Rentals",
      "type": "NUMERIC",
      "enabled_value": 1,
      "disabled_value": 0,
      "enabled": true,
      "rollout_percentage": 100,
      "tags": "version: 1.1, pre-release",
      "change_request_status": "PENDING",
      "change_request_number": "CHG0030423",
      "segment_rules": [
        {
          "rules": [
            {
              "segments": [
                "betausers",
                "premiumusers"
              ]
            }
          ],
          "value": 10,
          "order": 1,
          "rollout_percentage": 40
        },
        {
          "rules": [
            {
              "segments": [
                "freeusers"
              ]
            }
          ],
          "value": 5,
          "order": 2,
          "rollout_percentage": 70
        }
      ],
      "segment_exists": true,
      "collections": [
        {
          "collection_id": "ghzinc",
          "name": "GHz Inc"
        },
        {
          "collection_id": "phzsystems",
          "name": "PHz Systems"
        },
        {
          "collection_id": "ghzglobal",
          "name": "GHz Global"
        }
      ],
      "created_time": "2021-05-12T23:20:50.52Z",
      "updated_time": "2021-05-12T23:20:50.52Z",
      "href": "https://us-south.apprapp.cloud.ibm.com/apprapp/feature/v1/instances/9xxxxx-xxxxx-xxxxx-b3cd-xxxxx/environments/dev/features/cycle-rentals"
    }
  • {
      "name": "Cycle Rentals",
      "feature_id": "cycle-rentals",
      "description": "Feature flag to enable Cycle Rentals",
      "type": "STRING",
      "format": "TEXT",
      "enabled_value": "yes",
      "disabled_value": "no",
      "enabled": true,
      "rollout_percentage": 100,
      "tags": "version: 1.1, pre-release",
      "change_request_status": "PENDING",
      "change_request_number": "CHG0030423",
      "segment_rules": [
        {
          "rules": [
            {
              "segments": [
                "betausers",
                "premiumusers"
              ]
            }
          ],
          "value": "not available",
          "order": 1,
          "rollout_percentage": 50
        },
        {
          "rules": [
            {
              "segments": [
                "freeusers"
              ]
            }
          ],
          "value": "available",
          "order": 2,
          "rollout_percentage": 15
        }
      ],
      "segment_exists": true,
      "collections": [
        {
          "collection_id": "ghzinc",
          "name": "GHz Inc"
        },
        {
          "collection_id": "phzsystems",
          "name": "PHz Systems"
        },
        {
          "collection_id": "ghzglobal",
          "name": "GHz Global"
        }
      ],
      "created_time": "2021-05-12T23:20:50.52Z",
      "updated_time": "2021-05-12T23:20:50.52Z",
      "href": "https://us-south.apprapp.cloud.ibm.com/apprapp/feature/v1/instances/9xxxxx-xxxxx-xxxxx-b3cd-xxxxx/environments/dev/features/cycle-rentals"
    }
  • {
      "name": "Cycle Rentals",
      "feature_id": "cycle-rentals",
      "description": "Feature flag to enable Cycle Rentals",
      "type": "STRING",
      "format": "TEXT",
      "enabled_value": "yes",
      "disabled_value": "no",
      "enabled": true,
      "rollout_percentage": 100,
      "tags": "version: 1.1, pre-release",
      "change_request_status": "PENDING",
      "change_request_number": "CHG0030423",
      "segment_rules": [
        {
          "rules": [
            {
              "segments": [
                "betausers",
                "premiumusers"
              ]
            }
          ],
          "value": "not available",
          "order": 1,
          "rollout_percentage": 50
        },
        {
          "rules": [
            {
              "segments": [
                "freeusers"
              ]
            }
          ],
          "value": "available",
          "order": 2,
          "rollout_percentage": 15
        }
      ],
      "segment_exists": true,
      "collections": [
        {
          "collection_id": "ghzinc",
          "name": "GHz Inc"
        },
        {
          "collection_id": "phzsystems",
          "name": "PHz Systems"
        },
        {
          "collection_id": "ghzglobal",
          "name": "GHz Global"
        }
      ],
      "created_time": "2021-05-12T23:20:50.52Z",
      "updated_time": "2021-05-12T23:20:50.52Z",
      "href": "https://us-south.apprapp.cloud.ibm.com/apprapp/feature/v1/instances/9xxxxx-xxxxx-xxxxx-b3cd-xxxxx/environments/dev/features/cycle-rentals"
    }
  • {
      "name": "Cycle Rentals",
      "feature_id": "cycle-rentals",
      "description": "Feature flag to enable Cycle Rentals",
      "type": "STRING",
      "format": "JSON",
      "enabled_value": {
        "availability": "yes"
      },
      "disabled_value": {
        "availability": "no"
      },
      "enabled": true,
      "rollout_percentage": 100,
      "tags": "version: 1.1, pre-release",
      "change_request_status": "PENDING",
      "change_request_number": "CHG0030423",
      "segment_rules": [
        {
          "rules": [
            {
              "segments": [
                "betausers",
                "premiumusers"
              ]
            }
          ],
          "value": {
            "availability": "no"
          },
          "order": 1,
          "rollout_percentage": 50
        },
        {
          "rules": [
            {
              "segments": [
                "freeusers"
              ]
            }
          ],
          "value": {
            "availability": "no"
          },
          "order": 2,
          "rollout_percentage": 15
        }
      ],
      "segment_exists": true,
      "collections": [
        {
          "collection_id": "ghzinc",
          "name": "GHz Inc"
        },
        {
          "collection_id": "phzsystems",
          "name": "PHz Systems"
        },
        {
          "collection_id": "ghzglobal",
          "name": "GHz Global"
        }
      ],
      "created_time": "2021-05-12T23:20:50.52Z",
      "updated_time": "2021-05-12T23:20:50.52Z",
      "href": "https://us-south.apprapp.cloud.ibm.com/apprapp/feature/v1/instances/9xxxxx-xxxxx-xxxxx-b3cd-xxxxx/environments/dev/features/cycle-rentals"
    }
  • {
      "name": "Cycle Rentals",
      "feature_id": "cycle-rentals",
      "description": "Feature flag to enable Cycle Rentals",
      "type": "STRING",
      "format": "JSON",
      "enabled_value": {
        "availability": "yes"
      },
      "disabled_value": {
        "availability": "no"
      },
      "enabled": true,
      "rollout_percentage": 100,
      "tags": "version: 1.1, pre-release",
      "change_request_status": "PENDING",
      "change_request_number": "CHG0030423",
      "segment_rules": [
        {
          "rules": [
            {
              "segments": [
                "betausers",
                "premiumusers"
              ]
            }
          ],
          "value": {
            "availability": "no"
          },
          "order": 1,
          "rollout_percentage": 50
        },
        {
          "rules": [
            {
              "segments": [
                "freeusers"
              ]
            }
          ],
          "value": {
            "availability": "no"
          },
          "order": 2,
          "rollout_percentage": 15
        }
      ],
      "segment_exists": true,
      "collections": [
        {
          "collection_id": "ghzinc",
          "name": "GHz Inc"
        },
        {
          "collection_id": "phzsystems",
          "name": "PHz Systems"
        },
        {
          "collection_id": "ghzglobal",
          "name": "GHz Global"
        }
      ],
      "created_time": "2021-05-12T23:20:50.52Z",
      "updated_time": "2021-05-12T23:20:50.52Z",
      "href": "https://us-south.apprapp.cloud.ibm.com/apprapp/feature/v1/instances/9xxxxx-xxxxx-xxxxx-b3cd-xxxxx/environments/dev/features/cycle-rentals"
    }
  • {
      "name": "Cycle Rentals",
      "feature_id": "cycle-rentals",
      "description": "Feature flag to enable Cycle Rentals",
      "type": "STRING",
      "format": "YAML",
      "enabled_value": "---\navailability: 'yes'",
      "disabled_value": "---\navailability: 'no'",
      "enabled": true,
      "rollout_percentage": 100,
      "tags": "version: 1.1, pre-release",
      "change_request_status": "PENDING",
      "change_request_number": "CHG0030423",
      "segment_rules": [
        {
          "rules": [
            {
              "segments": [
                "betausers",
                "premiumusers"
              ]
            }
          ],
          "value": "---\navailability: 'yes'\npremium_user_ids:\n- custId1\n- custId2",
          "order": 1,
          "rollout_percentage": 100
        },
        {
          "rules": [
            {
              "segments": [
                "freeusers"
              ]
            }
          ],
          "value": "---\navailability: 'no'",
          "order": 2,
          "rollout_percentage": 100
        }
      ],
      "segment_exists": true,
      "collections": [
        {
          "collection_id": "ghzinc",
          "name": "GHz Inc"
        },
        {
          "collection_id": "phzsystems",
          "name": "PHz Systems"
        },
        {
          "collection_id": "ghzglobal",
          "name": "GHz Global"
        }
      ],
      "created_time": "2021-05-12T23:20:50.52Z",
      "updated_time": "2021-05-12T23:20:50.52Z",
      "href": "https://us-south.apprapp.cloud.ibm.com/apprapp/feature/v1/instances/9xxxxx-xxxxx-xxxxx-b3cd-xxxxx/environments/dev/features/cycle-rentals"
    }
  • {
      "name": "Cycle Rentals",
      "feature_id": "cycle-rentals",
      "description": "Feature flag to enable Cycle Rentals",
      "type": "STRING",
      "format": "YAML",
      "enabled_value": "---\navailability: 'yes'",
      "disabled_value": "---\navailability: 'no'",
      "enabled": true,
      "rollout_percentage": 100,
      "tags": "version: 1.1, pre-release",
      "change_request_status": "PENDING",
      "change_request_number": "CHG0030423",
      "segment_rules": [
        {
          "rules": [
            {
              "segments": [
                "betausers",
                "premiumusers"
              ]
            }
          ],
          "value": "---\navailability: 'yes'\npremium_user_ids:\n- custId1\n- custId2",
          "order": 1,
          "rollout_percentage": 100
        },
        {
          "rules": [
            {
              "segments": [
                "freeusers"
              ]
            }
          ],
          "value": "---\navailability: 'no'",
          "order": 2,
          "rollout_percentage": 100
        }
      ],
      "segment_exists": true,
      "collections": [
        {
          "collection_id": "ghzinc",
          "name": "GHz Inc"
        },
        {
          "collection_id": "phzsystems",
          "name": "PHz Systems"
        },
        {
          "collection_id": "ghzglobal",
          "name": "GHz Global"
        }
      ],
      "created_time": "2021-05-12T23:20:50.52Z",
      "updated_time": "2021-05-12T23:20:50.52Z",
      "href": "https://us-south.apprapp.cloud.ibm.com/apprapp/feature/v1/instances/9xxxxx-xxxxx-xxxxx-b3cd-xxxxx/environments/dev/features/cycle-rentals"
    }
  • {
      "code": "FTEC1003E",
      "message": "Error while creating the feature."
    }
  • {
      "code": "FTEC1003E",
      "message": "Error while creating the feature."
    }
  • {
      "code": "FTEC1011E",
      "message": "Currently 'rollout_percentage' feature is not available"
    }
  • {
      "code": "FTEC1011E",
      "message": "Currently 'rollout_percentage' feature is not available"
    }

Update Feature

Update a feature flag details

Update a feature flag details.

PUT /environments/{environment_id}/features/{feature_id}
(appConfiguration *AppConfigurationV1) UpdateFeature(updateFeatureOptions *UpdateFeatureOptions) (result *Feature, response *core.DetailedResponse, err error)
(appConfiguration *AppConfigurationV1) UpdateFeatureWithContext(ctx context.Context, updateFeatureOptions *UpdateFeatureOptions) (result *Feature, 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.

  • apprapp.features.update

Auditing

Calling this method generates the following auditing event.

  • apprapp.features.update

Request

Instantiate the UpdateFeatureOptions struct and set the fields to provide parameter values for the UpdateFeature method.

Path Parameters

  • Environment Id

    Example: environment_id

  • Feature Id

    Example: feature_id

The request body to update a feature.

Examples:
type_boolean
type_numeric
type_string_text
type_string_json
type_string_yaml

WithContext method only

The UpdateFeature options.

  • curl -X PUT --location --header "Authorization: Bearer {iam_token}"   --header "Accept: application/json"   --header "Content-Type: application/json"   --data '{ "name": "Cycle Rentals", "description": "Feature flags to enable Cycle Rentals", "enabled_value": true, "disabled_value": false, "enabled": true, "rollout_percentage": 100, "tags": "version: 1.1, yet-to-release", "segment_rules": [ { "rules": [ { "segments": [ "betausers", "premiumusers" ] } ], "value": true, "order": 1, "rollout_percentage": 90 }, { "rules": [ { "segments": [ "freeusers" ] } ], "value": false, "order": 2, "rollout_percentage": 90 } ], "collections": [ { "collection_id": "ghzinc" }, { "collection_id": "phzsystems" } ] }'   "{base_url}/environments/{environment_id}/features/{feature_id}"
  • targetSegmentsModel := &appconfigurationv1.TargetSegments{
      Segments: []string{"betausers", "premiumusers"},
    }
    
    featureSegmentRuleModel := &appconfigurationv1.FeatureSegmentRule{
      Rules: []appconfigurationv1.TargetSegments{*targetSegmentsModel},
      Value: core.StringPtr("true"),
      Order: core.Int64Ptr(int64(1)),
      RolloutPercentage: core.Int64Ptr(int64(90)),
    }
    
    collectionRefModel := &appconfigurationv1.CollectionRef{
      CollectionID: core.StringPtr("ghzinc"),
    }
    
    updateFeatureOptions := appConfigurationService.NewUpdateFeatureOptions(
      "environment_id",
      "feature_id",
    )
    updateFeatureOptions.SetName("Cycle Rentals")
    updateFeatureOptions.SetDescription("Feature flags to enable Cycle Rentals")
    updateFeatureOptions.SetEnabledValue("true")
    updateFeatureOptions.SetDisabledValue("false")
    updateFeatureOptions.SetEnabled(true)
    updateFeatureOptions.SetRolloutPercentage(int64(100))
    updateFeatureOptions.SetTags("version: 1.1, yet-to-release")
    updateFeatureOptions.SetSegmentRules([]appconfigurationv1.FeatureSegmentRule{*featureSegmentRuleModel})
    updateFeatureOptions.SetCollections([]appconfigurationv1.CollectionRef{*collectionRefModel})
    
    feature, response, err := appConfigurationService.UpdateFeature(updateFeatureOptions)
    if err != nil {
      panic(err)
    }
    b, _ := json.MarshalIndent(feature, "", "  ")
    fmt.Println(string(b))

Response

Details of the feature.

Details of the feature.

Examples:
View

Status Code

  • Successfully updated the feature flag details

  • Bad request. Verify that the information in the request body is complete and correct.

  • Not Found. Verify that the feature id is correct.

  • Not Implemented.

Example responses
  • {
      "name": "Cycle Rentals",
      "feature_id": "cycle-rentals",
      "description": "Feature flag to enable Cycle Rentals",
      "type": "BOOLEAN",
      "enabled_value": true,
      "disabled_value": false,
      "enabled": true,
      "rollout_percentage": 100,
      "tags": "version: 1.1, pre-release",
      "change_request_status": "PENDING",
      "change_request_number": "CHG0030423",
      "segment_rules": [
        {
          "rules": [
            {
              "segments": [
                "betausers",
                "premiumusers"
              ]
            }
          ],
          "value": true,
          "order": 1,
          "rollout_percentage": 90
        },
        {
          "rules": [
            {
              "segments": [
                "freeusers"
              ]
            }
          ],
          "value": false,
          "order": 2,
          "rollout_percentage": 90
        }
      ],
      "segment_exists": true,
      "collections": [
        {
          "collection_id": "ghzinc",
          "name": "GHz Inc"
        },
        {
          "collection_id": "phzsystems",
          "name": "PHz Systems"
        },
        {
          "collection_id": "ghzglobal",
          "name": "GHz Global"
        }
      ],
      "created_time": "2021-05-12T23:20:50.52Z",
      "updated_time": "2021-05-12T23:20:50.52Z",
      "href": "https://us-south.apprapp.cloud.ibm.com/apprapp/feature/v1/instances/9xxxxx-xxxxx-xxxxx-b3cd-xxxxx/environments/dev/features/cycle-rentals"
    }
  • {
      "name": "Cycle Rentals",
      "feature_id": "cycle-rentals",
      "description": "Feature flag to enable Cycle Rentals",
      "type": "BOOLEAN",
      "enabled_value": true,
      "disabled_value": false,
      "enabled": true,
      "rollout_percentage": 100,
      "tags": "version: 1.1, pre-release",
      "change_request_status": "PENDING",
      "change_request_number": "CHG0030423",
      "segment_rules": [
        {
          "rules": [
            {
              "segments": [
                "betausers",
                "premiumusers"
              ]
            }
          ],
          "value": true,
          "order": 1,
          "rollout_percentage": 90
        },
        {
          "rules": [
            {
              "segments": [
                "freeusers"
              ]
            }
          ],
          "value": false,
          "order": 2,
          "rollout_percentage": 90
        }
      ],
      "segment_exists": true,
      "collections": [
        {
          "collection_id": "ghzinc",
          "name": "GHz Inc"
        },
        {
          "collection_id": "phzsystems",
          "name": "PHz Systems"
        },
        {
          "collection_id": "ghzglobal",
          "name": "GHz Global"
        }
      ],
      "created_time": "2021-05-12T23:20:50.52Z",
      "updated_time": "2021-05-12T23:20:50.52Z",
      "href": "https://us-south.apprapp.cloud.ibm.com/apprapp/feature/v1/instances/9xxxxx-xxxxx-xxxxx-b3cd-xxxxx/environments/dev/features/cycle-rentals"
    }
  • {
      "name": "Cycle Rentals",
      "feature_id": "cycle-rentals",
      "description": "Feature flag to enable Cycle Rentals",
      "type": "NUMERIC",
      "enabled_value": 1,
      "disabled_value": 0,
      "enabled": true,
      "rollout_percentage": 100,
      "tags": "version: 1.1, pre-release",
      "change_request_status": "PENDING",
      "change_request_number": "CHG0030423",
      "segment_rules": [
        {
          "rules": [
            {
              "segments": [
                "betausers",
                "premiumusers"
              ]
            }
          ],
          "value": 10,
          "order": 1,
          "rollout_percentage": 40
        },
        {
          "rules": [
            {
              "segments": [
                "freeusers"
              ]
            }
          ],
          "value": 0,
          "order": 2,
          "rollout_percentage": 70
        }
      ],
      "segment_exists": true,
      "collections": [
        {
          "collection_id": "ghzinc",
          "name": "GHz Inc"
        },
        {
          "collection_id": "phzsystems",
          "name": "PHz Systems"
        },
        {
          "collection_id": "ghzglobal",
          "name": "GHz Global"
        }
      ],
      "created_time": "2021-05-12T23:20:50.52Z",
      "updated_time": "2021-05-12T23:20:50.52Z",
      "href": "https://us-south.apprapp.cloud.ibm.com/apprapp/feature/v1/instances/9xxxxx-xxxxx-xxxxx-b3cd-xxxxx/environments/dev/features/cycle-rentals"
    }
  • {
      "name": "Cycle Rentals",
      "feature_id": "cycle-rentals",
      "description": "Feature flag to enable Cycle Rentals",
      "type": "NUMERIC",
      "enabled_value": 1,
      "disabled_value": 0,
      "enabled": true,
      "rollout_percentage": 100,
      "tags": "version: 1.1, pre-release",
      "change_request_status": "PENDING",
      "change_request_number": "CHG0030423",
      "segment_rules": [
        {
          "rules": [
            {
              "segments": [
                "betausers",
                "premiumusers"
              ]
            }
          ],
          "value": 10,
          "order": 1,
          "rollout_percentage": 40
        },
        {
          "rules": [
            {
              "segments": [
                "freeusers"
              ]
            }
          ],
          "value": 0,
          "order": 2,
          "rollout_percentage": 70
        }
      ],
      "segment_exists": true,
      "collections": [
        {
          "collection_id": "ghzinc",
          "name": "GHz Inc"
        },
        {
          "collection_id": "phzsystems",
          "name": "PHz Systems"
        },
        {
          "collection_id": "ghzglobal",
          "name": "GHz Global"
        }
      ],
      "created_time": "2021-05-12T23:20:50.52Z",
      "updated_time": "2021-05-12T23:20:50.52Z",
      "href": "https://us-south.apprapp.cloud.ibm.com/apprapp/feature/v1/instances/9xxxxx-xxxxx-xxxxx-b3cd-xxxxx/environments/dev/features/cycle-rentals"
    }
  • {
      "name": "Cycle Rentals",
      "feature_id": "cycle-rentals",
      "description": "Feature flag to enable Cycle Rentals",
      "type": "STRING",
      "format": "TEXT",
      "enabled_value": "yes",
      "disabled_value": "no",
      "enabled": true,
      "rollout_percentage": 100,
      "tags": "version: 1.1, pre-release",
      "change_request_status": "PENDING",
      "change_request_number": "CHG0030423",
      "segment_rules": [
        {
          "rules": [
            {
              "segments": [
                "betausers",
                "premiumusers"
              ]
            }
          ],
          "value": "no",
          "order": 1,
          "rollout_percentage": 50
        },
        {
          "rules": [
            {
              "segments": [
                "freeusers"
              ]
            }
          ],
          "value": "yes",
          "order": 2,
          "rollout_percentage": 15
        }
      ],
      "segment_exists": true,
      "collections": [
        {
          "collection_id": "ghzinc",
          "name": "GHz Inc"
        },
        {
          "collection_id": "phzsystems",
          "name": "PHz Systems"
        },
        {
          "collection_id": "ghzglobal",
          "name": "GHz Global"
        }
      ],
      "created_time": "2021-05-12T23:20:50.52Z",
      "updated_time": "2021-05-12T23:20:50.52Z",
      "href": "https://us-south.apprapp.cloud.ibm.com/apprapp/feature/v1/instances/9xxxxx-xxxxx-xxxxx-b3cd-xxxxx/environments/dev/features/cycle-rentals"
    }
  • {
      "name": "Cycle Rentals",
      "feature_id": "cycle-rentals",
      "description": "Feature flag to enable Cycle Rentals",
      "type": "STRING",
      "format": "TEXT",
      "enabled_value": "yes",
      "disabled_value": "no",
      "enabled": true,
      "rollout_percentage": 100,
      "tags": "version: 1.1, pre-release",
      "change_request_status": "PENDING",
      "change_request_number": "CHG0030423",
      "segment_rules": [
        {
          "rules": [
            {
              "segments": [
                "betausers",
                "premiumusers"
              ]
            }
          ],
          "value": "no",
          "order": 1,
          "rollout_percentage": 50
        },
        {
          "rules": [
            {
              "segments": [
                "freeusers"
              ]
            }
          ],
          "value": "yes",
          "order": 2,
          "rollout_percentage": 15
        }
      ],
      "segment_exists": true,
      "collections": [
        {
          "collection_id": "ghzinc",
          "name": "GHz Inc"
        },
        {
          "collection_id": "phzsystems",
          "name": "PHz Systems"
        },
        {
          "collection_id": "ghzglobal",
          "name": "GHz Global"
        }
      ],
      "created_time": "2021-05-12T23:20:50.52Z",
      "updated_time": "2021-05-12T23:20:50.52Z",
      "href": "https://us-south.apprapp.cloud.ibm.com/apprapp/feature/v1/instances/9xxxxx-xxxxx-xxxxx-b3cd-xxxxx/environments/dev/features/cycle-rentals"
    }
  • {
      "name": "Cycle Rentals",
      "feature_id": "cycle-rentals",
      "description": "Feature flag to enable Cycle Rentals",
      "type": "STRING",
      "format": "JSON",
      "enabled_value": {
        "availability": "yes"
      },
      "disabled_value": {
        "availability": "no"
      },
      "enabled": true,
      "rollout_percentage": 100,
      "tags": "version: 1.1, pre-release",
      "change_request_status": "PENDING",
      "change_request_number": "CHG0030423",
      "segment_rules": [
        {
          "rules": [
            {
              "segments": [
                "betausers",
                "premiumusers"
              ]
            }
          ],
          "value": {
            "availability": "no"
          },
          "order": 1,
          "rollout_percentage": 100
        },
        {
          "rules": [
            {
              "segments": [
                "freeusers"
              ]
            }
          ],
          "value": {
            "availability": "no"
          },
          "order": 2,
          "rollout_percentage": 100
        }
      ],
      "segment_exists": true,
      "collections": [
        {
          "collection_id": "ghzinc",
          "name": "GHz Inc"
        },
        {
          "collection_id": "phzsystems",
          "name": "PHz Systems"
        },
        {
          "collection_id": "ghzglobal",
          "name": "GHz Global"
        }
      ],
      "created_time": "2021-05-12T23:20:50.52Z",
      "updated_time": "2021-05-12T23:20:50.52Z",
      "href": "https://us-south.apprapp.cloud.ibm.com/apprapp/feature/v1/instances/9xxxxx-xxxxx-xxxxx-b3cd-xxxxx/environments/dev/features/cycle-rentals"
    }
  • {
      "name": "Cycle Rentals",
      "feature_id": "cycle-rentals",
      "description": "Feature flag to enable Cycle Rentals",
      "type": "STRING",
      "format": "JSON",
      "enabled_value": {
        "availability": "yes"
      },
      "disabled_value": {
        "availability": "no"
      },
      "enabled": true,
      "rollout_percentage": 100,
      "tags": "version: 1.1, pre-release",
      "change_request_status": "PENDING",
      "change_request_number": "CHG0030423",
      "segment_rules": [
        {
          "rules": [
            {
              "segments": [
                "betausers",
                "premiumusers"
              ]
            }
          ],
          "value": {
            "availability": "no"
          },
          "order": 1,
          "rollout_percentage": 100
        },
        {
          "rules": [
            {
              "segments": [
                "freeusers"
              ]
            }
          ],
          "value": {
            "availability": "no"
          },
          "order": 2,
          "rollout_percentage": 100
        }
      ],
      "segment_exists": true,
      "collections": [
        {
          "collection_id": "ghzinc",
          "name": "GHz Inc"
        },
        {
          "collection_id": "phzsystems",
          "name": "PHz Systems"
        },
        {
          "collection_id": "ghzglobal",
          "name": "GHz Global"
        }
      ],
      "created_time": "2021-05-12T23:20:50.52Z",
      "updated_time": "2021-05-12T23:20:50.52Z",
      "href": "https://us-south.apprapp.cloud.ibm.com/apprapp/feature/v1/instances/9xxxxx-xxxxx-xxxxx-b3cd-xxxxx/environments/dev/features/cycle-rentals"
    }
  • {
      "name": "Cycle Rentals",
      "feature_id": "cycle-rentals",
      "description": "Feature flag to enable Cycle Rentals",
      "type": "STRING",
      "format": "YAML",
      "enabled_value": "---\navailability: 'yes'",
      "disabled_value": "---\navailability: 'no'",
      "enabled": true,
      "rollout_percentage": 100,
      "tags": "version: 1.1, pre-release",
      "change_request_status": "PENDING",
      "change_request_number": "CHG0030423",
      "segment_rules": [
        {
          "rules": [
            {
              "segments": [
                "betausers",
                "premiumusers"
              ]
            }
          ],
          "value": "---\navailability: 'yes'\npremium_user_ids:\n- custId1\n- custId2",
          "order": 1,
          "rollout_percentage": 100
        },
        {
          "rules": [
            {
              "segments": [
                "freeusers"
              ]
            }
          ],
          "value": "---\navailability: 'no'",
          "order": 2,
          "rollout_percentage": 100
        }
      ],
      "segment_exists": true,
      "collections": [
        {
          "collection_id": "ghzinc",
          "name": "GHz Inc"
        },
        {
          "collection_id": "phzsystems",
          "name": "PHz Systems"
        },
        {
          "collection_id": "ghzglobal",
          "name": "GHz Global"
        }
      ],
      "created_time": "2021-05-12T23:20:50.52Z",
      "updated_time": "2021-05-12T23:20:50.52Z",
      "href": "https://us-south.apprapp.cloud.ibm.com/apprapp/feature/v1/instances/9xxxxx-xxxxx-xxxxx-b3cd-xxxxx/environments/dev/features/cycle-rentals"
    }
  • {
      "name": "Cycle Rentals",
      "feature_id": "cycle-rentals",
      "description": "Feature flag to enable Cycle Rentals",
      "type": "STRING",
      "format": "YAML",
      "enabled_value": "---\navailability: 'yes'",
      "disabled_value": "---\navailability: 'no'",
      "enabled": true,
      "rollout_percentage": 100,
      "tags": "version: 1.1, pre-release",
      "change_request_status": "PENDING",
      "change_request_number": "CHG0030423",
      "segment_rules": [
        {
          "rules": [
            {
              "segments": [
                "betausers",
                "premiumusers"
              ]
            }
          ],
          "value": "---\navailability: 'yes'\npremium_user_ids:\n- custId1\n- custId2",
          "order": 1,
          "rollout_percentage": 100
        },
        {
          "rules": [
            {
              "segments": [
                "freeusers"
              ]
            }
          ],
          "value": "---\navailability: 'no'",
          "order": 2,
          "rollout_percentage": 100
        }
      ],
      "segment_exists": true,
      "collections": [
        {
          "collection_id": "ghzinc",
          "name": "GHz Inc"
        },
        {
          "collection_id": "phzsystems",
          "name": "PHz Systems"
        },
        {
          "collection_id": "ghzglobal",
          "name": "GHz Global"
        }
      ],
      "created_time": "2021-05-12T23:20:50.52Z",
      "updated_time": "2021-05-12T23:20:50.52Z",
      "href": "https://us-south.apprapp.cloud.ibm.com/apprapp/feature/v1/instances/9xxxxx-xxxxx-xxxxx-b3cd-xxxxx/environments/dev/features/cycle-rentals"
    }
  • {
      "code": "FTEC1007E",
      "message": "Error while updating the feature."
    }
  • {
      "code": "FTEC1007E",
      "message": "Error while updating the feature."
    }
  • {
      "code": "FTEC1000E",
      "message": "Error while updating the feature. The queried resource 'Feature' is not available on the server."
    }
  • {
      "code": "FTEC1000E",
      "message": "Error while updating the feature. The queried resource 'Feature' is not available on the server."
    }
  • {
      "code": "FTEC1011E",
      "message": "Currently 'rollout_percentage' feature is not available"
    }
  • {
      "code": "FTEC1011E",
      "message": "Currently 'rollout_percentage' feature is not available"
    }

Update Feature Values

Update the feature values. This method can be executed only by the writer role. This method allows the update of feature name, feature enabled_value, feature disabled_value, tags, description and feature segment rules, however this method does not allow toggling the feature flag and assigning feature to a collection.

Update the feature values. This method can be executed only by the writer role. This method allows the update of feature name, feature enabled_value, feature disabled_value, tags, description and feature segment rules, however this method does not allow toggling the feature flag and assigning feature to a collection.

PATCH /environments/{environment_id}/features/{feature_id}
(appConfiguration *AppConfigurationV1) UpdateFeatureValues(updateFeatureValuesOptions *UpdateFeatureValuesOptions) (result *Feature, response *core.DetailedResponse, err error)
(appConfiguration *AppConfigurationV1) UpdateFeatureValuesWithContext(ctx context.Context, updateFeatureValuesOptions *UpdateFeatureValuesOptions) (result *Feature, 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.

  • apprapp.features.patch

Auditing

Calling this method generates the following auditing event.

  • apprapp.features.updatevalues

Request

Instantiate the UpdateFeatureValuesOptions struct and set the fields to provide parameter values for the UpdateFeatureValues method.

Path Parameters

  • Environment Id

    Example: environment_id

  • Feature Id

    Example: feature_id

The request body to update the feature values.

Examples:
type_boolean
type_numeric
type_string_text
type_string_json
type_string_yaml

WithContext method only

The UpdateFeatureValues options.

  • curl -X PATCH --location --header "Authorization: Bearer {iam_token}"   --header "Accept: application/json"   --header "Content-Type: application/json"   --data '{ "name": "Cycle Rentals", "description": "Feature flags to enable Cycle Rentals", "enabled_value": true, "disabled_value": false, "rollout_percentage": 100, "tags": "version: 1.1, yet-to-release", "segment_rules": [ { "rules": [ { "segments": [ "betausers", "premiumusers" ] } ], "value": true, "order": 1, "rollout_percentage": 100 }, { "rules": [ { "segments": [ "freeusers" ] } ], "value": false, "order": 2, "rollout_percentage": 100 } ] }'   "{base_url}/environments/{environment_id}/features/{feature_id}"
  • targetSegmentsModel := &appconfigurationv1.TargetSegments{
      Segments: []string{"betausers", "premiumusers"},
    }
    
    featureSegmentRuleModel := &appconfigurationv1.FeatureSegmentRule{
      Rules: []appconfigurationv1.TargetSegments{*targetSegmentsModel},
      Value: core.StringPtr("true"),
      Order: core.Int64Ptr(int64(1)),
      RolloutPercentage: core.Int64Ptr(int64(100)),
    }
    
    updateFeatureValuesOptions := appConfigurationService.NewUpdateFeatureValuesOptions(
      "environment_id",
      "feature_id",
    )
    updateFeatureValuesOptions.SetName("Cycle Rentals")
    updateFeatureValuesOptions.SetDescription("Feature flags to enable Cycle Rentals")
    updateFeatureValuesOptions.SetTags("version: 1.1, yet-to-release")
    updateFeatureValuesOptions.SetEnabledValue("true")
    updateFeatureValuesOptions.SetDisabledValue("false")
    updateFeatureValuesOptions.SetRolloutPercentage(int64(100))
    updateFeatureValuesOptions.SetSegmentRules([]appconfigurationv1.FeatureSegmentRule{*featureSegmentRuleModel})
    
    feature, response, err := appConfigurationService.UpdateFeatureValues(updateFeatureValuesOptions)
    if err != nil {
      panic(err)
    }
    b, _ := json.MarshalIndent(feature, "", "  ")
    fmt.Println(string(b))

Response

Details of the feature.

Details of the feature.

Examples:
View

Status Code

  • Successfully updated the feature values.

  • Bad request. Verify that the information in the request body is complete and correct.

  • Not Found. Verify that the feature id is correct.

  • Not Implemented.

Example responses
  • {
      "name": "Cycle Rentals",
      "feature_id": "cycle-rentals",
      "description": "Feature flag to enable Cycle Rentals",
      "type": "BOOLEAN",
      "enabled_value": true,
      "disabled_value": false,
      "enabled": true,
      "rollout_percentage": 100,
      "tags": "version: 1.1, pre-release",
      "segment_rules": [
        {
          "rules": [
            {
              "segments": [
                "betausers",
                "premiumusers"
              ]
            }
          ],
          "value": true,
          "order": 1,
          "rollout_percentage": 100
        },
        {
          "rules": [
            {
              "segments": [
                "freeusers"
              ]
            }
          ],
          "value": false,
          "order": 2,
          "rollout_percentage": 100
        }
      ],
      "segment_exists": true,
      "collections": [
        {
          "collection_id": "ghzinc",
          "name": "GHz Inc"
        },
        {
          "collection_id": "phzsystems",
          "name": "PHz Systems"
        },
        {
          "collection_id": "ghzglobal",
          "name": "GHz Global"
        }
      ],
      "created_time": "2021-05-12T23:20:50.52Z",
      "updated_time": "2021-05-12T23:20:50.52Z",
      "href": "https://us-south.apprapp.cloud.ibm.com/apprapp/feature/v1/instances/9xxxxx-xxxxx-xxxxx-b3cd-xxxxx/environments/dev/features/cycle-rentals"
    }
  • {
      "name": "Cycle Rentals",
      "feature_id": "cycle-rentals",
      "description": "Feature flag to enable Cycle Rentals",
      "type": "BOOLEAN",
      "enabled_value": true,
      "disabled_value": false,
      "enabled": true,
      "rollout_percentage": 100,
      "tags": "version: 1.1, pre-release",
      "segment_rules": [
        {
          "rules": [
            {
              "segments": [
                "betausers",
                "premiumusers"
              ]
            }
          ],
          "value": true,
          "order": 1,
          "rollout_percentage": 100
        },
        {
          "rules": [
            {
              "segments": [
                "freeusers"
              ]
            }
          ],
          "value": false,
          "order": 2,
          "rollout_percentage": 100
        }
      ],
      "segment_exists": true,
      "collections": [
        {
          "collection_id": "ghzinc",
          "name": "GHz Inc"
        },
        {
          "collection_id": "phzsystems",
          "name": "PHz Systems"
        },
        {
          "collection_id": "ghzglobal",
          "name": "GHz Global"
        }
      ],
      "created_time": "2021-05-12T23:20:50.52Z",
      "updated_time": "2021-05-12T23:20:50.52Z",
      "href": "https://us-south.apprapp.cloud.ibm.com/apprapp/feature/v1/instances/9xxxxx-xxxxx-xxxxx-b3cd-xxxxx/environments/dev/features/cycle-rentals"
    }
  • {
      "name": "Cycle Rentals",
      "feature_id": "cycle-rentals",
      "description": "Feature flag to enable Cycle Rentals",
      "type": "NUMERIC",
      "enabled_value": 1,
      "disabled_value": 0,
      "enabled": true,
      "rollout_percentage": 100,
      "tags": "version: 1.1, pre-release",
      "segment_rules": [
        {
          "rules": [
            {
              "segments": [
                "betausers",
                "premiumusers"
              ]
            }
          ],
          "value": 10,
          "order": 1,
          "rollout_percentage": 100
        },
        {
          "rules": [
            {
              "segments": [
                "freeusers"
              ]
            }
          ],
          "value": 0,
          "order": 2,
          "rollout_percentage": 100
        }
      ],
      "segment_exists": true,
      "collections": [
        {
          "collection_id": "ghzinc",
          "name": "GHz Inc"
        },
        {
          "collection_id": "phzsystems",
          "name": "PHz Systems"
        },
        {
          "collection_id": "ghzglobal",
          "name": "GHz Global"
        }
      ],
      "created_time": "2021-05-12T23:20:50.52Z",
      "updated_time": "2021-05-12T23:20:50.52Z",
      "href": "https://us-south.apprapp.cloud.ibm.com/apprapp/feature/v1/instances/9xxxxx-xxxxx-xxxxx-b3cd-xxxxx/environments/dev/features/cycle-rentals"
    }
  • {
      "name": "Cycle Rentals",
      "feature_id": "cycle-rentals",
      "description": "Feature flag to enable Cycle Rentals",
      "type": "NUMERIC",
      "enabled_value": 1,
      "disabled_value": 0,
      "enabled": true,
      "rollout_percentage": 100,
      "tags": "version: 1.1, pre-release",
      "segment_rules": [
        {
          "rules": [
            {
              "segments": [
                "betausers",
                "premiumusers"
              ]
            }
          ],
          "value": 10,
          "order": 1,
          "rollout_percentage": 100
        },
        {
          "rules": [
            {
              "segments": [
                "freeusers"
              ]
            }
          ],
          "value": 0,
          "order": 2,
          "rollout_percentage": 100
        }
      ],
      "segment_exists": true,
      "collections": [
        {
          "collection_id": "ghzinc",
          "name": "GHz Inc"
        },
        {
          "collection_id": "phzsystems",
          "name": "PHz Systems"
        },
        {
          "collection_id": "ghzglobal",
          "name": "GHz Global"
        }
      ],
      "created_time": "2021-05-12T23:20:50.52Z",
      "updated_time": "2021-05-12T23:20:50.52Z",
      "href": "https://us-south.apprapp.cloud.ibm.com/apprapp/feature/v1/instances/9xxxxx-xxxxx-xxxxx-b3cd-xxxxx/environments/dev/features/cycle-rentals"
    }
  • {
      "name": "Cycle Rentals",
      "feature_id": "cycle-rentals",
      "description": "Feature flag to enable Cycle Rentals",
      "type": "STRING",
      "format": "TEXT",
      "enabled_value": "yes",
      "disabled_value": "no",
      "enabled": true,
      "rollout_percentage": 100,
      "tags": "version: 1.1, pre-release",
      "segment_rules": [
        {
          "rules": [
            {
              "segments": [
                "betausers",
                "premiumusers"
              ]
            }
          ],
          "value": "no",
          "order": 1,
          "rollout_percentage": 100
        },
        {
          "rules": [
            {
              "segments": [
                "freeusers"
              ]
            }
          ],
          "value": "yes",
          "order": 2,
          "rollout_percentage": 100
        }
      ],
      "segment_exists": true,
      "collections": [
        {
          "collection_id": "ghzinc",
          "name": "GHz Inc"
        },
        {
          "collection_id": "phzsystems",
          "name": "PHz Systems"
        },
        {
          "collection_id": "ghzglobal",
          "name": "GHz Global"
        }
      ],
      "created_time": "2021-05-12T23:20:50.52Z",
      "updated_time": "2021-05-12T23:20:50.52Z",
      "href": "https://us-south.apprapp.cloud.ibm.com/apprapp/feature/v1/instances/9xxxxx-xxxxx-xxxxx-b3cd-xxxxx/environments/dev/features/cycle-rentals"
    }
  • {
      "name": "Cycle Rentals",
      "feature_id": "cycle-rentals",
      "description": "Feature flag to enable Cycle Rentals",
      "type": "STRING",
      "format": "TEXT",
      "enabled_value": "yes",
      "disabled_value": "no",
      "enabled": true,
      "rollout_percentage": 100,
      "tags": "version: 1.1, pre-release",
      "segment_rules": [
        {
          "rules": [
            {
              "segments": [
                "betausers",
                "premiumusers"
              ]
            }
          ],
          "value": "no",
          "order": 1,
          "rollout_percentage": 100
        },
        {
          "rules": [
            {
              "segments": [
                "freeusers"
              ]
            }
          ],
          "value": "yes",
          "order": 2,
          "rollout_percentage": 100
        }
      ],
      "segment_exists": true,
      "collections": [
        {
          "collection_id": "ghzinc",
          "name": "GHz Inc"
        },
        {
          "collection_id": "phzsystems",
          "name": "PHz Systems"
        },
        {
          "collection_id": "ghzglobal",
          "name": "GHz Global"
        }
      ],
      "created_time": "2021-05-12T23:20:50.52Z",
      "updated_time": "2021-05-12T23:20:50.52Z",
      "href": "https://us-south.apprapp.cloud.ibm.com/apprapp/feature/v1/instances/9xxxxx-xxxxx-xxxxx-b3cd-xxxxx/environments/dev/features/cycle-rentals"
    }
  • {
      "name": "Cycle Rentals",
      "feature_id": "cycle-rentals",
      "description": "Feature flag to enable Cycle Rentals",
      "type": "STRING",
      "format": "JSON",
      "enabled_value": {
        "availability": "yes"
      },
      "disabled_value": {
        "availability": "no"
      },
      "enabled": true,
      "rollout_percentage": 100,
      "tags": "version: 1.1, pre-release",
      "segment_rules": [
        {
          "rules": [
            {
              "segments": [
                "betausers",
                "premiumusers"
              ]
            }
          ],
          "value": {
            "availability": "no"
          },
          "order": 1,
          "rollout_percentage": 100
        },
        {
          "rules": [
            {
              "segments": [
                "freeusers"
              ]
            }
          ],
          "value": {
            "availability": "no"
          },
          "order": 2,
          "rollout_percentage": 100
        }
      ],
      "segment_exists": true,
      "collections": [
        {
          "collection_id": "ghzinc",
          "name": "GHz Inc"
        },
        {
          "collection_id": "phzsystems",
          "name": "PHz Systems"
        },
        {
          "collection_id": "ghzglobal",
          "name": "GHz Global"
        }
      ],
      "created_time": "2021-05-12T23:20:50.52Z",
      "updated_time": "2021-05-12T23:20:50.52Z",
      "href": "https://us-south.apprapp.cloud.ibm.com/apprapp/feature/v1/instances/9xxxxx-xxxxx-xxxxx-b3cd-xxxxx/environments/dev/features/cycle-rentals"
    }
  • {
      "name": "Cycle Rentals",
      "feature_id": "cycle-rentals",
      "description": "Feature flag to enable Cycle Rentals",
      "type": "STRING",
      "format": "JSON",
      "enabled_value": {
        "availability": "yes"
      },
      "disabled_value": {
        "availability": "no"
      },
      "enabled": true,
      "rollout_percentage": 100,
      "tags": "version: 1.1, pre-release",
      "segment_rules": [
        {
          "rules": [
            {
              "segments": [
                "betausers",
                "premiumusers"
              ]
            }
          ],
          "value": {
            "availability": "no"
          },
          "order": 1,
          "rollout_percentage": 100
        },
        {
          "rules": [
            {
              "segments": [
                "freeusers"
              ]
            }
          ],
          "value": {
            "availability": "no"
          },
          "order": 2,
          "rollout_percentage": 100
        }
      ],
      "segment_exists": true,
      "collections": [
        {
          "collection_id": "ghzinc",
          "name": "GHz Inc"
        },
        {
          "collection_id": "phzsystems",
          "name": "PHz Systems"
        },
        {
          "collection_id": "ghzglobal",
          "name": "GHz Global"
        }
      ],
      "created_time": "2021-05-12T23:20:50.52Z",
      "updated_time": "2021-05-12T23:20:50.52Z",
      "href": "https://us-south.apprapp.cloud.ibm.com/apprapp/feature/v1/instances/9xxxxx-xxxxx-xxxxx-b3cd-xxxxx/environments/dev/features/cycle-rentals"
    }
  • {
      "name": "Cycle Rentals",
      "feature_id": "cycle-rentals",
      "description": "Feature flag to enable Cycle Rentals",
      "type": "STRING",
      "format": "YAML",
      "enabled_value": "---\navailability: 'yes'",
      "disabled_value": "---\navailability: 'no'",
      "enabled": true,
      "rollout_percentage": 100,
      "tags": "version: 1.1, pre-release",
      "segment_rules": [
        {
          "rules": [
            {
              "segments": [
                "betausers",
                "premiumusers"
              ]
            }
          ],
          "value": "---\navailability: 'yes'\npremium_user_ids:\n- custId1\n- custId2",
          "order": 1,
          "rollout_percentage": 100
        },
        {
          "rules": [
            {
              "segments": [
                "freeusers"
              ]
            }
          ],
          "value": "---\navailability: 'no'",
          "order": 2,
          "rollout_percentage": 100
        }
      ],
      "segment_exists": true,
      "collections": [
        {
          "collection_id": "ghzinc",
          "name": "GHz Inc"
        },
        {
          "collection_id": "phzsystems",
          "name": "PHz Systems"
        },
        {
          "collection_id": "ghzglobal",
          "name": "GHz Global"
        }
      ],
      "created_time": "2021-05-12T23:20:50.52Z",
      "updated_time": "2021-05-12T23:20:50.52Z",
      "href": "https://us-south.apprapp.cloud.ibm.com/apprapp/feature/v1/instances/9xxxxx-xxxxx-xxxxx-b3cd-xxxxx/environments/dev/features/cycle-rentals"
    }
  • {
      "name": "Cycle Rentals",
      "feature_id": "cycle-rentals",
      "description": "Feature flag to enable Cycle Rentals",
      "type": "STRING",
      "format": "YAML",
      "enabled_value": "---\navailability: 'yes'",
      "disabled_value": "---\navailability: 'no'",
      "enabled": true,
      "rollout_percentage": 100,
      "tags": "version: 1.1, pre-release",
      "segment_rules": [
        {
          "rules": [
            {
              "segments": [
                "betausers",
                "premiumusers"
              ]
            }
          ],
          "value": "---\navailability: 'yes'\npremium_user_ids:\n- custId1\n- custId2",
          "order": 1,
          "rollout_percentage": 100
        },
        {
          "rules": [
            {
              "segments": [
                "freeusers"
              ]
            }
          ],
          "value": "---\navailability: 'no'",
          "order": 2,
          "rollout_percentage": 100
        }
      ],
      "segment_exists": true,
      "collections": [
        {
          "collection_id": "ghzinc",
          "name": "GHz Inc"
        },
        {
          "collection_id": "phzsystems",
          "name": "PHz Systems"
        },
        {
          "collection_id": "ghzglobal",
          "name": "GHz Global"
        }
      ],
      "created_time": "2021-05-12T23:20:50.52Z",
      "updated_time": "2021-05-12T23:20:50.52Z",
      "href": "https://us-south.apprapp.cloud.ibm.com/apprapp/feature/v1/instances/9xxxxx-xxxxx-xxxxx-b3cd-xxxxx/environments/dev/features/cycle-rentals"
    }
  • {
      "code": "FTEC1007E",
      "message": "Error while updating the feature values."
    }
  • {
      "code": "FTEC1007E",
      "message": "Error while updating the feature values."
    }
  • {
      "code": "FTEC1000E",
      "message": "Error while updating the feature. The queried resource 'Feature' is not available on the server."
    }
  • {
      "code": "FTEC1000E",
      "message": "Error while updating the feature. The queried resource 'Feature' is not available on the server."
    }
  • {
      "code": "FTEC1011E",
      "message": "Currently 'rollout_percentage' feature is not available"
    }
  • {
      "code": "FTEC1011E",
      "message": "Currently 'rollout_percentage' feature is not available"
    }

Get Feature

Retrieve details of a feature.

Retrieve details of a feature.

GET /environments/{environment_id}/features/{feature_id}
(appConfiguration *AppConfigurationV1) GetFeature(getFeatureOptions *GetFeatureOptions) (result *Feature, response *core.DetailedResponse, err error)
(appConfiguration *AppConfigurationV1) GetFeatureWithContext(ctx context.Context, getFeatureOptions *GetFeatureOptions) (result *Feature, 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.

  • apprapp.features.list

Auditing

Calling this method generates the following auditing event.

  • apprapp.features.read

Request

Instantiate the GetFeatureOptions struct and set the fields to provide parameter values for the GetFeature method.

Path Parameters

  • Environment Id

    Example: environment_id

  • Feature Id

    Example: feature_id

Query Parameters

  • Include the associated collections or targeting rules or change request details in the response.

    Allowable values: [collections,rules,change_request]

    Examples:
    View

WithContext method only

The GetFeature options.

  • curl -X GET --location --header "Authorization: Bearer {iam_token}"   --header "Accept: application/json"   "{base_url}/environments/{environment_id}/features/{feature_id}?include=collections,rules,change_request"
  • getFeatureOptions := appConfigurationService.NewGetFeatureOptions(
      "environment_id",
      "feature_id",
    )
    getFeatureOptions.SetInclude([]string{"collections", "rules", "change_request"})
    
    feature, response, err := appConfigurationService.GetFeature(getFeatureOptions)
    if err != nil {
      panic(err)
    }
    b, _ := json.MarshalIndent(feature, "", "  ")
    fmt.Println(string(b))

Response

Details of the feature.

Details of the feature.

Examples:
View

Status Code

  • Successfully retrieved the feature details.

  • Not Found. Verify that the feature id is correct.

Example responses
  • {
      "name": "Cycle Rentals",
      "feature_id": "cycle-rentals",
      "description": "Feature flag to enable Cycle Rentals",
      "type": "BOOLEAN",
      "enabled_value": true,
      "disabled_value": false,
      "enabled": true,
      "rollout_percentage": 90,
      "tags": "version: 1.1, pre-release",
      "change_request_status": "PENDING",
      "change_request_number": "CHG0030423",
      "segment_rules": [
        {
          "rules": [
            {
              "segments": [
                "betausers",
                "premiumusers"
              ]
            }
          ],
          "value": true,
          "order": 1,
          "rollout_percentage": 70
        },
        {
          "rules": [
            {
              "segments": [
                "freeusers"
              ]
            }
          ],
          "value": false,
          "order": 2,
          "rollout_percentage": 20
        }
      ],
      "segment_exists": true,
      "collections": [
        {
          "collection_id": "ghzinc",
          "name": "GHz Inc"
        },
        {
          "collection_id": "phzsystems",
          "name": "PHz Systems"
        },
        {
          "collection_id": "ghzglobal",
          "name": "GHz Global"
        }
      ],
      "created_time": "2021-05-12T23:20:50.52Z",
      "updated_time": "2021-05-12T23:20:50.52Z",
      "href": "https://us-south.apprapp.cloud.ibm.com/apprapp/feature/v1/instances/9xxxxx-xxxxx-xxxxx-b3cd-xxxxx/environments/dev/features/cycle-rentals"
    }
  • {
      "name": "Cycle Rentals",
      "feature_id": "cycle-rentals",
      "description": "Feature flag to enable Cycle Rentals",
      "type": "BOOLEAN",
      "enabled_value": true,
      "disabled_value": false,
      "enabled": true,
      "rollout_percentage": 90,
      "tags": "version: 1.1, pre-release",
      "change_request_status": "PENDING",
      "change_request_number": "CHG0030423",
      "segment_rules": [
        {
          "rules": [
            {
              "segments": [
                "betausers",
                "premiumusers"
              ]
            }
          ],
          "value": true,
          "order": 1,
          "rollout_percentage": 70
        },
        {
          "rules": [
            {
              "segments": [
                "freeusers"
              ]
            }
          ],
          "value": false,
          "order": 2,
          "rollout_percentage": 20
        }
      ],
      "segment_exists": true,
      "collections": [
        {
          "collection_id": "ghzinc",
          "name": "GHz Inc"
        },
        {
          "collection_id": "phzsystems",
          "name": "PHz Systems"
        },
        {
          "collection_id": "ghzglobal",
          "name": "GHz Global"
        }
      ],
      "created_time": "2021-05-12T23:20:50.52Z",
      "updated_time": "2021-05-12T23:20:50.52Z",
      "href": "https://us-south.apprapp.cloud.ibm.com/apprapp/feature/v1/instances/9xxxxx-xxxxx-xxxxx-b3cd-xxxxx/environments/dev/features/cycle-rentals"
    }
  • {
      "code": "FTEC1000E",
      "message": "Error while retreiving the feature. The queried resource 'Feature' is not available on the server."
    }
  • {
      "code": "FTEC1000E",
      "message": "Error while retreiving the feature. The queried resource 'Feature' is not available on the server."
    }

Delete Feature

Delete a feature flag

Delete a feature flag.

DELETE /environments/{environment_id}/features/{feature_id}
(appConfiguration *AppConfigurationV1) DeleteFeature(deleteFeatureOptions *DeleteFeatureOptions) (response *core.DetailedResponse, err error)
(appConfiguration *AppConfigurationV1) DeleteFeatureWithContext(ctx context.Context, deleteFeatureOptions *DeleteFeatureOptions) (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.

  • apprapp.features.delete

Auditing

Calling this method generates the following auditing event.

  • apprapp.features.delete

Request

Instantiate the DeleteFeatureOptions struct and set the fields to provide parameter values for the DeleteFeature method.

Path Parameters

  • Environment Id

    Example: environment_id

  • Feature Id

    Example: feature_id

WithContext method only

The DeleteFeature options.

  • curl -X DELETE --location --header "Authorization: Bearer {iam_token}"   "{base_url}/environments/{environment_id}/features/{feature_id}"
  • deleteFeatureOptions := appConfigurationService.NewDeleteFeatureOptions(
      "environment_id",
      "feature_id",
    )
    
    response, err := appConfigurationService.DeleteFeature(deleteFeatureOptions)
    if err != nil {
      panic(err)
    }
    if response.StatusCode != 204 {
      fmt.Printf("\nUnexpected response status code received from DeleteFeature(): %d\n", response.StatusCode)
    }

Response

Status Code

  • Successfully deleted the specified feature.

  • Not Found. Verify that the feature id is correct.

Example responses
  • {
      "code": "FTEC1000E",
      "message": "Error while deleting the feature. The queried resource 'Feature' is not available on the server."
    }
  • {
      "code": "FTEC1000E",
      "message": "Error while deleting the feature. The queried resource 'Feature' is not available on the server."
    }

Toggle Feature

Toggle a feature.

Toggle a feature.

PUT /environments/{environment_id}/features/{feature_id}/toggle
(appConfiguration *AppConfigurationV1) ToggleFeature(toggleFeatureOptions *ToggleFeatureOptions) (result *Feature, response *core.DetailedResponse, err error)
(appConfiguration *AppConfigurationV1) ToggleFeatureWithContext(ctx context.Context, toggleFeatureOptions *ToggleFeatureOptions) (result *Feature, 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.

  • apprapp.features.toggle

Auditing

Calling this method generates the following auditing event.

  • apprapp.features.toggle

Request

Instantiate the ToggleFeatureOptions struct and set the fields to provide parameter values for the ToggleFeature method.

Path Parameters

  • Environment Id

    Example: environment_id

  • Feature Id

    Example: feature_id

The request body to toggle a feature.

Examples:
View

WithContext method only

The ToggleFeature options.

  • curl -X PUT --location --header "Authorization: Bearer {iam_token}"   --header "Accept: application/json"   --header "Content-Type: application/json"   --data '{"enabled":true}'   "{base_url}/environments/{environment_id}/features/{feature_id}/toggle"
  • toggleFeatureOptions := appConfigurationService.NewToggleFeatureOptions(
      "environment_id",
      "feature_id",
      true,
    )
    
    feature, response, err := appConfigurationService.ToggleFeature(toggleFeatureOptions)
    if err != nil {
      panic(err)
    }
    b, _ := json.MarshalIndent(feature, "", "  ")
    fmt.Println(string(b))

Response

Details of the feature.

Details of the feature.

Examples:
View

Status Code

  • Successfully toggled the specified feature.

  • Bad request.

  • Not Found. Verify that the feature id is correct.

Example responses
  • {
      "name": "Cycle Rentals",
      "feature_id": "cycle-rentals",
      "description": "Feature flag to enable Cycle Rentals",
      "type": "BOOLEAN",
      "enabled_value": true,
      "disabled_value": false,
      "enabled": true,
      "rollout_percentage": 90,
      "tags": "version: 1.1, pre-release",
      "change_request_status": "PENDING",
      "change_request_number": "CHG0030423",
      "segment_rules": [
        {
          "rules": [
            {
              "segments": [
                "betausers",
                "premiumusers"
              ]
            }
          ],
          "value": true,
          "order": 1,
          "rollout_percentage": 70
        },
        {
          "rules": [
            {
              "segments": [
                "freeusers"
              ]
            }
          ],
          "value": false,
          "order": 2,
          "rollout_percentage": 20
        }
      ],
      "segment_exists": true,
      "collections": [
        {
          "collection_id": "ghzinc",
          "name": "GHz Inc"
        },
        {
          "collection_id": "phzsystems",
          "name": "PHz Systems"
        },
        {
          "collection_id": "ghzglobal",
          "name": "GHz Global"
        }
      ],
      "created_time": "2021-05-12T23:20:50.52Z",
      "updated_time": "2021-05-12T23:20:50.52Z",
      "href": "https://us-south.apprapp.cloud.ibm.com/apprapp/feature/v1/instances/9xxxxx-xxxxx-xxxxx-b3cd-xxxxx/environments/dev/features/cycle-rentals"
    }
  • {
      "name": "Cycle Rentals",
      "feature_id": "cycle-rentals",
      "description": "Feature flag to enable Cycle Rentals",
      "type": "BOOLEAN",
      "enabled_value": true,
      "disabled_value": false,
      "enabled": true,
      "rollout_percentage": 90,
      "tags": "version: 1.1, pre-release",
      "change_request_status": "PENDING",
      "change_request_number": "CHG0030423",
      "segment_rules": [
        {
          "rules": [
            {
              "segments": [
                "betausers",
                "premiumusers"
              ]
            }
          ],
          "value": true,
          "order": 1,
          "rollout_percentage": 70
        },
        {
          "rules": [
            {
              "segments": [
                "freeusers"
              ]
            }
          ],
          "value": false,
          "order": 2,
          "rollout_percentage": 20
        }
      ],
      "segment_exists": true,
      "collections": [
        {
          "collection_id": "ghzinc",
          "name": "GHz Inc"
        },
        {
          "collection_id": "phzsystems",
          "name": "PHz Systems"
        },
        {
          "collection_id": "ghzglobal",
          "name": "GHz Global"
        }
      ],
      "created_time": "2021-05-12T23:20:50.52Z",
      "updated_time": "2021-05-12T23:20:50.52Z",
      "href": "https://us-south.apprapp.cloud.ibm.com/apprapp/feature/v1/instances/9xxxxx-xxxxx-xxxxx-b3cd-xxxxx/environments/dev/features/cycle-rentals"
    }
  • {
      "code": "FTEC1000E",
      "message": "Error in toggle feature request."
    }
  • {
      "code": "FTEC1000E",
      "message": "Error in toggle feature request."
    }
  • {
      "code": "FTEC1000E",
      "message": "Error while toggling the feature. The queried resource 'Feature' is not available on the server."
    }
  • {
      "code": "FTEC1000E",
      "message": "Error while toggling the feature. The queried resource 'Feature' is not available on the server."
    }

Get list of Properties

List all the properties in the specified environment.

List all the properties in the specified environment.

GET /environments/{environment_id}/properties
(appConfiguration *AppConfigurationV1) ListProperties(listPropertiesOptions *ListPropertiesOptions) (result *PropertiesList, response *core.DetailedResponse, err error)
(appConfiguration *AppConfigurationV1) ListPropertiesWithContext(ctx context.Context, listPropertiesOptions *ListPropertiesOptions) (result *PropertiesList, 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.

  • apprapp.properties.list

Auditing

Calling this method generates the following auditing event.

  • apprapp.properties.list

Request

Instantiate the ListPropertiesOptions struct and set the fields to provide parameter values for the ListProperties method.

Path Parameters

  • Environment Id

    Example: environment_id

Query Parameters

  • If set to true, returns expanded view of the resource details.

    Example: true

  • Sort the property details based on the specified attribute. By default, items are sorted by name.

    Allowable values: [created_time,updated_time,id,name]

    Example: created_time

  • Filter the resources to be returned based on the associated tags. Specify the parameter as a list of comma separated tags. Returns resources associated with any of the specified tags.

    Example: version 1.1,pre-release

  • Filter properties by a list of comma separated collections.

    Examples:
    View
  • Filter properties by a list of comma separated segments.

    Examples:
    View
  • Include the associated collections or targeting rules details in the response.

    Allowable values: [collections,rules]

    Examples:
    View
  • The number of records to retrieve. By default, the list operation return the first 10 records. To retrieve different set of records, use limit with offset to page through the available records.

    Possible values: 1 ≤ value ≤ 100

    Default: 10

  • The number of records to skip. By specifying offset, you retrieve a subset of items that starts with the offset value. Use offset with limit to page through the available records.

    Possible values: value ≥ 0

    Default: 0

  • Searches for the provided keyword and returns the appropriate row with that value. Here the search happens on the '[Name OR Tag]' of the entity

    Example: test tag

WithContext method only

The ListProperties options.

  • curl -X GET --location --header "Authorization: Bearer {iam_token}"   --header "Accept: application/json"   "{base_url}/environments/{environment_id}/properties?expand=true&sort=created_time&tags=version 1.1,pre-release&collections=my-collection-id,ghzindiapvtltd&segments=my-segment-id,beta-users&include=collections,rules&search=test tag"
  • listPropertiesOptions := &appconfigurationv1.ListPropertiesOptions{
      EnvironmentID: core.StringPtr("environment_id"),
      Expand: core.BoolPtr(true),
      Sort: core.StringPtr("created_time"),
      Tags: core.StringPtr("version 1.1,pre-release"),
      Collections: []string{"my-collection-id", "ghzindiapvtltd"},
      Segments: []string{"my-segment-id", "beta-users"},
      Include: []string{"collections", "rules"},
      Limit: core.Int64Ptr(int64(10)),
      Search: core.StringPtr("test tag"),
    }
    
    pager, err := appConfigurationService.NewPropertiesPager(listPropertiesOptions)
    if err != nil {
      panic(err)
    }
    
    var allResults []appconfigurationv1.Property
    for pager.HasNext() {
      nextPage, err := pager.GetNext()
      if err != nil {
        panic(err)
      }
      allResults = append(allResults, nextPage...)
    }
    b, _ := json.MarshalIndent(allResults, "", "  ")
    fmt.Println(string(b))

Response

List of all properties.

List of all properties.

Examples:
View

Status Code

  • Successfully listed all the properties.

  • Unauthorized

Example responses
  • {
      "properties": [
        {
          "name": "Email property",
          "property_id": "email-property",
          "description": "Property for email",
          "type": "BOOLEAN",
          "value": true,
          "tags": "version: 1.1, pre-release",
          "segment_rules": [
            {
              "rules": [
                {
                  "segments": [
                    "betausers",
                    "premiumusers"
                  ]
                }
              ],
              "value": true,
              "order": 1
            },
            {
              "rules": [
                {
                  "segments": [
                    "freeusers"
                  ]
                }
              ],
              "value": false,
              "order": 2
            }
          ],
          "segment_exists": true,
          "collections": [
            {
              "collection_id": "ghzinc"
            },
            {
              "collection_id": "phzsystems"
            },
            {
              "collection_id": "ghzglobal"
            }
          ],
          "created_time": "2021-05-12T23:20:50.52Z",
          "updated_time": "2021-05-12T23:20:50.52Z",
          "href": "https://us-south.apprapp.cloud.ibm.com/apprapp/feature/v1/instances/9xxxxx-xxxxx-xxxxx-b3cd-xxxxx/environments/dev/properties/email-property"
        }
      ],
      "limit": 10,
      "offset": 0,
      "total_count": 1,
      "first": {
        "href": "https://us-south.apprapp.cloud.ibm.com/apprapp/feature/v1/instances/9xxxxx-xxxxx-xxxxx-b3cd-xxxxx/environments/dev/properties?limit=10&offset=0"
      },
      "last": {
        "href": "https://us-south.apprapp.cloud.ibm.com/apprapp/feature/v1/instances/9xxxxx-xxxxx-xxxxx-b3cd-xxxxx/environments/dev/properties?limit=10&offset=0"
      }
    }
  • {
      "properties": [
        {
          "name": "Email property",
          "property_id": "email-property",
          "description": "Property for email",
          "type": "BOOLEAN",
          "value": true,
          "tags": "version: 1.1, pre-release",
          "segment_rules": [
            {
              "rules": [
                {
                  "segments": [
                    "betausers",
                    "premiumusers"
                  ]
                }
              ],
              "value": true,
              "order": 1
            },
            {
              "rules": [
                {
                  "segments": [
                    "freeusers"
                  ]
                }
              ],
              "value": false,
              "order": 2
            }
          ],
          "segment_exists": true,
          "collections": [
            {
              "collection_id": "ghzinc"
            },
            {
              "collection_id": "phzsystems"
            },
            {
              "collection_id": "ghzglobal"
            }
          ],
          "created_time": "2021-05-12T23:20:50.52Z",
          "updated_time": "2021-05-12T23:20:50.52Z",
          "href": "https://us-south.apprapp.cloud.ibm.com/apprapp/feature/v1/instances/9xxxxx-xxxxx-xxxxx-b3cd-xxxxx/environments/dev/properties/email-property"
        }
      ],
      "limit": 10,
      "offset": 0,
      "total_count": 1,
      "first": {
        "href": "https://us-south.apprapp.cloud.ibm.com/apprapp/feature/v1/instances/9xxxxx-xxxxx-xxxxx-b3cd-xxxxx/environments/dev/properties?limit=10&offset=0"
      },
      "last": {
        "href": "https://us-south.apprapp.cloud.ibm.com/apprapp/feature/v1/instances/9xxxxx-xxxxx-xxxxx-b3cd-xxxxx/environments/dev/properties?limit=10&offset=0"
      }
    }
  • {
      "message": "Unauthorized"
    }
  • {
      "message": "Unauthorized"
    }

Create Property

Create a Property

Create a Property.

POST /environments/{environment_id}/properties
(appConfiguration *AppConfigurationV1) CreateProperty(createPropertyOptions *CreatePropertyOptions) (result *Property, response *core.DetailedResponse, err error)
(appConfiguration *AppConfigurationV1) CreatePropertyWithContext(ctx context.Context, createPropertyOptions *CreatePropertyOptions) (result *Property, 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.

  • apprapp.properties.create

Auditing

Calling this method generates the following auditing event.

  • apprapp.properties.create

Request

Instantiate the CreatePropertyOptions struct and set the fields to provide parameter values for the CreateProperty method.

Path Parameters

  • Environment Id

    Example: environment_id

The request body to create a new property.

Examples:
type_boolean
type_numeric
type_secretref
type_string_text
type_string_json
type_string_yaml

WithContext method only

The CreateProperty options.

  • curl -X POST --location --header "Authorization: Bearer {iam_token}"   --header "Accept: application/json"   --header "Content-Type: application/json"   --data '{ "name": "Email property", "property_id": "email-property", "description": "Property for email", "type": "BOOLEAN", "value": true, "tags": "version: 1.1, pre-release", "segment_rules": [ { "rules": [ { "segments": [ "betausers", "premiumusers" ] } ], "value": true, "order": 1 }, { "rules": [ { "segments": [ "freeusers" ] } ], "value": false, "order": 2 } ], "collections": [ { "collection_id": "ghzinc" }, { "collection_id": "phzsystems" }, { "collection_id": "ghzglobal" } ] }'   "{base_url}/environments/{environment_id}/properties"
  • targetSegmentsModel := &appconfigurationv1.TargetSegments{
      Segments: []string{"betausers", "premiumusers"},
    }
    
    segmentRuleModel := &appconfigurationv1.SegmentRule{
      Rules: []appconfigurationv1.TargetSegments{*targetSegmentsModel},
      Value: core.StringPtr("true"),
      Order: core.Int64Ptr(int64(1)),
    }
    
    collectionRefModel := &appconfigurationv1.CollectionRef{
      CollectionID: core.StringPtr("ghzinc"),
    }
    
    createPropertyOptions := appConfigurationService.NewCreatePropertyOptions(
      "environment_id",
      "Email property",
      "email-property",
      "BOOLEAN",
      "true",
    )
    createPropertyOptions.SetDescription("Property for email")
    createPropertyOptions.SetTags("version: 1.1, pre-release")
    createPropertyOptions.SetSegmentRules([]appconfigurationv1.SegmentRule{*segmentRuleModel})
    createPropertyOptions.SetCollections([]appconfigurationv1.CollectionRef{*collectionRefModel})
    
    property, response, err := appConfigurationService.CreateProperty(createPropertyOptions)
    if err != nil {
      panic(err)
    }
    b, _ := json.MarshalIndent(property, "", "  ")
    fmt.Println(string(b))

Response

Details of the property.

Details of the property.

Examples:
View

Status Code

  • Successfully created the property.

  • Bad request. Verify that the information in the request body is complete and correct.

  • Not Implemented.

Example responses
  • {
      "name": "Email property",
      "property_id": "email-property",
      "description": "Property for email",
      "type": "BOOLEAN",
      "value": true,
      "tags": "version: 1.1, pre-release",
      "segment_rules": [
        {
          "rules": [
            {
              "segments": [
                "betausers",
                "premiumusers"
              ]
            }
          ],
          "value": true,
          "order": 1
        },
        {
          "rules": [
            {
              "segments": [
                "freeusers"
              ]
            }
          ],
          "value": false,
          "order": 2
        }
      ],
      "segment_exists": true,
      "collections": [
        {
          "collection_id": "ghzinc",
          "name": "GHz Inc"
        },
        {
          "collection_id": "phzsystems",
          "name": "PHz Systems"
        },
        {
          "collection_id": "ghzglobal",
          "name": "GHz Global"
        }
      ],
      "created_time": "2021-05-12T23:20:50.52Z",
      "updated_time": "2021-05-12T23:20:50.52Z",
      "href": "https://us-south.apprapp.cloud.ibm.com/apprapp/feature/v1/instances/9xxxxx-xxxxx-xxxxx-b3cd-xxxxx/environments/dev/properties/email-property"
    }
  • {
      "name": "Email property",
      "property_id": "email-property",
      "description": "Property for email",
      "type": "BOOLEAN",
      "value": true,
      "tags": "version: 1.1, pre-release",
      "segment_rules": [
        {
          "rules": [
            {
              "segments": [
                "betausers",
                "premiumusers"
              ]
            }
          ],
          "value": true,
          "order": 1
        },
        {
          "rules": [
            {
              "segments": [
                "freeusers"
              ]
            }
          ],
          "value": false,
          "order": 2
        }
      ],
      "segment_exists": true,
      "collections": [
        {
          "collection_id": "ghzinc",
          "name": "GHz Inc"
        },
        {
          "collection_id": "phzsystems",
          "name": "PHz Systems"
        },
        {
          "collection_id": "ghzglobal",
          "name": "GHz Global"
        }
      ],
      "created_time": "2021-05-12T23:20:50.52Z",
      "updated_time": "2021-05-12T23:20:50.52Z",
      "href": "https://us-south.apprapp.cloud.ibm.com/apprapp/feature/v1/instances/9xxxxx-xxxxx-xxxxx-b3cd-xxxxx/environments/dev/properties/email-property"
    }
  • {
      "name": "Email property",
      "property_id": "email-property",
      "description": "Property for email",
      "type": "NUMERIC",
      "value": 1,
      "tags": "version: 1.1, pre-release",
      "segment_rules": [
        {
          "rules": [
            {
              "segments": [
                "betausers",
                "premiumusers"
              ]
            }
          ],
          "value": 10,
          "order": 1
        },
        {
          "rules": [
            {
              "segments": [
                "freeusers"
              ]
            }
          ],
          "value": 0,
          "order": 2
        }
      ],
      "segment_exists": true,
      "collections": [
        {
          "collection_id": "ghzinc",
          "name": "GHz Inc"
        },
        {
          "collection_id": "phzsystems",
          "name": "PHz Systems"
        },
        {
          "collection_id": "ghzglobal",
          "name": "GHz Global"
        }
      ],
      "created_time": "2021-05-12T23:20:50.52Z",
      "updated_time": "2021-05-12T23:20:50.52Z",
      "href": "https://us-south.apprapp.cloud.ibm.com/apprapp/feature/v1/instances/9xxxxx-xxxxx-xxxxx-b3cd-xxxxx/environments/dev/properties/email-property"
    }
  • {
      "name": "Email property",
      "property_id": "email-property",
      "description": "Property for email",
      "type": "NUMERIC",
      "value": 1,
      "tags": "version: 1.1, pre-release",
      "segment_rules": [
        {
          "rules": [
            {
              "segments": [
                "betausers",
                "premiumusers"
              ]
            }
          ],
          "value": 10,
          "order": 1
        },
        {
          "rules": [
            {
              "segments": [
                "freeusers"
              ]
            }
          ],
          "value": 0,
          "order": 2
        }
      ],
      "segment_exists": true,
      "collections": [
        {
          "collection_id": "ghzinc",
          "name": "GHz Inc"
        },
        {
          "collection_id": "phzsystems",
          "name": "PHz Systems"
        },
        {
          "collection_id": "ghzglobal",
          "name": "GHz Global"
        }
      ],
      "created_time": "2021-05-12T23:20:50.52Z",
      "updated_time": "2021-05-12T23:20:50.52Z",
      "href": "https://us-south.apprapp.cloud.ibm.com/apprapp/feature/v1/instances/9xxxxx-xxxxx-xxxxx-b3cd-xxxxx/environments/dev/properties/email-property"
    }
  • {
      "name": "Email property",
      "property_id": "email-property",
      "description": "Property for email",
      "type": "SECRETREF",
      "value": {
        "secret_type": "kv",
        "id": "1312414-12341243fdsf-324dfsg-43fffg",
        "sm_instance_crn": "crn:v1:staging:public:apprapp_dev:us-south:a/7bf663503fc5e2e06b03d2ada843bf54:ssfffgr-f6ee-48a5-a11b-ade4aecfe378::"
      },
      "tags": "version: 1.1, pre-release",
      "segment_rules": [
        {
          "rules": [
            {
              "segments": [
                "betausers",
                "premiumusers"
              ]
            }
          ],
          "value": {
            "id": "2234566-334g566ghjj-222-4000123fg"
          },
          "order": 1
        },
        {
          "rules": [
            {
              "segments": [
                "freeusers"
              ]
            }
          ],
          "value": {
            "id": "2234566-334g566ghjj-222-4000123fg"
          },
          "order": 2
        }
      ],
      "segment_exists": true,
      "collections": [
        {
          "collection_id": "ghzinc",
          "name": "GHz Inc"
        },
        {
          "collection_id": "phzsystems",
          "name": "PHz Systems"
        },
        {
          "collection_id": "ghzglobal",
          "name": "GHz Global"
        }
      ],
      "created_time": "2021-05-12T23:20:50.52Z",
      "updated_time": "2021-05-12T23:20:50.52Z",
      "href": "https://us-south.apprapp.cloud.ibm.com/apprapp/feature/v1/instances/9xxxxx-xxxxx-xxxxx-b3cd-xxxxx/environments/dev/properties/email-property"
    }
  • {
      "name": "Email property",
      "property_id": "email-property",
      "description": "Property for email",
      "type": "SECRETREF",
      "value": {
        "secret_type": "kv",
        "id": "1312414-12341243fdsf-324dfsg-43fffg",
        "sm_instance_crn": "crn:v1:staging:public:apprapp_dev:us-south:a/7bf663503fc5e2e06b03d2ada843bf54:ssfffgr-f6ee-48a5-a11b-ade4aecfe378::"
      },
      "tags": "version: 1.1, pre-release",
      "segment_rules": [
        {
          "rules": [
            {
              "segments": [
                "betausers",
                "premiumusers"
              ]
            }
          ],
          "value": {
            "id": "2234566-334g566ghjj-222-4000123fg"
          },
          "order": 1
        },
        {
          "rules": [
            {
              "segments": [
                "freeusers"
              ]
            }
          ],
          "value": {
            "id": "2234566-334g566ghjj-222-4000123fg"
          },
          "order": 2
        }
      ],
      "segment_exists": true,
      "collections": [
        {
          "collection_id": "ghzinc",
          "name": "GHz Inc"
        },
        {
          "collection_id": "phzsystems",
          "name": "PHz Systems"
        },
        {
          "collection_id": "ghzglobal",
          "name": "GHz Global"
        }
      ],
      "created_time": "2021-05-12T23:20:50.52Z",
      "updated_time": "2021-05-12T23:20:50.52Z",
      "href": "https://us-south.apprapp.cloud.ibm.com/apprapp/feature/v1/instances/9xxxxx-xxxxx-xxxxx-b3cd-xxxxx/environments/dev/properties/email-property"
    }
  • {
      "name": "Email property",
      "property_id": "email-property",
      "description": "Property for email",
      "type": "STRING",
      "format": "TEXT",
      "value": "success",
      "tags": "version: 1.1, pre-release",
      "segment_rules": [
        {
          "rules": [
            {
              "segments": [
                "betausers",
                "premiumusers"
              ]
            }
          ],
          "value": "failed",
          "order": 1
        },
        {
          "rules": [
            {
              "segments": [
                "freeusers"
              ]
            }
          ],
          "value": "success",
          "order": 2
        }
      ],
      "segment_exists": true,
      "collections": [
        {
          "collection_id": "ghzinc",
          "name": "GHz Inc"
        },
        {
          "collection_id": "phzsystems",
          "name": "PHz Systems"
        },
        {
          "collection_id": "ghzglobal",
          "name": "GHz Global"
        }
      ],
      "created_time": "2021-05-12T23:20:50.52Z",
      "updated_time": "2021-05-12T23:20:50.52Z",
      "href": "https://us-south.apprapp.cloud.ibm.com/apprapp/feature/v1/instances/9xxxxx-xxxxx-xxxxx-b3cd-xxxxx/environments/dev/properties/email-property"
    }
  • {
      "name": "Email property",
      "property_id": "email-property",
      "description": "Property for email",
      "type": "STRING",
      "format": "TEXT",
      "value": "success",
      "tags": "version: 1.1, pre-release",
      "segment_rules": [
        {
          "rules": [
            {
              "segments": [
                "betausers",
                "premiumusers"
              ]
            }
          ],
          "value": "failed",
          "order": 1
        },
        {
          "rules": [
            {
              "segments": [
                "freeusers"
              ]
            }
          ],
          "value": "success",
          "order": 2
        }
      ],
      "segment_exists": true,
      "collections": [
        {
          "collection_id": "ghzinc",
          "name": "GHz Inc"
        },
        {
          "collection_id": "phzsystems",
          "name": "PHz Systems"
        },
        {
          "collection_id": "ghzglobal",
          "name": "GHz Global"
        }
      ],
      "created_time": "2021-05-12T23:20:50.52Z",
      "updated_time": "2021-05-12T23:20:50.52Z",
      "href": "https://us-south.apprapp.cloud.ibm.com/apprapp/feature/v1/instances/9xxxxx-xxxxx-xxxxx-b3cd-xxxxx/environments/dev/properties/email-property"
    }
  • {
      "name": "Email property",
      "property_id": "email-property",
      "description": "Property for email",
      "type": "STRING",
      "format": "JSON",
      "value": {
        "name": "email configuration",
        "id": "email-config-1",
        "description": "This email configuration for internal use",
        "value": {
          "Name": "ABC Inc",
          "Location": "India"
        },
        "tags": "internal",
        "employees_id": [
          "empId1",
          "empId2",
          "empId3",
          "empId4",
          "empId5"
        ]
      },
      "tags": "version: 1.1, pre-release",
      "segment_rules": [
        {
          "rules": [
            {
              "segments": [
                "betausers",
                "premiumusers"
              ]
            }
          ],
          "value": {
            "employees_id": [
              "empId100"
            ]
          },
          "order": 1
        },
        {
          "rules": [
            {
              "segments": [
                "freeusers"
              ]
            }
          ],
          "value": {
            "employees_id": [
              "empId11",
              "empId22",
              "empId33",
              "empId44",
              "empId55"
            ]
          },
          "order": 2
        }
      ],
      "segment_exists": true,
      "collections": [
        {
          "collection_id": "ghzinc",
          "name": "GHz Inc"
        },
        {
          "collection_id": "phzsystems",
          "name": "PHz Systems"
        },
        {
          "collection_id": "ghzglobal",
          "name": "GHz Global"
        }
      ],
      "created_time": "2021-05-12T23:20:50.52Z",
      "updated_time": "2021-05-12T23:20:50.52Z",
      "href": "https://us-south.apprapp.cloud.ibm.com/apprapp/feature/v1/instances/9xxxxx-xxxxx-xxxxx-b3cd-xxxxx/environments/dev/properties/email-property"
    }
  • {
      "name": "Email property",
      "property_id": "email-property",
      "description": "Property for email",
      "type": "STRING",
      "format": "JSON",
      "value": {
        "name": "email configuration",
        "id": "email-config-1",
        "description": "This email configuration for internal use",
        "value": {
          "Name": "ABC Inc",
          "Location": "India"
        },
        "tags": "internal",
        "employees_id": [
          "empId1",
          "empId2",
          "empId3",
          "empId4",
          "empId5"
        ]
      },
      "tags": "version: 1.1, pre-release",
      "segment_rules": [
        {
          "rules": [
            {
              "segments": [
                "betausers",
                "premiumusers"
              ]
            }
          ],
          "value": {
            "employees_id": [
              "empId100"
            ]
          },
          "order": 1
        },
        {
          "rules": [
            {
              "segments": [
                "freeusers"
              ]
            }
          ],
          "value": {
            "employees_id": [
              "empId11",
              "empId22",
              "empId33",
              "empId44",
              "empId55"
            ]
          },
          "order": 2
        }
      ],
      "segment_exists": true,
      "collections": [
        {
          "collection_id": "ghzinc",
          "name": "GHz Inc"
        },
        {
          "collection_id": "phzsystems",
          "name": "PHz Systems"
        },
        {
          "collection_id": "ghzglobal",
          "name": "GHz Global"
        }
      ],
      "created_time": "2021-05-12T23:20:50.52Z",
      "updated_time": "2021-05-12T23:20:50.52Z",
      "href": "https://us-south.apprapp.cloud.ibm.com/apprapp/feature/v1/instances/9xxxxx-xxxxx-xxxxx-b3cd-xxxxx/environments/dev/properties/email-property"
    }
  • {
      "name": "Email property",
      "property_id": "email-property",
      "description": "Property for email",
      "type": "STRING",
      "format": "YAML",
      "value": "---\nname: email configuration\nid: email-config-1\ndescription: This email configuration for internal use\nvalue:\n Name: ABC Inc\n Location: India\ntags: internal\nemployees_id:\n- empId1\n- empId2\n- empId3\n- empId4\n- empId5",
      "tags": "version: 1.1, pre-release",
      "segment_rules": [
        {
          "rules": [
            {
              "segments": [
                "betausers",
                "premiumusers"
              ]
            }
          ],
          "value": "---\nemployees_id:\n- empId100",
          "order": 1
        },
        {
          "rules": [
            {
              "segments": [
                "freeusers"
              ]
            }
          ],
          "value": "---\nemployees_id:\n- empId11\n- empId22\n- empId33\n- empId44\n- empId55",
          "order": 2
        }
      ],
      "segment_exists": true,
      "collections": [
        {
          "collection_id": "ghzinc",
          "name": "GHz Inc"
        },
        {
          "collection_id": "phzsystems",
          "name": "PHz Systems"
        },
        {
          "collection_id": "ghzglobal",
          "name": "GHz Global"
        }
      ],
      "created_time": "2021-05-12T23:20:50.52Z",
      "updated_time": "2021-05-12T23:20:50.52Z",
      "href": "https://us-south.apprapp.cloud.ibm.com/apprapp/feature/v1/instances/9xxxxx-xxxxx-xxxxx-b3cd-xxxxx/environments/dev/properties/email-property"
    }
  • {
      "name": "Email property",
      "property_id": "email-property",
      "description": "Property for email",
      "type": "STRING",
      "format": "YAML",
      "value": "---\nname: email configuration\nid: email-config-1\ndescription: This email configuration for internal use\nvalue:\n Name: ABC Inc\n Location: India\ntags: internal\nemployees_id:\n- empId1\n- empId2\n- empId3\n- empId4\n- empId5",
      "tags": "version: 1.1, pre-release",
      "segment_rules": [
        {
          "rules": [
            {
              "segments": [
                "betausers",
                "premiumusers"
              ]
            }
          ],
          "value": "---\nemployees_id:\n- empId100",
          "order": 1
        },
        {
          "rules": [
            {
              "segments": [
                "freeusers"
              ]
            }
          ],
          "value": "---\nemployees_id:\n- empId11\n- empId22\n- empId33\n- empId44\n- empId55",
          "order": 2
        }
      ],
      "segment_exists": true,
      "collections": [
        {
          "collection_id": "ghzinc",
          "name": "GHz Inc"
        },
        {
          "collection_id": "phzsystems",
          "name": "PHz Systems"
        },
        {
          "collection_id": "ghzglobal",
          "name": "GHz Global"
        }
      ],
      "created_time": "2021-05-12T23:20:50.52Z",
      "updated_time": "2021-05-12T23:20:50.52Z",
      "href": "https://us-south.apprapp.cloud.ibm.com/apprapp/feature/v1/instances/9xxxxx-xxxxx-xxxxx-b3cd-xxxxx/environments/dev/properties/email-property"
    }
  • {
      "code": "FTEC1003E",
      "message": "Error while creating the property."
    }
  • {
      "code": "FTEC1003E",
      "message": "Error while creating the property."
    }
  • {
      "code": "FTEC1011E",
      "message": "Currently 'secret manager integration' feature is not available"
    }
  • {
      "code": "FTEC1011E",
      "message": "Currently 'secret manager integration' feature is not available"
    }

Update Property

Update a Property.

Update a Property.

PUT /environments/{environment_id}/properties/{property_id}
(appConfiguration *AppConfigurationV1) UpdateProperty(updatePropertyOptions *UpdatePropertyOptions) (result *Property, response *core.DetailedResponse, err error)
(appConfiguration *AppConfigurationV1) UpdatePropertyWithContext(ctx context.Context, updatePropertyOptions *UpdatePropertyOptions) (result *Property, 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.

  • apprapp.properties.update

Auditing

Calling this method generates the following auditing event.

  • apprapp.properties.update

Request

Instantiate the UpdatePropertyOptions struct and set the fields to provide parameter values for the UpdateProperty method.

Path Parameters

  • Environment Id

    Example: environment_id

  • Property Id

    Example: property_id

The request body to update a property.

Examples:
type_boolean
type_numeric
type_secretref
type_string_text
type_string_json
type_string_yaml

WithContext method only

The UpdateProperty options.

  • curl -X PUT --location --header "Authorization: Bearer {iam_token}"   --header "Accept: application/json"   --header "Content-Type: application/json"   --data '{ "name": "Email property", "description": "Property for email", "value": true, "tags": "version: 1.1, pre-release", "segment_rules": [ { "rules": [ { "segments": [ "betausers", "premiumusers" ] } ], "value": true, "order": 1 }, { "rules": [ { "segments": [ "freeusers" ] } ], "value": false, "order": 2 } ], "collections": [ { "collection_id": "ghzinc" }, { "collection_id": "phzsystems" }, { "collection_id": "ghzglobal" } ] }'   "{base_url}/environments/{environment_id}/properties/{property_id}"
  • targetSegmentsModel := &appconfigurationv1.TargetSegments{
      Segments: []string{"betausers", "premiumusers"},
    }
    
    segmentRuleModel := &appconfigurationv1.SegmentRule{
      Rules: []appconfigurationv1.TargetSegments{*targetSegmentsModel},
      Value: core.StringPtr("true"),
      Order: core.Int64Ptr(int64(1)),
    }
    
    collectionRefModel := &appconfigurationv1.CollectionRef{
      CollectionID: core.StringPtr("ghzinc"),
    }
    
    updatePropertyOptions := appConfigurationService.NewUpdatePropertyOptions(
      "environment_id",
      "property_id",
    )
    updatePropertyOptions.SetName("Email property")
    updatePropertyOptions.SetDescription("Property for email")
    updatePropertyOptions.SetValue("true")
    updatePropertyOptions.SetTags("version: 1.1, pre-release")
    updatePropertyOptions.SetSegmentRules([]appconfigurationv1.SegmentRule{*segmentRuleModel})
    updatePropertyOptions.SetCollections([]appconfigurationv1.CollectionRef{*collectionRefModel})
    
    property, response, err := appConfigurationService.UpdateProperty(updatePropertyOptions)
    if err != nil {
      panic(err)
    }
    b, _ := json.MarshalIndent(property, "", "  ")
    fmt.Println(string(b))

Response

Details of the property.

Details of the property.

Examples:
View

Status Code

  • Successfully updated the property details.

  • Bad request. Verify that the information in the request body is complete and correct.

  • Not Found. Verify that the property id is correct.

  • Not Implemented.

Example responses
  • {
      "name": "Email property",
      "property_id": "email-property",
      "description": "Property for email",
      "type": "BOOLEAN",
      "value": true,
      "tags": "version: 1.1, pre-release",
      "segment_rules": [
        {
          "rules": [
            {
              "segments": [
                "betausers",
                "premiumusers"
              ]
            }
          ],
          "value": true,
          "order": 1
        },
        {
          "rules": [
            {
              "segments": [
                "freeusers"
              ]
            }
          ],
          "value": false,
          "order": 2
        }
      ],
      "segment_exists": true,
      "collections": [
        {
          "collection_id": "ghzinc",
          "name": "GHz Inc"
        },
        {
          "collection_id": "phzsystems",
          "name": "PHz Systems"
        },
        {
          "collection_id": "ghzglobal",
          "name": "GHz Global"
        }
      ],
      "created_time": "2021-05-12T23:20:50.52Z",
      "updated_time": "2021-05-12T23:20:50.52Z",
      "href": "https://us-south.apprapp.cloud.ibm.com/apprapp/feature/v1/instances/9xxxxx-xxxxx-xxxxx-b3cd-xxxxx/environments/dev/properties/email-property"
    }
  • {
      "name": "Email property",
      "property_id": "email-property",
      "description": "Property for email",
      "type": "BOOLEAN",
      "value": true,
      "tags": "version: 1.1, pre-release",
      "segment_rules": [
        {
          "rules": [
            {
              "segments": [
                "betausers",
                "premiumusers"
              ]
            }
          ],
          "value": true,
          "order": 1
        },
        {
          "rules": [
            {
              "segments": [
                "freeusers"
              ]
            }
          ],
          "value": false,
          "order": 2
        }
      ],
      "segment_exists": true,
      "collections": [
        {
          "collection_id": "ghzinc",
          "name": "GHz Inc"
        },
        {
          "collection_id": "phzsystems",
          "name": "PHz Systems"
        },
        {
          "collection_id": "ghzglobal",
          "name": "GHz Global"
        }
      ],
      "created_time": "2021-05-12T23:20:50.52Z",
      "updated_time": "2021-05-12T23:20:50.52Z",
      "href": "https://us-south.apprapp.cloud.ibm.com/apprapp/feature/v1/instances/9xxxxx-xxxxx-xxxxx-b3cd-xxxxx/environments/dev/properties/email-property"
    }
  • {
      "name": "Email property",
      "property_id": "email-property",
      "description": "Property for email",
      "type": "NUMERIC",
      "value": 10,
      "tags": "version: 1.1, pre-release",
      "segment_rules": [
        {
          "rules": [
            {
              "segments": [
                "betausers",
                "premiumusers"
              ]
            }
          ],
          "value": 100,
          "order": 1
        },
        {
          "rules": [
            {
              "segments": [
                "freeusers"
              ]
            }
          ],
          "value": 0,
          "order": 2
        }
      ],
      "segment_exists": true,
      "collections": [
        {
          "collection_id": "ghzinc",
          "name": "GHz Inc"
        },
        {
          "collection_id": "phzsystems",
          "name": "PHz Systems"
        },
        {
          "collection_id": "ghzglobal",
          "name": "GHz Global"
        }
      ],
      "created_time": "2021-05-12T23:20:50.52Z",
      "updated_time": "2021-05-12T23:20:50.52Z",
      "href": "https://us-south.apprapp.cloud.ibm.com/apprapp/feature/v1/instances/9xxxxx-xxxxx-xxxxx-b3cd-xxxxx/environments/dev/properties/email-property"
    }
  • {
      "name": "Email property",
      "property_id": "email-property",
      "description": "Property for email",
      "type": "NUMERIC",
      "value": 10,
      "tags": "version: 1.1, pre-release",
      "segment_rules": [
        {
          "rules": [
            {
              "segments": [
                "betausers",
                "premiumusers"
              ]
            }
          ],
          "value": 100,
          "order": 1
        },
        {
          "rules": [
            {
              "segments": [
                "freeusers"
              ]
            }
          ],
          "value": 0,
          "order": 2
        }
      ],
      "segment_exists": true,
      "collections": [
        {
          "collection_id": "ghzinc",
          "name": "GHz Inc"
        },
        {
          "collection_id": "phzsystems",
          "name": "PHz Systems"
        },
        {
          "collection_id": "ghzglobal",
          "name": "GHz Global"
        }
      ],
      "created_time": "2021-05-12T23:20:50.52Z",
      "updated_time": "2021-05-12T23:20:50.52Z",
      "href": "https://us-south.apprapp.cloud.ibm.com/apprapp/feature/v1/instances/9xxxxx-xxxxx-xxxxx-b3cd-xxxxx/environments/dev/properties/email-property"
    }
  • {
      "name": "Email property",
      "property_id": "email-property",
      "description": "Property for email",
      "type": "SECRETREF",
      "value": {
        "secret_type": "kv",
        "id": "1312414-12341243fdsf-324dfsg-43fffg",
        "sm_instance_crn": "crn:v1:staging:public:apprapp_dev:us-south:a/7bf663503fc5e2e06b03d2ada843bf54:ssfffgr-f6ee-48a5-a11b-ade4aecfe378::"
      },
      "tags": "version: 1.1, pre-release",
      "segment_rules": [
        {
          "rules": [
            {
              "segments": [
                "betausers",
                "premiumusers"
              ]
            }
          ],
          "value": {
            "id": "2234566-334g566ghjj-222-4000123fg"
          },
          "order": 1
        },
        {
          "rules": [
            {
              "segments": [
                "freeusers"
              ]
            }
          ],
          "value": {
            "id": "2234566-334g566ghjj-222-4000123fg"
          },
          "order": 2
        }
      ],
      "segment_exists": true,
      "collections": [
        {
          "collection_id": "ghzinc",
          "name": "GHz Inc"
        },
        {
          "collection_id": "phzsystems",
          "name": "PHz Systems"
        },
        {
          "collection_id": "ghzglobal",
          "name": "GHz Global"
        }
      ],
      "created_time": "2021-05-12T23:20:50.52Z",
      "updated_time": "2021-05-12T23:20:50.52Z",
      "href": "https://us-south.apprapp.cloud.ibm.com/apprapp/feature/v1/instances/9xxxxx-xxxxx-xxxxx-b3cd-xxxxx/environments/dev/properties/email-property"
    }
  • {
      "name": "Email property",
      "property_id": "email-property",
      "description": "Property for email",
      "type": "SECRETREF",
      "value": {
        "secret_type": "kv",
        "id": "1312414-12341243fdsf-324dfsg-43fffg",
        "sm_instance_crn": "crn:v1:staging:public:apprapp_dev:us-south:a/7bf663503fc5e2e06b03d2ada843bf54:ssfffgr-f6ee-48a5-a11b-ade4aecfe378::"
      },
      "tags": "version: 1.1, pre-release",
      "segment_rules": [
        {
          "rules": [
            {
              "segments": [
                "betausers",
                "premiumusers"
              ]
            }
          ],
          "value": {
            "id": "2234566-334g566ghjj-222-4000123fg"
          },
          "order": 1
        },
        {
          "rules": [
            {
              "segments": [
                "freeusers"
              ]
            }
          ],
          "value": {
            "id": "2234566-334g566ghjj-222-4000123fg"
          },
          "order": 2
        }
      ],
      "segment_exists": true,
      "collections": [
        {
          "collection_id": "ghzinc",
          "name": "GHz Inc"
        },
        {
          "collection_id": "phzsystems",
          "name": "PHz Systems"
        },
        {
          "collection_id": "ghzglobal",
          "name": "GHz Global"
        }
      ],
      "created_time": "2021-05-12T23:20:50.52Z",
      "updated_time": "2021-05-12T23:20:50.52Z",
      "href": "https://us-south.apprapp.cloud.ibm.com/apprapp/feature/v1/instances/9xxxxx-xxxxx-xxxxx-b3cd-xxxxx/environments/dev/properties/email-property"
    }
  • {
      "name": "Email property",
      "property_id": "email-property",
      "description": "Property for email",
      "type": "STRING",
      "format": "TEXT",
      "value": "success",
      "tags": "version: 1.1, pre-release",
      "segment_rules": [
        {
          "rules": [
            {
              "segments": [
                "betausers",
                "premiumusers"
              ]
            }
          ],
          "value": "fail",
          "order": 1
        },
        {
          "rules": [
            {
              "segments": [
                "freeusers"
              ]
            }
          ],
          "value": "success",
          "order": 2
        }
      ],
      "segment_exists": true,
      "collections": [
        {
          "collection_id": "ghzinc",
          "name": "GHz Inc"
        },
        {
          "collection_id": "phzsystems",
          "name": "PHz Systems"
        },
        {
          "collection_id": "ghzglobal",
          "name": "GHz Global"
        }
      ],
      "created_time": "2021-05-12T23:20:50.52Z",
      "updated_time": "2021-05-12T23:20:50.52Z",
      "href": "https://us-south.apprapp.cloud.ibm.com/apprapp/feature/v1/instances/9xxxxx-xxxxx-xxxxx-b3cd-xxxxx/environments/dev/properties/email-property"
    }
  • {
      "name": "Email property",
      "property_id": "email-property",
      "description": "Property for email",
      "type": "STRING",
      "format": "TEXT",
      "value": "success",
      "tags": "version: 1.1, pre-release",
      "segment_rules": [
        {
          "rules": [
            {
              "segments": [
                "betausers",
                "premiumusers"
              ]
            }
          ],
          "value": "fail",
          "order": 1
        },
        {
          "rules": [
            {
              "segments": [
                "freeusers"
              ]
            }
          ],
          "value": "success",
          "order": 2
        }
      ],
      "segment_exists": true,
      "collections": [
        {
          "collection_id": "ghzinc",
          "name": "GHz Inc"
        },
        {
          "collection_id": "phzsystems",
          "name": "PHz Systems"
        },
        {
          "collection_id": "ghzglobal",
          "name": "GHz Global"
        }
      ],
      "created_time": "2021-05-12T23:20:50.52Z",
      "updated_time": "2021-05-12T23:20:50.52Z",
      "href": "https://us-south.apprapp.cloud.ibm.com/apprapp/feature/v1/instances/9xxxxx-xxxxx-xxxxx-b3cd-xxxxx/environments/dev/properties/email-property"
    }
  • {
      "name": "Email property",
      "property_id": "email-property",
      "description": "Property for email",
      "type": "STRING",
      "format": "JSON",
      "value": {
        "activate": "yes",
        "employees_id": [
          "empId1",
          "empId2",
          "empId3",
          "empId4",
          "empId5"
        ]
      },
      "tags": "version: 1.1, pre-release",
      "segment_rules": [
        {
          "rules": [
            {
              "segments": [
                "betausers",
                "premiumusers"
              ]
            }
          ],
          "value": {
            "activate": "no"
          },
          "order": 1
        },
        {
          "rules": [
            {
              "segments": [
                "freeusers"
              ]
            }
          ],
          "value": {
            "employees_id": [
              "empId100"
            ]
          },
          "order": 2
        }
      ],
      "segment_exists": true,
      "collections": [
        {
          "collection_id": "ghzinc",
          "name": "GHz Inc"
        },
        {
          "collection_id": "phzsystems",
          "name": "PHz Systems"
        },
        {
          "collection_id": "ghzglobal",
          "name": "GHz Global"
        }
      ],
      "created_time": "2021-05-12T23:20:50.52Z",
      "updated_time": "2021-05-12T23:20:50.52Z",
      "href": "https://us-south.apprapp.cloud.ibm.com/apprapp/feature/v1/instances/9xxxxx-xxxxx-xxxxx-b3cd-xxxxx/environments/dev/properties/email-property"
    }
  • {
      "name": "Email property",
      "property_id": "email-property",
      "description": "Property for email",
      "type": "STRING",
      "format": "JSON",
      "value": {
        "activate": "yes",
        "employees_id": [
          "empId1",
          "empId2",
          "empId3",
          "empId4",
          "empId5"
        ]
      },
      "tags": "version: 1.1, pre-release",
      "segment_rules": [
        {
          "rules": [
            {
              "segments": [
                "betausers",
                "premiumusers"
              ]
            }
          ],
          "value": {
            "activate": "no"
          },
          "order": 1
        },
        {
          "rules": [
            {
              "segments": [
                "freeusers"
              ]
            }
          ],
          "value": {
            "employees_id": [
              "empId100"
            ]
          },
          "order": 2
        }
      ],
      "segment_exists": true,
      "collections": [
        {
          "collection_id": "ghzinc",
          "name": "GHz Inc"
        },
        {
          "collection_id": "phzsystems",
          "name": "PHz Systems"
        },
        {
          "collection_id": "ghzglobal",
          "name": "GHz Global"
        }
      ],
      "created_time": "2021-05-12T23:20:50.52Z",
      "updated_time": "2021-05-12T23:20:50.52Z",
      "href": "https://us-south.apprapp.cloud.ibm.com/apprapp/feature/v1/instances/9xxxxx-xxxxx-xxxxx-b3cd-xxxxx/environments/dev/properties/email-property"
    }
  • {
      "name": "Email property",
      "property_id": "email-property",
      "description": "Property for email",
      "type": "STRING",
      "format": "YAML",
      "value": "activate: 'yes'\nemployees_id:\n- empId1\n- empId2\n- empId3\n- empId4\n- empId5",
      "tags": "version: 1.1, pre-release",
      "segment_rules": [
        {
          "rules": [
            {
              "segments": [
                "betausers",
                "premiumusers"
              ]
            }
          ],
          "value": "---\nactivate: 'no'",
          "order": 1
        },
        {
          "rules": [
            {
              "segments": [
                "freeusers"
              ]
            }
          ],
          "value": "---\nemployees_id:\n- empId100",
          "order": 2
        }
      ],
      "segment_exists": true,
      "collections": [
        {
          "collection_id": "ghzinc",
          "name": "GHz Inc"
        },
        {
          "collection_id": "phzsystems",
          "name": "PHz Systems"
        },
        {
          "collection_id": "ghzglobal",
          "name": "GHz Global"
        }
      ],
      "created_time": "2021-05-12T23:20:50.52Z",
      "updated_time": "2021-05-12T23:20:50.52Z",
      "href": "https://us-south.apprapp.cloud.ibm.com/apprapp/feature/v1/instances/9xxxxx-xxxxx-xxxxx-b3cd-xxxxx/environments/dev/properties/email-property"
    }
  • {
      "name": "Email property",
      "property_id": "email-property",
      "description": "Property for email",
      "type": "STRING",
      "format": "YAML",
      "value": "activate: 'yes'\nemployees_id:\n- empId1\n- empId2\n- empId3\n- empId4\n- empId5",
      "tags": "version: 1.1, pre-release",
      "segment_rules": [
        {
          "rules": [
            {
              "segments": [
                "betausers",
                "premiumusers"
              ]
            }
          ],
          "value": "---\nactivate: 'no'",
          "order": 1
        },
        {
          "rules": [
            {
              "segments": [
                "freeusers"
              ]
            }
          ],
          "value": "---\nemployees_id:\n- empId100",
          "order": 2
        }
      ],
      "segment_exists": true,
      "collections": [
        {
          "collection_id": "ghzinc",
          "name": "GHz Inc"
        },
        {
          "collection_id": "phzsystems",
          "name": "PHz Systems"
        },
        {
          "collection_id": "ghzglobal",
          "name": "GHz Global"
        }
      ],
      "created_time": "2021-05-12T23:20:50.52Z",
      "updated_time": "2021-05-12T23:20:50.52Z",
      "href": "https://us-south.apprapp.cloud.ibm.com/apprapp/feature/v1/instances/9xxxxx-xxxxx-xxxxx-b3cd-xxxxx/environments/dev/properties/email-property"
    }
  • {
      "code": "FTEC1007E",
      "message": "Error while updating the property."
    }
  • {
      "code": "FTEC1007E",
      "message": "Error while updating the property."
    }
  • {
      "code": "FTEC1000E",
      "message": "Error while updating the property. The queried resource 'Property' is not available on the server."
    }
  • {
      "code": "FTEC1000E",
      "message": "Error while updating the property. The queried resource 'Property' is not available on the server."
    }
  • {
      "code": "FTEC1011E",
      "message": "Currently 'secret manager integration' feature is not available"
    }
  • {
      "code": "FTEC1011E",
      "message": "Currently 'secret manager integration' feature is not available"
    }

Update Property values

Update the property values. This method can be executed by the writer role. Property value and targeting rules can be updated, however this method does not allow assigning property to a collection.

Update the property values. This method can be executed by the writer role. Property value and targeting rules can be updated, however this method does not allow assigning property to a collection.

PATCH /environments/{environment_id}/properties/{property_id}
(appConfiguration *AppConfigurationV1) UpdatePropertyValues(updatePropertyValuesOptions *UpdatePropertyValuesOptions) (result *Property, response *core.DetailedResponse, err error)
(appConfiguration *AppConfigurationV1) UpdatePropertyValuesWithContext(ctx context.Context, updatePropertyValuesOptions *UpdatePropertyValuesOptions) (result *Property, 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.

  • apprapp.properties.patch

Auditing

Calling this method generates the following auditing event.

  • apprapp.properties.updatevalues

Request

Instantiate the UpdatePropertyValuesOptions struct and set the fields to provide parameter values for the UpdatePropertyValues method.

Path Parameters

  • Environment Id

    Example: environment_id

  • Property Id

    Example: property_id

The request body update the property values.

Examples:
type_boolean
type_numeric
type_secretref
type_string_text
type_string_json
type_string_yaml

WithContext method only

The UpdatePropertyValues options.

  • curl -X PATCH --location --header "Authorization: Bearer {iam_token}"   --header "Accept: application/json"   --header "Content-Type: application/json"   --data '{ "name": "Email property", "description": "Property for email", "value": true, "tags": "version: 1.1, pre-release", "segment_rules": [ { "rules": [ { "segments": [ "betausers", "premiumusers" ] } ], "value": true, "order": 1 }, { "rules": [ { "segments": [ "freeusers" ] } ], "value": false, "order": 2 } ] }'   "{base_url}/environments/{environment_id}/properties/{property_id}"
  • targetSegmentsModel := &appconfigurationv1.TargetSegments{
      Segments: []string{"betausers", "premiumusers"},
    }
    
    segmentRuleModel := &appconfigurationv1.SegmentRule{
      Rules: []appconfigurationv1.TargetSegments{*targetSegmentsModel},
      Value: core.StringPtr("true"),
      Order: core.Int64Ptr(int64(1)),
    }
    
    updatePropertyValuesOptions := appConfigurationService.NewUpdatePropertyValuesOptions(
      "environment_id",
      "property_id",
    )
    updatePropertyValuesOptions.SetName("Email property")
    updatePropertyValuesOptions.SetDescription("Property for email")
    updatePropertyValuesOptions.SetTags("version: 1.1, pre-release")
    updatePropertyValuesOptions.SetValue("true")
    updatePropertyValuesOptions.SetSegmentRules([]appconfigurationv1.SegmentRule{*segmentRuleModel})
    
    property, response, err := appConfigurationService.UpdatePropertyValues(updatePropertyValuesOptions)
    if err != nil {
      panic(err)
    }
    b, _ := json.MarshalIndent(property, "", "  ")
    fmt.Println(string(b))

Response

Details of the property.

Details of the property.

Examples:
View

Status Code

  • Successfully updated the property values.

  • Bad request. Verify that the information in the request body is complete and correct.

  • Not Found. Verify that the property id is correct.

  • Not Implemented.

Example responses
  • {
      "name": "Email property",
      "property_id": "email-property",
      "description": "Property for email",
      "type": "BOOLEAN",
      "value": true,
      "tags": "version: 1.1, pre-release",
      "segment_rules": [
        {
          "rules": [
            {
              "segments": [
                "betausers",
                "premiumusers"
              ]
            }
          ],
          "value": true,
          "order": 1
        },
        {
          "rules": [
            {
              "segments": [
                "freeusers"
              ]
            }
          ],
          "value": false,
          "order": 2
        }
      ],
      "segment_exists": true,
      "collections": [
        {
          "collection_id": "ghzinc",
          "name": "GHz Inc"
        },
        {
          "collection_id": "phzsystems",
          "name": "PHz Systems"
        },
        {
          "collection_id": "ghzglobal",
          "name": "GHz Global"
        }
      ],
      "created_time": "2021-05-12T23:20:50.52Z",
      "updated_time": "2021-05-12T23:20:50.52Z",
      "href": "https://us-south.apprapp.cloud.ibm.com/apprapp/feature/v1/instances/9xxxxx-xxxxx-xxxxx-b3cd-xxxxx/environments/dev/properties/email-property"
    }
  • {
      "name": "Email property",
      "property_id": "email-property",
      "description": "Property for email",
      "type": "BOOLEAN",
      "value": true,
      "tags": "version: 1.1, pre-release",
      "segment_rules": [
        {
          "rules": [
            {
              "segments": [
                "betausers",
                "premiumusers"
              ]
            }
          ],
          "value": true,
          "order": 1
        },
        {
          "rules": [
            {
              "segments": [
                "freeusers"
              ]
            }
          ],
          "value": false,
          "order": 2
        }
      ],
      "segment_exists": true,
      "collections": [
        {
          "collection_id": "ghzinc",
          "name": "GHz Inc"
        },
        {
          "collection_id": "phzsystems",
          "name": "PHz Systems"
        },
        {
          "collection_id": "ghzglobal",
          "name": "GHz Global"
        }
      ],
      "created_time": "2021-05-12T23:20:50.52Z",
      "updated_time": "2021-05-12T23:20:50.52Z",
      "href": "https://us-south.apprapp.cloud.ibm.com/apprapp/feature/v1/instances/9xxxxx-xxxxx-xxxxx-b3cd-xxxxx/environments/dev/properties/email-property"
    }
  • {
      "name": "Email property",
      "property_id": "email-property",
      "description": "Property for email",
      "type": "NUMERIC",
      "value": 10,
      "tags": "version: 1.1, pre-release",
      "segment_rules": [
        {
          "rules": [
            {
              "segments": [
                "betausers",
                "premiumusers"
              ]
            }
          ],
          "value": 100,
          "order": 1
        },
        {
          "rules": [
            {
              "segments": [
                "freeusers"
              ]
            }
          ],
          "value": 0,
          "order": 2
        }
      ],
      "segment_exists": true,
      "collections": [
        {
          "collection_id": "ghzinc",
          "name": "GHz Inc"
        },
        {
          "collection_id": "phzsystems",
          "name": "PHz Systems"
        },
        {
          "collection_id": "ghzglobal",
          "name": "GHz Global"
        }
      ],
      "created_time": "2021-05-12T23:20:50.52Z",
      "updated_time": "2021-05-12T23:20:50.52Z",
      "href": "https://us-south.apprapp.cloud.ibm.com/apprapp/feature/v1/instances/9xxxxx-xxxxx-xxxxx-b3cd-xxxxx/environments/dev/properties/email-property"
    }
  • {
      "name": "Email property",
      "property_id": "email-property",
      "description": "Property for email",
      "type": "NUMERIC",
      "value": 10,
      "tags": "version: 1.1, pre-release",
      "segment_rules": [
        {
          "rules": [
            {
              "segments": [
                "betausers",
                "premiumusers"
              ]
            }
          ],
          "value": 100,
          "order": 1
        },
        {
          "rules": [
            {
              "segments": [
                "freeusers"
              ]
            }
          ],
          "value": 0,
          "order": 2
        }
      ],
      "segment_exists": true,
      "collections": [
        {
          "collection_id": "ghzinc",
          "name": "GHz Inc"
        },
        {
          "collection_id": "phzsystems",
          "name": "PHz Systems"
        },
        {
          "collection_id": "ghzglobal",
          "name": "GHz Global"
        }
      ],
      "created_time": "2021-05-12T23:20:50.52Z",
      "updated_time": "2021-05-12T23:20:50.52Z",
      "href": "https://us-south.apprapp.cloud.ibm.com/apprapp/feature/v1/instances/9xxxxx-xxxxx-xxxxx-b3cd-xxxxx/environments/dev/properties/email-property"
    }
  • {
      "name": "Email property",
      "property_id": "email-property",
      "description": "Property for email",
      "type": "SECRETREF",
      "value": {
        "secret_type": "kv",
        "id": "1312414-12341243fdsf-324dfsg-43fffg",
        "sm_instance_crn": "crn:v1:staging:public:apprapp_dev:us-south:a/7bf663503fc5e2e06b03d2ada843bf54:ssfffgr-f6ee-48a5-a11b-ade4aecfe378::"
      },
      "tags": "version: 1.1, pre-release",
      "segment_rules": [
        {
          "rules": [
            {
              "segments": [
                "betausers",
                "premiumusers"
              ]
            }
          ],
          "value": {
            "id": "2234566-334g566ghjj-222-4000123fg"
          },
          "order": 1
        },
        {
          "rules": [
            {
              "segments": [
                "freeusers"
              ]
            }
          ],
          "value": {
            "id": "2234566-334g566ghjj-222-4000123fg"
          },
          "order": 2
        }
      ],
      "segment_exists": true,
      "collections": [
        {
          "collection_id": "ghzinc",
          "name": "GHz Inc"
        },
        {
          "collection_id": "phzsystems",
          "name": "PHz Systems"
        },
        {
          "collection_id": "ghzglobal",
          "name": "GHz Global"
        }
      ],
      "created_time": "2021-05-12T23:20:50.52Z",
      "updated_time": "2021-05-12T23:20:50.52Z",
      "href": "https://us-south.apprapp.cloud.ibm.com/apprapp/feature/v1/instances/9xxxxx-xxxxx-xxxxx-b3cd-xxxxx/environments/dev/properties/email-property"
    }
  • {
      "name": "Email property",
      "property_id": "email-property",
      "description": "Property for email",
      "type": "SECRETREF",
      "value": {
        "secret_type": "kv",
        "id": "1312414-12341243fdsf-324dfsg-43fffg",
        "sm_instance_crn": "crn:v1:staging:public:apprapp_dev:us-south:a/7bf663503fc5e2e06b03d2ada843bf54:ssfffgr-f6ee-48a5-a11b-ade4aecfe378::"
      },
      "tags": "version: 1.1, pre-release",
      "segment_rules": [
        {
          "rules": [
            {
              "segments": [
                "betausers",
                "premiumusers"
              ]
            }
          ],
          "value": {
            "id": "2234566-334g566ghjj-222-4000123fg"
          },
          "order": 1
        },
        {
          "rules": [
            {
              "segments": [
                "freeusers"
              ]
            }
          ],
          "value": {
            "id": "2234566-334g566ghjj-222-4000123fg"
          },
          "order": 2
        }
      ],
      "segment_exists": true,
      "collections": [
        {
          "collection_id": "ghzinc",
          "name": "GHz Inc"
        },
        {
          "collection_id": "phzsystems",
          "name": "PHz Systems"
        },
        {
          "collection_id": "ghzglobal",
          "name": "GHz Global"
        }
      ],
      "created_time": "2021-05-12T23:20:50.52Z",
      "updated_time": "2021-05-12T23:20:50.52Z",
      "href": "https://us-south.apprapp.cloud.ibm.com/apprapp/feature/v1/instances/9xxxxx-xxxxx-xxxxx-b3cd-xxxxx/environments/dev/properties/email-property"
    }
  • {
      "name": "Email property",
      "property_id": "email-property",
      "description": "Property for email",
      "type": "STRING",
      "format": "TEXT",
      "value": "success",
      "tags": "version: 1.1, pre-release",
      "segment_rules": [
        {
          "rules": [
            {
              "segments": [
                "betausers",
                "premiumusers"
              ]
            }
          ],
          "value": "fail",
          "order": 1
        },
        {
          "rules": [
            {
              "segments": [
                "freeusers"
              ]
            }
          ],
          "value": "success",
          "order": 2
        }
      ],
      "segment_exists": true,
      "collections": [
        {
          "collection_id": "ghzinc",
          "name": "GHz Inc"
        },
        {
          "collection_id": "phzsystems",
          "name": "PHz Systems"
        },
        {
          "collection_id": "ghzglobal",
          "name": "GHz Global"
        }
      ],
      "created_time": "2021-05-12T23:20:50.52Z",
      "updated_time": "2021-05-12T23:20:50.52Z",
      "href": "https://us-south.apprapp.cloud.ibm.com/apprapp/feature/v1/instances/9xxxxx-xxxxx-xxxxx-b3cd-xxxxx/environments/dev/properties/email-property"
    }
  • {
      "name": "Email property",
      "property_id": "email-property",
      "description": "Property for email",
      "type": "STRING",
      "format": "TEXT",
      "value": "success",
      "tags": "version: 1.1, pre-release",
      "segment_rules": [
        {
          "rules": [
            {
              "segments": [
                "betausers",
                "premiumusers"
              ]
            }
          ],
          "value": "fail",
          "order": 1
        },
        {
          "rules": [
            {
              "segments": [
                "freeusers"
              ]
            }
          ],
          "value": "success",
          "order": 2
        }
      ],
      "segment_exists": true,
      "collections": [
        {
          "collection_id": "ghzinc",
          "name": "GHz Inc"
        },
        {
          "collection_id": "phzsystems",
          "name": "PHz Systems"
        },
        {
          "collection_id": "ghzglobal",
          "name": "GHz Global"
        }
      ],
      "created_time": "2021-05-12T23:20:50.52Z",
      "updated_time": "2021-05-12T23:20:50.52Z",
      "href": "https://us-south.apprapp.cloud.ibm.com/apprapp/feature/v1/instances/9xxxxx-xxxxx-xxxxx-b3cd-xxxxx/environments/dev/properties/email-property"
    }
  • {
      "name": "Email property",
      "property_id": "email-property",
      "description": "Property for email",
      "type": "STRING",
      "format": "JSON",
      "value": {
        "activate": "yes",
        "employees_id": [
          "empId1",
          "empId2",
          "empId3",
          "empId4",
          "empId5"
        ]
      },
      "tags": "version: 1.1, pre-release",
      "segment_rules": [
        {
          "rules": [
            {
              "segments": [
                "betausers",
                "premiumusers"
              ]
            }
          ],
          "value": {
            "activate": "no"
          },
          "order": 1
        },
        {
          "rules": [
            {
              "segments": [
                "freeusers"
              ]
            }
          ],
          "value": {
            "employees_id": [
              "empId100"
            ]
          },
          "order": 2
        }
      ],
      "segment_exists": true,
      "collections": [
        {
          "collection_id": "ghzinc",
          "name": "GHz Inc"
        },
        {
          "collection_id": "phzsystems",
          "name": "PHz Systems"
        },
        {
          "collection_id": "ghzglobal",
          "name": "GHz Global"
        }
      ],
      "created_time": "2021-05-12T23:20:50.52Z",
      "updated_time": "2021-05-12T23:20:50.52Z",
      "href": "https://us-south.apprapp.cloud.ibm.com/apprapp/feature/v1/instances/9xxxxx-xxxxx-xxxxx-b3cd-xxxxx/environments/dev/properties/email-property"
    }
  • {
      "name": "Email property",
      "property_id": "email-property",
      "description": "Property for email",
      "type": "STRING",
      "format": "JSON",
      "value": {
        "activate": "yes",
        "employees_id": [
          "empId1",
          "empId2",
          "empId3",
          "empId4",
          "empId5"
        ]
      },
      "tags": "version: 1.1, pre-release",
      "segment_rules": [
        {
          "rules": [
            {
              "segments": [
                "betausers",
                "premiumusers"
              ]
            }
          ],
          "value": {
            "activate": "no"
          },
          "order": 1
        },
        {
          "rules": [
            {
              "segments": [
                "freeusers"
              ]
            }
          ],
          "value": {
            "employees_id": [
              "empId100"
            ]
          },
          "order": 2
        }
      ],
      "segment_exists": true,
      "collections": [
        {
          "collection_id": "ghzinc",
          "name": "GHz Inc"
        },
        {
          "collection_id": "phzsystems",
          "name": "PHz Systems"
        },
        {
          "collection_id": "ghzglobal",
          "name": "GHz Global"
        }
      ],
      "created_time": "2021-05-12T23:20:50.52Z",
      "updated_time": "2021-05-12T23:20:50.52Z",
      "href": "https://us-south.apprapp.cloud.ibm.com/apprapp/feature/v1/instances/9xxxxx-xxxxx-xxxxx-b3cd-xxxxx/environments/dev/properties/email-property"
    }
  • {
      "name": "Email property",
      "property_id": "email-property",
      "description": "Property for email",
      "type": "STRING",
      "format": "YAML",
      "value": "activate: 'yes'\nemployees_id:\n- empId1\n- empId2\n- empId3\n- empId4\n- empId5",
      "tags": "version: 1.1, pre-release",
      "segment_rules": [
        {
          "rules": [
            {
              "segments": [
                "betausers",
                "premiumusers"
              ]
            }
          ],
          "value": "---\nactivate: 'no'",
          "order": 1
        },
        {
          "rules": [
            {
              "segments": [
                "freeusers"
              ]
            }
          ],
          "value": "---\nemployees_id:\n- empId100",
          "order": 2
        }
      ],
      "segment_exists": true,
      "collections": [
        {
          "collection_id": "ghzinc",
          "name": "GHz Inc"
        },
        {
          "collection_id": "phzsystems",
          "name": "PHz Systems"
        },
        {
          "collection_id": "ghzglobal",
          "name": "GHz Global"
        }
      ],
      "created_time": "2021-05-12T23:20:50.52Z",
      "updated_time": "2021-05-12T23:20:50.52Z",
      "href": "https://us-south.apprapp.cloud.ibm.com/apprapp/feature/v1/instances/9xxxxx-xxxxx-xxxxx-b3cd-xxxxx/environments/dev/properties/email-property"
    }
  • {
      "name": "Email property",
      "property_id": "email-property",
      "description": "Property for email",
      "type": "STRING",
      "format": "YAML",
      "value": "activate: 'yes'\nemployees_id:\n- empId1\n- empId2\n- empId3\n- empId4\n- empId5",
      "tags": "version: 1.1, pre-release",
      "segment_rules": [
        {
          "rules": [
            {
              "segments": [
                "betausers",
                "premiumusers"
              ]
            }
          ],
          "value": "---\nactivate: 'no'",
          "order": 1
        },
        {
          "rules": [
            {
              "segments": [
                "freeusers"
              ]
            }
          ],
          "value": "---\nemployees_id:\n- empId100",
          "order": 2
        }
      ],
      "segment_exists": true,
      "collections": [
        {
          "collection_id": "ghzinc",
          "name": "GHz Inc"
        },
        {
          "collection_id": "phzsystems",
          "name": "PHz Systems"
        },
        {
          "collection_id": "ghzglobal",
          "name": "GHz Global"
        }
      ],
      "created_time": "2021-05-12T23:20:50.52Z",
      "updated_time": "2021-05-12T23:20:50.52Z",
      "href": "https://us-south.apprapp.cloud.ibm.com/apprapp/feature/v1/instances/9xxxxx-xxxxx-xxxxx-b3cd-xxxxx/environments/dev/properties/email-property"
    }
  • {
      "code": "FTEC1007E",
      "message": "Error while updating the property values."
    }
  • {
      "code": "FTEC1007E",
      "message": "Error while updating the property values."
    }
  • {
      "code": "FTEC1000E",
      "message": "Error while updating the property values. The queried resource 'Property' is not available on the server."
    }
  • {
      "code": "FTEC1000E",
      "message": "Error while updating the property values. The queried resource 'Property' is not available on the server."
    }
  • {
      "code": "FTEC1011E",
      "message": "Currently 'secret manager integration' feature is not available"
    }
  • {
      "code": "FTEC1011E",
      "message": "Currently 'secret manager integration' feature is not available"
    }

Get Property

Retrieve details of a property.

Retrieve details of a property.

GET /environments/{environment_id}/properties/{property_id}
(appConfiguration *AppConfigurationV1) GetProperty(getPropertyOptions *GetPropertyOptions) (result *Property, response *core.DetailedResponse, err error)
(appConfiguration *AppConfigurationV1) GetPropertyWithContext(ctx context.Context, getPropertyOptions *GetPropertyOptions) (result *Property, 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.

  • apprapp.properties.list

Auditing

Calling this method generates the following auditing event.

  • apprapp.properties.read

Request

Instantiate the GetPropertyOptions struct and set the fields to provide parameter values for the GetProperty method.

Path Parameters

  • Environment Id

    Example: environment_id

  • Property Id

    Example: property_id

Query Parameters

  • Include the associated collections or targeting rules details in the response.

    Allowable values: [collections,rules]

    Examples:
    View

WithContext method only

The GetProperty options.

  • curl -X GET --location --header "Authorization: Bearer {iam_token}"   --header "Accept: application/json"   "{base_url}/environments/{environment_id}/properties/{property_id}?include=collections,rules"
  • getPropertyOptions := appConfigurationService.NewGetPropertyOptions(
      "environment_id",
      "property_id",
    )
    getPropertyOptions.SetInclude([]string{"collections", "rules"})
    
    property, response, err := appConfigurationService.GetProperty(getPropertyOptions)
    if err != nil {
      panic(err)
    }
    b, _ := json.MarshalIndent(property, "", "  ")
    fmt.Println(string(b))

Response

Details of the property.

Details of the property.

Examples:
View

Status Code

  • Successfully retrieved the property details.

  • Not Found. Verify that the property id is correct.

  • Not Implemented.

Example responses
  • {
      "name": "Email property",
      "property_id": "email-property",
      "description": "Property for email",
      "type": "BOOLEAN",
      "value": true,
      "tags": "version: 1.1, pre-release",
      "segment_rules": [
        {
          "rules": [
            {
              "segments": [
                "betausers",
                "premiumusers"
              ]
            }
          ],
          "value": true,
          "order": 1
        },
        {
          "rules": [
            {
              "segments": [
                "freeusers"
              ]
            }
          ],
          "value": false,
          "order": 2
        }
      ],
      "segment_exists": true,
      "collections": [
        {
          "collection_id": "ghzinc"
        },
        {
          "collection_id": "phzsystems"
        },
        {
          "collection_id": "ghzglobal"
        }
      ],
      "created_time": "2021-05-12T23:20:50.52Z",
      "updated_time": "2021-05-12T23:20:50.52Z",
      "href": "https://us-south.apprapp.cloud.ibm.com/apprapp/feature/v1/instances/9xxxxx-xxxxx-xxxxx-b3cd-xxxxx/environments/dev/properties/email-property"
    }
  • {
      "name": "Email property",
      "property_id": "email-property",
      "description": "Property for email",
      "type": "BOOLEAN",
      "value": true,
      "tags": "version: 1.1, pre-release",
      "segment_rules": [
        {
          "rules": [
            {
              "segments": [
                "betausers",
                "premiumusers"
              ]
            }
          ],
          "value": true,
          "order": 1
        },
        {
          "rules": [
            {
              "segments": [
                "freeusers"
              ]
            }
          ],
          "value": false,
          "order": 2
        }
      ],
      "segment_exists": true,
      "collections": [
        {
          "collection_id": "ghzinc"
        },
        {
          "collection_id": "phzsystems"
        },
        {
          "collection_id": "ghzglobal"
        }
      ],
      "created_time": "2021-05-12T23:20:50.52Z",
      "updated_time": "2021-05-12T23:20:50.52Z",
      "href": "https://us-south.apprapp.cloud.ibm.com/apprapp/feature/v1/instances/9xxxxx-xxxxx-xxxxx-b3cd-xxxxx/environments/dev/properties/email-property"
    }
  • {
      "code": "FTEC1000E",
      "message": "Error while retrieving the property. The queried resource 'Property' is not available on the server."
    }
  • {
      "code": "FTEC1000E",
      "message": "Error while retrieving the property. The queried resource 'Property' is not available on the server."
    }
  • {
      "code": "FTEC1011E",
      "message": "Currently 'secret manager integration' feature is not available"
    }
  • {
      "code": "FTEC1011E",
      "message": "Currently 'secret manager integration' feature is not available"
    }

Delete Property

Delete a Property

Delete a Property.

DELETE /environments/{environment_id}/properties/{property_id}
(appConfiguration *AppConfigurationV1) DeleteProperty(deletePropertyOptions *DeletePropertyOptions) (response *core.DetailedResponse, err error)
(appConfiguration *AppConfigurationV1) DeletePropertyWithContext(ctx context.Context, deletePropertyOptions *DeletePropertyOptions) (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.

  • apprapp.properties.delete

Auditing

Calling this method generates the following auditing event.

  • apprapp.properties.delete

Request

Instantiate the DeletePropertyOptions struct and set the fields to provide parameter values for the DeleteProperty method.

Path Parameters

  • Environment Id

    Example: environment_id

  • Property Id

    Example: property_id

WithContext method only

The DeleteProperty options.

  • curl -X DELETE --location --header "Authorization: Bearer {iam_token}"   "{base_url}/environments/{environment_id}/properties/{property_id}"
  • deletePropertyOptions := appConfigurationService.NewDeletePropertyOptions(
      "environment_id",
      "property_id",
    )
    
    response, err := appConfigurationService.DeleteProperty(deletePropertyOptions)
    if err != nil {
      panic(err)
    }
    if response.StatusCode != 204 {
      fmt.Printf("\nUnexpected response status code received from DeleteProperty(): %d\n", response.StatusCode)
    }

Response

Status Code

  • Successfully deleted the specified property

  • Not Found. Verify that the property id is correct.

  • Not Implemented.

Example responses
  • {
      "code": "FTEC1000E",
      "message": "Error while deleting the property. The queried resource 'Property' is not available on the server."
    }
  • {
      "code": "FTEC1000E",
      "message": "Error while deleting the property. The queried resource 'Property' is not available on the server."
    }
  • {
      "code": "FTEC1011E",
      "message": "Currently 'secret manager integration' feature is not available"
    }
  • {
      "code": "FTEC1011E",
      "message": "Currently 'secret manager integration' feature is not available"
    }

Get list of Segments

List all the segments

List all the segments.

GET /segments
(appConfiguration *AppConfigurationV1) ListSegments(listSegmentsOptions *ListSegmentsOptions) (result *SegmentsList, response *core.DetailedResponse, err error)
(appConfiguration *AppConfigurationV1) ListSegmentsWithContext(ctx context.Context, listSegmentsOptions *ListSegmentsOptions) (result *SegmentsList, 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.

  • apprapp.segments.list

Auditing

Calling this method generates the following auditing event.

  • apprapp.segments.list

Request

Instantiate the ListSegmentsOptions struct and set the fields to provide parameter values for the ListSegments method.

Query Parameters

  • If set to true, returns expanded view of the resource details.

    Example: true

  • Sort the segment details based on the specified attribute. By default, items are sorted by name.

    Allowable values: [created_time,updated_time,id,name]

    Example: created_time

  • Filter the resources to be returned based on the associated tags. Specify the parameter as a list of comma separated tags. Returns resources associated with any of the specified tags.

    Example: version 1.1,pre-release

  • Segment details to include the associated rules in the response.

    Allowable values: [rules]

    Example: rules

  • The number of records to retrieve. By default, the list operation return the first 10 records. To retrieve different set of records, use limit with offset to page through the available records.

    Possible values: 1 ≤ value ≤ 100

    Default: 10

  • The number of records to skip. By specifying offset, you retrieve a subset of items that starts with the offset value. Use offset with limit to page through the available records.

    Possible values: value ≥ 0

    Default: 0

  • Searches for the provided keyword and returns the appropriate row with that value. Here the search happens on the '[Name OR Tag]' of the entity

    Example: test tag

WithContext method only

The ListSegments options.

  • curl -X GET --location --header "Authorization: Bearer {iam_token}"   --header "Accept: application/json"   "{base_url}/segments?expand=true&sort=created_time&tags=version 1.1,pre-release&include=rules&search=test tag"
  • listSegmentsOptions := &appconfigurationv1.ListSegmentsOptions{
      Expand: core.BoolPtr(true),
      Sort: core.StringPtr("created_time"),
      Tags: core.StringPtr("version 1.1,pre-release"),
      Include: core.StringPtr("rules"),
      Limit: core.Int64Ptr(int64(10)),
      Search: core.StringPtr("test tag"),
    }
    
    pager, err := appConfigurationService.NewSegmentsPager(listSegmentsOptions)
    if err != nil {
      panic(err)
    }
    
    var allResults []appconfigurationv1.Segment
    for pager.HasNext() {
      nextPage, err := pager.GetNext()
      if err != nil {
        panic(err)
      }
      allResults = append(allResults, nextPage...)
    }
    b, _ := json.MarshalIndent(allResults, "", "  ")
    fmt.Println(string(b))

Response

List of all segments.

List of all segments.

Examples:
View

Status Code

  • Successfully listed all the segments.

  • Unauthorized

Example responses
  • {
      "segments": [
        {
          "name": "Beta Users",
          "segment_id": "beta-users",
          "description": "Segment containing the beta users",
          "tags": "preprod, users, ghz",
          "created_time": "2020-06-09T00:16:07Z",
          "updated_time": "2020-06-09T12:16:07Z",
          "href": "https://us-south.apprapp.cloud.ibm.com/apprapp/feature/v1/instances/9xxxxx-xxxxx-xxxxx-b3cd-xxxxx/segments/beta-users",
          "rules": [
            {
              "attribute_name": "email",
              "operator": "endsWith",
              "values": [
                "@in.mnc.com",
                "@us.mnc.com"
              ]
            },
            {
              "attribute_name": "country",
              "operator": "is",
              "values": [
                "India",
                "USA"
              ]
            }
          ]
        }
      ],
      "limit": 10,
      "offset": 0,
      "total_count": 1,
      "first": {
        "href": "https://us-south.apprapp.cloud.ibm.com/apprapp/feature/v1/instances/9xxxxx-xxxxx-xxxxx-b3cd-xxxxx/segments?limit=10&offset=0"
      },
      "last": {
        "href": "https://us-south.apprapp.cloud.ibm.com/apprapp/feature/v1/instances/9xxxxx-xxxxx-xxxxx-b3cd-xxxxx/segments?limit=10&offset=0"
      }
    }
  • {
      "segments": [
        {
          "name": "Beta Users",
          "segment_id": "beta-users",
          "description": "Segment containing the beta users",
          "tags": "preprod, users, ghz",
          "created_time": "2020-06-09T00:16:07Z",
          "updated_time": "2020-06-09T12:16:07Z",
          "href": "https://us-south.apprapp.cloud.ibm.com/apprapp/feature/v1/instances/9xxxxx-xxxxx-xxxxx-b3cd-xxxxx/segments/beta-users",
          "rules": [
            {
              "attribute_name": "email",
              "operator": "endsWith",
              "values": [
                "@in.mnc.com",
                "@us.mnc.com"
              ]
            },
            {
              "attribute_name": "country",
              "operator": "is",
              "values": [
                "India",
                "USA"
              ]
            }
          ]
        }
      ],
      "limit": 10,
      "offset": 0,
      "total_count": 1,
      "first": {
        "href": "https://us-south.apprapp.cloud.ibm.com/apprapp/feature/v1/instances/9xxxxx-xxxxx-xxxxx-b3cd-xxxxx/segments?limit=10&offset=0"
      },
      "last": {
        "href": "https://us-south.apprapp.cloud.ibm.com/apprapp/feature/v1/instances/9xxxxx-xxxxx-xxxxx-b3cd-xxxxx/segments?limit=10&offset=0"
      }
    }
  • {
      "message": "Unauthorized"
    }
  • {
      "message": "Unauthorized"
    }

Create Segment

Create a segment.

Create a segment.

POST /segments
(appConfiguration *AppConfigurationV1) CreateSegment(createSegmentOptions *CreateSegmentOptions) (result *Segment, response *core.DetailedResponse, err error)
(appConfiguration *AppConfigurationV1) CreateSegmentWithContext(ctx context.Context, createSegmentOptions *CreateSegmentOptions) (result *Segment, 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.

  • apprapp.segments.create

Auditing

Calling this method generates the following auditing event.

  • apprapp.segments.create

Request

Instantiate the CreateSegmentOptions struct and set the fields to provide parameter values for the CreateSegment method.

The request body to create a new segment.

Examples:
View

WithContext method only

The CreateSegment options.

  • curl -X POST --location --header "Authorization: Bearer {iam_token}"   --header "Accept: application/json"   --header "Content-Type: application/json"   --data '{ "name": "Beta Users", "segment_id": "beta-users", "description": "Segment containing the beta users", "tags": "version: 1.1, stage", "rules": [ { "attribute_name": "email", "operator": "endsWith", "values": [ "@in.mnc.com", "@us.mnc.com" ] }, { "attribute_name": "country", "operator": "is", "values": [ "India", "USA" ] } ] }'   "{base_url}/segments"
  • ruleModel := &appconfigurationv1.Rule{
      AttributeName: core.StringPtr("email"),
      Operator: core.StringPtr("endsWith"),
      Values: []string{"@in.mnc.com", "@us.mnc.com"},
    }
    
    createSegmentOptions := appConfigurationService.NewCreateSegmentOptions(
      "Beta Users",
      "beta-users",
      []appconfigurationv1.Rule{*ruleModel},
    )
    createSegmentOptions.SetDescription("Segment containing the beta users")
    createSegmentOptions.SetTags("version: 1.1, stage")
    
    segment, response, err := appConfigurationService.CreateSegment(createSegmentOptions)
    if err != nil {
      panic(err)
    }
    b, _ := json.MarshalIndent(segment, "", "  ")
    fmt.Println(string(b))

Response

Details of the segment.

Details of the segment.

Examples:
View

Status Code

  • Successfully created the segment

  • Bad request. Verify that the information in the request body is complete and correct.

Example responses
  • {
      "name": "Beta Users",
      "segment_id": "beta-users",
      "description": "Segment containing the beta users",
      "tags": "version: 1.1, stage",
      "rules": [
        {
          "attribute_name": "email",
          "operator": "endsWith",
          "values": [
            "@in.mnc.com",
            "@us.mnc.com"
          ]
        },
        {
          "attribute_name": "country",
          "operator": "is",
          "values": [
            "India",
            "USA"
          ]
        }
      ],
      "created_time": "2021-05-12T23:20:50.52Z",
      "updated_time": "2021-05-12T23:20:50.52Z",
      "href": "https://us-south.apprapp.cloud.ibm.com/apprapp/feature/v1/instances/9xxxxx-xxxxx-xxxxx-b3cd-xxxxx/segments/beta-users"
    }
  • {
      "name": "Beta Users",
      "segment_id": "beta-users",
      "description": "Segment containing the beta users",
      "tags": "version: 1.1, stage",
      "rules": [
        {
          "attribute_name": "email",
          "operator": "endsWith",
          "values": [
            "@in.mnc.com",
            "@us.mnc.com"
          ]
        },
        {
          "attribute_name": "country",
          "operator": "is",
          "values": [
            "India",
            "USA"
          ]
        }
      ],
      "created_time": "2021-05-12T23:20:50.52Z",
      "updated_time": "2021-05-12T23:20:50.52Z",
      "href": "https://us-south.apprapp.cloud.ibm.com/apprapp/feature/v1/instances/9xxxxx-xxxxx-xxxxx-b3cd-xxxxx/segments/beta-users"
    }
  • {
      "code": "FTEC1003E",
      "message": "Error while creating the segment."
    }
  • {
      "code": "FTEC1003E",
      "message": "Error while creating the segment."
    }

Update Segment

Update the segment properties

Update the segment properties.

PUT /segments/{segment_id}
(appConfiguration *AppConfigurationV1) UpdateSegment(updateSegmentOptions *UpdateSegmentOptions) (result *Segment, response *core.DetailedResponse, err error)
(appConfiguration *AppConfigurationV1) UpdateSegmentWithContext(ctx context.Context, updateSegmentOptions *UpdateSegmentOptions) (result *Segment, 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.

  • apprapp.segments.update

Auditing

Calling this method generates the following auditing event.

  • apprapp.segments.update

Request

Instantiate the UpdateSegmentOptions struct and set the fields to provide parameter values for the UpdateSegment method.

Path Parameters

  • Segment Id

    Example: segment_id

The request body to update a segment.

Examples:
View

WithContext method only

The UpdateSegment options.

  • curl -X PUT --location --header "Authorization: Bearer {iam_token}"   --header "Accept: application/json"   --header "Content-Type: application/json"   --data '{"name":"Beta Users","description":"Segment containing the beta users","tags":"version: 1.1, pre-release","rules":[{"attribute_name":"email","operator":"endsWith","values":["@in.mnc.com","@us.mnc.com"]},{"attribute_name":"country","operator":"is","values":["India","USA"]}]}'   "{base_url}/segments/{segment_id}"
  • updateSegmentOptions := appConfigurationService.NewUpdateSegmentOptions(
      "segment_id",
    )
    
    segment, response, err := appConfigurationService.UpdateSegment(updateSegmentOptions)
    if err != nil {
      panic(err)
    }
    b, _ := json.MarshalIndent(segment, "", "  ")
    fmt.Println(string(b))

Response

Details of the segment.

Details of the segment.

Examples:
View

Status Code

  • Successfully updated the segment details.

  • Bad request. Verify that the information in the request body is complete and correct.

  • Not Found. Verify that the segment id is correct.

Example responses
  • {
      "name": "Beta Users",
      "segment_id": "beta-users",
      "description": "Segment containing the beta users",
      "tags": "version: 1.1, stage",
      "rules": [
        {
          "attribute_name": "email",
          "operator": "endsWith",
          "values": [
            "@in.mnc.com",
            "@us.mnc.com"
          ]
        },
        {
          "attribute_name": "country",
          "operator": "is",
          "values": [
            "India",
            "USA"
          ]
        }
      ],
      "created_time": "2021-05-12T23:20:50.52Z",
      "updated_time": "2021-05-12T23:20:50.52Z",
      "href": "https://us-south.apprapp.cloud.ibm.com/apprapp/feature/v1/instances/9xxxxx-xxxxx-xxxxx-b3cd-xxxxx/segments/beta-users"
    }
  • {
      "name": "Beta Users",
      "segment_id": "beta-users",
      "description": "Segment containing the beta users",
      "tags": "version: 1.1, stage",
      "rules": [
        {
          "attribute_name": "email",
          "operator": "endsWith",
          "values": [
            "@in.mnc.com",
            "@us.mnc.com"
          ]
        },
        {
          "attribute_name": "country",
          "operator": "is",
          "values": [
            "India",
            "USA"
          ]
        }
      ],
      "created_time": "2021-05-12T23:20:50.52Z",
      "updated_time": "2021-05-12T23:20:50.52Z",
      "href": "https://us-south.apprapp.cloud.ibm.com/apprapp/feature/v1/instances/9xxxxx-xxxxx-xxxxx-b3cd-xxxxx/segments/beta-users"
    }
  • {
      "code": "FTEC1007E",
      "message": "Error while updating the segment."
    }
  • {
      "code": "FTEC1007E",
      "message": "Error while updating the segment."
    }
  • {
      "code": "FTEC1000E",
      "message": "Error while updating the segment. The queried resource 'Segment' is not available on the server."
    }
  • {
      "code": "FTEC1000E",
      "message": "Error while updating the segment. The queried resource 'Segment' is not available on the server."
    }

Get Segment

Retrieve details of a segment

Retrieve details of a segment.

GET /segments/{segment_id}
(appConfiguration *AppConfigurationV1) GetSegment(getSegmentOptions *GetSegmentOptions) (result *Segment, response *core.DetailedResponse, err error)
(appConfiguration *AppConfigurationV1) GetSegmentWithContext(ctx context.Context, getSegmentOptions *GetSegmentOptions) (result *Segment, 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.

  • apprapp.segments.list

Auditing

Calling this method generates the following auditing event.

  • apprapp.segments.read

Request

Instantiate the GetSegmentOptions struct and set the fields to provide parameter values for the GetSegment method.

Path Parameters

  • Segment Id

    Example: segment_id

Query Parameters

  • Include feature and property details in the response.

    Allowable values: [features,properties]

    Examples:
    View

WithContext method only

The GetSegment options.

  • curl -X GET --location --header "Authorization: Bearer {iam_token}"   --header "Accept: application/json"   "{base_url}/segments/{segment_id}?include=features,properties"
  • getSegmentOptions := appConfigurationService.NewGetSegmentOptions(
      "segment_id",
    )
    getSegmentOptions.SetInclude([]string{"features", "properties"})
    
    segment, response, err := appConfigurationService.GetSegment(getSegmentOptions)
    if err != nil {
      panic(err)
    }
    b, _ := json.MarshalIndent(segment, "", "  ")
    fmt.Println(string(b))

Response

Details of the segment.

Details of the segment.

Examples:
View

Status Code

  • Successfully retrieved the segment details.

  • Not Found. Verify that the segment id is correct.

Example responses
  • {
      "name": "Beta Users",
      "segment_id": "beta-users",
      "description": "Segment containing the beta users",
      "tags": "version: 1.1, stage",
      "rules": [
        {
          "attribute_name": "email",
          "operator": "endsWith",
          "values": [
            "@in.mnc.com",
            "@us.mnc.com"
          ]
        },
        {
          "attribute_name": "country",
          "operator": "is",
          "values": [
            "India",
            "USA"
          ]
        }
      ],
      "created_time": "2021-05-12T23:20:50.52Z",
      "updated_time": "2021-05-12T23:20:50.52Z",
      "href": "https://us-south.apprapp.cloud.ibm.com/apprapp/feature/v1/instances/9xxxxx-xxxxx-xxxxx-b3cd-xxxxx/segments/beta-users"
    }
  • {
      "name": "Beta Users",
      "segment_id": "beta-users",
      "description": "Segment containing the beta users",
      "tags": "version: 1.1, stage",
      "rules": [
        {
          "attribute_name": "email",
          "operator": "endsWith",
          "values": [
            "@in.mnc.com",
            "@us.mnc.com"
          ]
        },
        {
          "attribute_name": "country",
          "operator": "is",
          "values": [
            "India",
            "USA"
          ]
        }
      ],
      "created_time": "2021-05-12T23:20:50.52Z",
      "updated_time": "2021-05-12T23:20:50.52Z",
      "href": "https://us-south.apprapp.cloud.ibm.com/apprapp/feature/v1/instances/9xxxxx-xxxxx-xxxxx-b3cd-xxxxx/segments/beta-users"
    }
  • {
      "code": "FTEC1000E",
      "message": "Error while retrieving the segment. The queried resource 'Segment' is not available on the server."
    }
  • {
      "code": "FTEC1000E",
      "message": "Error while retrieving the segment. The queried resource 'Segment' is not available on the server."
    }

Delete Segment

Delete a segment

Delete a segment.

DELETE /segments/{segment_id}
(appConfiguration *AppConfigurationV1) DeleteSegment(deleteSegmentOptions *DeleteSegmentOptions) (response *core.DetailedResponse, err error)
(appConfiguration *AppConfigurationV1) DeleteSegmentWithContext(ctx context.Context, deleteSegmentOptions *DeleteSegmentOptions) (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.

  • apprapp.segments.delete

Auditing

Calling this method generates the following auditing event.

  • apprapp.segments.delete

Request

Instantiate the DeleteSegmentOptions struct and set the fields to provide parameter values for the DeleteSegment method.

Path Parameters

  • Segment Id

    Example: segment_id

WithContext method only

The DeleteSegment options.

  • curl -X DELETE --location --header "Authorization: Bearer {iam_token}"   "{base_url}/segments/{segment_id}"
  • deleteSegmentOptions := appConfigurationService.NewDeleteSegmentOptions(
      "segment_id",
    )
    
    response, err := appConfigurationService.DeleteSegment(deleteSegmentOptions)
    if err != nil {
      panic(err)
    }
    if response.StatusCode != 204 {
      fmt.Printf("\nUnexpected response status code received from DeleteSegment(): %d\n", response.StatusCode)
    }

Response

Status Code

  • Successfully deleted the specified segment.

  • Not Found. Verify that the segment id is correct.

Example responses
  • {
      "code": "FTEC1000E",
      "message": "Error while deleting the segment. The queried resource 'Segment' is not available on the server."
    }
  • {
      "code": "FTEC1000E",
      "message": "Error while deleting the segment. The queried resource 'Segment' is not available on the server."
    }

Get list of Git configs

List all the Git configs

List all the Git configs.

GET /gitconfigs
(appConfiguration *AppConfigurationV1) ListSnapshots(listSnapshotsOptions *ListSnapshotsOptions) (result *GitConfigList, response *core.DetailedResponse, err error)
(appConfiguration *AppConfigurationV1) ListSnapshotsWithContext(ctx context.Context, listSnapshotsOptions *ListSnapshotsOptions) (result *GitConfigList, 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.

  • apprapp.gitconfigs.view

Auditing

Calling this method generates the following auditing event.

  • apprapp.snapshots.list

Request

Instantiate the ListSnapshotsOptions struct and set the fields to provide parameter values for the ListSnapshots method.

Query Parameters

  • Sort the git configurations details based on the specified attribute. By default, items are sorted by name.

    Allowable values: [created_time,updated_time,id,name]

    Example: created_time

  • Filters the response based on the specified collection_id.

    Example: collection_id

  • Filters the response based on the specified environment_id.

    Example: environment_id

  • The number of records to retrieve. By default, the list operation return the first 10 records. To retrieve different set of records, use limit with offset to page through the available records.

    Possible values: 1 ≤ value ≤ 100

    Default: 10

  • The number of records to skip. By specifying offset, you retrieve a subset of items that starts with the offset value. Use offset with limit to page through the available records.

    Possible values: value ≥ 0

    Default: 0

  • Searches for the provided keyword and returns the appropriate row with that value. Here the search happens on the '[Name]' of the entity

    Example: search_string

WithContext method only

The ListSnapshots options.

  • curl -X GET --location --header "Authorization: Bearer {iam_token}"   --header "Accept: application/json"   "{base_url}/gitconfigs?sort=created_time&collection_id=collection_id&environment_id=environment_id&search=search_string"
  • listSnapshotsOptions := &appconfigurationv1.ListSnapshotsOptions{
      Sort: core.StringPtr("created_time"),
      CollectionID: core.StringPtr("collection_id"),
      EnvironmentID: core.StringPtr("environment_id"),
      Limit: core.Int64Ptr(int64(10)),
      Search: core.StringPtr("search_string"),
    }
    
    pager, err := appConfigurationService.NewSnapshotsPager(listSnapshotsOptions)
    if err != nil {
      panic(err)
    }
    
    var allResults []appconfigurationv1.GitConfig
    for pager.HasNext() {
      nextPage, err := pager.GetNext()
      if err != nil {
        panic(err)
      }
      allResults = append(allResults, nextPage...)
    }
    b, _ := json.MarshalIndent(allResults, "", "  ")
    fmt.Println(string(b))

Response

List of all Git Configs.

List of all Git Configs.

Examples:
View

Status Code

  • Successfully listed all the git configurations.

  • Unauthorized

  • Not Implemented.

Example responses
  • {
      "git_config": [
        {
          "git_config_name": "boot-strap-configuration",
          "git_config_id": "boot-strap-configuration",
          "collection": {
            "name": "Web Application",
            "collection_id": "web-app-collection"
          },
          "environment": {
            "name": "Dev",
            "environment_id": "dev",
            "color_code": "#FDD13A"
          },
          "git_url": "https://github.ibm.com/api/v3/repos/jhondoe-owner/my-test-repo",
          "git_branch": "main",
          "git_file_path": "code/development/README.json",
          "last_sync_time": "2022-05-27T23:20:50.52Z",
          "created_time": "2021-05-12T23:20:50.52Z",
          "updated_time": "2021-05-12T23:20:50.52Z",
          "href": "https://us-south.apprapp.cloud.ibm.com/apprapp/feature/v1/instances/9xxxxx-xxxxx-xxxxx-b3cd-xxxxx/gitconfigs/boot-strap-configuration"
        }
      ],
      "limit": 10,
      "offset": 0,
      "total_count": 1,
      "first": {
        "href": "https://us-south.apprapp.cloud.ibm.com/apprapp/feature/v1/instances/9xxxxx-xxxxx-xxxxx-b3cd-xxxxx/gitconfigs?limit=10&offset=0"
      },
      "last": {
        "href": "https://us-south.apprapp.cloud.ibm.com/apprapp/feature/v1/instances/9xxxxx-xxxxx-xxxxx-b3cd-xxxxx/gitconfigs?limit=10&offset=0"
      }
    }
  • {
      "git_config": [
        {
          "git_config_name": "boot-strap-configuration",
          "git_config_id": "boot-strap-configuration",
          "collection": {
            "name": "Web Application",
            "collection_id": "web-app-collection"
          },
          "environment": {
            "name": "Dev",
            "environment_id": "dev",
            "color_code": "#FDD13A"
          },
          "git_url": "https://github.ibm.com/api/v3/repos/jhondoe-owner/my-test-repo",
          "git_branch": "main",
          "git_file_path": "code/development/README.json",
          "last_sync_time": "2022-05-27T23:20:50.52Z",
          "created_time": "2021-05-12T23:20:50.52Z",
          "updated_time": "2021-05-12T23:20:50.52Z",
          "href": "https://us-south.apprapp.cloud.ibm.com/apprapp/feature/v1/instances/9xxxxx-xxxxx-xxxxx-b3cd-xxxxx/gitconfigs/boot-strap-configuration"
        }
      ],
      "limit": 10,
      "offset": 0,
      "total_count": 1,
      "first": {
        "href": "https://us-south.apprapp.cloud.ibm.com/apprapp/feature/v1/instances/9xxxxx-xxxxx-xxxxx-b3cd-xxxxx/gitconfigs?limit=10&offset=0"
      },
      "last": {
        "href": "https://us-south.apprapp.cloud.ibm.com/apprapp/feature/v1/instances/9xxxxx-xxxxx-xxxxx-b3cd-xxxxx/gitconfigs?limit=10&offset=0"
      }
    }
  • {
      "message": "Unauthorized"
    }
  • {
      "message": "Unauthorized"
    }
  • {
      "code": "FTEC1011E",
      "message": "Currently 'snapshot' feature is not available"
    }
  • {
      "code": "FTEC1011E",
      "message": "Currently 'snapshot' feature is not available"
    }

Create Git config

Create a Git config.

Create a Git config.

POST /gitconfigs
(appConfiguration *AppConfigurationV1) CreateGitconfig(createGitconfigOptions *CreateGitconfigOptions) (result *CreateGitConfigResponse, response *core.DetailedResponse, err error)
(appConfiguration *AppConfigurationV1) CreateGitconfigWithContext(ctx context.Context, createGitconfigOptions *CreateGitconfigOptions) (result *CreateGitConfigResponse, 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.

  • apprapp.gitconfigs.create

Auditing

Calling this method generates the following auditing event.

  • apprapp.snapshots.create

Request

Instantiate the CreateGitconfigOptions struct and set the fields to provide parameter values for the CreateGitconfig method.

The request body to create a new Git config.

Examples:
View

WithContext method only

The CreateGitconfig options.

  • curl -X POST --location --header "Authorization: Bearer {iam_token}"   --header "Accept: application/json"   --header "Content-Type: application/json"   --data '{ "git_config_name": "boot-strap-configuration", "git_config_id": "boot-strap-configuration", "collection_id": "web-app-collection", "environment_id": "dev", "git_url": "https://github.ibm.com/api/v3/repos/jhondoe-owner/my-test-repo", "git_branch": "main", "git_file_path": "code/development/README.json", "git_token": "61a792eahhGHji223jijb55a6cfdd4d5cde4c8a67esjjhjhHVH" }'   "{base_url}/gitconfigs"
  • createGitconfigOptions := appConfigurationService.NewCreateGitconfigOptions(
      "boot-strap-configuration",
      "boot-strap-configuration",
      "web-app-collection",
      "dev",
      "https://github.ibm.com/api/v3/repos/jhondoe-owner/my-test-repo",
      "main",
      "code/development/README.json",
      "61a792eahhGHji223jijb55a6cfdd4d5cde4c8a67esjjhjhHVH",
    )
    
    createGitConfigResponse, response, err := appConfigurationService.CreateGitconfig(createGitconfigOptions)
    if err != nil {
      panic(err)
    }
    b, _ := json.MarshalIndent(createGitConfigResponse, "", "  ")
    fmt.Println(string(b))

Response

Details of the created Git config.

Details of the created Git config.

Examples:
View

Status Code

  • Successfully created the gitconfig

  • Bad request. Verify that the information in the request body is complete and correct.

  • Not Implemented.

Example responses
  • {
      "git_config_name": "boot-strap-configuration",
      "git_config_id": "boot-strap-configuration",
      "collection_id": "web-app-collection",
      "environment_id": "dev",
      "git_url": "https://github.ibm.com/api/v3/repos/jhondoe-owner/my-test-repo",
      "git_branch": "main",
      "git_file_path": "code/development/README.json",
      "created_time": "2021-05-12T23:20:50.52Z",
      "updated_time": "2021-05-12T23:20:50.52Z",
      "href": "https://us-south.apprapp.cloud.ibm.com/apprapp/feature/v1/instances/9xxxxx-xxxxx-xxxxx-b3cd-xxxxx/gitconfigs/boot-strap-configuration"
    }
  • {
      "git_config_name": "boot-strap-configuration",
      "git_config_id": "boot-strap-configuration",
      "collection_id": "web-app-collection",
      "environment_id": "dev",
      "git_url": "https://github.ibm.com/api/v3/repos/jhondoe-owner/my-test-repo",
      "git_branch": "main",
      "git_file_path": "code/development/README.json",
      "created_time": "2021-05-12T23:20:50.52Z",
      "updated_time": "2021-05-12T23:20:50.52Z",
      "href": "https://us-south.apprapp.cloud.ibm.com/apprapp/feature/v1/instances/9xxxxx-xxxxx-xxxxx-b3cd-xxxxx/gitconfigs/boot-strap-configuration"
    }
  • {
      "code": "FTEC1003E",
      "message": "Error while creating the gitconfig."
    }
  • {
      "code": "FTEC1003E",
      "message": "Error while creating the gitconfig."
    }
  • {
      "code": "FTEC1011E",
      "message": "Currently 'snapshot' feature is not available"
    }
  • {
      "code": "FTEC1011E",
      "message": "Currently 'snapshot' feature is not available"
    }

Update Git Config

Update the gitconfig properties

Update the gitconfig properties.

PUT /gitconfigs/{git_config_id}
(appConfiguration *AppConfigurationV1) UpdateGitconfig(updateGitconfigOptions *UpdateGitconfigOptions) (result *GitConfig, response *core.DetailedResponse, err error)
(appConfiguration *AppConfigurationV1) UpdateGitconfigWithContext(ctx context.Context, updateGitconfigOptions *UpdateGitconfigOptions) (result *GitConfig, 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.

  • apprapp.gitconfigs.update

Auditing

Calling this method generates the following auditing event.

  • apprapp.snapshots.update

Request

Instantiate the UpdateGitconfigOptions struct and set the fields to provide parameter values for the UpdateGitconfig method.

Path Parameters

  • Git Config Id

    Example: git_config_id

The request body to update a Git config.

Examples:
View

WithContext method only

The UpdateGitconfig options.

  • curl -X PUT --location --header "Authorization: Bearer {iam_token}"   --header "Accept: application/json"   --header "Content-Type: application/json"   --data '{"git_config_name":"updated git config name","collection_id":"web-app-collection","environment_id":"dev","git_url":"https://github.ibm.com/api/v3/repos/jhondoe-owner/my-test-repo","git_branch":"newbranch","git_file_path":"code/development/README.json","git_token":"61a792eahhGHji223jijb55a6cfdd4d5cde4c8a67esjjhjhHVH"}'   "{base_url}/gitconfigs/{git_config_id}"
  • updateGitconfigOptions := appConfigurationService.NewUpdateGitconfigOptions(
      "git_config_id",
    )
    
    gitConfig, response, err := appConfigurationService.UpdateGitconfig(updateGitconfigOptions)
    if err != nil {
      panic(err)
    }
    b, _ := json.MarshalIndent(gitConfig, "", "  ")
    fmt.Println(string(b))

Response

Details of the Git Config.

Details of the Git Config.

Examples:
View

Status Code

  • Successfully updated the gitconfig details.

  • Bad request. Verify that the information in the request body is complete and correct.

  • Not Found. Verify that the git config id is correct.

  • Not Implemented.

Example responses
  • {
      "git_config_name": "boot-strap-configuration",
      "git_config_id": "boot-strap-configuration",
      "collection": {
        "name": "Web Application",
        "collection_id": "web-app-collection"
      },
      "environment": {
        "name": "Dev",
        "environment_id": "dev",
        "color_code": "#FDD13A"
      },
      "git_url": "https://github.ibm.com/api/v3/repos/jhondoe-owner/my-test-repo",
      "git_branch": "main",
      "git_file_path": "code/development/README.json",
      "last_sync_time": "2022-05-27T23:20:50.52Z",
      "created_time": "2021-05-12T23:20:50.52Z",
      "updated_time": "2021-05-12T23:20:50.52Z",
      "href": "https://us-south.apprapp.cloud.ibm.com/apprapp/feature/v1/instances/9xxxxx-xxxxx-xxxxx-b3cd-xxxxx/gitconfigs/boot-strap-configuration"
    }
  • {
      "git_config_name": "boot-strap-configuration",
      "git_config_id": "boot-strap-configuration",
      "collection": {
        "name": "Web Application",
        "collection_id": "web-app-collection"
      },
      "environment": {
        "name": "Dev",
        "environment_id": "dev",
        "color_code": "#FDD13A"
      },
      "git_url": "https://github.ibm.com/api/v3/repos/jhondoe-owner/my-test-repo",
      "git_branch": "main",
      "git_file_path": "code/development/README.json",
      "last_sync_time": "2022-05-27T23:20:50.52Z",
      "created_time": "2021-05-12T23:20:50.52Z",
      "updated_time": "2021-05-12T23:20:50.52Z",
      "href": "https://us-south.apprapp.cloud.ibm.com/apprapp/feature/v1/instances/9xxxxx-xxxxx-xxxxx-b3cd-xxxxx/gitconfigs/boot-strap-configuration"
    }
  • {
      "code": "FTEC1007E",
      "message": "Error while updating the gitconfig."
    }
  • {
      "code": "FTEC1007E",
      "message": "Error while updating the gitconfig."
    }
  • {
      "code": "FTEC1000E",
      "message": "Error while updating the gitconfig. The queried resource 'git_config_id' is not available on the server."
    }
  • {
      "code": "FTEC1000E",
      "message": "Error while updating the gitconfig. The queried resource 'git_config_id' is not available on the server."
    }
  • {
      "code": "FTEC1011E",
      "message": "Currently 'snapshot' feature is not available"
    }
  • {
      "code": "FTEC1011E",
      "message": "Currently 'snapshot' feature is not available"
    }

Get Git Config

Retrieve details of a gitconfig

Retrieve details of a gitconfig.

GET /gitconfigs/{git_config_id}
(appConfiguration *AppConfigurationV1) GetGitconfig(getGitconfigOptions *GetGitconfigOptions) (result *GitConfig, response *core.DetailedResponse, err error)
(appConfiguration *AppConfigurationV1) GetGitconfigWithContext(ctx context.Context, getGitconfigOptions *GetGitconfigOptions) (result *GitConfig, 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.

  • apprapp.gitconfigs.view

Auditing

Calling this method generates the following auditing event.

  • apprapp.snapshots.read

Request

Instantiate the GetGitconfigOptions struct and set the fields to provide parameter values for the GetGitconfig method.

Path Parameters

  • Git Config Id

    Example: git_config_id

WithContext method only

The GetGitconfig options.

  • curl -X GET --location --header "Authorization: Bearer {iam_token}"   --header "Accept: application/json"   "{base_url}/gitconfigs/{git_config_id}"
  • getGitconfigOptions := appConfigurationService.NewGetGitconfigOptions(
      "git_config_id",
    )
    
    gitConfig, response, err := appConfigurationService.GetGitconfig(getGitconfigOptions)
    if err != nil {
      panic(err)
    }
    b, _ := json.MarshalIndent(gitConfig, "", "  ")
    fmt.Println(string(b))

Response

Details of the Git Config.

Details of the Git Config.

Examples:
View

Status Code

  • Successfully retrieved the gitconfig details.

  • Not Found. Verify that the gitconfig id is correct.

  • Not Implemented.

Example responses
  • {
      "git_config_name": "boot-strap-configuration",
      "git_config_id": "boot-strap-configuration",
      "collection": {
        "name": "Web Application",
        "collection_id": "web-app-collection"
      },
      "environment": {
        "name": "Dev",
        "environment_id": "dev",
        "color_code": "#FDD13A"
      },
      "git_url": "https://github.ibm.com/api/v3/repos/jhondoe-owner/my-test-repo",
      "git_branch": "main",
      "git_file_path": "code/development/README.json",
      "last_sync_time": "2022-05-27T23:20:50.52Z",
      "created_time": "2021-05-12T23:20:50.52Z",
      "updated_time": "2021-05-12T23:20:50.52Z",
      "href": "https://us-south.apprapp.cloud.ibm.com/apprapp/feature/v1/instances/9xxxxx-xxxxx-xxxxx-b3cd-xxxxx/gitconfigs/boot-strap-configuration"
    }
  • {
      "git_config_name": "boot-strap-configuration",
      "git_config_id": "boot-strap-configuration",
      "collection": {
        "name": "Web Application",
        "collection_id": "web-app-collection"
      },
      "environment": {
        "name": "Dev",
        "environment_id": "dev",
        "color_code": "#FDD13A"
      },
      "git_url": "https://github.ibm.com/api/v3/repos/jhondoe-owner/my-test-repo",
      "git_branch": "main",
      "git_file_path": "code/development/README.json",
      "last_sync_time": "2022-05-27T23:20:50.52Z",
      "created_time": "2021-05-12T23:20:50.52Z",
      "updated_time": "2021-05-12T23:20:50.52Z",
      "href": "https://us-south.apprapp.cloud.ibm.com/apprapp/feature/v1/instances/9xxxxx-xxxxx-xxxxx-b3cd-xxxxx/gitconfigs/boot-strap-configuration"
    }
  • {
      "code": "FTEC1000E",
      "message": "Error while retrieving the gitconfig. The queried resource 'git_config_id' is not available on the server."
    }
  • {
      "code": "FTEC1000E",
      "message": "Error while retrieving the gitconfig. The queried resource 'git_config_id' is not available on the server."
    }
  • {
      "code": "FTEC1011E",
      "message": "Currently 'snapshot' feature is not available"
    }
  • {
      "code": "FTEC1011E",
      "message": "Currently 'snapshot' feature is not available"
    }

Delete Git Config

Delete a gitconfig

Delete a gitconfig.

DELETE /gitconfigs/{git_config_id}
(appConfiguration *AppConfigurationV1) DeleteGitconfig(deleteGitconfigOptions *DeleteGitconfigOptions) (response *core.DetailedResponse, err error)
(appConfiguration *AppConfigurationV1) DeleteGitconfigWithContext(ctx context.Context, deleteGitconfigOptions *DeleteGitconfigOptions) (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.

  • apprapp.gitconfigs.delete

Auditing

Calling this method generates the following auditing event.

  • apprapp.snapshots.delete

Request

Instantiate the DeleteGitconfigOptions struct and set the fields to provide parameter values for the DeleteGitconfig method.

Path Parameters

  • Git Config Id

    Example: git_config_id

WithContext method only

The DeleteGitconfig options.

  • curl -X DELETE --location --header "Authorization: Bearer {iam_token}"   "{base_url}/gitconfigs/{git_config_id}"
  • deleteGitconfigOptions := appConfigurationService.NewDeleteGitconfigOptions(
      "git_config_id",
    )
    
    response, err := appConfigurationService.DeleteGitconfig(deleteGitconfigOptions)
    if err != nil {
      panic(err)
    }
    if response.StatusCode != 204 {
      fmt.Printf("\nUnexpected response status code received from DeleteGitconfig(): %d\n", response.StatusCode)
    }

Response

Status Code

  • Successfully deleted the specified gitconfig.

  • Not Found. Verify that the gitconfig id is correct.

  • Not Implemented.

Example responses
  • {
      "code": "FTEC1000E",
      "message": "Error while deleting the gitconfig. The queried resource 'git_config_id' is not available on the server."
    }
  • {
      "code": "FTEC1000E",
      "message": "Error while deleting the gitconfig. The queried resource 'git_config_id' is not available on the server."
    }
  • {
      "code": "FTEC1011E",
      "message": "Currently 'snapshot' feature is not available"
    }
  • {
      "code": "FTEC1011E",
      "message": "Currently 'snapshot' feature is not available"
    }

Promote configuration

Promote configuration, this api will write or update your chosen configuration to the GitHub based on the git url, file path and branch data. In simple words this api will create or updates the bootstrap json file

Promote configuration, this api will write or update your chosen configuration to the GitHub based on the git url, file path and branch data. In simple words this api will create or updates the bootstrap json file.

PUT /gitconfigs/{git_config_id}/promote
(appConfiguration *AppConfigurationV1) PromoteGitconfig(promoteGitconfigOptions *PromoteGitconfigOptions) (result *GitConfigPromote, response *core.DetailedResponse, err error)
(appConfiguration *AppConfigurationV1) PromoteGitconfigWithContext(ctx context.Context, promoteGitconfigOptions *PromoteGitconfigOptions) (result *GitConfigPromote, 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.

  • apprapp.gitconfigs.promote

Auditing

Calling this method generates the following auditing event.

  • apprapp.snapshots.promote

Request

Instantiate the PromoteGitconfigOptions struct and set the fields to provide parameter values for the PromoteGitconfig method.

Path Parameters

  • Git Config Id

    Example: git_config_id

WithContext method only

The PromoteGitconfig options.

  • curl -X PUT --location --header "Authorization: Bearer {iam_token}"   --header "Accept: application/json"   "{base_url}/gitconfigs/{git_config_id}/promote"
  • promoteGitconfigOptions := appConfigurationService.NewPromoteGitconfigOptions(
      "git_config_id",
    )
    
    gitConfigPromote, response, err := appConfigurationService.PromoteGitconfig(promoteGitconfigOptions)
    if err != nil {
      panic(err)
    }
    b, _ := json.MarshalIndent(gitConfigPromote, "", "  ")
    fmt.Println(string(b))

Response

Details of the promote operation.

Details of the promote operation.

Examples:
View

Status Code

  • Successfully written the configuration details.

  • Bad request. Verify that the information in the request body is complete and correct.

  • Not Found. Verify that the git config id is correct.

  • Not Implemented.

Example responses
  • {
      "last_sync_time": "2022-05-30T05:33:41Z",
      "git_commit_message": "custom config data written from App config instance",
      "git_commit_id": "2fadfe4e71632f32c19ee97d795f1494be95caf8"
    }
  • {
      "last_sync_time": "2022-05-30T05:33:41Z",
      "git_commit_message": "custom config data written from App config instance",
      "git_commit_id": "2fadfe4e71632f32c19ee97d795f1494be95caf8"
    }
  • {
      "code": "FTEC1007E",
      "message": "Error while writing or updating the configuration to the json file."
    }
  • {
      "code": "FTEC1007E",
      "message": "Error while writing or updating the configuration to the json file."
    }
  • {
      "code": "FTEC1000E",
      "message": "Error while updating the configuration. The queried resource 'git_config_id' is not available on the server."
    }
  • {
      "code": "FTEC1000E",
      "message": "Error while updating the configuration. The queried resource 'git_config_id' is not available on the server."
    }
  • {
      "code": "FTEC1011E",
      "message": "Currently 'snapshot' feature is not available"
    }
  • {
      "code": "FTEC1011E",
      "message": "Currently 'snapshot' feature is not available"
    }

Restore configuration

Restore configuration, this api will write or update your chosen configuration from the GitHub to App configuration instance. The api will read the contents in the json file that was created using promote API and recreate or updates the App configuration instance with the file contents like properties, features and segments.

Restore configuration, this api will write or update your chosen configuration from the GitHub to App configuration instance. The api will read the contents in the json file that was created using promote API and recreate or updates the App configuration instance with the file contents like properties, features and segments.

PUT /gitconfigs/{git_config_id}/restore
(appConfiguration *AppConfigurationV1) RestoreGitconfig(restoreGitconfigOptions *RestoreGitconfigOptions) (result *GitConfigRestore, response *core.DetailedResponse, err error)
(appConfiguration *AppConfigurationV1) RestoreGitconfigWithContext(ctx context.Context, restoreGitconfigOptions *RestoreGitconfigOptions) (result *GitConfigRestore, 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.

  • apprapp.gitconfigs.restore

Auditing

Calling this method generates the following auditing event.

  • apprapp.snapshots.restore

Request

Instantiate the RestoreGitconfigOptions struct and set the fields to provide parameter values for the RestoreGitconfig method.

Path Parameters

  • Git Config Id

    Example: git_config_id

WithContext method only

The RestoreGitconfig options.

  • curl -X PUT --location --header "Authorization: Bearer {iam_token}"   --header "Accept: application/json"   "{base_url}/gitconfigs/{git_config_id}/restore"
  • restoreGitconfigOptions := appConfigurationService.NewRestoreGitconfigOptions(
      "git_config_id",
    )
    
    gitConfigRestore, response, err := appConfigurationService.RestoreGitconfig(restoreGitconfigOptions)
    if err != nil {
      panic(err)
    }
    b, _ := json.MarshalIndent(gitConfigRestore, "", "  ")
    fmt.Println(string(b))

Response

Details of the restore operation.

Details of the restore operation.

Examples:
View

Status Code

  • Successfully updated the configuration details.

  • Bad request. Verify that the information in the request is complete and correct.

  • Not Found. Verify that the git config id is correct.

  • Not Implemented.

Example responses
  • {
      "environments": [
        {
          "name": "Dev",
          "environment_id": "dev",
          "description": "Environment created on instance creation",
          "tags": "",
          "color_code": "#FDD13A",
          "features": [
            {
              "name": "Cycle Rentals",
              "feature_id": "cycle-rentals",
              "type": "NUMERIC",
              "disabled_value": 2,
              "enabled_value": 1,
              "segment_rules": [],
              "enabled": true,
              "rollout_percentage": 100,
              "collections": [
                {
                  "collection_id": "web-app",
                  "name": "web-app"
                }
              ],
              "isOverridden": true
            }
          ],
          "properties": [
            {
              "name": "Daily Discount",
              "property_id": "daily_discount",
              "type": "NUMERIC",
              "tags": "pre-release, v1.2",
              "value": "100",
              "segment_rules": [
                {
                  "rules": [
                    {
                      "segments": [
                        "khpwj68h"
                      ]
                    }
                  ],
                  "value": 200,
                  "order": 1
                },
                {
                  "rules": [
                    {
                      "segments": [
                        "khpwjol7"
                      ]
                    }
                  ],
                  "value": 400,
                  "order": 2
                }
              ],
              "collections": [
                {
                  "collection_id": "web-app",
                  "name": "web-app"
                }
              ],
              "isOverridden": true
            }
          ]
        }
      ],
      "segments": [
        {
          "name": "Testers",
          "segment_id": "khpwj68h",
          "description": "Testers",
          "tags": "test",
          "rules": [
            {
              "values": [
                "john@bluecharge.com",
                "alice@bluecharge.com"
              ],
              "operator": "is",
              "attribute_name": "email"
            }
          ]
        },
        {
          "name": "IBMers",
          "segment_id": "khpwjol7",
          "description": "IBMers",
          "tags": "company,ibm",
          "rules": [
            {
              "values": [
                "ibm.com"
              ],
              "operator": "endsWith",
              "attribute_name": "email"
            }
          ]
        }
      ]
    }
  • {
      "environments": [
        {
          "name": "Dev",
          "environment_id": "dev",
          "description": "Environment created on instance creation",
          "tags": "",
          "color_code": "#FDD13A",
          "features": [
            {
              "name": "Cycle Rentals",
              "feature_id": "cycle-rentals",
              "type": "NUMERIC",
              "disabled_value": 2,
              "enabled_value": 1,
              "segment_rules": [],
              "enabled": true,
              "rollout_percentage": 100,
              "collections": [
                {
                  "collection_id": "web-app",
                  "name": "web-app"
                }
              ],
              "isOverridden": true
            }
          ],
          "properties": [
            {
              "name": "Daily Discount",
              "property_id": "daily_discount",
              "type": "NUMERIC",
              "tags": "pre-release, v1.2",
              "value": "100",
              "segment_rules": [
                {
                  "rules": [
                    {
                      "segments": [
                        "khpwj68h"
                      ]
                    }
                  ],
                  "value": 200,
                  "order": 1
                },
                {
                  "rules": [
                    {
                      "segments": [
                        "khpwjol7"
                      ]
                    }
                  ],
                  "value": 400,
                  "order": 2
                }
              ],
              "collections": [
                {
                  "collection_id": "web-app",
                  "name": "web-app"
                }
              ],
              "isOverridden": true
            }
          ]
        }
      ],
      "segments": [
        {
          "name": "Testers",
          "segment_id": "khpwj68h",
          "description": "Testers",
          "tags": "test",
          "rules": [
            {
              "values": [
                "john@bluecharge.com",
                "alice@bluecharge.com"
              ],
              "operator": "is",
              "attribute_name": "email"
            }
          ]
        },
        {
          "name": "IBMers",
          "segment_id": "khpwjol7",
          "description": "IBMers",
          "tags": "company,ibm",
          "rules": [
            {
              "values": [
                "ibm.com"
              ],
              "operator": "endsWith",
              "attribute_name": "email"
            }
          ]
        }
      ]
    }
  • {
      "code": "FTEC1007E",
      "message": "Error while writing or updating the configuration to the App configuration instance."
    }
  • {
      "code": "FTEC1007E",
      "message": "Error while writing or updating the configuration to the App configuration instance."
    }
  • {
      "code": "FTEC1000E",
      "message": "Error while updating the configuration. The queried resource 'git_config_id' is not available on the server."
    }
  • {
      "code": "FTEC1000E",
      "message": "Error while updating the configuration. The queried resource 'git_config_id' is not available on the server."
    }
  • {
      "code": "FTEC1011E",
      "message": "Currently 'snapshot' feature is not available"
    }
  • {
      "code": "FTEC1011E",
      "message": "Currently 'snapshot' feature is not available"
    }

Get list of integrations

List all the integrations.

GET /integrations

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.

  • apprapp.integrations.list

Auditing

Calling this method generates the following auditing event.

  • apprapp.integrations.list

Request

Query Parameters

  • If set to true, returns expanded view of the resource details.

    Example: true

  • The number of records to retrieve. By default, the list operation return the first 10 records. To retrieve different set of records, use limit with offset to page through the available records.

    Possible values: 1 ≤ value ≤ 100

    Default: 10

  • The number of records to skip. By specifying offset, you retrieve a subset of items that starts with the offset value. Use offset with limit to page through the available records.

    Possible values: value ≥ 0

    Default: 0

Response

List of all integrations.

Status Code

  • Successfully listed the integrations.

  • Unauthorized

Example responses
  • {
      "integrations": [
        {
          "integration_id": "lckkhp34t",
          "integration_type": "EVENT_NOTIFICATIONS",
          "metadata": {
            "event_notifications_endpoint": "https://eu-gb.event-notifications.cloud.ibm.com",
            "event_notifications_source_id": "crn:v1:bluemix:public:apprapp:eu-gb:a/4f631ea3b3204b2b878a295604994acf:34e45c66-3648-4a51-be67-22eac4a7561c::",
            "event_notifications_instance_crn": "crn:v1:bluemix:public:event-notifications:eu-gb:a/4f631ea3b3204b2b878a295604994acf:0eb42def-21aa-4f0a-a975-0812ead6ceee::"
          },
          "created_time": "2024-02-18T14:46:31Z",
          "updated_time": "2024-02-18T14:46:31Z",
          "href": "https://eu-gb.apprapp.cloud.ibm.com/feature/v1/instances/c6d52ad4-adaa-492b-941b-daa9e8d63d3a/integrations/lckkhp34t"
        },
        {
          "integration_id": "ldxktxso",
          "integration_type": "KMS",
          "metadata": {
            "key_status": "USABLE",
            "root_key_id": "094ab151-1e01-4d30-9e7a-f1311bc0fbc6",
            "kms_endpoint": "https://au-syd.kms.cloud.ibm.com",
            "kms_scheme_type": "BYOK",
            "kms_instance_crn": "crn:v1:bluemix:public:kms:au-syd:a/4f631ea3b3204b2b878a295604994acf:a3d454ea-38f4-4ae1-92e1-6a4aaac24e14::"
          },
          "created_time": "2023-05-26T02:46:33Z",
          "updated_time": "2023-05-26T02:46:34Z",
          "href": "https://eu-gb.apprapp.cloud.ibm.com/feature/v1/instances/c6d52ad4-adaa-492b-941b-daa9e8d63d3a/integrations/ldxktxso"
        }
      ],
      "offset": 0,
      "limit": 10,
      "total_count": 2,
      "first": {
        "href": "https://eu-gb.apprapp.cloud.ibm.com/feature/v1/instances/6e7b594d-3132-484f-9ace-39e30c5c67cd/integrations?offset=0&size=10"
      },
      "last": {
        "href": "https://eu-gb.apprapp.cloud.ibm.com/feature/v1/instances/6e7b594d-3132-484f-9ace-39e30c5c67cd/integrations?offset=0&size=10"
      }
    }
  • {
      "message": "Unauthorized"
    }

Create integration

Create an integration with App Configuration service instance.

POST /integrations

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.

  • apprapp.integrations.create

Auditing

Calling this method generates the following auditing event.

  • apprapp.integrations.create

Request

The request body to create a new integration. Currently, integration with Key Protect / HPCS and Event Notifications service is supported.

Examples:
EventNotifications
KMS

Response

Details of the integration.

Status Code

  • Successfully created the integration

  • Bad request. Verify that the information in the request body is complete and correct.

  • Unauthorized

  • Forbidden

Example responses
  • Example EN integration.

    {
      "integration_id": "lckkhp34t",
      "integration_type": "EVENT_NOTIFICATIONS",
      "metadata": {
        "event_notifications_endpoint": "https://eu-gb.event-notifications.cloud.ibm.com",
        "event_notifications_source_id": "crn:v1:bluemix:public:apprapp:eu-gb:a/4f631ea3b3204b2b878a295604994acf:34e45c66-3648-4a51-be67-22eac4a7561c::",
        "event_notifications_instance_crn": "crn:v1:bluemix:public:event-notifications:eu-gb:a/4f631ea3b3204b2b878a295604994acf:0eb42def-21aa-4f0a-a975-0812ead6ceee::"
      },
      "created_time": "2024-02-18T14:46:31Z",
      "updated_time": "2024-02-18T14:46:31Z",
      "href": "https://eu-gb.apprapp.cloud.ibm.com/feature/v1/instances/c6d52ad4-adaa-492b-941b-daa9e8d63d3a/integrations/lckkhp34t"
    }
  • Example KMS integration.

    {
      "integration_id": "ldxktxso",
      "integration_type": "KMS",
      "metadata": {
        "key_status": "USABLE",
        "root_key_id": "094ab151-1e01-4d30-9e7a-f1311bc0fbc6",
        "kms_endpoint": "https://au-syd.kms.cloud.ibm.com",
        "kms_scheme_type": "BYOK",
        "kms_instance_crn": "crn:v1:bluemix:public:kms:au-syd:a/4f631ea3b3204b2b878a295604994acf:a3d454ea-38f4-4ae1-92e1-6a4aaac24e14::"
      },
      "created_time": "2023-05-26T02:46:33Z",
      "updated_time": "2023-05-26T02:46:34Z",
      "href": "https://eu-gb.apprapp.cloud.ibm.com/feature/v1/instances/c6d52ad4-adaa-492b-941b-daa9e8d63d3a/integrations/ldxktxso"
    }
  • {
      "code": "FTEC1003E",
      "message": "An incorrect or incomplete request is sent to the server. The server request does not contain proper values to complete the API request. Check the 'metadata' parameter value."
    }
  • {
      "message": "Unauthorized"
    }
  • {
      "code": "FTEC1021E",
      "message": "Forbidden - Insufficient permission to create the integration."
    }

Get integration

Retrieve the details of the integration

GET /integrations/{integration_id}

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.

  • apprapp.integrations.list

Auditing

Calling this method generates the following auditing event.

  • apprapp.integrations.read

Request

Path Parameters

  • Integration Id of the integration

    Example: integration_id

Response

Details of the integration.

Status Code

  • Successfully retrived the integration details

  • Not Found. Verify that the integration id is correct.

Example responses
  • Example EN integration.

    {
      "integration_id": "lckkhp34t",
      "integration_type": "EVENT_NOTIFICATIONS",
      "metadata": {
        "event_notifications_endpoint": "https://eu-gb.event-notifications.cloud.ibm.com",
        "event_notifications_source_id": "crn:v1:bluemix:public:apprapp:eu-gb:a/4f631ea3b3204b2b878a295604994acf:34e45c66-3648-4a51-be67-22eac4a7561c::",
        "event_notifications_instance_crn": "crn:v1:bluemix:public:event-notifications:eu-gb:a/4f631ea3b3204b2b878a295604994acf:0eb42def-21aa-4f0a-a975-0812ead6ceee::"
      },
      "created_time": "2024-02-18T14:46:31Z",
      "updated_time": "2024-02-18T14:46:31Z",
      "href": "https://eu-gb.apprapp.cloud.ibm.com/feature/v1/instances/c6d52ad4-adaa-492b-941b-daa9e8d63d3a/integrations/lckkhp34t"
    }
  • Example KMS integration.

    {
      "integration_id": "ldxktxso",
      "integration_type": "KMS",
      "metadata": {
        "key_status": "USABLE",
        "root_key_id": "094ab151-1e01-4d30-9e7a-f1311bc0fbc6",
        "kms_endpoint": "https://au-syd.kms.cloud.ibm.com",
        "kms_scheme_type": "BYOK",
        "kms_instance_crn": "crn:v1:bluemix:public:kms:au-syd:a/4f631ea3b3204b2b878a295604994acf:a3d454ea-38f4-4ae1-92e1-6a4aaac24e14::"
      },
      "created_time": "2023-05-26T02:46:33Z",
      "updated_time": "2023-05-26T02:46:34Z",
      "href": "https://eu-gb.apprapp.cloud.ibm.com/feature/v1/instances/c6d52ad4-adaa-492b-941b-daa9e8d63d3a/integrations/ldxktxso"
    }
  • {
      "code": "FTEC1000E",
      "message": "Not Found - The queried resource 'Integration' is not available on the server. Check the'lkqwest3ws' parameter."
    }

Delete integration

Delete an integration

DELETE /integrations/{integration_id}

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.

  • apprapp.integrations.delete

Auditing

Calling this method generates the following auditing event.

  • apprapp.integrations.delete

Request

Path Parameters

  • Integration Id of the integration

    Example: integration_id

Response

Status Code

  • Successfully deleted the integration.

  • Not Found. Verify that the integration id is correct.

  • Method Not Allowed

Example responses
  • {
      "code": "FTEC1000E",
      "message": "Not Found - The queried resource 'Integration' is not available on the server. Check the'ekwgg78o' parameter."
    }
  • {
      "code": "FTEC1019E",
      "message": "Method Not Allowed. Currently, integration of type KMS cannot be deleted."
    }

Get list of Origin Configs

List all the Origin Configs

List all the Origin Configs.

GET /originconfigs
(appConfiguration *AppConfigurationV1) ListOriginconfigs(listOriginconfigsOptions *ListOriginconfigsOptions) (result *OriginConfigList, response *core.DetailedResponse, err error)
(appConfiguration *AppConfigurationV1) ListOriginconfigsWithContext(ctx context.Context, listOriginconfigsOptions *ListOriginconfigsOptions) (result *OriginConfigList, 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.

  • apprapp.originconfigs.list

Auditing

Calling this method generates the following auditing event.

  • apprapp.originconfigs.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 --location --header "Authorization: Bearer {iam_token}"   --header "Accept: application/json"   "{base_url}/originconfigs"
  • listOriginconfigsOptions := appConfigurationService.NewListOriginconfigsOptions()
    
    originConfigList, response, err := appConfigurationService.ListOriginconfigs(listOriginconfigsOptions)
    if err != nil {
      panic(err)
    }
    b, _ := json.MarshalIndent(originConfigList, "", "  ")
    fmt.Println(string(b))

Response

List of all origin configs.

List of all origin configs.

Examples:
View

Status Code

  • Successfully listed all the origin configuration.

  • Unauthorized

Example responses
  • {
      "allowed_origins": [
        "https://www.bluecharge.com",
        "https://blog.hubspot.com",
        "http://127.0.0.1:3000"
      ],
      "created_time": "2022-11-15T23:20:50Z",
      "updated_time": "2022-11-16T21:20:50Z",
      "href": "https://us-south.apprapp.cloud.ibm.com/apprapp/feature/v1/instances/9xxxxx-xxxxx-xxxxx-b3cd-xxxxx/originconfigs"
    }
  • {
      "allowed_origins": [
        "https://www.bluecharge.com",
        "https://blog.hubspot.com",
        "http://127.0.0.1:3000"
      ],
      "created_time": "2022-11-15T23:20:50Z",
      "updated_time": "2022-11-16T21:20:50Z",
      "href": "https://us-south.apprapp.cloud.ibm.com/apprapp/feature/v1/instances/9xxxxx-xxxxx-xxxxx-b3cd-xxxxx/originconfigs"
    }
  • {
      "message": "Unauthorized"
    }
  • {
      "message": "Unauthorized"
    }

Update Origin Configs

Update the Origin Configs

Update the Origin Configs.

PUT /originconfigs
(appConfiguration *AppConfigurationV1) UpdateOriginconfigs(updateOriginconfigsOptions *UpdateOriginconfigsOptions) (result *OriginConfigList, response *core.DetailedResponse, err error)
(appConfiguration *AppConfigurationV1) UpdateOriginconfigsWithContext(ctx context.Context, updateOriginconfigsOptions *UpdateOriginconfigsOptions) (result *OriginConfigList, 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.

  • apprapp.originconfigs.update

Auditing

Calling this method generates the following auditing event.

  • apprapp.originconfigs.update

Request

Instantiate the UpdateOriginconfigsOptions struct and set the fields to provide parameter values for the UpdateOriginconfigs method.

The request body to update origin config.

Examples:
View

WithContext method only

The UpdateOriginconfigs options.

  • curl -X PUT --location --header "Authorization: Bearer {iam_token}"   --header "Accept: application/json"   --header "Content-Type: application/json"   --data '{"allowed_origins":["https://www.bluecharge.com","https://blog.hubspot.com","http://127.0.0.1:3000"]}'   "{base_url}/originconfigs"
  • updateOriginconfigsOptions := appConfigurationService.NewUpdateOriginconfigsOptions(
      []string{"testString"},
    )
    
    originConfigList, response, err := appConfigurationService.UpdateOriginconfigs(updateOriginconfigsOptions)
    if err != nil {
      panic(err)
    }
    b, _ := json.MarshalIndent(originConfigList, "", "  ")
    fmt.Println(string(b))

Response

List of all origin configs.

List of all origin configs.

Examples:
View

Status Code

  • Successfully updated the origin configs details.

  • Not Found. Verify that the instance id is correct.

Example responses
  • {
      "allowed_origins": [
        "https://www.bluecharge.com",
        "https://blog.hubspot.com",
        "http://127.0.0.1:3000"
      ],
      "created_time": "2022-11-15T23:20:50Z",
      "updated_time": "2022-11-16T21:20:50Z",
      "href": "https://us-south.apprapp.cloud.ibm.com/apprapp/feature/v1/instances/9xxxxx-xxxxx-xxxxx-b3cd-xxxxx/originconfigs"
    }
  • {
      "allowed_origins": [
        "https://www.bluecharge.com",
        "https://blog.hubspot.com",
        "http://127.0.0.1:3000"
      ],
      "created_time": "2022-11-15T23:20:50Z",
      "updated_time": "2022-11-16T21:20:50Z",
      "href": "https://us-south.apprapp.cloud.ibm.com/apprapp/feature/v1/instances/9xxxxx-xxxxx-xxxxx-b3cd-xxxxx/originconfigs"
    }
  • {
      "code": "FTEC1000E",
      "message": "The queried resource 'Instance' is not available on the server."
    }
  • {
      "code": "FTEC1000E",
      "message": "The queried resource 'Instance' is not available on the server."
    }

Get Workflow Config

Get the environment specific workflow Configs

Get the environment specific workflow Configs.

GET /environments/{environment_id}/workflowconfigs
(appConfiguration *AppConfigurationV1) ListWorkflowconfig(listWorkflowconfigOptions *ListWorkflowconfigOptions) (result *WorkflowConfig, response *core.DetailedResponse, err error)
(appConfiguration *AppConfigurationV1) ListWorkflowconfigWithContext(ctx context.Context, listWorkflowconfigOptions *ListWorkflowconfigOptions) (result *WorkflowConfig, 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.

  • apprapp.workflowconfigs.list

Auditing

Calling this method generates the following auditing event.

  • apprapp.workflowconfigs.list

Request

Instantiate the ListWorkflowconfigOptions struct and set the fields to provide parameter values for the ListWorkflowconfig method.

Path Parameters

  • Environment Id

    Example: environment_id

WithContext method only

The ListWorkflowconfig options.

  • curl -X GET --location --header "Authorization: Bearer {iam_token}"   --header "Accept: application/json"   "{base_url}/environments/{environment_id}/workflowconfigs"
  • listWorkflowconfigOptions := appConfigurationService.NewListWorkflowconfigOptions(
      "environment_id",
    )
    
    workflowConfig, response, err := appConfigurationService.ListWorkflowconfig(listWorkflowconfigOptions)
    if err != nil {
      panic(err)
    }
    b, _ := json.MarshalIndent(workflowConfig, "", "  ")
    fmt.Println(string(b))

Response

Details of the Workflow configuration.

Details of the Workflow configuration.

Examples:
View

Status Code

  • Successfully listed workflow configuration for the environment.

  • Unauthorized

  • Not Found. Verify that the environment_id is correct.

  • Not Implemented.

Example responses
  • {
      "environment_id": "dev",
      "environment_name": "Dev",
      "workflow_url": "https://xxxxx.service-now.com",
      "approval_group_name": "WorkflowCRApprovers",
      "approval_expiration": 10,
      "workflow_credentials": {
        "client_id": "client id value",
        "client_secret": "clientsecret",
        "password": "pwd",
        "username": "user"
      },
      "enabled": true,
      "created_time": "2023-04-17T04:45:12Z",
      "updated_time": "2023-04-17T04:45:12Z",
      "href": "https://us-south.apprapp.cloud.ibm.com/feature/v1/instances/xxxx-c14c3-4a62a-xxx-xxxxxx/environments/dev/workflowconfigs"
    }
  • {
      "environment_id": "dev",
      "environment_name": "Dev",
      "workflow_url": "https://xxxxx.service-now.com",
      "approval_group_name": "WorkflowCRApprovers",
      "approval_expiration": 10,
      "workflow_credentials": {
        "client_id": "client id value",
        "client_secret": "clientsecret",
        "password": "pwd",
        "username": "user"
      },
      "enabled": true,
      "created_time": "2023-04-17T04:45:12Z",
      "updated_time": "2023-04-17T04:45:12Z",
      "href": "https://us-south.apprapp.cloud.ibm.com/feature/v1/instances/xxxx-c14c3-4a62a-xxx-xxxxxx/environments/dev/workflowconfigs"
    }
  • {
      "message": "Unauthorized"
    }
  • {
      "message": "Unauthorized"
    }
  • {
      "code": "FTEC1000E",
      "message": "Error while fetching the configuration. The queried resource is not available on the server."
    }
  • {
      "code": "FTEC1000E",
      "message": "Error while fetching the configuration. The queried resource is not available on the server."
    }
  • {
      "code": "FTEC1011E",
      "message": "Currently 'workflow integration' feature is not available"
    }
  • {
      "code": "FTEC1011E",
      "message": "Currently 'workflow integration' feature is not available"
    }

Create Workflow config

Create a Workflow.

Create a Workflow.

POST /environments/{environment_id}/workflowconfigs
(appConfiguration *AppConfigurationV1) CreateWorkflowconfig(createWorkflowconfigOptions *CreateWorkflowconfigOptions) (result *WorkflowConfig, response *core.DetailedResponse, err error)
(appConfiguration *AppConfigurationV1) CreateWorkflowconfigWithContext(ctx context.Context, createWorkflowconfigOptions *CreateWorkflowconfigOptions) (result *WorkflowConfig, 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.

  • apprapp.workflowconfigs.create

Auditing

Calling this method generates the following auditing event.

  • apprapp.workflowconfigs.create

Request

Instantiate the CreateWorkflowconfigOptions struct and set the fields to provide parameter values for the CreateWorkflowconfig method.

Path Parameters

  • Environment Id

    Example: environment_id

The request body to create a new workflow config.

Examples:
View

WithContext method only

The CreateWorkflowconfig options.

  • curl -X POST --location --header "Authorization: Bearer {iam_token}"   --header "Accept: application/json"   --header "Content-Type: application/json"   --data '{ "workflow_url": "https://xxxxx.service-now.com", "approval_group_name": "WorkflowCRApprovers", "approval_expiration": 10, "workflow_credentials": { "client_id": "client id value", "client_secret": "clientsecret", "password": "pwd", "username": "user" }, "enabled": true }'   "{base_url}/environments/{environment_id}/workflowconfigs"
  • workflowCredentialsModel := &appconfigurationv1.WorkflowCredentials{
      Username: core.StringPtr("user"),
      Password: core.StringPtr("pwd"),
      ClientID: core.StringPtr("client id value"),
      ClientSecret: core.StringPtr("clientsecret"),
    }
    
    createWorkflowconfigOptions := appConfigurationService.NewCreateWorkflowconfigOptions(
      "environment_id",
      "https://xxxxx.service-now.com",
      "WorkflowCRApprovers",
      int64(10),
      workflowCredentialsModel,
      true,
    )
    
    workflowConfig, response, err := appConfigurationService.CreateWorkflowconfig(createWorkflowconfigOptions)
    if err != nil {
      panic(err)
    }
    b, _ := json.MarshalIndent(workflowConfig, "", "  ")
    fmt.Println(string(b))

Response

Details of the Workflow configuration.

Details of the Workflow configuration.

Examples:
View

Status Code

  • Successfully created the workflow configuration

  • Bad request. Verify that the information in the request body is complete and correct.

  • Not Found. Verify that the environment_id is correct.

  • Not Implemented.

Example responses
  • {
      "environment_id": "dev",
      "environment_name": "Dev",
      "workflow_url": "https://xxxxx.service-now.com",
      "approval_group_name": "WorkflowCRApprovers",
      "approval_expiration": 10,
      "workflow_credentials": {
        "client_id": "client id value",
        "client_secret": "clientsecret",
        "password": "pwd",
        "username": "user"
      },
      "enabled": true,
      "created_time": "2023-04-17T04:45:12Z",
      "updated_time": "2023-04-17T04:45:12Z",
      "href": "https://us-south.apprapp.cloud.ibm.com/feature/v1/instances/xxxx-c14c3-4a62a-xxx-xxxxxx/environments/dev/workflowconfigs"
    }
  • {
      "environment_id": "dev",
      "environment_name": "Dev",
      "workflow_url": "https://xxxxx.service-now.com",
      "approval_group_name": "WorkflowCRApprovers",
      "approval_expiration": 10,
      "workflow_credentials": {
        "client_id": "client id value",
        "client_secret": "clientsecret",
        "password": "pwd",
        "username": "user"
      },
      "enabled": true,
      "created_time": "2023-04-17T04:45:12Z",
      "updated_time": "2023-04-17T04:45:12Z",
      "href": "https://us-south.apprapp.cloud.ibm.com/feature/v1/instances/xxxx-c14c3-4a62a-xxx-xxxxxx/environments/dev/workflowconfigs"
    }
  • {
      "code": "FTEC1003E",
      "message": "Error while creating the workflow configuration."
    }
  • {
      "code": "FTEC1003E",
      "message": "Error while creating the workflow configuration."
    }
  • {
      "code": "FTEC1000E",
      "message": "Error while creating the configuration. The queried evironment resource is not available on the server."
    }
  • {
      "code": "FTEC1000E",
      "message": "Error while creating the configuration. The queried evironment resource is not available on the server."
    }
  • {
      "code": "FTEC1011E",
      "message": "Currently 'workflow integration' feature is not available"
    }
  • {
      "code": "FTEC1011E",
      "message": "Currently 'workflow integration' feature is not available"
    }

Update Workflow config

Update a Workflow.

Update a Workflow.

PUT /environments/{environment_id}/workflowconfigs
(appConfiguration *AppConfigurationV1) UpdateWorkflowconfig(updateWorkflowconfigOptions *UpdateWorkflowconfigOptions) (result *WorkflowConfig, response *core.DetailedResponse, err error)
(appConfiguration *AppConfigurationV1) UpdateWorkflowconfigWithContext(ctx context.Context, updateWorkflowconfigOptions *UpdateWorkflowconfigOptions) (result *WorkflowConfig, 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.

  • apprapp.workflowconfigs.update

Auditing

Calling this method generates the following auditing event.

  • apprapp.workflowconfigs.update

Request

Instantiate the UpdateWorkflowconfigOptions struct and set the fields to provide parameter values for the UpdateWorkflowconfig method.

Path Parameters

  • Environment Id

    Example: environment_id

The request body to update a workflow config.

Examples:
View

WithContext method only

The UpdateWorkflowconfig options.

  • curl -X PUT --location --header "Authorization: Bearer {iam_token}"   --header "Accept: application/json"   --header "Content-Type: application/json"   --data '{"workflow_url":"https://xxxxx.service-now.com","approval_group_name":"WorkflowCRApprovers","approval_expiration":5,"workflow_credentials":{"client_id":"client id value","client_secret":"updated client secret","password":"updated password","username":"user"},"enabled":true}'   "{base_url}/environments/{environment_id}/workflowconfigs"
  • updateWorkflowconfigOptions := appConfigurationService.NewUpdateWorkflowconfigOptions(
      "environment_id",
    )
    
    workflowConfig, response, err := appConfigurationService.UpdateWorkflowconfig(updateWorkflowconfigOptions)
    if err != nil {
      panic(err)
    }
    b, _ := json.MarshalIndent(workflowConfig, "", "  ")
    fmt.Println(string(b))

Response

Details of the Workflow configuration.

Details of the Workflow configuration.

Examples:
View

Status Code

  • Successfully created the workflow configuration

  • Bad request. Verify that the information in the request body is complete and correct.

  • Not Found. Verify that the environment_id is correct.

  • Not Implemented.

Example responses
  • {
      "environment_id": "dev",
      "environment_name": "Dev",
      "workflow_url": "https://xxxxx.service-now.com",
      "approval_group_name": "WorkflowCRApprovers",
      "approval_expiration": 10,
      "workflow_credentials": {
        "client_id": "client id value",
        "client_secret": "clientsecret",
        "password": "pwd",
        "username": "user"
      },
      "enabled": true,
      "created_time": "2023-04-17T04:45:12Z",
      "updated_time": "2023-04-17T04:45:12Z",
      "href": "https://us-south.apprapp.cloud.ibm.com/feature/v1/instances/xxxx-c14c3-4a62a-xxx-xxxxxx/environments/dev/workflowconfigs"
    }
  • {
      "environment_id": "dev",
      "environment_name": "Dev",
      "workflow_url": "https://xxxxx.service-now.com",
      "approval_group_name": "WorkflowCRApprovers",
      "approval_expiration": 10,
      "workflow_credentials": {
        "client_id": "client id value",
        "client_secret": "clientsecret",
        "password": "pwd",
        "username": "user"
      },
      "enabled": true,
      "created_time": "2023-04-17T04:45:12Z",
      "updated_time": "2023-04-17T04:45:12Z",
      "href": "https://us-south.apprapp.cloud.ibm.com/feature/v1/instances/xxxx-c14c3-4a62a-xxx-xxxxxx/environments/dev/workflowconfigs"
    }
  • {
      "code": "FTEC1003E",
      "message": "Error while creating the workflow configuration."
    }
  • {
      "code": "FTEC1003E",
      "message": "Error while creating the workflow configuration."
    }
  • {
      "code": "FTEC1000E",
      "message": "Error while creating the configuration. The queried evironment resource is not available on the server."
    }
  • {
      "code": "FTEC1000E",
      "message": "Error while creating the configuration. The queried evironment resource is not available on the server."
    }
  • {
      "code": "FTEC1011E",
      "message": "Currently 'workflow integration' feature is not available"
    }
  • {
      "code": "FTEC1011E",
      "message": "Currently 'workflow integration' feature is not available"
    }

Delete Workflow config

Delete a Workflow config

Delete a Workflow config.

DELETE /environments/{environment_id}/workflowconfigs
(appConfiguration *AppConfigurationV1) DeleteWorkflowconfig(deleteWorkflowconfigOptions *DeleteWorkflowconfigOptions) (response *core.DetailedResponse, err error)
(appConfiguration *AppConfigurationV1) DeleteWorkflowconfigWithContext(ctx context.Context, deleteWorkflowconfigOptions *DeleteWorkflowconfigOptions) (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.

  • apprapp.workflowconfigs.delete

Auditing

Calling this method generates the following auditing event.

  • apprapp.workflowconfigs.delete

Request

Instantiate the DeleteWorkflowconfigOptions struct and set the fields to provide parameter values for the DeleteWorkflowconfig method.

Path Parameters

  • Environment Id

    Example: environment_id

WithContext method only

The DeleteWorkflowconfig options.

  • curl -X DELETE --location --header "Authorization: Bearer {iam_token}"   "{base_url}/environments/{environment_id}/workflowconfigs"
  • deleteWorkflowconfigOptions := appConfigurationService.NewDeleteWorkflowconfigOptions(
      "environment_id",
    )
    
    response, err := appConfigurationService.DeleteWorkflowconfig(deleteWorkflowconfigOptions)
    if err != nil {
      panic(err)
    }
    if response.StatusCode != 204 {
      fmt.Printf("\nUnexpected response status code received from DeleteWorkflowconfig(): %d\n", response.StatusCode)
    }

Response

Status Code

  • Successfully deleted environment specific workflow config.

  • Not Found. Verify that the environment id is correct.

  • Not Implemented.

Example responses
  • {
      "code": "FTEC1000E",
      "message": "Error while deleting the workflow config. The queried resource is not available on the server."
    }
  • {
      "code": "FTEC1000E",
      "message": "Error while deleting the workflow config. The queried resource is not available on the server."
    }
  • {
      "code": "FTEC1011E",
      "message": "Currently 'workflow integration' feature is not available"
    }
  • {
      "code": "FTEC1011E",
      "message": "Currently 'workflow integration' feature is not available"
    }

Import instance configuration

Import configuration to the instance.

Import configuration to the instance.

POST /config
(appConfiguration *AppConfigurationV1) ImportConfig(importConfigOptions *ImportConfigOptions) (result *ImportConfig, response *core.DetailedResponse, err error)
(appConfiguration *AppConfigurationV1) ImportConfigWithContext(ctx context.Context, importConfigOptions *ImportConfigOptions) (result *ImportConfig, 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.

  • apprapp.config.import

Auditing

Calling this method generates the following auditing event.

  • apprapp.config.import

Request

Instantiate the ImportConfigOptions struct and set the fields to provide parameter values for the ImportConfig method.

Query Parameters

  • Full instance import requires query parameter clean=true to perform wiping of the existing data.

    Example: true

The request body to import configurations.

Examples:
View

WithContext method only

The ImportConfig options.

  • curl -X POST --location --header "Authorization: Bearer {iam_token}"   --header "Accept: application/json"   --header "Content-Type: application/json"   --data '{ "environments": [ { "name": "Dev", "environment_id": "dev", "description": "Environment created on instance creation", "tags": "", "color_code": "#FDD13A", "features": [ { "name": "Cycle Rentals", "feature_id": "cycle-rentals", "description": "", "tags": "", "type": "NUMERIC", "disabled_value": 2, "enabled_value": 1, "segment_rules":  ], "enabled": true, "rollout_percentage": 100, "collections": [ { "collection_id": "web-app", "name": "web-app" } ], "isOverridden": true } ], "properties": [ { "name": "Daily Discount", "property_id": "daily_discount", "description": "", "tags": "pre-release, v1.2", "type": "NUMERIC", "value": "100", "segment_rules": [ { "rules": [ { "segments": [ "khpwj68h" ] } ], "value": 200, "order": 1 }, { "rules": [ { "segments": [ "khpwjol7" ] } ], "value": 400, "order": 2 } ], "collections": [ { "collection_id": "web-app", "name": "web-app" } ], "isOverridden": true } ] } ], "collections": [ { "name": "web-app", "collection_id": "web-app", "description": "web app collection", "tags": "v1" } ], "segments": [ { "name": "Testers", "segment_id": "khpwj68h", "description": "Testers", "tags": "test", "rules": [ { "values": [ "john@bluecharge.com", "alice@bluecharge.com" ], "operator": "is", "attribute_name": "email" } ] }, { "name": "IBMers", "segment_id": "khpwjol7", "description": "IBMers", "tags": "company,ibm", "rules": [ { "values": [ "ibm.com" ], "operator": "endsWith", "attribute_name": "email" } ] } ] }'   "{base_url}/config?clean=true"
  • targetSegmentsModel := &appconfigurationv1.TargetSegments{
      Segments: []string{"testString"},
    }
    
    featureSegmentRuleModel := &appconfigurationv1.FeatureSegmentRule{
      Rules: []appconfigurationv1.TargetSegments{*targetSegmentsModel},
      Value: core.StringPtr("testString"),
      Order: core.Int64Ptr(int64(38)),
    }
    
    collectionRefModel := &appconfigurationv1.CollectionRef{
      CollectionID: core.StringPtr("web-app"),
    }
    
    importFeatureRequestBodyModel := &appconfigurationv1.ImportFeatureRequestBody{
      Name: core.StringPtr("Cycle Rentals"),
      FeatureID: core.StringPtr("cycle-rentals"),
      Type: core.StringPtr("NUMERIC"),
      EnabledValue: core.StringPtr("1"),
      DisabledValue: core.StringPtr("2"),
      Enabled: core.BoolPtr(true),
      RolloutPercentage: core.Int64Ptr(int64(100)),
      SegmentRules: []appconfigurationv1.FeatureSegmentRule{*featureSegmentRuleModel},
      Collections: []appconfigurationv1.CollectionRef{*collectionRefModel},
      IsOverridden: core.BoolPtr(true),
    }
    
    segmentRuleModel := &appconfigurationv1.SegmentRule{
      Rules: []appconfigurationv1.TargetSegments{*targetSegmentsModel},
      Value: core.StringPtr("200"),
      Order: core.Int64Ptr(int64(1)),
    }
    
    importPropertyRequestBodyModel := &appconfigurationv1.ImportPropertyRequestBody{
      Name: core.StringPtr("Daily Discount"),
      PropertyID: core.StringPtr("daily_discount"),
      Type: core.StringPtr("NUMERIC"),
      Value: core.StringPtr("100"),
      Tags: core.StringPtr("pre-release, v1.2"),
      SegmentRules: []appconfigurationv1.SegmentRule{*segmentRuleModel},
      Collections: []appconfigurationv1.CollectionRef{*collectionRefModel},
      IsOverridden: core.BoolPtr(true),
    }
    
    importEnvironmentSchemaModel := &appconfigurationv1.ImportEnvironmentSchema{
      Name: core.StringPtr("Dev"),
      EnvironmentID: core.StringPtr("dev"),
      Description: core.StringPtr("Environment created on instance creation"),
      ColorCode: core.StringPtr("#FDD13A"),
      Features: []appconfigurationv1.ImportFeatureRequestBody{*importFeatureRequestBodyModel},
      Properties: []appconfigurationv1.ImportPropertyRequestBody{*importPropertyRequestBodyModel},
    }
    
    importCollectionSchemaModel := &appconfigurationv1.ImportCollectionSchema{
      CollectionID: core.StringPtr("web-app"),
      Name: core.StringPtr("web-app"),
      Description: core.StringPtr("web app collection"),
      Tags: core.StringPtr("v1"),
    }
    
    ruleModel := &appconfigurationv1.Rule{
      AttributeName: core.StringPtr("email"),
      Operator: core.StringPtr("is"),
      Values: []string{"john@bluecharge.com", "alice@bluecharge.com"},
    }
    
    importSegmentSchemaModel := &appconfigurationv1.ImportSegmentSchema{
      Name: core.StringPtr("Testers"),
      SegmentID: core.StringPtr("khpwj68h"),
      Description: core.StringPtr("Testers"),
      Tags: core.StringPtr("test"),
      Rules: []appconfigurationv1.Rule{*ruleModel},
    }
    
    importConfigOptions := appConfigurationService.NewImportConfigOptions()
    importConfigOptions.SetEnvironments([]appconfigurationv1.ImportEnvironmentSchema{*importEnvironmentSchemaModel})
    importConfigOptions.SetCollections([]appconfigurationv1.ImportCollectionSchema{*importCollectionSchemaModel})
    importConfigOptions.SetSegments([]appconfigurationv1.ImportSegmentSchema{*importSegmentSchemaModel})
    importConfigOptions.SetClean("true")
    
    importConfig, response, err := appConfigurationService.ImportConfig(importConfigOptions)
    if err != nil {
      panic(err)
    }
    b, _ := json.MarshalIndent(importConfig, "", "  ")
    fmt.Println(string(b))

Response

Full instance configuration.

Full instance configuration.

Examples:
View

Status Code

  • Successfully imported the configuration

  • Bad request. Verify that the information in the request body is complete and correct.

  • Forbidden Request - Instance is not empty. Send clean=true query param if you want to override the current instance configuration

  • Not Implemented.

Example responses
  • {
      "environments": [
        {
          "name": "Dev",
          "environment_id": "dev",
          "description": "Environment created on instance creation",
          "tags": "",
          "color_code": "#FDD13A",
          "features": [
            {
              "name": "Cycle Rentals",
              "feature_id": "cycle-rentals",
              "description": "",
              "tags": "",
              "type": "NUMERIC",
              "disabled_value": 2,
              "enabled_value": 1,
              "segment_rules": [],
              "enabled": true,
              "rollout_percentage": 100,
              "collections": [
                {
                  "collection_id": "web-app",
                  "name": "web-app"
                }
              ],
              "isOverridden": true
            }
          ],
          "properties": [
            {
              "name": "Daily Discount",
              "property_id": "daily_discount",
              "description": "",
              "tags": "pre-release, v1.2",
              "type": "NUMERIC",
              "value": "100",
              "segment_rules": [
                {
                  "rules": [
                    {
                      "segments": [
                        "khpwj68h"
                      ]
                    }
                  ],
                  "value": 200,
                  "order": 1
                },
                {
                  "rules": [
                    {
                      "segments": [
                        "khpwjol7"
                      ]
                    }
                  ],
                  "value": 400,
                  "order": 2
                }
              ],
              "collections": [
                {
                  "collection_id": "web-app",
                  "name": "web-app"
                }
              ],
              "isOverridden": true
            }
          ]
        }
      ],
      "collections": [
        {
          "name": "web-app",
          "collection_id": "web-app",
          "description": "web app collection",
          "tags": "v1"
        }
      ],
      "segments": [
        {
          "name": "Testers",
          "segment_id": "khpwj68h",
          "description": "Testers",
          "tags": "test",
          "rules": [
            {
              "values": [
                "john@bluecharge.com",
                "alice@bluecharge.com"
              ],
              "operator": "is",
              "attribute_name": "email"
            }
          ]
        },
        {
          "name": "IBMers",
          "segment_id": "khpwjol7",
          "description": "IBMers",
          "tags": "company,ibm",
          "rules": [
            {
              "values": [
                "ibm.com"
              ],
              "operator": "endsWith",
              "attribute_name": "email"
            }
          ]
        }
      ]
    }
  • {
      "environments": [
        {
          "name": "Dev",
          "environment_id": "dev",
          "description": "Environment created on instance creation",
          "tags": "",
          "color_code": "#FDD13A",
          "features": [
            {
              "name": "Cycle Rentals",
              "feature_id": "cycle-rentals",
              "description": "",
              "tags": "",
              "type": "NUMERIC",
              "disabled_value": 2,
              "enabled_value": 1,
              "segment_rules": [],
              "enabled": true,
              "rollout_percentage": 100,
              "collections": [
                {
                  "collection_id": "web-app",
                  "name": "web-app"
                }
              ],
              "isOverridden": true
            }
          ],
          "properties": [
            {
              "name": "Daily Discount",
              "property_id": "daily_discount",
              "description": "",
              "tags": "pre-release, v1.2",
              "type": "NUMERIC",
              "value": "100",
              "segment_rules": [
                {
                  "rules": [
                    {
                      "segments": [
                        "khpwj68h"
                      ]
                    }
                  ],
                  "value": 200,
                  "order": 1
                },
                {
                  "rules": [
                    {
                      "segments": [
                        "khpwjol7"
                      ]
                    }
                  ],
                  "value": 400,
                  "order": 2
                }
              ],
              "collections": [
                {
                  "collection_id": "web-app",
                  "name": "web-app"
                }
              ],
              "isOverridden": true
            }
          ]
        }
      ],
      "collections": [
        {
          "name": "web-app",
          "collection_id": "web-app",
          "description": "web app collection",
          "tags": "v1"
        }
      ],
      "segments": [
        {
          "name": "Testers",
          "segment_id": "khpwj68h",
          "description": "Testers",
          "tags": "test",
          "rules": [
            {
              "values": [
                "john@bluecharge.com",
                "alice@bluecharge.com"
              ],
              "operator": "is",
              "attribute_name": "email"
            }
          ]
        },
        {
          "name": "IBMers",
          "segment_id": "khpwjol7",
          "description": "IBMers",
          "tags": "company,ibm",
          "rules": [
            {
              "values": [
                "ibm.com"
              ],
              "operator": "endsWith",
              "attribute_name": "email"
            }
          ]
        }
      ]
    }
  • {
      "code": "FTEC1003E",
      "message": "Error while import the configuration."
    }
  • {
      "code": "FTEC1003E",
      "message": "Error while import the configuration."
    }
  • {
      "code": "FTI1009E",
      "message": "Forbidden Request - Instance is not empty. Send clean=true query param if you want to override the current instance configuration."
    }
  • {
      "code": "FTI1009E",
      "message": "Forbidden Request - Instance is not empty. Send clean=true query param if you want to override the current instance configuration."
    }
  • {
      "code": "FTEC1011E",
      "message": "Currently 'Rollout percentage' feature is not available"
    }
  • {
      "code": "FTEC1011E",
      "message": "Currently 'Rollout percentage' feature is not available"
    }

Export instance configuration

Get the instance configuration.

Get the instance configuration.

GET /config
(appConfiguration *AppConfigurationV1) ListInstanceConfig(listInstanceConfigOptions *ListInstanceConfigOptions) (result *ImportConfig, response *core.DetailedResponse, err error)
(appConfiguration *AppConfigurationV1) ListInstanceConfigWithContext(ctx context.Context, listInstanceConfigOptions *ListInstanceConfigOptions) (result *ImportConfig, 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.

  • apprapp.config.export

Auditing

Calling this method generates the following auditing event.

  • apprapp.config.export

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 --location --header "Authorization: Bearer {iam_token}"   --header "Accept: application/json"   "{base_url}/config"
  • listInstanceConfigOptions := appConfigurationService.NewListInstanceConfigOptions()
    
    importConfig, response, err := appConfigurationService.ListInstanceConfig(listInstanceConfigOptions)
    if err != nil {
      panic(err)
    }
    b, _ := json.MarshalIndent(importConfig, "", "  ")
    fmt.Println(string(b))

Response

Full instance configuration.

Full instance configuration.

Examples:
View

Status Code

  • Successfully listed configuration for the instance.

  • Unauthorized

Example responses
  • {
      "environments": [
        {
          "name": "Dev",
          "environment_id": "dev",
          "description": "Environment created on instance creation",
          "tags": "",
          "color_code": "#FDD13A",
          "features": [
            {
              "name": "Cycle Rentals",
              "feature_id": "cycle-rentals",
              "description": "",
              "tags": "",
              "type": "NUMERIC",
              "disabled_value": 2,
              "enabled_value": 1,
              "segment_rules": [],
              "enabled": true,
              "rollout_percentage": 100,
              "collections": [
                {
                  "collection_id": "web-app",
                  "name": "web-app"
                }
              ],
              "isOverridden": true
            }
          ],
          "properties": [
            {
              "name": "Daily Discount",
              "property_id": "daily_discount",
              "description": "",
              "tags": "pre-release, v1.2",
              "type": "NUMERIC",
              "value": "100",
              "segment_rules": [
                {
                  "rules": [
                    {
                      "segments": [
                        "khpwj68h"
                      ]
                    }
                  ],
                  "value": 200,
                  "order": 1
                },
                {
                  "rules": [
                    {
                      "segments": [
                        "khpwjol7"
                      ]
                    }
                  ],
                  "value": 400,
                  "order": 2
                }
              ],
              "collections": [
                {
                  "collection_id": "web-app",
                  "name": "web-app"
                }
              ],
              "isOverridden": true
            }
          ]
        }
      ],
      "collections": [
        {
          "name": "web-app",
          "collection_id": "web-app",
          "description": "web app collection",
          "tags": "v1"
        }
      ],
      "segments": [
        {
          "name": "Testers",
          "segment_id": "khpwj68h",
          "description": "Testers",
          "tags": "test",
          "rules": [
            {
              "values": [
                "john@bluecharge.com",
                "alice@bluecharge.com"
              ],
              "operator": "is",
              "attribute_name": "email"
            }
          ]
        },
        {
          "name": "IBMers",
          "segment_id": "khpwjol7",
          "description": "IBMers",
          "tags": "company,ibm",
          "rules": [
            {
              "values": [
                "ibm.com"
              ],
              "operator": "endsWith",
              "attribute_name": "email"
            }
          ]
        }
      ]
    }
  • {
      "environments": [
        {
          "name": "Dev",
          "environment_id": "dev",
          "description": "Environment created on instance creation",
          "tags": "",
          "color_code": "#FDD13A",
          "features": [
            {
              "name": "Cycle Rentals",
              "feature_id": "cycle-rentals",
              "description": "",
              "tags": "",
              "type": "NUMERIC",
              "disabled_value": 2,
              "enabled_value": 1,
              "segment_rules": [],
              "enabled": true,
              "rollout_percentage": 100,
              "collections": [
                {
                  "collection_id": "web-app",
                  "name": "web-app"
                }
              ],
              "isOverridden": true
            }
          ],
          "properties": [
            {
              "name": "Daily Discount",
              "property_id": "daily_discount",
              "description": "",
              "tags": "pre-release, v1.2",
              "type": "NUMERIC",
              "value": "100",
              "segment_rules": [
                {
                  "rules": [
                    {
                      "segments": [
                        "khpwj68h"
                      ]
                    }
                  ],
                  "value": 200,
                  "order": 1
                },
                {
                  "rules": [
                    {
                      "segments": [
                        "khpwjol7"
                      ]
                    }
                  ],
                  "value": 400,
                  "order": 2
                }
              ],
              "collections": [
                {
                  "collection_id": "web-app",
                  "name": "web-app"
                }
              ],
              "isOverridden": true
            }
          ]
        }
      ],
      "collections": [
        {
          "name": "web-app",
          "collection_id": "web-app",
          "description": "web app collection",
          "tags": "v1"
        }
      ],
      "segments": [
        {
          "name": "Testers",
          "segment_id": "khpwj68h",
          "description": "Testers",
          "tags": "test",
          "rules": [
            {
              "values": [
                "john@bluecharge.com",
                "alice@bluecharge.com"
              ],
              "operator": "is",
              "attribute_name": "email"
            }
          ]
        },
        {
          "name": "IBMers",
          "segment_id": "khpwjol7",
          "description": "IBMers",
          "tags": "company,ibm",
          "rules": [
            {
              "values": [
                "ibm.com"
              ],
              "operator": "endsWith",
              "attribute_name": "email"
            }
          ]
        }
      ]
    }
  • {
      "message": "Unauthorized"
    }
  • {
      "message": "Unauthorized"
    }

Promote or Restore snapshot configuration

This api will either promote or restore your chosen configuration from or to the GitHub based on the git url, file path and branch data.

This api will either promote or restore your chosen configuration from or to the GitHub based on the git url, file path and branch data.

PUT /config
(appConfiguration *AppConfigurationV1) PromoteRestoreConfig(promoteRestoreConfigOptions *PromoteRestoreConfigOptions) (result ConfigActionIntf, response *core.DetailedResponse, err error)
(appConfiguration *AppConfigurationV1) PromoteRestoreConfigWithContext(ctx context.Context, promoteRestoreConfigOptions *PromoteRestoreConfigOptions) (result ConfigActionIntf, 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.

  • apprapp.config.action

Auditing

Calling this method generates the following auditing event.

  • apprapp.config.action

Request

Instantiate the PromoteRestoreConfigOptions struct and set the fields to provide parameter values for the PromoteRestoreConfig method.

Query Parameters

  • Git Config Id.

    Example: git_config_id

  • Promote configuration to Git or Restore configuration from Git.

    Allowable values: [promote,restore]

    Example: promote

WithContext method only

The PromoteRestoreConfig options.

  • curl -X PUT --location --header "Authorization: Bearer {iam_token}"   --header "Accept: application/json"   "{base_url}/config?git_config_id=git_config_id&action=promote"
  • promoteRestoreConfigOptions := appConfigurationService.NewPromoteRestoreConfigOptions(
      "git_config_id",
      "promote",
    )
    
    configAction, response, err := appConfigurationService.PromoteRestoreConfig(promoteRestoreConfigOptions)
    if err != nil {
      panic(err)
    }
    b, _ := json.MarshalIndent(configAction, "", "  ")
    fmt.Println(string(b))

Response

Details of the promote operation.

Details of the promote operation.

Status Code

  • Successfully completed the operation.

  • Bad request. Verify that the information in the request body is complete and correct.

  • Not Found. Verify that the git config id is correct.

  • Not Implemented.

Example responses
  • Example promote snapshot configuration.

    {
      "last_sync_time": "2022-05-30T05:33:41Z",
      "git_commit_message": "custom config data written from App config instance",
      "git_commit_id": "2fadfe4e71632f32c19ee97d795f1494be95caf8"
    }
  • Example promote snapshot configuration.

    {
      "last_sync_time": "2022-05-30T05:33:41Z",
      "git_commit_message": "custom config data written from App config instance",
      "git_commit_id": "2fadfe4e71632f32c19ee97d795f1494be95caf8"
    }
  • Example restore snapshot configuration.

    {
      "environments": [
        {
          "name": "Dev",
          "environment_id": "dev",
          "description": "Environment created on instance creation",
          "tags": "",
          "color_code": "#FDD13A",
          "features": [
            {
              "name": "Cycle Rentals",
              "feature_id": "cycle-rentals",
              "type": "NUMERIC",
              "disabled_value": 2,
              "enabled_value": 1,
              "segment_rules": [],
              "enabled": true,
              "rollout_percentage": 100,
              "collections": [
                {
                  "collection_id": "web-app",
                  "name": "web-app"
                }
              ],
              "isOverridden": true
            }
          ],
          "properties": [
            {
              "name": "Daily Discount",
              "property_id": "daily_discount",
              "type": "NUMERIC",
              "tags": "pre-release, v1.2",
              "value": "100",
              "segment_rules": [
                {
                  "rules": [
                    {
                      "segments": [
                        "khpwj68h"
                      ]
                    }
                  ],
                  "value": 200,
                  "order": 1
                },
                {
                  "rules": [
                    {
                      "segments": [
                        "khpwjol7"
                      ]
                    }
                  ],
                  "value": 400,
                  "order": 2
                }
              ],
              "collections": [
                {
                  "collection_id": "web-app",
                  "name": "web-app"
                }
              ],
              "isOverridden": true
            }
          ]
        }
      ],
      "segments": [
        {
          "name": "Testers",
          "segment_id": "khpwj68h",
          "description": "Testers",
          "tags": "test",
          "rules": [
            {
              "values": [
                "john@bluecharge.com",
                "alice@bluecharge.com"
              ],
              "operator": "is",
              "attribute_name": "email"
            }
          ]
        },
        {
          "name": "IBMers",
          "segment_id": "khpwjol7",
          "description": "IBMers",
          "tags": "company,ibm",
          "rules": [
            {
              "values": [
                "ibm.com"
              ],
              "operator": "endsWith",
              "attribute_name": "email"
            }
          ]
        }
      ]
    }
  • Example restore snapshot configuration.

    {
      "environments": [
        {
          "name": "Dev",
          "environment_id": "dev",
          "description": "Environment created on instance creation",
          "tags": "",
          "color_code": "#FDD13A",
          "features": [
            {
              "name": "Cycle Rentals",
              "feature_id": "cycle-rentals",
              "type": "NUMERIC",
              "disabled_value": 2,
              "enabled_value": 1,
              "segment_rules": [],
              "enabled": true,
              "rollout_percentage": 100,
              "collections": [
                {
                  "collection_id": "web-app",
                  "name": "web-app"
                }
              ],
              "isOverridden": true
            }
          ],
          "properties": [
            {
              "name": "Daily Discount",
              "property_id": "daily_discount",
              "type": "NUMERIC",
              "tags": "pre-release, v1.2",
              "value": "100",
              "segment_rules": [
                {
                  "rules": [
                    {
                      "segments": [
                        "khpwj68h"
                      ]
                    }
                  ],
                  "value": 200,
                  "order": 1
                },
                {
                  "rules": [
                    {
                      "segments": [
                        "khpwjol7"
                      ]
                    }
                  ],
                  "value": 400,
                  "order": 2
                }
              ],
              "collections": [
                {
                  "collection_id": "web-app",
                  "name": "web-app"
                }
              ],
              "isOverridden": true
            }
          ]
        }
      ],
      "segments": [
        {
          "name": "Testers",
          "segment_id": "khpwj68h",
          "description": "Testers",
          "tags": "test",
          "rules": [
            {
              "values": [
                "john@bluecharge.com",
                "alice@bluecharge.com"
              ],
              "operator": "is",
              "attribute_name": "email"
            }
          ]
        },
        {
          "name": "IBMers",
          "segment_id": "khpwjol7",
          "description": "IBMers",
          "tags": "company,ibm",
          "rules": [
            {
              "values": [
                "ibm.com"
              ],
              "operator": "endsWith",
              "attribute_name": "email"
            }
          ]
        }
      ]
    }
  • {
      "code": "FTEC1007E",
      "message": "Error while writing or updating the configuration to the json file."
    }
  • {
      "code": "FTEC1007E",
      "message": "Error while writing or updating the configuration to the json file."
    }
  • {
      "code": "FTEC1000E",
      "message": "Error while updating the configuration. The queried resource 'git_config_id' is not available on the server."
    }
  • {
      "code": "FTEC1000E",
      "message": "Error while updating the configuration. The queried resource 'git_config_id' is not available on the server."
    }
  • {
      "code": "FTEC1011E",
      "message": "Currently 'snapshot' feature is not available"
    }
  • {
      "code": "FTEC1011E",
      "message": "Currently 'snapshot' feature is not available"
    }