oCoreoCore Docs
API Reference

Topologies

List topologies

Returns all topologies for the organization.

GET
/topologies

Authorization

Authorization<token>

JWT Bearer token (format: Bearer {token})

In: header

curl -X GET "//api.ocore.dev/api/topologies" \
  -H "Authorization: <token>"

OK

{
  "items": [
    {
      "createdAt": "string",
      "description": "string",
      "haConfig": {
        "createdAt": "string",
        "filestoreConfig": {
          "property1": "string",
          "property2": "string"
        },
        "filestoreType": "string",
        "id": "string",
        "lbServerId": "string",
        "lbType": "string",
        "pgFailoverConfig": {
          "property1": "string",
          "property2": "string"
        },
        "pgFailoverEnabled": true,
        "redisConfig": {
          "property1": "string",
          "property2": "string"
        },
        "redisEnabled": true,
        "redisServerId": "string",
        "topologyId": "string",
        "updatedAt": "string"
      },
      "id": "string",
      "name": "string",
      "organizationId": "string",
      "status": "string",
      "topologyData": {},
      "updatedAt": "string"
    }
  ],
  "total": 0
}

Create topology

Creates a new infrastructure topology for the organization.

POST
/topologies

Authorization

Authorization<token>

JWT Bearer token (format: Bearer {token})

In: header

Request Body

application/jsonRequired

Topology creation request

descriptionstring
namestring
topologyDataobject
curl -X POST "//api.ocore.dev/api/topologies" \
  -H "Authorization: <token>" \
  -H "Content-Type: application/json" \
  -d '{
    "description": "string",
    "name": "string",
    "topologyData": {}
  }'

Created

{
  "createdAt": "string",
  "description": "string",
  "haConfig": {
    "createdAt": "string",
    "filestoreConfig": {
      "property1": "string",
      "property2": "string"
    },
    "filestoreType": "string",
    "id": "string",
    "lbServerId": "string",
    "lbType": "string",
    "pgFailoverConfig": {
      "property1": "string",
      "property2": "string"
    },
    "pgFailoverEnabled": true,
    "redisConfig": {
      "property1": "string",
      "property2": "string"
    },
    "redisEnabled": true,
    "redisServerId": "string",
    "topologyId": "string",
    "updatedAt": "string"
  },
  "id": "string",
  "name": "string",
  "organizationId": "string",
  "status": "string",
  "topologyData": {},
  "updatedAt": "string"
}

Get topology

Returns a single topology with its HA configuration.

GET
/topologies/{id}

Authorization

Authorization<token>

JWT Bearer token (format: Bearer {token})

In: header

Path Parameters

idRequiredstring

Topology ID

curl -X GET "//api.ocore.dev/api/topologies/<string>" \
  -H "Authorization: <token>"

OK

{
  "createdAt": "string",
  "description": "string",
  "haConfig": {
    "createdAt": "string",
    "filestoreConfig": {
      "property1": "string",
      "property2": "string"
    },
    "filestoreType": "string",
    "id": "string",
    "lbServerId": "string",
    "lbType": "string",
    "pgFailoverConfig": {
      "property1": "string",
      "property2": "string"
    },
    "pgFailoverEnabled": true,
    "redisConfig": {
      "property1": "string",
      "property2": "string"
    },
    "redisEnabled": true,
    "redisServerId": "string",
    "topologyId": "string",
    "updatedAt": "string"
  },
  "id": "string",
  "name": "string",
  "organizationId": "string",
  "status": "string",
  "topologyData": {},
  "updatedAt": "string"
}

Delete topology

Deletes a draft or errored topology.

DELETE
/topologies/{id}

Authorization

Authorization<token>

JWT Bearer token (format: Bearer {token})

In: header

Path Parameters

idRequiredstring

Topology ID

curl -X DELETE "//api.ocore.dev/api/topologies/<string>" \
  -H "Authorization: <token>"

No Content

Update topology

Updates a topology name, description, or data.

PUT
/topologies/{id}

Authorization

Authorization<token>

JWT Bearer token (format: Bearer {token})

In: header

Request Body

application/jsonRequired

Topology update request

descriptionstring
namestring
topologyDataobject

Path Parameters

idRequiredstring

Topology ID

curl -X PUT "//api.ocore.dev/api/topologies/<string>" \
  -H "Authorization: <token>" \
  -H "Content-Type: application/json" \
  -d '{
    "description": "string",
    "name": "string",
    "topologyData": {}
  }'

OK

{
  "createdAt": "string",
  "description": "string",
  "haConfig": {
    "createdAt": "string",
    "filestoreConfig": {
      "property1": "string",
      "property2": "string"
    },
    "filestoreType": "string",
    "id": "string",
    "lbServerId": "string",
    "lbType": "string",
    "pgFailoverConfig": {
      "property1": "string",
      "property2": "string"
    },
    "pgFailoverEnabled": true,
    "redisConfig": {
      "property1": "string",
      "property2": "string"
    },
    "redisEnabled": true,
    "redisServerId": "string",
    "topologyId": "string",
    "updatedAt": "string"
  },
  "id": "string",
  "name": "string",
  "organizationId": "string",
  "status": "string",
  "topologyData": {},
  "updatedAt": "string"
}

Deploy topology

Enqueues HA deployment jobs for a topology (HAProxy, Redis, repmgr).

POST
/topologies/{id}/deploy

Authorization

Authorization<token>

JWT Bearer token (format: Bearer {token})

In: header

Path Parameters

idRequiredstring

Topology ID

curl -X POST "//api.ocore.dev/api/topologies/<string>/deploy" \
  -H "Authorization: <token>"

Accepted

{
  "jobsEnqueued": 0,
  "message": "string",
  "status": "string"
}

Get HA configuration

Returns the high-availability configuration for a topology.

GET
/topologies/{id}/ha-config

Authorization

Authorization<token>

JWT Bearer token (format: Bearer {token})

In: header

Path Parameters

idRequiredstring

Topology ID

curl -X GET "//api.ocore.dev/api/topologies/<string>/ha-config" \
  -H "Authorization: <token>"

OK

{
  "createdAt": "string",
  "filestoreConfig": {
    "property1": "string",
    "property2": "string"
  },
  "filestoreType": "string",
  "id": "string",
  "lbServerId": "string",
  "lbType": "string",
  "pgFailoverConfig": {
    "property1": "string",
    "property2": "string"
  },
  "pgFailoverEnabled": true,
  "redisConfig": {
    "property1": "string",
    "property2": "string"
  },
  "redisEnabled": true,
  "redisServerId": "string",
  "topologyId": "string",
  "updatedAt": "string"
}

Update HA configuration

Updates the high-availability configuration for a topology.

PUT
/topologies/{id}/ha-config

Authorization

Authorization<token>

JWT Bearer token (format: Bearer {token})

In: header

Request Body

application/jsonRequired

HA config update

filestoreConfigobject
filestoreTypestring
lbServerIdstring
lbTypestring
pgFailoverConfigobject
pgFailoverEnabledboolean
redisConfigobject
redisEnabledboolean
redisServerIdstring

Path Parameters

idRequiredstring

Topology ID

curl -X PUT "//api.ocore.dev/api/topologies/<string>/ha-config" \
  -H "Authorization: <token>" \
  -H "Content-Type: application/json" \
  -d '{
    "filestoreConfig": {
      "property1": "string",
      "property2": "string"
    },
    "filestoreType": "string",
    "lbServerId": "string",
    "lbType": "string",
    "pgFailoverConfig": {
      "property1": "string",
      "property2": "string"
    },
    "pgFailoverEnabled": true,
    "redisConfig": {
      "property1": "string",
      "property2": "string"
    },
    "redisEnabled": true,
    "redisServerId": "string"
  }'

OK

{
  "createdAt": "string",
  "filestoreConfig": {
    "property1": "string",
    "property2": "string"
  },
  "filestoreType": "string",
  "id": "string",
  "lbServerId": "string",
  "lbType": "string",
  "pgFailoverConfig": {
    "property1": "string",
    "property2": "string"
  },
  "pgFailoverEnabled": true,
  "redisConfig": {
    "property1": "string",
    "property2": "string"
  },
  "redisEnabled": true,
  "redisServerId": "string",
  "topologyId": "string",
  "updatedAt": "string"
}

Get node status

Checks the live status of a specific node in the topology.

POST
/topologies/{id}/nodes/{nodeId}/status

Authorization

Authorization<token>

JWT Bearer token (format: Bearer {token})

In: header

Path Parameters

idRequiredstring

Topology ID

nodeIdRequiredstring

Node ID

curl -X POST "//api.ocore.dev/api/topologies/<string>/nodes/<string>/status" \
  -H "Authorization: <token>"

OK

{
  "nodeId": "string",
  "role": "string",
  "status": "string"
}

Validate topology

Validates the topology against infrastructure constraints.

POST
/topologies/{id}/validate

Authorization

Authorization<token>

JWT Bearer token (format: Bearer {token})

In: header

Path Parameters

idRequiredstring

Topology ID

curl -X POST "//api.ocore.dev/api/topologies/<string>/validate" \
  -H "Authorization: <token>"

OK

{
  "issues": [
    "string"
  ],
  "valid": true
}

Was this page helpful?