Mantieni tutto organizzato con le raccolte
Salva e classifica i contenuti in base alle tue preferenze.
Questa pagina si applica ad Apigee e Apigee hybrid.
Informazioni sulle specifiche dell'API
Le specifiche API utilizzano formati standard per descrivere le API. Sono leggibili dalle macchine, ma anche facili da leggere e comprendere per le persone. Le specifiche descrivono in genere gli elementi di un'API, come il percorso di base, i percorsi e i verbi, le intestazioni, i parametri di query, le operazioni, i tipi di contenuti, le descrizioni delle risposte e così via, come mostrato nella Figura 1.
Figura 1. Estratto da una specifica OpenAPI.
Una versione dell'API può contenere più specifiche API dello stesso tipo o di tipi diversi, ad esempio specifica OpenAPI, Proto e WSDL. Se supportato, l'hub API può analizzare una specifica dell'API per estrarre e archiviare i metadati dell'API, ad esempio l'ID API, l'ID versione, la descrizione e le operazioni. Consulta la sezione Analisi delle specifiche.
Utilizzo delle specifiche dell'API con l'hub API
Puoi creare una versione dell'API in API Hub con o senza una specifica API.
Puoi caricare una specifica
al momento della creazione di una versione. Quando visualizzi i dettagli di un'API nell'interfaccia utente, vedrai un elenco di eventuali specifiche associate alle versioni di una risorsa API.
Puoi anche creare e configurare una versione con una specifica utilizzando l'API REST. Quando utilizzi l'API, crei un'entità di versione dell'API con la specifica, quindi puoi associare la versione a una risorsa dell'API.
Se supportato, l'hub API può analizzare una specifica dell'API per estrarre informazioni sull'API
e archiviarle con una versione dell'API. Ad esempio, l'hub API può analizzare una specifica OpenAPI dell'API per estrarre e archiviare
l'ID API, l'ID versione, la descrizione, le operazioni e altri metadati.
[[["Facile da capire","easyToUnderstand","thumb-up"],["Il problema è stato risolto","solvedMyProblem","thumb-up"],["Altra","otherUp","thumb-up"]],[["Difficile da capire","hardToUnderstand","thumb-down"],["Informazioni o codice di esempio errati","incorrectInformationOrSampleCode","thumb-down"],["Mancano le informazioni o gli esempi di cui ho bisogno","missingTheInformationSamplesINeed","thumb-down"],["Problema di traduzione","translationIssue","thumb-down"],["Altra","otherDown","thumb-down"]],["Ultimo aggiornamento 2025-09-04 UTC."],[[["\u003cp\u003eAPI specifications are standardized, machine-readable formats that describe APIs, including elements like paths, verbs, headers, and response descriptions.\u003c/p\u003e\n"],["\u003cp\u003eAPI hub allows the creation of API versions both with and without an API specification, which can be uploaded during version creation or added later using the REST API.\u003c/p\u003e\n"],["\u003cp\u003eAPI hub can parse API specifications, such as OpenAPI, to extract and store API metadata, including the API ID, version ID, description, and operations.\u003c/p\u003e\n"],["\u003cp\u003eAPI hub supports the validation of API specifications, and specification parsing is only available for OpenAPI specifications versions 2.0, 3.0 and 3.1 in both JSON and YAML formats.\u003c/p\u003e\n"]]],[],null,["# Introduction to API specifications\n\n*This page\napplies to **Apigee** and **Apigee hybrid**.*\n\nAbout API specifications\n------------------------\n\nAPI specifications use standard formats to describe APIs. They are machine readable, but also\neasy for humans to read and understand. Specifications typically describe elements of an API\nsuch as its base path, paths and verbs, headers, query parameters, operations, content types,\nresponse descriptions, and so on, as shown in Figure 1.\n\n**Figure 1.** Excerpt from an OpenAPI specification.\n\nAn [API version](./versions-intro) can contain multiple API specifications of the same or different types such as\n[OpenAPI Spec](https://swagger.io/specification/), Proto, and WSDL. Where supported, API hub can parse an API specification to extract and store\nAPI metadata, such as the API ID, version ID, description, and operations. See [Specification parsing](#specificationparsing).\n\nUsing API specifications with API hub\n-------------------------------------\n\nYou can create an API version in API hub with or without an API specification.\n\nYou can upload a specification\nat the time you create a version. When you view details of an API in the user interface, you will\nsee a list of any specs that are associated with the versions of an API resource.\n\nYou can also create and configure a version with a specification using the REST API. When\nusing the API, you create an API version entity with the specification, then you can attach the version\nto an API resource.\n\nFor more information, see [Add a spec to a version](./manage-specifications#addspec).\n\nSpecification parsing\n---------------------\n\nWhere supported, API hub can parse an API specification to extract information about the API\nand store it with an API version. For example, API hub can parse an API OpenAPI specification to extract and store\nthe API ID, version ID, description, operations, and other metadata.\n\n\nAPI hub also supports specification validation. See [Validate an API specification](./validate-spec).\n\n| **Note:** API specification parsing is only supported for [OpenAPI specifications](https://swagger.io/specification/) (v.2.0, v3.0 and v3.1) in JSON and YAML formats."]]