swagger: '2.0'
info:
title: Automile ClientApi ClientUsers API
version: v1
tags:
- name: ClientUsers
paths:
/v1/client/users:
get:
tags:
- ClientUsers
summary: Get the users that belongs to contacts that the current user is associated with
description: Get the users that the current user is associated through companies
operationId: GetClientUsers
produces:
- text/plain
- application/json
- text/json
responses:
'200':
description: The Users are returned
schema:
type: array
items:
$ref: '#/definitions/UserModel'
'500':
description: Internal server error
security:
- oauth2: []
post:
tags:
- ClientUsers
summary: Creates a new user including a contact with basic information
operationId: CreateClientUser
consumes:
- application/json
- text/json
- application/*+json
produces:
- text/plain
- application/json
- text/json
parameters:
- in: body
name: body
description: The create user model
schema:
$ref: '#/definitions/UserCreateModel'
responses:
'200':
description: A link in the header is returned to the newly created users
'400':
description: Bad request, can happen when you supply values that are unacceptable
schema:
$ref: '#/definitions/ProblemDetails'
'500':
description: Internal server error
security:
- oauth2: []
/v1/client/users/{userId}:
get:
tags:
- ClientUsers
summary: Get the specific user
operationId: GetClientUserByUserId
produces:
- text/plain
- application/json
- text/json
parameters:
- in: path
name: userId
description: The user id
required: true
type: integer
format: int32
responses:
'200':
description: The Users are returned
schema:
$ref: '#/definitions/UserModel'
'403':
description: Request is forbidden, meaning you don't have access to this user
schema:
$ref: '#/definitions/ProblemDetails'
'500':
description: Internal server error
security:
- oauth2: []
definitions:
UserModel:
type: object
properties:
UserId:
format: int32
type: integer
UserGuid:
format: uuid
type: string
UserName:
type: string
ContactId:
format: int32
type: integer
additionalProperties: false
ProblemDetails:
type: object
properties:
type:
type: string
title:
type: string
status:
format: int32
type: integer
detail:
type: string
instance:
type: string
additionalProperties: {}
UserCreateModel:
required:
- EmailAddress
- FirstName
- LastName
- UserName
type: object
properties:
UserName:
minLength: 1
type: string
FirstName:
minLength: 1
type: string
LastName:
minLength: 1
type: string
EmailAddress:
minLength: 1
type: string
MobilePhoneNumber:
type: string
Description:
type: string
Password:
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