{ "components": { "responses": {}, "schemas": { "Nix Cache": { "description": "A Nix binary cache", "example": { "public_key": "my.cache.org:1111111111111111", "sid": "example4ser3adju75ddusbr", "url": "https://my.cache.org" }, "properties": { "public_key": { "description": "Trusted public key for signed NARs", "type": "string", "x-struct": null, "x-validate": null }, "sid": { "description": "sid of the nix cache", "readOnly": true, "type": "string", "x-struct": null, "x-validate": null }, "url": { "description": "URL to binary cache", "type": "string", "x-struct": null, "x-validate": null } }, "required": [ "name", "seed_type" ], "title": "Nix Cache", "type": "object", "x-struct": "Elixir.SowerWeb.Schemas.Nix.Cache", "x-validate": null }, "Seed": { "description": "A seed is an installable unit", "example": { "id": "example4ser3adju75ddusbr", "name": "myhost", "seed_type": "nixos" }, "properties": { "name": { "description": "Name of the seed", "type": "string", "x-struct": null, "x-validate": null }, "seed_type": { "description": "Type of the seed", "enum": [ "nixos", "home-manager", "nix-darwin" ], "type": "string", "x-struct": null, "x-validate": null }, "sid": { "description": "sid of the seed", "readOnly": true, "type": "string", "x-struct": null, "x-validate": null } }, "required": [ "name", "seed_type" ], "title": "Seed", "type": "object", "x-struct": "Elixir.SowerWeb.Schemas.Seed", "x-validate": null }, "StorePath": { "description": "A store path is a Nix store path that can by installed by a client", "example": { "path": "/nix/store/examplehxpf8d7x5ys5p9v0z9x587hs1-...", "path_digest": "examplehxpf8d7x5ys5p9v0z9x587hs1" }, "properties": { "path": { "description": "Nix store path", "type": "string", "x-struct": null, "x-validate": null }, "path_digest": { "description": "id of the store path", "readOnly": true, "type": "string", "x-struct": null, "x-validate": null } }, "required": [ "path" ], "title": "StorePath", "type": "object", "x-struct": "Elixir.SowerWeb.Schemas.StorePath", "x-validate": null } }, "securitySchemes": { "authorization": { "bearerFormat": "sower", "description": "sower api token", "scheme": "bearer", "type": "http" } } }, "info": { "title": "sower", "version": "0.4.5" }, "openapi": "3.0.0", "paths": { "/api/nix/caches": { "get": { "callbacks": {}, "operationId": "ListNixCaches", "parameters": [], "responses": { "200": { "content": { "application/json": { "schema": { "items": { "$ref": "#/components/schemas/Nix Cache" }, "type": "array", "x-struct": null, "x-validate": null } } }, "description": "Nix Cache response" }, "401": { "content": { "application/json": { "schema": { "properties": { "error": { "type": "string", "x-struct": null, "x-validate": null } }, "type": "object", "x-struct": null, "x-validate": null } } }, "description": "Unauthorized" } }, "summary": "List Nix Caches", "tags": [] } }, "/api/seeds": { "get": { "callbacks": {}, "operationId": "ListSeeds", "parameters": [ { "description": "Seed name", "example": "host1", "in": "query", "name": "name", "required": false, "schema": { "type": "string", "x-struct": null, "x-validate": null } }, { "description": "Seed type (nixos, home-manager, etc.)", "example": "nixos", "in": "query", "name": "seed_type", "required": false, "schema": { "type": "string", "x-struct": null, "x-validate": null } } ], "responses": { "200": { "content": { "application/json": { "schema": { "items": { "$ref": "#/components/schemas/Seed" }, "type": "array", "x-struct": null, "x-validate": null } } }, "description": "Seed response" }, "401": { "content": { "application/json": { "schema": { "properties": { "error": { "type": "string", "x-struct": null, "x-validate": null } }, "type": "object", "x-struct": null, "x-validate": null } } }, "description": "Unauthorized" }, "404": { "content": { "application/json": { "schema": { "properties": { "error": { "type": "string", "x-struct": null, "x-validate": null } }, "type": "object", "x-struct": null, "x-validate": null } } }, "description": "Seed error response" } }, "summary": "List Seeds", "tags": [] }, "post": { "callbacks": {}, "operationId": "NewSeed", "parameters": [], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Seed" } } }, "description": "Seed params", "required": false }, "responses": { "201": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Seed" } } }, "description": "Seed response" }, "401": { "content": { "application/json": { "schema": { "properties": { "error": { "type": "string", "x-struct": null, "x-validate": null } }, "type": "object", "x-struct": null, "x-validate": null } } }, "description": "Unauthorized" }, "409": { "content": { "application/json": { "schema": { "properties": { "error": { "type": "string", "x-struct": null, "x-validate": null } }, "type": "object", "x-struct": null, "x-validate": null } } }, "description": "Seed conflict response" } }, "summary": "New Seed", "tags": [] } }, "/api/seeds/{sid}": { "get": { "callbacks": {}, "operationId": "GetSeed", "parameters": [ { "description": "Seed SID", "example": "example4ser3adju75ddusbr", "in": "path", "name": "sid", "required": true, "schema": { "type": "string", "x-struct": null, "x-validate": null } } ], "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Seed" } } }, "description": "Seed response" }, "401": { "content": { "application/json": { "schema": { "properties": { "error": { "type": "string", "x-struct": null, "x-validate": null } }, "type": "object", "x-struct": null, "x-validate": null } } }, "description": "Unauthorized" }, "404": { "content": { "application/json": { "schema": { "properties": { "error": { "type": "string", "x-struct": null, "x-validate": null } }, "type": "object", "x-struct": null, "x-validate": null } } }, "description": "Seed error response" } }, "summary": "Get Seed", "tags": [] } }, "/api/seeds/{sid}/paths": { "post": { "callbacks": {}, "operationId": "NewSeedStorePath", "parameters": [ { "description": "Seed SID", "example": "example4ser3adju75ddusbr", "in": "path", "name": "sid", "required": true, "schema": { "type": "string", "x-struct": null, "x-validate": null } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/StorePath" } } }, "description": "Seed params", "required": false }, "responses": { "201": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/StorePath" } } }, "description": "Seed response" }, "401": { "content": { "application/json": { "schema": { "properties": { "error": { "type": "string", "x-struct": null, "x-validate": null } }, "type": "object", "x-struct": null, "x-validate": null } } }, "description": "Unauthorized" } }, "summary": "New Seed Store Path", "tags": [] } }, "/api/seeds/{sid}/paths/latest": { "get": { "callbacks": {}, "operationId": "LatestStorePathBySeed", "parameters": [ { "description": "Seed SID", "example": "example4ser3adju75ddusbr", "in": "path", "name": "sid", "required": true, "schema": { "type": "string", "x-struct": null, "x-validate": null } } ], "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/StorePath" } } }, "description": "Seed response" }, "401": { "content": { "application/json": { "schema": { "properties": { "error": { "type": "string", "x-struct": null, "x-validate": null } }, "type": "object", "x-struct": null, "x-validate": null } } }, "description": "Unauthorized" }, "404": { "content": { "application/json": { "schema": { "properties": { "error": { "type": "string", "x-struct": null, "x-validate": null } }, "type": "object", "x-struct": null, "x-validate": null } } }, "description": "Store Path error response" } }, "summary": "Get latest Store Path for a Seed", "tags": [] } } }, "security": [ { "authorization": [] } ], "servers": [ { "url": "http://localhost:4002" } ], "tags": [] }