APIPortal / Client / get_api_inventory_item
get_api_inventory_item¶
- APIPortal.Client.get_api_inventory_item(**kwargs)¶
Gets full details of a single API inventory item.
See also: AWS API Documentation
Request Syntax
response = client.get_api_inventory_item( method='GET'|'POST'|'PUT'|'DELETE'|'PATCH'|'ANY'|'HEAD'|'OPTIONS', host='string', port=123, path='string', resourceArn='string' )
- Parameters:
method (string) –
[REQUIRED]
The HTTP method of the API.
host (string) –
[REQUIRED]
A discovered API’s front-door hostname (e.g. an ALB, CloudFront, or API Gateway DNS name), bounded by the DNS name limit (RFC 1035). Usually literal, but may contain placeholders: <> - stands for one dot-separated part of the hostname. When 10 or more hosts differ only in that part, they fold into one, e.g. a.example.com, b.example.com, … become “<>.example.com”. Deeper levels fold the same way (“<>.<>.example.com”). The registrable domain never folds. - an IP-literal host.
port (integer) –
[REQUIRED]
The port the API listens on, from 0 to 65535.
path (string) –
[REQUIRED]
The request path of the API.
resourceArn (string) –
[REQUIRED]
The ARN of the resource that serves the API, such as an API Gateway stage or a load balancer.
- Return type:
dict
- Returns:
Response Syntax
{ 'item': { 'method': 'GET'|'POST'|'PUT'|'DELETE'|'PATCH'|'ANY'|'HEAD'|'OPTIONS', 'host': 'string', 'port': 123, 'path': 'string', 'accountId': 'string', 'resourceArn': 'string', 'region': 'string', 'discoverySource': 'API_GATEWAY'|'ELB'|'CLOUDFRONT', 'visibility': 'PUBLIC'|'PRIVATE', 'wafStatus': 'ENABLED'|'DISABLED', 'classification': 'SHADOW'|'MANAGED'|'MANAGED_ZOMBIE'|'MANAGED_ORPHANED', 'managedBy': 'SELF'|'ORGANIZATION', 'workloads': [ 'MCP'|'LLM'|'A2A', ], 'managedApiId': 'string' } }
Response Structure
(dict) –
item (dict) –
The details of the API inventory item.
method (string) –
The HTTP method of the API.
host (string) –
A discovered API’s front-door hostname (e.g. an ALB, CloudFront, or API Gateway DNS name), bounded by the DNS name limit (RFC 1035). Usually literal, but may contain placeholders: <> - stands for one dot-separated part of the hostname. When 10 or more hosts differ only in that part, they fold into one, e.g. a.example.com, b.example.com, … become “<>.example.com”. Deeper levels fold the same way (“<>.<>.example.com”). The registrable domain never folds. - an IP-literal host.
port (integer) –
The port the API listens on, from 0 to 65535.
path (string) –
The request path of the API.
accountId (string) –
The AWS account ID that owns the API.
resourceArn (string) –
The ARN of the resource that serves the API, such as an API Gateway stage or a load balancer.
region (string) –
The AWS Region the API was discovered in.
discoverySource (string) –
The AWS service that is the SOURCE of discovered APIs — i.e. the front-door service type whose resources discovery crawls to find APIs. New source services may be added over time, so clients MUST treat any unrecognized value gracefully.
visibility (string) –
Whether a discovered API is reachable publicly or only from within a private network.
wafStatus (string) –
Whether a WAF web ACL is attached to the API’s front-door service.
classification (string) –
Whether any account has created a ManagedApi for a discovered API, and for a managed API whether it is unused or no longer in the caller’s organization. SHADOW - no account has created a ManagedApi for this item. MANAGED - some account in the caller’s organization has created a ManagedApi for this item. MANAGED_ZOMBIE - managed and unused: no traffic for at least the account’s no-traffic window. The API is still reachable, so this clears once traffic resumes. MANAGED_ORPHANED - managed, but the account hosting the API has left the caller’s organization or been closed. The item is a last-known snapshot: it is no longer rediscovered, and its findings are not authorized for the caller. An organizational unit move is not a trigger.
MANAGED_ZOMBIE and MANAGED_ORPHANED add detail to a MANAGED item, so neither is returned for an item the caller does not manage, and MANAGED_ORPHANED takes priority over MANAGED_ZOMBIE. Both are derived per request rather than stored, so neither expires on its own.
managedBy (string) –
Who manages a MANAGED item, relative to the caller. Absent when the item is SHADOW. SELF - the caller account has created the ManagedApi. ORGANIZATION - some other account in the caller’s organization has, but the caller has not.
workloads (list) –
AI protocols seen in this API’s traffic, each listed at most once. Absent when none has been reported, which includes an account that has not enabled AI discovery.
(string) –
An AI protocol seen in an API’s traffic, detected by the front door from request or response headers (and, for A2A, a query parameter). MCP - Model Context Protocol. LLM - traffic to or from an LLM inference server or gateway. A2A - Agent2Agent protocol.
managedApiId (string) –
The identifier of the Managed API created from this API. Absent if there is none.
Exceptions
APIPortal.Client.exceptions.ResourceNotFoundExceptionAPIPortal.Client.exceptions.BadRequestExceptionAPIPortal.Client.exceptions.AccessDeniedExceptionAPIPortal.Client.exceptions.InternalServerException