IBM Cloud API Docs

Introduction

With the IBM Cloud® Support Center, you can get the help that you need to determine the cause of a problem and find a solution for issues that you encounter on your account. The Case Management API provides a RESTful public interface to create and manage your support cases. SDKs for Java, Node, Python, and Go are available to make it easier to programmatically access the API from your code. The client libraries that are provided by the SDKs implement best practices for using the API and reduce the amount of code that you need to write. The tab for each language includes code examples that demonstrate how to use the client libraries. For more information about using the SDKs, see the IBM Cloud SDK Common project on GitHub.

HIPAA notice

The support case system does not offer features for the protection of content that contains Healthcare Information, health data, Protected Health Information or data subject to additional regulatory requirements and Client must not input or provide such data.

GDPR notice

To maintain device security, do not include any device credentials within case responses. The response fields are not intended for Personal Information or Sensitive Data. Information entered into these fields is retained to provide the best support experience.

The code examples on this tab use the client library that is provided for Java.

Maven

<dependency>
    <groupId>com.ibm.cloud</groupId>
	<artifactId>case-management</artifactId>
	<version>{version}</version>
</dependency>

Gradle

'com.ibm.cloud:case-management:{version}'

View on GitHub

The code examples on this tab use the client library that is provided for Node.js.

Installation

npm install @ibm-cloud/platform-services

View on GitHub

The code examples on this tab use the client library that is provided for Python.

Installation

To install, use pip or easy_install:

pip install --upgrade "ibm-platform-services"

or

easy_install --upgrade "ibm-platform-services"

View on GitHub

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/platform-services-go-sdk/casemanagementv1"
)

Go get

go get -u github.com/IBM/platform-services-go-sdk/casemanagementv1

View on GitHub

Endpoint URL

The Case Management API uses the following global endpoint URL. When you call the API, add the path for each method to form the complete API endpoint for your requests.

https://support-center.cloud.ibm.com

Example API request

curl -X {request_method} "https://support-center.cloud.ibm.com/{method_endpoint}"

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

Authentication

Authentication to the case management REST API is enforced by using an IAM access token. The token is used to determine the identity and access roles for management services. All cases are in the scope of the account that is specified in an IAM token. You need the IAM token that has account information. If you generate an IAM token through an API, don't forget to add the account information. For information about how to obtain an IAM token for an authenticated user or service ID, see the IAM Identity Service API documentation.

Use of the IAM Policy Management REST API is done by adding a valid IAM Token to the HTTP Authorization request header. Example: -H 'Authorization: Bearer $TOKEN'

Obtaining an IAM token for an authenticated user or service ID is described in the IAM Identity Services API documentation.

To use the API, add a valid IAM token to the HTTP Authorization request header, for example, -H 'Authorization: Bearer <TOKEN>'.

When you use the SDK, configure an IAM authenticator with the IAM API key. The authenticator automatically obtains the IAM access token for the API key and includes it with each request. You can construct 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

In this example of using external configuration properties, an IAM authenticator instance is created with the configured API key, and then the service client is constructed with this authenticator instance and the configured service URL.

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

To call each method, you 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 <API_KEY> is your IAM API key

export CASE_MANAGEMENT_APIKEY=<API_KEY>

Example of constructing the service client

import {
    "github.com/IBM/platform-services-go-sdk/casemanagementv1"
}
...
caseManagementServiceOptions := &casemanagementv1.CaseManagementV1Options{}
caseManagementService, err := casemanagementv1.NewCaseManagementV1UsingExternalConfig(caseManagementServiceOptions)

Setting client options through external configuration

Example environment variables, where <API_KEY> is your IAM API key

export CASE_MANAGEMENT_APIKEY=<API_KEY>

Example of constructing the service client

import com.ibm.cloud.platform_services.case_management.v1.CaseManagement;
...
CaseManagement service = CaseManagement.newInstance();

Setting client options through external configuration

Example environment variables, where <API_KEY> is your IAM API key

export CASE_MANAGEMENT_APIKEY=<API_KEY>

Example of constructing the service client

const CaseManagementV1 = require('@ibm-cloud/platform-services/case-management/v1');
...
const caseManagementService = CaseManagementV1.newInstance({});

Setting client options through external configuration

Example environment variables, where <API_KEY> is your IAM API key

pip install --upgrade "ibm-platform-services"
export CASE_MANAGEMENT_APIKEY=<API_KEY>

Example of constructing the service client

from ibm_platform_services.case_management_v1 import *
...
case_management_service = CaseManagementV1.new_instance()

all_results = []
pager = GetCasesPager(client=case_management_service, limit=10, search='Example')
while pager.has_next():
  next_page = pager.get_next()
  assert next_page is not None
  all_results.extend(next_page)

print(json.dumps(all_results, indent=2))

Error handling

The Case Management API returns standard HTTP status codes to indicate the success or failure of a request. The format of the response is represented in JSON as follows:

{
    "trace": "cd4f7573121a4cf99f0079f8482b3d6b",
    "errors": [
        {
            "code": "invalid_token",
            "message": "The provided IAM token is invalid."
        }
    ],
    "status_code": 401
}

If an operation cannot be fulfilled, an appropriate 400 or 500 series HTTP response is returned from the server. The operations that are defined in the Reference section describe example errors that can be returned from a failed request. All responses from the IAM Policy Management API are in the JSON format.

The following are potential error codes that the API can return.

HTTP Error Code Description Recovery
200 Success The request was successful.
201 Created The resource was successfully created.
204 No Content The request was successful. No response body is provided.
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. The token is either invalid, missing or expired. Get a new valid token and try again.
403 Forbidden The token is valid, but the subject of the token is not authorized to perform the operation. If this error persists, contact the account owner to check your permissions.
404 Not Found The requested resource could not be found.
409 Conflict The entity is already in the requested state.
415 Unsupported Media Type Request body sent was formatted by using an unsupported media type.
429 Too Many Requests Too many requests were made within a given time window. Wait before you call the API again.
500 Service Unavailable IAM Policy Management Point is unavailable. Your request might not be processed. Wait a few minutes and try again.

Pagination

Some API requests might return a large number of results. To avoid performance issues, these results are returned one page at a time, with a limited number of results on each page. For more information, see Pagination.

GET requests for GetCasesOptions use pagination.

The default page and max size is 100 objects. To use a different page size, use the limit query parameter.

For any request that uses pagination, the response includes a next_url object that specifies pagination information. next_url is the URL for requesting the next page of results. The next_url property is null if there are no more results, and retains the same limit parameter that is used for the initial request.

  • hasnext(): returns true if there are potentially more items to be retrieved, or false otherwise.
  • get_next(): returns the next page of items by invoking the list-type operation. The number of items returned depends on the selected page size (limit parameter) and the number of remaining items that are available to be returned.
  • get_all(): This operation should be used with caution. returns all of the available items by repeatedly invoking the list-type operation. The use of this method with certain resource types might result in an excessive amount of data being returned. If in doubt, use the hasnext() and get_next() methods to retrieve a single page at a time, and process each page before retrieving the next page.

Methods

Get cases in account

Get cases in the account that are specified by the content of the IAM token.

Get cases in the account that are specified by the content of the IAM token.

Get cases in the account that are specified by the content of the IAM token.

Get cases in the account that are specified by the content of the IAM token.

Get cases in the account that are specified by the content of the IAM token.

GET /cases
(caseManagement *CaseManagementV1) GetCases(getCasesOptions *GetCasesOptions) (result *CaseList, response *core.DetailedResponse, err error)
(caseManagement *CaseManagementV1) GetCasesWithContext(ctx context.Context, getCasesOptions *GetCasesOptions) (result *CaseList, response *core.DetailedResponse, err error)
ServiceCall<CaseList> getCases(GetCasesOptions getCasesOptions)
getCases(params)
get_cases(self,
        *,
        offset: int = None,
        limit: int = None,
        search: str = None,
        sort: str = None,
        status: List[str] = None,
        fields: List[str] = None,
        **kwargs
    ) -> DetailedResponse

Authorization

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

  • support.case.read

  • support.case.list

Request

Instantiate the GetCasesOptions struct and set the fields to provide parameter values for the GetCases method.

Use the GetCasesOptions.Builder to create a GetCasesOptions object that contains the parameter values for the getCases method.

Query Parameters

  • Number of cases that are skipped

    Default: 0

  • Number of cases that are returned

    Default: 10

  • String that a case might contain

  • Sort field and direction. If omitted, default to descending of updated date. Prefix "~" signifies sort in descending.

    Allowable values: [number,short_description,severity,updated_at,created_at,~number,~short_description,~severity,~updated_at,~created_at]

  • Case status filter

    Allowable values: [new,in_progress,waiting_on_client,resolution_provided,resolved,closed]

  • Selected fields of interest instead of all of the case information

    Allowable values: [number,short_description,description,created_at,created_by,updated_at,updated_by,contact,contact_type,status,severity,support_tier,resolution,close_notes,invoice_number,agent_close_only,eu,watchlist,attachments,resources,comments,offering]

    Possible values: number of items ≥ 1, contains only unique items

WithContext method only

The GetCases options.

The getCases options.

parameters

  • Number of cases that are skipped.

  • Number of cases that are returned.

  • String that a case might contain.

  • Sort field and direction. If omitted, default to descending of updated date. Prefix "~" signifies sort in descending.

    Allowable values: [number,short_description,severity,updated_at,created_at,~number,~short_description,~severity,~updated_at,~created_at]

  • Case status filter.

    Allowable values: [new,in_progress,waiting_on_client,resolution_provided,resolved,closed]

  • Selected fields of interest instead of all of the case information.

    Allowable values: [number,short_description,description,created_at,created_by,updated_at,updated_by,contact,contact_type,status,severity,support_tier,resolution,close_notes,invoice_number,agent_close_only,eu,watchlist,attachments,resources,comments,offering]

    Possible values: number of items ≥ 1, contains only unique items

parameters

  • Number of cases that are skipped.

  • Number of cases that are returned.

  • String that a case might contain.

  • Sort field and direction. If omitted, default to descending of updated date. Prefix "~" signifies sort in descending.

    Allowable values: [number,short_description,severity,updated_at,created_at,~number,~short_description,~severity,~updated_at,~created_at]

  • Case status filter.

    Allowable values: [new,in_progress,waiting_on_client,resolution_provided,resolved,closed]

  • Selected fields of interest instead of all of the case information.

    Allowable values: [number,short_description,description,created_at,created_by,updated_at,updated_by,contact,contact_type,status,severity,support_tier,resolution,close_notes,invoice_number,agent_close_only,eu,watchlist,attachments,resources,comments,offering]

    Possible values: number of items ≥ 1, contains only unique items

  • curl -X GET 'https://support-center.cloud.ibm.com/case-management/v1/cases?offset=0&limit=10&status=new,in_progress,waiting_on_client,resolution_provided' -H 'Authorization: TOKEN' \
  • getCasesOptions := &casemanagementv1.GetCasesOptions{
      Search: core.StringPtr("Example"),
    }
    
    pager, err := caseManagementService.NewGetCasesPager(getCasesOptions)
    if err != nil {
      panic(err)
    }
    
    var allResults []casemanagementv1.Case
    for pager.HasNext() {
      nextPage, err := pager.GetNext()
      if err != nil {
        panic(err)
      }
      allResults = append(allResults, nextPage...)
    }
    b, _ := json.MarshalIndent(allResults, "", "  ")
    fmt.Println(string(b))
  • GetCasesOptions getCasesOptions = new GetCasesOptions.Builder()
      .search("Example")
      .build();
    
    GetCasesPager pager = new GetCasesPager(service, getCasesOptions);
    List<Case> allResults = new ArrayList<>();
    while (pager.hasNext()) {
      List<Case> nextPage = pager.getNext();
      allResults.addAll(nextPage);
    }
    
    System.out.println(GsonSingleton.getGson().toJson(allResults));
  • const params = {
      search: 'Example',
    };
    
    const allResults = [];
    try {
      const pager = new CaseManagementV1.GetCasesPager(caseManagementService, params);
      while (pager.hasNext()) {
        const nextPage = await pager.getNext();
        expect(nextPage).not.toBeNull();
        allResults.push(...nextPage);
      }
      console.log(JSON.stringify(allResults, null, 2));
    } catch (err) {
      console.warn(err);
    }
  • all_results = []
    pager = GetCasesPager(client=case_management_service, limit=10, search='Example')
    while pager.has_next():
      next_page = pager.get_next()
      assert next_page is not None
      all_results.extend(next_page)
    
    print(json.dumps(all_results, indent=2))

Response

Response of a GET /cases request

Response of a GET /cases request.

Response of a GET /cases request.

Response of a GET /cases request.

Response of a GET /cases request.

Status Code

  • Success

  • Forbidden - insufficient permission. The client has been authenticated successfully, but the permissions set for the operation forbid this operation to the specified user.

Example responses
  • {
      "total_count": 69,
      "first": {
        "href": "http://support-center.cloud.ibm.com/cases?limit=0"
      },
      "next": {
        "href": "http://support-center.cloud.ibm.com/cases?limit=10&offset=10"
      },
      "last": {
        "href": "http://support-center.cloud.ibm.com/cases?limit=10&offset=60"
      },
      "cases": [
        {
          "number": "CS1234567",
          "short_description": "Test",
          "description": "test",
          "created_at": "2019-07-21 05:20:12",
          "created_by": {
            "name": "Example Name",
            "user_id": "email@example.com",
            "realm": "IBMid",
            "type": "customer"
          },
          "updated_at": "2019-07-30 21:39:40",
          "updated_by": {
            "name": "Example Name",
            "user_id": "Example Name",
            "realm": "IBMid",
            "type": "customer"
          },
          "contact": {
            "name": "Example Name",
            "user_id": "email@example.com",
            "realm": "IBMid",
            "type": "customer"
          },
          "contact_type": "Cloud Support Center",
          "status": "In Progress",
          "severity": 4,
          "support_tier": "Premium",
          "resolution": "",
          "close_notes": "",
          "invoice_number": "",
          "agent_close_only": false,
          "eu": {
            "support": false,
            "data_center": ""
          },
          "watchlist": [
            {
              "name": "Example Name",
              "user_id": "email@example.com",
              "realm": "IBMid",
              "type": "customer"
            }
          ],
          "attachments": [
            {
              "id": "28ccc7e0db12fb123456dd4b5e96191f",
              "filename": "example.png",
              "size_in_bytes": 1000,
              "created_at": "2019-06-24 15:19:36"
            }
          ],
          "url": "https://support-center.cloud.ibm.com/case-management/v1/cases/CS1234567/attachments/28acc7e0db12fb801785dd4b5e96191f",
          "resources": null,
          "comments": [
            {
              "value": "Test comment",
              "added_at": "2019-06-21 18:08:01",
              "added_by": {
                "name": "Example Name",
                "user_id": "email@example.com",
                "realm": "IBMid",
                "type": "customer"
              }
            }
          ]
        }
      ]
    }
  • {
      "total_count": 69,
      "first": {
        "href": "http://support-center.cloud.ibm.com/cases?limit=0"
      },
      "next": {
        "href": "http://support-center.cloud.ibm.com/cases?limit=10&offset=10"
      },
      "last": {
        "href": "http://support-center.cloud.ibm.com/cases?limit=10&offset=60"
      },
      "cases": [
        {
          "number": "CS1234567",
          "short_description": "Test",
          "description": "test",
          "created_at": "2019-07-21 05:20:12",
          "created_by": {
            "name": "Example Name",
            "user_id": "email@example.com",
            "realm": "IBMid",
            "type": "customer"
          },
          "updated_at": "2019-07-30 21:39:40",
          "updated_by": {
            "name": "Example Name",
            "user_id": "Example Name",
            "realm": "IBMid",
            "type": "customer"
          },
          "contact": {
            "name": "Example Name",
            "user_id": "email@example.com",
            "realm": "IBMid",
            "type": "customer"
          },
          "contact_type": "Cloud Support Center",
          "status": "In Progress",
          "severity": 4,
          "support_tier": "Premium",
          "resolution": "",
          "close_notes": "",
          "invoice_number": "",
          "agent_close_only": false,
          "eu": {
            "support": false,
            "data_center": ""
          },
          "watchlist": [
            {
              "name": "Example Name",
              "user_id": "email@example.com",
              "realm": "IBMid",
              "type": "customer"
            }
          ],
          "attachments": [
            {
              "id": "28ccc7e0db12fb123456dd4b5e96191f",
              "filename": "example.png",
              "size_in_bytes": 1000,
              "created_at": "2019-06-24 15:19:36"
            }
          ],
          "url": "https://support-center.cloud.ibm.com/case-management/v1/cases/CS1234567/attachments/28acc7e0db12fb801785dd4b5e96191f",
          "resources": null,
          "comments": [
            {
              "value": "Test comment",
              "added_at": "2019-06-21 18:08:01",
              "added_by": {
                "name": "Example Name",
                "user_id": "email@example.com",
                "realm": "IBMid",
                "type": "customer"
              }
            }
          ]
        }
      ]
    }

Create a case

Create a support case to resolve issues in your account.

Create a support case to resolve issues in your account.

Create a support case to resolve issues in your account.

Create a support case to resolve issues in your account.

Create a support case to resolve issues in your account.

POST /cases
(caseManagement *CaseManagementV1) CreateCase(createCaseOptions *CreateCaseOptions) (result *Case, response *core.DetailedResponse, err error)
(caseManagement *CaseManagementV1) CreateCaseWithContext(ctx context.Context, createCaseOptions *CreateCaseOptions) (result *Case, response *core.DetailedResponse, err error)
ServiceCall<Case> createCase(CreateCaseOptions createCaseOptions)
createCase(params)
create_case(self,
        type: str,
        subject: str,
        description: str,
        *,
        severity: int = None,
        eu: 'CasePayloadEu' = None,
        offering: 'Offering' = None,
        resources: List['ResourcePayload'] = None,
        watchlist: List['User'] = None,
        invoice_number: str = None,
        sla_credit_request: bool = None,
        **kwargs
    ) -> DetailedResponse

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.

  • support.case.create

Request

Instantiate the CreateCaseOptions struct and set the fields to provide parameter values for the CreateCase method.

Use the CreateCaseOptions.Builder to create a CreateCaseOptions object that contains the parameter values for the createCase method.

payload to create a support case

WithContext method only

The CreateCase options.

The createCase options.

parameters

  • Case type.

    Allowable values: [technical,account_and_access,billing_and_invoice,sales]

  • Short description used to identify the case.

    Possible values: length ≤ 160

  • Detailed description of the issue.

    Possible values: length ≤ 4000

  • Severity of the case. Smaller values mean higher severity.

    Allowable values: [1,2,3,4]

  • Specify if the case should be treated as EU regulated. Only one of the following properties is required.

    Examples:
    {
      "supported": true,
      "data_center": 9999
    }
  • Offering details.

  • List of resources to attach to case. If you attach Classic IaaS devices, use the type and id fields if the Cloud Resource Name (CRN) is unavailable. Otherwise, pass the resource CRN. The resource list must be consistent with the value that is selected for the resource offering.

    Possible values: 1 ≤ number of items ≤ 5

    Examples:
    {
      "type": "SoftLayer_Virtual_Guest",
      "id": 9999,
      "note": "Classic IaaS device",
      "crn": "crn:version:cname:ctype:service-name:location:scope:service-instance:resource-type:resource note: Resource that has crn service name `cname`"
    }
  • Array of user IDs to add to the watchlist.

    Possible values: 1 ≤ number of items ≤ 100

    Examples:
    {
      "name": "John Doe",
      "realm": "IBMid",
      "user_id": "johndoe@ibm.com"
    }
  • Invoice number of "Billing and Invoice" case type.

    Possible values: length ≤ 200

    Default:

  • Flag to indicate if case is for an Service Level Agreement (SLA) credit request.

    Default: false

parameters

  • Case type.

    Allowable values: [technical,account_and_access,billing_and_invoice,sales]

  • Short description used to identify the case.

    Possible values: length ≤ 160

  • Detailed description of the issue.

    Possible values: length ≤ 4000

  • Severity of the case. Smaller values mean higher severity.

    Allowable values: [1,2,3,4]

  • Specify if the case should be treated as EU regulated. Only one of the following properties is required.

    Examples:
    {
      "supported": true,
      "data_center": 9999
    }
  • Offering details.

  • List of resources to attach to case. If you attach Classic IaaS devices, use the type and id fields if the Cloud Resource Name (CRN) is unavailable. Otherwise, pass the resource CRN. The resource list must be consistent with the value that is selected for the resource offering.

    Possible values: 1 ≤ number of items ≤ 5

    Examples:
    {
      "type": "SoftLayer_Virtual_Guest",
      "id": 9999,
      "note": "Classic IaaS device",
      "crn": "crn:version:cname:ctype:service-name:location:scope:service-instance:resource-type:resource note: Resource that has crn service name `cname`"
    }
  • Array of user IDs to add to the watchlist.

    Possible values: 1 ≤ number of items ≤ 100

    Examples:
    {
      "name": "John Doe",
      "realm": "IBMid",
      "user_id": "johndoe@ibm.com"
    }
  • Invoice number of "Billing and Invoice" case type.

    Possible values: length ≤ 200

    Default:

  • Flag to indicate if case is for an Service Level Agreement (SLA) credit request.

    Default: false

  • curl --location --request POST 'https://support-center.cloud.ibm.com/case-management/v1/cases' --header 'Content-Type: application/json' --header 'Authorization: TOKEN' --data-raw '{ "type": "technical",
      "subject": "Case subject",
      "description": "Case description",
      "severity":4,
       "offering": {
        "name": "Cloud Object Storage",
        "type": {
          "group": "crn_service_name",
          "key": "cloud-object-storage",
          "kind": "service",
          "id": "dff97f5c-bc5e-4455-b470-411c3edbe49c"
        }
      },
      "resources": [
        {
          "crn": "crn:v1:staging:public:cloud-object-storage:global:a/2dded3de4a4d4a098ebd0998be5cc845:723a59c4-9338-43fe-9dc4-e4a87cc78c8e::",
          "note": "Resource note"
        }
      ]
    }'
  • offeringType, _ := caseManagementService.NewOfferingType(
      casemanagementv1.OfferingTypeGroupCRNServiceNameConst,
      "cloud-object-storage",
    )
    offeringPayload, _ := caseManagementService.NewOffering(
      "Cloud Object Storage",
      offeringType,
    )
    
    createCaseOptions := caseManagementService.NewCreateCaseOptions(
      "technical",
      "Example technical case",
      "This is an example case description. This is where the problem would be described.",
    )
    createCaseOptions.SetSeverity(4)
    createCaseOptions.SetOffering(offeringPayload)
    
    caseVar, response, err := caseManagementService.CreateCase(createCaseOptions)
    if err != nil {
      panic(err)
    }
    b, _ := json.MarshalIndent(caseVar, "", "  ")
    fmt.Println(string(b))
  • OfferingType offeringType = new OfferingType.Builder()
      .group(OfferingType.Group.CRN_SERVICE_NAME)
      .key("cloud-object-storage")
      .build();
    Offering offeringPayload = new Offering.Builder()
      .name("Cloud Object Storage")
      .type(offeringType)
      .build();
    CreateCaseOptions createCaseOptions = new CreateCaseOptions.Builder()
      .type("technical")
      .subject("Example technical case")
      .description("This is an example case description. This is where the problem would be described.")
      .offering(offeringPayload)
      .severity(4)
      .build();
    
    Response<Case> response = service.createCase(createCaseOptions).execute();
    Case xCase = response.getResult();
    
    System.out.println(xCase);
  • const offeringType = {
      group: 'crn_service_name',
      key: 'cloud-object-storage',
    };
    
    const offeringPayload = {
      name: 'Cloud Object Storage',
      type: offeringType,
    };
    
    const params = {
      type: 'technical',
      subject: 'Example technical case',
      description: 'This is an example case description. This is where the problem would be described.',
      offering: offeringPayload,
      severity: 4,
    };
    
    try {
      const res = await caseManagementService.createCase(params);
      caseNumber = res.result.number
      console.log(JSON.stringify(res.result, null, 2));
    } catch (err) {
      console.warn(err);
    }
  • offering_type = OfferingType(
      group='crn_service_name',
      key='cloud-object-storage'
    )
    offering_payload = Offering(
      name='Cloud Object Storage',
      type=offering_type
    )
    
    case = case_management_service.create_case(
      type='technical',
      subject='Example technical case',
      description='This is an example case description. This is where the problem would be described.',
      offering=offering_payload,
      severity=4,
    ).get_result()
    
    print(json.dumps(case, indent=2))

Response

The support case

The support case.

The support case.

The support case.

The support case.

Status Code

  • Success

  • Forbidden - insufficient permission. The client has been authenticated successfully, but the permissions set for the operation forbid this operation to the specified user.

Example responses
  • {
      "number": "CS12345",
      "short_description": "string",
      "description": "string",
      "created_at": "2019-07-21 05:20:12",
      "created_by": {
        "name": "John Doe",
        "realm": "IBMid",
        "user_id": "johndoe@ibm.com"
      },
      "updated_at": "2019-07-30 06:26:38",
      "updated_by": {
        "name": "John Doe",
        "realm": "IBMid",
        "user_id": "johndoe@ibm.com"
      },
      "contact_type": "Cloud Support Center",
      "contact": {
        "name": "John Doe",
        "realm": "IBMid",
        "user_id": "johndoe@ibm.com"
      },
      "status": "string",
      "severity": 0,
      "support_tier": "Free",
      "resolution": "string",
      "close_notes": "string",
      "eu": {
        "support": true,
        "data_center": "string"
      },
      "watchlist": [
        {
          "name": "John Doe",
          "realm": "IBMid",
          "user_id": "johndoe@ibm.com"
        }
      ],
      "attachments": [
        {
          "id": "string",
          "filename": "string",
          "size_in_bytes": 0,
          "created_at": "2019-07-30 06:26:38",
          "url": "string"
        }
      ],
      "offering": {
        "id": "string",
        "value": "string"
      },
      "resources": [
        {
          "crn": "string",
          "name": "string",
          "type": "string",
          "url": "string",
          "note": "string"
        }
      ],
      "comments": [
        {
          "value": "string",
          "added_at": "2019-07-30 06:26:38",
          "added_by": {
            "name": "John Doe",
            "realm": "IBMid",
            "user_id": "johndoe@ibm.com"
          }
        }
      ]
    }
  • {
      "number": "CS12345",
      "short_description": "string",
      "description": "string",
      "created_at": "2019-07-21 05:20:12",
      "created_by": {
        "name": "John Doe",
        "realm": "IBMid",
        "user_id": "johndoe@ibm.com"
      },
      "updated_at": "2019-07-30 06:26:38",
      "updated_by": {
        "name": "John Doe",
        "realm": "IBMid",
        "user_id": "johndoe@ibm.com"
      },
      "contact_type": "Cloud Support Center",
      "contact": {
        "name": "John Doe",
        "realm": "IBMid",
        "user_id": "johndoe@ibm.com"
      },
      "status": "string",
      "severity": 0,
      "support_tier": "Free",
      "resolution": "string",
      "close_notes": "string",
      "eu": {
        "support": true,
        "data_center": "string"
      },
      "watchlist": [
        {
          "name": "John Doe",
          "realm": "IBMid",
          "user_id": "johndoe@ibm.com"
        }
      ],
      "attachments": [
        {
          "id": "string",
          "filename": "string",
          "size_in_bytes": 0,
          "created_at": "2019-07-30 06:26:38",
          "url": "string"
        }
      ],
      "offering": {
        "id": "string",
        "value": "string"
      },
      "resources": [
        {
          "crn": "string",
          "name": "string",
          "type": "string",
          "url": "string",
          "note": "string"
        }
      ],
      "comments": [
        {
          "value": "string",
          "added_at": "2019-07-30 06:26:38",
          "added_by": {
            "name": "John Doe",
            "realm": "IBMid",
            "user_id": "johndoe@ibm.com"
          }
        }
      ]
    }

Get a case in account

View a case in the account that is specified by the case number.

View a case in the account that is specified by the case number.

View a case in the account that is specified by the case number.

View a case in the account that is specified by the case number.

View a case in the account that is specified by the case number.

GET /cases/{case_number}
(caseManagement *CaseManagementV1) GetCase(getCaseOptions *GetCaseOptions) (result *Case, response *core.DetailedResponse, err error)
(caseManagement *CaseManagementV1) GetCaseWithContext(ctx context.Context, getCaseOptions *GetCaseOptions) (result *Case, response *core.DetailedResponse, err error)
ServiceCall<Case> getCase(GetCaseOptions getCaseOptions)
getCase(params)
get_case(self,
        case_number: str,
        *,
        fields: List[str] = None,
        **kwargs
    ) -> DetailedResponse

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.

  • support.case.read

Request

Instantiate the GetCaseOptions struct and set the fields to provide parameter values for the GetCase method.

Use the GetCaseOptions.Builder to create a GetCaseOptions object that contains the parameter values for the getCase method.

Path Parameters

  • Unique identifier of a case

Query Parameters

  • Selected fields of interest instead of all of the case information

    Allowable values: [number,short_description,description,created_at,created_by,updated_at,updated_by,contact,contact_type,status,severity,support_tier,resolution,close_notes,invoice_number,agent_close_only,eu,watchlist,attachments,resources,comments,offering]

    Possible values: number of items ≥ 1, contains only unique items

WithContext method only

The GetCase options.

The getCase options.

parameters

  • Unique identifier of a case.

  • Selected fields of interest instead of all of the case information.

    Allowable values: [number,short_description,description,created_at,created_by,updated_at,updated_by,contact,contact_type,status,severity,support_tier,resolution,close_notes,invoice_number,agent_close_only,eu,watchlist,attachments,resources,comments,offering]

    Possible values: number of items ≥ 1, contains only unique items

parameters

  • Unique identifier of a case.

  • Selected fields of interest instead of all of the case information.

    Allowable values: [number,short_description,description,created_at,created_by,updated_at,updated_by,contact,contact_type,status,severity,support_tier,resolution,close_notes,invoice_number,agent_close_only,eu,watchlist,attachments,resources,comments,offering]

    Possible values: number of items ≥ 1, contains only unique items

  • curl -X GET 'https://support-center.cloud.ibm.com/case-management/v1/cases/{case_number}?fields=number,updated_at,resources' -H 'Authorization: TOKEN' \
  • getCaseOptions := caseManagementService.NewGetCaseOptions(
      caseNumber,
    )
    getCaseOptions.SetFields([]string{
      casemanagementv1.GetCaseOptionsFieldsDescriptionConst,
      casemanagementv1.GetCaseOptionsFieldsStatusConst,
      casemanagementv1.GetCaseOptionsFieldsSeverityConst,
      casemanagementv1.GetCaseOptionsFieldsCreatedByConst,
    })
    
    caseVar, response, err := caseManagementService.GetCase(getCaseOptions)
    if err != nil {
      panic(err)
    }
    b, _ := json.MarshalIndent(caseVar, "", "  ")
    fmt.Println(string(b))
  • GetCaseOptions getCaseOptions = new GetCaseOptions.Builder()
      .caseNumber(caseNumber)
      .addFields(GetCaseOptions.Fields.DESCRIPTION)
      .addFields(GetCaseOptions.Fields.STATUS)
      .addFields(GetCaseOptions.Fields.SEVERITY)
      .addFields(GetCaseOptions.Fields.CREATED_BY)
      .build();
    
    Response<Case> response = service.getCase(getCaseOptions).execute();
    Case xCase = response.getResult();
    
    System.out.println(xCase);
  • const fieldsToReturn = [
      CaseManagementV1.GetCaseConstants.Fields.DESCRIPTION,
      CaseManagementV1.GetCaseConstants.Fields.STATUS,
      CaseManagementV1.GetCaseConstants.Fields.SEVERITY,
      CaseManagementV1.GetCaseConstants.Fields.CREATED_BY,
    ];
    
    const params = {
      caseNumber: caseNumber,
      fields: fieldsToReturn,
    };
    
    try {
    
      const res = await caseManagementService.getCase(params);
      console.log(JSON.stringify(res.result, null, 2));
    } catch (err) {
      console.warn(err);
    }
  • fields_to_return = [
      GetCaseEnums.Fields.DESCRIPTION,
      GetCaseEnums.Fields.STATUS,
      GetCaseEnums.Fields.SEVERITY,
      GetCaseEnums.Fields.CREATED_BY,
    ]
    
    case = case_management_service.get_case(
      case_number=case_number,
      fields=fields_to_return
    ).get_result()
    
    print(json.dumps(case, indent=2))

Response

The support case

The support case.

The support case.

The support case.

The support case.

Status Code

  • Success

  • Forbidden - insufficient permission. The client has been authenticated successfully, but the permissions set for the operation forbid this operation to the specified user.

  • Not Found - The requested resource does not exist.

Example responses
  • {
      "number": "CS0264883",
      "short_description": "Test case that is created by a linked account",
      "description": "Test",
      "created_at": "2019-05-24 16:30:20",
      "created_by": {
        "name": "John Doe",
        "user_id": "JohnDoe@example.com",
        "realm": "IBMid",
        "type": "customer"
      },
      "updated_at": "2019-08-21 17:09:35",
      "updated_by": {
        "name": "John Doe",
        "user_id": "JohnDoe@example.com",
        "realm": "IBMid",
        "type": "customer"
      },
      "contact": {
        "name": "John Doe",
        "user_id": "JohnDoe@example.com",
        "realm": "IBMid",
        "type": "customer"
      },
      "contact_type": "Cloud Support Center",
      "status": "In Progress",
      "severity": 4,
      "support_tier": "Premium",
      "resolution": "",
      "close_notes": "",
      "invoice_number": "",
      "agent_close_only": false,
      "eu": {
        "support": false,
        "data_center": ""
      },
      "watchlist": [
        {
          "name": "Jane Doe",
          "user_id": "JaneDoe@example.com",
          "realm": "IBMid",
          "type": "customer"
        },
        {
          "name": "Jorge Doe",
          "user_id": "JorgeDoe@example.com",
          "realm": "IBMid",
          "type": "customer"
        }
      ],
      "attachments": [
        {
          "id": "f2222514dbbbf7c01785dd4b5e111973",
          "filename": "add--solid.svg",
          "size_in_bytes": 135,
          "created_at": "2019-05-29 16:42:07",
          "url": "localhost:8080/case-management/v1/cases/CS0264883/attachments/f7262514db7df7c01785dd4b5e961973"
        }
      ],
      "resources": [
        {
          "crn": "211770",
          "name": "ir-origin01.sliad.dataxu.net",
          "type": "ims",
          "url": "https://cloud.ibm.com/gen1/infrastructure/bare-metal/211770/details",
          "note": null
        },
        {
          "crn": "274300",
          "name": "rts-am269.sliad.dataxu.net",
          "type": "SoftLayer_Hardware",
          "url": null,
          "note": null
        },
        {
          "crn": "242458",
          "name": "lb108.wdc01.dataxu.com",
          "type": "ims",
          "url": "https://cloud.ibm.com/gen1/infrastructure/bare-metal/242458/details",
          "note": null
        },
        {
          "crn": "244120",
          "name": "rts-am058.sliad.dataxu.net",
          "type": "ims",
          "url": "https://cloud.ibm.com/gen1/infrastructure/bare-metal/244120/details",
          "note": null
        },
        {
          "crn": "211883",
          "name": "analytics06.sldc.dataxu.net",
          "type": "ims",
          "url": "https://cloud.ibm.com/gen1/infrastructure/bare-metal/211883/details",
          "note": null
        }
      ],
      "comments": [
        {
          "value": "Test another comment",
          "added_at": "2019-05-24 16:58:58",
          "added_by": {
            "name": "June Doe",
            "user_id": "JuneDoe@example.com",
            "realm": "IBMid",
            "type": "customer"
          }
        },
        {
          "value": "Test unresolved",
          "added_at": "2019-05-24 16:33:52",
          "added_by": {
            "name": "John Doe",
            "user_id": "JohnDoe@example.com",
            "realm": "IBMid",
            "type": "customer"
          }
        },
        {
          "value": "Close notes: ",
          "added_at": "2019-05-24 16:33:52",
          "added_by": {
            "name": "John Doe",
            "user_id": "JohnDoe@example.com",
            "realm": "IBMid",
            "type": "customer"
          }
        },
        {
          "value": "Close notes: Solution provided by an IBM support engineer",
          "added_at": "2019-05-24 16:32:09",
          "added_by": {
            "name": "John Doe",
            "user_id": "JohnDoe@example.com",
            "realm": "IBMid",
            "type": "customer"
          }
        },
        {
          "value": "Test comment",
          "added_at": "2019-05-24 16:31:32",
          "added_by": {
            "name": "John does",
            "user_id": "JohnDoe@example.com",
            "realm": "IBMid",
            "type": "customer"
          }
        }
      ],
      "offering": {
        "name": "Compute: Bare Metal",
        "type": {
          "group": "category",
          "key": "iaas:classic"
        }
      }
    }
  • {
      "number": "CS0264883",
      "short_description": "Test case that is created by a linked account",
      "description": "Test",
      "created_at": "2019-05-24 16:30:20",
      "created_by": {
        "name": "John Doe",
        "user_id": "JohnDoe@example.com",
        "realm": "IBMid",
        "type": "customer"
      },
      "updated_at": "2019-08-21 17:09:35",
      "updated_by": {
        "name": "John Doe",
        "user_id": "JohnDoe@example.com",
        "realm": "IBMid",
        "type": "customer"
      },
      "contact": {
        "name": "John Doe",
        "user_id": "JohnDoe@example.com",
        "realm": "IBMid",
        "type": "customer"
      },
      "contact_type": "Cloud Support Center",
      "status": "In Progress",
      "severity": 4,
      "support_tier": "Premium",
      "resolution": "",
      "close_notes": "",
      "invoice_number": "",
      "agent_close_only": false,
      "eu": {
        "support": false,
        "data_center": ""
      },
      "watchlist": [
        {
          "name": "Jane Doe",
          "user_id": "JaneDoe@example.com",
          "realm": "IBMid",
          "type": "customer"
        },
        {
          "name": "Jorge Doe",
          "user_id": "JorgeDoe@example.com",
          "realm": "IBMid",
          "type": "customer"
        }
      ],
      "attachments": [
        {
          "id": "f2222514dbbbf7c01785dd4b5e111973",
          "filename": "add--solid.svg",
          "size_in_bytes": 135,
          "created_at": "2019-05-29 16:42:07",
          "url": "localhost:8080/case-management/v1/cases/CS0264883/attachments/f7262514db7df7c01785dd4b5e961973"
        }
      ],
      "resources": [
        {
          "crn": "211770",
          "name": "ir-origin01.sliad.dataxu.net",
          "type": "ims",
          "url": "https://cloud.ibm.com/gen1/infrastructure/bare-metal/211770/details",
          "note": null
        },
        {
          "crn": "274300",
          "name": "rts-am269.sliad.dataxu.net",
          "type": "SoftLayer_Hardware",
          "url": null,
          "note": null
        },
        {
          "crn": "242458",
          "name": "lb108.wdc01.dataxu.com",
          "type": "ims",
          "url": "https://cloud.ibm.com/gen1/infrastructure/bare-metal/242458/details",
          "note": null
        },
        {
          "crn": "244120",
          "name": "rts-am058.sliad.dataxu.net",
          "type": "ims",
          "url": "https://cloud.ibm.com/gen1/infrastructure/bare-metal/244120/details",
          "note": null
        },
        {
          "crn": "211883",
          "name": "analytics06.sldc.dataxu.net",
          "type": "ims",
          "url": "https://cloud.ibm.com/gen1/infrastructure/bare-metal/211883/details",
          "note": null
        }
      ],
      "comments": [
        {
          "value": "Test another comment",
          "added_at": "2019-05-24 16:58:58",
          "added_by": {
            "name": "June Doe",
            "user_id": "JuneDoe@example.com",
            "realm": "IBMid",
            "type": "customer"
          }
        },
        {
          "value": "Test unresolved",
          "added_at": "2019-05-24 16:33:52",
          "added_by": {
            "name": "John Doe",
            "user_id": "JohnDoe@example.com",
            "realm": "IBMid",
            "type": "customer"
          }
        },
        {
          "value": "Close notes: ",
          "added_at": "2019-05-24 16:33:52",
          "added_by": {
            "name": "John Doe",
            "user_id": "JohnDoe@example.com",
            "realm": "IBMid",
            "type": "customer"
          }
        },
        {
          "value": "Close notes: Solution provided by an IBM support engineer",
          "added_at": "2019-05-24 16:32:09",
          "added_by": {
            "name": "John Doe",
            "user_id": "JohnDoe@example.com",
            "realm": "IBMid",
            "type": "customer"
          }
        },
        {
          "value": "Test comment",
          "added_at": "2019-05-24 16:31:32",
          "added_by": {
            "name": "John does",
            "user_id": "JohnDoe@example.com",
            "realm": "IBMid",
            "type": "customer"
          }
        }
      ],
      "offering": {
        "name": "Compute: Bare Metal",
        "type": {
          "group": "category",
          "key": "iaas:classic"
        }
      }
    }

Update case status

Mark the case as resolved or unresolved, or accept the provided resolution.

Mark the case as resolved or unresolved, or accept the provided resolution.

Mark the case as resolved or unresolved, or accept the provided resolution.

Mark the case as resolved or unresolved, or accept the provided resolution.

Mark the case as resolved or unresolved, or accept the provided resolution.

PUT /cases/{case_number}/status
(caseManagement *CaseManagementV1) UpdateCaseStatus(updateCaseStatusOptions *UpdateCaseStatusOptions) (result *Case, response *core.DetailedResponse, err error)
(caseManagement *CaseManagementV1) UpdateCaseStatusWithContext(ctx context.Context, updateCaseStatusOptions *UpdateCaseStatusOptions) (result *Case, response *core.DetailedResponse, err error)
ServiceCall<Case> updateCaseStatus(UpdateCaseStatusOptions updateCaseStatusOptions)
updateCaseStatus(params)
update_case_status(self,
        case_number: str,
        status_payload: 'StatusPayload',
        **kwargs
    ) -> DetailedResponse

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.

  • support.case.update

Request

Instantiate the UpdateCaseStatusOptions struct and set the fields to provide parameter values for the UpdateCaseStatus method.

Use the UpdateCaseStatusOptions.Builder to create a UpdateCaseStatusOptions object that contains the parameter values for the updateCaseStatus method.

Path Parameters

  • Unique identifier of a case

Payload to update status of the case

Examples:
{
  "action": "resolve",
  "comment": "It was actually a mistake",
  "resolution_code": 1
}
{
  "action": "unresolve",
  "comment": "The issue still has not been resolved."
}
{
  "action": "accept",
  "comment": "The proposed resolution worked!"
}

WithContext method only

The UpdateCaseStatus options.

The updateCaseStatus options.

parameters

  • Unique identifier of a case.

  • Payload to resolve the case.

    parameters

    • Unique identifier of a case.

    • Payload to resolve the case.

      • curl -X PUT 'https://support-center.cloud.ibm.com/case-management/v1/cases/{case_number}/status' -H 'Authorization: TOKEN' -d '{
        "action": "resolve",
        "comment": "The issue is resolved. Thank you!"
        'resolution_code: 1'
        }'
      • curl -X PUT 'https://support-center.cloud.ibm.com/case-management/v1/cases/{case_number}/status' -H 'Authorization: TOKEN' -d '{
        "action": "unresolve",
        "comment": "The issue is not resolved!"
        }'
      • curl -X PUT 'https://support-center.cloud.ibm.com/case-management/v1/cases/{case_number}/status' -H 'Authorization: TOKEN' -d '{
        "action": "accept",
        "comment": "I accept the provided resolution."
        }'
      • statusPayloadModel := &casemanagementv1.ResolvePayload{
          Action:         core.StringPtr("resolve"),
          Comment:        core.StringPtr("The problem has been resolved."),
          ResolutionCode: core.Int64Ptr(int64(1)),
        }
        
        updateCaseStatusOptions := caseManagementService.NewUpdateCaseStatusOptions(
          caseNumber,
          statusPayloadModel,
        )
        
        caseVar, response, err := caseManagementService.UpdateCaseStatus(updateCaseStatusOptions)
        if err != nil {
          panic(err)
        }
        b, _ := json.MarshalIndent(caseVar, "", "  ")
        fmt.Println(string(b))
      • ResolvePayload statusPayloadModel = new ResolvePayload.Builder()
          .action("resolve")
          .comment("The problem has been resolved.")
          .resolutionCode(1)
          .build();
        UpdateCaseStatusOptions updateCaseStatusOptions = new UpdateCaseStatusOptions.Builder()
          .caseNumber(caseNumber)
          .statusPayload(statusPayloadModel)
          .build();
        
        Response<Case> response = service.updateCaseStatus(updateCaseStatusOptions).execute();
        Case xCase = response.getResult();
        
        System.out.println(xCase);
      • const statusPayloadModel = {
          action: 'resolve',
          comment: 'The problem has been resolved.',
          resolution_code: 1,
        };
        
        const params = {
          caseNumber: caseNumber,
          statusPayload: statusPayloadModel,
        };
        
        try {
          const res = await caseManagementService.updateCaseStatus(params)
          console.log(JSON.stringify(res.result, null, 2));
        } catch (err) {
          console.warn(err);
        }
      • status_payload_model = {
          'action': 'resolve',
          'comment': 'The problem has been resolved.',
          'resolution_code': 1,
        }
        
        case = case_management_service.update_case_status(
          case_number=case_number,
          status_payload=status_payload_model
        ).get_result()
        
        print(json.dumps(case, indent=2))

      Response

      The support case

      The support case.

      The support case.

      The support case.

      The support case.

      Status Code

      • Success

      • Forbidden - insufficient permission. The client has been authenticated successfully, but the permissions set for the operation forbid this operation to the specified user.

      • Not Found - The requested resource does not exist.

      • Conflict - The requested resource is being modified in a different request

      Example responses
      • {
          "number": "string",
          "short_description": "string",
          "description": "string",
          "created_at": "2019-07-30 06:26:38",
          "created_by": {
            "name": "John Doe",
            "realm": "IBMid",
            "user_id": "johndoe@ibm.com"
          },
          "updated_at": "2019-07-31 07:26:36",
          "updated_by": {
            "name": "John Doe",
            "realm": "IBMid",
            "user_id": "johndoe@ibm.com"
          },
          "contact_type": "Cloud Support Center",
          "contact": {
            "name": "John Doe",
            "realm": "IBMid",
            "user_id": "johndoe@ibm.com"
          },
          "status": "string",
          "severity": 0,
          "support_tier": "Free",
          "resolution": "string",
          "close_notes": "string",
          "agent_close_only": false,
          "eu": {
            "support": true,
            "data_center": "string"
          },
          "watchlist": [
            {
              "name": "John Doe",
              "realm": "IBMid",
              "user_id": "johndoe@ibm.com"
            }
          ],
          "attachments": [
            {
              "id": "string",
              "filename": "string",
              "size_in_bytes": 0,
              "created_at": "2019-07-30 06:26:38",
              "url": "string"
            }
          ],
          "offering": {
            "id": "string",
            "value": "string"
          },
          "resources": [
            {
              "crn": "string",
              "name": "string",
              "type": "string",
              "url": "string",
              "note": "string"
            }
          ],
          "comments": [
            {
              "value": "string",
              "added_at": "2019-07-30 06:26:38",
              "added_by": {
                "name": "John Doe",
                "realm": "IBMid",
                "user_id": "johndoe@ibm.com"
              }
            }
          ]
        }
      • {
          "number": "string",
          "short_description": "string",
          "description": "string",
          "created_at": "2019-07-30 06:26:38",
          "created_by": {
            "name": "John Doe",
            "realm": "IBMid",
            "user_id": "johndoe@ibm.com"
          },
          "updated_at": "2019-07-31 07:26:36",
          "updated_by": {
            "name": "John Doe",
            "realm": "IBMid",
            "user_id": "johndoe@ibm.com"
          },
          "contact_type": "Cloud Support Center",
          "contact": {
            "name": "John Doe",
            "realm": "IBMid",
            "user_id": "johndoe@ibm.com"
          },
          "status": "string",
          "severity": 0,
          "support_tier": "Free",
          "resolution": "string",
          "close_notes": "string",
          "agent_close_only": false,
          "eu": {
            "support": true,
            "data_center": "string"
          },
          "watchlist": [
            {
              "name": "John Doe",
              "realm": "IBMid",
              "user_id": "johndoe@ibm.com"
            }
          ],
          "attachments": [
            {
              "id": "string",
              "filename": "string",
              "size_in_bytes": 0,
              "created_at": "2019-07-30 06:26:38",
              "url": "string"
            }
          ],
          "offering": {
            "id": "string",
            "value": "string"
          },
          "resources": [
            {
              "crn": "string",
              "name": "string",
              "type": "string",
              "url": "string",
              "note": "string"
            }
          ],
          "comments": [
            {
              "value": "string",
              "added_at": "2019-07-30 06:26:38",
              "added_by": {
                "name": "John Doe",
                "realm": "IBMid",
                "user_id": "johndoe@ibm.com"
              }
            }
          ]
        }

      Get all comments on a case

      Get all of the comments including work notes on an individual Case

      GET /cases/{case_number}/comments

      Request

      Path Parameters

      • Unique identifier of a case

      Response

      Contains a total count and an array of comment objects that excludes any work notes

      Status Code

      • Success

      • Forbidden - insufficient permission. The client has been authenticated successfully, but the permissions set for the operation forbid this operation to the specified user.

      • Not Found - The requested resource does not exist.

      • Conflict - The requested resource is being modified in a different request

      Example responses
      • {
          "total_count": 1,
          "comments": [
            {
              "value": "This is my actual case comment!",
              "added_at": "2022-08-20 15:59:07",
              "added_by": {
                "name": "John Doe",
                "user_id": "johndoe@ibm.com",
                "realm": "IBMid",
                "type": "customer"
              },
              "sys_created_by": "IBMid-12345678US"
            }
          ]
        }

      Add comment to case

      Add a comment to a case to be viewed by a support engineer.

      Add a comment to a case to be viewed by a support engineer.

      Add a comment to a case to be viewed by a support engineer.

      Add a comment to a case to be viewed by a support engineer.

      Add a comment to a case to be viewed by a support engineer.

      PUT /cases/{case_number}/comments
      (caseManagement *CaseManagementV1) AddComment(addCommentOptions *AddCommentOptions) (result *Comment, response *core.DetailedResponse, err error)
      (caseManagement *CaseManagementV1) AddCommentWithContext(ctx context.Context, addCommentOptions *AddCommentOptions) (result *Comment, response *core.DetailedResponse, err error)
      ServiceCall<Comment> addComment(AddCommentOptions addCommentOptions)
      addComment(params)
      add_comment(self,
              case_number: str,
              comment: str,
              **kwargs
          ) -> DetailedResponse

      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.

      • support.case.update

      Request

      Instantiate the AddCommentOptions struct and set the fields to provide parameter values for the AddComment method.

      Use the AddCommentOptions.Builder to create a AddCommentOptions object that contains the parameter values for the addComment method.

      Path Parameters

      • Unique identifier of a case

      Payload to add a comment to the case

      Examples:
      {
        "comment": "This is a test comment"
      }

      WithContext method only

      The AddComment options.

      The addComment options.

      parameters

      • Unique identifier of a case.

      • Comment to add to the case.

        Possible values: length ≤ 8000

        Examples:

      parameters

      • Unique identifier of a case.

      • Comment to add to the case.

        Possible values: length ≤ 8000

        Examples:
      • curl -X PUT 'https://support-center.cloud.ibm.com/case-management/v1/cases/{case_number}/comments' -H 'Authorization: TOKEN' -d '{
        "comment": "Test comment api"
        }'
      • addCommentOptions := caseManagementService.NewAddCommentOptions(
          caseNumber,
          "This is an example comment.",
        )
        
        comment, response, err := caseManagementService.AddComment(addCommentOptions)
        if err != nil {
          panic(err)
        }
        b, _ := json.MarshalIndent(comment, "", "  ")
        fmt.Println(string(b))
      • AddCommentOptions addCommentOptions = new AddCommentOptions.Builder()
          .caseNumber(caseNumber)
          .comment("This is an example comment.")
          .build();
        
        Response<Comment> response = service.addComment(addCommentOptions).execute();
        Comment comment = response.getResult();
        
        System.out.println(comment);
      • const params = {
          caseNumber: caseNumber,
          comment: 'This is an example comment,',
        };
        
        try {
          const res = await caseManagementService.addComment(params)
          console.log(JSON.stringify(res.result, null, 2));
        } catch (err) {
          console.warn(err)
        }
      • comment = case_management_service.add_comment(
          case_number=case_number,
          comment='This is an example comment.'
        ).get_result()
        
        print(json.dumps(comment, indent=2))

      Response

      A comment in a case

      A comment in a case.

      A comment in a case.

      A comment in a case.

      A comment in a case.

      Status Code

      • Success

      • Forbidden - insufficient permission. The client has been authenticated successfully, but the permissions set for the operation forbid this operation to the specified user.

      • Not Found - The requested resource does not exist.

      Example responses
      • {
          "value": "string",
          "added_at": "2019-07-30 06:26:38",
          "added_by": {
            "name": "John Doe",
            "realm": "IBMid",
            "user_id": "johndoe@ibm.com"
          }
        }
      • {
          "value": "string",
          "added_at": "2019-07-30 06:26:38",
          "added_by": {
            "name": "John Doe",
            "realm": "IBMid",
            "user_id": "johndoe@ibm.com"
          }
        }

      Add users to watchlist of case

      Add users to the watchlist of case. By adding a user to the watchlist of the case, you are granting them read and write permissions, so the user can view the case, receive updates, and make updates to the case. Note that the user must be in the account to be added to the watchlist.

      Add users to the watchlist of case. By adding a user to the watchlist of the case, you are granting them read and write permissions, so the user can view the case, receive updates, and make updates to the case. Note that the user must be in the account to be added to the watchlist.

      Add users to the watchlist of case. By adding a user to the watchlist of the case, you are granting them read and write permissions, so the user can view the case, receive updates, and make updates to the case. Note that the user must be in the account to be added to the watchlist.

      Add users to the watchlist of case. By adding a user to the watchlist of the case, you are granting them read and write permissions, so the user can view the case, receive updates, and make updates to the case. Note that the user must be in the account to be added to the watchlist.

      Add users to the watchlist of case. By adding a user to the watchlist of the case, you are granting them read and write permissions, so the user can view the case, receive updates, and make updates to the case. Note that the user must be in the account to be added to the watchlist.

      PUT /cases/{case_number}/watchlist
      (caseManagement *CaseManagementV1) AddWatchlist(addWatchlistOptions *AddWatchlistOptions) (result *WatchlistAddResponse, response *core.DetailedResponse, err error)
      (caseManagement *CaseManagementV1) AddWatchlistWithContext(ctx context.Context, addWatchlistOptions *AddWatchlistOptions) (result *WatchlistAddResponse, response *core.DetailedResponse, err error)
      ServiceCall<WatchlistAddResponse> addWatchlist(AddWatchlistOptions addWatchlistOptions)
      addWatchlist(params)
      add_watchlist(self,
              case_number: str,
              *,
              watchlist: List['User'] = None,
              **kwargs
          ) -> DetailedResponse

      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.

      • support.case.update

      Request

      Instantiate the AddWatchlistOptions struct and set the fields to provide parameter values for the AddWatchlist method.

      Use the AddWatchlistOptions.Builder to create a AddWatchlistOptions object that contains the parameter values for the addWatchlist method.

      Path Parameters

      • Unique identifier of a case

      Payload to add/remove users to/from the case watchlist

      WithContext method only

      The AddWatchlist options.

      The addWatchlist options.

      parameters

      • Unique identifier of a case.

      • Array of user ID objects.

        Possible values: 1 ≤ number of items ≤ 100

        Examples:
        {
          "name": "John Doe",
          "realm": "IBMid",
          "user_id": "johndoe@ibm.com"
        }

      parameters

      • Unique identifier of a case.

      • Array of user ID objects.

        Possible values: 1 ≤ number of items ≤ 100

        Examples:
        {
          "name": "John Doe",
          "realm": "IBMid",
          "user_id": "johndoe@ibm.com"
        }
      • curl -X PUT 'https://support-center.cloud.ibm.com/case-management/v1/cases/{case_number}/watchlist' -H 'Authorization: TOKEN' -d
        `{
        "watchlist": [
        {
        realm: "IBMid"
        user_id: "test@ibm.com"
        }
        ]
        }'
      • watchListUser, _ := caseManagementService.NewUser("IBMid", "abc@ibm.com")
        
        addWatchlistOptions := caseManagementService.NewAddWatchlistOptions(
          caseNumber,
        )
        addWatchlistOptions.SetWatchlist([]casemanagementv1.User{*watchListUser})
        
        watchlistAddResponse, response, err := caseManagementService.AddWatchlist(addWatchlistOptions)
        if err != nil {
          panic(err)
        }
        b, _ := json.MarshalIndent(watchlistAddResponse, "", "  ")
        fmt.Println(string(b))
      • User watchlistUser = new User.Builder().realm("IBMid").userId("abc@ibm.com").build();
        AddWatchlistOptions addWatchlistOptions = new AddWatchlistOptions.Builder()
          .caseNumber(caseNumber)
          .addWatchlist(watchlistUser)
          .build();
        
        Response<WatchlistAddResponse> response = service.addWatchlist(addWatchlistOptions).execute();
        WatchlistAddResponse watchlistAddResponse = response.getResult();
        
        System.out.println(watchlistAddResponse);
      • const watchlistUsers = [
          { realm: 'IBMid', user_id: 'abc@ibm.com' }
        ]
        
        const params = {
          caseNumber: caseNumber,
          watchlist: watchlistUsers,
        };
        
        try {
          const res = await caseManagementService.addWatchlist(params)
          console.log(JSON.stringify(res.result, null, 2));
        } catch (err) {
          console.warn(err)
        }
      • watchlist_users = [
          User(realm='IBMid', user_id='abc@ibm.com')
        ]
        
        watchlist_add_response = case_management_service.add_watchlist(
          case_number=case_number,
          watchlist=watchlist_users,
        ).get_result()
        
        print(json.dumps(watchlist_add_response, indent=2))

      Response

      Response of a request when adding to watchlist

      Response of a request when adding to watchlist.

      Examples:
      {
        "added": [
          {
            "name": "John Doe",
            "realm": "IBMid",
            "user_id": "johndoe@ibm.com"
          }
        ],
        "failed": [
          {
            "name": "John Doe",
            "realm": "IBMid",
            "user_id": "johndoe@ibm.com"
          }
        ]
      }

      Response of a request when adding to watchlist.

      Examples:
      {
        "added": [
          {
            "name": "John Doe",
            "realm": "IBMid",
            "user_id": "johndoe@ibm.com"
          }
        ],
        "failed": [
          {
            "name": "John Doe",
            "realm": "IBMid",
            "user_id": "johndoe@ibm.com"
          }
        ]
      }

      Response of a request when adding to watchlist.

      Examples:
      {
        "added": [
          {
            "name": "John Doe",
            "realm": "IBMid",
            "user_id": "johndoe@ibm.com"
          }
        ],
        "failed": [
          {
            "name": "John Doe",
            "realm": "IBMid",
            "user_id": "johndoe@ibm.com"
          }
        ]
      }

      Response of a request when adding to watchlist.

      Examples:
      {
        "added": [
          {
            "name": "John Doe",
            "realm": "IBMid",
            "user_id": "johndoe@ibm.com"
          }
        ],
        "failed": [
          {
            "name": "John Doe",
            "realm": "IBMid",
            "user_id": "johndoe@ibm.com"
          }
        ]
      }

      Status Code

      • Success

      • Forbidden - insufficient permission. The client has been authenticated successfully, but the permissions set for the operation forbid this operation to the specified user.

      Example responses
      • {
          "added": [
            {
              "name": "John Doe",
              "realm": "IBMid",
              "user_id": "johndoe@ibm.com"
            }
          ],
          "failed": [
            {
              "name": "John Doe",
              "realm": "IBMid",
              "user_id": "johndoe@ibm.com"
            }
          ]
        }
      • {
          "added": [
            {
              "name": "John Doe",
              "realm": "IBMid",
              "user_id": "johndoe@ibm.com"
            }
          ],
          "failed": [
            {
              "name": "John Doe",
              "realm": "IBMid",
              "user_id": "johndoe@ibm.com"
            }
          ]
        }

      Remove users from watchlist of case

      Remove users from the watchlist of a case if you don't want them to view the case, receive updates, or make updates to the case.

      Remove users from the watchlist of a case if you don't want them to view the case, receive updates, or make updates to the case.

      Remove users from the watchlist of a case if you don't want them to view the case, receive updates, or make updates to the case.

      Remove users from the watchlist of a case if you don't want them to view the case, receive updates, or make updates to the case.

      Remove users from the watchlist of a case if you don't want them to view the case, receive updates, or make updates to the case.

      DELETE /cases/{case_number}/watchlist
      (caseManagement *CaseManagementV1) RemoveWatchlist(removeWatchlistOptions *RemoveWatchlistOptions) (result *Watchlist, response *core.DetailedResponse, err error)
      (caseManagement *CaseManagementV1) RemoveWatchlistWithContext(ctx context.Context, removeWatchlistOptions *RemoveWatchlistOptions) (result *Watchlist, response *core.DetailedResponse, err error)
      ServiceCall<Watchlist> removeWatchlist(RemoveWatchlistOptions removeWatchlistOptions)
      removeWatchlist(params)
      remove_watchlist(self,
              case_number: str,
              *,
              watchlist: List['User'] = None,
              **kwargs
          ) -> DetailedResponse

      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.

      • support.case.update

      Request

      Instantiate the RemoveWatchlistOptions struct and set the fields to provide parameter values for the RemoveWatchlist method.

      Use the RemoveWatchlistOptions.Builder to create a RemoveWatchlistOptions object that contains the parameter values for the removeWatchlist method.

      Path Parameters

      • Unique identifier of a case

      Payload to add/remove users to/from the case watchlist

      WithContext method only

      The RemoveWatchlist options.

      The removeWatchlist options.

      parameters

      • Unique identifier of a case.

      • Array of user ID objects.

        Possible values: 1 ≤ number of items ≤ 100

        Examples:
        {
          "name": "John Doe",
          "realm": "IBMid",
          "user_id": "johndoe@ibm.com"
        }

      parameters

      • Unique identifier of a case.

      • Array of user ID objects.

        Possible values: 1 ≤ number of items ≤ 100

        Examples:
        {
          "name": "John Doe",
          "realm": "IBMid",
          "user_id": "johndoe@ibm.com"
        }
      • curl -X DELETE 'https://support-center.cloud.ibm.com/case-management/v1/cases/{case_number}/watchlist' -H 'Authorization: TOKEN' -d '[
        {
        realm: "IBMid"user_id: "test@ibm.com"
        
        }
        ]'
      • watchListUser, _ := caseManagementService.NewUser("IBMid", "abc@ibm.com")
        
        removeWatchlistOptions := caseManagementService.NewRemoveWatchlistOptions(
          caseNumber,
        )
        removeWatchlistOptions.SetWatchlist([]casemanagementv1.User{*watchListUser})
        
        watchlist, response, err := caseManagementService.RemoveWatchlist(removeWatchlistOptions)
        if err != nil {
          panic(err)
        }
        b, _ := json.MarshalIndent(watchlist, "", "  ")
        fmt.Println(string(b))
      • User watchlistUser = new User.Builder().realm("IBMid").userId("abc@ibm.com").build();
        RemoveWatchlistOptions removeWatchlistOptions = new RemoveWatchlistOptions.Builder()
          .caseNumber(caseNumber)
          .addWatchlist(watchlistUser)
          .build();
        
        Response<Watchlist> response = service.removeWatchlist(removeWatchlistOptions).execute();
        Watchlist watchlist = response.getResult();
        
        System.out.println(watchlist);
      • const watchlistUsers = [
          { realm: 'IBMid', user_id: 'abc@ibm.com' }
        ]
        
        const params = {
          caseNumber: caseNumber,
          watchlist: watchlistUsers,
        };
        
        try {
          const res = await caseManagementService.removeWatchlist(params)
          console.log(JSON.stringify(res.result, null, 2));
        } catch (err) {
          console.warn(err)
        }
      • watchlist_users = [
          User(realm='IBMid', user_id='abc@ibm.com')
        ]
        
        watchlist = case_management_service.remove_watchlist(
          case_number=case_number,
          watchlist=watchlist_users,
        ).get_result()
        
        print(json.dumps(watchlist, indent=2))

      Response

      Payload to add/remove users to/from the case watchlist

      Payload to add/remove users to/from the case watchlist.

      Payload to add/remove users to/from the case watchlist.

      Payload to add/remove users to/from the case watchlist.

      Payload to add/remove users to/from the case watchlist.

      Status Code

      • Success

      • Forbidden - insufficient permission. The client has been authenticated successfully, but the permissions set for the operation forbid this operation to the specified user.

      • Not Found - The requested resource does not exist.

      Example responses
      • [
          {
            "name": "John Doe",
            "realm": "IBMid",
            "user_id": "johndoe@ibm.com"
          }
        ]
      • [
          {
            "name": "John Doe",
            "realm": "IBMid",
            "user_id": "johndoe@ibm.com"
          }
        ]

      Add a resource to case

      Add a resource to case by specifying the Cloud Resource Name (CRN), or id and type if attaching a class iaaS resource.

      Add a resource to case by specifying the Cloud Resource Name (CRN), or id and type if attaching a class iaaS resource.

      Add a resource to case by specifying the Cloud Resource Name (CRN), or id and type if attaching a class iaaS resource.

      Add a resource to case by specifying the Cloud Resource Name (CRN), or id and type if attaching a class iaaS resource.

      Add a resource to case by specifying the Cloud Resource Name (CRN), or id and type if attaching a class iaaS resource.

      PUT /cases/{case_number}/resources
      (caseManagement *CaseManagementV1) AddResource(addResourceOptions *AddResourceOptions) (result *Resource, response *core.DetailedResponse, err error)
      (caseManagement *CaseManagementV1) AddResourceWithContext(ctx context.Context, addResourceOptions *AddResourceOptions) (result *Resource, response *core.DetailedResponse, err error)
      ServiceCall<Resource> addResource(AddResourceOptions addResourceOptions)
      addResource(params)
      add_resource(self,
              case_number: str,
              *,
              crn: str = None,
              type: str = None,
              id: float = None,
              note: str = None,
              **kwargs
          ) -> DetailedResponse

      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.

      • support.case.update

      Request

      Instantiate the AddResourceOptions struct and set the fields to provide parameter values for the AddResource method.

      Use the AddResourceOptions.Builder to create a AddResourceOptions object that contains the parameter values for the addResource method.

      Path Parameters

      • Unique identifier of a case

      Payload to add a resource to a case

      Examples:
      {
        "type": "SoftLayer_Virtual_Guest",
        "id": 9999,
        "note": "Classic IaaS device",
        "crn": "crn:version:cname:ctype:service-name:location:scope:service-instance:resource-type:resource note: Resource that has crn service name `cname`"
      }

      WithContext method only

      The AddResource options.

      The addResource options.

      parameters

      • Unique identifier of a case.

      • Cloud Resource Name of the resource.

        Possible values: length ≤ 600

      • Only used to attach Classic IaaS devices that have no CRN.

        Possible values: length ≤ 100

      • Only used to attach Classic IaaS devices that have no CRN. Id of Classic IaaS device. This is deprecated in favor of the crn field.

      • A note about this resource.

        Possible values: length ≤ 100

      parameters

      • Unique identifier of a case.

      • Cloud Resource Name of the resource.

        Possible values: length ≤ 600

      • Only used to attach Classic IaaS devices that have no CRN.

        Possible values: length ≤ 100

      • Only used to attach Classic IaaS devices that have no CRN. Id of Classic IaaS device. This is deprecated in favor of the crn field.

      • A note about this resource.

        Possible values: length ≤ 100

      • curl -X PUT 'https://support-center.cloud.ibm.com/case-management/v1/cases/{case_number}/resources' -H 'Authorization: TOKEN' -d '{
        "crn": "296878"
        "note": "This resource does not work"
        }'
      • addResourceOptions := caseManagementService.NewAddResourceOptions(
          caseNumber,
        )
        addResourceOptions.SetCRN(resourceCRN)
        addResourceOptions.SetNote("This resource is the service that is having the problem.")
        
        resource, response, err := caseManagementService.AddResource(addResourceOptions)
        if err != nil {
          panic(err)
        }
        b, _ := json.MarshalIndent(resource, "", "  ")
        fmt.Println(string(b))
      • AddResourceOptions addResourceOptions = new AddResourceOptions.Builder()
          .caseNumber(caseNumber)
          .crn(resourceCrn)
          .note("This resource is the service that is having the problem.")
          .build();
        
        Response<Resource> response = service.addResource(addResourceOptions).execute();
        Resource resource = response.getResult();
        
        System.out.println(resource);
      • const params = {
          caseNumber: caseNumber,
          crn: resourceCrn,
          note: 'This resource is the service that is having the problem.',
        };
        
        try {
          const res = await caseManagementService.addResource(params)
          console.log(JSON.stringify(res.result, null, 2));
        } catch (err) {
          console.warn(err)
        }
      • resource = case_management_service.add_resource(
          case_number=case_number,
          crn=resource_crn,
          note='This resource is the service that is having the problem.',
        ).get_result()
        
        print(json.dumps(resource, indent=2))

      Response

      A resource record of a case

      A resource record of a case.

      A resource record of a case.

      A resource record of a case.

      A resource record of a case.

      Status Code

      • Success

      • Forbidden - insufficient permission. The client has been authenticated successfully, but the permissions set for the operation forbid this operation to the specified user.

      • Not Found - The requested resource does not exist.

      Example responses
      • {
          "crn": "string",
          "name": "string",
          "type": "string",
          "url": "string",
          "note": "string"
        }
      • {
          "crn": "string",
          "name": "string",
          "type": "string",
          "url": "string",
          "note": "string"
        }

      Add attachments to a support case

      You can add attachments to a case to provide more information for the support team about the issue that you're experiencing.

      You can add attachments to a case to provide more information for the support team about the issue that you're experiencing.

      You can add attachments to a case to provide more information for the support team about the issue that you're experiencing.

      You can add attachments to a case to provide more information for the support team about the issue that you're experiencing.

      You can add attachments to a case to provide more information for the support team about the issue that you're experiencing.

      PUT /cases/{case_number}/attachments
      (caseManagement *CaseManagementV1) UploadFile(uploadFileOptions *UploadFileOptions) (result *Attachment, response *core.DetailedResponse, err error)
      (caseManagement *CaseManagementV1) UploadFileWithContext(ctx context.Context, uploadFileOptions *UploadFileOptions) (result *Attachment, response *core.DetailedResponse, err error)
      ServiceCall<Attachment> uploadFile(UploadFileOptions uploadFileOptions)
      uploadFile(params)
      upload_file(self,
              case_number: str,
              file: List[BinaryIO],
              **kwargs
          ) -> DetailedResponse

      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.

      • support.case.update

      Request

      Instantiate the UploadFileOptions struct and set the fields to provide parameter values for the UploadFile method.

      Use the UploadFileOptions.Builder to create a UploadFileOptions object that contains the parameter values for the uploadFile method.

      Path Parameters

      • Unique identifier of a case

      Form Parameters

      • file of supported types, 8MB in size limit

      WithContext method only

      The UploadFile options.

      The uploadFile options.

      parameters

      • Unique identifier of a case.

      • file of supported types, 8MB in size limit.

      parameters

      • Unique identifier of a case.

      • file of supported types, 8MB in size limit.

      • curl -X PUT 'https://support-center.cloud.ibm.com/case-management/v1/cases/{case_number}/attachments' -H 'Authorization: TOKEN' -F file=@/Users/test/icon.svg
      • exampleFileContent := "This is the content of the file to upload."
        
        exampleFile, _ := caseManagementService.NewFileWithMetadata(io.NopCloser(strings.NewReader(exampleFileContent)))
        exampleFile.Filename = core.StringPtr("example.log")
        exampleFile.ContentType = core.StringPtr("application/octet-stream")
        
        filePayload := []casemanagementv1.FileWithMetadata{*exampleFile}
        
        uploadFileOptions := caseManagementService.NewUploadFileOptions(
          caseNumber,
          filePayload,
        )
        
        attachment, response, err := caseManagementService.UploadFile(uploadFileOptions)
        if err != nil {
          panic(err)
        }
        b, _ := json.MarshalIndent(attachment, "", "  ")
        fmt.Println(string(b))
      • String fileContent = "This is the content of the file to upload.";
        FileWithMetadata fileWithMetadata = new FileWithMetadata.Builder()
            .filename("example.log")
            .data(new ByteArrayInputStream(fileContent.getBytes(StandardCharsets.UTF_8)))
            .contentType("application/octet-stream")
            .build();
        
        UploadFileOptions uploadFileOptions = new UploadFileOptions.Builder()
          .caseNumber(caseNumber)
          .addFile(fileWithMetadata)
          .build();
        
        Response<Attachment> response = service.uploadFile(uploadFileOptions).execute();
        Attachment attachment = response.getResult();
        
        System.out.println(attachment);
      • const exampleFileContent = 'This is the content of the file to upload.';
        
        const fileWithMetadata = {
          data: Buffer.from(exampleFileContent),
          filename: 'example.log',
          content_type: 'application/octet-stream',
        };
        
        const filesToUpload = [fileWithMetadata]
        
        const params = {
          caseNumber: caseNumber,
          file: filesToUpload,
        };
        
        try {
          const res = await caseManagementService.uploadFile(params)
          attachmentId = res.result.id;
          console.log(JSON.stringify(res.result, null, 2));
        } catch (err) {
          console.warn(err)
        }
      • example_file_content = b'This is the content of the file to upload.'
        
        file_with_metadata_model = {
          'data': io.BytesIO(example_file_content).getvalue(),
          'filename': 'example.log',
          'content_type': 'application/octet-stream',
        }
        
        files_to_upload = [file_with_metadata_model]
        
        attachment = case_management_service.upload_file(
          case_number=case_number,
          file=files_to_upload,
        ).get_result()
        
        print(json.dumps(attachment, indent=2))

      Response

      Details of an attachment

      Details of an attachment.

      Details of an attachment.

      Details of an attachment.

      Details of an attachment.

      Status Code

      • Success

      • Forbidden - insufficient permission. The client has been authenticated successfully, but the permissions set for the operation forbid this operation to the specified user.

      • Not Found - The requested resource does not exist.

      Example responses
      • {
          "id": "string",
          "filename": "string",
          "size_in_bytes": 100,
          "created_at": "2019-07-30 06:26:38",
          "url": "string"
        }
      • {
          "id": "string",
          "filename": "string",
          "size_in_bytes": 100,
          "created_at": "2019-07-30 06:26:38",
          "url": "string"
        }

      Download an attachment

      Download an attachment from a case.

      Download an attachment from a case.

      Download an attachment from a case.

      Download an attachment from a case.

      Download an attachment from a case.

      GET /cases/{case_number}/attachments/{file_id}
      (caseManagement *CaseManagementV1) DownloadFile(downloadFileOptions *DownloadFileOptions) (result io.ReadCloser, response *core.DetailedResponse, err error)
      (caseManagement *CaseManagementV1) DownloadFileWithContext(ctx context.Context, downloadFileOptions *DownloadFileOptions) (result io.ReadCloser, response *core.DetailedResponse, err error)
      ServiceCall<InputStream> downloadFile(DownloadFileOptions downloadFileOptions)
      downloadFile(params)
      download_file(self,
              case_number: str,
              file_id: str,
              **kwargs
          ) -> DetailedResponse

      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.

      • support.case.update

      Request

      Instantiate the DownloadFileOptions struct and set the fields to provide parameter values for the DownloadFile method.

      Use the DownloadFileOptions.Builder to create a DownloadFileOptions object that contains the parameter values for the downloadFile method.

      Path Parameters

      • Unique identifier of a case

      • Unique identifier of a file

      WithContext method only

      The DownloadFile options.

      The downloadFile options.

      parameters

      • Unique identifier of a case.

      • Unique identifier of a file.

      parameters

      • Unique identifier of a case.

      • Unique identifier of a file.

      • curl -X GET 'https://support-center.cloud.ibm.com/case-management/v1/cases/{case_number}/attachments/{file_id}' \ -H 'Authorization: TOKEN' --output {file_name}
        
      • downloadFileOptions := caseManagementService.NewDownloadFileOptions(
          caseNumber,
          attachmentID,
        )
        
        result, response, err := caseManagementService.DownloadFile(downloadFileOptions)
        if err != nil {
          panic(err)
        }
        if result != nil {
          defer result.Close()
          buf := new(bytes.Buffer)
          _, _ = buf.ReadFrom(result)
          fmt.Println(buf.String())
        }
      • DownloadFileOptions downloadFileOptions = new DownloadFileOptions.Builder()
          .caseNumber(caseNumber)
          .fileId(attachmentId)
          .build();
        
        Response<InputStream> response = service.downloadFile(downloadFileOptions).execute();
        InputStream inputStream = response.getResult();
        if (inputStream != null) {
          String attachmentContents = IOUtils.toString(inputStream, StandardCharsets.UTF_8);
          System.out.println(attachmentContents);
        }
      • const params = {
          caseNumber: caseNumber,
          fileId: attachmentId,
        };
        
        try {
          const res = await caseManagementService.downloadFile(params);
          responseContentType = res.headers['content-type'];
          console.log(res.result);
        } catch (err) {
          console.warn(err)
        }
      • response = case_management_service.download_file(
          case_number=case_number,
          file_id=attachment_id,
        )
        
        file = response.get_result()
        
        print(file.content)

      Response

      Response type: io.ReadCloser

      Response type: InputStream

      Response type: NodeJS.ReadableStream

      Response type: BinaryIO

      Status Code

      • Success

      • Forbidden - insufficient permission. The client has been authenticated successfully, but the permissions set for the operation forbid this operation to the specified user.

      • Not Found - The requested resource does not exist.

      Example responses

      Remove attachment from case

      Remove an attachment from a case.

      Remove an attachment from a case.

      Remove an attachment from a case.

      Remove an attachment from a case.

      Remove an attachment from a case.

      DELETE /cases/{case_number}/attachments/{file_id}
      (caseManagement *CaseManagementV1) DeleteFile(deleteFileOptions *DeleteFileOptions) (result *AttachmentList, response *core.DetailedResponse, err error)
      (caseManagement *CaseManagementV1) DeleteFileWithContext(ctx context.Context, deleteFileOptions *DeleteFileOptions) (result *AttachmentList, response *core.DetailedResponse, err error)
      ServiceCall<AttachmentList> deleteFile(DeleteFileOptions deleteFileOptions)
      deleteFile(params)
      delete_file(self,
              case_number: str,
              file_id: str,
              **kwargs
          ) -> DetailedResponse

      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.

      • support.case.update

      Request

      Instantiate the DeleteFileOptions struct and set the fields to provide parameter values for the DeleteFile method.

      Use the DeleteFileOptions.Builder to create a DeleteFileOptions object that contains the parameter values for the deleteFile method.

      Path Parameters

      • Unique identifier of a case

      • Unique identifier of a file

      WithContext method only

      The DeleteFile options.

      The deleteFile options.

      parameters

      • Unique identifier of a case.

      • Unique identifier of a file.

      parameters

      • Unique identifier of a case.

      • Unique identifier of a file.

      • curl -X DELETE 'https://support-center.cloud.ibm.com/case-management/v1/cases/{case_number}/attachments/{file_id}' -H 'Authorization: TOKEN' \
      • deleteFileOptions := caseManagementService.NewDeleteFileOptions(
          caseNumber,
          attachmentID,
        )
        
        attachmentList, response, err := caseManagementService.DeleteFile(deleteFileOptions)
        if err != nil {
          panic(err)
        }
        b, _ := json.MarshalIndent(attachmentList, "", "  ")
        fmt.Println(string(b))
      • DeleteFileOptions deleteFileOptions = new DeleteFileOptions.Builder()
          .caseNumber(caseNumber)
          .fileId(attachmentId)
          .build();
        
        Response<AttachmentList> response = service.deleteFile(deleteFileOptions).execute();
        AttachmentList attachmentList = response.getResult();
        
        System.out.println(attachmentList);
      • const params = {
          caseNumber: caseNumber,
          fileId: attachmentId,
        };
        
        try {
          const res = await caseManagementService.deleteFile(params)
          console.log(JSON.stringify(res.result, null, 2));
        } catch (err) {
          console.warn(err);
        }
      • attachment_list = case_management_service.delete_file(
          case_number=case_number,
          file_id=attachment_id
        ).get_result()
        
        print(json.dumps(attachment_list, indent=2))

      Response

      List of attachments in the case

      List of attachments in the case.

      Examples:
      {
        "attachments": [
          {
            "id": "string",
            "filename": "string",
            "size_in_bytes": 0,
            "created_at": "2019-07-31 07:26:36",
            "url": "string"
          }
        ]
      }

      List of attachments in the case.

      Examples:
      {
        "attachments": [
          {
            "id": "string",
            "filename": "string",
            "size_in_bytes": 0,
            "created_at": "2019-07-31 07:26:36",
            "url": "string"
          }
        ]
      }

      List of attachments in the case.

      Examples:
      {
        "attachments": [
          {
            "id": "string",
            "filename": "string",
            "size_in_bytes": 0,
            "created_at": "2019-07-31 07:26:36",
            "url": "string"
          }
        ]
      }

      List of attachments in the case.

      Examples:
      {
        "attachments": [
          {
            "id": "string",
            "filename": "string",
            "size_in_bytes": 0,
            "created_at": "2019-07-31 07:26:36",
            "url": "string"
          }
        ]
      }

      Status Code

      • Success

      • Forbidden - insufficient permission. The client has been authenticated successfully, but the permissions set for the operation forbid this operation to the specified user.

      • Not Found - The requested resource does not exist.

      Example responses
      • {
          "attachments": [
            {
              "id": "string",
              "filename": "string",
              "size_in_bytes": 0,
              "created_at": "2019-07-31 07:26:36",
              "url": "string"
            }
          ]
        }
      • {
          "attachments": [
            {
              "id": "string",
              "filename": "string",
              "size_in_bytes": 0,
              "created_at": "2019-07-31 07:26:36",
              "url": "string"
            }
          ]
        }
      id=pythonclassName=tab-item-selected