Skip to content
This repository was archived by the owner on Sep 3, 2024. It is now read-only.

Commit

Permalink
Merge pull request #17 from JupiterOne/INT-10033-4
Browse files Browse the repository at this point in the history
INT-10033: update tags response
  • Loading branch information
gastonyelmini authored Mar 14, 2024
2 parents beb084b + a79d795 commit a877084
Show file tree
Hide file tree
Showing 5 changed files with 87 additions and 80 deletions.
9 changes: 6 additions & 3 deletions src/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import { IntegrationConfig } from './config';
import {
DataSource,
DataSourceResponse,
DataSourceTagResponse,
FindingRow,
SessionTokenResponse,
Tag,
Expand Down Expand Up @@ -215,10 +216,12 @@ export class APIClient {
headers: this.headers,
};

const response = await this.requestWithRetry<Tag[]>(requestOpts);
const response = await this.requestWithRetry<DataSourceTagResponse>(
requestOpts,
);

if (response?.data && response?.data[Symbol.iterator]) {
for (const tag of response?.data) {
if (response?.data.data) {
for (const tag of response?.data.data) {
await iteratee(tag);
}
} else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,16 +95,16 @@
"status": 200,
"statusText": "OK"
},
"startedDateTime": "2024-03-13T20:39:08.756Z",
"time": 58,
"startedDateTime": "2024-03-14T15:23:23.154Z",
"time": 63,
"timings": {
"blocked": -1,
"connect": -1,
"dns": -1,
"receive": 0,
"send": 0,
"ssl": -1,
"wait": 58
"wait": 63
}
},
{
Expand Down Expand Up @@ -145,18 +145,18 @@
"value": "sandbox.bigid.tools"
}
],
"headersSize": 292,
"headersSize": 289,
"httpVersion": "HTTP/1.1",
"method": "GET",
"queryString": [],
"url": "http://sandbox.bigid.tools/api/v1/data-catalog/tags/all-pairs"
},
"response": {
"bodySize": 246,
"bodySize": 255,
"content": {
"mimeType": "application/json",
"size": 246,
"text": "[{\"tagId\":\"ba7a5426-64d6-47eb-995b-8fd8e1224de0\",\"valueId\":\"ba7a5426-64d6-47eb-995b-8fd8e1224de1\",\"isMutuallyExclusive\":\"true\",\"properties\":{\"hidden\":false,\"applicationType\":\"sensitivityClassification\"},\"tagName\":\"sensitivity\",\"tagValue\":\"high\"}]"
"size": 255,
"text": "{\"data\":[{\"tagId\":\"ba7a5426-64d6-47eb-995b-8fd8e1224de0\",\"valueId\":\"ba7a5426-64d6-47eb-995b-8fd8e1224de1\",\"isMutuallyExclusive\":\"true\",\"properties\":{\"hidden\":false,\"applicationType\":\"sensitivityClassification\"},\"tagName\":\"sensitivity\",\"tagValue\":\"high\"}]}"
},
"cookies": [],
"headers": [
Expand All @@ -171,16 +171,16 @@
"status": 200,
"statusText": "OK"
},
"startedDateTime": "2024-03-13T20:39:08.819Z",
"time": 3,
"startedDateTime": "2024-03-14T15:23:23.222Z",
"time": 4,
"timings": {
"blocked": -1,
"connect": -1,
"dns": -1,
"receive": 0,
"send": 0,
"ssl": -1,
"wait": 3
"wait": 4
}
}
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,18 +45,18 @@
"value": "sandbox.bigid.tools"
}
],
"headersSize": 292,
"headersSize": 289,
"httpVersion": "HTTP/1.1",
"method": "GET",
"queryString": [],
"url": "http://sandbox.bigid.tools/api/v1/data-catalog/tags/all-pairs"
},
"response": {
"bodySize": 246,
"bodySize": 255,
"content": {
"mimeType": "application/json",
"size": 246,
"text": "[{\"tagId\":\"ba7a5426-64d6-47eb-995b-8fd8e1224de0\",\"valueId\":\"ba7a5426-64d6-47eb-995b-8fd8e1224de1\",\"isMutuallyExclusive\":\"true\",\"properties\":{\"hidden\":false,\"applicationType\":\"sensitivityClassification\"},\"tagName\":\"sensitivity\",\"tagValue\":\"high\"}]"
"size": 255,
"text": "{\"data\":[{\"tagId\":\"ba7a5426-64d6-47eb-995b-8fd8e1224de0\",\"valueId\":\"ba7a5426-64d6-47eb-995b-8fd8e1224de1\",\"isMutuallyExclusive\":\"true\",\"properties\":{\"hidden\":false,\"applicationType\":\"sensitivityClassification\"},\"tagName\":\"sensitivity\",\"tagValue\":\"high\"}]}"
},
"cookies": [],
"headers": [
Expand All @@ -71,16 +71,16 @@
"status": 200,
"statusText": "OK"
},
"startedDateTime": "2024-03-13T20:39:08.847Z",
"time": 2,
"startedDateTime": "2024-03-14T15:23:23.267Z",
"time": 4,
"timings": {
"blocked": -1,
"connect": -1,
"dns": -1,
"receive": 0,
"send": 0,
"ssl": -1,
"wait": 2
"wait": 4
}
},
{
Expand Down Expand Up @@ -156,16 +156,16 @@
"status": 200,
"statusText": "OK"
},
"startedDateTime": "2024-03-13T20:39:08.854Z",
"time": 3,
"startedDateTime": "2024-03-14T15:23:23.276Z",
"time": 5,
"timings": {
"blocked": -1,
"connect": -1,
"dns": -1,
"receive": 0,
"send": 0,
"ssl": -1,
"wait": 3
"wait": 5
}
}
],
Expand Down
Loading

0 comments on commit a877084

Please sign in to comment.