Skip to content
Permalink
master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
 
 
Cannot retrieve contributors at this time
{
"swagger": "2.0",
"info": {
"title": "CoAP Cloud Configuration Resource",
"version": "2019-03-27",
"license": {
"name": "OCF Data Model License",
"url": "https://github.com/openconnectivityfoundation/core/blob/e28a9e0a92e17042ba3e83661e4c0fbce8bdc4ba/LICENSE.md",
"x-copyright": "Copyright 2018-2019 Open Connectivity Foundation, Inc. All rights reserved."
},
"termsOfService": "https://openconnectivityfoundation.github.io/core/DISCLAIMER.md"
},
"schemes": ["http"],
"consumes": ["application/json"],
"produces": ["application/json"],
"paths": {
"/CoAPCloudConfResURI?if=oic.if.rw" : {
"get": {
"description": "The CoAPCloudConf Resource exposes configuration information for connecting to an OCF Cloud.\n",
"parameters": [
{"$ref": "#/parameters/interface-all"}
],
"responses": {
"200": {
"description" : "",
"x-example":
{
"rt" : ["oic.r.coapcloudconf"],
"apn": "github",
"cis": "coaps+tcp://example.com:443",
"sid" : "987e6543-a21f-10d1-a112-421345746237",
"cps" : "registered",
"clec": 0
},
"schema": { "$ref": "#/definitions/CoAPCloudConf" }
}
}
},
"post": {
"description": "Update properties of the CoAPCloudConf Resource.\n",
"parameters": [
{"$ref": "#/parameters/interface-all"},
{
"name": "body",
"in": "body",
"required": true,
"schema": { "$ref": "#/definitions/CoAPCloudConfUpdate" },
"x-example":
{
"at": "0f3d9f7fe5491d54077d",
"apn": "github",
"cis": "coaps+tcp://example.com:443",
"sid" : "987e6543-a21f-10d1-a112-421345746237"
}
}
],
"responses": {
"200": {
"description" : "",
"x-example":
{
"apn": "github",
"cis": "coaps+tcp://example.com:443",
"sid" : "987e6543-a21f-10d1-a112-421345746237",
"cps" : "readytoregister",
"clec": 0
},
"schema": { "$ref": "#/definitions/CoAPCloudConf" }
}
}
}
},
"/CoAPCloudConfResURI?if=oic.if.baseline" : {
"get": {
"description": "The CoAPCloudConf Resource exposes configuration information for connecting to an OCF Cloud.\n",
"parameters": [
{"$ref": "#/parameters/interface-all"}
],
"responses": {
"200": {
"description" : "",
"x-example":
{
"rt": ["oic.r.coapcloudconf"],
"if" : ["oic.if.rw","oic.if.baseline"],
"apn": "github",
"cis": "coaps+tcp://example.com:443",
"sid" : "987e6543-a21f-10d1-a112-421345746237",
"cps" : "registered",
"clec": 0
},
"schema": { "$ref": "#/definitions/CoAPCloudConf" }
}
}
},
"post": {
"description": "Update Properties of the CoAPCloudConf Resource.\n",
"parameters": [
{"$ref": "#/parameters/interface-all"},
{
"name": "body",
"in": "body",
"required": true,
"schema": { "$ref": "#/definitions/CoAPCloudConfUpdate" },
"x-example":
{
"at": "0f3d9f7fe5491d54077d",
"apn": "github",
"cis": "coaps+tcp://example.com:443",
"sid" : "987e6543-a21f-10d1-a112-421345746237"
}
}
],
"responses": {
"200": {
"description" : "",
"x-example":
{
"apn": "github",
"cis": "coaps+tcp://example.com:443",
"sid" : "987e6543-a21f-10d1-a112-421345746237",
"cps" : "readytoregister",
"clec": 0
},
"schema": { "$ref": "#/definitions/CoAPCloudConf" }
}
}
}
}
},
"parameters": {
"interface-all" : {
"in" : "query",
"name" : "if",
"type" : "string",
"enum" : ["oic.if.rw","oic.if.baseline"]
}
},
"definitions": {
"CoAPCloudConf" : {
"properties": {
"rt" : {
"description": "Resource Type of the Resource",
"items": {
"enum": ["oic.r.coapcloudconf"],
"type": "string",
"maxLength": 64
},
"minItems": 1,
"uniqueItems": true,
"readOnly": true,
"type": "array"
},
"n" : {
"$ref": "https://openconnectivityfoundation.github.io/core/schemas/oic.common.properties.core-schema.json#/definitions/n"
},
"cis" : {
"description": "URL of OCF Cloud",
"format": "uri",
"type": "string"
},
"apn" : {
"description": "The Authorisation Provider through which an Access Token was obtained.",
"type": "string"
},
"sid" : {
"$ref": "http://openconnectivityfoundation.github.io/core/schemas/oic.types-schema.json#/definitions/uuid"
},
"cps" : {
"description": "Indicates the Cloud Provisioning status of the Device.",
"enum": [
"uninitialized",
"readytoregister",
"registering",
"registered",
"failed"
],
"readOnly": true,
"type": "string"
},
"clec" : {
"description": "Last Error Code during Cloud Provisioning (0: No Error, 1: Error response from the OCF Cloud, 2: Failed to connect to the OCF Cloud, 3: Failed to refresh Access Token, 4~254: Reserved, 255: Unknown error)",
"enum": [
0,
1,
2,
3,
255
],
"readOnly": true,
"type": "integer"
},
"id" : {
"$ref": "https://openconnectivityfoundation.github.io/core/schemas/oic.common.properties.core-schema.json#/definitions/id"
},
"if" : {
"description": "The OCF Interfaces supported by this Resource",
"items": {
"enum": [
"oic.if.rw",
"oic.if.baseline"
],
"type": "string",
"maxLength": 64
},
"minItems": 2,
"uniqueItems": true,
"readOnly": true,
"type": "array"
}
},
"type" : "object",
"required":["cis", "sid"]
},
"CoAPCloudConfUpdate" : {
"properties": {
"cis" : {
"description": "URL of OCF Cloud",
"format": "uri",
"type": "string"
},
"apn" : {
"description": "The Authorisation Provider through which an Access Token was obtained.",
"type": "string"
},
"at" : {
"description": "Access Token which is returned by an Authorisation Provider or OCF Cloud.",
"type": "string"
},
"sid" : {
"$ref": "http://openconnectivityfoundation.github.io/core/schemas/oic.types-schema.json#/definitions/uuid"
}
},
"type" : "object",
"required":["cis", "at", "sid"]
}
}
}