AppConfiguration¶
An AppConfiguration holds the runtime settings of one application in one environment: its id is
yours, <application>_<environment> (for example web-shop_production), and settings is any JSON object up to 256
KB. Every change is a version, and a rollback is a PUT of an earlier one. Apps poll it with If-None-Match: 304
while nothing changed. Not for secrets. See Configuration and feature flags.
JSON Schema ยท ABAC object type AppConfiguration
Example¶
Create one with POST /appconfigurations:
{
"id": "web-shop_production",
"application": "web-shop",
"environment": "production",
"settings": {
"apiBaseUrl": "https://api.example.com",
"pageSize": 20,
"banner": {
"enabled": false
}
}
}
Fields¶
Required: id, application, environment, settings.
| Field | Type | Required | Description |
|---|---|---|---|
at_type |
AppConfiguration |
JSON-LD @type, the object's type name. |
|
at_id |
URL | The object's ObjectsGrid URL, https://apis.objectsgrid.com/<path>/<id>, its JSON-LD @id: what References to it hold. Assigned by ObjectsGrid. |
|
id |
string | Yes | The AppConfiguration's id, chosen by you |
identifier |
string | The object's id, as Schema.org identifier. Assigned by ObjectsGrid. |
|
url |
URL | The object's own URL, https://apis.objectsgrid.com/<path>/<id>. Assigned by ObjectsGrid. |
|
application |
string | Yes | The application's name, e.g. web-shop |
environment |
string | Yes | The application's environment, e.g. development, staging, production: yours, not ObjectsGrid's TEST and PROD |
description |
string | What the configuration is for | |
settings |
object | Yes | The settings, any JSON object. Not for secrets: it is stored as sent, returned to every caller the policy lets read it, and reaches search and webhooks; keep keys and passwords in a secret store and point to them. At most 256 KB. Stored and returned, not searchable. |
tags |
list of Tag | Tags your ABAC policy decides on. Created empty when not sent, kept by a PUT that leaves them out, cleared by null or []. |
|
meta |
ObjectMeta | Read-only metadata: version, type, creation and last update. |
REST API¶
Base URL https://apis.objectsgrid.com. Every request sends the X-ObjectsGrid-AccessPoint and Authorization: Bearer <access token> headers; see the REST API guide.
| Operation | Request |
|---|---|
| Create | POST /appconfigurations |
| List and search | GET /appconfigurations |
| Create up to 100 at once | POST /appconfigurations/batch |
| Retrieve | GET /appconfigurations/{id} |
| Replace | PUT /appconfigurations/{id} |
| Update some fields | PATCH /appconfigurations/{id} |
| Delete | DELETE /appconfigurations/{id} |
AppConfiguration objects have no JSON-LD document: asked for one (Accept: application/ld+json), GET answers 406.
The OpenAPI contract, with every parameter and response: AppConfigurations (JSON).
GraphQL¶
Endpoint POST https://apis.objectsgrid.com/graphql; see the GraphQL guide.
| Operation | Field |
|---|---|
| Query | appConfiguration(id: ID!, version: String): AppConfiguration |
| Query | appConfigurations(where: AppConfigurationWhereInput, orderBy: [AppConfigurationOrderByInput!], first: Int, after: String): AppConfigurationConnection! |
| Query | appConfigurationsGroupBy(by: [AppConfigurationGroupByField!]!, where: AppConfigurationWhereInput, having: AppConfigurationHavingInput, orderBy: [AppConfigurationGroupByOrderByInput!], first: Int, after: String): AppConfigurationGroupByConnection! |
| Mutation | createAppConfiguration(input: CreateAppConfigurationInput!): AppConfiguration! |
| Mutation | updateAppConfiguration(input: UpdateAppConfigurationInput!, expectedVersion: String): AppConfiguration! |
| Mutation | deleteAppConfiguration(id: ID!, expectedVersion: String): Boolean! |
Webhook events¶
Subscribe to these events in your webhook configuration to be called when an AppConfiguration changes:
AppConfigurationCreated, AppConfigurationUpdated, AppConfigurationPatched, AppConfigurationDeleted.