Back to Docs

Autoliv_Safety REST API (0.0.1)

Download OpenAPI specification:

REST API Documentation for the Autoliv Safety Platform REST API

Event

Abort scheduled notification

Abort a notification that is in grace period The notification will be aborted and the grace period timer will be stopped.

Authorizations:
Autoliv_Safety-OpenIDC
path Parameters
eventId
required
string <UUID>

Event id

Responses

Add event notification

Add event notification with grace period timer. For DEPLOY event: The notification will be scheduled with a grace period timer and will be sent after the grace period to emergency contacts. For non-DEPLOY events: The notification will be added to the database without a grace period timer.

Authorizations:
Autoliv_Safety-OpenIDC
Request Body schema: application/json
required
eventId
required
string (Eventid)
eventType
required
string (EventType)
Enum: "DEPLOY" "NEAR_DEPLOY" "NEAR_OTHER_EVENT" "OTHER_EVENT"

Enumeration of possible event types for crash notifications.

GeoLocation (object) or (string or null)
Default: null

Responses

Request samples

Content type
application/json
{
  • "eventId": "string",
  • "eventType": "DEPLOY",
  • "geoLocation": null
}

Response samples

Content type
application/json
{
  • "gracePeriodStartedSuccess": true,
  • "gracePeriodStatus": "Started",
  • "gracePeriodStartTimeUnix": 0,
  • "gracePeriodDuration": 0
}

Add event information

Add the event(EDR event) information in blob

Authorizations:
Autoliv_Safety-OpenIDC
path Parameters
eventId
required
string <UUID>

Event id

Request Body schema: application/octet-stream
required
string <binary>

The event data binary information

Responses

Get all events

Get all events

Authorizations:
Autoliv_Safety-OpenIDC

Responses

Get SAS token for blob download

Generate a SAS token for downloading a blob with 1 hour expiry

Authorizations:
Autoliv_Safety-OpenIDC
Request Body schema: application/json
required
blobPath
required
string (Blobpath)

Path to the blob in storage

Responses

Request samples

Content type
application/json
{
  • "blobPath": "string"
}

Response samples

Content type
application/json
{
  • "sasToken": "string",
  • "expiresAt": "2019-08-24T14:15:22Z"
}

Get notification status

Get status of a notification

Authorizations:
Autoliv_Safety-OpenIDC
path Parameters
eventId
required
string <UUID>

Event id

Responses

Test SMS sending

Test endpoint to send a single SMS message directly.

Authorizations:
Autoliv_Safety-OpenIDC
Request Body schema: application/json
required
phoneNumber
required
string (Phonenumber)

Phone number to send SMS to

name
required
string (Name)

Name of the recipient

message
required
string (Message)

Message to send

Responses

Request samples

Content type
application/json
{
  • "phoneNumber": "string",
  • "name": "string",
  • "message": "string"
}

Add event notification (v2)

Add event notification with grace period timer. For DEPLOY event: The notification will be scheduled with a grace period timer and will be sent after the grace period to emergency contacts. For non-DEPLOY events: The notification will be added to the database without a grace period timer.

Authorizations:
Autoliv_Safety-OpenIDC
Request Body schema: application/json
required
eventId
required
string (Eventid)
eventType
required
string (EventType)
Enum: "DEPLOY" "NEAR_DEPLOY" "NEAR_OTHER_EVENT" "OTHER_EVENT"

Enumeration of possible event types for crash notifications.

GeoLocation (object) or (string or null)
Default: null

Responses

Request samples

Content type
application/json
{
  • "eventId": "string",
  • "eventType": "DEPLOY",
  • "geoLocation": null
}

Response samples

Content type
application/json
{
  • "gracePeriodStatus": "Started",
  • "gracePeriodStartTimeUnix": 0,
  • "gracePeriodDuration": 0
}

Authentication

Login with Google or Apple ID token

Authenticates a user with Google or Apple ID token and returns Autoliv access and refresh tokens.

Note: This endpoint does not require authentication. This endpoint also validates token signatures.

Request Body schema: application/json
required
id_token
required
string (Id Token)
provider
required
string (Provider)

Responses

Request samples

Content type
application/json
{
  • "id_token": "string",
  • "provider": "string"
}

Response samples

Content type
application/json
{
  • "access_token": "string",
  • "refresh_token": "string",
  • "token_type": "Bearer",
  • "expires_in": 0,
  • "organization_name": null
}

Refresh access token

Uses a refresh token to generate a new access token. The refresh token is single-use and will be invalidated after use.

Request Body schema: application/json
required
refresh_token
required
string (Refresh Token)

Responses

Request samples

Content type
application/json
{
  • "refresh_token": "string"
}

Response samples

Content type
application/json
{
  • "access_token": "string",
  • "refresh_token": "string",
  • "token_type": "Bearer",
  • "expires_in": 0
}

FotaService

Get FOTA update information

Get the FOTA update information for a device

Authorizations:
Autoliv_Safety-OpenIDC
path Parameters
deviceId
required
string

Device ID

query Parameters
firmwareVersion
string

Firmware version of the ECU

Responses

Response samples

Content type
application/json
{
  • "nextVersion": null,
  • "isUpdateAvailable": true,
  • "description": null
}

Delete firmware version

Delete a firmware version and its associated file from database and blob storage

Authorizations:
Autoliv_Safety-OpenIDC
query Parameters
version
string

Firmware version to delete

Responses

Response samples

Content type
application/json
{
  • "version": "string",
  • "message": "string"
}

Get FOTA update

Get the FOTA update for a device

Authorizations:
Autoliv_Safety-OpenIDC
path Parameters
deviceId
required
string

Device ID

query Parameters
firmwareVersion
string

Firmware version of the ECU

Responses

Get all firmware versions

Get a list of all available firmware versions

Authorizations:
Autoliv_Safety-OpenIDC

Responses

Response samples

Content type
application/json
{
  • "firmwareVersions": [
    ]
}

Upload firmware file

Upload a firmware file and store metadata in database

Authorizations:
Autoliv_Safety-OpenIDC
query Parameters
version
string

Firmware version

releaseDate
string <DateTime>

Release date of the firmware

description
string

Description of the firmware

requiredVersionIdentifier
integer

Required version ID to upgrade from (optional)

Request Body schema: application/octet-stream
required
string <binary>

The firmware file binary data

Responses

Response samples

Content type
application/json
{
  • "id": 0,
  • "version": "string",
  • "releaseDate": "2019-08-24T14:15:22Z",
  • "filePath": "string",
  • "description": "string",
  • "requiredVersionIdentifier": null,
  • "uploadedBy": "string",
  • "createdAt": "2019-08-24T14:15:22Z",
  • "message": "string"
}

Device

Get device information

Get information of a specific device

Authorizations:
Autoliv_Safety-OpenIDC
path Parameters
deviceId
required
string

Device id

Responses

Response samples

Content type
application/json
{
  • "success": true,
  • "message": "string",
  • "data": null
}

Update or create device information

Updates device information and assigns it to current user or creates new device if it doesn't exist

Authorizations:
Autoliv_Safety-OpenIDC
path Parameters
deviceId
required
string

Device id

Request Body schema: application/json
required
numberOfInflations
required
integer (Numberofinflations)
numberOfMaxInflations
required
integer (Numberofmaxinflations)
productActivationState
required
string (ProductActivationState)
Enum: "active" "inactive"

Enumeration of possible product activation states

minutesOfUsage
required
integer (Minutesofusage)
deployedState
required
string (DeployedState)
Enum: "deployed" "not_deployed"

Enumeration of possible deployed states for the device

firmwareVersion
required
string (Firmwareversion)

Responses

Request samples

Content type
application/json
{
  • "numberOfInflations": 0,
  • "numberOfMaxInflations": 0,
  • "productActivationState": "active",
  • "minutesOfUsage": 0,
  • "deployedState": "deployed",
  • "firmwareVersion": "string"
}

Response samples

Content type
application/json
{
  • "success": true,
  • "message": "string",
  • "data": null
}

List all devices

Retrieves a list of all devices in the system

Authorizations:
Autoliv_Safety-OpenIDC

Responses

Response samples

Content type
application/json
{
  • "devices": [
    ],
  • "count": 0
}

Add inflator to device

Associates an inflator with the current user's device

Authorizations:
Autoliv_Safety-OpenIDC
Request Body schema: application/json
required
inflatorId
required
string (Inflatorid)

Responses

Request samples

Content type
application/json
{
  • "inflatorId": "string"
}

Response samples

Content type
application/json
{
  • "message": "string"
}

Get inflator validation information

Validates inflator ID format and checks if it exists in the database

Authorizations:
Autoliv_Safety-OpenIDC
path Parameters
inflatorId
required
string

Inflator ID to validate

Responses

Response samples

Content type
application/json
{
  • "isValid": true,
  • "isUsed": "true"
}

UserSettings

Delete User's emergency contacts

delete the information of a user's ICE contact information.

Authorizations:
Autoliv_Safety-OpenIDC
path Parameters
contactIds
required
string

The contact ids

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Get User's emergency contacts

Gets the information of a user's ICE contact details.

Authorizations:
Autoliv_Safety-OpenIDC

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Add User's emergency contacts.

Add the information of a user's ICE (In Case of Emergency) contact information. Users can have up to 3 emergency contacts.

Authorizations:
Autoliv_Safety-OpenIDC
Request Body schema: application/json
required
Array
contactName
required
string (Contactname)
phoneNumber
required
string (Phonenumber)
Preferredlanguage (string) or (Preferredlanguage (string or null)) (Preferredlanguage)
Default: null

Responses

Request samples

Content type
application/json
[
  • {
    }
]

Response samples

Content type
application/json
[
  • {
    }
]

Comments

Create a portal comment

Creates an internal portal comment for a user, event, device, or firmware version. Any authenticated portal user can create comments. To create a reply, include the parent comment id in the request.

Authorizations:
Autoliv_Safety-OpenIDC
Request Body schema: application/json
required
targetType
required
string (CommentTargetType)
Enum: "User" "Event" "Device" "FirmwareVersion"

Allowed comment target types.

targetId
required
string (Targetid) [ 1 .. 100 ] characters
Parentcommentid (string) or (Parentcommentid (string or null)) (Parentcommentid)
Default: null
body
required
string (Body) non-empty

Responses

Request samples

Content type
application/json
{
  • "targetType": "User",
  • "targetId": "string",
  • "parentCommentId": null,
  • "body": "string"
}

Response samples

Content type
application/json
{
  • "commentId": "ee0469af-2fa1-4b7e-b5f1-8e711a95821b",
  • "targetType": "User",
  • "targetId": "string",
  • "parentCommentId": null,
  • "authorId": "string",
  • "authorName": "string",
  • "body": null,
  • "createdAt": "2019-08-24T14:15:22Z",
  • "updatedAt": null,
  • "deletedAt": null
}

Update a portal comment

Updates the body of an active portal comment. SafetyPortal.Admin users can update any comment. Other portal users can only update their own comments.

Authorizations:
Autoliv_Safety-OpenIDC
path Parameters
commentId
required
string

Comment id.

Request Body schema: application/json
required
body
required
string (Body) non-empty

Responses

Request samples

Content type
application/json
{
  • "body": "string"
}

Response samples

Content type
application/json
{
  • "commentId": "ee0469af-2fa1-4b7e-b5f1-8e711a95821b",
  • "targetType": "User",
  • "targetId": "string",
  • "parentCommentId": null,
  • "authorId": "string",
  • "authorName": "string",
  • "body": null,
  • "createdAt": "2019-08-24T14:15:22Z",
  • "updatedAt": null,
  • "deletedAt": null
}

Delete a portal comment

Soft deletes an active portal comment. SafetyPortal.Admin users can delete any comment. Other portal users can only delete their own comments.

Authorizations:
Autoliv_Safety-OpenIDC
path Parameters
commentId
required
string

Comment id.

Responses

Get portal comments for a target

Retrieves active portal comments for a target item ordered by creation time. Valid target types are User, Event, Device, and FirmwareVersion.

Authorizations:
Autoliv_Safety-OpenIDC
path Parameters
targetType
required
string

Comment target type.

targetId
required
string

Comment target identifier.

Responses

Response samples

Content type
application/json
{
  • "comments": [
    ],
  • "count": 0
}

User

Get All Users

Retrieves all users in the system. This is an administrative endpoint that requires authentication from the PTW Admin Portal. Only tokens issued by the configured PTWAdminPortalIssuer are allowed.

Authorizations:
Autoliv_Safety-OpenIDC

Responses

Response samples

Content type
application/json
{
  • "users": [
    ],
  • "count": 0
}

Create User profile

Creates a new user and associates it with the provided id.

Authorizations:
Autoliv_Safety-OpenIDC
Request Body schema: application/json
required
Name (string) or (Name (string or null)) (Name)
Default: null
Email (string) or (Email (string or null)) (Email)
Default: null

Responses

Request samples

Content type
application/json
{
  • "name": null,
  • "email": null
}

Response samples

Content type
application/json
{
  • "name": null,
  • "email": null,
  • "userId": "2c4a230c-5085-4924-a3e1-25fb4fc5965b",
  • "provider": "string"
}

Get User me

Gets the information of a user the token.

Authorizations:
Autoliv_Safety-OpenIDC

Responses

Response samples

Content type
application/json
{
  • "name": null,
  • "email": null,
  • "userId": "2c4a230c-5085-4924-a3e1-25fb4fc5965b",
  • "provider": "string"
}

Delete User Me

Disassociates the user account from a user token.

Authorizations:
Autoliv_Safety-OpenIDC

Responses