From 6ccd721f21aba4339093d3c470369332cf46d20e Mon Sep 17 00:00:00 2001 From: blockscout-bot Date: Wed, 25 Dec 2024 10:57:42 +0000 Subject: [PATCH] [BOT] [CREATE-SWAGGER] [SKIP-GH-PAGES] create swagger for "bens" of version v1.5.3 --- services/bens/v1.5.3/swagger.yaml | 586 ++++++++++++++++++++++++++++++ 1 file changed, 586 insertions(+) create mode 100644 services/bens/v1.5.3/swagger.yaml diff --git a/services/bens/v1.5.3/swagger.yaml b/services/bens/v1.5.3/swagger.yaml new file mode 100644 index 0000000..70fc3b4 --- /dev/null +++ b/services/bens/v1.5.3/swagger.yaml @@ -0,0 +1,586 @@ +swagger: "2.0" +info: + title: Blockscout ENS + version: 1.3.0 + contact: + name: Blockscout + url: https://blockscout.com + email: support@blockscout.com +tags: + - name: DomainsExtractor + - name: Health +host: bens.services.blockscout.com +consumes: + - application/json +produces: + - application/json +paths: + /api/v1/{chain_id}/addresses/{address}: + get: + summary: Get detailed information about main domain of requested address + operationId: DomainsExtractor_GetAddress + responses: + "200": + description: A successful response. + schema: + $ref: '#/definitions/v1GetAddressResponse' + default: + description: An unexpected error response. + schema: + $ref: '#/definitions/rpcStatus' + parameters: + - name: chain_id + in: path + required: true + type: string + format: int64 + - name: address + in: path + required: true + type: string + - name: protocol_id + in: query + required: false + type: string + tags: + - DomainsExtractor + /api/v1/{chain_id}/addresses:batch-resolve-names: + post: + summary: Perform batch resolving of list of address for blockscout backend requests + operationId: DomainsExtractor_BatchResolveAddressNames + responses: + "200": + description: A successful response. + schema: + $ref: '#/definitions/v1BatchResolveAddressNamesResponse' + default: + description: An unexpected error response. + schema: + $ref: '#/definitions/rpcStatus' + parameters: + - name: chain_id + description: The chain (network) where domain search should be done + in: path + required: true + type: string + format: int64 + - name: body + in: body + required: true + schema: + $ref: '#/definitions/DomainsExtractorBatchResolveAddressNamesBody' + tags: + - DomainsExtractor + /api/v1/{chain_id}/addresses:lookup: + get: + summary: Get basic info about address for ens-lookup and blockscout quick-search. Sorted by `registration_date` + operationId: DomainsExtractor_LookupAddress + responses: + "200": + description: A successful response. + schema: + $ref: '#/definitions/v1LookupAddressResponse' + default: + description: An unexpected error response. + schema: + $ref: '#/definitions/rpcStatus' + parameters: + - name: chain_id + description: The chain (network) where domain search should be done + in: path + required: true + type: string + format: int64 + - name: address + description: Address of EOA or contract + in: query + required: false + type: string + - name: resolved_to + description: Include domains resolved to the address + in: query + required: false + type: boolean + - name: owned_by + description: Include domains owned by the address + in: query + required: false + type: boolean + - name: only_active + description: Filtering field to remove expired domains + in: query + required: false + type: boolean + - name: sort + description: Sorting field. Default is `registration_date` + in: query + required: false + type: string + - name: order + description: Order direction. Defaut is DESC + in: query + required: false + type: string + enum: + - ORDER_UNSPECIFIED + - ASC + - DESC + default: ORDER_UNSPECIFIED + - name: page_size + description: Optional. Max number of items in single response. Default is 50 + in: query + required: false + type: integer + format: int64 + - name: page_token + description: Optional. Value of `.pagination.page_token` from previous response + in: query + required: false + type: string + - name: protocols + description: comma separated list of protocol ids to filter by + in: query + required: false + type: string + tags: + - DomainsExtractor + /api/v1/{chain_id}/domains/{name}: + get: + summary: Get detailed information about domain for Detailed domain page + operationId: DomainsExtractor_GetDomain + responses: + "200": + description: A successful response. + schema: + $ref: '#/definitions/v1DetailedDomain' + default: + description: An unexpected error response. + schema: + $ref: '#/definitions/rpcStatus' + parameters: + - name: chain_id + description: The chain (network) where domain search should be done + in: path + required: true + type: string + format: int64 + - name: name + description: Name of domain, for example vitalik.eth + in: path + required: true + type: string + - name: only_active + description: Filtering field to remove expired domains + in: query + required: false + type: boolean + - name: protocol_id + description: Protocol id of domain, default is first priority protocol on that chain + in: query + required: false + type: string + tags: + - DomainsExtractor + /api/v1/{chain_id}/domains/{name}/events: + get: + summary: Get list of events of domain for Detailed domain page + operationId: DomainsExtractor_ListDomainEvents + responses: + "200": + description: A successful response. + schema: + $ref: '#/definitions/v1ListDomainEventsResponse' + default: + description: An unexpected error response. + schema: + $ref: '#/definitions/rpcStatus' + parameters: + - name: chain_id + description: The chain (network) where domain search should be done + in: path + required: true + type: string + format: int64 + - name: name + description: Name of domain, for example vitalik.eth + in: path + required: true + type: string + - name: sort + description: Sorting field. Default is `timestamp` + in: query + required: false + type: string + - name: order + description: Order direction. Default is DESC + in: query + required: false + type: string + enum: + - ORDER_UNSPECIFIED + - ASC + - DESC + default: ORDER_UNSPECIFIED + - name: protocol_id + description: Protocol id of domain, default is first priority protocol on that chain + in: query + required: false + type: string + tags: + - DomainsExtractor + /api/v1/{chain_id}/domains:lookup: + get: + summary: Get basic info about domain for ens-lookup and blockscout quick-search. Sorted by `registration_date` + operationId: DomainsExtractor_LookupDomainName + responses: + "200": + description: A successful response. + schema: + $ref: '#/definitions/v1LookupDomainNameResponse' + default: + description: An unexpected error response. + schema: + $ref: '#/definitions/rpcStatus' + parameters: + - name: chain_id + description: The chain (network) where domain search should be done + in: path + required: true + type: string + format: int64 + - name: name + description: Optional. Name of domain, for example vitalik.eth. None means lookup for any name + in: query + required: false + type: string + - name: only_active + description: Filtering field to remove expired domains + in: query + required: false + type: boolean + - name: sort + description: Sorting field. Default is `registration_date` + in: query + required: false + type: string + - name: order + description: Order direction. Default is DESC + in: query + required: false + type: string + enum: + - ORDER_UNSPECIFIED + - ASC + - DESC + default: ORDER_UNSPECIFIED + - name: page_size + description: Optional. Max number of items in single response. Default is 50 + in: query + required: false + type: integer + format: int64 + - name: page_token + description: Optional. Value of `.pagination.page_token` from previous response + in: query + required: false + type: string + - name: protocols + description: comma separated list of protocol ids to filter by + in: query + required: false + type: string + tags: + - DomainsExtractor + /api/v1/{chain_id}/protocols: + get: + summary: Get list of supported protocols + operationId: DomainsExtractor_GetProtocols + responses: + "200": + description: A successful response. + schema: + $ref: '#/definitions/v1GetProtocolsResponse' + default: + description: An unexpected error response. + schema: + $ref: '#/definitions/rpcStatus' + parameters: + - name: chain_id + description: The chain (network) where to get protocols + in: path + required: true + type: string + format: int64 + tags: + - DomainsExtractor + /health: + get: + summary: |- + If the requested service is unknown, the call will fail with status + NOT_FOUND. + operationId: Health_Check + responses: + "200": + description: A successful response. + schema: + $ref: '#/definitions/v1HealthCheckResponse' + default: + description: An unexpected error response. + schema: + $ref: '#/definitions/rpcStatus' + parameters: + - name: service + in: query + required: false + type: string + tags: + - Health +definitions: + DomainsExtractorBatchResolveAddressNamesBody: + type: object + properties: + addresses: + type: array + items: + type: string + title: List of requested addresses + HealthCheckResponseServingStatus: + type: string + enum: + - UNKNOWN + - SERVING + - NOT_SERVING + - SERVICE_UNKNOWN + default: UNKNOWN + description: ' - SERVICE_UNKNOWN: Used only by the Watch method.' + protobufAny: + type: object + properties: + '@type': + type: string + additionalProperties: {} + rpcStatus: + type: object + properties: + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + $ref: '#/definitions/protobufAny' + v1Address: + type: object + properties: + hash: + type: string + v1BatchResolveAddressNamesResponse: + type: object + properties: + names: + type: object + additionalProperties: + type: string + v1DetailedDomain: + type: object + properties: + id: + type: string + title: Unique id for the domain, also known as nodehash + name: + type: string + title: The human readable name, if known. Unknown portions replaced with hash in square brackets (eg, foo.[1234].eth) + tokens: + type: array + items: + type: object + $ref: '#/definitions/v1Token' + title: List of NFT tokens related to this domain + owner: + $ref: '#/definitions/v1Address' + title: The account that owns the domain + resolved_address: + $ref: '#/definitions/v1Address' + title: Optional. Resolved address of this domain + registrant: + $ref: '#/definitions/v1Address' + title: Optional. The account that owns the ERC721 NFT for the domain + wrapped_owner: + $ref: '#/definitions/v1Address' + title: Optional. Owner of NameWrapper NFT + registration_date: + type: string + description: Optional. RFC 3339 datetime of expiry date. + expiry_date: + type: string + title: Optional. RFC 3339 datetime of expiry date. None means never expires + other_addresses: + type: object + additionalProperties: + type: string + title: |- + Map chain -> resolved_address that contains other blockchain addresses. + This map will contain `current_chain_id` -> `resovled_address` if `resovled_address` is not None + protocol: + $ref: '#/definitions/v1ProtocolInfo' + title: Information about protocol that domain belongs to + stored_offchain: + type: boolean + resolved_with_wildcard: + type: boolean + resolver_address: + $ref: '#/definitions/v1Address' + v1Domain: + type: object + properties: + id: + type: string + title: Unique id for the domain, also known as nodehash + name: + type: string + title: The human readable name, if known. Unknown portions replaced with hash in square brackets (eg, foo.[1234].eth) + resolved_address: + $ref: '#/definitions/v1Address' + title: Optional. Resolved address of this domain + owner: + $ref: '#/definitions/v1Address' + title: The account that owns the domain + wrapped_owner: + $ref: '#/definitions/v1Address' + title: Optional. Owner of NameWrapper NFT + registration_date: + type: string + description: Optional. RFC 3339 datetime of expiry date. + expiry_date: + type: string + title: Optional. RFC 3339 datetime of expiry date. None means never expires + protocol: + $ref: '#/definitions/v1ProtocolInfo' + title: Protocol that domain belongs to + v1DomainEvent: + type: object + properties: + transaction_hash: + type: string + title: Transaction hash where action occured + timestamp: + type: string + title: Timestamp of this transaction + from_address: + $ref: '#/definitions/v1Address' + title: /Sender of transaction + action: + type: string + title: Optional. Action name + v1GetAddressResponse: + type: object + properties: + domain: + $ref: '#/definitions/v1DetailedDomain' + resolved_domains_count: + type: integer + format: int32 + v1GetProtocolsResponse: + type: object + properties: + items: + type: array + items: + type: object + $ref: '#/definitions/v1ProtocolInfo' + v1HealthCheckResponse: + type: object + properties: + status: + $ref: '#/definitions/HealthCheckResponseServingStatus' + v1ListDomainEventsResponse: + type: object + properties: + items: + type: array + items: + type: object + $ref: '#/definitions/v1DomainEvent' + v1LookupAddressResponse: + type: object + properties: + items: + type: array + items: + type: object + $ref: '#/definitions/v1Domain' + title: |- + List of domains that resolved to or owned by requested address + Sorted by relevance, so first address could be displayed as main resolved address + next_page_params: + $ref: '#/definitions/v1Pagination' + v1LookupDomainNameResponse: + type: object + properties: + items: + type: array + items: + type: object + $ref: '#/definitions/v1Domain' + title: |- + List of domains that resolved to or owned by requested address + Sorted by relevance, so first address could be displayed as main resolved address + next_page_params: + $ref: '#/definitions/v1Pagination' + v1Order: + type: string + enum: + - ORDER_UNSPECIFIED + - ASC + - DESC + default: ORDER_UNSPECIFIED + v1Pagination: + type: object + properties: + page_token: + type: string + page_size: + type: integer + format: int64 + v1ProtocolInfo: + type: object + properties: + id: + type: string + short_name: + type: string + title: + type: string + description: + type: string + deployment_blockscout_base_url: + type: string + tld_list: + type: array + items: + type: string + icon_url: + type: string + docs_url: + type: string + v1Token: + type: object + properties: + id: + type: string + contract_hash: + type: string + type: + $ref: '#/definitions/v1TokenType' + v1TokenType: + type: string + enum: + - NATIVE_DOMAIN_TOKEN + - WRAPPED_DOMAIN_TOKEN + default: NATIVE_DOMAIN_TOKEN +externalDocs: + description: More about blockscout microservices + url: https://github.com/blockscout/blockscout-rs