Documentation ·Docs
API design guidelines

Security

Every operation states how it is authenticated, public operations say so on purpose, and credentials travel in headers, never in the URL.

Read this page in العربية

On this page

At a glance#

A specification answers one question for every operation: who may call it. The answer is a security requirement, on the operation or once for the whole document. An operation that anyone may call says so explicitly.

RuleMeaning
A requirement on every operationsecurity on the operation, or at the top level of the document
Public on purposesecurity: [] together with x-api360-public: true
Credentials in headersAn API key travels in a header, a bearer token in the Authorization header
Nothing secret in the URLNo API key, token, secret or password in a query parameter

Credentials in a provider's specification#

A call to a product sends the app's key in the api360key header, or HTTP Basic for an app set to it. Declare it as a header scheme:

security:
  - api_key: []
components:
  securitySchemes:
    api_key:
      type: apiKey
      in: header
      name: api360key

The platform's own domain APIs use a bearer token, declared as an http scheme with scheme: bearer.

Public operations#

A health probe or a file download that anyone may call states it:

/health:
  get:
    operationId: health
    security: []
    x-api360-public: true

Without the marker, an empty security list looks like an omission and is reported.

Keep secrets out of URLs#

A URL is written to access logs, browser history and Referer headers. A query parameter named api_key, access_token, token, secret, password or similar is reported, and so is a security scheme of type apiKey located in the query. Parameter names are compared without case or separators, so Access-Token and accessToken are caught as well.

Checked by#

RuleSeverityChecks
api360-operation-securityerrorEvery operation has an effective security requirement; security: [] needs x-api360-public: true
api360-no-apikey-in-queryerrorNo apiKey scheme in the query and no credential-named query parameter

See also#

Was this page helpful?
Updated 2026-10-17