Tenant Repository API 1.1

Content type
OpenAPI specifications
Version
1.1
Language
English

Tenant Repository API 1.1

Provides information on tenants and authorizations.

{
  "openapi": "3.0.1",
  "info": {
    "title": "Tenant Repository API",
    "description": "Provides information on tenants and authorizations.",
    "termsOfService": "https://www.genetec.com/legal/cloudtos",
    "license": {
      "name": "Source Code License Agreement",
      "url": "https://www.genetec.com/legal/eula"
    },
    "version": "1.1"
  },
  "servers": [
    {
      "url": "/tenantrepository"
    }
  ],
  "paths": {
    "/admins/{adminId}": {
      "get": {
        "tags": [
          "Admin"
        ],
        "summary": "Get information of a specific client application.",
        "operationId": "GetAdmin",
        "parameters": [
          {
            "name": "adminId",
            "in": "path",
            "description": "The client identifier.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/vnd.genetec.admin+json; v=1.1": {
                "schema": {
                  "$ref": "#/components/schemas/AdminModel"
                }
              }
            }
          },
          "404": {
            "description": "Not Found"
          }
        }
      }
    },
    "/globaltenanting/globaltenants/{tenantId}/authorization": {
      "get": {
        "tags": [
          "Authorization"
        ],
        "parameters": [
          {
            "name": "tenantId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "401": {
            "description": "You do not meet the authentication requirements."
          },
          "403": {
            "description": "You do not have the required permissions to perform this operation."
          },
          "200": {
            "description": "Success",
            "content": {
              "application/vnd.genetec.tenantrepository.authorization+json; v=1.1": {
                "schema": {
                  "$ref": "#/components/schemas/AuthorizationModel"
                }
              }
            }
          }
        }
      }
    },
    "/globaltenanting/globaltenants": {
      "get": {
        "tags": [
          "GlobalTenanting"
        ],
        "summary": "Get a list of all tenants.",
        "operationId": "GetGlobalTenants",
        "parameters": [
          {
            "name": "clusterId",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "401": {
            "description": "You do not meet the authentication requirements."
          },
          "403": {
            "description": "You do not have the required permissions to perform this operation."
          },
          "200": {
            "description": "Success",
            "content": {
              "application/vnd.genetec.tenantlistresponse+json; v=1.1": {
                "schema": {
                  "$ref": "#/components/schemas/TenantListResponseModel"
                }
              }
            }
          }
        }
      }
    },
    "/globaltenanting/globaltenants/{tenantId}": {
      "get": {
        "tags": [
          "GlobalTenanting"
        ],
        "summary": "Get some global information about a tenant.",
        "operationId": "GetGlobalTenant",
        "parameters": [
          {
            "name": "tenantId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "401": {
            "description": "You do not meet the authentication requirements."
          },
          "403": {
            "description": "You do not have the required permissions to perform this operation."
          },
          "200": {
            "description": "Success",
            "content": {
              "application/vnd.genetec.tenant.globaltenant+json; v=1.1": {
                "schema": {
                  "$ref": "#/components/schemas/GlobalTenantModel"
                }
              }
            }
          }
        }
      }
    },
    "/owners/{ownerId}": {
      "get": {
        "tags": [
          "Owner"
        ],
        "summary": "Get information of a specific owner.",
        "operationId": "GetOwner",
        "parameters": [
          {
            "name": "ownerId",
            "in": "path",
            "description": "The owner identifier.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "text/plain; v=1.1": {
                "schema": {
                  "$ref": "#/components/schemas/OwnerModel"
                }
              },
              "application/json; v=1.1": {
                "schema": {
                  "$ref": "#/components/schemas/OwnerModel"
                }
              },
              "text/json; v=1.1": {
                "schema": {
                  "$ref": "#/components/schemas/OwnerModel"
                }
              }
            }
          },
          "404": {
            "description": "Not Found"
          }
        }
      }
    },
    "/retention-policies/tenant/{tenantId}": {
      "get": {
        "tags": [
          "RetentionPolicy"
        ],
        "summary": "Get default retention policy of a tenant.",
        "operationId": "GetDefaultRetentionPolicy",
        "parameters": [
          {
            "name": "tenantId",
            "in": "path",
            "description": "The tenant identifier.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/vnd.genetec.cloudarchives.retentionpolicymodel+json": {
                "schema": {
                  "$ref": "#/components/schemas/RetentionPolicyModel"
                }
              }
            }
          },
          "404": {
            "description": "Not Found"
          }
        }
      }
    },
    "/retention-policies/tenant/{tenantId}/stream/{streamId}": {
      "get": {
        "tags": [
          "RetentionPolicy"
        ],
        "summary": "Get retention policy of a specific stream.",
        "operationId": "GetStreamRetentionPolicy",
        "parameters": [
          {
            "name": "tenantId",
            "in": "path",
            "description": "The tenant identifier.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "streamId",
            "in": "path",
            "description": "Stream identifier.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/vnd.genetec.cloudarchives.retentionpolicymodel+json": {
                "schema": {
                  "$ref": "#/components/schemas/RetentionPolicyModel"
                }
              }
            }
          },
          "404": {
            "description": "Not Found"
          }
        }
      }
    },
    "/retention-policies/tenant/{tenantId}/streams": {
      "post": {
        "tags": [
          "RetentionPolicy"
        ],
        "summary": "Get retention policies for specified streams.",
        "operationId": "GetStreamRetentionPolicies",
        "parameters": [
          {
            "name": "tenantId",
            "in": "path",
            "description": "The tenant identifier.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "description": "Streams identifiers.",
          "content": {
            "application/vnd.genetec.cloudarchives.streamretentionpoliciesparameters+json; v=1.1": {
              "schema": {
                "$ref": "#/components/schemas/StreamRetentionPoliciesParameters"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/vnd.genetec.cloudarchives.streamretentionpoliciesresponse+json; v=1.1": {
                "schema": {
                  "$ref": "#/components/schemas/StreamRetentionPoliciesResponse"
                }
              }
            }
          }
        }
      }
    },
    "/systems/{systemId}": {
      "get": {
        "tags": [
          "System"
        ],
        "summary": "Get information of a specific system.",
        "operationId": "GetSystem",
        "parameters": [
          {
            "name": "systemId",
            "in": "path",
            "description": "The system identifier.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "text/plain; v=1.1": {
                "schema": {
                  "$ref": "#/components/schemas/SystemModel"
                }
              },
              "application/json; v=1.1": {
                "schema": {
                  "$ref": "#/components/schemas/SystemModel"
                }
              },
              "text/json; v=1.1": {
                "schema": {
                  "$ref": "#/components/schemas/SystemModel"
                }
              }
            }
          },
          "404": {
            "description": "Not Found"
          }
        }
      }
    },
    "/tenants/{tenantId}": {
      "get": {
        "tags": [
          "Tenant"
        ],
        "summary": "Get information on a specific tenant.",
        "operationId": "GetTenant",
        "parameters": [
          {
            "name": "tenantId",
            "in": "path",
            "description": "The tenant identifier.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/vnd.genetec.tenant+json; v=1.1": {
                "schema": {
                  "$ref": "#/components/schemas/TenantModel"
                }
              }
            }
          },
          "404": {
            "description": "Not Found"
          }
        }
      }
    },
    "/tenants": {
      "get": {
        "tags": [
          "Tenant"
        ],
        "summary": "Get a list of all tenants.",
        "operationId": "ListTenants",
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/vnd.genetec.tenantqueryresponse+json; v=1.1": {
                "schema": {
                  "$ref": "#/components/schemas/TenantQueryResponseModel"
                }
              }
            }
          }
        }
      }
    },
    "/tenants/{tenantId}/systems": {
      "get": {
        "tags": [
          "Tenant"
        ],
        "summary": "Get a list of all systems under a specific tenant.",
        "operationId": "GetSystems",
        "parameters": [
          {
            "name": "tenantId",
            "in": "path",
            "description": "The tenant identifier.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "text/plain; v=1.1": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/SystemModel"
                  }
                }
              },
              "application/json; v=1.1": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/SystemModel"
                  }
                }
              },
              "text/json; v=1.1": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/SystemModel"
                  }
                }
              }
            }
          },
          "404": {
            "description": "Not Found"
          }
        }
      }
    },
    "/tenants/{tenantId}/systems/{systemId}/owners": {
      "get": {
        "tags": [
          "Tenant"
        ],
        "summary": "Get a list of all owners under a specific tenant.",
        "operationId": "GetOwners",
        "parameters": [
          {
            "name": "tenantId",
            "in": "path",
            "description": "The tenant identifier.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "systemId",
            "in": "path",
            "description": "The system identifier.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "text/plain; v=1.1": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/SystemModel"
                  }
                }
              },
              "application/json; v=1.1": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/SystemModel"
                  }
                }
              },
              "text/json; v=1.1": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/SystemModel"
                  }
                }
              }
            }
          },
          "404": {
            "description": "Not Found"
          }
        }
      }
    },
    "/tenants/{tenantId}/stratox": {
      "get": {
        "tags": [
          "Tenant"
        ],
        "summary": "Gets the stratox tenant information.\r\nTemporary endpoint until service registry migration",
        "operationId": "GetStratoXTenant",
        "parameters": [
          {
            "name": "tenantId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success"
          }
        }
      }
    },
    "/upload-policies/tenant/{tenantId}": {
      "get": {
        "tags": [
          "UploadPolicy"
        ],
        "summary": "Get upload policy of a specific system.",
        "operationId": "GetUploadPolicy",
        "parameters": [
          {
            "name": "tenantId",
            "in": "path",
            "description": "The tenant identifier.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/vnd.genetec.cloudarchives.uploadpolicymodel+json": {
                "schema": {
                  "$ref": "#/components/schemas/UploadPolicyModel"
                }
              }
            }
          },
          "404": {
            "description": "Not Found"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "AdminModel": {
        "type": "object",
        "properties": {
          "adminId": {
            "type": "string",
            "nullable": true
          },
          "friendlyName": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "AuthorizationModel": {
        "type": "object",
        "properties": {
          "tenantId": {
            "type": "string",
            "nullable": true
          },
          "regionId": {
            "type": "string",
            "nullable": true
          },
          "hostname": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "DeleteRetentionModel": {
        "type": "object",
        "properties": {
          "applyToOlderThan": {
            "type": "string",
            "description": "Duration in the format ISO8601 'PnYnMnDTnHnMnS'",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "GlobalTenantModel": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "nullable": true
          },
          "stratoXSystemId": {
            "type": "string",
            "nullable": true
          },
          "clusterId": {
            "type": "string",
            "nullable": true
          },
          "hostname": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "A model for the tenant information returned by the GlobalTenantingController."
      },
      "LinkObjectModel": {
        "type": "object",
        "properties": {
          "href": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "LongTermRetentionModel": {
        "type": "object",
        "properties": {
          "applyToOlderThan": {
            "type": "string",
            "description": "Duration in the format ISO8601 'PnYnMnDTnHnMnS'",
            "nullable": true
          },
          "storageTier": {
            "$ref": "#/components/schemas/StorageTier"
          },
          "longTermStorageEnabled": {
            "type": "boolean"
          }
        },
        "additionalProperties": false
      },
      "OwnerModel": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "nullable": true
          },
          "tenantId": {
            "type": "string",
            "nullable": true
          },
          "systemId": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "RetentionPolicyModel": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "nullable": true
          },
          "version": {
            "type": "string",
            "nullable": true
          },
          "tenantId": {
            "type": "string",
            "nullable": true
          },
          "deleteRetention": {
            "$ref": "#/components/schemas/DeleteRetentionModel"
          },
          "longTermRetention": {
            "$ref": "#/components/schemas/LongTermRetentionModel"
          }
        },
        "additionalProperties": false
      },
      "StorageTier": {
        "enum": [
          "None",
          "Hot",
          "Cool",
          "Archive"
        ],
        "type": "string"
      },
      "StreamRetentionPoliciesParameters": {
        "type": "object",
        "properties": {
          "streams": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "StreamRetentionPoliciesResponse": {
        "type": "object",
        "properties": {
          "policiesPerStream": {
            "type": "object",
            "additionalProperties": {
              "$ref": "#/components/schemas/RetentionPolicyModel"
            },
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "SystemModel": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "nullable": true
          },
          "tenantId": {
            "type": "string",
            "nullable": true
          },
          "_links": {
            "$ref": "#/components/schemas/SystemModelLinks"
          }
        },
        "additionalProperties": false
      },
      "SystemModelLinks": {
        "type": "object",
        "properties": {
          "self": {
            "$ref": "#/components/schemas/LinkObjectModel"
          },
          "tenant": {
            "$ref": "#/components/schemas/LinkObjectModel"
          }
        },
        "additionalProperties": false
      },
      "TenantListItemModel": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "nullable": true
          },
          "regionId": {
            "type": "string",
            "nullable": true
          },
          "hostname": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "TenantListResponseModel": {
        "type": "object",
        "properties": {
          "tenants": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TenantListItemModel"
            },
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "TenantModel": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "nullable": true
          },
          "dataBlockServiceHome": {
            "type": "string",
            "nullable": true
          },
          "dataBlockServiceTenantId": {
            "type": "string",
            "nullable": true
          },
          "dataKeyId": {
            "type": "string",
            "nullable": true
          },
          "dataPublicKey": {
            "type": "string",
            "nullable": true
          },
          "dataJsonWebKey": {
            "type": "string",
            "nullable": true
          },
          "dataKeyType": {
            "type": "string",
            "nullable": true
          },
          "shardIndex": {
            "type": "integer",
            "format": "int32"
          },
          "hotStorageCapacityBytes": {
            "type": "integer",
            "format": "int64"
          },
          "coolStorageCapacityBytes": {
            "type": "integer",
            "format": "int64"
          },
          "archiveStorageCapacityBytes": {
            "type": "integer",
            "format": "int64"
          },
          "technicalContacts": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          },
          "isBillableTenant": {
            "type": "boolean"
          },
          "isArchiveOnly": {
            "type": "boolean"
          },
          "storageCapacityEnabled": {
            "type": "boolean"
          },
          "securityCenterOrchestrationEnabled": {
            "type": "boolean"
          },
          "allowedCameraConnections": {
            "type": "integer",
            "format": "int32"
          },
          "_links": {
            "$ref": "#/components/schemas/TenantModelLinks"
          }
        },
        "additionalProperties": false
      },
      "TenantModelLinks": {
        "type": "object",
        "properties": {
          "self": {
            "$ref": "#/components/schemas/LinkObjectModel"
          }
        },
        "additionalProperties": false
      },
      "TenantQueryResponseModel": {
        "type": "object",
        "properties": {
          "tenants": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TenantModel"
            },
            "nullable": true
          },
          "_links": {
            "$ref": "#/components/schemas/TenantQueryResponseModelLinks"
          }
        },
        "additionalProperties": false
      },
      "TenantQueryResponseModelLinks": {
        "type": "object",
        "properties": {
          "self": {
            "$ref": "#/components/schemas/LinkObjectModel"
          }
        },
        "additionalProperties": false
      },
      "UploadPolicyModel": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "nullable": true
          },
          "tenantId": {
            "type": "string",
            "nullable": true
          },
          "uploadAfter": {
            "type": "string",
            "description": "Duration in the format ISO8601 'PnYnMnDTnHnMnS'",
            "nullable": true
          },
          "neverUpload": {
            "type": "boolean"
          }
        },
        "additionalProperties": false
      }
    },
    "securitySchemes": {
      "GenetecSts": {
        "type": "oauth2",
        "flows": {
          "authorizationCode": {
            "authorizationUrl": "https://login.genetec.com/connect/authorize",
            "tokenUrl": "https://login.genetec.com/connect/token",
            "scopes": {
              "genetec_one.api": "Calls made to G1 Api",
              "oms.platform": "Used to obtain tenant information",
              "openid": "Used to obtain the user's unique identifier"
            }
          }
        }
      }
    }
  },
  "security": [
    {
      "GenetecSts": [
        "genetec_one.api",
        "oms.platform",
        "openid"
      ]
    }
  ]
}