# \PeersApi

All URIs are relative to *http://localhost*

Method | HTTP request | Description
------------- | ------------- | -------------
[**announce_peer**](PeersApi.md#announce_peer) | **POST** /api/v1/peers/announce | POST /api/v1/peers/announce
[**assign_repo**](PeersApi.md#assign_repo) | **POST** /api/v1/peers/{id}/repositories | Assign repository to peer instance
[**complete_chunk**](PeersApi.md#complete_chunk) | **POST** /api/v1/peers/{id}/transfer/{session_id}/chunk/{chunk_index}/complete | POST /api/v1/peers/:id/transfer/:session_id/chunk/:chunk_index/complete
[**complete_session**](PeersApi.md#complete_session) | **POST** /api/v1/peers/{id}/transfer/{session_id}/complete | POST /api/v1/peers/:id/transfer/:session_id/complete
[**create_sync_policy**](PeersApi.md#create_sync_policy) | **POST** /api/v1/sync-policies | Create a new sync policy
[**delete_sync_policy**](PeersApi.md#delete_sync_policy) | **DELETE** /api/v1/sync-policies/{id} | Delete a sync policy
[**discover_peers**](PeersApi.md#discover_peers) | **GET** /api/v1/peers/{id}/connections/discover | GET /api/v1/peers/:id/connections/discover
[**evaluate_policies**](PeersApi.md#evaluate_policies) | **POST** /api/v1/sync-policies/evaluate | Force re-evaluate all sync policies
[**fail_chunk**](PeersApi.md#fail_chunk) | **POST** /api/v1/peers/{id}/transfer/{session_id}/chunk/{chunk_index}/fail | POST /api/v1/peers/:id/transfer/:session_id/chunk/:chunk_index/fail
[**fail_session**](PeersApi.md#fail_session) | **POST** /api/v1/peers/{id}/transfer/{session_id}/fail | POST /api/v1/peers/:id/transfer/:session_id/fail
[**get_assigned_repos**](PeersApi.md#get_assigned_repos) | **GET** /api/v1/peers/{id}/repositories | Get assigned repositories for peer instance
[**get_chunk_availability**](PeersApi.md#get_chunk_availability) | **GET** /api/v1/peers/{id}/chunks/{artifact_id} | GET /api/v1/peers/:id/chunks/:artifact_id
[**get_chunk_manifest**](PeersApi.md#get_chunk_manifest) | **GET** /api/v1/peers/{id}/transfer/{session_id}/chunks | GET /api/v1/peers/:id/transfer/:session_id/chunks
[**get_identity**](PeersApi.md#get_identity) | **GET** /api/v1/peers/identity | GET /api/v1/peers/identity
[**get_peer**](PeersApi.md#get_peer) | **GET** /api/v1/peers/{id} | Get peer instance details
[**get_peers_with_chunks**](PeersApi.md#get_peers_with_chunks) | **GET** /api/v1/peers/{id}/chunks/{artifact_id}/peers | GET /api/v1/peers/:id/chunks/:artifact_id/peers
[**get_scored_peers**](PeersApi.md#get_scored_peers) | **GET** /api/v1/peers/{id}/chunks/{artifact_id}/scored-peers | GET /api/v1/peers/:id/chunks/:artifact_id/scored-peers
[**get_session**](PeersApi.md#get_session) | **GET** /api/v1/peers/{id}/transfer/{session_id} | GET /api/v1/peers/:id/transfer/:session_id
[**get_subscription**](PeersApi.md#get_subscription) | **GET** /api/v1/peers/{id}/repositories/{repo_id} | Get full subscription details for a (peer, repo) pair.
[**get_sync_policy**](PeersApi.md#get_sync_policy) | **GET** /api/v1/sync-policies/{id} | Get a sync policy by ID
[**get_sync_tasks**](PeersApi.md#get_sync_tasks) | **GET** /api/v1/peers/{id}/sync/tasks | Get pending sync tasks for peer instance
[**heartbeat**](PeersApi.md#heartbeat) | **POST** /api/v1/peers/{id}/heartbeat | Heartbeat from peer instance
[**init_transfer**](PeersApi.md#init_transfer) | **POST** /api/v1/peers/{id}/transfer/init | POST /api/v1/peers/:id/transfer/init
[**list_peer_connections**](PeersApi.md#list_peer_connections) | **GET** /api/v1/peers/{id}/connections | GET /api/v1/peers/:id/connections
[**list_peers**](PeersApi.md#list_peers) | **GET** /api/v1/peers | List peer instances
[**list_sync_policies**](PeersApi.md#list_sync_policies) | **GET** /api/v1/sync-policies | List all sync policies
[**mark_unreachable**](PeersApi.md#mark_unreachable) | **POST** /api/v1/peers/{id}/connections/{target_id}/unreachable | POST /api/v1/peers/:id/connections/:target_id/unreachable
[**preview_sync_policy**](PeersApi.md#preview_sync_policy) | **POST** /api/v1/sync-policies/preview | Preview what a policy would match (dry-run)
[**probe_peer**](PeersApi.md#probe_peer) | **POST** /api/v1/peers/{id}/connections/probe | POST /api/v1/peers/:id/connections/probe
[**register_peer**](PeersApi.md#register_peer) | **POST** /api/v1/peers | Register new peer instance
[**retry_chunk**](PeersApi.md#retry_chunk) | **POST** /api/v1/peers/{id}/transfer/{session_id}/chunk/{chunk_index}/retry | POST /api/v1/peers/:id/transfer/:session_id/chunk/:chunk_index/retry
[**run_subscription_now**](PeersApi.md#run_subscription_now) | **POST** /api/v1/peers/{id}/repositories/{repo_id}/sync | Trigger an immediate sync for a single (peer, repo) subscription.
[**toggle_policy**](PeersApi.md#toggle_policy) | **POST** /api/v1/sync-policies/{id}/toggle | Toggle a sync policy (enable/disable)
[**trigger_sync**](PeersApi.md#trigger_sync) | **POST** /api/v1/peers/{id}/sync | Trigger sync for peer instance
[**unassign_repo**](PeersApi.md#unassign_repo) | **DELETE** /api/v1/peers/{id}/repositories/{repo_id} | Unassign repository from peer instance
[**unregister_peer**](PeersApi.md#unregister_peer) | **DELETE** /api/v1/peers/{id} | Unregister peer instance
[**update_chunk_availability**](PeersApi.md#update_chunk_availability) | **PUT** /api/v1/peers/{id}/chunks/{artifact_id} | PUT /api/v1/peers/:id/chunks/:artifact_id
[**update_network_profile**](PeersApi.md#update_network_profile) | **PUT** /api/v1/peers/{id}/network-profile | PUT /api/v1/peers/:id/network-profile
[**update_sync_policy**](PeersApi.md#update_sync_policy) | **PUT** /api/v1/sync-policies/{id} | Update a sync policy



## announce_peer

> serde_json::Value announce_peer(announce_peer_request)
POST /api/v1/peers/announce

### Parameters


Name | Type | Description  | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**announce_peer_request** | [**AnnouncePeerRequest**](AnnouncePeerRequest.md) |  | [required] |

### Return type

[**serde_json::Value**](serde_json::Value.md)

### Authorization

[bearer_auth](../README.md#bearer_auth)

### HTTP request headers

- **Content-Type**: application/json
- **Accept**: application/json

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)


## assign_repo

> assign_repo(id, assign_repo_request)
Assign repository to peer instance

### Parameters


Name | Type | Description  | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**id** | **uuid::Uuid** | Peer instance ID | [required] |
**assign_repo_request** | [**AssignRepoRequest**](AssignRepoRequest.md) |  | [required] |

### Return type

 (empty response body)

### Authorization

[bearer_auth](../README.md#bearer_auth)

### HTTP request headers

- **Content-Type**: application/json
- **Accept**: Not defined

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)


## complete_chunk

> complete_chunk(id, session_id, chunk_index, complete_chunk_body)
POST /api/v1/peers/:id/transfer/:session_id/chunk/:chunk_index/complete

### Parameters


Name | Type | Description  | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**id** | **uuid::Uuid** | Peer instance ID | [required] |
**session_id** | **uuid::Uuid** | Transfer session ID | [required] |
**chunk_index** | **i32** | Chunk index | [required] |
**complete_chunk_body** | [**CompleteChunkBody**](CompleteChunkBody.md) |  | [required] |

### Return type

 (empty response body)

### Authorization

[bearer_auth](../README.md#bearer_auth)

### HTTP request headers

- **Content-Type**: application/json
- **Accept**: Not defined

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)


## complete_session

> complete_session(id, session_id)
POST /api/v1/peers/:id/transfer/:session_id/complete

### Parameters


Name | Type | Description  | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**id** | **uuid::Uuid** | Peer instance ID | [required] |
**session_id** | **uuid::Uuid** | Transfer session ID | [required] |

### Return type

 (empty response body)

### Authorization

[bearer_auth](../README.md#bearer_auth)

### HTTP request headers

- **Content-Type**: Not defined
- **Accept**: Not defined

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)


## create_sync_policy

> models::SyncPolicyResponse create_sync_policy(create_sync_policy_payload)
Create a new sync policy

### Parameters


Name | Type | Description  | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**create_sync_policy_payload** | [**CreateSyncPolicyPayload**](CreateSyncPolicyPayload.md) |  | [required] |

### Return type

[**models::SyncPolicyResponse**](SyncPolicyResponse.md)

### Authorization

[bearer_auth](../README.md#bearer_auth)

### HTTP request headers

- **Content-Type**: application/json
- **Accept**: application/json

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)


## delete_sync_policy

> delete_sync_policy(id)
Delete a sync policy

### Parameters


Name | Type | Description  | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**id** | **uuid::Uuid** | Sync policy ID | [required] |

### Return type

 (empty response body)

### Authorization

[bearer_auth](../README.md#bearer_auth)

### HTTP request headers

- **Content-Type**: Not defined
- **Accept**: Not defined

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)


## discover_peers

> Vec<models::DiscoverablePeerResponse> discover_peers(id)
GET /api/v1/peers/:id/connections/discover

### Parameters


Name | Type | Description  | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**id** | **uuid::Uuid** | Peer instance ID | [required] |

### Return type

[**Vec<models::DiscoverablePeerResponse>**](DiscoverablePeerResponse.md)

### Authorization

[bearer_auth](../README.md#bearer_auth)

### HTTP request headers

- **Content-Type**: Not defined
- **Accept**: application/json

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)


## evaluate_policies

> models::EvaluationResultResponse evaluate_policies()
Force re-evaluate all sync policies

### Parameters

This endpoint does not need any parameter.

### Return type

[**models::EvaluationResultResponse**](EvaluationResultResponse.md)

### Authorization

[bearer_auth](../README.md#bearer_auth)

### HTTP request headers

- **Content-Type**: Not defined
- **Accept**: application/json

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)


## fail_chunk

> fail_chunk(id, session_id, chunk_index, fail_body)
POST /api/v1/peers/:id/transfer/:session_id/chunk/:chunk_index/fail

### Parameters


Name | Type | Description  | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**id** | **uuid::Uuid** | Peer instance ID | [required] |
**session_id** | **uuid::Uuid** | Transfer session ID | [required] |
**chunk_index** | **i32** | Chunk index | [required] |
**fail_body** | [**FailBody**](FailBody.md) |  | [required] |

### Return type

 (empty response body)

### Authorization

[bearer_auth](../README.md#bearer_auth)

### HTTP request headers

- **Content-Type**: application/json
- **Accept**: Not defined

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)


## fail_session

> fail_session(id, session_id, fail_body)
POST /api/v1/peers/:id/transfer/:session_id/fail

### Parameters


Name | Type | Description  | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**id** | **uuid::Uuid** | Peer instance ID | [required] |
**session_id** | **uuid::Uuid** | Transfer session ID | [required] |
**fail_body** | [**FailBody**](FailBody.md) |  | [required] |

### Return type

 (empty response body)

### Authorization

[bearer_auth](../README.md#bearer_auth)

### HTTP request headers

- **Content-Type**: application/json
- **Accept**: Not defined

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)


## get_assigned_repos

> Vec<uuid::Uuid> get_assigned_repos(id)
Get assigned repositories for peer instance

### Parameters


Name | Type | Description  | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**id** | **uuid::Uuid** | Peer instance ID | [required] |

### Return type

[**Vec<uuid::Uuid>**](uuid::Uuid.md)

### Authorization

[bearer_auth](../README.md#bearer_auth)

### HTTP request headers

- **Content-Type**: Not defined
- **Accept**: application/json

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)


## get_chunk_availability

> models::ChunkAvailabilityResponse get_chunk_availability(id, artifact_id)
GET /api/v1/peers/:id/chunks/:artifact_id

### Parameters


Name | Type | Description  | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**id** | **uuid::Uuid** | Peer instance ID | [required] |
**artifact_id** | **uuid::Uuid** | Artifact ID | [required] |

### Return type

[**models::ChunkAvailabilityResponse**](ChunkAvailabilityResponse.md)

### Authorization

[bearer_auth](../README.md#bearer_auth)

### HTTP request headers

- **Content-Type**: Not defined
- **Accept**: application/json

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)


## get_chunk_manifest

> models::ChunkManifestResponse get_chunk_manifest(id, session_id)
GET /api/v1/peers/:id/transfer/:session_id/chunks

### Parameters


Name | Type | Description  | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**id** | **uuid::Uuid** | Peer instance ID | [required] |
**session_id** | **uuid::Uuid** | Transfer session ID | [required] |

### Return type

[**models::ChunkManifestResponse**](ChunkManifestResponse.md)

### Authorization

[bearer_auth](../README.md#bearer_auth)

### HTTP request headers

- **Content-Type**: Not defined
- **Accept**: application/json

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)


## get_identity

> models::IdentityResponse get_identity()
GET /api/v1/peers/identity

### Parameters

This endpoint does not need any parameter.

### Return type

[**models::IdentityResponse**](IdentityResponse.md)

### Authorization

[bearer_auth](../README.md#bearer_auth)

### HTTP request headers

- **Content-Type**: Not defined
- **Accept**: application/json

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)


## get_peer

> models::PeerInstanceResponse get_peer(id)
Get peer instance details

### Parameters


Name | Type | Description  | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**id** | **uuid::Uuid** | Peer instance ID | [required] |

### Return type

[**models::PeerInstanceResponse**](PeerInstanceResponse.md)

### Authorization

[bearer_auth](../README.md#bearer_auth)

### HTTP request headers

- **Content-Type**: Not defined
- **Accept**: application/json

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)


## get_peers_with_chunks

> Vec<models::ChunkAvailabilityResponse> get_peers_with_chunks(id, artifact_id)
GET /api/v1/peers/:id/chunks/:artifact_id/peers

### Parameters


Name | Type | Description  | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**id** | **uuid::Uuid** | Peer instance ID | [required] |
**artifact_id** | **uuid::Uuid** | Artifact ID | [required] |

### Return type

[**Vec<models::ChunkAvailabilityResponse>**](ChunkAvailabilityResponse.md)

### Authorization

[bearer_auth](../README.md#bearer_auth)

### HTTP request headers

- **Content-Type**: Not defined
- **Accept**: application/json

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)


## get_scored_peers

> Vec<models::ScoredPeerResponse> get_scored_peers(id, artifact_id)
GET /api/v1/peers/:id/chunks/:artifact_id/scored-peers

### Parameters


Name | Type | Description  | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**id** | **uuid::Uuid** | Peer instance ID | [required] |
**artifact_id** | **uuid::Uuid** | Artifact ID | [required] |

### Return type

[**Vec<models::ScoredPeerResponse>**](ScoredPeerResponse.md)

### Authorization

[bearer_auth](../README.md#bearer_auth)

### HTTP request headers

- **Content-Type**: Not defined
- **Accept**: application/json

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)


## get_session

> models::TransferSessionResponse get_session(id, session_id)
GET /api/v1/peers/:id/transfer/:session_id

### Parameters


Name | Type | Description  | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**id** | **uuid::Uuid** | Peer instance ID | [required] |
**session_id** | **uuid::Uuid** | Transfer session ID | [required] |

### Return type

[**models::TransferSessionResponse**](TransferSessionResponse.md)

### Authorization

[bearer_auth](../README.md#bearer_auth)

### HTTP request headers

- **Content-Type**: Not defined
- **Accept**: application/json

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)


## get_subscription

> models::SubscriptionResponse get_subscription(id, repo_id)
Get full subscription details for a (peer, repo) pair.

Returns the per-subscription `replication_mode`, `replication_schedule`, and `replication_filter` exactly as persisted by `POST /:id/repositories`. Round-trips the filter so callers can verify that a scheduled-sync filter (e.g. `{\"include_patterns\": [\"\\\\.tar\\\\.gz$\"]}`) was persisted.

### Parameters


Name | Type | Description  | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**id** | **uuid::Uuid** | Peer instance ID | [required] |
**repo_id** | **uuid::Uuid** | Repository ID | [required] |

### Return type

[**models::SubscriptionResponse**](SubscriptionResponse.md)

### Authorization

[bearer_auth](../README.md#bearer_auth)

### HTTP request headers

- **Content-Type**: Not defined
- **Accept**: application/json

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)


## get_sync_policy

> models::SyncPolicyResponse get_sync_policy(id)
Get a sync policy by ID

### Parameters


Name | Type | Description  | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**id** | **uuid::Uuid** | Sync policy ID | [required] |

### Return type

[**models::SyncPolicyResponse**](SyncPolicyResponse.md)

### Authorization

[bearer_auth](../README.md#bearer_auth)

### HTTP request headers

- **Content-Type**: Not defined
- **Accept**: application/json

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)


## get_sync_tasks

> Vec<models::SyncTaskResponse> get_sync_tasks(id, status, region, page, per_page)
Get pending sync tasks for peer instance

### Parameters


Name | Type | Description  | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**id** | **uuid::Uuid** | Peer instance ID | [required] |
**status** | Option<**String**> |  |  |
**region** | Option<**String**> |  |  |
**page** | Option<**i32**> |  |  |
**per_page** | Option<**i32**> |  |  |

### Return type

[**Vec<models::SyncTaskResponse>**](SyncTaskResponse.md)

### Authorization

[bearer_auth](../README.md#bearer_auth)

### HTTP request headers

- **Content-Type**: Not defined
- **Accept**: application/json

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)


## heartbeat

> heartbeat(id, heartbeat_request)
Heartbeat from peer instance

### Parameters


Name | Type | Description  | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**id** | **uuid::Uuid** | Peer instance ID | [required] |
**heartbeat_request** | [**HeartbeatRequest**](HeartbeatRequest.md) |  | [required] |

### Return type

 (empty response body)

### Authorization

[bearer_auth](../README.md#bearer_auth)

### HTTP request headers

- **Content-Type**: application/json
- **Accept**: Not defined

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)


## init_transfer

> models::TransferSessionResponse init_transfer(id, init_transfer_body)
POST /api/v1/peers/:id/transfer/init

### Parameters


Name | Type | Description  | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**id** | **uuid::Uuid** | Peer instance ID | [required] |
**init_transfer_body** | [**InitTransferBody**](InitTransferBody.md) |  | [required] |

### Return type

[**models::TransferSessionResponse**](TransferSessionResponse.md)

### Authorization

[bearer_auth](../README.md#bearer_auth)

### HTTP request headers

- **Content-Type**: application/json
- **Accept**: application/json

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)


## list_peer_connections

> Vec<models::PeerResponse> list_peer_connections(id, status)
GET /api/v1/peers/:id/connections

### Parameters


Name | Type | Description  | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**id** | **uuid::Uuid** | Peer instance ID | [required] |
**status** | Option<**String**> | Filter peers by status (active, probing, unreachable, disabled) |  |

### Return type

[**Vec<models::PeerResponse>**](PeerResponse.md)

### Authorization

[bearer_auth](../README.md#bearer_auth)

### HTTP request headers

- **Content-Type**: Not defined
- **Accept**: application/json

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)


## list_peers

> models::PeerInstanceListResponse list_peers(status, region, page, per_page)
List peer instances

### Parameters


Name | Type | Description  | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**status** | Option<**String**> |  |  |
**region** | Option<**String**> |  |  |
**page** | Option<**i32**> |  |  |
**per_page** | Option<**i32**> |  |  |

### Return type

[**models::PeerInstanceListResponse**](PeerInstanceListResponse.md)

### Authorization

[bearer_auth](../README.md#bearer_auth)

### HTTP request headers

- **Content-Type**: Not defined
- **Accept**: application/json

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)


## list_sync_policies

> models::SyncPolicyListResponse list_sync_policies()
List all sync policies

### Parameters

This endpoint does not need any parameter.

### Return type

[**models::SyncPolicyListResponse**](SyncPolicyListResponse.md)

### Authorization

[bearer_auth](../README.md#bearer_auth)

### HTTP request headers

- **Content-Type**: Not defined
- **Accept**: application/json

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)


## mark_unreachable

> mark_unreachable(id, target_id)
POST /api/v1/peers/:id/connections/:target_id/unreachable

### Parameters


Name | Type | Description  | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**id** | **uuid::Uuid** | Peer instance ID | [required] |
**target_id** | **uuid::Uuid** | Target peer ID to mark unreachable | [required] |

### Return type

 (empty response body)

### Authorization

[bearer_auth](../README.md#bearer_auth)

### HTTP request headers

- **Content-Type**: Not defined
- **Accept**: Not defined

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)


## preview_sync_policy

> models::PreviewResultResponse preview_sync_policy(preview_policy_payload)
Preview what a policy would match (dry-run)

### Parameters


Name | Type | Description  | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**preview_policy_payload** | [**PreviewPolicyPayload**](PreviewPolicyPayload.md) |  | [required] |

### Return type

[**models::PreviewResultResponse**](PreviewResultResponse.md)

### Authorization

[bearer_auth](../README.md#bearer_auth)

### HTTP request headers

- **Content-Type**: application/json
- **Accept**: application/json

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)


## probe_peer

> models::PeerResponse probe_peer(id, probe_body)
POST /api/v1/peers/:id/connections/probe

### Parameters


Name | Type | Description  | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**id** | **uuid::Uuid** | Peer instance ID | [required] |
**probe_body** | [**ProbeBody**](ProbeBody.md) |  | [required] |

### Return type

[**models::PeerResponse**](PeerResponse.md)

### Authorization

[bearer_auth](../README.md#bearer_auth)

### HTTP request headers

- **Content-Type**: application/json
- **Accept**: application/json

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)


## register_peer

> models::PeerInstanceResponse register_peer(register_peer_request)
Register new peer instance

### Parameters


Name | Type | Description  | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**register_peer_request** | [**RegisterPeerRequest**](RegisterPeerRequest.md) |  | [required] |

### Return type

[**models::PeerInstanceResponse**](PeerInstanceResponse.md)

### Authorization

[bearer_auth](../README.md#bearer_auth)

### HTTP request headers

- **Content-Type**: application/json
- **Accept**: application/json

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)


## retry_chunk

> retry_chunk(id, session_id, chunk_index)
POST /api/v1/peers/:id/transfer/:session_id/chunk/:chunk_index/retry

### Parameters


Name | Type | Description  | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**id** | **uuid::Uuid** | Peer instance ID | [required] |
**session_id** | **uuid::Uuid** | Transfer session ID | [required] |
**chunk_index** | **i32** | Chunk index | [required] |

### Return type

 (empty response body)

### Authorization

[bearer_auth](../README.md#bearer_auth)

### HTTP request headers

- **Content-Type**: Not defined
- **Accept**: Not defined

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)


## run_subscription_now

> models::RunNowResponse run_subscription_now(id, repo_id)
Trigger an immediate sync for a single (peer, repo) subscription.

Queues one `sync_task` per artifact in the repository at priority 100 without waiting for the next cron tick. Idempotent: if tasks are already pending for the same artifacts, the unique constraint `(peer_instance_id, artifact_id, task_type)` skips duplicates.

### Parameters


Name | Type | Description  | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**id** | **uuid::Uuid** | Peer instance ID | [required] |
**repo_id** | **uuid::Uuid** | Repository ID | [required] |

### Return type

[**models::RunNowResponse**](RunNowResponse.md)

### Authorization

[bearer_auth](../README.md#bearer_auth)

### HTTP request headers

- **Content-Type**: Not defined
- **Accept**: application/json

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)


## toggle_policy

> models::SyncPolicyResponse toggle_policy(id, toggle_policy_payload)
Toggle a sync policy (enable/disable)

### Parameters


Name | Type | Description  | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**id** | **uuid::Uuid** | Sync policy ID | [required] |
**toggle_policy_payload** | [**TogglePolicyPayload**](TogglePolicyPayload.md) |  | [required] |

### Return type

[**models::SyncPolicyResponse**](SyncPolicyResponse.md)

### Authorization

[bearer_auth](../README.md#bearer_auth)

### HTTP request headers

- **Content-Type**: application/json
- **Accept**: application/json

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)


## trigger_sync

> trigger_sync(id)
Trigger sync for peer instance

### Parameters


Name | Type | Description  | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**id** | **uuid::Uuid** | Peer instance ID | [required] |

### Return type

 (empty response body)

### Authorization

[bearer_auth](../README.md#bearer_auth)

### HTTP request headers

- **Content-Type**: Not defined
- **Accept**: Not defined

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)


## unassign_repo

> unassign_repo(id, repo_id)
Unassign repository from peer instance

### Parameters


Name | Type | Description  | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**id** | **uuid::Uuid** | Peer instance ID | [required] |
**repo_id** | **uuid::Uuid** | Repository ID | [required] |

### Return type

 (empty response body)

### Authorization

[bearer_auth](../README.md#bearer_auth)

### HTTP request headers

- **Content-Type**: Not defined
- **Accept**: Not defined

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)


## unregister_peer

> unregister_peer(id)
Unregister peer instance

### Parameters


Name | Type | Description  | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**id** | **uuid::Uuid** | Peer instance ID | [required] |

### Return type

 (empty response body)

### Authorization

[bearer_auth](../README.md#bearer_auth)

### HTTP request headers

- **Content-Type**: Not defined
- **Accept**: Not defined

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)


## update_chunk_availability

> update_chunk_availability(id, artifact_id, update_chunk_availability_body)
PUT /api/v1/peers/:id/chunks/:artifact_id

### Parameters


Name | Type | Description  | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**id** | **uuid::Uuid** | Peer instance ID | [required] |
**artifact_id** | **uuid::Uuid** | Artifact ID | [required] |
**update_chunk_availability_body** | [**UpdateChunkAvailabilityBody**](UpdateChunkAvailabilityBody.md) |  | [required] |

### Return type

 (empty response body)

### Authorization

[bearer_auth](../README.md#bearer_auth)

### HTTP request headers

- **Content-Type**: application/json
- **Accept**: Not defined

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)


## update_network_profile

> update_network_profile(id, network_profile_body)
PUT /api/v1/peers/:id/network-profile

### Parameters


Name | Type | Description  | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**id** | **uuid::Uuid** | Peer instance ID | [required] |
**network_profile_body** | [**NetworkProfileBody**](NetworkProfileBody.md) |  | [required] |

### Return type

 (empty response body)

### Authorization

[bearer_auth](../README.md#bearer_auth)

### HTTP request headers

- **Content-Type**: application/json
- **Accept**: Not defined

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)


## update_sync_policy

> models::SyncPolicyResponse update_sync_policy(id, update_sync_policy_payload)
Update a sync policy

### Parameters


Name | Type | Description  | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**id** | **uuid::Uuid** | Sync policy ID | [required] |
**update_sync_policy_payload** | [**UpdateSyncPolicyPayload**](UpdateSyncPolicyPayload.md) |  | [required] |

### Return type

[**models::SyncPolicyResponse**](SyncPolicyResponse.md)

### Authorization

[bearer_auth](../README.md#bearer_auth)

### HTTP request headers

- **Content-Type**: application/json
- **Accept**: application/json

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

