Sign in Start for free

Search

Octopus supports searching for many types of resources across the entire system via the search API.

Search for resources across all accessible spaces

GET /api/globalsearch

Query Parameters

  • inContainerId string
    Optional space or project ID, determined by InContainerKind, to restrict the search results to.
  • inContainerKind string
    Whether the search runs inside a space or a project.
  • scopeToType string
    Optional resource type to restrict the search to. When omitted, every type available is searched.
  • searchTerm string
    A search term to search for.
    Optional if the search is scoped with ScopeToType and/or InContainerId, required otherwise.

Response

200 — The results of a global cross-space search.

  • Counts array of object
    The total number of matches for each resource type searched.
    • TotalCount integer
      The number of matches for this type, capped at 100.
    • TotalCountIsCapped boolean
      True when there were 100 or more matches for this type.
    • Type string
      The resource type this count applies to.
  • Results array of object
    The resources that matched the search query.
    • EnvironmentKind string
      When Type is Environment, this is the specific type of environment being referred to. Omitted otherwise.
    • Id string
      The ID of the found resource. Minimum length 1.
    • Location object
    • Name string
      The display name of the found resource. Minimum length 1.
    • Type string
      The type of the found resource.

Example Response

JSON
{
  "Counts": [
    {
      "TotalCount": 28,
      "TotalCountIsCapped": false,
      "Type": "Runbook"
    }
  ],
  "Results": [
    {
      "EnvironmentKind": "Static",
      "Id": "Runbooks-12",
      "Location": {
        "Kind": "Project",
        "ProjectId": "Projects-22",
        "ProjectName": "Web App",
        "SpaceId": "Spaces-1",
        "SpaceName": "Default"
      },
      "Name": "Provision Ephemeral Environment",
      "Type": "Runbook"
    }
  ]
}

Lists spaces/projects to scope a search to

GET /api/globalsearch/containers

Query Parameters

  • containerSearchTerm string
    The search term to match returned space and project names against.
    If omitted, everything is included.

Response

200 — Lists spaces and projects available to scope a search to.

  • Results array of object
    Up to 20 spaces followed by up to 20 projects matching the container search term.
    • Kind string
      Whether a matched container is a space or a project.
    • ProjectId string
      The ID of a matched project, set only when Kind is Project.
    • ProjectName string
      The display name of a matched project, set only when Kind is Project.
    • SpaceId string
      The ID of a matched space, or of the space a matched project lives within.
    • SpaceName string
      The display name of a matched space, or of the space a matched project lives within. Minimum length 1.

Example Response

JSON
{
  "Results": [
    {
      "Kind": "Project",
      "ProjectId": "Projects-22",
      "ProjectName": "Web App",
      "SpaceId": "Spaces-1",
      "SpaceName": "Default"
    }
  ]
}