{
  "swagger": "2.0",
  "schemes": [
    "http"
  ],
  "host": "api.citysdk.waag.org",
  "basePath": "/",
  "info": {
    "description": "An API for the distribution and annotation of open data, for small cities and big metropolitan areas.",
    "title": "CitySDK Linked Data",
    "version": "v1",
    "x-apisguru-categories": [
      "open_data"
    ],
    "x-logo": {
      "url": "https://api.apis.guru/v2/cache/logo/https_twitter.com_waag_profile_image.png"
    },
    "x-origin": [
      {
        "converter": {
          "url": "https://github.com/lucybot/api-spec-converter",
          "version": "2.7.11"
        },
        "format": "swagger",
        "url": "https://api.citysdk.waag.org/swagger",
        "version": "1.2"
      }
    ],
    "x-preferred": true,
    "x-providerName": "waag.org",
    "x-datafire": {
      "name": "waag",
      "type": "openapi"
    }
  },
  "produces": [
    "application/json",
    "application/ld+json"
  ],
  "tags": [
    {
      "description": "Operations about layers",
      "name": "layers"
    },
    {
      "description": "Operations about ngsi10s",
      "name": "ngsi10"
    },
    {
      "description": "Operations about objects",
      "name": "objects"
    },
    {
      "description": "Operations about owners",
      "name": "owners"
    },
    {
      "description": "Operations about sessions",
      "name": "session"
    }
  ],
  "paths": {
    "/layers": {
      "get": {
        "operationId": "layers.get",
        "responses": {
          "200": {
            "description": "No response was specified"
          }
        },
        "summary": "Return all layers",
        "tags": [
          "layers"
        ]
      },
      "post": {
        "operationId": "layers.post",
        "responses": {
          "200": {
            "description": "No response was specified"
          }
        },
        "summary": "Create new layer",
        "tags": [
          "layers"
        ]
      }
    },
    "/layers/{layer}": {
      "delete": {
        "operationId": "layers.layer.delete",
        "parameters": [
          {
            "in": "path",
            "name": "layer",
            "required": true,
            "type": "string"
          }
        ],
        "responses": {
          "200": {
            "description": "No response was specified"
          }
        },
        "summary": "Delete a layer",
        "tags": [
          "layers"
        ]
      },
      "get": {
        "operationId": "layers.layer.get",
        "parameters": [
          {
            "in": "path",
            "name": "layer",
            "required": true,
            "type": "string"
          }
        ],
        "responses": {
          "200": {
            "description": "No response was specified"
          }
        },
        "summary": "Return single layer",
        "tags": [
          "layers"
        ]
      },
      "patch": {
        "operationId": "layers.layer.patch",
        "parameters": [
          {
            "in": "path",
            "name": "layer",
            "required": true,
            "type": "string"
          }
        ],
        "responses": {
          "200": {
            "description": "No response was specified"
          }
        },
        "summary": "Edit a layer",
        "tags": [
          "layers"
        ]
      }
    },
    "/layers/{layer}/context": {
      "get": {
        "operationId": "layers.layer.context.get",
        "parameters": [
          {
            "in": "path",
            "name": "layer",
            "required": true,
            "type": "string"
          }
        ],
        "responses": {
          "200": {
            "description": "No response was specified"
          }
        },
        "summary": "Return JSON-LD context of single layer",
        "tags": [
          "layers"
        ]
      },
      "put": {
        "operationId": "layers.layer.context.put",
        "parameters": [
          {
            "in": "path",
            "name": "layer",
            "required": true,
            "type": "string"
          }
        ],
        "responses": {
          "200": {
            "description": "No response was specified"
          }
        },
        "summary": "Overwrite JSON-LD context of single layer",
        "tags": [
          "layers"
        ]
      }
    },
    "/layers/{layer}/fields": {
      "get": {
        "operationId": "layers.layer.fields.get",
        "parameters": [
          {
            "in": "path",
            "name": "layer",
            "required": true,
            "type": "string"
          }
        ],
        "responses": {
          "200": {
            "description": "No response was specified"
          }
        },
        "summary": "Return all fields of single layer",
        "tags": [
          "layers"
        ]
      },
      "post": {
        "operationId": "layers.layer.fields.post",
        "parameters": [
          {
            "in": "path",
            "name": "layer",
            "required": true,
            "type": "string"
          }
        ],
        "responses": {
          "200": {
            "description": "No response was specified"
          }
        },
        "summary": "Create new field for single layer",
        "tags": [
          "layers"
        ]
      }
    },
    "/layers/{layer}/fields/{field}": {
      "delete": {
        "operationId": "layers.layer.fields.field.delete",
        "parameters": [
          {
            "in": "path",
            "name": "layer",
            "required": true,
            "type": "string"
          },
          {
            "in": "path",
            "name": "field",
            "required": true,
            "type": "string"
          }
        ],
        "responses": {
          "200": {
            "description": "No response was specified"
          }
        },
        "summary": "Delete a single field on single layer",
        "tags": [
          "layers"
        ]
      },
      "get": {
        "operationId": "layers.layer.fields.field.get",
        "parameters": [
          {
            "in": "path",
            "name": "layer",
            "required": true,
            "type": "string"
          },
          {
            "in": "path",
            "name": "field",
            "required": true,
            "type": "string"
          }
        ],
        "responses": {
          "200": {
            "description": "No response was specified"
          }
        },
        "summary": "Return single field of single layer",
        "tags": [
          "layers"
        ]
      },
      "patch": {
        "operationId": "layers.layer.fields.field.patch",
        "parameters": [
          {
            "in": "path",
            "name": "layer",
            "required": true,
            "type": "string"
          },
          {
            "in": "path",
            "name": "field",
            "required": true,
            "type": "string"
          }
        ],
        "responses": {
          "200": {
            "description": "No response was specified"
          }
        },
        "summary": "Edit single field on single layer",
        "tags": [
          "layers"
        ]
      },
      "put": {
        "operationId": "layers.layer.fields.field.put",
        "parameters": [
          {
            "in": "path",
            "name": "layer",
            "required": true,
            "type": "string"
          },
          {
            "in": "path",
            "name": "field",
            "required": true,
            "type": "string"
          }
        ],
        "responses": {
          "200": {
            "description": "No response was specified"
          }
        },
        "summary": "Overwrite single field on single layer",
        "tags": [
          "layers"
        ]
      }
    },
    "/layers/{layer}/objects": {
      "delete": {
        "operationId": "layers.layer.objects.delete",
        "parameters": [
          {
            "in": "path",
            "name": "layer",
            "required": true,
            "type": "string"
          }
        ],
        "responses": {
          "200": {
            "description": "No response was specified"
          }
        },
        "summary": "Delete all objects from a single layer",
        "tags": [
          "layers"
        ]
      },
      "get": {
        "operationId": "layers.layer.objects.get",
        "parameters": [
          {
            "in": "path",
            "name": "layer",
            "required": true,
            "type": "string"
          }
        ],
        "responses": {
          "200": {
            "description": "No response was specified"
          }
        },
        "summary": "Return all objects with data on single layer",
        "tags": [
          "layers"
        ]
      },
      "patch": {
        "operationId": "layers.layer.objects.patch",
        "parameters": [
          {
            "in": "path",
            "name": "layer",
            "required": true,
            "type": "string"
          }
        ],
        "responses": {
          "200": {
            "description": "No response was specified"
          }
        },
        "summary": "Edit one or more objects and data on single layer",
        "tags": [
          "layers"
        ]
      },
      "post": {
        "operationId": "layers.layer.objects.post",
        "parameters": [
          {
            "in": "path",
            "name": "layer",
            "required": true,
            "type": "string"
          }
        ],
        "responses": {
          "200": {
            "description": "No response was specified"
          }
        },
        "summary": "Create one or more objects with data on single layer, or add data to existing objects (or a combination thereof)",
        "tags": [
          "layers"
        ]
      }
    },
    "/layers/{layer}/objects/{cdk_id}": {
      "get": {
        "operationId": "layers.layer.objects.cdk_id.get",
        "parameters": [
          {
            "in": "path",
            "name": "layer",
            "required": true,
            "type": "string"
          },
          {
            "in": "path",
            "name": "cdk_id",
            "required": true,
            "type": "string"
          }
        ],
        "responses": {
          "200": {
            "description": "No response was specified"
          }
        },
        "summary": "Return metadata of single layer about single object, e.g. the date the data was added/modified, etc.",
        "tags": [
          "layers"
        ]
      }
    },
    "/layers/{layer}/owners": {
      "get": {
        "operationId": "layers.layer.owners.get",
        "parameters": [
          {
            "in": "path",
            "name": "layer",
            "required": true,
            "type": "string"
          }
        ],
        "responses": {
          "200": {
            "description": "No response was specified"
          }
        },
        "summary": "Return all owners associated with single layer",
        "tags": [
          "layers"
        ]
      }
    },
    "/ngsi10/contextEntities/{entity}": {
      "get": {
        "operationId": "ngsi10.contextEntities.entity.get",
        "parameters": [
          {
            "in": "path",
            "name": "entity",
            "required": true,
            "type": "string"
          }
        ],
        "responses": {
          "200": {
            "description": "No response was specified"
          }
        },
        "summary": "Return single context entity",
        "tags": [
          "ngsi10"
        ]
      }
    },
    "/ngsi10/contextEntities/{entity}/attributes": {
      "put": {
        "operationId": "ngsi10.contextEntities.entity.attributes.put",
        "parameters": [
          {
            "in": "path",
            "name": "entity",
            "required": true,
            "type": "string"
          }
        ],
        "responses": {
          "200": {
            "description": "No response was specified"
          }
        },
        "summary": "Update attributes for single context entity",
        "tags": [
          "ngsi10"
        ]
      }
    },
    "/ngsi10/contextEntities/{entity}/attributes/{attribute}": {
      "get": {
        "operationId": "ngsi10.contextEntities.entity.attributes.attribute.get",
        "parameters": [
          {
            "in": "path",
            "name": "entity",
            "required": true,
            "type": "string"
          },
          {
            "in": "path",
            "name": "attribute",
            "required": true,
            "type": "string"
          }
        ],
        "responses": {
          "200": {
            "description": "No response was specified"
          }
        },
        "summary": "Return single context entity attribute",
        "tags": [
          "ngsi10"
        ]
      }
    },
    "/ngsi10/contextEntityTypes/{cetype}": {
      "get": {
        "operationId": "ngsi10.contextEntityTypes.cetype.get",
        "parameters": [
          {
            "in": "path",
            "name": "cetype",
            "required": true,
            "type": "string"
          }
        ],
        "responses": {
          "200": {
            "description": "No response was specified"
          }
        },
        "summary": "Return objects of particular type",
        "tags": [
          "ngsi10"
        ]
      }
    },
    "/ngsi10/contextEntityTypes/{cetype}/attributes/{attribute}": {
      "get": {
        "operationId": "ngsi10.contextEntityTypes.cetype.attributes.attribute.get",
        "parameters": [
          {
            "in": "path",
            "name": "cetype",
            "required": true,
            "type": "string"
          },
          {
            "in": "path",
            "name": "attribute",
            "required": true,
            "type": "string"
          }
        ],
        "responses": {
          "200": {
            "description": "No response was specified"
          }
        },
        "summary": "Return objects of particular type",
        "tags": [
          "ngsi10"
        ]
      }
    },
    "/ngsi10/queryContext": {
      "post": {
        "operationId": "ngsi10.queryContext.post",
        "responses": {
          "200": {
            "description": "No response was specified"
          }
        },
        "summary": "Query context broker for contextElements",
        "tags": [
          "ngsi10"
        ]
      }
    },
    "/ngsi10/subscribeContext": {
      "post": {
        "operationId": "ngsi10.subscribeContext.post",
        "responses": {
          "200": {
            "description": "No response was specified"
          }
        },
        "summary": "Create a new context subscription",
        "tags": [
          "ngsi10"
        ]
      }
    },
    "/ngsi10/unsubscribeContext": {
      "post": {
        "operationId": "ngsi10.unsubscribeContext.post",
        "responses": {
          "200": {
            "description": "No response was specified"
          }
        },
        "summary": "Delete a context subscription",
        "tags": [
          "ngsi10"
        ]
      }
    },
    "/ngsi10/updateContext": {
      "post": {
        "operationId": "ngsi10.updateContext.post",
        "responses": {
          "200": {
            "description": "No response was specified"
          }
        },
        "summary": "Add or update NGSI contextElements",
        "tags": [
          "ngsi10"
        ]
      }
    },
    "/ngsi10/updateContextSubscription": {
      "post": {
        "operationId": "ngsi10.updateContextSubscription.post",
        "responses": {
          "200": {
            "description": "No response was specified"
          }
        },
        "summary": "Update/edit a context subscription",
        "tags": [
          "ngsi10"
        ]
      }
    },
    "/objects": {
      "get": {
        "operationId": "objects.get",
        "responses": {
          "200": {
            "description": "No response was specified"
          }
        },
        "summary": "Return all objects",
        "tags": [
          "objects"
        ]
      }
    },
    "/objects/{cdk_id}": {
      "delete": {
        "operationId": "objects.cdk_id.delete",
        "parameters": [
          {
            "in": "path",
            "name": "cdk_id",
            "required": true,
            "type": "string"
          }
        ],
        "responses": {
          "200": {
            "description": "No response was specified"
          }
        },
        "summary": "Delete a single object",
        "tags": [
          "objects"
        ]
      },
      "get": {
        "operationId": "objects.cdk_id.get",
        "parameters": [
          {
            "in": "path",
            "name": "cdk_id",
            "required": true,
            "type": "string"
          }
        ],
        "responses": {
          "200": {
            "description": "No response was specified"
          }
        },
        "summary": "Get a single object",
        "tags": [
          "objects"
        ]
      },
      "patch": {
        "operationId": "objects.cdk_id.patch",
        "parameters": [
          {
            "in": "path",
            "name": "cdk_id",
            "required": true,
            "type": "string"
          }
        ],
        "responses": {
          "200": {
            "description": "No response was specified"
          }
        },
        "summary": "Edit a single object",
        "tags": [
          "objects"
        ]
      }
    },
    "/objects/{cdk_id}/layers": {
      "get": {
        "operationId": "objects.cdk_id.layers.get",
        "parameters": [
          {
            "in": "path",
            "name": "cdk_id",
            "required": true,
            "type": "string"
          }
        ],
        "responses": {
          "200": {
            "description": "No response was specified"
          }
        },
        "summary": "Get all layers that contain data of single object",
        "tags": [
          "objects"
        ]
      }
    },
    "/objects/{cdk_id}/layers/{layer}": {
      "delete": {
        "operationId": "objects.cdk_id.layers.layer.delete",
        "parameters": [
          {
            "in": "path",
            "name": "cdk_id",
            "required": true,
            "type": "string"
          },
          {
            "in": "path",
            "name": "layer",
            "required": true,
            "type": "string"
          }
        ],
        "responses": {
          "200": {
            "description": "No response was specified"
          }
        },
        "summary": "Remove data on layer from single object",
        "tags": [
          "objects"
        ]
      },
      "get": {
        "operationId": "objects.cdk_id.layers.layer.get",
        "parameters": [
          {
            "in": "path",
            "name": "cdk_id",
            "required": true,
            "type": "string"
          },
          {
            "in": "path",
            "name": "layer",
            "required": true,
            "type": "string"
          }
        ],
        "responses": {
          "200": {
            "description": "No response was specified"
          }
        },
        "summary": "Return all data on single layer of single object",
        "tags": [
          "objects"
        ]
      },
      "patch": {
        "operationId": "objects.cdk_id.layers.layer.patch",
        "parameters": [
          {
            "in": "path",
            "name": "cdk_id",
            "required": true,
            "type": "string"
          },
          {
            "in": "path",
            "name": "layer",
            "required": true,
            "type": "string"
          }
        ],
        "responses": {
          "200": {
            "description": "No response was specified"
          }
        },
        "summary": "Update data on layer to single object",
        "tags": [
          "objects"
        ]
      },
      "post": {
        "operationId": "objects.cdk_id.layers.layer.post",
        "parameters": [
          {
            "in": "path",
            "name": "cdk_id",
            "required": true,
            "type": "string"
          },
          {
            "in": "path",
            "name": "layer",
            "required": true,
            "type": "string"
          }
        ],
        "responses": {
          "200": {
            "description": "No response was specified"
          }
        },
        "summary": "Add data on layer to single object",
        "tags": [
          "objects"
        ]
      },
      "put": {
        "operationId": "objects.cdk_id.layers.layer.put",
        "parameters": [
          {
            "in": "path",
            "name": "cdk_id",
            "required": true,
            "type": "string"
          },
          {
            "in": "path",
            "name": "layer",
            "required": true,
            "type": "string"
          }
        ],
        "responses": {
          "200": {
            "description": "No response was specified"
          }
        },
        "summary": "Overwrite data on layer to single object",
        "tags": [
          "objects"
        ]
      }
    },
    "/owners": {
      "get": {
        "operationId": "owners.get",
        "responses": {
          "200": {
            "description": "No response was specified"
          }
        },
        "summary": "Return all owners",
        "tags": [
          "owners"
        ]
      },
      "post": {
        "operationId": "owners.post",
        "responses": {
          "200": {
            "description": "No response was specified"
          }
        },
        "summary": "Create new owner",
        "tags": [
          "owners"
        ]
      }
    },
    "/owners/{owner}": {
      "delete": {
        "operationId": "owners.owner.delete",
        "parameters": [
          {
            "in": "path",
            "name": "owner",
            "required": true,
            "type": "string"
          }
        ],
        "responses": {
          "200": {
            "description": "No response was specified"
          }
        },
        "summary": "Delete owner - and all layers and data belonging to this owner",
        "tags": [
          "owners"
        ]
      },
      "get": {
        "operationId": "owners.owner.get",
        "parameters": [
          {
            "in": "path",
            "name": "owner",
            "required": true,
            "type": "string"
          }
        ],
        "responses": {
          "200": {
            "description": "No response was specified"
          }
        },
        "summary": "Get a single owner",
        "tags": [
          "owners"
        ]
      },
      "patch": {
        "operationId": "owners.owner.patch",
        "parameters": [
          {
            "in": "path",
            "name": "owner",
            "required": true,
            "type": "string"
          }
        ],
        "responses": {
          "200": {
            "description": "No response was specified"
          }
        },
        "summary": "Edit an owner",
        "tags": [
          "owners"
        ]
      }
    },
    "/owners/{owner}/layers": {
      "get": {
        "operationId": "owners.owner.layers.get",
        "parameters": [
          {
            "in": "path",
            "name": "owner",
            "required": true,
            "type": "string"
          }
        ],
        "responses": {
          "200": {
            "description": "No response was specified"
          }
        },
        "summary": "Return all layers belonging to a single owner",
        "tags": [
          "owners"
        ]
      }
    },
    "/session": {
      "delete": {
        "operationId": "session.delete",
        "responses": {
          "200": {
            "description": "No response was specified"
          }
        },
        "summary": "Close session",
        "tags": [
          "session"
        ]
      },
      "get": {
        "operationId": "session.get",
        "parameters": [
          {
            "description": "Login name.",
            "in": "query",
            "name": "name",
            "required": true,
            "type": "string"
          },
          {
            "description": "Login password.",
            "in": "query",
            "name": "password",
            "required": true,
            "type": "string"
          }
        ],
        "responses": {
          "200": {
            "description": "No response was specified"
          }
        },
        "summary": "Return a session key",
        "tags": [
          "session"
        ]
      }
    }
  }
}