1
0
mirror of https://github.com/oceanprotocol/docs.git synced 2024-11-01 07:45:40 +01:00
docs/developers/ocean-node/http-endpoints.md

155 lines
4.5 KiB
Markdown
Raw Normal View History

2024-07-02 17:09:02 +02:00
---
description: An overview of the available HTTP endpoints
---
# HTTP Endpoints
Ocean Node is a core component of the Ocean Protocol ecosystem, enabling decentralized data exchange and management. Below is an overview of the available HTTP endpoints that provide various functionalities within the Ocean Node.
2024-07-02 17:36:49 +02:00
### Peer Management
2024-07-02 17:09:02 +02:00
* **Get Ocean Peers**
* **Method**: GET
* **Endpoint**: `/getOceanPeers`
* **Description**: Retrieves the list of Ocean peers.
* **Get P2P Peers**
* **Method**: GET
* **Endpoint**: `/getP2PPeers`
* **Description**: Retrieves the list of P2P peers.
* **Get P2P Peer**
* **Method**: GET
* **Endpoint**: `/getP2PPeer`
* **Description**: Retrieves information about a specific P2P peer.
2024-07-02 17:36:49 +02:00
### DID Management
2024-07-02 17:09:02 +02:00
* **Advertise DID**
* **Method**: POST
* **Endpoint**: `/advertiseDid`
* **Description**: Advertises a DID to the network.
* **Get Providers for DID**
* **Method**: GET
* **Endpoint**: `/getProvidersForDid`
* **Description**: Retrieves the list of providers for a specific DID.
2024-07-02 17:36:49 +02:00
### Command Broadcasting
2024-07-02 17:09:02 +02:00
* **Broadcast Command**
* **Method**: POST
* **Endpoint**: `/broadcastCommand`
* **Description**: Broadcasts a command to the network.
* **Direct Command**
* **Method**: POST
* **Endpoint**: `/directCommand`
* **Description**: Sends a direct command to a specific peer.
2024-07-02 17:36:49 +02:00
### Logging
2024-07-02 17:09:02 +02:00
* **Logs**
* **Method**: POST
* **Endpoint**: `/logs`
* **Description**: Retrieves multiple log entries based on various query parameters.
* **Log**
* **Method**: POST
* **Endpoint**: `/log/:id`
* **Description**: Retrieves a single log entry by its unique identifier.
2024-07-02 17:36:49 +02:00
### File Services
2024-07-02 17:09:02 +02:00
* **File Information**
* **Method**: POST
* **Endpoint**: `/api/services/fileinfo`
* **Description**: Retrieves information about a file.
* **Decrypt**
* **Method**: POST
* **Endpoint**: `/api/services/decrypt`
* **Description**: Decrypts data.
* **Encrypt**
* **Method**: POST
* **Endpoint**: `/api/services/encrypt`
* **Description**: Encrypts data.
* **Encrypt File**
* **Method**: POST
* **Endpoint**: `/api/services/encryptFile`
* **Description**: Encrypts a file.
* **Initialize**
* **Method**: GET
* **Endpoint**: `/api/services/initialize`
* **Description**: Initializes a service.
* **Nonce**
* **Method**: GET
* **Endpoint**: `/api/services/nonce`
* **Description**: Retrieves a nonce value.
* **Download**
* **Method**: GET
* **Endpoint**: `/api/services/download`
* **Description**: Downloads a file.
2024-07-02 17:36:49 +02:00
### DDO Management
2024-07-02 17:09:02 +02:00
* **Get DDO**
* **Method**: GET
* **Endpoint**: `/api/aquarius/assets/ddo/:did/:force?`
* **Description**: Retrieves the DDO for a given DID.
* **Get DDO Metadata**
* **Method**: GET
* **Endpoint**: `/api/aquarius/assets/metadata/:did/:force?`
* **Description**: Retrieves the metadata for a given DID.
* **DDO Metadata Query**
* **Method**: POST
* **Endpoint**: `/api/aquarius/assets/metadata/query`
* **Description**: Queries DDO metadata.
* **Get DDO State**
* **Method**: GET
* **Endpoint**: `/api/aquarius/state/ddo`
* **Description**: Retrieves the state of a DDO.
* **Validate DDO**
* **Method**: POST
* **Endpoint**: `/api/aquarius/assets/ddo/validate`
* **Description**: Validates a DDO.
2024-07-02 17:36:49 +02:00
### Indexer
2024-07-02 17:09:02 +02:00
* **Index Queue**
* **Method**: GET
* **Endpoint**: `/api/services/indexQueue`
* **Description**: Retrieves the index queue.
2024-07-02 17:36:49 +02:00
### Compute Services
2024-07-02 17:09:02 +02:00
* **Compute Environments**
* **Method**: GET
* **Endpoint**: `/api/services/computeEnvironments`
* **Description**: Retrieves available compute environments.
* **Compute Start**
* **Method**: POST
* **Endpoint**: `/api/services/compute`
* **Description**: Starts a compute job.
* **Compute Stop**
* **Method**: PUT
* **Endpoint**: `/api/services/compute`
* **Description**: Stops a compute job.
* **Compute Status**
* **Method**: GET
* **Endpoint**: `/api/services/compute`
* **Description**: Retrieves the status of a compute job.
* **Compute Result**
* **Method**: GET
* **Endpoint**: `/api/services/computeResult`
* **Description**: Retrieves the result of a compute job.
* **Initialize Compute**
* **Method**: POST
* **Endpoint**: `/api/services/initializeCompute`
* **Description**: Initializes a compute job.
* **Jobs**
* **Method**: GET
* **Endpoint**: `/api/services/jobs/:job`
* **Description**: Retrieves information about a specific job.
* **Compute Delete**
* **Method**: DELETE
* **Endpoint**: `/api/services/compute`
* **Description**: Deletes a compute job.