---
title: "Get a paginated list of the Machine Policies in the supplied Octopus Deploy Space. The results will be sorted alphabetically by name."
method: GET
path: "/machinepolicies"
tags: ["MachinePolicies"]
---

# Get a paginated list of the Machine Policies in the supplied Octopus Deploy Space. The results will be sorted alphabetically by name.

`GET /machinepolicies`

## Query parameters

- `ids` string[]
- `partialName` string
- `skip` integer
- `take` integer

## Response `200`

A paginated list of the Machine Policies in the supplied Octopus Deploy Space (sorted alphabetically by name).

- MachinePolicyResourceCollection
  - `Id` string
  - `Items` MachinePolicyResource[]
    - `ConnectionConnectTimeout` string, date-span
    - `ConnectionRetryCountLimit` integer
    - `ConnectionRetrySleepInterval` string, date-span
    - `ConnectionRetryTimeLimit` string, date-span
    - `Description` string
    - `Id` string
    - `IsDefault` boolean
    - `LastModifiedBy` string
    - `LastModifiedOn` string, date-time
    - `Links` object
    - `MachineCleanupPolicy` MachineCleanupPolicyResource
      - `DeleteMachinesBehavior` 'DoNotDelete' | 'DeleteUnavailableMachines'
      - `DeleteMachinesElapsedTimeSpan` string, date-span
    - `MachineConnectivityPolicy` MachineConnectivityPolicyResource
      - `MachineConnectivityBehavior` 'ExpectedToBeOnline' | 'MayBeOfflineAndCanBeSkipped'
    - `MachineHealthCheckPolicy` MachineHealthCheckPolicyResource
      - `BashHealthCheckPolicy` MachineScriptPolicyResource
        - `RunType` 'InheritFromDefault' | 'Inline' | 'OnlyConnectivity'
        - `ScriptBody` string
      - `HealthCheckCron` string
      - `HealthCheckCronTimezone` string
      - `HealthCheckInterval` string, date-span
      - `HealthCheckType` 'RunScript' | 'OnlyConnectivity'
      - `PowerShellHealthCheckPolicy` MachineScriptPolicyResource
        - `RunType` 'InheritFromDefault' | 'Inline' | 'OnlyConnectivity'
        - `ScriptBody` string
    - `MachinePackageCacheRetentionPolicy` MachinePackageCacheRetentionPolicyResource
      - `PackageUnit` 'Items'
      - `QuantityOfPackagesToKeep` integer
      - `QuantityOfVersionsToKeep` integer
      - `Strategy` 'Default' | 'Quantities'
      - `VersionUnit` 'Items'
    - `MachineRpcCallRetryPolicy` MachineRpcCallRetryPolicyResource
      - `Enabled` boolean
      - `HealthCheckRetryDuration` string, date-span
      - `RetryDuration` string, date-span
    - `MachineUpdatePolicy` MachineUpdatePolicyResource
      - `CalamariUpdateBehavior` 'UpdateOnDeployment' | 'UpdateOnNewMachine' | 'UpdateAlways'
      - `KubernetesAgentUpdateBehavior` 'NeverUpdate' | 'Update' | 'Block'
      - `TentacleUpdateAccountId` string
      - `TentacleUpdateBehavior` 'NeverUpdate' | 'Update'
    - `Name` string
    - `PollingRequestQueueTimeout` string, date-span
    - `SpaceId` string
  - `ItemsPerPage` integer
  - `ItemType` string
  - `LastModifiedBy` string
  - `LastModifiedOn` string, date-time
  - `LastPageNumber` integer
  - `Links` object
  - `NumberOfPages` integer
  - `TotalResults` integer

## Other responses

- `400` — Bad request. Either the payload was not structurally valid or business rules did not permit the operation.
- `404` — Not found. One or more of the entities involved in the operation was not found.

---

[API](https://skmtc.net/octopus/apis/octopus-server-api.md) · [All operations](https://skmtc.net/octopus/apis/octopus-server-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/octopus/octopus-server-api/versions/bc9158facfc7/schema)
