We strongly recommend that before you start using the Cato API, please review the Support Policy for the Cato API.
Overview of entityLookup
The entityLookup query works with Cato Management Application entities such as sites and VPN users. The query can help you look up an entity name to return the specific ID, and automatically extract a list of entities in the account. Each entity is returned with additional relevant information, such as the creation date and the description.
For reseller accounts, you can create separate API keys inside each customer account that you are connecting to the Cato API. For more about rate limiting and the entityLookup API query, see Understanding Cato API Rate Limiting.
Details for the entityLookup Fields
These are the details that the auditFeed fields can show for the query:
- items - the items field contains the data for each entity
- total - total number of entities returned for this query
entityLookup 항목
The EntityInfo fields show the data for each entity, including:
- entity - shows the id, name from the Cato Management Application, and the type of entity usually site or vpnUser
- 설명 - Cato 관리 애플리케이션의 엔터티 설명
- helperFields - 엔터티에 대한 추가 관련 정보 및 데이터
entityLookup 총계
The Total field shows the total number of entities for your account in the Cato Management Application. The value of this field doesn't change during the pagination of the API return, and can help you easily compare it to the total number of records retrieved.
Arguments for the entityLookup
These are the arguments that you can pass and define the entities that are returned by the query:
- 계정 ID - 여러 계정의 경우, ID를 배열로 입력합니다 (필수 인수)
- 유형 - 예를 들어 사이트 또는 vpnUser와 같은 유형과 일치하는 엔티티 반환 (필수 인수)
- 제한 - 이 쿼리에서 반환되는 엔티티의 최대 수 (기본값은 50)
- from - according to the index of entries, start the query from this specific entity
- search - filter the return according to this value
- entityIDs - entity IDs, for multiple entities, enter the IDs as an array
- sort - defines how the entities that the query returns are sorted
entityLookup accountIDs Argument
Enter one or more account IDs for the data that the query returns.
This account ID is displayed in the Administration > General Info page.
The accountIDs argument is mandatory for the query.
entityLookup 유형 인수
The type argument defines the entity data that the query returns. These are the supported values for the type argument: site, vpnUser, and admins.
The type argument is mandatory for the query. Refer to the schema for the enum items for each value.
entityLookup 제한 인수
The limit argument defines the maximum number of entities that the query returns. If you don't specify the limit argument, then the query is limited to 50 entities.
Each query can return a maximum of 1000 entities.
entityLookup 시작 인수
The from argument defines which entity to start the query. 예를 들어, 계정에 100명의 VPN 사용자가 있는 경우, 60으로 설정하여 마지막 40개의 VPN 사용자 엔터티만 표시합니다.
쿼리의 첫 번째 항목은 0입니다. 따라서 항목 20부터 시작만 표시하려면 19로 설정하십시오.
entityLookup 검색 인수
검색 인수는 쿼리를 필터링하여 일치하는 엔티티 이름만 반환합니다. 검색 인수는 문자열 값입니다.
entityLookup entityIDs 인수
entityIDs 인수는 ID와 일치하는 엔터티만 반환합니다.
entityLookup 정렬 인수
정렬 인수는 엔터티의 ID나 이름에 따라 데이터를 오름차순 또는 내림차순으로 정렬할 수 있습니다.
- 필드 - 필드 값으로 이름 또는 id를 사용
- 순서 - 결과를 오름차순(asc) 또는 내림차순(dsc)으로 정렬
예를 들어, 이름에 따라 결과를 오름차순(a-z)으로 정렬하려면 이 인수를 사용하십시오: sort:{field"name", order:asc}
entityLookup parent 인수
parent 인수는 계층이 있는 엔터티를 쿼리하는 데 사용되며, 엔터티와 그 부모를 제공해야 합니다. 예를 들어, networkInterface
유형의 경우 다음 값을 사용하여 부모를 입력해야 합니다: id <사이트 id>, 유형 사이트.
entityLookup 쿼리 예시
이 섹션에는 entityLookup 쿼리 예시가 포함되어 있습니다.
계정의 모든 사이트 쿼리
Postman 스크립트 예제
query entityLookup ($accountID: ID!, $type: EntityType!, $search: String) { entityLookup (accountID: $accountID, type: $type, search: $search) { items { entity { id name } } } }
GraphQL 변수
{ "accountID": "26", "type": "site" }
사이트 이름을 사용하여 사이트 검색
Postman 스크립트 예제
query entityLookup ($accountID: ID!, $type: EntityType!, $search: String) { entityLookup (accountID: $accountID, type: $type, search: $search) { items { entity { id name } } } }
GraphQL 변수
{ "accountID": "26", "type": "site", "search": "MySite" }
parent 인수를 포함한 networkInterface 검색
Postman 스크립트 예제
query entityLookup ($accountID: ID!, $type: EntityType!, $parent: EntityInput!) { entityLookup (accountID: $accountID, type: $type, parent: $parent) { items { entity { id name type } description helperFields } }
}
}
GraphQL 변수
{ "accountID": "26", "type": "networkInterface", "parent": { "id": 52180, "type": "site" } }
댓글 0개
댓글을 남기려면 로그인하세요.