Skip to content

Commit cf29b69

Browse files
mrduncanameliahsu
authored andcommitted
fix(issues): Update prefix for issues endpoints (#80942)
The docs themselves already reference the organization id parameter, this updates the paths to actually use it. This is required unless accessing these endpoints via a direct route to the region so that the control silo can proxy on the request to the correct region. --------- Co-authored-by: Mia Hsu <[email protected]>
1 parent ad33741 commit cf29b69

File tree

6 files changed

+24
-6
lines changed

6 files changed

+24
-6
lines changed

api-docs/openapi.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -135,13 +135,13 @@
135135
"/api/0/projects/{organization_id_or_slug}/{project_id_or_slug}/issues/": {
136136
"$ref": "paths/events/project-issues.json"
137137
},
138-
"/api/0/issues/{issue_id}/tags/{key}/values/": {
138+
"/api/0/organizations/{organization_id_or_slug}/issues/{issue_id}/tags/{key}/values/": {
139139
"$ref": "paths/events/tag-values.json"
140140
},
141-
"/api/0/issues/{issue_id}/hashes/": {
141+
"/api/0/organizations/{organization_id_or_slug}/issues/{issue_id}/hashes/": {
142142
"$ref": "paths/events/issue-hashes.json"
143143
},
144-
"/api/0/issues/{issue_id}/": {
144+
"/api/0/organizations/{organization_id_or_slug}/issues/{issue_id}/": {
145145
"$ref": "paths/events/issue-details.json"
146146
},
147147
"/api/0/organizations/{organization_id_or_slug}/releases/": {

api-docs/paths/events/issue-hashes.json

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,15 @@
44
"description": "This endpoint lists an issue's hashes, which are the generated checksums used to aggregate individual events.",
55
"operationId": "List an Issue's Hashes",
66
"parameters": [
7+
{
8+
"name": "organization_id_or_slug",
9+
"in": "path",
10+
"description": "The ID or slug of the organization the event belongs to.",
11+
"required": true,
12+
"schema": {
13+
"type": "string"
14+
}
15+
},
716
{
817
"name": "issue_id",
918
"in": "path",

api-docs/paths/events/tag-values.json

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,15 @@
44
"description": "Returns details for given tag key related to an issue. \n\nWhen [paginated](/api/pagination) can return at most 1000 values.",
55
"operationId": "List a Tag's Values Related to an Issue",
66
"parameters": [
7+
{
8+
"name": "organization_id_or_slug",
9+
"in": "path",
10+
"description": "The ID or slug of the organization the event belongs to.",
11+
"required": true,
12+
"schema": {
13+
"type": "string"
14+
}
15+
},
716
{
817
"name": "issue_id",
918
"in": "path",

tests/apidocs/endpoints/events/test_group_hashes.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ def setUp(self):
88
self.create_event("a")
99
event = self.create_event("b")
1010

11-
self.url = f"/api/0/issues/{event.group_id}/hashes/"
11+
self.url = f"/api/0/organizations/{self.organization.slug}/issues/{event.group_id}/hashes/"
1212

1313
self.login_as(user=self.user)
1414

tests/apidocs/endpoints/events/test_group_issue_details.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ def setUp(self):
2424
for timestamp in last_release.values():
2525
event = self.create_event("c", release="1.0a", timestamp=timestamp.isoformat())
2626

27-
self.url = f"/api/0/issues/{event.group.id}/"
27+
self.url = f"/api/0/organizations/{self.organization.slug}/issues/{event.group.id}/"
2828

2929
self.login_as(user=self.user)
3030

tests/apidocs/endpoints/events/test_group_tagkey_values.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ def setUp(self):
1010

1111
self.login_as(user=self.user)
1212

13-
self.url = f"/api/0/issues/{event.group_id}/tags/{key}/values/"
13+
self.url = f"/api/0/organizations/{self.organization.slug}/issues/{event.group_id}/tags/{key}/values/"
1414

1515
def test_get(self):
1616
response = self.client.get(self.url)

0 commit comments

Comments
 (0)