Skip to main content
La version française est une traduction automatique. La version anglaise prévaut sur la française en cas de divergence.

Retrieve a setting

Contributeurs

GET /accounts/{account_id}/core/v1/settings/{setting_id}

Returns the stored Setting API resource in the JSON response body.

Parameters

Name Type In Required Description

account_id

string

path

True

ID of the containing account resource

  • example: {{.Account}}

setting_id

string

path

True

ID of the setting collection to list

Response

Status: 200, Returns the stored Setting API resource in the JSON response body.
Name Type Required Description

type

string

True

Media type of the resource. Defined values are:

  • "application/astra-setting"

version

string

True

Version of the resource. Defined values are:

  • "1.0"

  • "1.1"

id

string

True

Globally unique identifier of the resource. Defined values are:

  • Conforms to the UUIDv4 Schema

name

string

True

JSON string containing a name for the setting, in hierarchal dot notation (.). Defined values are:

  • Minimum length: 1

  • Maximum length: 63

  • This string is internally validated to prevent XSS, Unicode, directory traversal, and SQL-injection attacks. This value is specified by the configmap that is loaded at runtime and cannot be updated by the user.

currentConfig

type_json

True

JSON object containing keys and values that make up the current configuration for this setting. The contents of this object must conform to the JSON Schema contained in the configSchema field. Default values are supplied by the configmap. After defaults are changed by the user, they will not be overwritten.

desiredConfig

type_json

False

JSON object containing keys and values that make up the requested configuration for this setting. The contents of this object must conform to the JSON schema contained in the configSchema field. The object does not exist until specified. When specified, this triggers the feature service to notify the corresponding service to request that the desired configuration can be applied. The corresponding service can then perform validation and apply the desired configuration to the current configuration.

configSchema

type_json_schema

True

JSON object containing the JSON schema for the config property in this resource. Must conform to JSON Schema Draft 7. If config values are present in the resource, validation against the indicated configSchema is mandatory. As a common convention, configurations are recommended to have an "isEnabled" field, when appropriate. The "isEnabled" field contains a value that indicates whether the setting is turned on ("true") or off ("false").

state

string

True

JSON string containing a value indicating the operational state of the application. Defined values are:

  • "valid" - The current configuration matches the desired config.

  • "pending" - The desired configuration is being applied.

  • "error" - The desired configuration cannot be applied.

stateUnready

array[string]

True

JSON array of JSON strings, each indicating a reason why the setting was not successfully applied. Defined values are:

  • Minimum length: 1

  • Maximum length: 127

metadata

type_astra_metadata_update

True

Client and service-specified metadata associated with the resource. Defined values are:

  • Conforms to the Astra Metadata Schema If not specified on update, the metadata object's labels, creationTimestamp and createdBy, will be preserved without modification.

Example response
{
  "type": "application/astra-setting",
  "version": "1.1",
  "id": "ea510866-47d3-5130-8468-563df4cd6a28",
  "name": "astra.account.smtp",
  "currentConfig": {
    "credential": "",
    "isEnabled": "false",
    "port": 587,
    "relayServer": "smtp.sendgrid.net"
  },
  "configSchema": {
    "$schema": "http://json-schema.org/draft-07/schema#",
    "title": "astra.account.smtp",
    "type": "object",
    "properties": {
      "credential": {
        "type": "string",
        "description": "The credential ID for SMTP authentication."
      },
      "isEnabled": {
        "type": "string",
        "description": "This property determines if this setting is enabled or not."
      },
      "port": {
        "type": "integer",
        "description": "The SMTP port. For an unencrypted or a TLS connection, use port 25, 2525, or 587."
      },
      "relayServer": {
        "type": "string",
        "description": "This setting is sometimes referred to as the external SMTP server or the SMTP relay."
      }
    },
    "additionalProperties": false,
    "required": [
      "relayServer",
      "port",
      "isEnabled"
    ]
  },
  "state": "valid",
  "stateUnready": [],
  "metadata": {
    "labels": [],
    "creationTimestamp": "2022-10-06T20:58:16.305662Z",
    "modificationTimestamp": "2022-10-06T20:58:16.305662Z",
    "createdBy": "8f84cf09-8036-51e4-b579-bd30cb07b269"
  }
}

Response

Status: 401, Unauthorized
Name Type Required Description

type

string

True

title

string

True

detail

string

True

status

string

True

correlationID

string

False

Example response
{
  "type": "https://astra.netapp.io/problems/3",
  "title": "Missing bearer token",
  "detail": "The request is missing the required bearer token.",
  "status": "401"
}

Response

Status: 400, Bad request
Name Type Required Description

type

string

True

title

string

True

detail

string

True

status

string

True

correlationID

string

False

invalidParams

array[invalidParams]

False

List of invalid query parameters

Example response
{
  "type": "https://astra.netapp.io/problems/5",
  "title": "Invalid query parameters",
  "detail": "The supplied query parameters are invalid.",
  "status": "400"
}

Response

Status: 403, Forbidden
Name Type Required Description

type

string

True

title

string

True

detail

string

True

status

string

True

correlationID

string

False

Example response
{
  "type": "https://astra.netapp.io/problems/11",
  "title": "Operation not permitted",
  "detail": "The requested operation isn't permitted.",
  "status": "403"
}

Response

Status: 503, Service unavailable
Name Type Required Description

type

string

True

title

string

True

detail

string

True

status

string

True

correlationID

string

False

Example response
{
  "type": "https://astra.netapp.io/problems/41",
  "title": "Service not ready",
  "detail": "Currently, the service can't respond to this request.",
  "status": "503"
}

Error

Status: 404, Not found
Name Type Required Description

type

string

True

title

string

True

detail

string

True

status

string

True

correlationID

string

False

Example error response
{
  "type": "https://astra.netapp.io/problems/2",
  "title": "Collection not found",
  "detail": "The collection specified in the request URI wasn't found.",
  "status": "404"
}

Definitions

See Definitions

type_json

JSON object containing keys and values that make up the current configuration for this setting. The contents of this object must conform to the JSON Schema contained in the configSchema field. Default values are supplied by the configmap. After defaults are changed by the user, they will not be overwritten.

type_json

JSON object containing keys and values that make up the requested configuration for this setting. The contents of this object must conform to the JSON schema contained in the configSchema field. The object does not exist until specified. When specified, this triggers the feature service to notify the corresponding service to request that the desired configuration can be applied. The corresponding service can then perform validation and apply the desired configuration to the current configuration.

properties

type_json_schema

JSON object containing the JSON schema for the config property in this resource. Must conform to JSON Schema Draft 7. If config values are present in the resource, validation against the indicated configSchema is mandatory. As a common convention, configurations are recommended to have an "isEnabled" field, when appropriate. The "isEnabled" field contains a value that indicates whether the setting is turned on ("true") or off ("false").

Name Type Required Description

$schema

string

True

type

string

True

properties

properties

True

additionalProperties

boolean

True

required

array[string]

True

type_astra_label

Name Type Required Description

name

string

True

value

string

True

type_astra_metadata_update

Client and service-specified metadata associated with the resource. Defined values are:

  • Conforms to the Astra Metadata Schema If not specified on update, the metadata object's labels, creationTimestamp and createdBy, will be preserved without modification.

Name Type Required Description

labels

array[type_astra_label]

False

creationTimestamp

string

False

modificationTimestamp

string

False

createdBy

string

False

modifiedBy

string

False

invalidParams

Name Type Required Description

name

string

True

Name of the invalid query parameter

reason

string

True

Reason why the query parameter is invalid