Reseller Available Subscriptions

{ "swagger": "2.0", "info": { "version": "2.3.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.3", "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" ] }, "SubscriptionGroupType": { "type": "string", "description": "Identifies a group of subscription types, a subset among the complete set of subscription types. Not to be confused with a subscriptionId, which identifies a specific subscription instance. Possible values:\n * cloud: group for cloud subscription types. The instances of those subscription types are each tied to a specific account.\n * mobile: group for all the mobile data subscription types. The instances of those subscription types are each tied both to a specific SIM card and to a specific account.", "enum": [ "cloud", "mobile" ] }, "SubscriptionTypeDetails": { "type": "object", "description": "Extra fields specific to the subscription type. The fields of this object are different depending on the subscription type. For instance, if the subscription type belongs to the subscription group \"cloud\", then the extra fields would be the ones described in the CloudSubscriptionTypeDetails object." }, "CloudSubscriptionTypeDetails": { "description": "details object returned when the subscription is of type \"cloud\".", "allOf": [ { "$ref": "#/definitions/SubscriptionTypeDetails" }, { "type": "object", "properties": { "quality": { "$ref": "#/definitions/Quality" }, "retention": { "type": "integer", "format": "int32", "description": "Number of hours" } }, "required": [ "quality", "retention" ] } ] }, "MobileSubscriptionTypeDetails": { "description": "details object returned when the subscription is of type \"mobile\".", "allOf": [ { "$ref": "#/definitions/SubscriptionTypeDetails" }, { "type": "object", "properties": { "dataCap": { "type": "string", "maxLength": 10 } } } ] }, "Quality": { "type": "string", "enum": [ "SD1", "HD1", "HD2", "CM10" ] }, "InvoicePeriod": { "type": "string", "enum": [ "Yearly", "Monthly" ] }, "AvailableSubscriptionType": { "type": "object", "properties": { "sku": { "description": "identifier of a product as in the price list.", "type": "string", "maxLength": 255 }, "invoicePeriod": { "$ref": "#/definitions/InvoicePeriod" }, "name": { "type": "string", "maxLength": 255 }, "groupType": { "$ref": "#/definitions/SubscriptionGroupType" }, "subscriptionTypeDetails": { "$ref": "#/definitions/SubscriptionTypeDetails" } }, "required": [ "sku", "invoicePeriod", "name", "groupType", "subscriptionTypeDetails" ] } }, "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": { "resellerId": { "name": "resellerId", "in": "path", "description": "ID of the partner (reseller).", "required": true, "type": "integer" }, "accountId": { "name": "accountId", "in": "path", "description": "identifier of the owner of the subscription instance.", "required": true, "type": "integer" }, "groupType": { "name": "groupType", "in": "query", "description": "Group of subscription types. When this is present, it is used to select only the subscription types of the given group, filtering out the subscription types that don't belong to the group. Possible values:\n * cloud: group for cloud subscription types. The instances of those subscription types are each tied to a specific account.\n * mobile: group for all the mobile data subscription types. The instances of those subscription types are each tied both to a specific SIM card and to a specific account.", "type": "string", "enum": [ "cloud", "mobile" ], "required": false } }, "paths": { "/resellers/{resellerId}/accounts/{accountId}/availableSubscriptions": { "get": { "summary": "Get available subscription types that can be created for the given account of the given reseller.", "description": "Retrieves a list with all the available subscription types that can be created for the given account of the given reseller. When the partner is not a reseller, a resource not found error is thrown.", "operationId": "getAvailableSubscriptionTypes", "parameters": [ { "$ref": "#/parameters/resellerId" }, { "$ref": "#/parameters/accountId" }, { "$ref": "#/parameters/groupType" } ], "responses": { "200": { "description": "OK", "schema": { "type": "array", "items": { "$ref": "#/definitions/AvailableSubscriptionType" } } }, "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": [ "ResellerSubscription" ] } } } }  

swagger-reseller-availablesubscription.yaml