ServicesLocationsHTTP APIUnknown

Create_version

POST
/api/locations/{location_id}/versions

Create or recover an immutable successor. Use the same caller-allocated version UUIDv7 when retrying.

Authorization

bearerAuth
headerAuthorizationBearer <token>

Path Parameters

location_id*string
Formatuuid

Request Body

application/json
  1. body
baseVersionId*string
Formatuuid
change*|
versionId*string
Formatuuid

Response Body

Success

application/json
  1. response
version*
curl -X POST 'https://api.spiraldb.dev/api/locations/497f6eca-6276-4993-bfeb-53cbbbba6f08/versions' \  -H 'Content-Type: application/json' \  -d '{  "baseVersionId": "238d56e0-9ec7-4ebf-bfb2-e487b4bc769c",  "change": {    "refresh": {      "changes": "string"    },    "type": "refresh"  },  "versionId": "14707576-2549-4848-82ed-f68f8a1b47c7"}'
{  "version": {    "createdAtMicros": "string",    "definition": {      "backing": {        "connectionId": "84b500d7-71c8-4b1f-adf4-f1eb0000973d",        "uri": "string"      },      "inventory": {        "resourceId": "026d60bb-63a8-407e-bf67-01dcfc6022e6"      }    },    "locationId": "1a5515a3-ba81-4a42-aee7-ad9ffc090a54",    "parentVersionId": "abf80970-9686-419e-bc00-5ddcccc33ba6",    "refresh": {      "changes": "string"    },    "versionId": "14707576-2549-4848-82ed-f68f8a1b47c7"  }}