The description gives details on what the responses of the API would be. The GET method, under the artists endpoint, lets the consumer of the API obtain the details of a list of artists from the database.Įvery response would need at least one HTTP status code to describe the kind of responses a consumer is likely to expect. For more advanced security, see Authentication. We also secure the API using Basic authentication, so that only authorized users can consume the API. Some APIs have a single server, others may have multiple servers, such as production and sandbox. ![]() The API endpoint paths are appended to the server URL. The servers array specifies one or more server URLs for API calls. ![]() The info object contains the API title and version, which are required, and an optional description. openapi: 3.0.0ĭescription: A simple API to illustrate OpenAPI conceptsĮach API definition starts with the version of the OpenAPI Specification that this definition uses. Let’s start with a simple API definition that contains just meta information, such as the API title, version, server URL and other descriptive information.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |