DocumentationAPI reference

Rust · 0.1.0

Get Instance Setting

GET /api/v1/instance/settings/{key}

InstanceService · InstanceService_GetInstanceSetting

Protocol-derived reference. Authorization and instance policy still apply. Schema descriptions are inherited from the MIT-licensed application contract; examples here are not executed against a live server.

Access

Read policy is per key: STORAGE and NOTIFICATION require instance ADMIN, AI requires authentication, and bootstrap-safe keys may be read anonymously. A batch applies the same checks to every requested name.

Callable setting route

The protocol's HTTP annotation binds /api/v1/instance/settings/{KEY}, for example /api/v1/instance/settings/GENERAL. The /api/v1/instance/{instance}/* form below is the generated OpenAPI representation, not a literal wildcard URL to send. For updates, the JSON body is an InstanceSetting object with the payload matching its key; the URL supplies its name.

Read a known setting

This read-only example inspects GENERAL. STORAGE and NOTIFICATION require administrator access; AI requires authentication. Stored S3, SMTP and AI credentials are redacted. BASIC is a legacy compatibility key that returns only its name, not secrets.

curl --fail-with-body \
  -H "Authorization: Bearer $MEMOS_TOKEN" \
  "$MEMOS_URL/api/v1/instance/settings/GENERAL"

Request

Gets an instance setting.

GET/api/v1/instance/settings/{key}

The generated OpenAPI declares /api/v1/instance/{instance}/*. Use the callable Rust route above; the downloaded contract is preserved unchanged.

Protocol-declared parameters

The generated path parameter named instance below is protocol metadata. In the callable route above, substitute a setting key such as GENERAL for {key}; do not send a literal wildcard.

Name / locationType / requirementDescription
instance
path
string
Required
The instance id.

Request body

No request body is declared.

Responses

200 · OK

application/json · InstanceSetting

default · Default error response

application/json · Status

Complete operation definition

All declared constraints, media types and response details are retained below. Schema references link to their complete definitions.

Open JSON definition
{
  "tags": [
    "InstanceService"
  ],
  "description": "Gets an instance setting.",
  "operationId": "InstanceService_GetInstanceSetting",
  "parameters": [
    {
      "name": "instance",
      "in": "path",
      "description": "The instance id.",
      "required": true,
      "schema": {
        "type": "string"
      }
    }
  ],
  "responses": {
    "200": {
      "description": "OK",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/InstanceSetting"
          }
        }
      }
    },
    "default": {
      "description": "Default error response",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/Status"
          }
        }
      }
    }
  }
}