SOPS · Example Payload

Sops Encrypt File Example

Example of encrypting a secrets YAML file using SOPS with AWS KMS

Secrets ManagementEncryptionConfiguration ManagementDevOpsSecurityKubernetesCNCF

Sops Encrypt File Example is an example object payload from SOPS, with 8 top-level fields. It illustrates the shape of data this provider's APIs accept or return.

Top-level fields

titledescriptioncommandinput_fileinput_contentoutput_fileoutput_contentnotes

Example Payload

sops-encrypt-file-example.json Raw ↑
{
  "title": "SOPS Encrypt a YAML File with AWS KMS",
  "description": "Example of encrypting a secrets YAML file using SOPS with AWS KMS",
  "command": "sops --encrypt --kms arn:aws:kms:us-east-1:123456789012:key/mrk-abc123def456 secrets.yml > secrets.enc.yml",
  "input_file": "secrets.yml",
  "input_content": {
    "database_password": "s3cr3t-p@ssw0rd",
    "api_key": "sk-live-abc123xyz456",
    "database_host": "db.example.com",
    "database_port": 5432
  },
  "output_file": "secrets.enc.yml",
  "output_content": {
    "database_password": "ENC[AES256_GCM,data:abc123xyz==,iv:AAABBBCCC==,tag:XXXYYY==,type:str]",
    "api_key": "ENC[AES256_GCM,data:def456uvw==,iv:DDDEEEFFF==,tag:ZZZAAA==,type:str]",
    "database_host": "db.example.com",
    "database_port": 5432,
    "sops": {
      "kms": [
        {
          "arn": "arn:aws:kms:us-east-1:123456789012:key/mrk-abc123def456",
          "created_at": "2026-05-02T10:00:00Z",
          "enc": "AQICAHi...(base64-encoded-data-key)...==",
          "aws_profile": ""
        }
      ],
      "lastmodified": "2026-05-02T10:00:00Z",
      "mac": "ENC[AES256_GCM,data:macdata==,iv:maciv==,tag:mactag==,type:str]",
      "version": "3.9.0"
    }
  },
  "notes": [
    "Keys (database_host, database_port) remain unencrypted",
    "String values are encrypted with AES256-GCM",
    "Integer values are encrypted and will be decrypted as integers",
    "The sops metadata block stores key references for decryption"
  ]
}

Work with this as data

Every example here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for examples

4 MCP tools reach this
  • find_examplesBrowse and filter every example in the catalog.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools

Call it yourself

curl for this page
This example
curl "https://apis.io/api/v1/examples/sops-encrypt-file-example"
All examples
curl "https://apis.io/api/v1/examples?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no email required.

A second provider on the same verified email joins the account you already have.