فضانامها
در این مستند شما میتوانید endpointهای مربوط به عملیات فضانامها و همچنین مدل دادههای آنها را مشاهده کنید.
توجه
فرمت کلی این دادهها به صورت swagger contract نگارش شده است که میتوانید آن را از آدرس مخزن fandogh contracts مشاهده و دریافت کنید.
مشخصات اولیه
Contract Main Part
swagger: "2.0"
info:
description: "Fandogh API"
version: "1.0.0"
title: "Fandogh API"
host: "api.fandogh.cloud"
basePath: "/api"
schemes:
- "https"
consumes:
- "application/json"
produces:
- "application/json"
مدل های پاسخ سرور
General Response Models
ErrorItem:
type: object
additionalProperties:
type: array
items:
type: string
# in form of "field name": ["error1", "error2",..]
ErrorResponse:
type: object
properties:
errors:
type: array
items:
$ref: "#/definitions/ErrorItem"
MessageResponse:
type: object
properties:
contents:
type: object
properties:
message:
type: string
/users/namespaces/{namespace}
GET Method
Namespace Status
get:
tags:
- "Namespace"
description: "To get namespace status"
operationId: "Detail Services"
parameters:
- in: "path"
name: namespace
required: true
type: string
- in: "header"
name: "AUTHORIZATION"
description: "in this format: JWT [USER-TOKEN], where [USER-TOKEN] is user's token"
type: string
required: true
responses:
200:
description: "details of namespace"
schema:
$ref: "#/definitions/NamespaceModel"
401:
description: "Authentication required"
schema:
$ref: "#/definitions/MessageResponse"
404:
description: "Service not found"
schema:
$ref: "#/definitions/MessageResponse"
GET Response Model
Namespace Model
NamespaceModel:
type: object
properties:
name:
type: string
quota:
$ref: "#/definitions/QuotaModel"
current_used_resources:
$ref: "#/definitions/UsedResourcesModel"
Quota Model
QuotaModel:
type: object
properties:
memory_limit:
type: integer
cpu_limit:
type: number
service_limit:
type: integer
max_replica:
type: integer
pending_certificate_limit:
type: integer
Used Resources Model
UsedResourcesModel:
type: object
properties:
service_count:
type: integer
memory_usage:
type: integer
cpu_usage:
type: number