Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: add scan-entities API documentation #1900

Closed
Closed
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
2 changes: 1 addition & 1 deletion docs/api-reference/get-actions-automations.api.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ hide_title: true
hide_table_of_contents: true
api: eJztVm1v4zYM/iuC9mVXOHVbbF+MIECwBl2xrQ16OWBFG6SyzcRCFclH0cnlgvz3QZaduHnD7tpiG7AvqUtRFB/y4cuSp2ATlDlJo3nEB5m0DE1BwIRSZm7ZwhSMDBsDJRkzGphBNjUIzIIatyzgTCbAROIMWCZ0GhpkoiAzFV4ktbOBrG+QmEgSU2g6bccYdsqfQQYsEUqxuVSK5YBjg1MmmDITmQjFnro3l08sBpoDaOcU+1wALlguUEyBAC2LQZl54N5mCFSgV2u49MIfygSxqXBwyL2NkgClaLpkmAKB2uMUsSnokLWAJRkkz8ypOGsPqUmKKWgqj4c/ZkS5jcIwNYk9nQDlBulUmrAy1xI6bTXMhR+8GzzgJCaWRw+86zX5MOAbyDx6WHKbZDAVPFpyWuTAIy4QxYIHXBJMbUNuCaWe8NUq4NIluQwgD7gW0/Ja+cJIpqBJjiUgD3ZYAWxzHFpmxiVafzPck/bQE2cuNK3Zs4aG8LmQCCmPxkJZWAVvhyVWBeQoNX0PnPXl0LJ5Zuya1mGTPyUuabN3wRVw0MXU5f2Xu1530OMBv+z93vMf3fvWBR8egm5ywNLFvXgf1sfMvRjaw9xMEARBq1nfLfiSA0rQCdjQAhV5q5CtscFWRYEfYmFl0kqBhFT2ww5BdsnA7kDBzImMVgs2Nri3o3xTcGNjFAjND0QoL2IlbQbpToRunQtYO+R8OTlp5Pzk5JRdj9kTYQFPgXd4bexFcymbWAweI6Tf5P0OBZrx4AHfvMOHBxASyskEcFRafGNC9m4G14P7keflJQ9qwaf+5UuBJ6wTDK7/6N2N+ne3/d7d4H7U+7N/fVcedG/uR7W9X7s3V73DtK4hwQw07aV2eRJWjb1Sh9Tz73hD2sPBRjJfl7zZOQ/47OJgqmaA1hfrtvlhwC0kBUpalH0+BoGAziaCSCNRDwSniGBzoy2Umbs4O3N/XkboY5EkYK2riZ8uLnbPb91I99U6Nm7kSz1hgGjQMpMkBSKk0aN+1G0SsYKO+8DOo2asTVmn5xTbIWVryeXGeiVvh+WFzbW00447Us+EkunIoQdL7TDutENK1yous6kgwXI0M5lCylIDlmnTHN5+U/HJqG7Xr4W1uw75z/si888hJ0At1Ai8iS3gXc1qDe/N2pnDCFcBnwJlJuURn4Ark1xQxiMezs7rXYM7WuGs3h4KVDzi9QwQuWyMAO4ovqtQ2Bc6DZ5+dBnwJKzZumkwufwNGsTvFpQZlF/rWVUWRwYiBazG+tiU1yUpp1/ujd3+tSunqmYifn565vKaG0tToZ16Zf0KaN/U3m4cS54YTa6j/L/z/ot2Xs8Ygi8U5krIsnZLHi4rQld9VWyW4sxYcvLlMhYWPqFarZzYd1tH9FRaVyd1ez1KhDddc/eieYbFgZV7JlTh9Mvie73Tr11mj3h/YMl+BYD//HZ6JFrNvfw7Q/Tu6+kR95tL83H3vf7WCvoKUrz7XncE9fbW+XeQbza6jfbQ/YPSqfPoYdic01e9gV/qs5fD8rkcltWHa2D1kV40TG9PUe+C+3Ue7r2yXPpRvFqt9f3RwRvVVK61XYCGq9XqL/62VfE=
sidebar_class_name: "get api-method"
info_path: api-reference-temp/port-api
info_path: api-reference/port-api
custom_edit_url: null
---

Expand Down
366 changes: 366 additions & 0 deletions docs/api-reference/scan-entities.api.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,366 @@
---
id: scan-entities
title: "Scan entities"
description: "This route allows you to scan through all entities of a blueprint in a paginated manner using cursor-based pagination.<br/><br/>To learn more about entities, check out the [documentation](https://docs.getport.io/build-your-software-catalog/sync-data-to-catalog/#entities)."
sidebar_label: "Scan entities"
hide_title: true
hide_table_of_contents: true
api:
sidebar_class_name: "post api-method"
info_path: api-reference/port-api
custom_edit_url: null
---

import ApiTabs from "@theme/ApiTabs";
import DiscriminatorTabs from "@theme/DiscriminatorTabs";
import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint";
import SecuritySchemes from "@theme/ApiExplorer/SecuritySchemes";
import MimeTabs from "@theme/MimeTabs";
import ParamsItem from "@theme/ParamsItem";
import ResponseSamples from "@theme/ResponseSamples";
import SchemaItem from "@theme/SchemaItem";
import SchemaTabs from "@theme/SchemaTabs";
import Markdown from "@theme/Markdown";
import Heading from "@theme/Heading";
import OperationTabs from "@theme/OperationTabs";
import TabItem from "@theme/TabItem";

<Heading
as={"h1"}
className={"openapi__heading"}
children={"Scan entities"}
>
</Heading>

<MethodEndpoint
method={"post"}
path={"/v1/blueprints/{blueprint_identifier}/entities/scan"}
>
</MethodEndpoint>

This route allows you to scan through all entities of a blueprint in a paginated manner. The endpoint uses cursor-based pagination with a base64-encoded token for efficient traversal of large datasets.

<Heading
id={"request"}
as={"h2"}
className={"openapi-tabs__heading"}
children={"Request"}
>
</Heading>

<details
style={{"marginBottom":"1rem"}}
className={"openapi-markdown__details"}
data-collapsed={false}
open={true}
>
<summary
style={{}}
>
<h3
className={"openapi-markdown__details-summary-header-params"}
>
Path Parameters
</h3>
</summary>
<div>
<ul>
<ParamsItem
className={"paramsItem"}
param={{"schema":{"type":"string","minLength":1},"in":"path","name":"blueprint_identifier","required":true,"description":"The identifier of the blueprint whose entities you want to scan.<br/>"}}
>
</ParamsItem>
</ul>
</div>
</details>

<details
style={{"marginBottom":"1rem"}}
className={"openapi-markdown__details"}
data-collapsed={false}
open={true}
>
<summary
style={{}}
>
<h3
className={"openapi-markdown__details-summary-header-params"}
>
Query Parameters
</h3>
</summary>
<div>
<ul>
<ParamsItem
className={"paramsItem"}
param={{"schema":{"type":"number","default":200,"maximum":1000},"in":"query","name":"limit","required":false,"description":"Maximum number of entities to return in a single page. Default is 200, maximum is 1000.<br/>"}}
>
</ParamsItem>
<ParamsItem
className={"paramsItem"}
param={{"schema":{"type":"string"},"in":"query","name":"from","required":false,"description":"A base64-encoded cursor for pagination. This token is returned in the 'next' field of the response and should not be modified manually.<br/>"}}
>
</ParamsItem>
<ParamsItem
className={"paramsItem"}
param={{"schema":{"type":"array","items":{"type":"string"}},"in":"query","name":"include","required":false,"description":"An array of values from the [entity JSON](https://docs.getport.io/build-your-software-catalog/sync-data-to-catalog/#json-structure). Only these values will be returned in the response.<br/>For example: `{ \"properties.propertyIdentifier\",\"identifier\"}`"}}
>
</ParamsItem>
<ParamsItem
className={"paramsItem"}
param={{"schema":{"type":"array","items":{"type":"string"}},"in":"query","name":"exclude","required":false,"description":"An array of values from the [entity JSON](https://docs.getport.io/build-your-software-catalog/sync-data-to-catalog/#json-structure) to be omitted from the response.<br/>For example: `{ \"properties.propertyIdentifier\",\"identifier\"}`"}}
>
</ParamsItem>
</ul>
</div>
</details>

<MimeTabs
className={"openapi-tabs__mime"}
>
<TabItem
label={"application/json"}
value={"application/json-schema"}
>
<details
style={{}}
className={"openapi-markdown__details mime"}
data-collapsed={false}
open={true}
>
<summary
style={{}}
className={"openapi-markdown__details-summary-mime"}
>
<h3
className={"openapi-markdown__details-summary-header-body"}
>
Body
</h3>
<strong
className={"openapi-schema__required"}
>
required
</strong>
</summary>
<div
style={{"textAlign":"left","marginLeft":"1rem"}}
>
<div
style={{"marginTop":"1rem","marginBottom":"1rem"}}
>
<SchemaItem
collapsible={true}
className={"schemaItem"}
>
<details
style={{}}
className={"openapi-markdown__details"}
>
<summary
style={{}}
>
<strong>
query
</strong>
<span
style={{"opacity":"0.6"}}
>
object
</span>
<strong
className={"openapi-schema__required"}
>
required
</strong>
</summary>
<div
style={{"marginLeft":"1rem"}}
>
<div
style={{"marginTop":".5rem","marginBottom":".5rem"}}
>
Query object containing rules for filtering entities.
</div>
</div>
</details>
</SchemaItem>
</div>
</div>
</details>
</TabItem>
</MimeTabs>

<div>
<ApiTabs
label={undefined}
id={undefined}
>
<TabItem
label={"200"}
value={"200"}
>
<div>
Success
</div>
<div>
<MimeTabs
className={"openapi-tabs__mime"}
schemaType={"response"}
>
<TabItem
label={"application/json"}
value={"application/json"}
>
<SchemaTabs
className={"openapi-tabs__schema"}
>
<TabItem
label={"Schema"}
value={"Schema"}
>
<details
style={{}}
className={"openapi-markdown__details response"}
data-collapsed={false}
open={true}
>
<summary
style={{}}
className={"openapi-markdown__details-summary-response"}
>
<strong>
Schema
</strong>
</summary>
<div
style={{"textAlign":"left","marginLeft":"1rem"}}
>
<SchemaItem
collapsible={false}
name={"ok"}
required={true}
schemaName={"boolean"}
qualifierMessage={undefined}
schema={{"type":"boolean","description":"Indicates if the request was successful"}}
>
</SchemaItem>
<SchemaItem
collapsible={true}
className={"schemaItem"}
>
<details
style={{}}
className={"openapi-markdown__details"}
>
<summary
style={{}}
>
<strong>
entities
</strong>
<span
style={{"opacity":"0.6"}}
>
array
</span>
<strong
className={"openapi-schema__required"}
>
required
</strong>
</summary>
<div
style={{"marginLeft":"1rem"}}
>
<div
style={{"marginTop":".5rem","marginBottom":".5rem"}}
>
Array of entities matching the query
</div>
</div>
</details>
</SchemaItem>
<SchemaItem
collapsible={false}
name={"next"}
required={false}
schemaName={"string"}
qualifierMessage={undefined}
schema={{"type":"string","description":"Base64-encoded pagination token for the next page. Only present if there are more results."}}
>
</SchemaItem>
</div>
</details>
</TabItem>
<TabItem
label={"Example (from response)"}
value={"Example (from response)"}
>
<ResponseSamples
responseExample={"{\n \"ok\": true,\n \"entities\": [\n {\n \"identifier\": \"entity-1\",\n \"title\": \"Entity 1\",\n \"blueprint\": \"service\",\n \"properties\": {}\n }\n ],\n \"next\": \"eyJlbnRpdHlJZCI6ImVudGl0eS0xIiwiY3JlYXRlZEF0IjoiMjAyNC0wMS0xMFQxMjowMDowMFoifQ==\"\n}"}
language={"json"}
>
</ResponseSamples>
</TabItem>
</SchemaTabs>
</TabItem>
</MimeTabs>
</div>
</TabItem>
<TabItem
label={"404"}
value={"404"}
>
<div>
One of the following errors occurred:
<table>
<tr>
<th>Error</th>
<th>Description</th>
</tr>
<tr>
<td><b>not_found</b></td>
<td>A blueprint with the provided `identifier` was not found</td>
</tr>
</table>
</div>
</TabItem>
<TabItem
label={"422"}
value={"422"}
>
<div>
One of the following errors occurred:
<table>
<tr>
<th>Error</th>
<th>Description</th>
</tr>
<tr>
<td><b>invalid_request</b></td>
<td>Invalid request parameters. This could be due to an invalid 'from' parameter or a limit value outside the allowed range (1-1000).</td>
</tr>
</table>
</div>
</TabItem>
<TabItem
label={"500"}
value={"500"}
>
<div>
One of the following errors occurred:
<table>
<tr>
<th>Error</th>
<th>Description</th>
</tr>
<tr>
<td><b>internal_error</b></td>
<td>An internal error occurred</td>
</tr>
</table>
</div>
</TabItem>
</ApiTabs>
</div>
6 changes: 6 additions & 0 deletions docs/api-reference/sidebar.ts
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,12 @@ const sidebar: SidebarsConfig = {
label: "Search entities",
className: "api-method post",
},
{
type: "doc",
id: "api-reference/scan-entities",
label: "Scan entities",
className: "api-method post",
},
],
},
{
Expand Down
2 changes: 1 addition & 1 deletion docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -354,7 +354,7 @@ const config = {
config: {
port: { // the <id> referenced when running CLI commands
specPath: './static/apispec.yaml', // path to OpenAPI spec, URLs supported
outputDir: "docs/api-reference-temp", // dir of generated files, REMEMBER to move them to /api-reference when ready
outputDir: "docs/api-reference", // dir of generated files
sidebarOptions: {
groupPathsBy: "tag",
categoryLinkSource: "tag",
Expand Down
Loading