Readonly
httpOptional
appSessionId: stringA correlation/session identifier used for querying events related to an action where this appSessionId has been specified
Timeout used in blocking calls waiting for eg. acknowledgement. How many seconds server should wait for response/acknowledgement of an action (0.0 means it should wait for other party's response indefinitely)
any Unexpected error.
ApiError
CollectAgreementEvents - Collects events related to an Agreement. This is a blocking operation. It will not return until there is at least one new event. All events are appearing on both sides equally.
Returns Agreement related events:
AgreementApprovedEvent
- Indicates that the Agreement has been approved
by the Provider.approveAgreement
call returns Approved
after this event is emitted.AgreementRejectedEvent
- Indicates that the Provider has called
rejectAgreement
, which effectively stops the Agreement handshake.
The Requestor may attempt to return to the Negotiation phase by sending
a new Proposal.
AgreementCancelledEvent
- Indicates that the Requestor has called
cancelAgreement
, which effectively stops the Agreement handshake.
AgreementTerminatedEvent
- Indicates that the Agreement has been
terminated by specified party (contains signature).
Timeout used in long-polling calls (in seconds). How many seconds server should wait for response containing new events (0.0
means it should return immediately if there are no events)
Optional
afterTimestamp: stringApply only to records created later than the specified timestamp
Maximum number of events that server should return at once.
Optional
appSessionId: stringA correlation/session identifier used for querying events related to an action where this appSessionId has been specified
any Agreement-related event list.
ApiError
CollectDemands - Reads Market responses to published Offer. This is a blocking operation. It will not return until there is at least one new event. Returns Proposal related events:
ProposalEvent
- Indicates that there is new Demand Proposal for this Offer.
ProposalRejectedEvent
- Indicates that the Requestor has rejected
our previous Proposal related to this Offer. This effectively ends a
Negotiation chain - it explicitly indicates that the sender will not
create another counter-Proposal.
AgreementEvent
- Indicates that the Requestor is accepting our
previous Proposal and ask for our approval of the Agreement.
PropertyQueryEvent
- not supported yet.
Note: When collectDemands
is waiting, simultaneous call to unsubscribeOffer
on the same subscriptionId
should result in "Subscription does not exist" error returned from collectDemands
.
Note: Specification requires this endpoint to support list of specific Proposal Ids to listen for messages related only to specific Proposals. This is not covered yet.
Timeout used in long-polling calls (in seconds). How many seconds server should wait for response containing new events (0.0
means it should return immediately if there are no events)
Maximum number of events that server should return at once.
any Proposal or Agreement event list.
ApiError
CounterProposalOffer - Responds with a bespoke Offer to received Demand.
Creates and sends a modified version of original Offer (a counter-proposal) adjusted to previously received Proposal (ie. Demand). Changes Proposal state to Draft
. Returns created Proposal id.
The object which includes all the Demand/Offer/Proposal properties. This is a JSON object in "flat convention" - where keys are full property names and their values indicate properties.
The value's Javascript type shall conform with the type of the property (as indicated in Golem Standards).
{
* "golem.com.pricing.model":"linear",
* "golem.com.pricing.model.linear.coeffs":[0.001, 0.002, 0.0],
* "golem.com.scheme":"payu",
* "golem.com.scheme.payu.interval_sec":6.0,
* "golem.com.usage.vector":["golem.usage.duration_sec","golem.usage.cpu_sec"],
* "golem.inf.cpu.architecture":"x86_64",
* "golem.inf.cpu.cores":4,
* "golem.inf.cpu.threads":7,
* "golem.inf.mem.gib":10.612468048930168,
* "golem.inf.storage.gib":81.7227783203125,
* "golem.node.debug.subnet":"market-devnet",
* "golem.node.id.name":"tworec@mf-market-devnet",
* "golem.runtime.name":"vm",
* "golem.runtime.version@v":"0.1.0"
* }
* ```
*
any Unexpected error.
ApiError
GetAgreement - Fetches agreement with given agreement id.
any Agreement.
ApiError
GetOffers - Fetches all active Offers which have been published by the Provider.
any Offer list.
ApiError
GetProposalDemand - Fetches Proposal (Demand) with given id.
any Proposal.
ApiError
Gets termination reason reported when terminateAgreement operation was called. Method to get the reason for terminating the Agreement.
any Agreement termination reason.
ApiError
ListAgreements - Lists agreements with optional filters List agreements. Supported filters: * state * creation datetime * app session id A well-formed call will result in a collection of objects with the following fields: * id * creationTs * approveTs * role
Optional
appSessionId: stringA correlation/session identifier used for querying events related to an action where this appSessionId has been specified
Optional
state: "Rejected" | "Expired" | "Proposal" | "Pending" | "Cancelled" | "Approved" | "Terminated"State of an agreement
Optional
afterDate: stringApply only to records created later than the specified timestamp
Optional
beforeDate: stringApply only to records created before the specified timestamp
any Result of listing agreements.
ApiError
QueryReplyOffers - Handles dynamic property query. Sends a response to a received property value query.
The Market Matching Mechanism, when resolving the match relation for the specific Demand-Offer pair, is to detect the “dynamic” properties required (via constraints) by the other side. At this point, it is able to query the issuing node for those properties and submit the other side’s requested properties as the context of the query.
Note: The property query responses may be submitted in “chunks”, ie. the responder may choose to resolve ‘quick’/lightweight’ properties faster and provide response sooner, while still working on more time-consuming properties in the background. Therefore the response contains both the resolved properties, as well as list of properties which responder knows still require resolution.
Note: This method must be implemented for Market API Capability Level 2.
any Unexpected error.
ApiError
RejectAgreement - Rejects Agreement proposed by the Requestor. The Requestor side is notified about the Provider’s decision to reject a negotiated agreement. This effectively stops the Agreement handshake.
Note: Mutually exclusive with approveAgreement
.
Optional
requestBody: Record<string, any>any Unexpected error.
ApiError
RejectProposalDemand - Rejects Proposal (Demand). Effectively ends a Negotiation chain - it explicitly indicates that the sender will not create another counter-Proposal.
Optional
requestBody: Record<string, any>any Unexpected error.
ApiError
SubscribeOffer - Publishes Provider capabilities via Offer. Offer object can be considered an "open" or public Offer, as it is not directed at a specific Requestor, but rather is sent to the market so that the matching mechanism implementation can associate relevant Demands.
Note: it is an "atomic" operation, ie. as soon as Subscription is placed, the Offer is published on the market.
The object which includes all the Demand/Offer/Proposal properties. This is a JSON object in "flat convention" - where keys are full property names and their values indicate properties.
The value's Javascript type shall conform with the type of the property (as indicated in Golem Standards).
{
* "golem.com.pricing.model":"linear",
* "golem.com.pricing.model.linear.coeffs":[0.001, 0.002, 0.0],
* "golem.com.scheme":"payu",
* "golem.com.scheme.payu.interval_sec":6.0,
* "golem.com.usage.vector":["golem.usage.duration_sec","golem.usage.cpu_sec"],
* "golem.inf.cpu.architecture":"x86_64",
* "golem.inf.cpu.cores":4,
* "golem.inf.cpu.threads":7,
* "golem.inf.mem.gib":10.612468048930168,
* "golem.inf.storage.gib":81.7227783203125,
* "golem.node.debug.subnet":"market-devnet",
* "golem.node.id.name":"tworec@mf-market-devnet",
* "golem.runtime.name":"vm",
* "golem.runtime.version@v":"0.1.0"
* }
* ```
*
any Unexpected error.
ApiError
TerminateAgreement - Terminates approved Agreement.
Method to finish/close the Agreement while in Approved
state.
The other party gets notified about calling party decision to terminate a "running" agreement.
Note: Can be invoked at any time after Agreement was approved by both sides.
Note: Financial and reputational consequences are not defined by this specification.
Optional
requestBody: Record<string, any>any Unexpected error.
ApiError
UnsubscribeOffer - Stop subscription for previously published Offer. Stop receiving Proposals.
Note: this will terminate all pending collectDemands
calls on this subscription. This implies, that client code should not unsubscribeOffer
before it has received all expected/useful inputs from collectDemands
.
any Unexpected error.
ApiError
ApproveAgreement - Approves Agreement proposed by the Reqestor. This is a blocking operation. The call may be aborted by Provider caller code. After the call is aborted or timed out, another
approveAgreement
call can be raised on the sameagreementId
.Note: It is expected from the Provider node implementation to “ring-fence” the resources required to fulfill the Agreement before the ApproveAgreement is sent. However, the resources should not be fully committed until
Approved
response is received from theapproveAgreement
call.Note: Mutually exclusive with
rejectAgreement
.