diff --git a/.apigentools-info b/.apigentools-info index 3e0d2ebecde..4b0857b90f4 100644 --- a/.apigentools-info +++ b/.apigentools-info @@ -4,13 +4,13 @@ "spec_versions": { "v1": { "apigentools_version": "1.6.6", - "regenerated": "2024-02-20 12:21:52.216044", - "spec_repo_commit": "7e467650" + "regenerated": "2024-02-20 19:02:27.598784", + "spec_repo_commit": "5ef419de" }, "v2": { "apigentools_version": "1.6.6", - "regenerated": "2024-02-20 12:21:52.235691", - "spec_repo_commit": "7e467650" + "regenerated": "2024-02-20 19:02:27.613393", + "spec_repo_commit": "5ef419de" } } } \ No newline at end of file diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index 5d118d9175c..f58f161362a 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -22766,7 +22766,7 @@ paths: - cases_read summary: Search cases tags: - - Cases + - Case Management x-pagination: limitParam: page[size] pageOffsetParam: page[offset] @@ -22805,7 +22805,7 @@ paths: - cases_write summary: Create a case tags: - - Cases + - Case Management /api/v2/cases/projects: get: description: Get all projects. @@ -22834,7 +22834,7 @@ paths: - cases_read summary: Get all projects tags: - - Cases Projects + - Case Management post: description: Create a project. operationId: CreateProject @@ -22869,7 +22869,7 @@ paths: - cases_write summary: Create a project tags: - - Cases Projects + - Case Management /api/v2/cases/projects/{project_id}: delete: description: Remove a project using the project's `id`. @@ -22896,7 +22896,7 @@ paths: - cases_write summary: Remove a project tags: - - Cases Projects + - Case Management get: description: Get the details of a project by `project_id`. operationId: GetProject @@ -22926,7 +22926,7 @@ paths: - cases_read summary: Get the details of a project tags: - - Cases Projects + - Case Management /api/v2/cases/{case_id}: get: description: Get the details of case by `case_id` @@ -22957,7 +22957,7 @@ paths: - cases_read summary: Get the details of a case tags: - - Cases + - Case Management /api/v2/cases/{case_id}/archive: post: description: Archive case @@ -22995,7 +22995,7 @@ paths: - cases_write summary: Archive case tags: - - Cases + - Case Management /api/v2/cases/{case_id}/assign: post: description: Assign case to a user @@ -23033,7 +23033,7 @@ paths: - cases_write summary: Assign case tags: - - Cases + - Case Management /api/v2/cases/{case_id}/priority: post: description: Update case priority @@ -23071,7 +23071,7 @@ paths: - cases_write summary: Update case priority tags: - - Cases + - Case Management /api/v2/cases/{case_id}/status: post: description: Update case status @@ -23109,7 +23109,7 @@ paths: - cases_write summary: Update case status tags: - - Cases + - Case Management /api/v2/cases/{case_id}/unarchive: post: description: Unarchive case @@ -23147,7 +23147,7 @@ paths: - cases_write summary: Unarchive case tags: - - Cases + - Case Management /api/v2/cases/{case_id}/unassign: post: description: Unassign case @@ -23185,7 +23185,7 @@ paths: - cases_write summary: Unassign case tags: - - Cases + - Case Management /api/v2/ci/pipeline: post: description: 'Send your pipeline event to your Datadog platform over HTTP. For @@ -34532,10 +34532,8 @@ tags: [Test Visibility in Datadog page](https://docs.datadoghq.com/tests/) for more information. name: CI Visibility Tests -- description: View and manage cases within Datadog - name: Cases -- description: View and manage project within Case Management - name: Cases Projects +- description: View and manage cases and project within Case Management + name: Case Management - description: The Cloud Cost Management API allows you to set up, edit, and delete Cloud Cost Management accounts for AWS and Azure. See the [Cloud Cost Management page](https://docs.datadoghq.com/cloud_cost_management/) for more information. diff --git a/api/datadogV2/api_cases.go b/api/datadogV2/api_case_management.go similarity index 69% rename from api/datadogV2/api_cases.go rename to api/datadogV2/api_case_management.go index ee6e8c81e6a..56c23d21a2a 100644 --- a/api/datadogV2/api_cases.go +++ b/api/datadogV2/api_case_management.go @@ -13,19 +13,19 @@ import ( "github.com/DataDog/datadog-api-client-go/v2/api/datadog" ) -// CasesApi service type -type CasesApi datadog.Service +// CaseManagementApi service type +type CaseManagementApi datadog.Service // ArchiveCase Archive case. // Archive case -func (a *CasesApi) ArchiveCase(ctx _context.Context, caseId string, body CaseEmptyRequest) (CaseResponse, *_nethttp.Response, error) { +func (a *CaseManagementApi) ArchiveCase(ctx _context.Context, caseId string, body CaseEmptyRequest) (CaseResponse, *_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodPost localVarPostBody interface{} localVarReturnValue CaseResponse ) - localBasePath, err := a.Client.Cfg.ServerURLWithContext(ctx, "v2.CasesApi.ArchiveCase") + localBasePath, err := a.Client.Cfg.ServerURLWithContext(ctx, "v2.CaseManagementApi.ArchiveCase") if err != nil { return localVarReturnValue, nil, datadog.GenericOpenAPIError{ErrorMessage: err.Error()} } @@ -92,14 +92,14 @@ func (a *CasesApi) ArchiveCase(ctx _context.Context, caseId string, body CaseEmp // AssignCase Assign case. // Assign case to a user -func (a *CasesApi) AssignCase(ctx _context.Context, caseId string, body CaseAssignRequest) (CaseResponse, *_nethttp.Response, error) { +func (a *CaseManagementApi) AssignCase(ctx _context.Context, caseId string, body CaseAssignRequest) (CaseResponse, *_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodPost localVarPostBody interface{} localVarReturnValue CaseResponse ) - localBasePath, err := a.Client.Cfg.ServerURLWithContext(ctx, "v2.CasesApi.AssignCase") + localBasePath, err := a.Client.Cfg.ServerURLWithContext(ctx, "v2.CaseManagementApi.AssignCase") if err != nil { return localVarReturnValue, nil, datadog.GenericOpenAPIError{ErrorMessage: err.Error()} } @@ -166,14 +166,14 @@ func (a *CasesApi) AssignCase(ctx _context.Context, caseId string, body CaseAssi // CreateCase Create a case. // Create a Case -func (a *CasesApi) CreateCase(ctx _context.Context, body CaseCreateRequest) (CaseResponse, *_nethttp.Response, error) { +func (a *CaseManagementApi) CreateCase(ctx _context.Context, body CaseCreateRequest) (CaseResponse, *_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodPost localVarPostBody interface{} localVarReturnValue CaseResponse ) - localBasePath, err := a.Client.Cfg.ServerURLWithContext(ctx, "v2.CasesApi.CreateCase") + localBasePath, err := a.Client.Cfg.ServerURLWithContext(ctx, "v2.CaseManagementApi.CreateCase") if err != nil { return localVarReturnValue, nil, datadog.GenericOpenAPIError{ErrorMessage: err.Error()} } @@ -237,16 +237,150 @@ func (a *CasesApi) CreateCase(ctx _context.Context, body CaseCreateRequest) (Cas return localVarReturnValue, localVarHTTPResponse, nil } +// CreateProject Create a project. +// Create a project. +func (a *CaseManagementApi) CreateProject(ctx _context.Context, body ProjectCreateRequest) (ProjectResponse, *_nethttp.Response, error) { + var ( + localVarHTTPMethod = _nethttp.MethodPost + localVarPostBody interface{} + localVarReturnValue ProjectResponse + ) + + localBasePath, err := a.Client.Cfg.ServerURLWithContext(ctx, "v2.CaseManagementApi.CreateProject") + if err != nil { + return localVarReturnValue, nil, datadog.GenericOpenAPIError{ErrorMessage: err.Error()} + } + + localVarPath := localBasePath + "/api/v2/cases/projects" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := _neturl.Values{} + localVarFormParams := _neturl.Values{} + localVarHeaderParams["Content-Type"] = "application/json" + localVarHeaderParams["Accept"] = "application/json" + + // body params + localVarPostBody = &body + datadog.SetAuthKeys( + ctx, + &localVarHeaderParams, + [2]string{"apiKeyAuth", "DD-API-KEY"}, + [2]string{"appKeyAuth", "DD-APPLICATION-KEY"}, + ) + req, err := a.Client.PrepareRequest(ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, nil) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.Client.CallAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := datadog.ReadBody(localVarHTTPResponse) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := datadog.GenericOpenAPIError{ + ErrorBody: localVarBody, + ErrorMessage: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 || localVarHTTPResponse.StatusCode == 401 || localVarHTTPResponse.StatusCode == 403 || localVarHTTPResponse.StatusCode == 404 || localVarHTTPResponse.StatusCode == 429 { + var v APIErrorResponse + err = a.Client.Decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.ErrorModel = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.Client.Decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := datadog.GenericOpenAPIError{ + ErrorBody: localVarBody, + ErrorMessage: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +// DeleteProject Remove a project. +// Remove a project using the project's `id`. +func (a *CaseManagementApi) DeleteProject(ctx _context.Context, projectId string) (*_nethttp.Response, error) { + var ( + localVarHTTPMethod = _nethttp.MethodDelete + localVarPostBody interface{} + ) + + localBasePath, err := a.Client.Cfg.ServerURLWithContext(ctx, "v2.CaseManagementApi.DeleteProject") + if err != nil { + return nil, datadog.GenericOpenAPIError{ErrorMessage: err.Error()} + } + + localVarPath := localBasePath + "/api/v2/cases/projects/{project_id}" + localVarPath = strings.Replace(localVarPath, "{"+"project_id"+"}", _neturl.PathEscape(datadog.ParameterToString(projectId, "")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := _neturl.Values{} + localVarFormParams := _neturl.Values{} + localVarHeaderParams["Accept"] = "*/*" + + datadog.SetAuthKeys( + ctx, + &localVarHeaderParams, + [2]string{"apiKeyAuth", "DD-API-KEY"}, + [2]string{"appKeyAuth", "DD-APPLICATION-KEY"}, + ) + req, err := a.Client.PrepareRequest(ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, nil) + if err != nil { + return nil, err + } + + localVarHTTPResponse, err := a.Client.CallAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarHTTPResponse, err + } + + localVarBody, err := datadog.ReadBody(localVarHTTPResponse) + if err != nil { + return localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := datadog.GenericOpenAPIError{ + ErrorBody: localVarBody, + ErrorMessage: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 403 || localVarHTTPResponse.StatusCode == 404 || localVarHTTPResponse.StatusCode == 429 { + var v APIErrorResponse + err = a.Client.Decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + return localVarHTTPResponse, newErr + } + newErr.ErrorModel = v + } + return localVarHTTPResponse, newErr + } + + return localVarHTTPResponse, nil +} + // GetCase Get the details of a case. // Get the details of case by `case_id` -func (a *CasesApi) GetCase(ctx _context.Context, caseId string) (CaseResponse, *_nethttp.Response, error) { +func (a *CaseManagementApi) GetCase(ctx _context.Context, caseId string) (CaseResponse, *_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodGet localVarPostBody interface{} localVarReturnValue CaseResponse ) - localBasePath, err := a.Client.Cfg.ServerURLWithContext(ctx, "v2.CasesApi.GetCase") + localBasePath, err := a.Client.Cfg.ServerURLWithContext(ctx, "v2.CaseManagementApi.GetCase") if err != nil { return localVarReturnValue, nil, datadog.GenericOpenAPIError{ErrorMessage: err.Error()} } @@ -308,6 +442,147 @@ func (a *CasesApi) GetCase(ctx _context.Context, caseId string) (CaseResponse, * return localVarReturnValue, localVarHTTPResponse, nil } +// GetProject Get the details of a project. +// Get the details of a project by `project_id`. +func (a *CaseManagementApi) GetProject(ctx _context.Context, projectId string) (ProjectResponse, *_nethttp.Response, error) { + var ( + localVarHTTPMethod = _nethttp.MethodGet + localVarPostBody interface{} + localVarReturnValue ProjectResponse + ) + + localBasePath, err := a.Client.Cfg.ServerURLWithContext(ctx, "v2.CaseManagementApi.GetProject") + if err != nil { + return localVarReturnValue, nil, datadog.GenericOpenAPIError{ErrorMessage: err.Error()} + } + + localVarPath := localBasePath + "/api/v2/cases/projects/{project_id}" + localVarPath = strings.Replace(localVarPath, "{"+"project_id"+"}", _neturl.PathEscape(datadog.ParameterToString(projectId, "")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := _neturl.Values{} + localVarFormParams := _neturl.Values{} + localVarHeaderParams["Accept"] = "application/json" + + datadog.SetAuthKeys( + ctx, + &localVarHeaderParams, + [2]string{"apiKeyAuth", "DD-API-KEY"}, + [2]string{"appKeyAuth", "DD-APPLICATION-KEY"}, + ) + req, err := a.Client.PrepareRequest(ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, nil) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.Client.CallAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := datadog.ReadBody(localVarHTTPResponse) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := datadog.GenericOpenAPIError{ + ErrorBody: localVarBody, + ErrorMessage: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 || localVarHTTPResponse.StatusCode == 401 || localVarHTTPResponse.StatusCode == 403 || localVarHTTPResponse.StatusCode == 404 || localVarHTTPResponse.StatusCode == 429 { + var v APIErrorResponse + err = a.Client.Decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.ErrorModel = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.Client.Decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := datadog.GenericOpenAPIError{ + ErrorBody: localVarBody, + ErrorMessage: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +// GetProjects Get all projects. +// Get all projects. +func (a *CaseManagementApi) GetProjects(ctx _context.Context) (ProjectsResponse, *_nethttp.Response, error) { + var ( + localVarHTTPMethod = _nethttp.MethodGet + localVarPostBody interface{} + localVarReturnValue ProjectsResponse + ) + + localBasePath, err := a.Client.Cfg.ServerURLWithContext(ctx, "v2.CaseManagementApi.GetProjects") + if err != nil { + return localVarReturnValue, nil, datadog.GenericOpenAPIError{ErrorMessage: err.Error()} + } + + localVarPath := localBasePath + "/api/v2/cases/projects" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := _neturl.Values{} + localVarFormParams := _neturl.Values{} + localVarHeaderParams["Accept"] = "application/json" + + datadog.SetAuthKeys( + ctx, + &localVarHeaderParams, + [2]string{"apiKeyAuth", "DD-API-KEY"}, + [2]string{"appKeyAuth", "DD-APPLICATION-KEY"}, + ) + req, err := a.Client.PrepareRequest(ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, nil) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.Client.CallAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := datadog.ReadBody(localVarHTTPResponse) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := datadog.GenericOpenAPIError{ + ErrorBody: localVarBody, + ErrorMessage: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 || localVarHTTPResponse.StatusCode == 401 || localVarHTTPResponse.StatusCode == 403 || localVarHTTPResponse.StatusCode == 404 || localVarHTTPResponse.StatusCode == 429 { + var v APIErrorResponse + err = a.Client.Decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.ErrorModel = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.Client.Decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := datadog.GenericOpenAPIError{ + ErrorBody: localVarBody, + ErrorMessage: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + // SearchCasesOptionalParameters holds optional parameters for SearchCases. type SearchCasesOptionalParameters struct { PageSize *int64 @@ -355,7 +630,7 @@ func (r *SearchCasesOptionalParameters) WithSortAsc(sortAsc bool) *SearchCasesOp // SearchCases Search cases. // Search cases. -func (a *CasesApi) SearchCases(ctx _context.Context, o ...SearchCasesOptionalParameters) (CasesResponse, *_nethttp.Response, error) { +func (a *CaseManagementApi) SearchCases(ctx _context.Context, o ...SearchCasesOptionalParameters) (CasesResponse, *_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodGet localVarPostBody interface{} @@ -370,7 +645,7 @@ func (a *CasesApi) SearchCases(ctx _context.Context, o ...SearchCasesOptionalPar optionalParams = o[0] } - localBasePath, err := a.Client.Cfg.ServerURLWithContext(ctx, "v2.CasesApi.SearchCases") + localBasePath, err := a.Client.Cfg.ServerURLWithContext(ctx, "v2.CaseManagementApi.SearchCases") if err != nil { return localVarReturnValue, nil, datadog.GenericOpenAPIError{ErrorMessage: err.Error()} } @@ -447,7 +722,7 @@ func (a *CasesApi) SearchCases(ctx _context.Context, o ...SearchCasesOptionalPar } // SearchCasesWithPagination provides a paginated version of SearchCases returning a channel with all items. -func (a *CasesApi) SearchCasesWithPagination(ctx _context.Context, o ...SearchCasesOptionalParameters) (<-chan datadog.PaginationResult[Case], func()) { +func (a *CaseManagementApi) SearchCasesWithPagination(ctx _context.Context, o ...SearchCasesOptionalParameters) (<-chan datadog.PaginationResult[Case], func()) { ctx, cancel := _context.WithCancel(ctx) pageSize_ := int64(10) if len(o) == 0 { @@ -498,14 +773,14 @@ func (a *CasesApi) SearchCasesWithPagination(ctx _context.Context, o ...SearchCa // UnarchiveCase Unarchive case. // Unarchive case -func (a *CasesApi) UnarchiveCase(ctx _context.Context, caseId string, body CaseEmptyRequest) (CaseResponse, *_nethttp.Response, error) { +func (a *CaseManagementApi) UnarchiveCase(ctx _context.Context, caseId string, body CaseEmptyRequest) (CaseResponse, *_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodPost localVarPostBody interface{} localVarReturnValue CaseResponse ) - localBasePath, err := a.Client.Cfg.ServerURLWithContext(ctx, "v2.CasesApi.UnarchiveCase") + localBasePath, err := a.Client.Cfg.ServerURLWithContext(ctx, "v2.CaseManagementApi.UnarchiveCase") if err != nil { return localVarReturnValue, nil, datadog.GenericOpenAPIError{ErrorMessage: err.Error()} } @@ -572,14 +847,14 @@ func (a *CasesApi) UnarchiveCase(ctx _context.Context, caseId string, body CaseE // UnassignCase Unassign case. // Unassign case -func (a *CasesApi) UnassignCase(ctx _context.Context, caseId string, body CaseEmptyRequest) (CaseResponse, *_nethttp.Response, error) { +func (a *CaseManagementApi) UnassignCase(ctx _context.Context, caseId string, body CaseEmptyRequest) (CaseResponse, *_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodPost localVarPostBody interface{} localVarReturnValue CaseResponse ) - localBasePath, err := a.Client.Cfg.ServerURLWithContext(ctx, "v2.CasesApi.UnassignCase") + localBasePath, err := a.Client.Cfg.ServerURLWithContext(ctx, "v2.CaseManagementApi.UnassignCase") if err != nil { return localVarReturnValue, nil, datadog.GenericOpenAPIError{ErrorMessage: err.Error()} } @@ -646,14 +921,14 @@ func (a *CasesApi) UnassignCase(ctx _context.Context, caseId string, body CaseEm // UpdatePriority Update case priority. // Update case priority -func (a *CasesApi) UpdatePriority(ctx _context.Context, caseId string, body CaseUpdatePriorityRequest) (CaseResponse, *_nethttp.Response, error) { +func (a *CaseManagementApi) UpdatePriority(ctx _context.Context, caseId string, body CaseUpdatePriorityRequest) (CaseResponse, *_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodPost localVarPostBody interface{} localVarReturnValue CaseResponse ) - localBasePath, err := a.Client.Cfg.ServerURLWithContext(ctx, "v2.CasesApi.UpdatePriority") + localBasePath, err := a.Client.Cfg.ServerURLWithContext(ctx, "v2.CaseManagementApi.UpdatePriority") if err != nil { return localVarReturnValue, nil, datadog.GenericOpenAPIError{ErrorMessage: err.Error()} } @@ -720,14 +995,14 @@ func (a *CasesApi) UpdatePriority(ctx _context.Context, caseId string, body Case // UpdateStatus Update case status. // Update case status -func (a *CasesApi) UpdateStatus(ctx _context.Context, caseId string, body CaseUpdateStatusRequest) (CaseResponse, *_nethttp.Response, error) { +func (a *CaseManagementApi) UpdateStatus(ctx _context.Context, caseId string, body CaseUpdateStatusRequest) (CaseResponse, *_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodPost localVarPostBody interface{} localVarReturnValue CaseResponse ) - localBasePath, err := a.Client.Cfg.ServerURLWithContext(ctx, "v2.CasesApi.UpdateStatus") + localBasePath, err := a.Client.Cfg.ServerURLWithContext(ctx, "v2.CaseManagementApi.UpdateStatus") if err != nil { return localVarReturnValue, nil, datadog.GenericOpenAPIError{ErrorMessage: err.Error()} } @@ -792,9 +1067,9 @@ func (a *CasesApi) UpdateStatus(ctx _context.Context, caseId string, body CaseUp return localVarReturnValue, localVarHTTPResponse, nil } -// NewCasesApi Returns NewCasesApi. -func NewCasesApi(client *datadog.APIClient) *CasesApi { - return &CasesApi{ +// NewCaseManagementApi Returns NewCaseManagementApi. +func NewCaseManagementApi(client *datadog.APIClient) *CaseManagementApi { + return &CaseManagementApi{ Client: client, } } diff --git a/api/datadogV2/api_cases_projects.go b/api/datadogV2/api_cases_projects.go deleted file mode 100644 index 67135edc08d..00000000000 --- a/api/datadogV2/api_cases_projects.go +++ /dev/null @@ -1,299 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2019-Present Datadog, Inc. - -package datadogV2 - -import ( - _context "context" - _nethttp "net/http" - _neturl "net/url" - "strings" - - "github.com/DataDog/datadog-api-client-go/v2/api/datadog" -) - -// CasesProjectsApi service type -type CasesProjectsApi datadog.Service - -// CreateProject Create a project. -// Create a project. -func (a *CasesProjectsApi) CreateProject(ctx _context.Context, body ProjectCreateRequest) (ProjectResponse, *_nethttp.Response, error) { - var ( - localVarHTTPMethod = _nethttp.MethodPost - localVarPostBody interface{} - localVarReturnValue ProjectResponse - ) - - localBasePath, err := a.Client.Cfg.ServerURLWithContext(ctx, "v2.CasesProjectsApi.CreateProject") - if err != nil { - return localVarReturnValue, nil, datadog.GenericOpenAPIError{ErrorMessage: err.Error()} - } - - localVarPath := localBasePath + "/api/v2/cases/projects" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := _neturl.Values{} - localVarFormParams := _neturl.Values{} - localVarHeaderParams["Content-Type"] = "application/json" - localVarHeaderParams["Accept"] = "application/json" - - // body params - localVarPostBody = &body - datadog.SetAuthKeys( - ctx, - &localVarHeaderParams, - [2]string{"apiKeyAuth", "DD-API-KEY"}, - [2]string{"appKeyAuth", "DD-APPLICATION-KEY"}, - ) - req, err := a.Client.PrepareRequest(ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, nil) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.Client.CallAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := datadog.ReadBody(localVarHTTPResponse) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := datadog.GenericOpenAPIError{ - ErrorBody: localVarBody, - ErrorMessage: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 400 || localVarHTTPResponse.StatusCode == 401 || localVarHTTPResponse.StatusCode == 403 || localVarHTTPResponse.StatusCode == 404 || localVarHTTPResponse.StatusCode == 429 { - var v APIErrorResponse - err = a.Client.Decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.ErrorModel = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.Client.Decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := datadog.GenericOpenAPIError{ - ErrorBody: localVarBody, - ErrorMessage: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -// DeleteProject Remove a project. -// Remove a project using the project's `id`. -func (a *CasesProjectsApi) DeleteProject(ctx _context.Context, projectId string) (*_nethttp.Response, error) { - var ( - localVarHTTPMethod = _nethttp.MethodDelete - localVarPostBody interface{} - ) - - localBasePath, err := a.Client.Cfg.ServerURLWithContext(ctx, "v2.CasesProjectsApi.DeleteProject") - if err != nil { - return nil, datadog.GenericOpenAPIError{ErrorMessage: err.Error()} - } - - localVarPath := localBasePath + "/api/v2/cases/projects/{project_id}" - localVarPath = strings.Replace(localVarPath, "{"+"project_id"+"}", _neturl.PathEscape(datadog.ParameterToString(projectId, "")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := _neturl.Values{} - localVarFormParams := _neturl.Values{} - localVarHeaderParams["Accept"] = "*/*" - - datadog.SetAuthKeys( - ctx, - &localVarHeaderParams, - [2]string{"apiKeyAuth", "DD-API-KEY"}, - [2]string{"appKeyAuth", "DD-APPLICATION-KEY"}, - ) - req, err := a.Client.PrepareRequest(ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, nil) - if err != nil { - return nil, err - } - - localVarHTTPResponse, err := a.Client.CallAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarHTTPResponse, err - } - - localVarBody, err := datadog.ReadBody(localVarHTTPResponse) - if err != nil { - return localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := datadog.GenericOpenAPIError{ - ErrorBody: localVarBody, - ErrorMessage: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 403 || localVarHTTPResponse.StatusCode == 404 || localVarHTTPResponse.StatusCode == 429 { - var v APIErrorResponse - err = a.Client.Decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - return localVarHTTPResponse, newErr - } - newErr.ErrorModel = v - } - return localVarHTTPResponse, newErr - } - - return localVarHTTPResponse, nil -} - -// GetProject Get the details of a project. -// Get the details of a project by `project_id`. -func (a *CasesProjectsApi) GetProject(ctx _context.Context, projectId string) (ProjectResponse, *_nethttp.Response, error) { - var ( - localVarHTTPMethod = _nethttp.MethodGet - localVarPostBody interface{} - localVarReturnValue ProjectResponse - ) - - localBasePath, err := a.Client.Cfg.ServerURLWithContext(ctx, "v2.CasesProjectsApi.GetProject") - if err != nil { - return localVarReturnValue, nil, datadog.GenericOpenAPIError{ErrorMessage: err.Error()} - } - - localVarPath := localBasePath + "/api/v2/cases/projects/{project_id}" - localVarPath = strings.Replace(localVarPath, "{"+"project_id"+"}", _neturl.PathEscape(datadog.ParameterToString(projectId, "")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := _neturl.Values{} - localVarFormParams := _neturl.Values{} - localVarHeaderParams["Accept"] = "application/json" - - datadog.SetAuthKeys( - ctx, - &localVarHeaderParams, - [2]string{"apiKeyAuth", "DD-API-KEY"}, - [2]string{"appKeyAuth", "DD-APPLICATION-KEY"}, - ) - req, err := a.Client.PrepareRequest(ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, nil) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.Client.CallAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := datadog.ReadBody(localVarHTTPResponse) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := datadog.GenericOpenAPIError{ - ErrorBody: localVarBody, - ErrorMessage: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 400 || localVarHTTPResponse.StatusCode == 401 || localVarHTTPResponse.StatusCode == 403 || localVarHTTPResponse.StatusCode == 404 || localVarHTTPResponse.StatusCode == 429 { - var v APIErrorResponse - err = a.Client.Decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.ErrorModel = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.Client.Decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := datadog.GenericOpenAPIError{ - ErrorBody: localVarBody, - ErrorMessage: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -// GetProjects Get all projects. -// Get all projects. -func (a *CasesProjectsApi) GetProjects(ctx _context.Context) (ProjectsResponse, *_nethttp.Response, error) { - var ( - localVarHTTPMethod = _nethttp.MethodGet - localVarPostBody interface{} - localVarReturnValue ProjectsResponse - ) - - localBasePath, err := a.Client.Cfg.ServerURLWithContext(ctx, "v2.CasesProjectsApi.GetProjects") - if err != nil { - return localVarReturnValue, nil, datadog.GenericOpenAPIError{ErrorMessage: err.Error()} - } - - localVarPath := localBasePath + "/api/v2/cases/projects" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := _neturl.Values{} - localVarFormParams := _neturl.Values{} - localVarHeaderParams["Accept"] = "application/json" - - datadog.SetAuthKeys( - ctx, - &localVarHeaderParams, - [2]string{"apiKeyAuth", "DD-API-KEY"}, - [2]string{"appKeyAuth", "DD-APPLICATION-KEY"}, - ) - req, err := a.Client.PrepareRequest(ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, nil) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.Client.CallAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := datadog.ReadBody(localVarHTTPResponse) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := datadog.GenericOpenAPIError{ - ErrorBody: localVarBody, - ErrorMessage: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 400 || localVarHTTPResponse.StatusCode == 401 || localVarHTTPResponse.StatusCode == 403 || localVarHTTPResponse.StatusCode == 404 || localVarHTTPResponse.StatusCode == 429 { - var v APIErrorResponse - err = a.Client.Decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.ErrorModel = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.Client.Decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := datadog.GenericOpenAPIError{ - ErrorBody: localVarBody, - ErrorMessage: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -// NewCasesProjectsApi Returns NewCasesProjectsApi. -func NewCasesProjectsApi(client *datadog.APIClient) *CasesProjectsApi { - return &CasesProjectsApi{ - Client: client, - } -} diff --git a/api/datadogV2/doc.go b/api/datadogV2/doc.go index cfed7b42245..db1f8eb48f8 100644 --- a/api/datadogV2/doc.go +++ b/api/datadogV2/doc.go @@ -27,19 +27,19 @@ // - [CIVisibilityTestsApi.AggregateCIAppTestEvents] // - [CIVisibilityTestsApi.ListCIAppTestEvents] // - [CIVisibilityTestsApi.SearchCIAppTestEvents] -// - [CasesApi.ArchiveCase] -// - [CasesApi.AssignCase] -// - [CasesApi.CreateCase] -// - [CasesApi.GetCase] -// - [CasesApi.SearchCases] -// - [CasesApi.UnarchiveCase] -// - [CasesApi.UnassignCase] -// - [CasesApi.UpdatePriority] -// - [CasesApi.UpdateStatus] -// - [CasesProjectsApi.CreateProject] -// - [CasesProjectsApi.DeleteProject] -// - [CasesProjectsApi.GetProject] -// - [CasesProjectsApi.GetProjects] +// - [CaseManagementApi.ArchiveCase] +// - [CaseManagementApi.AssignCase] +// - [CaseManagementApi.CreateCase] +// - [CaseManagementApi.CreateProject] +// - [CaseManagementApi.DeleteProject] +// - [CaseManagementApi.GetCase] +// - [CaseManagementApi.GetProject] +// - [CaseManagementApi.GetProjects] +// - [CaseManagementApi.SearchCases] +// - [CaseManagementApi.UnarchiveCase] +// - [CaseManagementApi.UnassignCase] +// - [CaseManagementApi.UpdatePriority] +// - [CaseManagementApi.UpdateStatus] // - [CloudCostManagementApi.CreateCostAWSCURConfig] // - [CloudCostManagementApi.CreateCostAzureUCConfigs] // - [CloudCostManagementApi.DeleteCostAWSCURConfig] diff --git a/examples/v2/cases/ArchiveCase.go b/examples/v2/case-management/ArchiveCase.go similarity index 76% rename from examples/v2/cases/ArchiveCase.go rename to examples/v2/case-management/ArchiveCase.go index d90469d39fb..87819e69199 100644 --- a/examples/v2/cases/ArchiveCase.go +++ b/examples/v2/case-management/ArchiveCase.go @@ -24,14 +24,14 @@ func main() { ctx := datadog.NewDefaultContext(context.Background()) configuration := datadog.NewConfiguration() apiClient := datadog.NewAPIClient(configuration) - api := datadogV2.NewCasesApi(apiClient) + api := datadogV2.NewCaseManagementApi(apiClient) resp, r, err := api.ArchiveCase(ctx, CaseID, body) if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `CasesApi.ArchiveCase`: %v\n", err) + fmt.Fprintf(os.Stderr, "Error when calling `CaseManagementApi.ArchiveCase`: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } responseContent, _ := json.MarshalIndent(resp, "", " ") - fmt.Fprintf(os.Stdout, "Response from `CasesApi.ArchiveCase`:\n%s\n", responseContent) + fmt.Fprintf(os.Stdout, "Response from `CaseManagementApi.ArchiveCase`:\n%s\n", responseContent) } diff --git a/examples/v2/cases/AssignCase.go b/examples/v2/case-management/AssignCase.go similarity index 79% rename from examples/v2/cases/AssignCase.go rename to examples/v2/case-management/AssignCase.go index 045c00f10c0..9e8c7d47c02 100644 --- a/examples/v2/cases/AssignCase.go +++ b/examples/v2/case-management/AssignCase.go @@ -30,14 +30,14 @@ func main() { ctx := datadog.NewDefaultContext(context.Background()) configuration := datadog.NewConfiguration() apiClient := datadog.NewAPIClient(configuration) - api := datadogV2.NewCasesApi(apiClient) + api := datadogV2.NewCaseManagementApi(apiClient) resp, r, err := api.AssignCase(ctx, CaseID, body) if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `CasesApi.AssignCase`: %v\n", err) + fmt.Fprintf(os.Stderr, "Error when calling `CaseManagementApi.AssignCase`: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } responseContent, _ := json.MarshalIndent(resp, "", " ") - fmt.Fprintf(os.Stdout, "Response from `CasesApi.AssignCase`:\n%s\n", responseContent) + fmt.Fprintf(os.Stdout, "Response from `CaseManagementApi.AssignCase`:\n%s\n", responseContent) } diff --git a/examples/v2/cases/CreateCase.go b/examples/v2/case-management/CreateCase.go similarity index 83% rename from examples/v2/cases/CreateCase.go rename to examples/v2/case-management/CreateCase.go index 065e2c001b2..becb845f488 100644 --- a/examples/v2/cases/CreateCase.go +++ b/examples/v2/case-management/CreateCase.go @@ -20,7 +20,7 @@ func main() { Data: datadogV2.CaseCreate{ Attributes: datadogV2.CaseCreateAttributes{ Priority: datadogV2.CASEPRIORITY_NOT_DEFINED.Ptr(), - Title: "Security breach investigation in 3dcc5b2ebf9bfb8f", + Title: "Security breach investigation in 0cfbc5cbc676ee71", Type: datadogV2.CASETYPE_STANDARD, }, Relationships: &datadogV2.CaseCreateRelationships{ @@ -43,14 +43,14 @@ func main() { ctx := datadog.NewDefaultContext(context.Background()) configuration := datadog.NewConfiguration() apiClient := datadog.NewAPIClient(configuration) - api := datadogV2.NewCasesApi(apiClient) + api := datadogV2.NewCaseManagementApi(apiClient) resp, r, err := api.CreateCase(ctx, body) if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `CasesApi.CreateCase`: %v\n", err) + fmt.Fprintf(os.Stderr, "Error when calling `CaseManagementApi.CreateCase`: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } responseContent, _ := json.MarshalIndent(resp, "", " ") - fmt.Fprintf(os.Stdout, "Response from `CasesApi.CreateCase`:\n%s\n", responseContent) + fmt.Fprintf(os.Stdout, "Response from `CaseManagementApi.CreateCase`:\n%s\n", responseContent) } diff --git a/examples/v2/cases-projects/CreateProject.go b/examples/v2/case-management/CreateProject.go similarity index 77% rename from examples/v2/cases-projects/CreateProject.go rename to examples/v2/case-management/CreateProject.go index 05484d97add..97f7e714829 100644 --- a/examples/v2/cases-projects/CreateProject.go +++ b/examples/v2/case-management/CreateProject.go @@ -25,14 +25,14 @@ func main() { ctx := datadog.NewDefaultContext(context.Background()) configuration := datadog.NewConfiguration() apiClient := datadog.NewAPIClient(configuration) - api := datadogV2.NewCasesProjectsApi(apiClient) + api := datadogV2.NewCaseManagementApi(apiClient) resp, r, err := api.CreateProject(ctx, body) if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `CasesProjectsApi.CreateProject`: %v\n", err) + fmt.Fprintf(os.Stderr, "Error when calling `CaseManagementApi.CreateProject`: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } responseContent, _ := json.MarshalIndent(resp, "", " ") - fmt.Fprintf(os.Stdout, "Response from `CasesProjectsApi.CreateProject`:\n%s\n", responseContent) + fmt.Fprintf(os.Stdout, "Response from `CaseManagementApi.CreateProject`:\n%s\n", responseContent) } diff --git a/examples/v2/cases-projects/DeleteProject.go b/examples/v2/case-management/DeleteProject.go similarity index 78% rename from examples/v2/cases-projects/DeleteProject.go rename to examples/v2/case-management/DeleteProject.go index 243537a767d..3d7753a7dcf 100644 --- a/examples/v2/cases-projects/DeleteProject.go +++ b/examples/v2/case-management/DeleteProject.go @@ -15,11 +15,11 @@ func main() { ctx := datadog.NewDefaultContext(context.Background()) configuration := datadog.NewConfiguration() apiClient := datadog.NewAPIClient(configuration) - api := datadogV2.NewCasesProjectsApi(apiClient) + api := datadogV2.NewCaseManagementApi(apiClient) r, err := api.DeleteProject(ctx, "project_id") if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `CasesProjectsApi.DeleteProject`: %v\n", err) + fmt.Fprintf(os.Stderr, "Error when calling `CaseManagementApi.DeleteProject`: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } } diff --git a/examples/v2/cases/GetCase.go b/examples/v2/case-management/GetCase.go similarity index 74% rename from examples/v2/cases/GetCase.go rename to examples/v2/case-management/GetCase.go index 070b92608c3..058aa55c33b 100644 --- a/examples/v2/cases/GetCase.go +++ b/examples/v2/case-management/GetCase.go @@ -19,14 +19,14 @@ func main() { ctx := datadog.NewDefaultContext(context.Background()) configuration := datadog.NewConfiguration() apiClient := datadog.NewAPIClient(configuration) - api := datadogV2.NewCasesApi(apiClient) + api := datadogV2.NewCaseManagementApi(apiClient) resp, r, err := api.GetCase(ctx, CaseID) if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `CasesApi.GetCase`: %v\n", err) + fmt.Fprintf(os.Stderr, "Error when calling `CaseManagementApi.GetCase`: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } responseContent, _ := json.MarshalIndent(resp, "", " ") - fmt.Fprintf(os.Stdout, "Response from `CasesApi.GetCase`:\n%s\n", responseContent) + fmt.Fprintf(os.Stdout, "Response from `CaseManagementApi.GetCase`:\n%s\n", responseContent) } diff --git a/examples/v2/cases-projects/GetProject.go b/examples/v2/case-management/GetProject.go similarity index 71% rename from examples/v2/cases-projects/GetProject.go rename to examples/v2/case-management/GetProject.go index d33b7d87820..32b19b1b58c 100644 --- a/examples/v2/cases-projects/GetProject.go +++ b/examples/v2/case-management/GetProject.go @@ -16,14 +16,14 @@ func main() { ctx := datadog.NewDefaultContext(context.Background()) configuration := datadog.NewConfiguration() apiClient := datadog.NewAPIClient(configuration) - api := datadogV2.NewCasesProjectsApi(apiClient) + api := datadogV2.NewCaseManagementApi(apiClient) resp, r, err := api.GetProject(ctx, "project_id") if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `CasesProjectsApi.GetProject`: %v\n", err) + fmt.Fprintf(os.Stderr, "Error when calling `CaseManagementApi.GetProject`: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } responseContent, _ := json.MarshalIndent(resp, "", " ") - fmt.Fprintf(os.Stdout, "Response from `CasesProjectsApi.GetProject`:\n%s\n", responseContent) + fmt.Fprintf(os.Stdout, "Response from `CaseManagementApi.GetProject`:\n%s\n", responseContent) } diff --git a/examples/v2/cases-projects/GetProjects.go b/examples/v2/case-management/GetProjects.go similarity index 70% rename from examples/v2/cases-projects/GetProjects.go rename to examples/v2/case-management/GetProjects.go index da17cfbdc52..ab1038c91b5 100644 --- a/examples/v2/cases-projects/GetProjects.go +++ b/examples/v2/case-management/GetProjects.go @@ -16,14 +16,14 @@ func main() { ctx := datadog.NewDefaultContext(context.Background()) configuration := datadog.NewConfiguration() apiClient := datadog.NewAPIClient(configuration) - api := datadogV2.NewCasesProjectsApi(apiClient) + api := datadogV2.NewCaseManagementApi(apiClient) resp, r, err := api.GetProjects(ctx) if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `CasesProjectsApi.GetProjects`: %v\n", err) + fmt.Fprintf(os.Stderr, "Error when calling `CaseManagementApi.GetProjects`: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } responseContent, _ := json.MarshalIndent(resp, "", " ") - fmt.Fprintf(os.Stdout, "Response from `CasesProjectsApi.GetProjects`:\n%s\n", responseContent) + fmt.Fprintf(os.Stdout, "Response from `CaseManagementApi.GetProjects`:\n%s\n", responseContent) } diff --git a/examples/v2/cases/SearchCases.go b/examples/v2/case-management/SearchCases.go similarity index 72% rename from examples/v2/cases/SearchCases.go rename to examples/v2/case-management/SearchCases.go index 352d168ad91..618aff4ae88 100644 --- a/examples/v2/cases/SearchCases.go +++ b/examples/v2/case-management/SearchCases.go @@ -16,14 +16,14 @@ func main() { ctx := datadog.NewDefaultContext(context.Background()) configuration := datadog.NewConfiguration() apiClient := datadog.NewAPIClient(configuration) - api := datadogV2.NewCasesApi(apiClient) + api := datadogV2.NewCaseManagementApi(apiClient) resp, r, err := api.SearchCases(ctx, *datadogV2.NewSearchCasesOptionalParameters()) if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `CasesApi.SearchCases`: %v\n", err) + fmt.Fprintf(os.Stderr, "Error when calling `CaseManagementApi.SearchCases`: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } responseContent, _ := json.MarshalIndent(resp, "", " ") - fmt.Fprintf(os.Stdout, "Response from `CasesApi.SearchCases`:\n%s\n", responseContent) + fmt.Fprintf(os.Stdout, "Response from `CaseManagementApi.SearchCases`:\n%s\n", responseContent) } diff --git a/examples/v2/cases/SearchCases_3433960044.go b/examples/v2/case-management/SearchCases_3433960044.go similarity index 81% rename from examples/v2/cases/SearchCases_3433960044.go rename to examples/v2/case-management/SearchCases_3433960044.go index 6add1e4b2fa..aa3abe94d82 100644 --- a/examples/v2/cases/SearchCases_3433960044.go +++ b/examples/v2/case-management/SearchCases_3433960044.go @@ -16,12 +16,12 @@ func main() { ctx := datadog.NewDefaultContext(context.Background()) configuration := datadog.NewConfiguration() apiClient := datadog.NewAPIClient(configuration) - api := datadogV2.NewCasesApi(apiClient) + api := datadogV2.NewCaseManagementApi(apiClient) resp, _ := api.SearchCasesWithPagination(ctx, *datadogV2.NewSearchCasesOptionalParameters()) for paginationResult := range resp { if paginationResult.Error != nil { - fmt.Fprintf(os.Stderr, "Error when calling `CasesApi.SearchCases`: %v\n", paginationResult.Error) + fmt.Fprintf(os.Stderr, "Error when calling `CaseManagementApi.SearchCases`: %v\n", paginationResult.Error) } responseContent, _ := json.MarshalIndent(paginationResult.Item, "", " ") fmt.Fprintf(os.Stdout, "%s\n", responseContent) diff --git a/examples/v2/cases/UnarchiveCase.go b/examples/v2/case-management/UnarchiveCase.go similarity index 76% rename from examples/v2/cases/UnarchiveCase.go rename to examples/v2/case-management/UnarchiveCase.go index c839b0e7030..ed2bff3f64e 100644 --- a/examples/v2/cases/UnarchiveCase.go +++ b/examples/v2/case-management/UnarchiveCase.go @@ -24,14 +24,14 @@ func main() { ctx := datadog.NewDefaultContext(context.Background()) configuration := datadog.NewConfiguration() apiClient := datadog.NewAPIClient(configuration) - api := datadogV2.NewCasesApi(apiClient) + api := datadogV2.NewCaseManagementApi(apiClient) resp, r, err := api.UnarchiveCase(ctx, CaseID, body) if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `CasesApi.UnarchiveCase`: %v\n", err) + fmt.Fprintf(os.Stderr, "Error when calling `CaseManagementApi.UnarchiveCase`: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } responseContent, _ := json.MarshalIndent(resp, "", " ") - fmt.Fprintf(os.Stdout, "Response from `CasesApi.UnarchiveCase`:\n%s\n", responseContent) + fmt.Fprintf(os.Stdout, "Response from `CaseManagementApi.UnarchiveCase`:\n%s\n", responseContent) } diff --git a/examples/v2/cases/UnassignCase.go b/examples/v2/case-management/UnassignCase.go similarity index 76% rename from examples/v2/cases/UnassignCase.go rename to examples/v2/case-management/UnassignCase.go index 9df3f287dfc..9b9d1578294 100644 --- a/examples/v2/cases/UnassignCase.go +++ b/examples/v2/case-management/UnassignCase.go @@ -24,14 +24,14 @@ func main() { ctx := datadog.NewDefaultContext(context.Background()) configuration := datadog.NewConfiguration() apiClient := datadog.NewAPIClient(configuration) - api := datadogV2.NewCasesApi(apiClient) + api := datadogV2.NewCaseManagementApi(apiClient) resp, r, err := api.UnassignCase(ctx, CaseID, body) if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `CasesApi.UnassignCase`: %v\n", err) + fmt.Fprintf(os.Stderr, "Error when calling `CaseManagementApi.UnassignCase`: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } responseContent, _ := json.MarshalIndent(resp, "", " ") - fmt.Fprintf(os.Stdout, "Response from `CasesApi.UnassignCase`:\n%s\n", responseContent) + fmt.Fprintf(os.Stdout, "Response from `CaseManagementApi.UnassignCase`:\n%s\n", responseContent) } diff --git a/examples/v2/cases/UpdatePriority.go b/examples/v2/case-management/UpdatePriority.go similarity index 78% rename from examples/v2/cases/UpdatePriority.go rename to examples/v2/case-management/UpdatePriority.go index 91ea5718be1..896a609163b 100644 --- a/examples/v2/cases/UpdatePriority.go +++ b/examples/v2/case-management/UpdatePriority.go @@ -27,14 +27,14 @@ func main() { ctx := datadog.NewDefaultContext(context.Background()) configuration := datadog.NewConfiguration() apiClient := datadog.NewAPIClient(configuration) - api := datadogV2.NewCasesApi(apiClient) + api := datadogV2.NewCaseManagementApi(apiClient) resp, r, err := api.UpdatePriority(ctx, CaseID, body) if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `CasesApi.UpdatePriority`: %v\n", err) + fmt.Fprintf(os.Stderr, "Error when calling `CaseManagementApi.UpdatePriority`: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } responseContent, _ := json.MarshalIndent(resp, "", " ") - fmt.Fprintf(os.Stdout, "Response from `CasesApi.UpdatePriority`:\n%s\n", responseContent) + fmt.Fprintf(os.Stdout, "Response from `CaseManagementApi.UpdatePriority`:\n%s\n", responseContent) } diff --git a/examples/v2/cases/UpdateStatus.go b/examples/v2/case-management/UpdateStatus.go similarity index 78% rename from examples/v2/cases/UpdateStatus.go rename to examples/v2/case-management/UpdateStatus.go index c62be07044e..c136e8b9e17 100644 --- a/examples/v2/cases/UpdateStatus.go +++ b/examples/v2/case-management/UpdateStatus.go @@ -27,14 +27,14 @@ func main() { ctx := datadog.NewDefaultContext(context.Background()) configuration := datadog.NewConfiguration() apiClient := datadog.NewAPIClient(configuration) - api := datadogV2.NewCasesApi(apiClient) + api := datadogV2.NewCaseManagementApi(apiClient) resp, r, err := api.UpdateStatus(ctx, CaseID, body) if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `CasesApi.UpdateStatus`: %v\n", err) + fmt.Fprintf(os.Stderr, "Error when calling `CaseManagementApi.UpdateStatus`: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } responseContent, _ := json.MarshalIndent(resp, "", " ") - fmt.Fprintf(os.Stdout, "Response from `CasesApi.UpdateStatus`:\n%s\n", responseContent) + fmt.Fprintf(os.Stdout, "Response from `CaseManagementApi.UpdateStatus`:\n%s\n", responseContent) } diff --git a/tests/scenarios/api_mappings.go b/tests/scenarios/api_mappings.go index 68ebd0af853..905c587e251 100644 --- a/tests/scenarios/api_mappings.go +++ b/tests/scenarios/api_mappings.go @@ -50,8 +50,7 @@ var apiMappings = map[string]map[string]reflect.Value{ "APMRetentionFiltersApi": reflect.ValueOf(datadogV2.NewAPMRetentionFiltersApi), "AuditApi": reflect.ValueOf(datadogV2.NewAuditApi), "AuthNMappingsApi": reflect.ValueOf(datadogV2.NewAuthNMappingsApi), - "CasesApi": reflect.ValueOf(datadogV2.NewCasesApi), - "CasesProjectsApi": reflect.ValueOf(datadogV2.NewCasesProjectsApi), + "CaseManagementApi": reflect.ValueOf(datadogV2.NewCaseManagementApi), "CIVisibilityPipelinesApi": reflect.ValueOf(datadogV2.NewCIVisibilityPipelinesApi), "CIVisibilityTestsApi": reflect.ValueOf(datadogV2.NewCIVisibilityTestsApi), "ContainerImagesApi": reflect.ValueOf(datadogV2.NewContainerImagesApi), diff --git a/tests/scenarios/cassettes/TestScenarios/v2/Feature_Case_Management/Scenario_Archive_case_returns_Bad_Request_response.freeze b/tests/scenarios/cassettes/TestScenarios/v2/Feature_Case_Management/Scenario_Archive_case_returns_Bad_Request_response.freeze new file mode 100644 index 00000000000..02ebd0b9106 --- /dev/null +++ b/tests/scenarios/cassettes/TestScenarios/v2/Feature_Case_Management/Scenario_Archive_case_returns_Bad_Request_response.freeze @@ -0,0 +1 @@ +2024-02-14T18:55:15.159Z \ No newline at end of file diff --git a/tests/scenarios/cassettes/TestScenarios/v2/Feature_Cases/Scenario_Archive_case_returns_Bad_Request_response.yaml b/tests/scenarios/cassettes/TestScenarios/v2/Feature_Case_Management/Scenario_Archive_case_returns_Bad_Request_response.yaml similarity index 64% rename from tests/scenarios/cassettes/TestScenarios/v2/Feature_Cases/Scenario_Archive_case_returns_Bad_Request_response.yaml rename to tests/scenarios/cassettes/TestScenarios/v2/Feature_Case_Management/Scenario_Archive_case_returns_Bad_Request_response.yaml index 6226f0fd52d..4ed8a462d95 100644 --- a/tests/scenarios/cassettes/TestScenarios/v2/Feature_Cases/Scenario_Archive_case_returns_Bad_Request_response.yaml +++ b/tests/scenarios/cassettes/TestScenarios/v2/Feature_Case_Management/Scenario_Archive_case_returns_Bad_Request_response.yaml @@ -12,9 +12,8 @@ interactions: method: POST url: https://api.datadoghq.com/api/v2/cases response: - body: '{"data":{"id":"1f205230-5ea9-444e-a5f9-48f93d6a2cde","type":"case","attributes":{"attributes":{},"created_at":"2024-02-07T18:00:36.54518451Z","creation_source":"MANUAL","description":"","insights":[],"internal_id":"1f205230-5ea9-444e-a5f9-48f93d6a2cde","key":"DDFC-2","priority":"P4","public_id":"62","status":"OPEN","title":"My - new case","type":"STANDARD"},"relationships":{"created_by":{"data":{"id":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","type":"user"}},"project":{"data":{"id":"d4bbe1af-f36e-42f1-87c1-493ca35c320e","type":"project"}}}},"included":[{"id":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","type":"user","attributes":{"email":"team-intg-tools-libs-spam@datadoghq.com","handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI - Account"}}]}' + body: '{"data":{"id":"4e49aede-4c04-42d3-b5bc-f8eb4c1340df","type":"case","attributes":{"attributes":{},"created_at":"2024-02-14T18:55:15.280494299Z","creation_source":"MANUAL","description":"","insights":[],"internal_id":"4e49aede-4c04-42d3-b5bc-f8eb4c1340df","key":"DDFC-182","priority":"P4","public_id":"242","status":"OPEN","title":"My + new case","type":"STANDARD"},"relationships":{"created_by":{"data":{"id":"3ad549bf-eba0-11e9-a77a-0705486660d0","type":"user"}},"project":{"data":{"id":"d4bbe1af-f36e-42f1-87c1-493ca35c320e","type":"project"}}}},"included":[{"id":"3ad549bf-eba0-11e9-a77a-0705486660d0","type":"user","attributes":{"email":"frog@datadoghq.com","handle":"frog@datadoghq.com","name":""}}]}' code: 201 duration: 0ms headers: @@ -32,7 +31,7 @@ interactions: - application/json id: 1 method: POST - url: https://api.datadoghq.com/api/v2/cases/1f205230-5ea9-444e-a5f9-48f93d6a2cde/archive + url: https://api.datadoghq.com/api/v2/cases/4e49aede-4c04-42d3-b5bc-f8eb4c1340df/archive response: body: '{"errors":[{"status":"400","title":"Bad Request","detail":"got type \"project\" expected one of \"case\""}]}' diff --git a/tests/scenarios/cassettes/TestScenarios/v2/Feature_Case_Management/Scenario_Archive_case_returns_Not_Found_response.freeze b/tests/scenarios/cassettes/TestScenarios/v2/Feature_Case_Management/Scenario_Archive_case_returns_Not_Found_response.freeze new file mode 100644 index 00000000000..16674248e30 --- /dev/null +++ b/tests/scenarios/cassettes/TestScenarios/v2/Feature_Case_Management/Scenario_Archive_case_returns_Not_Found_response.freeze @@ -0,0 +1 @@ +2024-02-14T18:55:15.378Z \ No newline at end of file diff --git a/tests/scenarios/cassettes/TestScenarios/v2/Feature_Cases/Scenario_Archive_case_returns_Not_Found_response.yaml b/tests/scenarios/cassettes/TestScenarios/v2/Feature_Case_Management/Scenario_Archive_case_returns_Not_Found_response.yaml similarity index 100% rename from tests/scenarios/cassettes/TestScenarios/v2/Feature_Cases/Scenario_Archive_case_returns_Not_Found_response.yaml rename to tests/scenarios/cassettes/TestScenarios/v2/Feature_Case_Management/Scenario_Archive_case_returns_Not_Found_response.yaml diff --git a/tests/scenarios/cassettes/TestScenarios/v2/Feature_Case_Management/Scenario_Archive_case_returns_OK_response.freeze b/tests/scenarios/cassettes/TestScenarios/v2/Feature_Case_Management/Scenario_Archive_case_returns_OK_response.freeze new file mode 100644 index 00000000000..f8ce6d98bba --- /dev/null +++ b/tests/scenarios/cassettes/TestScenarios/v2/Feature_Case_Management/Scenario_Archive_case_returns_OK_response.freeze @@ -0,0 +1 @@ +2024-02-14T18:55:15.466Z \ No newline at end of file diff --git a/tests/scenarios/cassettes/TestScenarios/v2/Feature_Case_Management/Scenario_Archive_case_returns_OK_response.yaml b/tests/scenarios/cassettes/TestScenarios/v2/Feature_Case_Management/Scenario_Archive_case_returns_OK_response.yaml new file mode 100644 index 00000000000..2570b31aa41 --- /dev/null +++ b/tests/scenarios/cassettes/TestScenarios/v2/Feature_Case_Management/Scenario_Archive_case_returns_OK_response.yaml @@ -0,0 +1,44 @@ +interactions: +- request: + body: | + {"data":{"attributes":{"priority":"P4","title":"My new case","type":"STANDARD"},"relationships":{"project":{"data":{"id":"d4bbe1af-f36e-42f1-87c1-493ca35c320e","type":"project"}}},"type":"case"}} + form: {} + headers: + Accept: + - application/json + Content-Type: + - application/json + id: 0 + method: POST + url: https://api.datadoghq.com/api/v2/cases + response: + body: '{"data":{"id":"3752309b-6a77-4015-845a-02ff88647b4b","type":"case","attributes":{"attributes":{},"created_at":"2024-02-14T18:55:15.546103234Z","creation_source":"MANUAL","description":"","insights":[],"internal_id":"3752309b-6a77-4015-845a-02ff88647b4b","key":"DDFC-183","priority":"P4","public_id":"243","status":"OPEN","title":"My + new case","type":"STANDARD"},"relationships":{"created_by":{"data":{"id":"3ad549bf-eba0-11e9-a77a-0705486660d0","type":"user"}},"project":{"data":{"id":"d4bbe1af-f36e-42f1-87c1-493ca35c320e","type":"project"}}}},"included":[{"id":"3ad549bf-eba0-11e9-a77a-0705486660d0","type":"user","attributes":{"email":"frog@datadoghq.com","handle":"frog@datadoghq.com","name":""}}]}' + code: 201 + duration: 0ms + headers: + Content-Type: + - application/vnd.api+json + status: 201 Created +- request: + body: | + {"data":{"type":"case"}} + form: {} + headers: + Accept: + - application/json + Content-Type: + - application/json + id: 1 + method: POST + url: https://api.datadoghq.com/api/v2/cases/3752309b-6a77-4015-845a-02ff88647b4b/archive + response: + body: '{"data":{"id":"3752309b-6a77-4015-845a-02ff88647b4b","type":"case","attributes":{"archived_at":"2024-02-14T18:55:15.641594121Z","attributes":{},"created_at":"2024-02-14T18:55:15.546103Z","creation_source":"MANUAL","description":"","insights":[],"internal_id":"3752309b-6a77-4015-845a-02ff88647b4b","key":"DDFC-183","priority":"P4","public_id":"243","status":"OPEN","title":"My + new case","type":"STANDARD"},"relationships":{"created_by":{"data":{"id":"3ad549bf-eba0-11e9-a77a-0705486660d0","type":"user"}},"modified_by":{"data":{"id":"3ad549bf-eba0-11e9-a77a-0705486660d0","type":"user"}},"project":{"data":{"id":"d4bbe1af-f36e-42f1-87c1-493ca35c320e","type":"project"}}}},"included":[{"id":"3ad549bf-eba0-11e9-a77a-0705486660d0","type":"user","attributes":{"email":"frog@datadoghq.com","handle":"frog@datadoghq.com","name":""}}]}' + code: 200 + duration: 0ms + headers: + Content-Type: + - application/vnd.api+json + status: 200 OK +version: 2 diff --git a/tests/scenarios/cassettes/TestScenarios/v2/Feature_Case_Management/Scenario_Assign_case_returns_Bad_Request_response.freeze b/tests/scenarios/cassettes/TestScenarios/v2/Feature_Case_Management/Scenario_Assign_case_returns_Bad_Request_response.freeze new file mode 100644 index 00000000000..2749371a9b7 --- /dev/null +++ b/tests/scenarios/cassettes/TestScenarios/v2/Feature_Case_Management/Scenario_Assign_case_returns_Bad_Request_response.freeze @@ -0,0 +1 @@ +2024-02-14T18:55:15.651Z \ No newline at end of file diff --git a/tests/scenarios/cassettes/TestScenarios/v2/Feature_Cases/Scenario_Assign_case_returns_Bad_Request_response.yaml b/tests/scenarios/cassettes/TestScenarios/v2/Feature_Case_Management/Scenario_Assign_case_returns_Bad_Request_response.yaml similarity index 66% rename from tests/scenarios/cassettes/TestScenarios/v2/Feature_Cases/Scenario_Assign_case_returns_Bad_Request_response.yaml rename to tests/scenarios/cassettes/TestScenarios/v2/Feature_Case_Management/Scenario_Assign_case_returns_Bad_Request_response.yaml index ecac977f96a..d1995a3ffe6 100644 --- a/tests/scenarios/cassettes/TestScenarios/v2/Feature_Cases/Scenario_Assign_case_returns_Bad_Request_response.yaml +++ b/tests/scenarios/cassettes/TestScenarios/v2/Feature_Case_Management/Scenario_Assign_case_returns_Bad_Request_response.yaml @@ -12,9 +12,8 @@ interactions: method: POST url: https://api.datadoghq.com/api/v2/cases response: - body: '{"data":{"id":"4039be1a-5f87-4666-b986-a8396c0225c3","type":"case","attributes":{"attributes":{},"created_at":"2024-02-12T13:25:56.280897807Z","creation_source":"MANUAL","description":"","insights":[],"internal_id":"4039be1a-5f87-4666-b986-a8396c0225c3","key":"DDFC-17","priority":"P4","public_id":"77","status":"OPEN","title":"My - new case","type":"STANDARD"},"relationships":{"created_by":{"data":{"id":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","type":"user"}},"project":{"data":{"id":"d4bbe1af-f36e-42f1-87c1-493ca35c320e","type":"project"}}}},"included":[{"id":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","type":"user","attributes":{"email":"team-intg-tools-libs-spam@datadoghq.com","handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI - Account"}}]}' + body: '{"data":{"id":"cf2e3b59-d504-4714-9853-38e4ceddb858","type":"case","attributes":{"attributes":{},"created_at":"2024-02-14T18:55:15.728783622Z","creation_source":"MANUAL","description":"","insights":[],"internal_id":"cf2e3b59-d504-4714-9853-38e4ceddb858","key":"DDFC-184","priority":"P4","public_id":"244","status":"OPEN","title":"My + new case","type":"STANDARD"},"relationships":{"created_by":{"data":{"id":"3ad549bf-eba0-11e9-a77a-0705486660d0","type":"user"}},"project":{"data":{"id":"d4bbe1af-f36e-42f1-87c1-493ca35c320e","type":"project"}}}},"included":[{"id":"3ad549bf-eba0-11e9-a77a-0705486660d0","type":"user","attributes":{"email":"frog@datadoghq.com","handle":"frog@datadoghq.com","name":""}}]}' code: 201 duration: 0ms headers: @@ -32,7 +31,7 @@ interactions: - application/json id: 1 method: POST - url: https://api.datadoghq.com/api/v2/cases/4039be1a-5f87-4666-b986-a8396c0225c3/assign + url: https://api.datadoghq.com/api/v2/cases/cf2e3b59-d504-4714-9853-38e4ceddb858/assign response: body: '{"errors":[{"code":"invalid_command","title":"error when validating input command: ''assigneeid'' field must be an uuid","meta":{"entity":"assigneeid","rule":"uuid"}}]}' diff --git a/tests/scenarios/cassettes/TestScenarios/v2/Feature_Case_Management/Scenario_Assign_case_returns_Not_Found_response.freeze b/tests/scenarios/cassettes/TestScenarios/v2/Feature_Case_Management/Scenario_Assign_case_returns_Not_Found_response.freeze new file mode 100644 index 00000000000..dac002f7f37 --- /dev/null +++ b/tests/scenarios/cassettes/TestScenarios/v2/Feature_Case_Management/Scenario_Assign_case_returns_Not_Found_response.freeze @@ -0,0 +1 @@ +2024-02-14T18:55:15.832Z \ No newline at end of file diff --git a/tests/scenarios/cassettes/TestScenarios/v2/Feature_Cases/Scenario_Assign_case_returns_Not_Found_response.yaml b/tests/scenarios/cassettes/TestScenarios/v2/Feature_Case_Management/Scenario_Assign_case_returns_Not_Found_response.yaml similarity index 66% rename from tests/scenarios/cassettes/TestScenarios/v2/Feature_Cases/Scenario_Assign_case_returns_Not_Found_response.yaml rename to tests/scenarios/cassettes/TestScenarios/v2/Feature_Case_Management/Scenario_Assign_case_returns_Not_Found_response.yaml index 8ed4e31f2f0..7575df7c56f 100644 --- a/tests/scenarios/cassettes/TestScenarios/v2/Feature_Cases/Scenario_Assign_case_returns_Not_Found_response.yaml +++ b/tests/scenarios/cassettes/TestScenarios/v2/Feature_Case_Management/Scenario_Assign_case_returns_Not_Found_response.yaml @@ -1,7 +1,7 @@ interactions: - request: body: | - {"data":{"attributes":{"email":"Test-Assign_case_returns_Not_Found_response-1707311348@datadoghq.com","title":"user title"},"type":"users"}} + {"data":{"attributes":{"email":"Test-Assign_case_returns_Not_Found_response-1707936915@datadoghq.com","title":"user title"},"type":"users"}} form: {} headers: Accept: @@ -12,7 +12,7 @@ interactions: method: POST url: https://api.datadoghq.com/api/v2/users response: - body: '{"data":{"type":"users","id":"14040f89-c5ba-11ee-87b5-f6892353f87d","attributes":{"name":null,"handle":"test-assign_case_returns_not_found_response-1707311348@datadoghq.com","created_at":"2024-02-07T13:09:08.546371+00:00","modified_at":"2024-02-07T13:09:08.546371+00:00","email":"test-assign_case_returns_not_found_response-1707311348@datadoghq.com","icon":"https://secure.gravatar.com/avatar/e0a6ed9703a1166a2c07bca15e37d0d6?s=48&d=retro","title":"user + body: '{"data":{"type":"users","id":"9740b08d-cb6a-11ee-8bd8-2a1a3c7b5bdd","attributes":{"name":null,"handle":"test-assign_case_returns_not_found_response-1707936915@datadoghq.com","created_at":"2024-02-14T18:55:15.963542+00:00","modified_at":"2024-02-14T18:55:15.963542+00:00","email":"test-assign_case_returns_not_found_response-1707936915@datadoghq.com","icon":"https://secure.gravatar.com/avatar/379ecb2d1d9ca2e9ce66fa109609c256?s=48&d=retro","title":"user title","verified":false,"service_account":false,"disabled":false,"allowed_login_methods":[],"status":"Pending"},"relationships":{"roles":{"data":[]},"org":{"data":{"type":"orgs","id":"4dee724d-00cc-11ea-a77b-570c9d03c6c5"}}}}} ' @@ -24,7 +24,7 @@ interactions: status: 201 Created - request: body: | - {"data":{"attributes":{"assignee_id":"14040f89-c5ba-11ee-87b5-f6892353f87d"},"type":"case"}} + {"data":{"attributes":{"assignee_id":"9740b08d-cb6a-11ee-8bd8-2a1a3c7b5bdd"},"type":"case"}} form: {} headers: Accept: @@ -50,7 +50,7 @@ interactions: - '*/*' id: 2 method: DELETE - url: https://api.datadoghq.com/api/v2/users/14040f89-c5ba-11ee-87b5-f6892353f87d + url: https://api.datadoghq.com/api/v2/users/9740b08d-cb6a-11ee-8bd8-2a1a3c7b5bdd response: body: '' code: 204 diff --git a/tests/scenarios/cassettes/TestScenarios/v2/Feature_Case_Management/Scenario_Assign_case_returns_OK_response.freeze b/tests/scenarios/cassettes/TestScenarios/v2/Feature_Case_Management/Scenario_Assign_case_returns_OK_response.freeze new file mode 100644 index 00000000000..63999fedab2 --- /dev/null +++ b/tests/scenarios/cassettes/TestScenarios/v2/Feature_Case_Management/Scenario_Assign_case_returns_OK_response.freeze @@ -0,0 +1 @@ +2024-02-14T18:55:16.362Z \ No newline at end of file diff --git a/tests/scenarios/cassettes/TestScenarios/v2/Feature_Case_Management/Scenario_Assign_case_returns_OK_response.yaml b/tests/scenarios/cassettes/TestScenarios/v2/Feature_Case_Management/Scenario_Assign_case_returns_OK_response.yaml new file mode 100644 index 00000000000..35ab9cd058a --- /dev/null +++ b/tests/scenarios/cassettes/TestScenarios/v2/Feature_Case_Management/Scenario_Assign_case_returns_OK_response.yaml @@ -0,0 +1,82 @@ +interactions: +- request: + body: | + {"data":{"attributes":{"priority":"P4","title":"My new case","type":"STANDARD"},"relationships":{"project":{"data":{"id":"d4bbe1af-f36e-42f1-87c1-493ca35c320e","type":"project"}}},"type":"case"}} + form: {} + headers: + Accept: + - application/json + Content-Type: + - application/json + id: 0 + method: POST + url: https://api.datadoghq.com/api/v2/cases + response: + body: '{"data":{"id":"2d07d89b-2f91-47c2-b3ea-ee28ffee5b4c","type":"case","attributes":{"attributes":{},"created_at":"2024-02-14T18:55:16.445823452Z","creation_source":"MANUAL","description":"","insights":[],"internal_id":"2d07d89b-2f91-47c2-b3ea-ee28ffee5b4c","key":"DDFC-185","priority":"P4","public_id":"245","status":"OPEN","title":"My + new case","type":"STANDARD"},"relationships":{"created_by":{"data":{"id":"3ad549bf-eba0-11e9-a77a-0705486660d0","type":"user"}},"project":{"data":{"id":"d4bbe1af-f36e-42f1-87c1-493ca35c320e","type":"project"}}}},"included":[{"id":"3ad549bf-eba0-11e9-a77a-0705486660d0","type":"user","attributes":{"email":"frog@datadoghq.com","handle":"frog@datadoghq.com","name":""}}]}' + code: 201 + duration: 0ms + headers: + Content-Type: + - application/vnd.api+json + status: 201 Created +- request: + body: | + {"data":{"attributes":{"email":"Test-Assign_case_returns_OK_response-1707936916@datadoghq.com","title":"user title"},"type":"users"}} + form: {} + headers: + Accept: + - application/json + Content-Type: + - application/json + id: 1 + method: POST + url: https://api.datadoghq.com/api/v2/users + response: + body: '{"data":{"type":"users","id":"97a38d32-cb6a-11ee-9645-0a530ef9b7d3","attributes":{"name":null,"handle":"test-assign_case_returns_ok_response-1707936916@datadoghq.com","created_at":"2024-02-14T18:55:16.611469+00:00","modified_at":"2024-02-14T18:55:16.611469+00:00","email":"test-assign_case_returns_ok_response-1707936916@datadoghq.com","icon":"https://secure.gravatar.com/avatar/982f69dc821d8ef307cfc8907452899b?s=48&d=retro","title":"user + title","verified":false,"service_account":false,"disabled":false,"allowed_login_methods":[],"status":"Pending"},"relationships":{"roles":{"data":[]},"org":{"data":{"type":"orgs","id":"4dee724d-00cc-11ea-a77b-570c9d03c6c5"}}}}} + + ' + code: 201 + duration: 0ms + headers: + Content-Type: + - application/json + status: 201 Created +- request: + body: | + {"data":{"attributes":{"assignee_id":"97a38d32-cb6a-11ee-9645-0a530ef9b7d3"},"type":"case"}} + form: {} + headers: + Accept: + - application/json + Content-Type: + - application/json + id: 2 + method: POST + url: https://api.datadoghq.com/api/v2/cases/2d07d89b-2f91-47c2-b3ea-ee28ffee5b4c/assign + response: + body: '{"data":{"id":"2d07d89b-2f91-47c2-b3ea-ee28ffee5b4c","type":"case","attributes":{"attributes":{},"created_at":"2024-02-14T18:55:16.445823Z","creation_source":"MANUAL","description":"","insights":[],"internal_id":"2d07d89b-2f91-47c2-b3ea-ee28ffee5b4c","key":"DDFC-185","modified_at":"2024-02-14T18:55:16.737803Z","priority":"P4","public_id":"245","status":"OPEN","title":"My + new case","type":"STANDARD"},"relationships":{"assignee":{"data":{"id":"97a38d32-cb6a-11ee-9645-0a530ef9b7d3","type":"user"}},"created_by":{"data":{"id":"3ad549bf-eba0-11e9-a77a-0705486660d0","type":"user"}},"modified_by":{"data":{"id":"3ad549bf-eba0-11e9-a77a-0705486660d0","type":"user"}},"project":{"data":{"id":"d4bbe1af-f36e-42f1-87c1-493ca35c320e","type":"project"}}}},"included":[{"id":"3ad549bf-eba0-11e9-a77a-0705486660d0","type":"user","attributes":{"email":"frog@datadoghq.com","handle":"frog@datadoghq.com","name":""}},{"id":"97a38d32-cb6a-11ee-9645-0a530ef9b7d3","type":"user","attributes":{"email":"test-assign_case_returns_ok_response-1707936916@datadoghq.com","handle":"test-assign_case_returns_ok_response-1707936916@datadoghq.com","name":""}}]}' + code: 200 + duration: 0ms + headers: + Content-Type: + - application/vnd.api+json + status: 200 OK +- request: + body: '' + form: {} + headers: + Accept: + - '*/*' + id: 3 + method: DELETE + url: https://api.datadoghq.com/api/v2/users/97a38d32-cb6a-11ee-9645-0a530ef9b7d3 + response: + body: '' + code: 204 + duration: 0ms + headers: {} + status: 204 No Content +version: 2 diff --git a/tests/scenarios/cassettes/TestScenarios/v2/Feature_Case_Management/Scenario_Create_a_case_returns_Bad_Request_response.freeze b/tests/scenarios/cassettes/TestScenarios/v2/Feature_Case_Management/Scenario_Create_a_case_returns_Bad_Request_response.freeze new file mode 100644 index 00000000000..3d430913723 --- /dev/null +++ b/tests/scenarios/cassettes/TestScenarios/v2/Feature_Case_Management/Scenario_Create_a_case_returns_Bad_Request_response.freeze @@ -0,0 +1 @@ +2024-02-14T18:55:16.995Z \ No newline at end of file diff --git a/tests/scenarios/cassettes/TestScenarios/v2/Feature_Cases/Scenario_Create_a_case_returns_Bad_Request_response.yaml b/tests/scenarios/cassettes/TestScenarios/v2/Feature_Case_Management/Scenario_Create_a_case_returns_Bad_Request_response.yaml similarity index 100% rename from tests/scenarios/cassettes/TestScenarios/v2/Feature_Cases/Scenario_Create_a_case_returns_Bad_Request_response.yaml rename to tests/scenarios/cassettes/TestScenarios/v2/Feature_Case_Management/Scenario_Create_a_case_returns_Bad_Request_response.yaml diff --git a/tests/scenarios/cassettes/TestScenarios/v2/Feature_Case_Management/Scenario_Create_a_case_returns_CREATED_response.freeze b/tests/scenarios/cassettes/TestScenarios/v2/Feature_Case_Management/Scenario_Create_a_case_returns_CREATED_response.freeze new file mode 100644 index 00000000000..d0a1a57a423 --- /dev/null +++ b/tests/scenarios/cassettes/TestScenarios/v2/Feature_Case_Management/Scenario_Create_a_case_returns_CREATED_response.freeze @@ -0,0 +1 @@ +2024-02-14T18:55:17.074Z \ No newline at end of file diff --git a/tests/scenarios/cassettes/TestScenarios/v2/Feature_Case_Management/Scenario_Create_a_case_returns_CREATED_response.yaml b/tests/scenarios/cassettes/TestScenarios/v2/Feature_Case_Management/Scenario_Create_a_case_returns_CREATED_response.yaml new file mode 100644 index 00000000000..35039ab57ca --- /dev/null +++ b/tests/scenarios/cassettes/TestScenarios/v2/Feature_Case_Management/Scenario_Create_a_case_returns_CREATED_response.yaml @@ -0,0 +1,61 @@ +interactions: +- request: + body: | + {"data":{"attributes":{"email":"Test-Create_a_case_returns_CREATED_response-1707936917@datadoghq.com","title":"user title"},"type":"users"}} + form: {} + headers: + Accept: + - application/json + Content-Type: + - application/json + id: 0 + method: POST + url: https://api.datadoghq.com/api/v2/users + response: + body: '{"data":{"type":"users","id":"97fb5e7f-cb6a-11ee-8de6-d2393b962484","attributes":{"name":null,"handle":"test-create_a_case_returns_created_response-1707936917@datadoghq.com","created_at":"2024-02-14T18:55:17.186960+00:00","modified_at":"2024-02-14T18:55:17.186960+00:00","email":"test-create_a_case_returns_created_response-1707936917@datadoghq.com","icon":"https://secure.gravatar.com/avatar/04ba872d0c124a11691bb75e2b774d08?s=48&d=retro","title":"user + title","verified":false,"service_account":false,"disabled":false,"allowed_login_methods":[],"status":"Pending"},"relationships":{"roles":{"data":[]},"org":{"data":{"type":"orgs","id":"4dee724d-00cc-11ea-a77b-570c9d03c6c5"}}}}} + + ' + code: 201 + duration: 0ms + headers: + Content-Type: + - application/json + status: 201 Created +- request: + body: | + {"data":{"attributes":{"priority":"NOT_DEFINED","title":"Security breach investigation in 8216c516b64665ce","type":"STANDARD"},"relationships":{"assignee":{"data":{"id":"97fb5e7f-cb6a-11ee-8de6-d2393b962484","type":"user"}},"project":{"data":{"id":"d4bbe1af-f36e-42f1-87c1-493ca35c320e","type":"project"}}},"type":"case"}} + form: {} + headers: + Accept: + - application/json + Content-Type: + - application/json + id: 1 + method: POST + url: https://api.datadoghq.com/api/v2/cases + response: + body: '{"data":{"id":"93237ca1-b5ee-4116-9bfc-d94f99cd9629","type":"case","attributes":{"attributes":{},"created_at":"2024-02-14T18:55:17.301872096Z","creation_source":"MANUAL","description":"","insights":[],"internal_id":"93237ca1-b5ee-4116-9bfc-d94f99cd9629","key":"DDFC-186","priority":"NOT_DEFINED","public_id":"246","status":"OPEN","title":"Security + breach investigation in 8216c516b64665ce","type":"STANDARD"},"relationships":{"assignee":{"data":{"id":"97fb5e7f-cb6a-11ee-8de6-d2393b962484","type":"user"}},"created_by":{"data":{"id":"3ad549bf-eba0-11e9-a77a-0705486660d0","type":"user"}},"project":{"data":{"id":"d4bbe1af-f36e-42f1-87c1-493ca35c320e","type":"project"}}}},"included":[{"id":"3ad549bf-eba0-11e9-a77a-0705486660d0","type":"user","attributes":{"email":"frog@datadoghq.com","handle":"frog@datadoghq.com","name":""}},{"id":"97fb5e7f-cb6a-11ee-8de6-d2393b962484","type":"user","attributes":{"email":"test-create_a_case_returns_created_response-1707936917@datadoghq.com","handle":"test-create_a_case_returns_created_response-1707936917@datadoghq.com","name":""}}]}' + code: 201 + duration: 0ms + headers: + Content-Type: + - application/vnd.api+json + status: 201 Created +- request: + body: '' + form: {} + headers: + Accept: + - '*/*' + id: 2 + method: DELETE + url: https://api.datadoghq.com/api/v2/users/97fb5e7f-cb6a-11ee-8de6-d2393b962484 + response: + body: '' + code: 204 + duration: 0ms + headers: {} + status: 204 No Content +version: 2 diff --git a/tests/scenarios/cassettes/TestScenarios/v2/Feature_Case_Management/Scenario_Get_the_details_of_a_case_returns_Not_Found_response.freeze b/tests/scenarios/cassettes/TestScenarios/v2/Feature_Case_Management/Scenario_Get_the_details_of_a_case_returns_Not_Found_response.freeze new file mode 100644 index 00000000000..1f1e9770dce --- /dev/null +++ b/tests/scenarios/cassettes/TestScenarios/v2/Feature_Case_Management/Scenario_Get_the_details_of_a_case_returns_Not_Found_response.freeze @@ -0,0 +1 @@ +2024-02-14T18:55:17.678Z \ No newline at end of file diff --git a/tests/scenarios/cassettes/TestScenarios/v2/Feature_Cases/Scenario_Get_the_details_of_a_case_returns_Not_Found_response.yaml b/tests/scenarios/cassettes/TestScenarios/v2/Feature_Case_Management/Scenario_Get_the_details_of_a_case_returns_Not_Found_response.yaml similarity index 100% rename from tests/scenarios/cassettes/TestScenarios/v2/Feature_Cases/Scenario_Get_the_details_of_a_case_returns_Not_Found_response.yaml rename to tests/scenarios/cassettes/TestScenarios/v2/Feature_Case_Management/Scenario_Get_the_details_of_a_case_returns_Not_Found_response.yaml diff --git a/tests/scenarios/cassettes/TestScenarios/v2/Feature_Case_Management/Scenario_Get_the_details_of_a_case_returns_OK_response.freeze b/tests/scenarios/cassettes/TestScenarios/v2/Feature_Case_Management/Scenario_Get_the_details_of_a_case_returns_OK_response.freeze new file mode 100644 index 00000000000..ce3e1d89d5d --- /dev/null +++ b/tests/scenarios/cassettes/TestScenarios/v2/Feature_Case_Management/Scenario_Get_the_details_of_a_case_returns_OK_response.freeze @@ -0,0 +1 @@ +2024-02-14T18:55:17.758Z \ No newline at end of file diff --git a/tests/scenarios/cassettes/TestScenarios/v2/Feature_Case_Management/Scenario_Get_the_details_of_a_case_returns_OK_response.yaml b/tests/scenarios/cassettes/TestScenarios/v2/Feature_Case_Management/Scenario_Get_the_details_of_a_case_returns_OK_response.yaml new file mode 100644 index 00000000000..d36c0228712 --- /dev/null +++ b/tests/scenarios/cassettes/TestScenarios/v2/Feature_Case_Management/Scenario_Get_the_details_of_a_case_returns_OK_response.yaml @@ -0,0 +1,41 @@ +interactions: +- request: + body: | + {"data":{"attributes":{"priority":"P4","title":"My new case","type":"STANDARD"},"relationships":{"project":{"data":{"id":"d4bbe1af-f36e-42f1-87c1-493ca35c320e","type":"project"}}},"type":"case"}} + form: {} + headers: + Accept: + - application/json + Content-Type: + - application/json + id: 0 + method: POST + url: https://api.datadoghq.com/api/v2/cases + response: + body: '{"data":{"id":"d981cc6f-654e-4528-8451-d3d99259d4d6","type":"case","attributes":{"attributes":{},"created_at":"2024-02-14T18:55:17.837538892Z","creation_source":"MANUAL","description":"","insights":[],"internal_id":"d981cc6f-654e-4528-8451-d3d99259d4d6","key":"DDFC-187","priority":"P4","public_id":"247","status":"OPEN","title":"My + new case","type":"STANDARD"},"relationships":{"created_by":{"data":{"id":"3ad549bf-eba0-11e9-a77a-0705486660d0","type":"user"}},"project":{"data":{"id":"d4bbe1af-f36e-42f1-87c1-493ca35c320e","type":"project"}}}},"included":[{"id":"3ad549bf-eba0-11e9-a77a-0705486660d0","type":"user","attributes":{"email":"frog@datadoghq.com","handle":"frog@datadoghq.com","name":""}}]}' + code: 201 + duration: 0ms + headers: + Content-Type: + - application/vnd.api+json + status: 201 Created +- request: + body: '' + form: {} + headers: + Accept: + - application/json + id: 1 + method: GET + url: https://api.datadoghq.com/api/v2/cases/d981cc6f-654e-4528-8451-d3d99259d4d6 + response: + body: '{"data":{"id":"d981cc6f-654e-4528-8451-d3d99259d4d6","type":"case","attributes":{"attributes":{},"created_at":"2024-02-14T18:55:17.837539Z","creation_source":"MANUAL","description":"","insights":[],"internal_id":"d981cc6f-654e-4528-8451-d3d99259d4d6","key":"DDFC-187","priority":"P4","public_id":"247","status":"OPEN","title":"My + new case","type":"STANDARD"},"relationships":{"created_by":{"data":{"id":"3ad549bf-eba0-11e9-a77a-0705486660d0","type":"user"}},"project":{"data":{"id":"d4bbe1af-f36e-42f1-87c1-493ca35c320e","type":"project"}}}},"included":[{"id":"3ad549bf-eba0-11e9-a77a-0705486660d0","type":"user","attributes":{"email":"frog@datadoghq.com","handle":"frog@datadoghq.com","name":""}}]}' + code: 200 + duration: 0ms + headers: + Content-Type: + - application/vnd.api+json + status: 200 OK +version: 2 diff --git a/tests/scenarios/cassettes/TestScenarios/v2/Feature_Case_Management/Scenario_Unarchive_case_returns_Bad_Request_response.freeze b/tests/scenarios/cassettes/TestScenarios/v2/Feature_Case_Management/Scenario_Unarchive_case_returns_Bad_Request_response.freeze new file mode 100644 index 00000000000..5b768a1c886 --- /dev/null +++ b/tests/scenarios/cassettes/TestScenarios/v2/Feature_Case_Management/Scenario_Unarchive_case_returns_Bad_Request_response.freeze @@ -0,0 +1 @@ +2024-02-14T18:55:17.936Z \ No newline at end of file diff --git a/tests/scenarios/cassettes/TestScenarios/v2/Feature_Cases/Scenario_Unarchive_case_returns_Bad_Request_response.yaml b/tests/scenarios/cassettes/TestScenarios/v2/Feature_Case_Management/Scenario_Unarchive_case_returns_Bad_Request_response.yaml similarity index 64% rename from tests/scenarios/cassettes/TestScenarios/v2/Feature_Cases/Scenario_Unarchive_case_returns_Bad_Request_response.yaml rename to tests/scenarios/cassettes/TestScenarios/v2/Feature_Case_Management/Scenario_Unarchive_case_returns_Bad_Request_response.yaml index dca33b425fa..9458bb6f184 100644 --- a/tests/scenarios/cassettes/TestScenarios/v2/Feature_Cases/Scenario_Unarchive_case_returns_Bad_Request_response.yaml +++ b/tests/scenarios/cassettes/TestScenarios/v2/Feature_Case_Management/Scenario_Unarchive_case_returns_Bad_Request_response.yaml @@ -12,9 +12,8 @@ interactions: method: POST url: https://api.datadoghq.com/api/v2/cases response: - body: '{"data":{"id":"91b52d3b-4d67-4b7f-ba4d-da67d8b46798","type":"case","attributes":{"attributes":{},"created_at":"2024-02-07T18:00:41.662578539Z","creation_source":"MANUAL","description":"","insights":[],"internal_id":"91b52d3b-4d67-4b7f-ba4d-da67d8b46798","key":"DDFC-8","priority":"P4","public_id":"68","status":"OPEN","title":"My - new case","type":"STANDARD"},"relationships":{"created_by":{"data":{"id":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","type":"user"}},"project":{"data":{"id":"d4bbe1af-f36e-42f1-87c1-493ca35c320e","type":"project"}}}},"included":[{"id":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","type":"user","attributes":{"email":"team-intg-tools-libs-spam@datadoghq.com","handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI - Account"}}]}' + body: '{"data":{"id":"7c588891-1486-4cf6-992f-f0c3a97f0245","type":"case","attributes":{"attributes":{},"created_at":"2024-02-14T18:55:18.021909299Z","creation_source":"MANUAL","description":"","insights":[],"internal_id":"7c588891-1486-4cf6-992f-f0c3a97f0245","key":"DDFC-188","priority":"P4","public_id":"248","status":"OPEN","title":"My + new case","type":"STANDARD"},"relationships":{"created_by":{"data":{"id":"3ad549bf-eba0-11e9-a77a-0705486660d0","type":"user"}},"project":{"data":{"id":"d4bbe1af-f36e-42f1-87c1-493ca35c320e","type":"project"}}}},"included":[{"id":"3ad549bf-eba0-11e9-a77a-0705486660d0","type":"user","attributes":{"email":"frog@datadoghq.com","handle":"frog@datadoghq.com","name":""}}]}' code: 201 duration: 0ms headers: @@ -32,7 +31,7 @@ interactions: - application/json id: 1 method: POST - url: https://api.datadoghq.com/api/v2/cases/91b52d3b-4d67-4b7f-ba4d-da67d8b46798/unarchive + url: https://api.datadoghq.com/api/v2/cases/7c588891-1486-4cf6-992f-f0c3a97f0245/unarchive response: body: '{"errors":[{"status":"400","title":"Bad Request","detail":"got type \"project\" expected one of \"case\""}]}' diff --git a/tests/scenarios/cassettes/TestScenarios/v2/Feature_Case_Management/Scenario_Unarchive_case_returns_Not_Found_response.freeze b/tests/scenarios/cassettes/TestScenarios/v2/Feature_Case_Management/Scenario_Unarchive_case_returns_Not_Found_response.freeze new file mode 100644 index 00000000000..034f1d4aa81 --- /dev/null +++ b/tests/scenarios/cassettes/TestScenarios/v2/Feature_Case_Management/Scenario_Unarchive_case_returns_Not_Found_response.freeze @@ -0,0 +1 @@ +2024-02-14T18:55:18.130Z \ No newline at end of file diff --git a/tests/scenarios/cassettes/TestScenarios/v2/Feature_Cases/Scenario_Unarchive_case_returns_Not_Found_response.yaml b/tests/scenarios/cassettes/TestScenarios/v2/Feature_Case_Management/Scenario_Unarchive_case_returns_Not_Found_response.yaml similarity index 100% rename from tests/scenarios/cassettes/TestScenarios/v2/Feature_Cases/Scenario_Unarchive_case_returns_Not_Found_response.yaml rename to tests/scenarios/cassettes/TestScenarios/v2/Feature_Case_Management/Scenario_Unarchive_case_returns_Not_Found_response.yaml diff --git a/tests/scenarios/cassettes/TestScenarios/v2/Feature_Case_Management/Scenario_Unarchive_case_returns_OK_response.freeze b/tests/scenarios/cassettes/TestScenarios/v2/Feature_Case_Management/Scenario_Unarchive_case_returns_OK_response.freeze new file mode 100644 index 00000000000..df7e85e9f41 --- /dev/null +++ b/tests/scenarios/cassettes/TestScenarios/v2/Feature_Case_Management/Scenario_Unarchive_case_returns_OK_response.freeze @@ -0,0 +1 @@ +2024-02-14T18:55:18.220Z \ No newline at end of file diff --git a/tests/scenarios/cassettes/TestScenarios/v2/Feature_Cases/Scenario_Unarchive_case_returns_OK_response.yaml b/tests/scenarios/cassettes/TestScenarios/v2/Feature_Case_Management/Scenario_Unarchive_case_returns_OK_response.yaml similarity index 51% rename from tests/scenarios/cassettes/TestScenarios/v2/Feature_Cases/Scenario_Unarchive_case_returns_OK_response.yaml rename to tests/scenarios/cassettes/TestScenarios/v2/Feature_Case_Management/Scenario_Unarchive_case_returns_OK_response.yaml index a4f1bf6bd0e..0c6a944d948 100644 --- a/tests/scenarios/cassettes/TestScenarios/v2/Feature_Cases/Scenario_Unarchive_case_returns_OK_response.yaml +++ b/tests/scenarios/cassettes/TestScenarios/v2/Feature_Case_Management/Scenario_Unarchive_case_returns_OK_response.yaml @@ -12,9 +12,8 @@ interactions: method: POST url: https://api.datadoghq.com/api/v2/cases response: - body: '{"data":{"id":"020e2ce7-9fe8-4273-81ae-1e5873fba9d3","type":"case","attributes":{"attributes":{},"created_at":"2024-02-07T18:00:42.286687881Z","creation_source":"MANUAL","description":"","insights":[],"internal_id":"020e2ce7-9fe8-4273-81ae-1e5873fba9d3","key":"DDFC-9","priority":"P4","public_id":"69","status":"OPEN","title":"My - new case","type":"STANDARD"},"relationships":{"created_by":{"data":{"id":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","type":"user"}},"project":{"data":{"id":"d4bbe1af-f36e-42f1-87c1-493ca35c320e","type":"project"}}}},"included":[{"id":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","type":"user","attributes":{"email":"team-intg-tools-libs-spam@datadoghq.com","handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI - Account"}}]}' + body: '{"data":{"id":"56b03839-5199-4207-94e6-648f5c363d1d","type":"case","attributes":{"attributes":{},"created_at":"2024-02-14T18:55:18.285988591Z","creation_source":"MANUAL","description":"","insights":[],"internal_id":"56b03839-5199-4207-94e6-648f5c363d1d","key":"DDFC-189","priority":"P4","public_id":"249","status":"OPEN","title":"My + new case","type":"STANDARD"},"relationships":{"created_by":{"data":{"id":"3ad549bf-eba0-11e9-a77a-0705486660d0","type":"user"}},"project":{"data":{"id":"d4bbe1af-f36e-42f1-87c1-493ca35c320e","type":"project"}}}},"included":[{"id":"3ad549bf-eba0-11e9-a77a-0705486660d0","type":"user","attributes":{"email":"frog@datadoghq.com","handle":"frog@datadoghq.com","name":""}}]}' code: 201 duration: 0ms headers: @@ -32,11 +31,10 @@ interactions: - application/json id: 1 method: POST - url: https://api.datadoghq.com/api/v2/cases/020e2ce7-9fe8-4273-81ae-1e5873fba9d3/unarchive + url: https://api.datadoghq.com/api/v2/cases/56b03839-5199-4207-94e6-648f5c363d1d/unarchive response: - body: '{"data":{"id":"020e2ce7-9fe8-4273-81ae-1e5873fba9d3","type":"case","attributes":{"attributes":{},"created_at":"2024-02-07T18:00:42.286688Z","creation_source":"MANUAL","description":"","insights":[],"internal_id":"020e2ce7-9fe8-4273-81ae-1e5873fba9d3","key":"DDFC-9","priority":"P4","public_id":"69","status":"OPEN","title":"My - new case","type":"STANDARD"},"relationships":{"created_by":{"data":{"id":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","type":"user"}},"project":{"data":{"id":"d4bbe1af-f36e-42f1-87c1-493ca35c320e","type":"project"}}}},"included":[{"id":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","type":"user","attributes":{"email":"team-intg-tools-libs-spam@datadoghq.com","handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI - Account"}}]}' + body: '{"data":{"id":"56b03839-5199-4207-94e6-648f5c363d1d","type":"case","attributes":{"attributes":{},"created_at":"2024-02-14T18:55:18.285989Z","creation_source":"MANUAL","description":"","insights":[],"internal_id":"56b03839-5199-4207-94e6-648f5c363d1d","key":"DDFC-189","priority":"P4","public_id":"249","status":"OPEN","title":"My + new case","type":"STANDARD"},"relationships":{"created_by":{"data":{"id":"3ad549bf-eba0-11e9-a77a-0705486660d0","type":"user"}},"project":{"data":{"id":"d4bbe1af-f36e-42f1-87c1-493ca35c320e","type":"project"}}}},"included":[{"id":"3ad549bf-eba0-11e9-a77a-0705486660d0","type":"user","attributes":{"email":"frog@datadoghq.com","handle":"frog@datadoghq.com","name":""}}]}' code: 200 duration: 0ms headers: diff --git a/tests/scenarios/cassettes/TestScenarios/v2/Feature_Case_Management/Scenario_Unassign_case_returns_Bad_Request_response.freeze b/tests/scenarios/cassettes/TestScenarios/v2/Feature_Case_Management/Scenario_Unassign_case_returns_Bad_Request_response.freeze new file mode 100644 index 00000000000..5c53ccfe49e --- /dev/null +++ b/tests/scenarios/cassettes/TestScenarios/v2/Feature_Case_Management/Scenario_Unassign_case_returns_Bad_Request_response.freeze @@ -0,0 +1 @@ +2024-02-14T18:55:18.364Z \ No newline at end of file diff --git a/tests/scenarios/cassettes/TestScenarios/v2/Feature_Cases/Scenario_Unassign_case_returns_Bad_Request_response.yaml b/tests/scenarios/cassettes/TestScenarios/v2/Feature_Case_Management/Scenario_Unassign_case_returns_Bad_Request_response.yaml similarity index 64% rename from tests/scenarios/cassettes/TestScenarios/v2/Feature_Cases/Scenario_Unassign_case_returns_Bad_Request_response.yaml rename to tests/scenarios/cassettes/TestScenarios/v2/Feature_Case_Management/Scenario_Unassign_case_returns_Bad_Request_response.yaml index f0963174ce5..3734bea6bc2 100644 --- a/tests/scenarios/cassettes/TestScenarios/v2/Feature_Cases/Scenario_Unassign_case_returns_Bad_Request_response.yaml +++ b/tests/scenarios/cassettes/TestScenarios/v2/Feature_Case_Management/Scenario_Unassign_case_returns_Bad_Request_response.yaml @@ -12,9 +12,8 @@ interactions: method: POST url: https://api.datadoghq.com/api/v2/cases response: - body: '{"data":{"id":"8a6e4254-7429-4398-99c2-ba9363fb3f98","type":"case","attributes":{"attributes":{},"created_at":"2024-02-07T18:00:42.908434394Z","creation_source":"MANUAL","description":"","insights":[],"internal_id":"8a6e4254-7429-4398-99c2-ba9363fb3f98","key":"DDFC-10","priority":"P4","public_id":"70","status":"OPEN","title":"My - new case","type":"STANDARD"},"relationships":{"created_by":{"data":{"id":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","type":"user"}},"project":{"data":{"id":"d4bbe1af-f36e-42f1-87c1-493ca35c320e","type":"project"}}}},"included":[{"id":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","type":"user","attributes":{"email":"team-intg-tools-libs-spam@datadoghq.com","handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI - Account"}}]}' + body: '{"data":{"id":"4c89618c-11cc-40ba-bc6c-000e862910b1","type":"case","attributes":{"attributes":{},"created_at":"2024-02-14T18:55:18.434117143Z","creation_source":"MANUAL","description":"","insights":[],"internal_id":"4c89618c-11cc-40ba-bc6c-000e862910b1","key":"DDFC-190","priority":"P4","public_id":"250","status":"OPEN","title":"My + new case","type":"STANDARD"},"relationships":{"created_by":{"data":{"id":"3ad549bf-eba0-11e9-a77a-0705486660d0","type":"user"}},"project":{"data":{"id":"d4bbe1af-f36e-42f1-87c1-493ca35c320e","type":"project"}}}},"included":[{"id":"3ad549bf-eba0-11e9-a77a-0705486660d0","type":"user","attributes":{"email":"frog@datadoghq.com","handle":"frog@datadoghq.com","name":""}}]}' code: 201 duration: 0ms headers: @@ -32,7 +31,7 @@ interactions: - application/json id: 1 method: POST - url: https://api.datadoghq.com/api/v2/cases/8a6e4254-7429-4398-99c2-ba9363fb3f98/unassign + url: https://api.datadoghq.com/api/v2/cases/4c89618c-11cc-40ba-bc6c-000e862910b1/unassign response: body: '{"errors":[{"status":"400","title":"Bad Request","detail":"got type \"project\" expected one of \"case\""}]}' diff --git a/tests/scenarios/cassettes/TestScenarios/v2/Feature_Case_Management/Scenario_Unassign_case_returns_Not_Found_response.freeze b/tests/scenarios/cassettes/TestScenarios/v2/Feature_Case_Management/Scenario_Unassign_case_returns_Not_Found_response.freeze new file mode 100644 index 00000000000..6a08f9742dc --- /dev/null +++ b/tests/scenarios/cassettes/TestScenarios/v2/Feature_Case_Management/Scenario_Unassign_case_returns_Not_Found_response.freeze @@ -0,0 +1 @@ +2024-02-14T18:55:18.522Z \ No newline at end of file diff --git a/tests/scenarios/cassettes/TestScenarios/v2/Feature_Cases/Scenario_Unassign_case_returns_Not_Found_response.yaml b/tests/scenarios/cassettes/TestScenarios/v2/Feature_Case_Management/Scenario_Unassign_case_returns_Not_Found_response.yaml similarity index 100% rename from tests/scenarios/cassettes/TestScenarios/v2/Feature_Cases/Scenario_Unassign_case_returns_Not_Found_response.yaml rename to tests/scenarios/cassettes/TestScenarios/v2/Feature_Case_Management/Scenario_Unassign_case_returns_Not_Found_response.yaml diff --git a/tests/scenarios/cassettes/TestScenarios/v2/Feature_Case_Management/Scenario_Unassign_case_returns_OK_response.freeze b/tests/scenarios/cassettes/TestScenarios/v2/Feature_Case_Management/Scenario_Unassign_case_returns_OK_response.freeze new file mode 100644 index 00000000000..e57766f0dfb --- /dev/null +++ b/tests/scenarios/cassettes/TestScenarios/v2/Feature_Case_Management/Scenario_Unassign_case_returns_OK_response.freeze @@ -0,0 +1 @@ +2024-02-14T18:55:18.613Z \ No newline at end of file diff --git a/tests/scenarios/cassettes/TestScenarios/v2/Feature_Cases/Scenario_Unassign_case_returns_OK_response.yaml b/tests/scenarios/cassettes/TestScenarios/v2/Feature_Case_Management/Scenario_Unassign_case_returns_OK_response.yaml similarity index 50% rename from tests/scenarios/cassettes/TestScenarios/v2/Feature_Cases/Scenario_Unassign_case_returns_OK_response.yaml rename to tests/scenarios/cassettes/TestScenarios/v2/Feature_Case_Management/Scenario_Unassign_case_returns_OK_response.yaml index ed1d76f2fee..5fb99414356 100644 --- a/tests/scenarios/cassettes/TestScenarios/v2/Feature_Cases/Scenario_Unassign_case_returns_OK_response.yaml +++ b/tests/scenarios/cassettes/TestScenarios/v2/Feature_Case_Management/Scenario_Unassign_case_returns_OK_response.yaml @@ -12,9 +12,8 @@ interactions: method: POST url: https://api.datadoghq.com/api/v2/cases response: - body: '{"data":{"id":"8c5de575-685c-4ac4-a78a-9774c4f2160b","type":"case","attributes":{"attributes":{},"created_at":"2024-02-07T18:00:43.427988311Z","creation_source":"MANUAL","description":"","insights":[],"internal_id":"8c5de575-685c-4ac4-a78a-9774c4f2160b","key":"DDFC-11","priority":"P4","public_id":"71","status":"OPEN","title":"My - new case","type":"STANDARD"},"relationships":{"created_by":{"data":{"id":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","type":"user"}},"project":{"data":{"id":"d4bbe1af-f36e-42f1-87c1-493ca35c320e","type":"project"}}}},"included":[{"id":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","type":"user","attributes":{"email":"team-intg-tools-libs-spam@datadoghq.com","handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI - Account"}}]}' + body: '{"data":{"id":"fa3c26fc-fada-4308-8888-4067d97acf06","type":"case","attributes":{"attributes":{},"created_at":"2024-02-14T18:55:18.689935858Z","creation_source":"MANUAL","description":"","insights":[],"internal_id":"fa3c26fc-fada-4308-8888-4067d97acf06","key":"DDFC-191","priority":"P4","public_id":"251","status":"OPEN","title":"My + new case","type":"STANDARD"},"relationships":{"created_by":{"data":{"id":"3ad549bf-eba0-11e9-a77a-0705486660d0","type":"user"}},"project":{"data":{"id":"d4bbe1af-f36e-42f1-87c1-493ca35c320e","type":"project"}}}},"included":[{"id":"3ad549bf-eba0-11e9-a77a-0705486660d0","type":"user","attributes":{"email":"frog@datadoghq.com","handle":"frog@datadoghq.com","name":""}}]}' code: 201 duration: 0ms headers: @@ -32,11 +31,10 @@ interactions: - application/json id: 1 method: POST - url: https://api.datadoghq.com/api/v2/cases/8c5de575-685c-4ac4-a78a-9774c4f2160b/unassign + url: https://api.datadoghq.com/api/v2/cases/fa3c26fc-fada-4308-8888-4067d97acf06/unassign response: - body: '{"data":{"id":"8c5de575-685c-4ac4-a78a-9774c4f2160b","type":"case","attributes":{"attributes":{},"created_at":"2024-02-07T18:00:43.427988Z","creation_source":"MANUAL","description":"","insights":[],"internal_id":"8c5de575-685c-4ac4-a78a-9774c4f2160b","key":"DDFC-11","priority":"P4","public_id":"71","status":"OPEN","title":"My - new case","type":"STANDARD"},"relationships":{"created_by":{"data":{"id":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","type":"user"}},"project":{"data":{"id":"d4bbe1af-f36e-42f1-87c1-493ca35c320e","type":"project"}}}},"included":[{"id":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","type":"user","attributes":{"email":"team-intg-tools-libs-spam@datadoghq.com","handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI - Account"}}]}' + body: '{"data":{"id":"fa3c26fc-fada-4308-8888-4067d97acf06","type":"case","attributes":{"attributes":{},"created_at":"2024-02-14T18:55:18.689936Z","creation_source":"MANUAL","description":"","insights":[],"internal_id":"fa3c26fc-fada-4308-8888-4067d97acf06","key":"DDFC-191","priority":"P4","public_id":"251","status":"OPEN","title":"My + new case","type":"STANDARD"},"relationships":{"created_by":{"data":{"id":"3ad549bf-eba0-11e9-a77a-0705486660d0","type":"user"}},"project":{"data":{"id":"d4bbe1af-f36e-42f1-87c1-493ca35c320e","type":"project"}}}},"included":[{"id":"3ad549bf-eba0-11e9-a77a-0705486660d0","type":"user","attributes":{"email":"frog@datadoghq.com","handle":"frog@datadoghq.com","name":""}}]}' code: 200 duration: 0ms headers: diff --git a/tests/scenarios/cassettes/TestScenarios/v2/Feature_Case_Management/Scenario_Update_case_priority_returns_Bad_Request_response.freeze b/tests/scenarios/cassettes/TestScenarios/v2/Feature_Case_Management/Scenario_Update_case_priority_returns_Bad_Request_response.freeze new file mode 100644 index 00000000000..b44760c0495 --- /dev/null +++ b/tests/scenarios/cassettes/TestScenarios/v2/Feature_Case_Management/Scenario_Update_case_priority_returns_Bad_Request_response.freeze @@ -0,0 +1 @@ +2024-02-14T18:55:18.767Z \ No newline at end of file diff --git a/tests/scenarios/cassettes/TestScenarios/v2/Feature_Cases/Scenario_Update_case_priority_returns_Bad_Request_response.yaml b/tests/scenarios/cassettes/TestScenarios/v2/Feature_Case_Management/Scenario_Update_case_priority_returns_Bad_Request_response.yaml similarity index 62% rename from tests/scenarios/cassettes/TestScenarios/v2/Feature_Cases/Scenario_Update_case_priority_returns_Bad_Request_response.yaml rename to tests/scenarios/cassettes/TestScenarios/v2/Feature_Case_Management/Scenario_Update_case_priority_returns_Bad_Request_response.yaml index 25ce912a2a4..91cecbb50b1 100644 --- a/tests/scenarios/cassettes/TestScenarios/v2/Feature_Cases/Scenario_Update_case_priority_returns_Bad_Request_response.yaml +++ b/tests/scenarios/cassettes/TestScenarios/v2/Feature_Case_Management/Scenario_Update_case_priority_returns_Bad_Request_response.yaml @@ -12,9 +12,8 @@ interactions: method: POST url: https://api.datadoghq.com/api/v2/cases response: - body: '{"data":{"id":"09077090-4370-4539-b9e5-445173f4fced","type":"case","attributes":{"attributes":{},"created_at":"2024-02-07T18:00:44.06773183Z","creation_source":"MANUAL","description":"","insights":[],"internal_id":"09077090-4370-4539-b9e5-445173f4fced","key":"DDFC-12","priority":"P4","public_id":"72","status":"OPEN","title":"My - new case","type":"STANDARD"},"relationships":{"created_by":{"data":{"id":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","type":"user"}},"project":{"data":{"id":"d4bbe1af-f36e-42f1-87c1-493ca35c320e","type":"project"}}}},"included":[{"id":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","type":"user","attributes":{"email":"team-intg-tools-libs-spam@datadoghq.com","handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI - Account"}}]}' + body: '{"data":{"id":"683c81be-fa27-42c8-957c-897923a2f660","type":"case","attributes":{"attributes":{},"created_at":"2024-02-14T18:55:18.846163387Z","creation_source":"MANUAL","description":"","insights":[],"internal_id":"683c81be-fa27-42c8-957c-897923a2f660","key":"DDFC-192","priority":"P4","public_id":"252","status":"OPEN","title":"My + new case","type":"STANDARD"},"relationships":{"created_by":{"data":{"id":"3ad549bf-eba0-11e9-a77a-0705486660d0","type":"user"}},"project":{"data":{"id":"d4bbe1af-f36e-42f1-87c1-493ca35c320e","type":"project"}}}},"included":[{"id":"3ad549bf-eba0-11e9-a77a-0705486660d0","type":"user","attributes":{"email":"frog@datadoghq.com","handle":"frog@datadoghq.com","name":""}}]}' code: 201 duration: 0ms headers: @@ -32,10 +31,10 @@ interactions: - application/json id: 1 method: POST - url: https://api.datadoghq.com/api/v2/cases/09077090-4370-4539-b9e5-445173f4fced/priority + url: https://api.datadoghq.com/api/v2/cases/683c81be-fa27-42c8-957c-897923a2f660/priority response: body: '{"errors":[{"title":"Generic Error","detail":"invalid priority P1234. Must - be one of P3, P4, P5, NOT_DEFINED, P1, P2"}]}' + be one of P1, P2, P3, P4, P5, NOT_DEFINED"}]}' code: 400 duration: 0ms headers: diff --git a/tests/scenarios/cassettes/TestScenarios/v2/Feature_Case_Management/Scenario_Update_case_priority_returns_Not_Found_response.freeze b/tests/scenarios/cassettes/TestScenarios/v2/Feature_Case_Management/Scenario_Update_case_priority_returns_Not_Found_response.freeze new file mode 100644 index 00000000000..e6fee30e9dc --- /dev/null +++ b/tests/scenarios/cassettes/TestScenarios/v2/Feature_Case_Management/Scenario_Update_case_priority_returns_Not_Found_response.freeze @@ -0,0 +1 @@ +2024-02-14T18:55:18.927Z \ No newline at end of file diff --git a/tests/scenarios/cassettes/TestScenarios/v2/Feature_Cases/Scenario_Update_case_priority_returns_Not_Found_response.yaml b/tests/scenarios/cassettes/TestScenarios/v2/Feature_Case_Management/Scenario_Update_case_priority_returns_Not_Found_response.yaml similarity index 100% rename from tests/scenarios/cassettes/TestScenarios/v2/Feature_Cases/Scenario_Update_case_priority_returns_Not_Found_response.yaml rename to tests/scenarios/cassettes/TestScenarios/v2/Feature_Case_Management/Scenario_Update_case_priority_returns_Not_Found_response.yaml diff --git a/tests/scenarios/cassettes/TestScenarios/v2/Feature_Case_Management/Scenario_Update_case_priority_returns_OK_response.freeze b/tests/scenarios/cassettes/TestScenarios/v2/Feature_Case_Management/Scenario_Update_case_priority_returns_OK_response.freeze new file mode 100644 index 00000000000..42fe59de7b3 --- /dev/null +++ b/tests/scenarios/cassettes/TestScenarios/v2/Feature_Case_Management/Scenario_Update_case_priority_returns_OK_response.freeze @@ -0,0 +1 @@ +2024-02-14T18:55:19.004Z \ No newline at end of file diff --git a/tests/scenarios/cassettes/TestScenarios/v2/Feature_Case_Management/Scenario_Update_case_priority_returns_OK_response.yaml b/tests/scenarios/cassettes/TestScenarios/v2/Feature_Case_Management/Scenario_Update_case_priority_returns_OK_response.yaml new file mode 100644 index 00000000000..51f395f7347 --- /dev/null +++ b/tests/scenarios/cassettes/TestScenarios/v2/Feature_Case_Management/Scenario_Update_case_priority_returns_OK_response.yaml @@ -0,0 +1,44 @@ +interactions: +- request: + body: | + {"data":{"attributes":{"priority":"P4","title":"My new case","type":"STANDARD"},"relationships":{"project":{"data":{"id":"d4bbe1af-f36e-42f1-87c1-493ca35c320e","type":"project"}}},"type":"case"}} + form: {} + headers: + Accept: + - application/json + Content-Type: + - application/json + id: 0 + method: POST + url: https://api.datadoghq.com/api/v2/cases + response: + body: '{"data":{"id":"c55de906-a08b-4916-ade3-5f1b268379c3","type":"case","attributes":{"attributes":{},"created_at":"2024-02-14T18:55:19.080339451Z","creation_source":"MANUAL","description":"","insights":[],"internal_id":"c55de906-a08b-4916-ade3-5f1b268379c3","key":"DDFC-193","priority":"P4","public_id":"253","status":"OPEN","title":"My + new case","type":"STANDARD"},"relationships":{"created_by":{"data":{"id":"3ad549bf-eba0-11e9-a77a-0705486660d0","type":"user"}},"project":{"data":{"id":"d4bbe1af-f36e-42f1-87c1-493ca35c320e","type":"project"}}}},"included":[{"id":"3ad549bf-eba0-11e9-a77a-0705486660d0","type":"user","attributes":{"email":"frog@datadoghq.com","handle":"frog@datadoghq.com","name":""}}]}' + code: 201 + duration: 0ms + headers: + Content-Type: + - application/vnd.api+json + status: 201 Created +- request: + body: | + {"data":{"attributes":{"priority":"P3"},"type":"case"}} + form: {} + headers: + Accept: + - application/json + Content-Type: + - application/json + id: 1 + method: POST + url: https://api.datadoghq.com/api/v2/cases/c55de906-a08b-4916-ade3-5f1b268379c3/priority + response: + body: '{"data":{"id":"c55de906-a08b-4916-ade3-5f1b268379c3","type":"case","attributes":{"attributes":{},"created_at":"2024-02-14T18:55:19.080339Z","creation_source":"MANUAL","description":"","insights":[],"internal_id":"c55de906-a08b-4916-ade3-5f1b268379c3","key":"DDFC-193","modified_at":"2024-02-14T18:55:19.160763Z","priority":"P3","public_id":"253","status":"OPEN","title":"My + new case","type":"STANDARD"},"relationships":{"created_by":{"data":{"id":"3ad549bf-eba0-11e9-a77a-0705486660d0","type":"user"}},"modified_by":{"data":{"id":"3ad549bf-eba0-11e9-a77a-0705486660d0","type":"user"}},"project":{"data":{"id":"d4bbe1af-f36e-42f1-87c1-493ca35c320e","type":"project"}}}},"included":[{"id":"3ad549bf-eba0-11e9-a77a-0705486660d0","type":"user","attributes":{"email":"frog@datadoghq.com","handle":"frog@datadoghq.com","name":""}}]}' + code: 200 + duration: 0ms + headers: + Content-Type: + - application/vnd.api+json + status: 200 OK +version: 2 diff --git a/tests/scenarios/cassettes/TestScenarios/v2/Feature_Case_Management/Scenario_Update_case_status_returns_Bad_Request_response.freeze b/tests/scenarios/cassettes/TestScenarios/v2/Feature_Case_Management/Scenario_Update_case_status_returns_Bad_Request_response.freeze new file mode 100644 index 00000000000..1c1c338c0f2 --- /dev/null +++ b/tests/scenarios/cassettes/TestScenarios/v2/Feature_Case_Management/Scenario_Update_case_status_returns_Bad_Request_response.freeze @@ -0,0 +1 @@ +2024-02-14T18:55:19.178Z \ No newline at end of file diff --git a/tests/scenarios/cassettes/TestScenarios/v2/Feature_Cases/Scenario_Update_case_status_returns_Bad_Request_response.yaml b/tests/scenarios/cassettes/TestScenarios/v2/Feature_Case_Management/Scenario_Update_case_status_returns_Bad_Request_response.yaml similarity index 62% rename from tests/scenarios/cassettes/TestScenarios/v2/Feature_Cases/Scenario_Update_case_status_returns_Bad_Request_response.yaml rename to tests/scenarios/cassettes/TestScenarios/v2/Feature_Case_Management/Scenario_Update_case_status_returns_Bad_Request_response.yaml index 6582c75c27b..799a4bead21 100644 --- a/tests/scenarios/cassettes/TestScenarios/v2/Feature_Cases/Scenario_Update_case_status_returns_Bad_Request_response.yaml +++ b/tests/scenarios/cassettes/TestScenarios/v2/Feature_Case_Management/Scenario_Update_case_status_returns_Bad_Request_response.yaml @@ -12,9 +12,8 @@ interactions: method: POST url: https://api.datadoghq.com/api/v2/cases response: - body: '{"data":{"id":"243feddb-69f8-4e22-988a-8ae954b643fa","type":"case","attributes":{"attributes":{},"created_at":"2024-02-07T18:00:45.265151303Z","creation_source":"MANUAL","description":"","insights":[],"internal_id":"243feddb-69f8-4e22-988a-8ae954b643fa","key":"DDFC-14","priority":"P4","public_id":"74","status":"OPEN","title":"My - new case","type":"STANDARD"},"relationships":{"created_by":{"data":{"id":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","type":"user"}},"project":{"data":{"id":"d4bbe1af-f36e-42f1-87c1-493ca35c320e","type":"project"}}}},"included":[{"id":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","type":"user","attributes":{"email":"team-intg-tools-libs-spam@datadoghq.com","handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI - Account"}}]}' + body: '{"data":{"id":"1732a7a1-667c-45e4-ad8c-73a1c1f9f6f0","type":"case","attributes":{"attributes":{},"created_at":"2024-02-14T18:55:19.251201316Z","creation_source":"MANUAL","description":"","insights":[],"internal_id":"1732a7a1-667c-45e4-ad8c-73a1c1f9f6f0","key":"DDFC-194","priority":"P4","public_id":"254","status":"OPEN","title":"My + new case","type":"STANDARD"},"relationships":{"created_by":{"data":{"id":"3ad549bf-eba0-11e9-a77a-0705486660d0","type":"user"}},"project":{"data":{"id":"d4bbe1af-f36e-42f1-87c1-493ca35c320e","type":"project"}}}},"included":[{"id":"3ad549bf-eba0-11e9-a77a-0705486660d0","type":"user","attributes":{"email":"frog@datadoghq.com","handle":"frog@datadoghq.com","name":""}}]}' code: 201 duration: 0ms headers: @@ -32,10 +31,10 @@ interactions: - application/json id: 1 method: POST - url: https://api.datadoghq.com/api/v2/cases/243feddb-69f8-4e22-988a-8ae954b643fa/status + url: https://api.datadoghq.com/api/v2/cases/1732a7a1-667c-45e4-ad8c-73a1c1f9f6f0/status response: body: '{"errors":[{"title":"Generic Error","detail":"invalid status OPENED. Must - be one of CLOSED, SUNKNOWN, OPEN, IN_PROGRESS"}]}' + be one of SUNKNOWN, OPEN, IN_PROGRESS, CLOSED"}]}' code: 400 duration: 0ms headers: diff --git a/tests/scenarios/cassettes/TestScenarios/v2/Feature_Case_Management/Scenario_Update_case_status_returns_Not_Found_response.freeze b/tests/scenarios/cassettes/TestScenarios/v2/Feature_Case_Management/Scenario_Update_case_status_returns_Not_Found_response.freeze new file mode 100644 index 00000000000..3725bea8b61 --- /dev/null +++ b/tests/scenarios/cassettes/TestScenarios/v2/Feature_Case_Management/Scenario_Update_case_status_returns_Not_Found_response.freeze @@ -0,0 +1 @@ +2024-02-14T18:55:19.338Z \ No newline at end of file diff --git a/tests/scenarios/cassettes/TestScenarios/v2/Feature_Cases/Scenario_Update_case_status_returns_Not_Found_response.yaml b/tests/scenarios/cassettes/TestScenarios/v2/Feature_Case_Management/Scenario_Update_case_status_returns_Not_Found_response.yaml similarity index 100% rename from tests/scenarios/cassettes/TestScenarios/v2/Feature_Cases/Scenario_Update_case_status_returns_Not_Found_response.yaml rename to tests/scenarios/cassettes/TestScenarios/v2/Feature_Case_Management/Scenario_Update_case_status_returns_Not_Found_response.yaml diff --git a/tests/scenarios/cassettes/TestScenarios/v2/Feature_Case_Management/Scenario_Update_case_status_returns_OK_response.freeze b/tests/scenarios/cassettes/TestScenarios/v2/Feature_Case_Management/Scenario_Update_case_status_returns_OK_response.freeze new file mode 100644 index 00000000000..a7c1161cdca --- /dev/null +++ b/tests/scenarios/cassettes/TestScenarios/v2/Feature_Case_Management/Scenario_Update_case_status_returns_OK_response.freeze @@ -0,0 +1 @@ +2024-02-14T18:55:19.415Z \ No newline at end of file diff --git a/tests/scenarios/cassettes/TestScenarios/v2/Feature_Case_Management/Scenario_Update_case_status_returns_OK_response.yaml b/tests/scenarios/cassettes/TestScenarios/v2/Feature_Case_Management/Scenario_Update_case_status_returns_OK_response.yaml new file mode 100644 index 00000000000..72b81221419 --- /dev/null +++ b/tests/scenarios/cassettes/TestScenarios/v2/Feature_Case_Management/Scenario_Update_case_status_returns_OK_response.yaml @@ -0,0 +1,44 @@ +interactions: +- request: + body: | + {"data":{"attributes":{"priority":"P4","title":"My new case","type":"STANDARD"},"relationships":{"project":{"data":{"id":"d4bbe1af-f36e-42f1-87c1-493ca35c320e","type":"project"}}},"type":"case"}} + form: {} + headers: + Accept: + - application/json + Content-Type: + - application/json + id: 0 + method: POST + url: https://api.datadoghq.com/api/v2/cases + response: + body: '{"data":{"id":"d1633979-1770-4e5b-a2d0-2ede9f2a8f43","type":"case","attributes":{"attributes":{},"created_at":"2024-02-14T18:55:19.487094769Z","creation_source":"MANUAL","description":"","insights":[],"internal_id":"d1633979-1770-4e5b-a2d0-2ede9f2a8f43","key":"DDFC-195","priority":"P4","public_id":"255","status":"OPEN","title":"My + new case","type":"STANDARD"},"relationships":{"created_by":{"data":{"id":"3ad549bf-eba0-11e9-a77a-0705486660d0","type":"user"}},"project":{"data":{"id":"d4bbe1af-f36e-42f1-87c1-493ca35c320e","type":"project"}}}},"included":[{"id":"3ad549bf-eba0-11e9-a77a-0705486660d0","type":"user","attributes":{"email":"frog@datadoghq.com","handle":"frog@datadoghq.com","name":""}}]}' + code: 201 + duration: 0ms + headers: + Content-Type: + - application/vnd.api+json + status: 201 Created +- request: + body: | + {"data":{"attributes":{"status":"IN_PROGRESS"},"type":"case"}} + form: {} + headers: + Accept: + - application/json + Content-Type: + - application/json + id: 1 + method: POST + url: https://api.datadoghq.com/api/v2/cases/d1633979-1770-4e5b-a2d0-2ede9f2a8f43/status + response: + body: '{"data":{"id":"d1633979-1770-4e5b-a2d0-2ede9f2a8f43","type":"case","attributes":{"attributes":{},"created_at":"2024-02-14T18:55:19.487095Z","creation_source":"MANUAL","description":"","insights":[],"internal_id":"d1633979-1770-4e5b-a2d0-2ede9f2a8f43","key":"DDFC-195","modified_at":"2024-02-14T18:55:19.559421Z","priority":"P4","public_id":"255","status":"IN_PROGRESS","title":"My + new case","type":"STANDARD"},"relationships":{"created_by":{"data":{"id":"3ad549bf-eba0-11e9-a77a-0705486660d0","type":"user"}},"modified_by":{"data":{"id":"3ad549bf-eba0-11e9-a77a-0705486660d0","type":"user"}},"project":{"data":{"id":"d4bbe1af-f36e-42f1-87c1-493ca35c320e","type":"project"}}}},"included":[{"id":"3ad549bf-eba0-11e9-a77a-0705486660d0","type":"user","attributes":{"email":"frog@datadoghq.com","handle":"frog@datadoghq.com","name":""}}]}' + code: 200 + duration: 0ms + headers: + Content-Type: + - application/vnd.api+json + status: 200 OK +version: 2 diff --git a/tests/scenarios/cassettes/TestScenarios/v2/Feature_Cases/Scenario_Archive_case_returns_Bad_Request_response.freeze b/tests/scenarios/cassettes/TestScenarios/v2/Feature_Cases/Scenario_Archive_case_returns_Bad_Request_response.freeze deleted file mode 100644 index ef6c63cf9ee..00000000000 --- a/tests/scenarios/cassettes/TestScenarios/v2/Feature_Cases/Scenario_Archive_case_returns_Bad_Request_response.freeze +++ /dev/null @@ -1 +0,0 @@ -2024-02-07T18:00:35.988Z \ No newline at end of file diff --git a/tests/scenarios/cassettes/TestScenarios/v2/Feature_Cases/Scenario_Archive_case_returns_Not_Found_response.freeze b/tests/scenarios/cassettes/TestScenarios/v2/Feature_Cases/Scenario_Archive_case_returns_Not_Found_response.freeze deleted file mode 100644 index 6b42677b0f5..00000000000 --- a/tests/scenarios/cassettes/TestScenarios/v2/Feature_Cases/Scenario_Archive_case_returns_Not_Found_response.freeze +++ /dev/null @@ -1 +0,0 @@ -2024-02-07T13:09:07.949Z \ No newline at end of file diff --git a/tests/scenarios/cassettes/TestScenarios/v2/Feature_Cases/Scenario_Archive_case_returns_OK_response.freeze b/tests/scenarios/cassettes/TestScenarios/v2/Feature_Cases/Scenario_Archive_case_returns_OK_response.freeze deleted file mode 100644 index 558899ce6da..00000000000 --- a/tests/scenarios/cassettes/TestScenarios/v2/Feature_Cases/Scenario_Archive_case_returns_OK_response.freeze +++ /dev/null @@ -1 +0,0 @@ -2024-02-07T18:00:36.901Z \ No newline at end of file diff --git a/tests/scenarios/cassettes/TestScenarios/v2/Feature_Cases/Scenario_Archive_case_returns_OK_response.yaml b/tests/scenarios/cassettes/TestScenarios/v2/Feature_Cases/Scenario_Archive_case_returns_OK_response.yaml deleted file mode 100644 index f25e3103e9c..00000000000 --- a/tests/scenarios/cassettes/TestScenarios/v2/Feature_Cases/Scenario_Archive_case_returns_OK_response.yaml +++ /dev/null @@ -1,46 +0,0 @@ -interactions: -- request: - body: | - {"data":{"attributes":{"priority":"P4","title":"My new case","type":"STANDARD"},"relationships":{"project":{"data":{"id":"d4bbe1af-f36e-42f1-87c1-493ca35c320e","type":"project"}}},"type":"case"}} - form: {} - headers: - Accept: - - application/json - Content-Type: - - application/json - id: 0 - method: POST - url: https://api.datadoghq.com/api/v2/cases - response: - body: '{"data":{"id":"99e6e8cd-f115-4168-8814-30776007f44c","type":"case","attributes":{"attributes":{},"created_at":"2024-02-07T18:00:37.185776261Z","creation_source":"MANUAL","description":"","insights":[],"internal_id":"99e6e8cd-f115-4168-8814-30776007f44c","key":"DDFC-3","priority":"P4","public_id":"63","status":"OPEN","title":"My - new case","type":"STANDARD"},"relationships":{"created_by":{"data":{"id":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","type":"user"}},"project":{"data":{"id":"d4bbe1af-f36e-42f1-87c1-493ca35c320e","type":"project"}}}},"included":[{"id":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","type":"user","attributes":{"email":"team-intg-tools-libs-spam@datadoghq.com","handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI - Account"}}]}' - code: 201 - duration: 0ms - headers: - Content-Type: - - application/vnd.api+json - status: 201 Created -- request: - body: | - {"data":{"type":"case"}} - form: {} - headers: - Accept: - - application/json - Content-Type: - - application/json - id: 1 - method: POST - url: https://api.datadoghq.com/api/v2/cases/99e6e8cd-f115-4168-8814-30776007f44c/archive - response: - body: '{"data":{"id":"99e6e8cd-f115-4168-8814-30776007f44c","type":"case","attributes":{"archived_at":"2024-02-07T18:00:37.47125606Z","attributes":{},"created_at":"2024-02-07T18:00:37.185776Z","creation_source":"MANUAL","description":"","insights":[],"internal_id":"99e6e8cd-f115-4168-8814-30776007f44c","key":"DDFC-3","priority":"P4","public_id":"63","status":"OPEN","title":"My - new case","type":"STANDARD"},"relationships":{"created_by":{"data":{"id":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","type":"user"}},"modified_by":{"data":{"id":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","type":"user"}},"project":{"data":{"id":"d4bbe1af-f36e-42f1-87c1-493ca35c320e","type":"project"}}}},"included":[{"id":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","type":"user","attributes":{"email":"team-intg-tools-libs-spam@datadoghq.com","handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI - Account"}}]}' - code: 200 - duration: 0ms - headers: - Content-Type: - - application/vnd.api+json - status: 200 OK -version: 2 diff --git a/tests/scenarios/cassettes/TestScenarios/v2/Feature_Cases/Scenario_Assign_case_returns_Bad_Request_response.freeze b/tests/scenarios/cassettes/TestScenarios/v2/Feature_Cases/Scenario_Assign_case_returns_Bad_Request_response.freeze deleted file mode 100644 index 9f1a33f2842..00000000000 --- a/tests/scenarios/cassettes/TestScenarios/v2/Feature_Cases/Scenario_Assign_case_returns_Bad_Request_response.freeze +++ /dev/null @@ -1 +0,0 @@ -2024-02-12T13:25:55.665Z \ No newline at end of file diff --git a/tests/scenarios/cassettes/TestScenarios/v2/Feature_Cases/Scenario_Assign_case_returns_Not_Found_response.freeze b/tests/scenarios/cassettes/TestScenarios/v2/Feature_Cases/Scenario_Assign_case_returns_Not_Found_response.freeze deleted file mode 100644 index 1f0ce04277c..00000000000 --- a/tests/scenarios/cassettes/TestScenarios/v2/Feature_Cases/Scenario_Assign_case_returns_Not_Found_response.freeze +++ /dev/null @@ -1 +0,0 @@ -2024-02-07T13:09:08.433Z \ No newline at end of file diff --git a/tests/scenarios/cassettes/TestScenarios/v2/Feature_Cases/Scenario_Assign_case_returns_OK_response.freeze b/tests/scenarios/cassettes/TestScenarios/v2/Feature_Cases/Scenario_Assign_case_returns_OK_response.freeze deleted file mode 100644 index 5b2d1f17d03..00000000000 --- a/tests/scenarios/cassettes/TestScenarios/v2/Feature_Cases/Scenario_Assign_case_returns_OK_response.freeze +++ /dev/null @@ -1 +0,0 @@ -2024-02-07T18:00:38.147Z \ No newline at end of file diff --git a/tests/scenarios/cassettes/TestScenarios/v2/Feature_Cases/Scenario_Assign_case_returns_OK_response.yaml b/tests/scenarios/cassettes/TestScenarios/v2/Feature_Cases/Scenario_Assign_case_returns_OK_response.yaml deleted file mode 100644 index ffd7db5f2eb..00000000000 --- a/tests/scenarios/cassettes/TestScenarios/v2/Feature_Cases/Scenario_Assign_case_returns_OK_response.yaml +++ /dev/null @@ -1,84 +0,0 @@ -interactions: -- request: - body: | - {"data":{"attributes":{"priority":"P4","title":"My new case","type":"STANDARD"},"relationships":{"project":{"data":{"id":"d4bbe1af-f36e-42f1-87c1-493ca35c320e","type":"project"}}},"type":"case"}} - form: {} - headers: - Accept: - - application/json - Content-Type: - - application/json - id: 0 - method: POST - url: https://api.datadoghq.com/api/v2/cases - response: - body: '{"data":{"id":"a0801fce-a045-4b66-ad78-effcd959fa4f","type":"case","attributes":{"attributes":{},"created_at":"2024-02-07T18:00:38.353039559Z","creation_source":"MANUAL","description":"","insights":[],"internal_id":"a0801fce-a045-4b66-ad78-effcd959fa4f","key":"DDFC-5","priority":"P4","public_id":"65","status":"OPEN","title":"My - new case","type":"STANDARD"},"relationships":{"created_by":{"data":{"id":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","type":"user"}},"project":{"data":{"id":"d4bbe1af-f36e-42f1-87c1-493ca35c320e","type":"project"}}}},"included":[{"id":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","type":"user","attributes":{"email":"team-intg-tools-libs-spam@datadoghq.com","handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI - Account"}}]}' - code: 201 - duration: 0ms - headers: - Content-Type: - - application/vnd.api+json - status: 201 Created -- request: - body: | - {"data":{"attributes":{"email":"Test-Assign_case_returns_OK_response-1707328838@datadoghq.com","title":"user title"},"type":"users"}} - form: {} - headers: - Accept: - - application/json - Content-Type: - - application/json - id: 1 - method: POST - url: https://api.datadoghq.com/api/v2/users - response: - body: '{"data":{"type":"users","id":"cced7029-c5e2-11ee-ac63-c24751e8bab0","attributes":{"name":null,"handle":"test-assign_case_returns_ok_response-1707328838@datadoghq.com","created_at":"2024-02-07T18:00:38.645791+00:00","modified_at":"2024-02-07T18:00:38.645791+00:00","email":"test-assign_case_returns_ok_response-1707328838@datadoghq.com","icon":"https://secure.gravatar.com/avatar/dd4005a3eca9e7c6aed30c77d193bc37?s=48&d=retro","title":"user - title","verified":false,"service_account":false,"disabled":false,"allowed_login_methods":[],"status":"Pending"},"relationships":{"roles":{"data":[]},"org":{"data":{"type":"orgs","id":"4dee724d-00cc-11ea-a77b-570c9d03c6c5"}}}}} - - ' - code: 201 - duration: 0ms - headers: - Content-Type: - - application/json - status: 201 Created -- request: - body: | - {"data":{"attributes":{"assignee_id":"cced7029-c5e2-11ee-ac63-c24751e8bab0"},"type":"case"}} - form: {} - headers: - Accept: - - application/json - Content-Type: - - application/json - id: 2 - method: POST - url: https://api.datadoghq.com/api/v2/cases/a0801fce-a045-4b66-ad78-effcd959fa4f/assign - response: - body: '{"data":{"id":"a0801fce-a045-4b66-ad78-effcd959fa4f","type":"case","attributes":{"attributes":{},"created_at":"2024-02-07T18:00:38.35304Z","creation_source":"MANUAL","description":"","insights":[],"internal_id":"a0801fce-a045-4b66-ad78-effcd959fa4f","key":"DDFC-5","modified_at":"2024-02-07T18:00:39.010235Z","priority":"P4","public_id":"65","status":"OPEN","title":"My - new case","type":"STANDARD"},"relationships":{"assignee":{"data":{"id":"cced7029-c5e2-11ee-ac63-c24751e8bab0","type":"user"}},"created_by":{"data":{"id":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","type":"user"}},"modified_by":{"data":{"id":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","type":"user"}},"project":{"data":{"id":"d4bbe1af-f36e-42f1-87c1-493ca35c320e","type":"project"}}}},"included":[{"id":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","type":"user","attributes":{"email":"team-intg-tools-libs-spam@datadoghq.com","handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI - Account"}},{"id":"cced7029-c5e2-11ee-ac63-c24751e8bab0","type":"user","attributes":{"email":"test-assign_case_returns_ok_response-1707328838@datadoghq.com","handle":"test-assign_case_returns_ok_response-1707328838@datadoghq.com","name":""}}]}' - code: 200 - duration: 0ms - headers: - Content-Type: - - application/vnd.api+json - status: 200 OK -- request: - body: '' - form: {} - headers: - Accept: - - '*/*' - id: 3 - method: DELETE - url: https://api.datadoghq.com/api/v2/users/cced7029-c5e2-11ee-ac63-c24751e8bab0 - response: - body: '' - code: 204 - duration: 0ms - headers: {} - status: 204 No Content -version: 2 diff --git a/tests/scenarios/cassettes/TestScenarios/v2/Feature_Cases/Scenario_Create_a_case_returns_Bad_Request_response.freeze b/tests/scenarios/cassettes/TestScenarios/v2/Feature_Cases/Scenario_Create_a_case_returns_Bad_Request_response.freeze deleted file mode 100644 index 14b7cfa0a25..00000000000 --- a/tests/scenarios/cassettes/TestScenarios/v2/Feature_Cases/Scenario_Create_a_case_returns_Bad_Request_response.freeze +++ /dev/null @@ -1 +0,0 @@ -2024-02-07T13:09:09.415Z \ No newline at end of file diff --git a/tests/scenarios/cassettes/TestScenarios/v2/Feature_Cases/Scenario_Create_a_case_returns_CREATED_response.freeze b/tests/scenarios/cassettes/TestScenarios/v2/Feature_Cases/Scenario_Create_a_case_returns_CREATED_response.freeze deleted file mode 100644 index 1132edd29cf..00000000000 --- a/tests/scenarios/cassettes/TestScenarios/v2/Feature_Cases/Scenario_Create_a_case_returns_CREATED_response.freeze +++ /dev/null @@ -1 +0,0 @@ -2024-02-07T18:00:39.566Z \ No newline at end of file diff --git a/tests/scenarios/cassettes/TestScenarios/v2/Feature_Cases/Scenario_Create_a_case_returns_CREATED_response.yaml b/tests/scenarios/cassettes/TestScenarios/v2/Feature_Cases/Scenario_Create_a_case_returns_CREATED_response.yaml deleted file mode 100644 index 8248e92c56c..00000000000 --- a/tests/scenarios/cassettes/TestScenarios/v2/Feature_Cases/Scenario_Create_a_case_returns_CREATED_response.yaml +++ /dev/null @@ -1,62 +0,0 @@ -interactions: -- request: - body: | - {"data":{"attributes":{"email":"Test-Create_a_case_returns_CREATED_response-1707328839@datadoghq.com","title":"user title"},"type":"users"}} - form: {} - headers: - Accept: - - application/json - Content-Type: - - application/json - id: 0 - method: POST - url: https://api.datadoghq.com/api/v2/users - response: - body: '{"data":{"type":"users","id":"cda929dc-c5e2-11ee-883d-6ad03867f364","attributes":{"name":null,"handle":"test-create_a_case_returns_created_response-1707328839@datadoghq.com","created_at":"2024-02-07T18:00:39.876070+00:00","modified_at":"2024-02-07T18:00:39.876070+00:00","email":"test-create_a_case_returns_created_response-1707328839@datadoghq.com","icon":"https://secure.gravatar.com/avatar/e564f62a22caae2dd8e878a8d73c6328?s=48&d=retro","title":"user - title","verified":false,"service_account":false,"disabled":false,"allowed_login_methods":[],"status":"Pending"},"relationships":{"roles":{"data":[]},"org":{"data":{"type":"orgs","id":"4dee724d-00cc-11ea-a77b-570c9d03c6c5"}}}}} - - ' - code: 201 - duration: 0ms - headers: - Content-Type: - - application/json - status: 201 Created -- request: - body: | - {"data":{"attributes":{"priority":"NOT_DEFINED","title":"Security breach investigation in 3b9b6a6abdcf0b9b","type":"STANDARD"},"relationships":{"assignee":{"data":{"id":"cda929dc-c5e2-11ee-883d-6ad03867f364","type":"user"}},"project":{"data":{"id":"d4bbe1af-f36e-42f1-87c1-493ca35c320e","type":"project"}}},"type":"case"}} - form: {} - headers: - Accept: - - application/json - Content-Type: - - application/json - id: 1 - method: POST - url: https://api.datadoghq.com/api/v2/cases - response: - body: '{"data":{"id":"4045de8b-3808-4bb6-94c9-f55ced4811c7","type":"case","attributes":{"attributes":{},"created_at":"2024-02-07T18:00:40.197151067Z","creation_source":"MANUAL","description":"","insights":[],"internal_id":"4045de8b-3808-4bb6-94c9-f55ced4811c7","key":"DDFC-6","priority":"NOT_DEFINED","public_id":"66","status":"OPEN","title":"Security - breach investigation in 3b9b6a6abdcf0b9b","type":"STANDARD"},"relationships":{"assignee":{"data":{"id":"cda929dc-c5e2-11ee-883d-6ad03867f364","type":"user"}},"created_by":{"data":{"id":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","type":"user"}},"project":{"data":{"id":"d4bbe1af-f36e-42f1-87c1-493ca35c320e","type":"project"}}}},"included":[{"id":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","type":"user","attributes":{"email":"team-intg-tools-libs-spam@datadoghq.com","handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI - Account"}},{"id":"cda929dc-c5e2-11ee-883d-6ad03867f364","type":"user","attributes":{"email":"test-create_a_case_returns_created_response-1707328839@datadoghq.com","handle":"test-create_a_case_returns_created_response-1707328839@datadoghq.com","name":""}}]}' - code: 201 - duration: 0ms - headers: - Content-Type: - - application/vnd.api+json - status: 201 Created -- request: - body: '' - form: {} - headers: - Accept: - - '*/*' - id: 2 - method: DELETE - url: https://api.datadoghq.com/api/v2/users/cda929dc-c5e2-11ee-883d-6ad03867f364 - response: - body: '' - code: 204 - duration: 0ms - headers: {} - status: 204 No Content -version: 2 diff --git a/tests/scenarios/cassettes/TestScenarios/v2/Feature_Cases/Scenario_Get_the_details_of_a_case_returns_Not_Found_response.freeze b/tests/scenarios/cassettes/TestScenarios/v2/Feature_Cases/Scenario_Get_the_details_of_a_case_returns_Not_Found_response.freeze deleted file mode 100644 index 3601a30777b..00000000000 --- a/tests/scenarios/cassettes/TestScenarios/v2/Feature_Cases/Scenario_Get_the_details_of_a_case_returns_Not_Found_response.freeze +++ /dev/null @@ -1 +0,0 @@ -2024-02-07T13:09:09.931Z \ No newline at end of file diff --git a/tests/scenarios/cassettes/TestScenarios/v2/Feature_Cases/Scenario_Get_the_details_of_a_case_returns_OK_response.freeze b/tests/scenarios/cassettes/TestScenarios/v2/Feature_Cases/Scenario_Get_the_details_of_a_case_returns_OK_response.freeze deleted file mode 100644 index a1285495136..00000000000 --- a/tests/scenarios/cassettes/TestScenarios/v2/Feature_Cases/Scenario_Get_the_details_of_a_case_returns_OK_response.freeze +++ /dev/null @@ -1 +0,0 @@ -2024-02-07T18:00:40.743Z \ No newline at end of file diff --git a/tests/scenarios/cassettes/TestScenarios/v2/Feature_Cases/Scenario_Get_the_details_of_a_case_returns_OK_response.yaml b/tests/scenarios/cassettes/TestScenarios/v2/Feature_Cases/Scenario_Get_the_details_of_a_case_returns_OK_response.yaml deleted file mode 100644 index 55be4e3f1d8..00000000000 --- a/tests/scenarios/cassettes/TestScenarios/v2/Feature_Cases/Scenario_Get_the_details_of_a_case_returns_OK_response.yaml +++ /dev/null @@ -1,43 +0,0 @@ -interactions: -- request: - body: | - {"data":{"attributes":{"priority":"P4","title":"My new case","type":"STANDARD"},"relationships":{"project":{"data":{"id":"d4bbe1af-f36e-42f1-87c1-493ca35c320e","type":"project"}}},"type":"case"}} - form: {} - headers: - Accept: - - application/json - Content-Type: - - application/json - id: 0 - method: POST - url: https://api.datadoghq.com/api/v2/cases - response: - body: '{"data":{"id":"8fd1a1c3-3f55-4d6b-807f-ca70bc0e5749","type":"case","attributes":{"attributes":{},"created_at":"2024-02-07T18:00:41.007812312Z","creation_source":"MANUAL","description":"","insights":[],"internal_id":"8fd1a1c3-3f55-4d6b-807f-ca70bc0e5749","key":"DDFC-7","priority":"P4","public_id":"67","status":"OPEN","title":"My - new case","type":"STANDARD"},"relationships":{"created_by":{"data":{"id":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","type":"user"}},"project":{"data":{"id":"d4bbe1af-f36e-42f1-87c1-493ca35c320e","type":"project"}}}},"included":[{"id":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","type":"user","attributes":{"email":"team-intg-tools-libs-spam@datadoghq.com","handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI - Account"}}]}' - code: 201 - duration: 0ms - headers: - Content-Type: - - application/vnd.api+json - status: 201 Created -- request: - body: '' - form: {} - headers: - Accept: - - application/json - id: 1 - method: GET - url: https://api.datadoghq.com/api/v2/cases/8fd1a1c3-3f55-4d6b-807f-ca70bc0e5749 - response: - body: '{"data":{"id":"8fd1a1c3-3f55-4d6b-807f-ca70bc0e5749","type":"case","attributes":{"attributes":{},"created_at":"2024-02-07T18:00:41.007812Z","creation_source":"MANUAL","description":"","insights":[],"internal_id":"8fd1a1c3-3f55-4d6b-807f-ca70bc0e5749","key":"DDFC-7","priority":"P4","public_id":"67","status":"OPEN","title":"My - new case","type":"STANDARD"},"relationships":{"created_by":{"data":{"id":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","type":"user"}},"project":{"data":{"id":"d4bbe1af-f36e-42f1-87c1-493ca35c320e","type":"project"}}}},"included":[{"id":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","type":"user","attributes":{"email":"team-intg-tools-libs-spam@datadoghq.com","handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI - Account"}}]}' - code: 200 - duration: 0ms - headers: - Content-Type: - - application/vnd.api+json - status: 200 OK -version: 2 diff --git a/tests/scenarios/cassettes/TestScenarios/v2/Feature_Cases/Scenario_Unarchive_case_returns_Bad_Request_response.freeze b/tests/scenarios/cassettes/TestScenarios/v2/Feature_Cases/Scenario_Unarchive_case_returns_Bad_Request_response.freeze deleted file mode 100644 index 5d3fc771c20..00000000000 --- a/tests/scenarios/cassettes/TestScenarios/v2/Feature_Cases/Scenario_Unarchive_case_returns_Bad_Request_response.freeze +++ /dev/null @@ -1 +0,0 @@ -2024-02-07T18:00:41.393Z \ No newline at end of file diff --git a/tests/scenarios/cassettes/TestScenarios/v2/Feature_Cases/Scenario_Unarchive_case_returns_Not_Found_response.freeze b/tests/scenarios/cassettes/TestScenarios/v2/Feature_Cases/Scenario_Unarchive_case_returns_Not_Found_response.freeze deleted file mode 100644 index df6e8d3aea0..00000000000 --- a/tests/scenarios/cassettes/TestScenarios/v2/Feature_Cases/Scenario_Unarchive_case_returns_Not_Found_response.freeze +++ /dev/null @@ -1 +0,0 @@ -2024-02-07T13:09:10.329Z \ No newline at end of file diff --git a/tests/scenarios/cassettes/TestScenarios/v2/Feature_Cases/Scenario_Unarchive_case_returns_OK_response.freeze b/tests/scenarios/cassettes/TestScenarios/v2/Feature_Cases/Scenario_Unarchive_case_returns_OK_response.freeze deleted file mode 100644 index c639a2463ee..00000000000 --- a/tests/scenarios/cassettes/TestScenarios/v2/Feature_Cases/Scenario_Unarchive_case_returns_OK_response.freeze +++ /dev/null @@ -1 +0,0 @@ -2024-02-07T18:00:42.027Z \ No newline at end of file diff --git a/tests/scenarios/cassettes/TestScenarios/v2/Feature_Cases/Scenario_Unassign_case_returns_Bad_Request_response.freeze b/tests/scenarios/cassettes/TestScenarios/v2/Feature_Cases/Scenario_Unassign_case_returns_Bad_Request_response.freeze deleted file mode 100644 index a7b2a9e33bf..00000000000 --- a/tests/scenarios/cassettes/TestScenarios/v2/Feature_Cases/Scenario_Unassign_case_returns_Bad_Request_response.freeze +++ /dev/null @@ -1 +0,0 @@ -2024-02-07T18:00:42.637Z \ No newline at end of file diff --git a/tests/scenarios/cassettes/TestScenarios/v2/Feature_Cases/Scenario_Unassign_case_returns_Not_Found_response.freeze b/tests/scenarios/cassettes/TestScenarios/v2/Feature_Cases/Scenario_Unassign_case_returns_Not_Found_response.freeze deleted file mode 100644 index fee1f808458..00000000000 --- a/tests/scenarios/cassettes/TestScenarios/v2/Feature_Cases/Scenario_Unassign_case_returns_Not_Found_response.freeze +++ /dev/null @@ -1 +0,0 @@ -2024-02-07T13:09:10.714Z \ No newline at end of file diff --git a/tests/scenarios/cassettes/TestScenarios/v2/Feature_Cases/Scenario_Unassign_case_returns_OK_response.freeze b/tests/scenarios/cassettes/TestScenarios/v2/Feature_Cases/Scenario_Unassign_case_returns_OK_response.freeze deleted file mode 100644 index 0a5d0226a27..00000000000 --- a/tests/scenarios/cassettes/TestScenarios/v2/Feature_Cases/Scenario_Unassign_case_returns_OK_response.freeze +++ /dev/null @@ -1 +0,0 @@ -2024-02-07T18:00:43.176Z \ No newline at end of file diff --git a/tests/scenarios/cassettes/TestScenarios/v2/Feature_Cases/Scenario_Update_case_priority_returns_Bad_Request_response.freeze b/tests/scenarios/cassettes/TestScenarios/v2/Feature_Cases/Scenario_Update_case_priority_returns_Bad_Request_response.freeze deleted file mode 100644 index da678b9cae1..00000000000 --- a/tests/scenarios/cassettes/TestScenarios/v2/Feature_Cases/Scenario_Update_case_priority_returns_Bad_Request_response.freeze +++ /dev/null @@ -1 +0,0 @@ -2024-02-07T18:00:43.807Z \ No newline at end of file diff --git a/tests/scenarios/cassettes/TestScenarios/v2/Feature_Cases/Scenario_Update_case_priority_returns_Not_Found_response.freeze b/tests/scenarios/cassettes/TestScenarios/v2/Feature_Cases/Scenario_Update_case_priority_returns_Not_Found_response.freeze deleted file mode 100644 index 33edf5b4580..00000000000 --- a/tests/scenarios/cassettes/TestScenarios/v2/Feature_Cases/Scenario_Update_case_priority_returns_Not_Found_response.freeze +++ /dev/null @@ -1 +0,0 @@ -2024-02-07T13:09:11.084Z \ No newline at end of file diff --git a/tests/scenarios/cassettes/TestScenarios/v2/Feature_Cases/Scenario_Update_case_priority_returns_OK_response.freeze b/tests/scenarios/cassettes/TestScenarios/v2/Feature_Cases/Scenario_Update_case_priority_returns_OK_response.freeze deleted file mode 100644 index ac293b567ad..00000000000 --- a/tests/scenarios/cassettes/TestScenarios/v2/Feature_Cases/Scenario_Update_case_priority_returns_OK_response.freeze +++ /dev/null @@ -1 +0,0 @@ -2024-02-07T18:00:44.433Z \ No newline at end of file diff --git a/tests/scenarios/cassettes/TestScenarios/v2/Feature_Cases/Scenario_Update_case_priority_returns_OK_response.yaml b/tests/scenarios/cassettes/TestScenarios/v2/Feature_Cases/Scenario_Update_case_priority_returns_OK_response.yaml deleted file mode 100644 index 37a52fcdd7c..00000000000 --- a/tests/scenarios/cassettes/TestScenarios/v2/Feature_Cases/Scenario_Update_case_priority_returns_OK_response.yaml +++ /dev/null @@ -1,46 +0,0 @@ -interactions: -- request: - body: | - {"data":{"attributes":{"priority":"P4","title":"My new case","type":"STANDARD"},"relationships":{"project":{"data":{"id":"d4bbe1af-f36e-42f1-87c1-493ca35c320e","type":"project"}}},"type":"case"}} - form: {} - headers: - Accept: - - application/json - Content-Type: - - application/json - id: 0 - method: POST - url: https://api.datadoghq.com/api/v2/cases - response: - body: '{"data":{"id":"60fdb1eb-209a-4072-9db3-4d08a9c4180c","type":"case","attributes":{"attributes":{},"created_at":"2024-02-07T18:00:44.723781245Z","creation_source":"MANUAL","description":"","insights":[],"internal_id":"60fdb1eb-209a-4072-9db3-4d08a9c4180c","key":"DDFC-13","priority":"P4","public_id":"73","status":"OPEN","title":"My - new case","type":"STANDARD"},"relationships":{"created_by":{"data":{"id":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","type":"user"}},"project":{"data":{"id":"d4bbe1af-f36e-42f1-87c1-493ca35c320e","type":"project"}}}},"included":[{"id":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","type":"user","attributes":{"email":"team-intg-tools-libs-spam@datadoghq.com","handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI - Account"}}]}' - code: 201 - duration: 0ms - headers: - Content-Type: - - application/vnd.api+json - status: 201 Created -- request: - body: | - {"data":{"attributes":{"priority":"P3"},"type":"case"}} - form: {} - headers: - Accept: - - application/json - Content-Type: - - application/json - id: 1 - method: POST - url: https://api.datadoghq.com/api/v2/cases/60fdb1eb-209a-4072-9db3-4d08a9c4180c/priority - response: - body: '{"data":{"id":"60fdb1eb-209a-4072-9db3-4d08a9c4180c","type":"case","attributes":{"attributes":{},"created_at":"2024-02-07T18:00:44.723781Z","creation_source":"MANUAL","description":"","insights":[],"internal_id":"60fdb1eb-209a-4072-9db3-4d08a9c4180c","key":"DDFC-13","modified_at":"2024-02-07T18:00:45.028076Z","priority":"P3","public_id":"73","status":"OPEN","title":"My - new case","type":"STANDARD"},"relationships":{"created_by":{"data":{"id":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","type":"user"}},"modified_by":{"data":{"id":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","type":"user"}},"project":{"data":{"id":"d4bbe1af-f36e-42f1-87c1-493ca35c320e","type":"project"}}}},"included":[{"id":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","type":"user","attributes":{"email":"team-intg-tools-libs-spam@datadoghq.com","handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI - Account"}}]}' - code: 200 - duration: 0ms - headers: - Content-Type: - - application/vnd.api+json - status: 200 OK -version: 2 diff --git a/tests/scenarios/cassettes/TestScenarios/v2/Feature_Cases/Scenario_Update_case_status_returns_Bad_Request_response.freeze b/tests/scenarios/cassettes/TestScenarios/v2/Feature_Cases/Scenario_Update_case_status_returns_Bad_Request_response.freeze deleted file mode 100644 index 8a9c88da383..00000000000 --- a/tests/scenarios/cassettes/TestScenarios/v2/Feature_Cases/Scenario_Update_case_status_returns_Bad_Request_response.freeze +++ /dev/null @@ -1 +0,0 @@ -2024-02-07T18:00:45.069Z \ No newline at end of file diff --git a/tests/scenarios/cassettes/TestScenarios/v2/Feature_Cases/Scenario_Update_case_status_returns_Not_Found_response.freeze b/tests/scenarios/cassettes/TestScenarios/v2/Feature_Cases/Scenario_Update_case_status_returns_Not_Found_response.freeze deleted file mode 100644 index 52aa1297fc5..00000000000 --- a/tests/scenarios/cassettes/TestScenarios/v2/Feature_Cases/Scenario_Update_case_status_returns_Not_Found_response.freeze +++ /dev/null @@ -1 +0,0 @@ -2024-02-07T13:09:11.471Z \ No newline at end of file diff --git a/tests/scenarios/cassettes/TestScenarios/v2/Feature_Cases/Scenario_Update_case_status_returns_OK_response.freeze b/tests/scenarios/cassettes/TestScenarios/v2/Feature_Cases/Scenario_Update_case_status_returns_OK_response.freeze deleted file mode 100644 index 2c362818582..00000000000 --- a/tests/scenarios/cassettes/TestScenarios/v2/Feature_Cases/Scenario_Update_case_status_returns_OK_response.freeze +++ /dev/null @@ -1 +0,0 @@ -2024-02-07T18:00:45.628Z \ No newline at end of file diff --git a/tests/scenarios/cassettes/TestScenarios/v2/Feature_Cases/Scenario_Update_case_status_returns_OK_response.yaml b/tests/scenarios/cassettes/TestScenarios/v2/Feature_Cases/Scenario_Update_case_status_returns_OK_response.yaml deleted file mode 100644 index 00fe5714fc6..00000000000 --- a/tests/scenarios/cassettes/TestScenarios/v2/Feature_Cases/Scenario_Update_case_status_returns_OK_response.yaml +++ /dev/null @@ -1,46 +0,0 @@ -interactions: -- request: - body: | - {"data":{"attributes":{"priority":"P4","title":"My new case","type":"STANDARD"},"relationships":{"project":{"data":{"id":"d4bbe1af-f36e-42f1-87c1-493ca35c320e","type":"project"}}},"type":"case"}} - form: {} - headers: - Accept: - - application/json - Content-Type: - - application/json - id: 0 - method: POST - url: https://api.datadoghq.com/api/v2/cases - response: - body: '{"data":{"id":"ceae478d-b504-4cb7-bad2-e8f8e5a0a77b","type":"case","attributes":{"attributes":{},"created_at":"2024-02-07T18:00:45.905784777Z","creation_source":"MANUAL","description":"","insights":[],"internal_id":"ceae478d-b504-4cb7-bad2-e8f8e5a0a77b","key":"DDFC-15","priority":"P4","public_id":"75","status":"OPEN","title":"My - new case","type":"STANDARD"},"relationships":{"created_by":{"data":{"id":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","type":"user"}},"project":{"data":{"id":"d4bbe1af-f36e-42f1-87c1-493ca35c320e","type":"project"}}}},"included":[{"id":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","type":"user","attributes":{"email":"team-intg-tools-libs-spam@datadoghq.com","handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI - Account"}}]}' - code: 201 - duration: 0ms - headers: - Content-Type: - - application/vnd.api+json - status: 201 Created -- request: - body: | - {"data":{"attributes":{"status":"IN_PROGRESS"},"type":"case"}} - form: {} - headers: - Accept: - - application/json - Content-Type: - - application/json - id: 1 - method: POST - url: https://api.datadoghq.com/api/v2/cases/ceae478d-b504-4cb7-bad2-e8f8e5a0a77b/status - response: - body: '{"data":{"id":"ceae478d-b504-4cb7-bad2-e8f8e5a0a77b","type":"case","attributes":{"attributes":{},"created_at":"2024-02-07T18:00:45.905785Z","creation_source":"MANUAL","description":"","insights":[],"internal_id":"ceae478d-b504-4cb7-bad2-e8f8e5a0a77b","key":"DDFC-15","modified_at":"2024-02-07T18:00:46.22949Z","priority":"P4","public_id":"75","status":"IN_PROGRESS","title":"My - new case","type":"STANDARD"},"relationships":{"created_by":{"data":{"id":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","type":"user"}},"modified_by":{"data":{"id":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","type":"user"}},"project":{"data":{"id":"d4bbe1af-f36e-42f1-87c1-493ca35c320e","type":"project"}}}},"included":[{"id":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","type":"user","attributes":{"email":"team-intg-tools-libs-spam@datadoghq.com","handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI - Account"}}]}' - code: 200 - duration: 0ms - headers: - Content-Type: - - application/vnd.api+json - status: 200 OK -version: 2 diff --git a/tests/scenarios/features/v2/case_management.feature b/tests/scenarios/features/v2/case_management.feature new file mode 100644 index 00000000000..2d99e555384 --- /dev/null +++ b/tests/scenarios/features/v2/case_management.feature @@ -0,0 +1,315 @@ +@endpoint(case-management) @endpoint(case-management-v2) +Feature: Case Management + View and manage cases and project within Case Management + + Background: + Given a valid "apiKeyAuth" key in the system + And a valid "appKeyAuth" key in the system + And an instance of "CaseManagement" API + + @team:DataDog/case-management + Scenario: Archive case returns "Bad Request" response + Given new "ArchiveCase" request + And there is a valid "case" in the system + And request contains "case_id" parameter from "case.id" + And body with value {"data": {"type": "project"}} + When the request is sent + Then the response status is 400 Bad Request + + @team:DataDog/case-management + Scenario: Archive case returns "Not Found" response + Given new "ArchiveCase" request + And request contains "case_id" parameter with value "67d80aa3-36ff-44b9-a694-c501a7591737" + And body with value {"data": {"type": "case"}} + When the request is sent + Then the response status is 404 Not Found + + @team:DataDog/case-management + Scenario: Archive case returns "OK" response + Given new "ArchiveCase" request + And there is a valid "case" in the system + And request contains "case_id" parameter from "case.id" + And body with value {"data": {"type": "case"}} + When the request is sent + Then the response status is 200 OK + + @team:DataDog/case-management + Scenario: Assign case returns "Bad Request" response + Given new "AssignCase" request + And there is a valid "case" in the system + And request contains "case_id" parameter from "case.id" + And body with value {"data": {"attributes": {"assignee_id": "invalid-uuid"}, "type": "case"}} + When the request is sent + Then the response status is 400 Bad Request + + @team:DataDog/case-management + Scenario: Assign case returns "Not Found" response + Given new "AssignCase" request + And there is a valid "user" in the system + And request contains "case_id" parameter with value "67d80aa3-36ff-44b9-a694-c501a7591737" + And body with value {"data": {"attributes": {"assignee_id": "{{user.data.id}}"}, "type": "case"}} + When the request is sent + Then the response status is 404 Not Found + + @team:DataDog/case-management + Scenario: Assign case returns "OK" response + Given new "AssignCase" request + And there is a valid "case" in the system + And there is a valid "user" in the system + And request contains "case_id" parameter from "case.id" + And body with value {"data": {"attributes": {"assignee_id": "{{user.data.id}}"}, "type": "case"}} + When the request is sent + Then the response status is 200 OK + + @team:DataDog/case-management + Scenario: Create a case returns "Bad Request" response + Given new "CreateCase" request + And body with value {"data": {"attributes": {"priority": "NOT_DEFINED", "title": "Security breach investigation", "type": "STANDARD"}, "relationships": {"assignee": {"data": {"id": "00000000-0000-0000-0000-000000000000", "type": "userx"}}, "project": {"data": {"id": "e555e290-ed65-49bd-ae18-8acbfcf18db7", "type": "project"}}}, "type": "case"}} + When the request is sent + Then the response status is 400 Bad Request + + @team:DataDog/case-management + Scenario: Create a case returns "CREATED" response + Given new "CreateCase" request + And there is a valid "user" in the system + And body with value {"data": {"attributes": {"priority": "NOT_DEFINED", "title": "Security breach investigation in {{ unique_hash }}", "type": "STANDARD"}, "relationships": {"assignee": {"data": {"id": "{{user.data.id}}", "type": "user"} }, "project": {"data": {"id": "d4bbe1af-f36e-42f1-87c1-493ca35c320e", "type": "project"}}}, "type": "case"}} + When the request is sent + Then the response status is 201 CREATED + And the response "data" has field "id" + And the response "data.attributes.title" is equal to "Security breach investigation in {{ unique_hash }}" + And the response "data.attributes.type" is equal to "STANDARD" + And the response "data.attributes.priority" is equal to "NOT_DEFINED" + + @generated @skip @team:DataDog/case-management + Scenario: Create a case returns "Not Found" response + Given new "CreateCase" request + And body with value {"data": {"attributes": {"priority": "NOT_DEFINED", "title": "Security breach investigation", "type": "STANDARD"}, "relationships": {"assignee": {"data": {"id": "00000000-0000-0000-0000-000000000000", "type": "user"}}, "project": {"data": {"id": "e555e290-ed65-49bd-ae18-8acbfcf18db7", "type": "project"}}}, "type": "case"}} + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:DataDog/case-management + Scenario: Create a project returns "Bad Request" response + Given new "CreateProject" request + And body with value {"data": {"attributes": {"key": "SEC", "name": "Security Investigation"}, "type": "project"}} + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/case-management + Scenario: Create a project returns "CREATED" response + Given new "CreateProject" request + And body with value {"data": {"attributes": {"key": "SEC", "name": "Security Investigation"}, "type": "project"}} + When the request is sent + Then the response status is 201 CREATED + + @generated @skip @team:DataDog/case-management + Scenario: Create a project returns "Not Found" response + Given new "CreateProject" request + And body with value {"data": {"attributes": {"key": "SEC", "name": "Security Investigation"}, "type": "project"}} + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:DataDog/case-management + Scenario: Get all projects returns "Bad Request" response + Given new "GetProjects" request + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/case-management + Scenario: Get all projects returns "Not Found" response + Given new "GetProjects" request + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:DataDog/case-management + Scenario: Get all projects returns "OK" response + Given new "GetProjects" request + When the request is sent + Then the response status is 200 OK + + @skip @team:DataDog/case-management + Scenario: Get the details of a case returns "Bad Request" response + Given new "GetCase" request + And there is a valid "case" in the system + And request contains "case_id" parameter from "case.id" + When the request is sent + Then the response status is 400 Bad Request + + @team:DataDog/case-management + Scenario: Get the details of a case returns "Not Found" response + Given new "GetCase" request + And request contains "case_id" parameter with value "67d80aa3-36ff-44b9-a694-c501a7591737" + When the request is sent + Then the response status is 404 Not Found + + @team:DataDog/case-management + Scenario: Get the details of a case returns "OK" response + Given new "GetCase" request + And there is a valid "case" in the system + And request contains "case_id" parameter from "case.id" + When the request is sent + Then the response status is 200 OK + + @generated @skip @team:DataDog/case-management + Scenario: Get the details of a project returns "Bad Request" response + Given new "GetProject" request + And request contains "project_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/case-management + Scenario: Get the details of a project returns "Not Found" response + Given new "GetProject" request + And request contains "project_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:DataDog/case-management + Scenario: Get the details of a project returns "OK" response + Given new "GetProject" request + And request contains "project_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 200 OK + + @generated @skip @team:DataDog/case-management + Scenario: Remove a project returns "API error response" response + Given new "DeleteProject" request + And request contains "project_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 404 API error response + + @generated @skip @team:DataDog/case-management + Scenario: Remove a project returns "No Content" response + Given new "DeleteProject" request + And request contains "project_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 204 No Content + + @generated @skip @team:DataDog/case-management + Scenario: Search cases returns "Bad Request" response + Given new "SearchCases" request + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/case-management + Scenario: Search cases returns "Not Found" response + Given new "SearchCases" request + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:DataDog/case-management + Scenario: Search cases returns "OK" response + Given new "SearchCases" request + When the request is sent + Then the response status is 200 OK + + @generated @skip @team:DataDog/case-management @with-pagination + Scenario: Search cases returns "OK" response with pagination + Given new "SearchCases" request + When the request with pagination is sent + Then the response status is 200 OK + + @team:DataDog/case-management + Scenario: Unarchive case returns "Bad Request" response + Given new "UnarchiveCase" request + And there is a valid "case" in the system + And request contains "case_id" parameter from "case.id" + And body with value {"data": {"type": "project"}} + When the request is sent + Then the response status is 400 Bad Request + + @team:DataDog/case-management + Scenario: Unarchive case returns "Not Found" response + Given new "UnarchiveCase" request + And request contains "case_id" parameter with value "67d80aa3-36ff-44b9-a694-c501a7591737" + And body with value {"data": {"type": "case"}} + When the request is sent + Then the response status is 404 Not Found + + @team:DataDog/case-management + Scenario: Unarchive case returns "OK" response + Given new "UnarchiveCase" request + And there is a valid "case" in the system + And request contains "case_id" parameter from "case.id" + And body with value {"data": {"type": "case"}} + When the request is sent + Then the response status is 200 OK + + @team:DataDog/case-management + Scenario: Unassign case returns "Bad Request" response + Given new "UnassignCase" request + And there is a valid "case" in the system + And request contains "case_id" parameter from "case.id" + And body with value {"data": {"type": "project"}} + When the request is sent + Then the response status is 400 Bad Request + + @team:DataDog/case-management + Scenario: Unassign case returns "Not Found" response + Given new "UnassignCase" request + And request contains "case_id" parameter with value "67d80aa3-36ff-44b9-a694-c501a7591737" + And body with value {"data": {"type": "case"}} + When the request is sent + Then the response status is 404 Not Found + + @team:DataDog/case-management + Scenario: Unassign case returns "OK" response + Given new "UnassignCase" request + And there is a valid "case" in the system + And request contains "case_id" parameter from "case.id" + And body with value {"data": {"type": "case"}} + When the request is sent + Then the response status is 200 OK + + @team:DataDog/case-management + Scenario: Update case priority returns "Bad Request" response + Given new "UpdatePriority" request + And there is a valid "case" in the system + And request contains "case_id" parameter from "case.id" + And body with value {"data": {"attributes": {"priority": "P1234"}, "type": "case"}} + When the request is sent + Then the response status is 400 Bad Request + + @team:DataDog/case-management + Scenario: Update case priority returns "Not Found" response + Given new "UpdatePriority" request + And request contains "case_id" parameter with value "67d80aa3-36ff-44b9-a694-c501a7591737" + And body with value {"data": {"attributes": {"priority": "P3"}, "type": "case"}} + When the request is sent + Then the response status is 404 Not Found + + @team:DataDog/case-management + Scenario: Update case priority returns "OK" response + Given new "UpdatePriority" request + And there is a valid "case" in the system + And request contains "case_id" parameter from "case.id" + And body with value {"data": {"attributes": {"priority": "P3"}, "type": "case"}} + When the request is sent + Then the response status is 200 OK + And the response "data.attributes.priority" is equal to "P3" + + @team:DataDog/case-management + Scenario: Update case status returns "Bad Request" response + Given new "UpdateStatus" request + And there is a valid "case" in the system + And request contains "case_id" parameter from "case.id" + And body with value {"data": {"attributes": {"status": "OPENED"}, "type": "case"}} + When the request is sent + Then the response status is 400 Bad Request + + @team:DataDog/case-management + Scenario: Update case status returns "Not Found" response + Given new "UpdateStatus" request + And request contains "case_id" parameter with value "67d80aa3-36ff-44b9-a694-c501a7591737" + And body with value {"data": {"attributes": {"status": "OPEN"}, "type": "case"}} + When the request is sent + Then the response status is 404 Not Found + + @team:DataDog/case-management + Scenario: Update case status returns "OK" response + Given new "UpdateStatus" request + And there is a valid "case" in the system + And request contains "case_id" parameter from "case.id" + And body with value {"data": {"attributes": {"status": "IN_PROGRESS"}, "type": "case"}} + When the request is sent + Then the response status is 200 OK + And the response "data.attributes.status" is equal to "IN_PROGRESS" diff --git a/tests/scenarios/features/v2/given.json b/tests/scenarios/features/v2/given.json index cbaee96cb71..8c2a75b9b1b 100644 --- a/tests/scenarios/features/v2/given.json +++ b/tests/scenarios/features/v2/given.json @@ -69,7 +69,7 @@ "source": "data", "step": "there is a valid \"case\" in the system", "key": "case", - "tag": "Cases", + "tag": "Case Management", "operationId": "CreateCase" }, { diff --git a/tests/scenarios/features/v2/undo.json b/tests/scenarios/features/v2/undo.json index 1268756c9d2..f58d4d35346 100644 --- a/tests/scenarios/features/v2/undo.json +++ b/tests/scenarios/features/v2/undo.json @@ -221,25 +221,25 @@ } }, "SearchCases": { - "tag": "Cases", + "tag": "Case Management", "undo": { "type": "safe" } }, "CreateCase": { - "tag": "Cases", + "tag": "Case Management", "undo": { "type": "safe" } }, "GetProjects": { - "tag": "Cases Projects", + "tag": "Case Management", "undo": { "type": "safe" } }, "CreateProject": { - "tag": "Cases Projects", + "tag": "Case Management", "undo": { "operationId": "DeleteProject", "parameters": [ @@ -252,55 +252,55 @@ } }, "DeleteProject": { - "tag": "Cases Projects", + "tag": "Case Management", "undo": { "type": "idempotent" } }, "GetProject": { - "tag": "Cases Projects", + "tag": "Case Management", "undo": { "type": "safe" } }, "GetCase": { - "tag": "Cases", + "tag": "Case Management", "undo": { "type": "safe" } }, "ArchiveCase": { - "tag": "Cases", + "tag": "Case Management", "undo": { "type": "idempotent" } }, "AssignCase": { - "tag": "Cases", + "tag": "Case Management", "undo": { "type": "idempotent" } }, "UpdatePriority": { - "tag": "Cases", + "tag": "Case Management", "undo": { "type": "idempotent" } }, "UpdateStatus": { - "tag": "Cases", + "tag": "Case Management", "undo": { "type": "idempotent" } }, "UnarchiveCase": { - "tag": "Cases", + "tag": "Case Management", "undo": { "type": "idempotent" } }, "UnassignCase": { - "tag": "Cases", + "tag": "Case Management", "undo": { "type": "idempotent" }