Automile ResourceOwnerUserDevice API
The ResourceOwnerUserDevice API from Automile — 4 operation(s) for resourceowneruserdevice.
The ResourceOwnerUserDevice API from Automile — 4 operation(s) for resourceowneruserdevice.
swagger: '2.0'
info:
title: Automile ClientApi ResourceOwnerUserDevice API
version: v1
tags:
- name: ResourceOwnerUserDevice
paths:
/v1/resourceowner/userdevice:
get:
tags:
- ResourceOwnerUserDevice
summary: Get a list of all user devices that the user is associated with
description: This will return the details of the user devices.
operationId: GetResourceOwnerUserDevices
produces:
- text/plain
- application/json
- text/json
responses:
'200':
description: The devices are returned
schema:
type: array
items:
$ref: '#/definitions/UserDeviceModel'
'500':
description: Internal server error
security:
- oauth2: []
post:
tags:
- ResourceOwnerUserDevice
summary: Creates a new user device
operationId: CreateResourceOwnerUserDevice
consumes:
- application/json
- text/json
- application/*+json
parameters:
- in: body
name: body
description: The User Device Model
schema:
$ref: '#/definitions/UserDeviceCreateModel'
responses:
'200':
description: A link in the header is returned to the newly created company
'400':
description: Bad request, could occur for a number of cases, see returned message
'403':
description: Request is forbidden, could occur for a number of reasons, see returned message
'500':
description: Internal server error
security:
- oauth2: []
/v1/resourceowner/userdevice/{userDeviceId}:
get:
tags:
- ResourceOwnerUserDevice
summary: Get a list of all user devices that the user is associated with
description: Only user devices that are associated with the user are allowed.
operationId: GetResourceOwnerUserDevice
produces:
- text/plain
- application/json
- text/json
parameters:
- in: path
name: userDeviceId
description: The user device id
required: true
type: integer
format: int32
responses:
'200':
description: The devices are returned
schema:
$ref: '#/definitions/UserDeviceModel'
'403':
description: Request is forbidden, meaning you don't have access to this user device
'500':
description: Internal server error
security:
- oauth2: []
put:
tags:
- ResourceOwnerUserDevice
summary: Updates the given user device with the new model
operationId: EditResourceOwnerUserDevice
consumes:
- application/json
- text/json
- application/*+json
parameters:
- in: path
name: userDeviceId
description: The user device id
required: true
type: integer
format: int32
- in: body
name: body
description: The new user device model
schema:
$ref: '#/definitions/UserDeviceEditModel'
responses:
'200':
description: The device was saved
'400':
description: Bad request, could occur for a number of cases, see returned message
'403':
description: Request is forbidden, could occur for a number of reasons, see returned message
'404':
description: Not found, the vehicle you tried to update can't be found
'500':
description: Internal server error
security:
- oauth2: []
delete:
tags:
- ResourceOwnerUserDevice
summary: Removes the given user device
operationId: DeleteResourceOwnerUserDevice
parameters:
- in: path
name: userDeviceId
description: The user device id
required: true
type: integer
format: int32
responses:
'200':
description: The device has been deleted
'403':
description: Request is forbidden, could occur for a number of reasons, see returned message
'404':
description: Not found, the vehicle you tried to remove can't be found
'500':
description: Internal server error
security:
- oauth2: []
/v1/resourceowner/userdevice/adduserdeviceifnewanddefaulttriggers:
put:
tags:
- ResourceOwnerUserDevice
summary: Add the user deivce if it isn't already exist, also adds default mobile push triggers
operationId: AddUserDeviceIfNewAndDefaultTriggers
consumes:
- application/json
- text/json
- application/*+json
parameters:
- in: body
name: body
description: The user device model
schema:
$ref: '#/definitions/UserDeviceCreateModel'
responses:
'200':
description: The device was added
'400':
description: Bad request, could occur for a number of cases, see returned message
'403':
description: Request is forbidden, could occur for a number of reasons, see returned message
'500':
description: Internal server error
security:
- oauth2: []
/v1/resourceowner/userdevice/adduserdeviceifnew:
put:
tags:
- ResourceOwnerUserDevice
summary: Add the user deivce if it isn't already exist
operationId: AddUserDeviceIfNew
consumes:
- application/json
- text/json
- application/*+json
parameters:
- in: body
name: body
description: The user device model
schema:
$ref: '#/definitions/UserDeviceCreateModel2'
responses:
'200':
description: The device was added
'400':
description: Bad request, could occur for a number of cases, see returned message
'403':
description: Request is forbidden, could occur for a number of reasons, see returned message
'500':
description: Internal server error
security:
- oauth2: []
definitions:
UserDeviceEditModel:
type: object
properties:
DeviceIdentifier:
type: string
DeviceToken:
type: string
DeviceType:
format: int32
enum:
- 0
- 1
- 2
type: integer
Description:
type: string
DeviceName:
type: string
additionalProperties: false
UserDeviceCreateModel:
type: object
properties:
DeviceIdentifier:
type: string
DeviceToken:
type: string
DeviceType:
format: int32
enum:
- 0
- 1
- 2
type: integer
Description:
type: string
DeviceName:
type: string
additionalProperties: false
UserDeviceCreateModel2:
type: object
properties:
DeviceIdentifier:
type: string
DeviceToken:
type: string
DeviceType:
format: int32
enum:
- 0
- 1
- 2
type: integer
UserDeviceCertType:
format: int32
enum:
- 0
- 1
- 3
- 4
type: integer
Description:
type: string
DeviceName:
type: string
additionalProperties: false
UserDeviceModel:
description: User Device Model
type: object
properties:
UserDeviceId:
format: int32
type: integer
DeviceIdentifier:
type: string
DeviceToken:
type: string
DeviceType:
format: int32
enum:
- 0
- 1
- 2
type: integer
Description:
type: string
DeviceName:
type: string
additionalProperties: false
securityDefinitions:
oauth2:
type: oauth2
flow: implicit
authorizationUrl: https://api.automile.com/login/
scopes:
read: Read access to protected resources
write: Write access to protected resources
description: OAuth2 Implicit Grant