# 코퍼스

> 코퍼스와 워크스페이스 읽기. 도구 22개와 매개변수, 호출 예제.

Source: https://piqline.com/ko/docs/api/reference/corpus

Piqline 에이전트의 도구입니다. 워크스페이스가 이미 수집한 내용을 읽습니다. 크레딧을 사용하지 않으며 아무것도 쓰지 않습니다.

각 호출은 `Authorization: Bearer`에 키를 넣은 `POST` 요청입니다. JSON 본문이 도구의 입력이며, 응답은 `{ "tool": "nom", "output": … }` 형태입니다. 예제에는 필수 매개변수만 포함되어 있습니다. 매개변수 설명은 에이전트가 읽는 설명과 같습니다.

### `getCoverageStats`

수집량과 상태: 합계, 플랫폼별 및 종류별 분포, 분석 기간(`1h`, `24h`, `7d`, `30d`) 동안의 수집 시계열.

`POST https://piqline.com/api/v1/tools/getCoverageStats`

유형: 읽기. 스코프: `read`.

| 매개변수 | 형식 | 필수 | 설명 |
| --- | --- | --- | --- |
| `period` | `1h \| 24h \| 7d \| 30d` | 아니요 | Analysis window |

```bash tab="curl"
curl -s https://piqline.com/api/v1/tools/getCoverageStats \
  -H "Authorization: Bearer $PIQLINE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'
```
```javascript tab="JavaScript"
const response = await fetch("https://piqline.com/api/v1/tools/getCoverageStats", {
  method: "POST",
  headers: {
    Authorization: "Bearer " + process.env.PIQLINE_API_KEY,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({}),
});
const { output } = await response.json();
```
```python tab="Python"
import os
import requests

response = requests.post(
    "https://piqline.com/api/v1/tools/getCoverageStats",
    headers={"Authorization": "Bearer " + os.environ["PIQLINE_API_KEY"]},
    json={},
)
output = response.json()["output"]
```

### `listSources`

워크스페이스가 팔로우하는 소스와 항목 수, 상태, 마지막 읽기.

`POST https://piqline.com/api/v1/tools/listSources`

유형: 읽기. 스코프: `read`.

이 도구는 매개변수가 없습니다. 빈 본문 `{}`를 보내십시오.

```bash tab="curl"
curl -s https://piqline.com/api/v1/tools/listSources \
  -H "Authorization: Bearer $PIQLINE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'
```
```javascript tab="JavaScript"
const response = await fetch("https://piqline.com/api/v1/tools/listSources", {
  method: "POST",
  headers: {
    Authorization: "Bearer " + process.env.PIQLINE_API_KEY,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({}),
});
const { output } = await response.json();
```
```python tab="Python"
import os
import requests

response = requests.post(
    "https://piqline.com/api/v1/tools/listSources",
    headers={"Authorization": "Bearer " + os.environ["PIQLINE_API_KEY"]},
    json={},
)
output = response.json()["output"]
```

### `searchItems`

필터(텍스트, 플랫폼, 종류, 소스)로 항목(게시물, 동영상, 기사, 광고, 일감)을 검색합니다. 필터가 없으면 최신 항목을 반환합니다(최대 40개).

`POST https://piqline.com/api/v1/tools/searchItems`

유형: 읽기. 스코프: `read`.

| 매개변수 | 형식 | 필수 | 설명 |
| --- | --- | --- | --- |
| `query` | `string` | 아니요 | Free-text match on title and body |
| `platform` | `string` | 아니요 |  |
| `itemType` | `post \| video \| article \| listing \| job_offer` | 아니요 |  |
| `sourceId` | `string` | 아니요 |  |
| `limit` | `integer` | 아니요 |  |

```bash tab="curl"
curl -s https://piqline.com/api/v1/tools/searchItems \
  -H "Authorization: Bearer $PIQLINE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'
```
```javascript tab="JavaScript"
const response = await fetch("https://piqline.com/api/v1/tools/searchItems", {
  method: "POST",
  headers: {
    Authorization: "Bearer " + process.env.PIQLINE_API_KEY,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({}),
});
const { output } = await response.json();
```
```python tab="Python"
import os
import requests

response = requests.post(
    "https://piqline.com/api/v1/tools/searchItems",
    headers={"Authorization": "Bearer " + os.environ["PIQLINE_API_KEY"]},
    json={},
)
output = response.json()["output"]
```

### `getItem`

항목의 상세: 텍스트, 전사, OCR, 감지된 주제, 의미가 가까운 항목, 관찰 날짜.

`POST https://piqline.com/api/v1/tools/getItem`

유형: 읽기. 스코프: `read`.

| 매개변수 | 형식 | 필수 | 설명 |
| --- | --- | --- | --- |
| `itemId` | `string` | 예 |  |

```bash tab="curl"
curl -s https://piqline.com/api/v1/tools/getItem \
  -H "Authorization: Bearer $PIQLINE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"itemId":"5a0e9c1f-2b7d-4e63-8f14-d3c8a6b92e70"}'
```
```javascript tab="JavaScript"
const response = await fetch("https://piqline.com/api/v1/tools/getItem", {
  method: "POST",
  headers: {
    Authorization: "Bearer " + process.env.PIQLINE_API_KEY,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    "itemId": "5a0e9c1f-2b7d-4e63-8f14-d3c8a6b92e70"
  }),
});
const { output } = await response.json();
```
```python tab="Python"
import os
import requests

response = requests.post(
    "https://piqline.com/api/v1/tools/getItem",
    headers={"Authorization": "Bearer " + os.environ["PIQLINE_API_KEY"]},
    json={
        "itemId": "5a0e9c1f-2b7d-4e63-8f14-d3c8a6b92e70",
    },
)
output = response.json()["output"]
```

### `searchPassages`

긴 문서(Motor가 읽은 PDF)에서 의미로 검색합니다. 질문과 가장 가까운 구절을 항목, 페이지, 섹션 제목과 함께 반환합니다.

`POST https://piqline.com/api/v1/tools/searchPassages`

유형: 읽기. 스코프: `read`.

| 매개변수 | 형식 | 필수 | 설명 |
| --- | --- | --- | --- |
| `query` | `string` | 예 | Question or phrase to look for |
| `itemId` | `string` | 아니요 | Limit to one document |
| `limit` | `integer` | 아니요 |  |

```bash tab="curl"
curl -s https://piqline.com/api/v1/tools/searchPassages \
  -H "Authorization: Bearer $PIQLINE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"query":"levée de fonds"}'
```
```javascript tab="JavaScript"
const response = await fetch("https://piqline.com/api/v1/tools/searchPassages", {
  method: "POST",
  headers: {
    Authorization: "Bearer " + process.env.PIQLINE_API_KEY,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    "query": "levée de fonds"
  }),
});
const { output } = await response.json();
```
```python tab="Python"
import os
import requests

response = requests.post(
    "https://piqline.com/api/v1/tools/searchPassages",
    headers={"Authorization": "Bearer " + os.environ["PIQLINE_API_KEY"]},
    json={
        "query": "levée de fonds",
    },
)
output = response.json()["output"]
```

### `citeItem`

구절이 항목에 글자 그대로 나오는지 확인하고 인용 번호를 반환합니다. 없으면 가장 가까운 구절을 반환합니다. 채팅의 인용 모드의 기반입니다.

`POST https://piqline.com/api/v1/tools/citeItem`

유형: 읽기. 스코프: `read`.

| 매개변수 | 형식 | 필수 | 설명 |
| --- | --- | --- | --- |
| `itemId` | `string` | 예 | Item id from searchItems or getItem |
| `quote` | `string` | 예 | Exact passage copied from the item text |

```bash tab="curl"
curl -s https://piqline.com/api/v1/tools/citeItem \
  -H "Authorization: Bearer $PIQLINE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"itemId":"5a0e9c1f-2b7d-4e63-8f14-d3c8a6b92e70","quote":"texte"}'
```
```javascript tab="JavaScript"
const response = await fetch("https://piqline.com/api/v1/tools/citeItem", {
  method: "POST",
  headers: {
    Authorization: "Bearer " + process.env.PIQLINE_API_KEY,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    "itemId": "5a0e9c1f-2b7d-4e63-8f14-d3c8a6b92e70",
    "quote": "texte"
  }),
});
const { output } = await response.json();
```
```python tab="Python"
import os
import requests

response = requests.post(
    "https://piqline.com/api/v1/tools/citeItem",
    headers={"Authorization": "Bearer " + os.environ["PIQLINE_API_KEY"]},
    json={
        "itemId": "5a0e9c1f-2b7d-4e63-8f14-d3c8a6b92e70",
        "quote": "texte",
    },
)
output = response.json()["output"]
```

### `drawDiagram`

답변을 SVG 다이어그램(타임라인, 매트릭스, 흐름, 트리 등)으로 그립니다. 색상은 테마 역할에 따르며, SVG는 표시 전에 정제됩니다. 채팅의 다이어그램 모드의 기반입니다.

`POST https://piqline.com/api/v1/tools/drawDiagram`

유형: 읽기. 스코프: `read`.

| 매개변수 | 형식 | 필수 | 설명 |
| --- | --- | --- | --- |
| `type` | `architecture \| flowchart \| sequence \| state \| timeline \| swimlane \| quadrant \| tree \| …` | 예 | Visual type chosen for the layout |
| `title` | `string` | 예 | Short name of the subject, in the user's language |
| `description` | `string` | 예 | One sentence on what the diagram shows, for screen readers and the caption |
| `svg` | `string` | 예 | A single <svg viewBox="0 0 960 H">…</svg> following the diagram rules |

```bash tab="curl"
curl -s https://piqline.com/api/v1/tools/drawDiagram \
  -H "Authorization: Bearer $PIQLINE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"type":"architecture","title":"texte","description":"texte","svg":"texte"}'
```
```javascript tab="JavaScript"
const response = await fetch("https://piqline.com/api/v1/tools/drawDiagram", {
  method: "POST",
  headers: {
    Authorization: "Bearer " + process.env.PIQLINE_API_KEY,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    "type": "architecture",
    "title": "texte",
    "description": "texte",
    "svg": "texte"
  }),
});
const { output } = await response.json();
```
```python tab="Python"
import os
import requests

response = requests.post(
    "https://piqline.com/api/v1/tools/drawDiagram",
    headers={"Authorization": "Bearer " + os.environ["PIQLINE_API_KEY"]},
    json={
        "type": "architecture",
        "title": "texte",
        "description": "texte",
        "svg": "texte",
    },
)
output = response.json()["output"]
```

### `createCanvas`

캔버스(piqline/canvas SDK만 import하는 TSX 파일)를 컴파일하여 바로 표시할 수 있는 코드, 또는 수정해야 할 오류를 반환합니다. 채팅의 캔버스 및 리포트 모드의 기반입니다.

`POST https://piqline.com/api/v1/tools/createCanvas`

유형: 읽기. 스코프: `read`.

| 매개변수 | 형식 | 필수 | 설명 |
| --- | --- | --- | --- |
| `title` | `string` | 예 | Short title shown above the canvas, in French |
| `source` | `string` | 예 | Full .canvas.tsx source |

```bash tab="curl"
curl -s https://piqline.com/api/v1/tools/createCanvas \
  -H "Authorization: Bearer $PIQLINE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"title":"texte","source":"texte"}'
```
```javascript tab="JavaScript"
const response = await fetch("https://piqline.com/api/v1/tools/createCanvas", {
  method: "POST",
  headers: {
    Authorization: "Bearer " + process.env.PIQLINE_API_KEY,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    "title": "texte",
    "source": "texte"
  }),
});
const { output } = await response.json();
```
```python tab="Python"
import os
import requests

response = requests.post(
    "https://piqline.com/api/v1/tools/createCanvas",
    headers={"Authorization": "Bearer " + os.environ["PIQLINE_API_KEY"]},
    json={
        "title": "texte",
        "source": "texte",
    },
)
output = response.json()["output"]
```

### `getTopics`

감지된 주제와 점유율, 그리고 스토리(여러 소스에서 본 같은 주제).

`POST https://piqline.com/api/v1/tools/getTopics`

유형: 읽기. 스코프: `read`.

| 매개변수 | 형식 | 필수 | 설명 |
| --- | --- | --- | --- |
| `period` | `1h \| 24h \| 7d \| 30d` | 아니요 | Analysis window |

```bash tab="curl"
curl -s https://piqline.com/api/v1/tools/getTopics \
  -H "Authorization: Bearer $PIQLINE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'
```
```javascript tab="JavaScript"
const response = await fetch("https://piqline.com/api/v1/tools/getTopics", {
  method: "POST",
  headers: {
    Authorization: "Bearer " + process.env.PIQLINE_API_KEY,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({}),
});
const { output } = await response.json();
```
```python tab="Python"
import os
import requests

response = requests.post(
    "https://piqline.com/api/v1/tools/getTopics",
    headers={"Authorization": "Bearer " + os.environ["PIQLINE_API_KEY"]},
    json={},
)
output = response.json()["output"]
```

### `getSignals`

워크스페이스의 지속성 규칙으로 발생한 열린 신호와 그 선행 시간 및 상태.

`POST https://piqline.com/api/v1/tools/getSignals`

유형: 읽기. 스코프: `read`.

이 도구는 매개변수가 없습니다. 빈 본문 `{}`를 보내십시오.

```bash tab="curl"
curl -s https://piqline.com/api/v1/tools/getSignals \
  -H "Authorization: Bearer $PIQLINE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'
```
```javascript tab="JavaScript"
const response = await fetch("https://piqline.com/api/v1/tools/getSignals", {
  method: "POST",
  headers: {
    Authorization: "Bearer " + process.env.PIQLINE_API_KEY,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({}),
});
const { output } = await response.json();
```
```python tab="Python"
import os
import requests

response = requests.post(
    "https://piqline.com/api/v1/tools/getSignals",
    headers={"Authorization": "Bearer " + os.environ["PIQLINE_API_KEY"]},
    json={},
)
output = response.json()["output"]
```

### `listWorkspaceTables`

워크스페이스에 이미 만들어진 테이블: 이름, 설명, 열과 행의 수, 테이블이 자동으로 채워지는지 여부.

`POST https://piqline.com/api/v1/tools/listWorkspaceTables`

유형: 읽기. 스코프: `read`.

이 도구는 매개변수가 없습니다. 빈 본문 `{}`를 보내십시오.

```bash tab="curl"
curl -s https://piqline.com/api/v1/tools/listWorkspaceTables \
  -H "Authorization: Bearer $PIQLINE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'
```
```javascript tab="JavaScript"
const response = await fetch("https://piqline.com/api/v1/tools/listWorkspaceTables", {
  method: "POST",
  headers: {
    Authorization: "Bearer " + process.env.PIQLINE_API_KEY,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({}),
});
const { output } = await response.json();
```
```python tab="Python"
import os
import requests

response = requests.post(
    "https://piqline.com/api/v1/tools/listWorkspaceTables",
    headers={"Authorization": "Bearer " + os.environ["PIQLINE_API_KEY"]},
    json={},
)
output = response.json()["output"]
```

### `getWorkspaceTable`

JSON으로 된 워크스페이스 테이블: 스키마, 열, 행. 사이트, 앱 또는 에이전트의 기반이나 데이터 공급원으로 쓰입니다(read 스코프).

`POST https://piqline.com/api/v1/tools/getWorkspaceTable`

유형: 읽기. 스코프: `read`.

| 매개변수 | 형식 | 필수 | 설명 |
| --- | --- | --- | --- |
| `schema` | `string` | 아니요 | Schema, default public. |
| `name` | `string` | 예 | Table name. |

```bash tab="curl"
curl -s https://piqline.com/api/v1/tools/getWorkspaceTable \
  -H "Authorization: Bearer $PIQLINE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"name":"texte"}'
```
```javascript tab="JavaScript"
const response = await fetch("https://piqline.com/api/v1/tools/getWorkspaceTable", {
  method: "POST",
  headers: {
    Authorization: "Bearer " + process.env.PIQLINE_API_KEY,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    "name": "texte"
  }),
});
const { output } = await response.json();
```
```python tab="Python"
import os
import requests

response = requests.post(
    "https://piqline.com/api/v1/tools/getWorkspaceTable",
    headers={"Authorization": "Bearer " + os.environ["PIQLINE_API_KEY"]},
    json={
        "name": "texte",
    },
)
output = response.json()["output"]
```

### `listBookmarks`

워크스페이스 보관함의 북마크와 폴더: 제목, 유형, 폴더, 상태, 승인 여부. 단어, 상태, 유형으로 선택 필터링할 수 있습니다.

`POST https://piqline.com/api/v1/tools/listBookmarks`

유형: 읽기. 스코프: `read`.

| 매개변수 | 형식 | 필수 | 설명 |
| --- | --- | --- | --- |
| `query` | `string` | 아니요 | Optional filter on title, note or tags. |
| `status` | `inbox \| reading \| done` | 아니요 |  |
| `kind` | `item \| source \| signal \| graph \| search \| document \| board \| chat` | 아니요 |  |

```bash tab="curl"
curl -s https://piqline.com/api/v1/tools/listBookmarks \
  -H "Authorization: Bearer $PIQLINE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'
```
```javascript tab="JavaScript"
const response = await fetch("https://piqline.com/api/v1/tools/listBookmarks", {
  method: "POST",
  headers: {
    Authorization: "Bearer " + process.env.PIQLINE_API_KEY,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({}),
});
const { output } = await response.json();
```
```python tab="Python"
import os
import requests

response = requests.post(
    "https://piqline.com/api/v1/tools/listBookmarks",
    headers={"Authorization": "Bearer " + os.environ["PIQLINE_API_KEY"]},
    json={},
)
output = response.json()["output"]
```

### `listEntities`

팔로우 중인 엔티티(회사, 브랜드, 공개 계정)와 해당 기간에 연결된 항목.

`POST https://piqline.com/api/v1/tools/listEntities`

유형: 읽기. 스코프: `read`.

| 매개변수 | 형식 | 필수 | 설명 |
| --- | --- | --- | --- |
| `period` | `7d \| 30d \| 90d` | 아니요 |  |

```bash tab="curl"
curl -s https://piqline.com/api/v1/tools/listEntities \
  -H "Authorization: Bearer $PIQLINE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'
```
```javascript tab="JavaScript"
const response = await fetch("https://piqline.com/api/v1/tools/listEntities", {
  method: "POST",
  headers: {
    Authorization: "Bearer " + process.env.PIQLINE_API_KEY,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({}),
});
const { output } = await response.json();
```
```python tab="Python"
import os
import requests

response = requests.post(
    "https://piqline.com/api/v1/tools/listEntities",
    headers={"Authorization": "Bearer " + os.environ["PIQLINE_API_KEY"]},
    json={},
)
output = response.json()["output"]
```

### `listWatchContracts`

소스에 설정된 모니터링 계약: 의도, 유지할 용어와 제외할 용어, 이벤트.

`POST https://piqline.com/api/v1/tools/listWatchContracts`

유형: 읽기. 스코프: `read`.

이 도구는 매개변수가 없습니다. 빈 본문 `{}`를 보내십시오.

```bash tab="curl"
curl -s https://piqline.com/api/v1/tools/listWatchContracts \
  -H "Authorization: Bearer $PIQLINE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'
```
```javascript tab="JavaScript"
const response = await fetch("https://piqline.com/api/v1/tools/listWatchContracts", {
  method: "POST",
  headers: {
    Authorization: "Bearer " + process.env.PIQLINE_API_KEY,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({}),
});
const { output } = await response.json();
```
```python tab="Python"
import os
import requests

response = requests.post(
    "https://piqline.com/api/v1/tools/listWatchContracts",
    headers={"Authorization": "Bearer " + os.environ["PIQLINE_API_KEY"]},
    json={},
)
output = response.json()["output"]
```

### `checkInvestigation`

가장 최근 Edge 조사 또는 지정한 조사의 상태: 대기 중, 실행 중, 후보와 함께 완료, 또는 실패.

`POST https://piqline.com/api/v1/tools/checkInvestigation`

유형: 읽기. 스코프: `read`.

| 매개변수 | 형식 | 필수 | 설명 |
| --- | --- | --- | --- |
| `missionId` | `string` | 아니요 | Omit to read the latest investigator mission of this workspace |

```bash tab="curl"
curl -s https://piqline.com/api/v1/tools/checkInvestigation \
  -H "Authorization: Bearer $PIQLINE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'
```
```javascript tab="JavaScript"
const response = await fetch("https://piqline.com/api/v1/tools/checkInvestigation", {
  method: "POST",
  headers: {
    Authorization: "Bearer " + process.env.PIQLINE_API_KEY,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({}),
});
const { output } = await response.json();
```
```python tab="Python"
import os
import requests

response = requests.post(
    "https://piqline.com/api/v1/tools/checkInvestigation",
    headers={"Authorization": "Bearer " + os.environ["PIQLINE_API_KEY"]},
    json={},
)
output = response.json()["output"]
```

### `checkHunt`

가장 최근 헌트 또는 지정한 헌트의 상태: 단계, 찾은 사람(코드의 판정과 사용자의 판정), 각 조건의 상태와 날짜가 있는 공개 근거(URL, 날짜, 발췌). 연락처는 절대 포함하지 않습니다.

`POST https://piqline.com/api/v1/tools/checkHunt`

유형: 읽기. 스코프: `read`.

| 매개변수 | 형식 | 필수 | 설명 |
| --- | --- | --- | --- |
| `missionId` | `string` | 아니요 | Omit to read the latest hunt of this workspace. |

```bash tab="curl"
curl -s https://piqline.com/api/v1/tools/checkHunt \
  -H "Authorization: Bearer $PIQLINE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'
```
```javascript tab="JavaScript"
const response = await fetch("https://piqline.com/api/v1/tools/checkHunt", {
  method: "POST",
  headers: {
    Authorization: "Bearer " + process.env.PIQLINE_API_KEY,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({}),
});
const { output } = await response.json();
```
```python tab="Python"
import os
import requests

response = requests.post(
    "https://piqline.com/api/v1/tools/checkHunt",
    headers={"Authorization": "Bearer " + os.environ["PIQLINE_API_KEY"]},
    json={},
)
output = response.json()["output"]
```

### `planSourcePack`

목표에 맞는 일관된 소스 묶음을 제안합니다. 아무것도 만들지 않습니다.

`POST https://piqline.com/api/v1/tools/planSourcePack`

유형: 읽기. 스코프: `read`.

| 매개변수 | 형식 | 필수 | 설명 |
| --- | --- | --- | --- |
| `name` | `string` | 예 |  |
| `rationale` | `string` | 예 | Why this pack answers the goal |
| `candidates` | `array<object>` | 예 |  |

```bash tab="curl"
curl -s https://piqline.com/api/v1/tools/planSourcePack \
  -H "Authorization: Bearer $PIQLINE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"name":"texte","rationale":"texte","candidates":[{"platform":"instagram","target":"texte","label":"texte","why":"texte","confidence":"high"}]}'
```
```javascript tab="JavaScript"
const response = await fetch("https://piqline.com/api/v1/tools/planSourcePack", {
  method: "POST",
  headers: {
    Authorization: "Bearer " + process.env.PIQLINE_API_KEY,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    "name": "texte",
    "rationale": "texte",
    "candidates": [
      {
        "platform": "instagram",
        "target": "texte",
        "label": "texte",
        "why": "texte",
        "confidence": "high"
      }
    ]
  }),
});
const { output } = await response.json();
```
```python tab="Python"
import os
import requests

response = requests.post(
    "https://piqline.com/api/v1/tools/planSourcePack",
    headers={"Authorization": "Bearer " + os.environ["PIQLINE_API_KEY"]},
    json={
        "name": "texte",
        "rationale": "texte",
        "candidates": [
            {
                "platform": "instagram",
                "target": "texte",
                "label": "texte",
                "why": "texte",
                "confidence": "high",
            },
        ],
    },
)
output = response.json()["output"]
```

### `listWidgets`

이 워크스페이스의 보드에 놓을 수 있는 위젯을 사용자에게 맞게 순위를 매겨 이유와 함께 나열합니다.

`POST https://piqline.com/api/v1/tools/listWidgets`

유형: 읽기. 스코프: `read`.

| 매개변수 | 형식 | 필수 | 설명 |
| --- | --- | --- | --- |
| `period` | `7d \| 30d \| 90d` | 아니요 | Window used by isProposable. Default 7d. |

```bash tab="curl"
curl -s https://piqline.com/api/v1/tools/listWidgets \
  -H "Authorization: Bearer $PIQLINE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'
```
```javascript tab="JavaScript"
const response = await fetch("https://piqline.com/api/v1/tools/listWidgets", {
  method: "POST",
  headers: {
    Authorization: "Bearer " + process.env.PIQLINE_API_KEY,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({}),
});
const { output } = await response.json();
```
```python tab="Python"
import os
import requests

response = requests.post(
    "https://piqline.com/api/v1/tools/listWidgets",
    headers={"Authorization": "Bearer " + os.environ["PIQLINE_API_KEY"]},
    json={},
)
output = response.json()["output"]
```

### `getAdvertiserCampaigns`

워크스페이스 수집 데이터에 있는 광고주의 광고 파일: 광고, 게재 중인 광고, 날짜, 라이브러리, 국가, 읽은 니즈, 월별 신규 광고와 증가 추세, 최신 광고, 신호. 개인은 다루지 않습니다. 크레딧을 사용하지 않습니다.

`POST https://piqline.com/api/v1/tools/getAdvertiserCampaigns`

유형: 읽기. 스코프: `read`.

| 매개변수 | 형식 | 필수 | 설명 |
| --- | --- | --- | --- |
| `advertiser` | `string` | 예 | Name (or part of it) of the advertiser. |

```bash tab="curl"
curl -s https://piqline.com/api/v1/tools/getAdvertiserCampaigns \
  -H "Authorization: Bearer $PIQLINE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"advertiser":"texte"}'
```
```javascript tab="JavaScript"
const response = await fetch("https://piqline.com/api/v1/tools/getAdvertiserCampaigns", {
  method: "POST",
  headers: {
    Authorization: "Bearer " + process.env.PIQLINE_API_KEY,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    "advertiser": "texte"
  }),
});
const { output } = await response.json();
```
```python tab="Python"
import os
import requests

response = requests.post(
    "https://piqline.com/api/v1/tools/getAdvertiserCampaigns",
    headers={"Authorization": "Bearer " + os.environ["PIQLINE_API_KEY"]},
    json={
        "advertiser": "texte",
    },
)
output = response.json()["output"]
```

### `listAdSignals`

매시간 계산되는 워크스페이스의 광고 신호: 캠페인 시작 또는 중단, 증가, 새 국가, 새 플랫폼, 유료 채용, 프로모션, 출시, 새 광고주. 크레딧을 사용하지 않습니다.

`POST https://piqline.com/api/v1/tools/listAdSignals`

유형: 읽기. 스코프: `read`.

| 매개변수 | 형식 | 필수 | 설명 |
| --- | --- | --- | --- |
| `kind` | `ad_campaign_started \| ad_campaign_stopped \| ad_ramp_up \| ad_new_country \| ad_new_platform \| ad_hiring \| ad_promotion \| ad_launch \| …` | 아니요 | ad_hiring for paid recruitment campaigns, ad_campaign_started for new campaigns, etc. |
| `activeOnly` | `boolean` | 아니요 |  |
| `limit` | `integer` | 아니요 |  |

```bash tab="curl"
curl -s https://piqline.com/api/v1/tools/listAdSignals \
  -H "Authorization: Bearer $PIQLINE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'
```
```javascript tab="JavaScript"
const response = await fetch("https://piqline.com/api/v1/tools/listAdSignals", {
  method: "POST",
  headers: {
    Authorization: "Bearer " + process.env.PIQLINE_API_KEY,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({}),
});
const { output } = await response.json();
```
```python tab="Python"
import os
import requests

response = requests.post(
    "https://piqline.com/api/v1/tools/listAdSignals",
    headers={"Authorization": "Bearer " + os.environ["PIQLINE_API_KEY"]},
    json={},
)
output = response.json()["output"]
```

### `listCollectedAds`

이미 읽은 워크스페이스의 광고 수집(Meta, TikTok, Google, LinkedIn): 목록, 또는 수집 이름을 지정하면 분류(각도, 오퍼, 톤, 형식), 속도, 가장 오래 게재된 광고, 라이브러리, 상태, 각도 또는 단어로 필터링한 광고. 크레딧을 사용하지 않습니다.

`POST https://piqline.com/api/v1/tools/listCollectedAds`

유형: 읽기. 스코프: `read`.

| 매개변수 | 형식 | 필수 | 설명 |
| --- | --- | --- | --- |
| `collection` | `string` | 아니요 | Name of a collection (exact, start or fragment). |
| `library` | `meta \| tiktok \| google \| linkedin` | 아니요 |  |
| `status` | `live \| new` | 아니요 | live: active or shown within 14 days. new: first seen at the last pass. |
| `angle` | `promotion \| lancement \| marque \| preuve_sociale \| education \| recrutement \| evenement \| lead \| …` | 아니요 |  |
| `query` | `string` | 아니요 | Word to find in the advertiser, title, text, button or transcript. |
| `limit` | `integer` | 아니요 |  |

```bash tab="curl"
curl -s https://piqline.com/api/v1/tools/listCollectedAds \
  -H "Authorization: Bearer $PIQLINE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'
```
```javascript tab="JavaScript"
const response = await fetch("https://piqline.com/api/v1/tools/listCollectedAds", {
  method: "POST",
  headers: {
    Authorization: "Bearer " + process.env.PIQLINE_API_KEY,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({}),
});
const { output } = await response.json();
```
```python tab="Python"
import os
import requests

response = requests.post(
    "https://piqline.com/api/v1/tools/listCollectedAds",
    headers={"Authorization": "Bearer " + os.environ["PIQLINE_API_KEY"]},
    json={},
)
output = response.json()["output"]
```
