Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merging Personal Fork into API-Content Branch #38

Merged
merged 11 commits into from
Sep 26, 2022
92 changes: 0 additions & 92 deletions openapi/account.yml

This file was deleted.

1,226 changes: 1,226 additions & 0 deletions openapi/bundled.yml

Large diffs are not rendered by default.

198 changes: 198 additions & 0 deletions openapi/components/endpoints/accounts.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,198 @@
# Notes:
# September 22:
# - investigate Hal Links
# - consult for response descriptions
# - skipping operations endpoint for now
# - skipping payments endpoint for now
# - review number formats & time formats
# - review for omit empty in data structures (9/23 )
# - clean up string patterns
# - review todos in payments schemas
# - Ask about baseAsset vs Asset. See google sheet
paths:
/accounts:
get:
tags:
- Accounts
summary: List all Accounts
description: "This endpoint lists accounts by one of four filters : signer, asset, liquidity pool or sponsor."
operationId: ListAllAccounts
parameters:
- $ref: '../parameters.yml#/components/parameters/SponsorParam'
- $ref: '../parameters.yml#/components/parameters/AssetParam'
- $ref: '../parameters.yml#/components/parameters/SignerParam'
- $ref: '../parameters.yml#/components/parameters/LiquidityPoolParam'
- $ref: '../parameters.yml#/components/parameters/CursorParam'
- $ref: '../parameters.yml#/components/parameters/OrderParam'
- $ref: '../parameters.yml#/components/parameters/LimitParam'
responses:
'200':
description: "Returns accounts based on provided filter: signer , asset, sponser or liquidity pool"
content:
application/json:
schema:
allOf:
- $ref: "../schemas/linksSchema.yml#/components/schemas/Links"
- $ref: "../schemas/accountSchema.yml#/components/schemas/Account"
/accounts/{account_id}:
get:
tags:
- Accounts
summary: Retrieve an Account
description: The single account endpoint provides information on a specific account.
The balances section in the response will also list all the trustlines this account has established, including trustlines that haven’t been authorized yet.
operationId: RetrieveAnAccount
parameters:
- $ref: '../parameters.yml#/components/parameters/AccountIDParam'
responses:
'200':
description: Returns details like balances, sponserships etc. about an account.
content:
application/json:
schema:
allOf:
- $ref: "../schemas/accountLinkSchema.yml#/components/schemas/AccountLink"
- $ref: "../schemas/accountSchema.yml#/components/schemas/Account"
/accounts/{account_id}/transactions:
get:
tags:
- Accounts
summary: Retrieve an Account's Transactions
description: "This endpoint represents successful transactions for a given account and can be used in streaming mode. Streaming mode allows you to listen for new transactions for this account as they are added to the Stellar ledger. If called in streaming mode, Horizon will start at the earliest known transaction unless a cursor is set, in which case it will start from that cursor. By setting the cursor value to now, you can stream transactions created since your request time."
operationId: GetTransactionsByAccountid
parameters:
- $ref: '../parameters.yml#/components/parameters/AccountIDParam'
- $ref: '../parameters.yml#/components/parameters/CursorParam'
- $ref: '../parameters.yml#/components/parameters/OrderParam'
- $ref: '../parameters.yml#/components/parameters/LimitParam'
- $ref: '../parameters.yml#/components/parameters/IncludeFailedParam'
responses:
'200':
description: blank
content:
application/json:
schema:
allOf:
- $ref: "../schemas/linksSchema.yml#/components/schemas/Links"
- $ref: "../schemas/transactionSchema.yml#/components/schemas/Transaction"

#TODO: 9/23 Investigate Operations object
/accounts/{account_id}/operations:
get:
tags:
- Accounts
summary: Retrieve an Account's Operations
description: This endpoint represents successful operations for a given account and can be used in streaming mode. Streaming mode allows you to listen for new operations for this account as they are added to the Stellar ledger. If called in streaming mode, Horizon will start at the earliest known operation unless a cursor is set, in which case it will start from that cursor. By setting the cursor value to now, you can stream operations created since your request time.
operationId: GetOperationsByAccountid
parameters:
- $ref: '../parameters.yml#/components/parameters/AccountIDParam'
- $ref: '../parameters.yml#/components/parameters/CursorParam'
- $ref: '../parameters.yml#/components/parameters/OrderParam'
- $ref: '../parameters.yml#/components/parameters/LimitParam'
- $ref: '../parameters.yml#/components/parameters/IncludeFailedParam'
- $ref: '../parameters.yml#/components/parameters/JoinParam'
responses:
'200':
description: OK
/accounts/{account_id}/payments:
get:
tags:
- Accounts
summary: Retrieve an Account's Payments
description: "This endpoint represents successful payments for a given account and can be used in streaming mode. Streaming mode allows you to listen for new payments for this account as they are added to the Stellar ledger. If called in streaming mode, Horizon will start at the earliest known payment unless a cursor is set, in which case it will start from that cursor. By setting the cursor value to now, you can stream payments created since your request time."
operationId: GetPaymentsbyAccountid
parameters:
- $ref: '../parameters.yml#/components/parameters/AccountIDParam'
- $ref: '../parameters.yml#/components/parameters/CursorParam'
- $ref: '../parameters.yml#/components/parameters/OrderParam'
- $ref: '../parameters.yml#/components/parameters/LimitParam'
- $ref: '../parameters.yml#/components/parameters/IncludeFailedParam'
- $ref: '../parameters.yml#/components/parameters/JoinParam'
responses:
'200':
description: blank
content:
application/json:
schema:
allOf:
- $ref: "../schemas/linksSchema.yml#/components/schemas/Links"
- $ref: "../schemas/paymentSchema.yml#/components/schemas/Payment"
/accounts/{account_id}/effects:
get:
tags:
- Accounts
summary: Retrieve an Account's Effects
description: This endpoint returns the effects of a specific account and can be used in streaming mode. Streaming mode allows you to listen for new effects for this account as they are added to the Stellar ledger. If called in streaming mode, Horizon will start at the earliest known effect unless a cursor is set, in which case it will start from that cursor. By setting the cursor value to now, you can stream effects created since your request time.
operationId: GetEffectsbyAccountid
parameters:
- $ref: '../parameters.yml#/components/parameters/AccountIDParam'
- $ref: '../parameters.yml#/components/parameters/CursorParam'
- $ref: '../parameters.yml#/components/parameters/OrderParam'
- $ref: '../parameters.yml#/components/parameters/LimitParam'
responses:
'200':
description: OK
/accounts/{account_id}/offers:
get:
tags:
- Accounts
summary: Retrieve an Account's Offers
description: This endpoint represents all offers a given account has currently open and can be used in streaming mode. Streaming mode allows you to listen for new offers for this account as they are added to the Stellar ledger. If called in streaming mode, Horizon will start at the earliest known offer unless a cursor is set, in which case it will start from that cursor. By setting the cursor value to now, you can stream offers created since your request time.
operationId: GetOffersbyAccountid
parameters:
- $ref: '../parameters.yml#/components/parameters/AccountIDParam'
- $ref: '../parameters.yml#/components/parameters/CursorParam'
- $ref: '../parameters.yml#/components/parameters/OrderParam'
- $ref: '../parameters.yml#/components/parameters/LimitParam'
responses:
'200':
description: blank
content:
application/json:
schema:
allOf:
- $ref: "../schemas/linksSchema.yml#/components/schemas/Links"
- $ref: "../schemas/offerSchema.yml#/components/schemas/Offer"

/accounts/{account_id}/trades:
get:
tags:
- Accounts
summary: Retrieve an Account's Trades
description: This endpoint represents all trades for a given account and can be used in streaming mode. Streaming mode allows you to listen for trades for this account as they are added to the Stellar ledger. If called in streaming mode, Horizon will start at the earliest known trade unless a cursor is set, in which case it will start from that cursor. By setting the cursor value to now, you can stream trades created since your request time.
operationId: GetTradesbyAccountid
parameters:
- $ref: '../parameters.yml#/components/parameters/AccountIDParam'
- $ref: '../parameters.yml#/components/parameters/CursorParam'
- $ref: '../parameters.yml#/components/parameters/OrderParam'
- $ref: '../parameters.yml#/components/parameters/LimitParam'
responses:
'200':
description: blank
content:
application/json:
schema:
allOf:
- $ref: "../schemas/linksSchema.yml#/components/schemas/Links"
- $ref: "../schemas/tradeSchema.yml#/components/schemas/Trade"

/accounts/{account_id}/data/{key}:
get:
tags:
- Accounts
summary: Retrieve an Account's Data
description: This endpoint represents a single data for a given account.
operationId: GetDatabyAccountid
parameters:
- $ref: '../parameters.yml#/components/parameters/AccountIDParam'
- $ref: '../parameters.yml#/components/parameters/DataParam'
responses:
'200':
description: blank
content:
application/json:
schema:
type: object
properties:
value:
type: string
26 changes: 26 additions & 0 deletions openapi/components/endpoints/assets.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
paths:
/assets:
get:
tags:
- Assets
summary: List all Assets
description: This endpoint lists all assets.
operationId: ListAllAssets
parameters:
- $ref: '../parameters.yml#/components/parameters/AssetCodeParam'
- $ref: '../parameters.yml#/components/parameters/AssetIssuerParam'
- $ref: '../parameters.yml#/components/parameters/CursorParam'
- $ref: '../parameters.yml#/components/parameters/OrderParam'
- $ref: '../parameters.yml#/components/parameters/LimitParam'
responses:
'200':
description: blank
content:
application/json:
schema:
allOf:
- $ref: "../schemas/linksSchema.yml#/components/schemas/Links"
- $ref: "../schemas/assetSchema.yml#/components/schemas/Asset"



Empty file.
77 changes: 77 additions & 0 deletions openapi/components/endpoints/offers.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
paths:
/offers:
get:
tags:
- Offers
summary: List All Offers
description: "This endpoint lists all currently open offers and can be used in streaming mode. Streaming mode allows you to listen for new offers as they are added to the Stellar ledger. If called in streaming mode, Horizon will start at the earliest known offer unless a cursor is set, in which case it will start from that cursor. By setting the cursor value to now, you can stream offers created since your request time. When filtering by buying or selling arguments, you must use a combination of selling_asset_type, selling_asset_issuer, and selling_asset_code for the selling asset, or a combination of buying_asset_type, buying_asset_issuer, and buying_asset_code for the buying asset."
operationId: GetAllOffers
parameters:
- $ref: '../parameters.yml#/components/parameters/SponsorParam'
- $ref: '../parameters.yml#/components/parameters/SellerParam'
- $ref: '../parameters.yml#/components/parameters/SellingAssetTypeParam'
- $ref: '../parameters.yml#/components/parameters/SellingAssetIssuerParam'
- $ref: '../parameters.yml#/components/parameters/SellingAssetCodeParam'
- $ref: '../parameters.yml#/components/parameters/BuyingAssetTypeParam'
- $ref: '../parameters.yml#/components/parameters/BuyingAssetIssuerParam'
- $ref: '../parameters.yml#/components/parameters/BuyingAssetCodeParam'
- $ref: '../parameters.yml#/components/parameters/CursorParam'
- $ref: '../parameters.yml#/components/parameters/OrderParam'
- $ref: '../parameters.yml#/components/parameters/LimitParam'
responses:
'200':
description: blank
content:
application/json:
schema:
allOf:
- $ref: "../schemas/linksSchema.yml#/components/schemas/Links"
- $ref: "../schemas/offerSchema.yml#/components/schemas/Offer"
/offers/{offer_id}:
get:
tags:
- Offers
summary: Retrieve an Offer
description: The single offer endpoint provides information on a specific offer.
operationId: GetOfferbyOfferid
parameters:
- $ref: '../parameters.yml#/components/parameters/OfferIDParam'
responses:
'200':
description: blank
content:
application/json:
schema:
allOf:
- $ref: "../schemas/linksSchema.yml#/components/schemas/Links"
- $ref: "../schemas/offerSchema.yml#/components/schemas/Offer"
/offers/{offer_id}/trades:
get:
tags:
- Offers
summary: Retrieve an Offer's Trades
description: This endpoint represents all trades for a given offer and can be used in streaming mode. Streaming mode allows you to listen for trades for this offer as they are added to the Stellar ledger. If called in streaming mode, Horizon will start at the earliest known trade unless a cursor is set, in which case it will start from that cursor. By setting the cursor value to now, you can stream trades created since your request time.
operationId: GetTradesbyOfferid
parameters:
- $ref: '../parameters.yml#/components/parameters/OfferIDParam'
- $ref: '../parameters.yml#/components/parameters/CursorParam'
- $ref: '../parameters.yml#/components/parameters/OrderParam'
- $ref: '../parameters.yml#/components/parameters/LimitParam'
responses:
'200':
description: blank
content:
application/json:
schema:
allOf:
- $ref: "../schemas/linksSchema.yml#/components/schemas/Links"
- $ref: "../schemas/tradeSchema.yml#/components/schemas/Trade"









Loading