Profiles API

{ "swagger": "2.0", "info": { "version": "2.2.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.2", "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" ] }, "ProfileCreate": { "type": "object", "properties": { "name": { "type": "string", "maxLength": 256 } } }, "ProfileUpdate": { "allOf": [ { "$ref": "#/definitions/ProfileCreate" }, { "type": "object", "properties": { "profileId": { "type": "integer", "format": "int32" } } } ] }, "Profile": { "allOf": [ { "$ref": "#/definitions/ProfileUpdate" }, { "type": "object", "properties": { "permissions": { "$ref": "#/definitions/ProfilePermissions" } } } ] }, "ProfilePermissions": { "type": "object", "properties": { "Prov.Admin": { "type": "boolean", "description": "Indicates only the admin (cameramanager) is allowed to perform this action." }, "Prov.AdminTools": { "type": "boolean" }, "Prov.AdminPartner": { "type": "boolean", "description": "Right to partner tools (should only be granted to admins)." }, "Prov.AdminUser": { "type": "boolean", "description": "Right to users tools (should only be granted to admins)." }, "Prov.AdminCustomerService": { "type": "boolean", "description": "Right to update partner/customer internal fields only shown to Customer service team. i.e. Zoho ID" }, "Prov.UtilLanguage": { "type": "boolean", "description": "Collective right for language management." }, "Prov.UtilLanguageAdd": { "type": "boolean", "description": "Right to add entries to language files." }, "Prov.UtilLanguageDelete": { "type": "boolean", "description": "Right to delete entries from language files." }, "Prov.UtilLanguageEdit": { "type": "boolean", "description": "Right to edit entries in language files." }, "Prov.Partner": { "type": "boolean", "description": "Collective right for partner rights." }, "Prov.PartnerOverview": { "type": "boolean", "description": "Right to view the list of resellers (in case of distributor)." }, "Prov.PartnerTestAdd": { "type": "boolean", "description": "Right to add a test reseller (in case of distributor). (Not used since partner registration is a public page)" }, "Prov.PartnerAdd": { "type": "boolean", "description": "Right to add a reseller (in case of distributor). (Not used since partner registration is a public page)" }, "Prov.PartnerManage": { "type": "boolean", "description": "Right to manage reseller (in case of distributor)." }, "Prov.PartnerReports": { "type": "boolean", "description": "Collective right for reports." }, "Prov.PartnerReportsSales": { "type": "boolean", "description": "Right to review sales reports concerning a partner." }, "Prov.Customer": { "type": "boolean", "description": "Collective right for customer rights." }, "Prov.CustomerOverview": { "type": "boolean", "description": "Right to view customers." }, "Prov.CustomerAdd": { "type": "boolean", "description": "Right to add a new customer." }, "Prov.CustomerEdit": { "type": "boolean", "description": "Right to edit the details of an existing customer." }, "Prov.CustomerHelpdesk": { "type": "boolean", "description": "Right to start the help desk of a customer who allows for help desk." }, "Prov.CustomerPassword": { "type": "boolean", "description": "Right to reset the password of a customer." }, "Prov.CustomerBlock": { "type": "boolean", "description": "Right to block a customer." }, "Prov.CustomerAccount": { "type": "boolean", "description": "Right to edit the account of a customer." }, "Prov.CustomerAccess": { "type": "boolean", "description": "Right to edit access settings of a customer." }, "Prov.CustomerModules": { "type": "boolean", "description": "Right to enable/disable user modules." }, "Prov.CustomerSubusers": { "type": "boolean", "description": "Right to enable sub-users." }, "Prov.CustomerDeactivate": { "type": "boolean", "description": "Right to immediately deactivate customer." }, "Prov.CustomerRunningChange": { "type": "boolean", "description": "Right to change customer accounts start-date,end-date and account type." }, "Prov.CustomerInactiveHelpdesk": { "type": "boolean", "description": "Right to open help desk for inactive accounts." }, "Prov.CustomerDeleteLSU": { "type": "boolean", "description": "Right to delete a LSU." }, "Prov.ManageOauthClient": { "type": "boolean", "description": "view, create or delete OAuth client credentials" }, "Prov.Alarmcentral": { "type": "boolean", "description": "Collective right for alarm central rights." }, "Prov.AlarmcentralOverview": { "type": "boolean", "description": "Right to view the alarm central settings." }, "Prov.AlarmcentralAdd": { "type": "boolean", "description": "Right to sign up at an alarm central." }, "Prov.AlarmcentralRemove": { "type": "boolean", "description": "Right to delete an alarm central user." }, "Prov.AlarmcentralEdit": { "type": "boolean", "description": "Right to edit an alarm central user." }, "Prov.Tools": { "type": "boolean", "description": "Collective right for tool rights." }, "Prov.ToolsOfflineCams": { "type": "boolean", "description": "Right to view the list of customers with off-line cameras." }, "Prov.OfflineCameraCSVExport": { "type": "boolean", "description": "Right to create a csv export with all offline cameras" }, "Prov.ToolsLSUs": { "type": "boolean", "description": "Right to view the LSU overview." }, "Prov.Account": { "type": "boolean", "description": "Collective right for account rights." }, "Prov.AccountOverview": { "type": "boolean", "description": "Right to view the details of the partner account." }, "Prov.AccountEdit": { "type": "boolean", "description": "Right to edit the details of the partner account." }, "Prov.AccountLogins": { "type": "boolean", "description": "Right to manage login accounts for partner." }, "Prov.AccountProfiles": { "type": "boolean", "description": "Right to manage account profiles for partner." }, "Prov.Email": { "type": "boolean", "description": "Collective right for email rights." }, "Prov.EmailSettings": { "type": "boolean", "description": "Right to set send settings of email's." }, "Prov.EmailEdit": { "type": "boolean", "description": "Right to edit email's and templates." }, "Prov.ExtendedEditEmail": { "type": "boolean", "description": "Right to edit source code and other features of emails." }, "Prov.EmailServer": { "type": "boolean", "description": "Right to set email server settings." }, "Prov.Invoice": { "type": "boolean", "description": "Collective right for invoice rights." }, "Prov.InvoiceAdd": { "type": "boolean", "description": "Right to add a invoice (automatically)" }, "Prov.InvoiceUpdate": { "type": "boolean", "description": "Right to update invoice" }, "Prov.InvoiceAdminOverview": { "type": "boolean", "description": "Right to display ALL the invoices." }, "Prov.InvoiceOverview": { "type": "boolean", "description": "Right to display invoices of a user." }, "Prov.InvoiceDetails": { "type": "boolean", "description": "Right to display the content of a single invoice." }, "Prov.InvoicePrint": { "type": "boolean", "description": "Right to print an invoice" }, "Prov.InvoiceVerify": { "type": "boolean", "description": "Right to verify the ownership of an invoice (admin always authorized)." }, "Prov.InvoiceTools": { "type": "boolean", "description": "Right to generate invoice for users from the administration portal." }, "Prov.ProductCreate": { "type": "boolean", "description": "Right to create a new product" }, "Prov.ProductList": { "type": "boolean", "description": "Right to display ALL the available products." }, "Prov.ProductDetails": { "type": "boolean", "description": "Right to display and modify details of a product." }, "Prov.InsuranceBS": { "type": "boolean", "description": "Right to transform an user into a body-shop" }, "Prov.InsuranceIC": { "type": "boolean", "description": "Right to transform an user into an insurance company" }, "Prov.InsuranceRelation": { "type": "boolean", "description": "Right to manage the relation between a body-shop and an insurance company" }, "Prov.InsuranceFTP": { "type": "boolean", "description": "Right to edit the ftp settings permissions" }, "Prov.SupportDashboard": { "type": "boolean", "description": "Right to view the offline cameras in the support dashboard." }, "Prov.ExtendedTrial": { "type": "boolean", "description": "Right to add an extended trial to an account" }, "Prov.VieurekaAppsManagement": { "type": "boolean", "description": "Right to do management for Vieureka applications" }, "Prov.DeveloperPortal": { "type": "boolean", "description": "Right to access the Developer portal" }, "Prov.Public": { "type": "boolean", "description": "Indicates no special permissions need to be granted to perform this action." }, "Prov.Ancestor": { "type": "boolean", "description": "Indicates that this action can only be performed by an ancestor (so not by the user itself)." }, "Prov.GenerateAccessToken": { "type": "boolean", "description": "Right to generate token for a user by user id without password." } } } }, "responses": { "resourceNotFound": { "description": "Referenced resource could not be found.", "schema": { "$ref": "#/definitions/Error" } }, "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" } }, "conflict": { "description": "There was a conflict while trying to perform your request. See error details for more information.", "schema": { "$ref": "#/definitions/Error" } }, "internalServerError": { "description": "Something went wrong in the server. Please try again.", "schema": { "$ref": "#/definitions/Error" } } }, "parameters": { "accountId": { "name": "accountId", "in": "path", "description": "ID of the account", "required": true, "type": "integer" }, "profileId": { "name": "profileId", "in": "path", "description": "ID of the profile", "required": true, "type": "integer" } }, "paths": { "/accounts/{accountId}/permissionProfiles": { "get": { "summary": "Get profiles of an account", "description": "Retrieves all profiles of an account. Each profile contains a set of permissions.", "operationId": "getProfiles", "parameters": [ { "$ref": "#/parameters/accountId" } ], "responses": { "200": { "description": "OK", "schema": { "type": "array", "items": { "$ref": "#/definitions/Profile" } } }, "400": { "$ref": "#/responses/validationError" }, "401": { "$ref": "#/responses/unauthorized" }, "403": { "$ref": "#/responses/forbidden" }, "404": { "$ref": "#/responses/resourceNotFound" }, "406": { "$ref": "#/responses/notAcceptableError" }, "500": { "$ref": "#/responses/internalServerError" } }, "tags": [ "Profiles" ] }, "post": { "summary": "Adds a profile.", "description": "Adds a profile without permissions. Permissions can be managed through a separate endpoint.", "operationId": "addProfile", "parameters": [ { "$ref": "#/parameters/accountId" }, { "name": "profile", "in": "body", "required": true, "schema": { "$ref": "#/definitions/ProfileCreate" } } ], "consumes": [ "application/json" ], "responses": { "201": { "description": "Created", "schema": { "$ref": "#/definitions/Profile" } }, "400": { "$ref": "#/responses/validationError" }, "401": { "$ref": "#/responses/unauthorized" }, "406": { "$ref": "#/responses/notAcceptableError" }, "409": { "$ref": "#/responses/conflict" }, "500": { "$ref": "#/responses/internalServerError" } }, "tags": [ "Profiles" ] } }, "/accounts/{accountId}/permissionProfiles/{profileId}": { "get": { "summary": "Get profile by ID", "description": "Retrieves profile by ID. Profile contains a set of permissions.", "operationId": "getProfile", "parameters": [ { "$ref": "#/parameters/accountId" }, { "$ref": "#/parameters/profileId" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/Profile" } }, "400": { "$ref": "#/responses/validationError" }, "401": { "$ref": "#/responses/unauthorized" }, "403": { "$ref": "#/responses/forbidden" }, "404": { "$ref": "#/responses/resourceNotFound" }, "406": { "$ref": "#/responses/notAcceptableError" }, "500": { "$ref": "#/responses/internalServerError" } }, "tags": [ "Profiles" ] }, "patch": { "summary": "Updates a single profile", "description": "Updates a single profile. Permissions won't be updated, they can be managed through a separate endpoint.", "operationId": "updateProfile", "parameters": [ { "$ref": "#/parameters/accountId" }, { "$ref": "#/parameters/profileId" }, { "name": "profile", "in": "body", "required": true, "schema": { "$ref": "#/definitions/ProfileUpdate" } } ], "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": [ "Profiles" ] }, "delete": { "summary": "Deletes a single profile", "description": "Deletes a single profile and all permissions for that profile.", "operationId": "deleteProfile", "parameters": [ { "$ref": "#/parameters/accountId" }, { "$ref": "#/parameters/profileId" } ], "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": [ "Profiles" ] } }, "/accounts/{accountId}/permissionProfiles/{profileId}/permissions": { "patch": { "summary": "Updates a set of permissions", "description": "Updates a set of permissions for a single profile.", "operationId": "updatePermissions", "parameters": [ { "$ref": "#/parameters/accountId" }, { "$ref": "#/parameters/profileId" }, { "name": "permissions", "in": "body", "required": true, "schema": { "$ref": "#/definitions/ProfilePermissions" } } ], "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": [ "Profiles" ] } } } }

swagger-profiles.yaml