User Details API

Note:  Changing TimeZone for the user has been disabled. It can be changed only for the user account's owners. To do that please use following API call: Accounts API

{ "swagger": "2.0", "info": { "version": "2.4.0", "title": "Eagle Eye CameraManager API", "description": "RESTful API for the Eagle Eye CameraManager platform." }, "host": "rest.cameramanager.com", "schemes": [ "http", "https" ], "basePath": "/rest/v2.4", "produces": [ "application/json" ], "definitions": { "Error": { "type": "object", "description": "Generic error response, modelled after RFC 7807.", "properties": { "code": { "type": "integer", "description": "Error code within the system." }, "title": { "type": "string", "description": "This title is not meant to be shown to users and is not guaranteed to stay the same. Please use the code to parse the error." }, "detail": { "type": "string", "description": "Error details, to help developers detect what went wrong." } }, "required": [ "code", "title" ] }, "OAuth2Error": { "type": "object", "description": "Generic OAuth2 error response when there is something wrong with the OAuth2 authentication. Defined at RFC 6749.", "properties": { "error": { "type": "string", "description": "A single ASCII error code conforming the pattern." }, "error_description": { "type": "string", "description": "Human-readable ASCII text providing additional information, used to assist the client developer in understanding the error that occurred." } }, "required": [ "error" ] }, "UserDetailsUpdate": { "type": "object", "properties": { "language": { "type": "string", "description": "The main language used by the account in the ISO_639-1 format.", "pattern": "[a-z]{2}", "default": "en", "minLength": 2, "maxLength": 2 }, "companyName": { "type": "string", "pattern": "[\\p{L}0-9_\\- .&+:,;/]*", "description": "The user's company name. Max length is 128 characters.", "maxLength": 128 }, "country": { "type": "string", "description": "The country where the account owner is located in the ISO 3166-1 alpha-2 format.", "pattern": "[A-Z]{2}", "minLength": 2, "maxLength": 2 }, "phone": { "type": "string", "description": "The phone number of the user.", "maxLength": 32 } } }, "UserDetails": { "allOf": [ { "$ref": "#/definitions/UserDetailsUpdate" }, { "type": "object", "properties": { "userId": { "type": "integer", "description": "The user ID of the user." }, "accountId": { "type": "integer", "description": "The account ID of the account the user belongs to." }, "reference": { "type": "string", "description": "This property can be used by the account owning this user to purely create a reference with an external platform." }, "vatNumber": { "type": "string", "description": "The user's company VAT number.", "maxLength": 32 }, "dateSignup": { "type": "string", "pattern": "[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}", "description": "date signup in yyyy-MM-dd'T'HH:mm:ss format" } } } ] } }, "responses": { "unauthorized": { "description": "You are not authenticated. Please authenticate and try again.", "schema": { "$ref": "#/definitions/OAuth2Error" } }, "forbidden": { "description": "You have no permission to access the specified resource.", "schema": { "$ref": "#/definitions/Error" } }, "validationError": { "description": "The supplied object is invalid. Error detail will contain the validation error.", "schema": { "$ref": "#/definitions/Error" } }, "notAcceptableError": { "description": "The requested resource is capable of generating only content not acceptable according to the Accept headers sent in the request.", "schema": { "$ref": "#/definitions/Error" } }, "internalServerError": { "description": "Something went wrong in the server. Please try again.", "schema": { "$ref": "#/definitions/Error" } }, "conflict": { "description": "There was a conflict while trying to perform your request. See error details for more information." }, "resourceNotFound": { "description": "Referenced resource could not be found.", "schema": { "$ref": "#/definitions/Error" } } }, "paths": { "/users/self/details": { "get": { "summary": "Get details information about the user.", "description": "Get users userId, accountId, language, company name, country, phone, etc.", "operationId": "getUserDetails", "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/UserDetails" } }, "401": { "$ref": "#/responses/unauthorized" }, "406": { "$ref": "#/responses/notAcceptableError" }, "500": { "$ref": "#/responses/internalServerError" } }, "tags": [ "User Details" ] }, "patch": { "summary": "Updates details information about the user.", "description": "Updates user details information like phone, country, language, phone, etc.", "operationId": "updateUserDetails", "parameters": [ { "name": "UserDetailsUpdate", "in": "body", "required": true, "schema": { "$ref": "#/definitions/UserDetailsUpdate" } } ], "responses": { "204": { "description": "No content" }, "400": { "$ref": "#/responses/validationError" }, "401": { "$ref": "#/responses/unauthorized" }, "403": { "$ref": "#/responses/forbidden" }, "404": { "$ref": "#/responses/resourceNotFound" }, "406": { "$ref": "#/responses/notAcceptableError" }, "409": { "$ref": "#/responses/conflict" }, "500": { "$ref": "#/responses/internalServerError" } }, "tags": [ "User Details" ] } } } }

swagger-user-details.yaml