Skip to main content


The following examples provide a foundation to begin using the search route. Remember that you can always change the content of the rules array to the search query that fits your search.

# Dependencies to install:
# $ python -m pip install requests

import json
import requests


API_URL = ""

credentials = {"clientId": CLIENT_ID, "clientSecret": CLIENT_SECRET}

token_response ="{API_URL}/auth/access_token", json=credentials)

access_token = f"Bearer {token_response.json()['accessToken']}"

# You can now use the value in access_token when making further requests

headers = {
'Authorization': access_token

query = {
"combinator": "or",
"rules": [
"property": "$title",
"operator": "=",
"value": "admin-prod"
"property": "$title",
"operator": "=",
"value": "admin-test"

search_req ="{API_URL}/entities/search", headers=headers, json=query)

search_entities = search_req.json()['entities']

for entity in search_entities:

Using catalog search in your workflowsโ€‹

The information stored in Port can be used as part of your workflows, automation and CI/CD processes. Take a look at our service locking guide for a practical example about integrating Port's search with your CI/CD.