Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
109 changes: 109 additions & 0 deletions daemon/algod/api/algod.oas2.json
Original file line number Diff line number Diff line change
Expand Up @@ -326,6 +326,56 @@
}
}
},
"/v2/accounts/{address}/applications": {
"get": {
"description": "Lookup an account's application holdings (local state and params if the account is the creator).",
"tags": ["public", "experimental"],
"produces": ["application/json"],
"schemes": ["http"],
"summary": "Get a list of applications held by an account.",
"operationId": "AccountApplicationsInformation",
"parameters": [
{
"$ref": "#/parameters/address"
},
{
"$ref": "#/parameters/limit"
},
{
"$ref": "#/parameters/next"
},
{
"$ref": "#/parameters/include-params"
}
],
"responses": {
"200": {
"$ref": "#/responses/AccountApplicationsInformationResponse"
},
"400": {
"description": "Malformed address",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
},
"401": {
"description": "Invalid API Token",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
},
"500": {
"description": "Internal Error",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
},
"default": {
"description": "Unknown Error"
}
}
}
},
"/v2/accounts/{address}/applications/{application-id}": {
"get": {
"description": "Given a specific account public key and application ID, this call returns the account's application local state and global state (AppLocalState and AppParams, if either exists). Global state will only be returned if the provided address is the application's creator.",
Expand Down Expand Up @@ -2657,6 +2707,35 @@
}
}
},
"AccountApplicationHolding": {
"description": "AccountApplicationHolding describes the account's application holding (local state and params if the account is the creator) for a specific application ID.",
"type": "object",
"required": ["id"],
"properties": {
"id": {
"description": "The application ID.",
"type": "integer",
"x-go-type": "basics.AppIndex"
},
"created-at-round": {
"description": "Round when the account opted into or created the application.",
"type": "integer",
"x-go-type": "basics.Round"
},
"deleted": {
"description": "Whether the application has been deleted.",
"type": "boolean"
},
"app-local-state": {
"description": "\\[appl\\] the application local data stored in this account.\n\nThe raw account uses `AppLocalState` for this type.",
"$ref": "#/definitions/ApplicationLocalState"
},
"params": {
"description": "\\[appp\\] parameters of the application created by this account including app global data.\n\nThe raw account uses `AppParams` for this type.\nOnly present if the account is the creator and include-params is true.",
"$ref": "#/definitions/ApplicationParams"
}
}
},
"AccountParticipation": {
"description": "AccountParticipation describes the parameters used by this account in consensus protocol.",
"type": "object",
Expand Down Expand Up @@ -4195,6 +4274,12 @@
"type": "string",
"name": "tx-type",
"in": "query"
},
"include-params": {
"type": "boolean",
"description": "Include application params in the response. Defaults to false.",
"name": "include-params",
"in": "query"
}
},
"responses": {
Expand Down Expand Up @@ -4317,6 +4402,30 @@
}
}
},
"AccountApplicationsInformationResponse": {
"description": "AccountApplicationsInformationResponse contains a list of applications held by an account.",
"schema": {
"type": "object",
"required": ["round"],
"properties": {
"round": {
"description": "The round for which this information is relevant.",
"type": "integer",
"x-go-type": "basics.Round"
},
"next-token": {
"description": "Used for pagination, when making another request provide this token with the next parameter.",
"type": "string"
},
"application-holdings": {
"type": "array",
"items": {
"$ref": "#/definitions/AccountApplicationHolding"
}
}
}
}
},
"AccountApplicationResponse": {
"description": "AccountApplicationResponse describes the account's application local state and global state (AppLocalState and AppParams, if either exists) for a specific application ID. Global state will only be returned if the provided address is the application's creator.",
"schema": {
Expand Down
184 changes: 184 additions & 0 deletions daemon/algod/api/algod.oas3.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,14 @@
"type": "string"
}
},
"include-params": {
"description": "Include application params in the response. Defaults to false.",
"in": "query",
"name": "include-params",
"schema": {
"type": "boolean"
}
},
"limit": {
"description": "Maximum number of results to return.",
"in": "query",
Expand Down Expand Up @@ -171,6 +179,36 @@
},
"description": "AccountApplicationResponse describes the account's application local state and global state (AppLocalState and AppParams, if either exists) for a specific application ID. Global state will only be returned if the provided address is the application's creator."
},
"AccountApplicationsInformationResponse": {
"content": {
"application/json": {
"schema": {
"properties": {
"application-holdings": {
"items": {
"$ref": "#/components/schemas/AccountApplicationHolding"
},
"type": "array"
},
"next-token": {
"description": "Used for pagination, when making another request provide this token with the next parameter.",
"type": "string"
},
"round": {
"description": "The round for which this information is relevant.",
"type": "integer",
"x-go-type": "basics.Round"
}
},
"required": [
"round"
],
"type": "object"
}
}
},
"description": "AccountApplicationsInformationResponse contains a list of applications held by an account."
},
"AccountAssetResponse": {
"content": {
"application/json": {
Expand Down Expand Up @@ -1148,6 +1186,35 @@
],
"type": "object"
},
"AccountApplicationHolding": {
"description": "AccountApplicationHolding describes the account's application holding (local state and params if the account is the creator) for a specific application ID.",
"properties": {
"app-local-state": {
"$ref": "#/components/schemas/ApplicationLocalState"
},
"created-at-round": {
"description": "Round when the account opted into or created the application.",
"type": "integer",
"x-go-type": "basics.Round"
},
"deleted": {
"description": "Whether the application has been deleted.",
"type": "boolean"
},
"id": {
"description": "The application ID.",
"type": "integer",
"x-go-type": "basics.AppIndex"
},
"params": {
"$ref": "#/components/schemas/ApplicationParams"
}
},
"required": [
"id"
],
"type": "object"
},
"AccountAssetHolding": {
"description": "AccountAssetHolding describes the account's asset holding and asset parameters (if either exist) for a specific asset ID.",
"properties": {
Expand Down Expand Up @@ -3209,6 +3276,123 @@
]
}
},
"/v2/accounts/{address}/applications": {
"get": {
"description": "Lookup an account's application holdings (local state and params if the account is the creator).",
"operationId": "AccountApplicationsInformation",
"parameters": [
{
"description": "An account public key.",
"in": "path",
"name": "address",
"required": true,
"schema": {
"pattern": "[A-Z0-9]{58}",
"type": "string",
"x-go-type": "basics.Address"
},
"x-go-type": "basics.Address"
},
{
"description": "Maximum number of results to return.",
"in": "query",
"name": "limit",
"schema": {
"type": "integer",
"x-go-type": "uint64"
},
"x-go-type": "uint64"
},
{
"description": "The next page of results. Use the next token provided by the previous results.",
"in": "query",
"name": "next",
"schema": {
"type": "string"
}
},
{
"description": "Include application params in the response. Defaults to false.",
"in": "query",
"name": "include-params",
Comment thread
gmalouf marked this conversation as resolved.
Outdated
"schema": {
"type": "boolean"
}
}
],
"responses": {
"200": {
"content": {
"application/json": {
"schema": {
"properties": {
"application-holdings": {
"items": {
"$ref": "#/components/schemas/AccountApplicationHolding"
},
"type": "array"
},
"next-token": {
"description": "Used for pagination, when making another request provide this token with the next parameter.",
"type": "string"
},
"round": {
"description": "The round for which this information is relevant.",
"type": "integer",
"x-go-type": "basics.Round"
}
},
"required": [
"round"
],
"type": "object"
}
}
},
"description": "AccountApplicationsInformationResponse contains a list of applications held by an account."
},
"400": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
}
}
},
"description": "Malformed address"
},
"401": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
}
}
},
"description": "Invalid API Token"
},
"500": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
}
}
},
"description": "Internal Error"
},
"default": {
"content": {},
"description": "Unknown Error"
}
},
"summary": "Get a list of applications held by an account.",
"tags": [
"public",
"experimental"
]
}
},
"/v2/accounts/{address}/applications/{application-id}": {
"get": {
"description": "Given a specific account public key and application ID, this call returns the account's application local state and global state (AppLocalState and AppParams, if either exists). Global state will only be returned if the provided address is the application's creator.",
Expand Down
Loading
Loading