Reseller Account Sims

{ "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" ] }, "simType": { "type": "string", "description": "Last known value of the SIM card type\n", "enum": [ "unknown", "eagleEyeSim", "nonEagleEyeSim" ] }, "simState": { "type": "string", "description": "Last known state of sim\n", "enum": [ "inserted", "noSim", "unknown" ] }, "SimSummary": { "description": "contains all SIM information and other related information if applicable, like the subscription id and to which camera is the SIM linked.", "allOf": [ { "type": "object", "properties": { "iccid": { "type": "string", "description": "ICCID that uniquely identifies the SIM card." }, "imsi": { "type": "string", "description": "IMSI that uniquely defines international mobile subscriber identity" }, "simType": { "$ref": "#/definitions/simType" }, "simState": { "$ref": "#/definitions/simState" }, "cameraId": { "type": "integer", "description": "Id of the camera where the SIM card is inserted or was last known to be inserted" }, "cameraName": { "type": "string", "description": "Name of the camera where the SIM card is inserted or was last known to be inserted" }, "imei": { "type": "string", "description": "International Mobile Equipment Identity of the mobile device if provided by the camera when connecting with the platform." }, "subscriptionId": { "type": "string", "description": "ID of the subscription instance the EagleEyeSIM is linked to." } }, "required": [ "iccid", "imsi", "simType", "simState" ] } ] }, "SimDataUsage": { "type": "object", "properties": { "iccid": { "type": "string", "description": "ICCID that uniquely identifies the SIM card." }, "maxBytes": { "type": "integer", "format": "int64", "description": "The maximum amount of data in bytes the SIM is allowed to use in a billing cycle. The value of this field is determined based on the SKU of the mobile subscription this sim card is linked to." }, "usedBytes": { "type": "integer", "format": "int64", "description": "The amount of data used (in bytes) since the beginning of the billing cycle. This value might not be the latest since it is updated with some delay." }, "billingCycleDay": { "type": "integer", "description": "The day of the month when the billing cycle starts. On this day, the count of mobile data used by the SIM is reset to zero automatically" } }, "required": [ "iccid", "maxBytes", "usedBytes", "billingCycleDay" ] } }, "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" } }, "overloadedServerError": { "description": "The server is currently busy and cannot process the request.", "schema": { "$ref": "#/definitions/Error" } }, "internalServerError": { "description": "Something went wrong in the server. Please try again.", "schema": { "$ref": "#/definitions/Error" } } }, "parameters": { "resellerId": { "name": "resellerId", "in": "path", "description": "ID of the reseller.", "required": true, "type": "integer" }, "accountId": { "name": "accountId", "in": "path", "description": "identifier of the owner of the subscription instance.", "required": true, "type": "integer" }, "iccid": { "name": "iccid", "in": "path", "description": "ICCID that uniquely identifies the SIM card.", "required": true, "type": "string" } }, "paths": { "/resellers/{resellerId}/accounts/{accountId}/sims/all/summary": { "get": { "summary": "get the list of SIM cards linked to the given account.", "description": "Response contains both EagleEyeSIM and non-EagleEyeSIM if present. For the former ones the mobile subscription is also returned.", "operationId": "getAccountSimsSummary", "parameters": [ { "$ref": "#/parameters/resellerId" }, { "$ref": "#/parameters/accountId" } ], "responses": { "200": { "description": "OK", "schema": { "type": "array", "items": { "$ref": "#/definitions/SimSummary" } } }, "400": { "$ref": "#/responses/validationError" }, "401": { "$ref": "#/responses/unauthorized" }, "404": { "$ref": "#/responses/resourceNotFound" }, "406": { "$ref": "#/responses/notAcceptableError" }, "500": { "$ref": "#/responses/internalServerError" } }, "tags": [ "Sims" ] } }, "/resellers/{resellerId}/accounts/{accountId}/sims/{iccid}/dataUsage": { "get": { "summary": "get data usage details of the sim linked to the given account.", "description": "Response contains the data usage details of the sim for a given account.", "operationId": "getAccountSimDataUsage", "parameters": [ { "$ref": "#/parameters/resellerId" }, { "$ref": "#/parameters/accountId" }, { "$ref": "#/parameters/iccid" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/SimDataUsage" } }, "400": { "$ref": "#/responses/validationError" }, "401": { "$ref": "#/responses/unauthorized" }, "404": { "$ref": "#/responses/resourceNotFound" }, "406": { "$ref": "#/responses/notAcceptableError" }, "500": { "$ref": "#/responses/internalServerError" } }, "tags": [ "Sims" ] } } } }