fbpx
POSThttps://api.spotinst.io/functions/environment/{ENVIRONMENT_ID}/userDocument?accountId={ACCOUNT_ID}

Create a new key value pair to be stored in your environment

URL Parameters

Parameter Type Description
ENVIRONMENT_ID * String

Spotinst Function environment ID

Example: env-12345
ACCOUNT_ID String

Account ID from Spotinst console

Example: acr-12345
Request

Headers
{
  "Content-Type": "application/json",
  "Authorization": "Bearer ${token}"
}
Body
Copied!
Downloaded!
{
  "userDocument" : {
    "key" : "string",
    "value": "string"
  }
}

Body Attributes


  • userDocument.key * String
    Key that matches to your value in the Document store
  • userDocument.vlaue * String
    Value that will be stored
Response - 200

Headers
{
  "Content-Type": "application/json"
}
Body
Copied!
Downloaded!
{
  "status": {
    "code": 200,
    "message": "OK"
  },
  "count": "1",
  "items": [
    {
      "key" : "string",
      "environmentId": "string",
      "createdAt": "Date",
      "updatedAt": "Date"
    }
  ]
}