Authoring
Apply a transaction
POST
/
api
/
v1
/
drafts
/
{id}
/
transactions
Apply a transaction
curl --request POST \
--url https://dev.simforge.ai/api/v1/drafts/{id}/transactions \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"expectedVersion": 4503599627370495,
"expectedDigest": "<string>",
"operations": [
{
"type": "addActor",
"id": "<string>",
"catalogId": "<string>",
"laneRsl": "<string>",
"s": 1,
"movementRsl": "<string>",
"beforeM": 250.5,
"x": 123,
"z": 123,
"y": 123,
"headingRad": 123,
"lateralM": 123,
"overlapOverride": false,
"opposing": false,
"static": false,
"speedKph": 80,
"bodyColor": "<string>",
"label": "<string>"
}
],
"label": "CLI authoring transaction"
}
'import requests
url = "https://dev.simforge.ai/api/v1/drafts/{id}/transactions"
payload = {
"expectedVersion": 4503599627370495,
"expectedDigest": "<string>",
"operations": [
{
"type": "addActor",
"id": "<string>",
"catalogId": "<string>",
"laneRsl": "<string>",
"s": 1,
"movementRsl": "<string>",
"beforeM": 250.5,
"x": 123,
"z": 123,
"y": 123,
"headingRad": 123,
"lateralM": 123,
"overlapOverride": False,
"opposing": False,
"static": False,
"speedKph": 80,
"bodyColor": "<string>",
"label": "<string>"
}
],
"label": "CLI authoring transaction"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
expectedVersion: 4503599627370495,
expectedDigest: '<string>',
operations: [
{
type: 'addActor',
id: '<string>',
catalogId: '<string>',
laneRsl: '<string>',
s: 1,
movementRsl: '<string>',
beforeM: 250.5,
x: 123,
z: 123,
y: 123,
headingRad: 123,
lateralM: 123,
overlapOverride: false,
opposing: false,
static: false,
speedKph: 80,
bodyColor: '<string>',
label: '<string>'
}
],
label: 'CLI authoring transaction'
})
};
fetch('https://dev.simforge.ai/api/v1/drafts/{id}/transactions', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"document": {},
"version": 2,
"digest": "<string>",
"changedPaths": [
"<string>"
],
"entityIds": [
"<string>"
],
"diagnostics": [
{
"code": "<string>",
"severity": "error",
"path": "<string>",
"message": "<string>",
"actorId": "<string>"
}
],
"inverseDocument": {},
"documentId": "<string>",
"workspaceId": "<string>",
"datasetId": "<string>",
"draftVersion": 4503599627370495,
"contentDigest": "<string>",
"operationDigest": "<string>",
"content": {},
"mapPin": {
"versionId": "<string>",
"mapId": "<string>",
"xodrSha256": "<string>",
"closureSha256": "<string>",
"assetCatalogVersionId": "<string>",
"assetCatalogSha256": "<string>",
"releaseDigest": "<string>"
},
"actorPins": [
{
"actorId": "<string>",
"catalogId": "<string>",
"class": "<string>",
"catalogueDigest": "<string>"
}
],
"recordingPins": [
{
"id": "<string>",
"sha256": "<string>"
}
],
"provisional": true,
"scene": {
"ego": {},
"actors": [
{}
]
},
"warnings": [
{
"code": "<string>",
"message": "<string>",
"subject": "<string>",
"detail": {}
}
],
"upgradedFrom": {
"scenarioVersion": 123,
"contentDigest": "<string>"
}
}{
"error": {
"code": "bad_request",
"reason": "<string>",
"retryable": true,
"requestId": "<string>",
"hint": "<string>",
"param": "<string>",
"detail": "<unknown>",
"path": "<string>"
}
}{
"error": {
"code": "bad_request",
"reason": "<string>",
"retryable": true,
"requestId": "<string>",
"hint": "<string>",
"param": "<string>",
"detail": "<unknown>",
"path": "<string>"
}
}{
"error": {
"code": "bad_request",
"reason": "<string>",
"retryable": true,
"requestId": "<string>",
"hint": "<string>",
"param": "<string>",
"detail": "<unknown>",
"path": "<string>"
}
}{
"error": {
"code": "bad_request",
"reason": "<string>",
"retryable": true,
"requestId": "<string>",
"hint": "<string>",
"param": "<string>",
"detail": "<unknown>",
"path": "<string>"
}
}{
"error": {
"code": "bad_request",
"reason": "<string>",
"retryable": true,
"requestId": "<string>",
"hint": "<string>",
"param": "<string>",
"detail": "<unknown>",
"path": "<string>"
}
}{
"error": {
"code": "bad_request",
"reason": "<string>",
"retryable": true,
"requestId": "<string>",
"hint": "<string>",
"param": "<string>",
"detail": "<unknown>",
"path": "<string>"
}
}Authorizations
A sfc_at_… access token from simforge login, or an sfk_… API key. An operation's security lists the scopes the credential must hold.
Path Parameters
Body
application/json
Required range:
0 <= x <= 9007199254740991Pattern:
^[a-f0-9]{64}$Required array length:
1 - 128 elements- Option 1
- Option 2
- Option 3
- Option 4
- Option 5
- Option 6
- Option 7
- Option 8
- Option 9
- Option 10
- Option 11
- Option 12
- Option 13
- Option 14
- Option 15
- Option 16
- Option 17
- Option 18
- Option 19
- Option 20
- Option 21
- Option 22
- Option 23
Show child attributes
Show child attributes
Required string length:
1 - 256Response
Atomic authoring result; save returns an immutable revision.
Required range:
x >= 1Pattern:
^[0-9a-f]{64}$Show child attributes
Show child attributes
Required string length:
1 - 256Required string length:
1 - 256Required string length:
1 - 256Required range:
0 <= x <= 9007199254740991Pattern:
^[a-f0-9]{64}$Pattern:
^[a-f0-9]{64}$Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Where every actor is relative to the ego: lane, metres ahead along the ego's route, lateral offset, when the ego reaches it, its events and any encounter expectation. Absent without an ego or a map.
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
⌘I
Apply a transaction
curl --request POST \
--url https://dev.simforge.ai/api/v1/drafts/{id}/transactions \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"expectedVersion": 4503599627370495,
"expectedDigest": "<string>",
"operations": [
{
"type": "addActor",
"id": "<string>",
"catalogId": "<string>",
"laneRsl": "<string>",
"s": 1,
"movementRsl": "<string>",
"beforeM": 250.5,
"x": 123,
"z": 123,
"y": 123,
"headingRad": 123,
"lateralM": 123,
"overlapOverride": false,
"opposing": false,
"static": false,
"speedKph": 80,
"bodyColor": "<string>",
"label": "<string>"
}
],
"label": "CLI authoring transaction"
}
'import requests
url = "https://dev.simforge.ai/api/v1/drafts/{id}/transactions"
payload = {
"expectedVersion": 4503599627370495,
"expectedDigest": "<string>",
"operations": [
{
"type": "addActor",
"id": "<string>",
"catalogId": "<string>",
"laneRsl": "<string>",
"s": 1,
"movementRsl": "<string>",
"beforeM": 250.5,
"x": 123,
"z": 123,
"y": 123,
"headingRad": 123,
"lateralM": 123,
"overlapOverride": False,
"opposing": False,
"static": False,
"speedKph": 80,
"bodyColor": "<string>",
"label": "<string>"
}
],
"label": "CLI authoring transaction"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
expectedVersion: 4503599627370495,
expectedDigest: '<string>',
operations: [
{
type: 'addActor',
id: '<string>',
catalogId: '<string>',
laneRsl: '<string>',
s: 1,
movementRsl: '<string>',
beforeM: 250.5,
x: 123,
z: 123,
y: 123,
headingRad: 123,
lateralM: 123,
overlapOverride: false,
opposing: false,
static: false,
speedKph: 80,
bodyColor: '<string>',
label: '<string>'
}
],
label: 'CLI authoring transaction'
})
};
fetch('https://dev.simforge.ai/api/v1/drafts/{id}/transactions', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"document": {},
"version": 2,
"digest": "<string>",
"changedPaths": [
"<string>"
],
"entityIds": [
"<string>"
],
"diagnostics": [
{
"code": "<string>",
"severity": "error",
"path": "<string>",
"message": "<string>",
"actorId": "<string>"
}
],
"inverseDocument": {},
"documentId": "<string>",
"workspaceId": "<string>",
"datasetId": "<string>",
"draftVersion": 4503599627370495,
"contentDigest": "<string>",
"operationDigest": "<string>",
"content": {},
"mapPin": {
"versionId": "<string>",
"mapId": "<string>",
"xodrSha256": "<string>",
"closureSha256": "<string>",
"assetCatalogVersionId": "<string>",
"assetCatalogSha256": "<string>",
"releaseDigest": "<string>"
},
"actorPins": [
{
"actorId": "<string>",
"catalogId": "<string>",
"class": "<string>",
"catalogueDigest": "<string>"
}
],
"recordingPins": [
{
"id": "<string>",
"sha256": "<string>"
}
],
"provisional": true,
"scene": {
"ego": {},
"actors": [
{}
]
},
"warnings": [
{
"code": "<string>",
"message": "<string>",
"subject": "<string>",
"detail": {}
}
],
"upgradedFrom": {
"scenarioVersion": 123,
"contentDigest": "<string>"
}
}{
"error": {
"code": "bad_request",
"reason": "<string>",
"retryable": true,
"requestId": "<string>",
"hint": "<string>",
"param": "<string>",
"detail": "<unknown>",
"path": "<string>"
}
}{
"error": {
"code": "bad_request",
"reason": "<string>",
"retryable": true,
"requestId": "<string>",
"hint": "<string>",
"param": "<string>",
"detail": "<unknown>",
"path": "<string>"
}
}{
"error": {
"code": "bad_request",
"reason": "<string>",
"retryable": true,
"requestId": "<string>",
"hint": "<string>",
"param": "<string>",
"detail": "<unknown>",
"path": "<string>"
}
}{
"error": {
"code": "bad_request",
"reason": "<string>",
"retryable": true,
"requestId": "<string>",
"hint": "<string>",
"param": "<string>",
"detail": "<unknown>",
"path": "<string>"
}
}{
"error": {
"code": "bad_request",
"reason": "<string>",
"retryable": true,
"requestId": "<string>",
"hint": "<string>",
"param": "<string>",
"detail": "<unknown>",
"path": "<string>"
}
}{
"error": {
"code": "bad_request",
"reason": "<string>",
"retryable": true,
"requestId": "<string>",
"hint": "<string>",
"param": "<string>",
"detail": "<unknown>",
"path": "<string>"
}
}