Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 23 additions & 1 deletion .generator/schemas/v2/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -92841,6 +92841,8 @@ components:
$ref: "#/components/schemas/OutcomesResponseIncluded"
links:
$ref: "#/components/schemas/OutcomesResponseLinks"
meta:
$ref: "#/components/schemas/PaginatedResponseMeta"
type: object
OutcomesResponseData:
description: List of rule outcomes.
Expand Down Expand Up @@ -92888,11 +92890,27 @@ components:
type: string
type: object
OutcomesResponseLinks:
description: Links attributes.
description: Pagination links for rule outcomes.
properties:
first:
description: Link for the first set of results.
example: "/api/v2/scorecard/outcomes?include=rule&page%5Blimit%5D=100&page%5Boffset%5D=0"
type: string
last:
description: Link for the last set of results.
example: "/api/v2/scorecard/outcomes?include=rule&page%5Blimit%5D=100&page%5Boffset%5D=200"
type: string
next:
description: |-
Link for the next set of results.
example: "/api/v2/scorecard/outcomes?include=rule&page%5Blimit%5D=100&page%5Boffset%5D=200"
type: string
previous:
description: Link for the previous set of results.
example: "/api/v2/scorecard/outcomes?include=rule&page%5Blimit%5D=100&page%5Boffset%5D=0"
type: string
self:
description: Link for the current set of results.
example: "/api/v2/scorecard/outcomes?include=rule&page%5Blimit%5D=100&page%5Boffset%5D=100"
type: string
type: object
Expand Down Expand Up @@ -141761,6 +141779,7 @@ components:
authorizationCode:
authorizationUrl: /oauth2/v1/authorize
scopes:
agent_builder_run: Run agents created with Agent Builder.
ai_gateway_config_read: View AI Gateway configuration.
ai_gateway_config_write: Create, update, and delete AI Gateway configuration.
ai_gateway_usage: Use AI Gateway and view configuration applicable to the authenticated user.
Expand All @@ -141771,11 +141790,14 @@ components:
apm_service_catalog_write: >-
Add, modify, and delete service catalog definitions when those definitions are maintained by Datadog.
appsec_vm_read: View infrastructure, application code, and library vulnerability findings.
assistant_access: Access Bits Chat.
aws_configurations_manage: Manage AWS integration account configurations and related integration settings.
billing_edit: Edit your organization's billing information.
billing_read: View your organization's billing information.
bits_dev_write: Create and interact with Bits Code sessions.
bits_investigations_read: View Bits AI investigations.
bits_investigations_write: Create and manage Bits AI investigations.
bits_security_analyst_write: Create and manage Bits AI Security Analyst investigations.
cases_read: View Cases.
cases_shared_settings_write: Update shared case management settings.
cases_write: Create and update cases.
Expand Down
6 changes: 5 additions & 1 deletion examples/v2/scorecards/ListScorecardOutcomes.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import com.datadog.api.client.ApiClient;
import com.datadog.api.client.ApiException;
import com.datadog.api.client.v2.api.ScorecardsApi;
import com.datadog.api.client.v2.api.ScorecardsApi.ListScorecardOutcomesOptionalParameters;
import com.datadog.api.client.v2.model.OutcomesResponse;

public class Example {
Expand All @@ -12,7 +13,10 @@ public static void main(String[] args) {
ScorecardsApi apiInstance = new ScorecardsApi(defaultClient);

try {
OutcomesResponse result = apiInstance.listScorecardOutcomes();
OutcomesResponse result =
apiInstance.listScorecardOutcomes(
new ListScorecardOutcomesOptionalParameters()
.filterRuleId("00000000-0000-0000-0000-000000000000"));
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling ScorecardsApi#listScorecardOutcomes");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@
@JsonPropertyOrder({
OutcomesResponse.JSON_PROPERTY_DATA,
OutcomesResponse.JSON_PROPERTY_INCLUDED,
OutcomesResponse.JSON_PROPERTY_LINKS
OutcomesResponse.JSON_PROPERTY_LINKS,
OutcomesResponse.JSON_PROPERTY_META
})
@jakarta.annotation.Generated(
value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator")
Expand All @@ -37,6 +38,9 @@ public class OutcomesResponse {
public static final String JSON_PROPERTY_LINKS = "links";
private OutcomesResponseLinks links;

public static final String JSON_PROPERTY_META = "meta";
private PaginatedResponseMeta meta;

public OutcomesResponse data(List<OutcomesResponseDataItem> data) {
this.data = data;
if (data != null) {
Expand Down Expand Up @@ -124,7 +128,7 @@ public OutcomesResponse links(OutcomesResponseLinks links) {
}

/**
* Links attributes.
* Pagination links for rule outcomes.
*
* @return links
*/
Expand All @@ -142,6 +146,31 @@ public void setLinks(OutcomesResponseLinks links) {
}
}

public OutcomesResponse meta(PaginatedResponseMeta meta) {
this.meta = meta;
this.unparsed |= meta.unparsed;
return this;
}

/**
* Metadata for scores response.
*
* @return meta
*/
@jakarta.annotation.Nullable
@JsonProperty(JSON_PROPERTY_META)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public PaginatedResponseMeta getMeta() {
return meta;
}

public void setMeta(PaginatedResponseMeta meta) {
this.meta = meta;
if (meta != null) {
this.unparsed |= meta.unparsed;
}
}

/**
* A container for additional, undeclared properties. This is a holder for any undeclared
* properties as specified with the 'additionalProperties' keyword in the OAS document.
Expand Down Expand Up @@ -201,12 +230,13 @@ public boolean equals(Object o) {
return Objects.equals(this.data, outcomesResponse.data)
&& Objects.equals(this.included, outcomesResponse.included)
&& Objects.equals(this.links, outcomesResponse.links)
&& Objects.equals(this.meta, outcomesResponse.meta)
&& Objects.equals(this.additionalProperties, outcomesResponse.additionalProperties);
}

@Override
public int hashCode() {
return Objects.hash(data, included, links, additionalProperties);
return Objects.hash(data, included, links, meta, additionalProperties);
}

@Override
Expand All @@ -216,6 +246,7 @@ public String toString() {
sb.append(" data: ").append(toIndentedString(data)).append("\n");
sb.append(" included: ").append(toIndentedString(included)).append("\n");
sb.append(" links: ").append(toIndentedString(links)).append("\n");
sb.append(" meta: ").append(toIndentedString(meta)).append("\n");
sb.append(" additionalProperties: ")
.append(toIndentedString(additionalProperties))
.append("\n");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,75 @@
import java.util.Map;
import java.util.Objects;

/** Links attributes. */
@JsonPropertyOrder({OutcomesResponseLinks.JSON_PROPERTY_NEXT})
/** Pagination links for rule outcomes. */
@JsonPropertyOrder({
OutcomesResponseLinks.JSON_PROPERTY_FIRST,
OutcomesResponseLinks.JSON_PROPERTY_LAST,
OutcomesResponseLinks.JSON_PROPERTY_NEXT,
OutcomesResponseLinks.JSON_PROPERTY_PREVIOUS,
OutcomesResponseLinks.JSON_PROPERTY_SELF
})
@jakarta.annotation.Generated(
value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator")
public class OutcomesResponseLinks {
@JsonIgnore public boolean unparsed = false;
public static final String JSON_PROPERTY_FIRST = "first";
private String first;

public static final String JSON_PROPERTY_LAST = "last";
private String last;

public static final String JSON_PROPERTY_NEXT = "next";
private String next;

public static final String JSON_PROPERTY_PREVIOUS = "previous";
private String previous;

public static final String JSON_PROPERTY_SELF = "self";
private String self;

public OutcomesResponseLinks first(String first) {
this.first = first;
return this;
}

/**
* Link for the first set of results.
*
* @return first
*/
@jakarta.annotation.Nullable
@JsonProperty(JSON_PROPERTY_FIRST)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public String getFirst() {
return first;
}

public void setFirst(String first) {
this.first = first;
}

public OutcomesResponseLinks last(String last) {
this.last = last;
return this;
}

/**
* Link for the last set of results.
*
* @return last
*/
@jakarta.annotation.Nullable
@JsonProperty(JSON_PROPERTY_LAST)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public String getLast() {
return last;
}

public void setLast(String last) {
this.last = last;
}

public OutcomesResponseLinks next(String next) {
this.next = next;
return this;
Expand All @@ -46,6 +106,48 @@ public void setNext(String next) {
this.next = next;
}

public OutcomesResponseLinks previous(String previous) {
this.previous = previous;
return this;
}

/**
* Link for the previous set of results.
*
* @return previous
*/
@jakarta.annotation.Nullable
@JsonProperty(JSON_PROPERTY_PREVIOUS)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public String getPrevious() {
return previous;
}

public void setPrevious(String previous) {
this.previous = previous;
}

public OutcomesResponseLinks self(String self) {
this.self = self;
return this;
}

/**
* Link for the current set of results.
*
* @return self
*/
@jakarta.annotation.Nullable
@JsonProperty(JSON_PROPERTY_SELF)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public String getSelf() {
return self;
}

public void setSelf(String self) {
this.self = self;
}

/**
* A container for additional, undeclared properties. This is a holder for any undeclared
* properties as specified with the 'additionalProperties' keyword in the OAS document.
Expand Down Expand Up @@ -102,20 +204,28 @@ public boolean equals(Object o) {
return false;
}
OutcomesResponseLinks outcomesResponseLinks = (OutcomesResponseLinks) o;
return Objects.equals(this.next, outcomesResponseLinks.next)
return Objects.equals(this.first, outcomesResponseLinks.first)
&& Objects.equals(this.last, outcomesResponseLinks.last)
&& Objects.equals(this.next, outcomesResponseLinks.next)
&& Objects.equals(this.previous, outcomesResponseLinks.previous)
&& Objects.equals(this.self, outcomesResponseLinks.self)
&& Objects.equals(this.additionalProperties, outcomesResponseLinks.additionalProperties);
}

@Override
public int hashCode() {
return Objects.hash(next, additionalProperties);
return Objects.hash(first, last, next, previous, self, additionalProperties);
}

@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class OutcomesResponseLinks {\n");
sb.append(" first: ").append(toIndentedString(first)).append("\n");
sb.append(" last: ").append(toIndentedString(last)).append("\n");
sb.append(" next: ").append(toIndentedString(next)).append("\n");
sb.append(" previous: ").append(toIndentedString(previous)).append("\n");
sb.append(" self: ").append(toIndentedString(self)).append("\n");
sb.append(" additionalProperties: ")
.append(toIndentedString(additionalProperties))
.append("\n");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -142,8 +142,10 @@ Feature: Scorecards
@team:ddoghq/idp
Scenario: List all rule outcomes returns "OK" response
Given new "ListScorecardOutcomes" request
And request contains "filter[rule][id]" parameter with value "00000000-0000-0000-0000-000000000000"
When the request is sent
Then the response status is 200 OK
And the response "data" has length 0

@replay-only @skip-validation @team:ddoghq/idp @with-pagination
Scenario: List all rule outcomes returns "OK" response with pagination
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,24 @@
"content_type": null,
"method": "GET",
"pagination": false,
"parameters": [],
"parameters": [
{
"explode": null,
"in": "query",
"name": "filter[rule][id]",
"required": false,
"schema": {
"format": null,
"ref": null,
"type": "string"
},
"source": {
"type": "literal",
"value": "00000000-0000-0000-0000-000000000000"
},
"style": null
}
],
"path": "/api/v2/scorecard/outcomes"
},
"scenario": "List all rule outcomes returns \"OK\" response",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -458,7 +458,7 @@
},
{
"feature": "Scorecards",
"frozen_at": "2023-11-01T22:17:32.235Z",
"frozen_at": "2026-10-15T18:17:34.519Z",
"interactions": [
{
"request": {
Expand All @@ -469,12 +469,17 @@
"content_type": "",
"method": "GET",
"path": "/api/v2/scorecard/outcomes",
"query": []
"query": [
[
"filter[rule][id]",
"00000000-0000-0000-0000-000000000000"
]
]
},
"response": {
"body": {
"encoding": "text",
"value": "{\"data\":[{\"id\":\"c70e3b5f-a9f7-4ef8-8417-bf28ea153631\\\\my-service\",\"type\":\"outcome\",\"attributes\":{\"modified_at\":\"2023-11-01T20:08:35.478323Z\",\"remarks\":\"See: \\u003ca href=\\\"https://app.datadoghq.com/services\\\"\\u003eServices\\u003c/a\\u003e\",\"service_name\":\"my-service\",\"state\":\"pass\"},\"relationships\":{\"rule\":{\"data\":{\"id\":\"c70e3b5f-a9f7-4ef8-8417-bf28ea153631\",\"type\":\"rule\"}}}},{\"id\":\"2609deb7-bbd0-4277-bf48-2265328bc4ca\\\\my-service\",\"type\":\"outcome\",\"attributes\":{\"modified_at\":\"2023-11-01T20:08:49.202899Z\",\"remarks\":\"See: \\u003ca href=\\\"https://app.datadoghq.com/services\\\"\\u003eServices\\u003c/a\\u003e\",\"service_name\":\"my-service\",\"state\":\"pass\"},\"relationships\":{\"rule\":{\"data\":{\"id\":\"2609deb7-bbd0-4277-bf48-2265328bc4ca\",\"type\":\"rule\"}}}},{\"id\":\"be6867b9-bd71-497f-803f-208d7361fee2\\\\my-service\",\"type\":\"outcome\",\"attributes\":{\"modified_at\":\"2023-11-01T20:25:35.504243Z\",\"remarks\":\"See: \\u003ca href=\\\"https://app.datadoghq.com/services\\\"\\u003eServices\\u003c/a\\u003e\",\"service_name\":\"my-service\",\"state\":\"pass\"},\"relationships\":{\"rule\":{\"data\":{\"id\":\"be6867b9-bd71-497f-803f-208d7361fee2\",\"type\":\"rule\"}}}}],\"links\":{\"next\":\"/api/v2/scorecard/outcomes?page%5Blimit%5D=100\\u0026page%5Boffset%5D=100\"}}"
"value": "{\"data\":[],\"meta\":{\"count\":0,\"limit\":1000,\"offset\":0,\"total\":0},\"links\":{\"self\":\"/api/v2/scorecard/outcomes?filter%5Brule%5D%5Bid%5D=00000000-0000-0000-0000-000000000000\\u0026include=entity\\u0026page%5Blimit%5D=1000\\u0026page%5Boffset%5D=0\",\"first\":\"/api/v2/scorecard/outcomes?filter%5Brule%5D%5Bid%5D=00000000-0000-0000-0000-000000000000\\u0026include=entity\\u0026page%5Blimit%5D=1000\\u0026page%5Boffset%5D=0\",\"last\":\"/api/v2/scorecard/outcomes?filter%5Brule%5D%5Bid%5D=00000000-0000-0000-0000-000000000000\\u0026include=entity\\u0026page%5Blimit%5D=1000\\u0026page%5Boffset%5D=0\"}}"
},
"headers": {
"content-type": "application/vnd.api+json"
Expand Down
Loading