{
  "basePath": "/",
  "definitions": {
    "apitoken.CreateAPITokenRequest": {
      "properties": {
        "name": {
          "type": "string"
        }
      },
      "required": [
        "name"
      ],
      "type": "object"
    },
    "models.APIToken": {
      "properties": {
        "created_at": {
          "type": "string"
        },
        "id": {
          "type": "integer"
        },
        "name": {
          "type": "string"
        },
        "prefix": {
          "type": "string"
        },
        "project": {
          "$ref": "#/definitions/models.Project"
        },
        "project_id": {
          "type": "integer"
        },
        "revoked": {
          "type": "boolean"
        },
        "token": {
          "type": "string"
        },
        "updated_at": {
          "type": "string"
        },
        "user_id": {
          "type": "integer"
        }
      },
      "type": "object"
    },
    "models.Project": {
      "properties": {
        "created_at": {
          "type": "string"
        },
        "deleted_at": {
          "format": "date-time",
          "type": "string",
          "x-nullable": true
        },
        "guid": {
          "type": "string"
        },
        "id": {
          "type": "integer"
        },
        "is_internal": {
          "type": "boolean"
        },
        "name": {
          "type": "string"
        },
        "updated_at": {
          "type": "string"
        },
        "user_id": {
          "type": "integer"
        }
      },
      "type": "object"
    },
    "models.S3Bucket": {
      "properties": {
        "capacity": {
          "type": "integer"
        },
        "created_at": {
          "type": "string"
        },
        "custom_domain": {
          "$ref": "#/definitions/models.S3CustomDomain"
        },
        "deleted_at": {
          "format": "date-time",
          "type": "string",
          "x-nullable": true
        },
        "endpoint": {
          "type": "string"
        },
        "id": {
          "type": "integer"
        },
        "is_public": {
          "type": "boolean"
        },
        "location": {
          "type": "string"
        },
        "name": {
          "type": "string"
        },
        "object_lock_enabled": {
          "type": "boolean"
        },
        "objects_count": {
          "type": "integer"
        },
        "project_id": {
          "type": "integer"
        },
        "provider": {
          "$ref": "#/definitions/models.S3Provider"
        },
        "provisioning_error": {
          "type": "string"
        },
        "status": {
          "$ref": "#/definitions/models.S3BucketStatus"
        },
        "updated_at": {
          "type": "string"
        },
        "used_bytes": {
          "type": "integer"
        },
        "user_id": {
          "type": "integer"
        },
        "virtual_host_endpoint": {
          "type": "string"
        }
      },
      "type": "object"
    },
    "models.S3BucketStatus": {
      "enum": [
        "PENDING",
        "READY",
        "FAILED",
        "DELETING",
        "DELETE_FAILED"
      ],
      "type": "string",
      "x-enum-varnames": [
        "S3BucketStatusPending",
        "S3BucketStatusReady",
        "S3BucketStatusFailed",
        "S3BucketStatusDeleting",
        "S3BucketStatusDeleteFailed"
      ]
    },
    "models.S3CustomDomain": {
      "properties": {
        "cname": {
          "type": "string"
        },
        "error": {
          "type": "string"
        },
        "name": {
          "type": "string"
        },
        "status": {
          "$ref": "#/definitions/models.S3CustomDomainStatus"
        },
        "verified_at": {
          "type": "string"
        }
      },
      "type": "object"
    },
    "models.S3CustomDomainStatus": {
      "enum": [
        "PENDING",
        "READY",
        "FAILED",
        "DELETING"
      ],
      "type": "string",
      "x-enum-varnames": [
        "S3CustomDomainStatusPending",
        "S3CustomDomainStatusReady",
        "S3CustomDomainStatusFailed",
        "S3CustomDomainStatusDeleting"
      ]
    },
    "models.S3Provider": {
      "enum": [
        "MINIO",
        "CEPH"
      ],
      "type": "string",
      "x-enum-varnames": [
        "S3ProviderMinIO",
        "S3ProviderCeph"
      ]
    },
    "models.S3bucketCredentials": {
      "properties": {
        "access_key": {
          "type": "string"
        },
        "created_at": {
          "type": "string"
        },
        "deleted_at": {
          "format": "date-time",
          "type": "string",
          "x-nullable": true
        },
        "description": {
          "type": "string"
        },
        "id": {
          "type": "integer"
        },
        "permission": {
          "type": "string"
        },
        "project_id": {
          "type": "integer"
        },
        "s3_bucket_id": {
          "type": "integer"
        },
        "secret_key": {
          "type": "string"
        },
        "updated_at": {
          "type": "string"
        }
      },
      "type": "object"
    },
    "project.CreateDomain": {
      "properties": {
        "name": {
          "type": "string"
        }
      },
      "required": [
        "name"
      ],
      "type": "object"
    },
    "project.DeleteConflictResponse": {
      "properties": {
        "blockers": {
          "items": {
            "$ref": "#/definitions/project.DeletionBlocker"
          },
          "type": "array"
        },
        "message": {
          "type": "string"
        }
      },
      "type": "object"
    },
    "project.DeletionBlocker": {
      "properties": {
        "count": {
          "type": "integer"
        },
        "service": {
          "type": "string"
        }
      },
      "type": "object"
    },
    "project.ProjectWithRole": {
      "properties": {
        "created_at": {
          "type": "string"
        },
        "deleted_at": {
          "format": "date-time",
          "type": "string",
          "x-nullable": true
        },
        "guid": {
          "type": "string"
        },
        "id": {
          "type": "integer"
        },
        "is_internal": {
          "type": "boolean"
        },
        "name": {
          "type": "string"
        },
        "role": {
          "type": "string"
        },
        "updated_at": {
          "type": "string"
        },
        "user_id": {
          "type": "integer"
        }
      },
      "type": "object"
    },
    "response.ApiResponse": {
      "properties": {
        "meta": {
          "$ref": "#/definitions/response.Meta"
        },
        "objects": {}
      },
      "type": "object"
    },
    "response.Message": {
      "properties": {
        "message": {
          "type": "string"
        }
      },
      "type": "object"
    },
    "response.Meta": {
      "properties": {
        "count": {
          "type": "integer"
        },
        "next": {
          "type": "string"
        }
      },
      "type": "object"
    },
    "s3.CreateBucketCredential": {
      "properties": {
        "description": {
          "type": "string"
        },
        "permission": {
          "enum": [
            "READ_ONLY",
            "WRITE_ONLY",
            "READ_WRITE"
          ],
          "type": "string"
        }
      },
      "required": [
        "description",
        "permission"
      ],
      "type": "object"
    },
    "s3.CreateBucketDomain": {
      "properties": {
        "bucket_name": {
          "type": "string"
        },
        "capacity": {
          "type": "integer"
        },
        "is_public": {
          "type": "boolean"
        },
        "object_lock_enabled": {
          "type": "boolean"
        }
      },
      "required": [
        "bucket_name",
        "capacity"
      ],
      "type": "object"
    },
    "s3.UpdateBucketDomain": {
      "properties": {
        "capacity": {
          "maximum": 300,
          "minimum": 10,
          "type": "integer"
        },
        "is_public": {
          "type": "boolean"
        }
      },
      "type": "object"
    }
  },
  "host": "gateway.abrbit.com",
  "info": {
    "title": "مرجع API ابربیت",
    "version": "v1"
  },
  "paths": {
    "/api/v1/project/{project_guid}/s3/buckets/": {
      "get": {
        "consumes": [
          "application/json"
        ],
        "description": "عضویت پروژه لازم است؛ پاسخ objects و meta دارد و صفحه‌بندی ندارد.\n\nراهنمای عملی: [ذخیره‌سازی و باکت](/docs/storage/)",
        "externalDocs": {
          "description": "ذخیره‌سازی و باکت",
          "url": "https://abrbit.com/docs/storage/"
        },
        "parameters": [
          {
            "description": "project guid",
            "in": "path",
            "name": "project_guid",
            "required": true,
            "type": "string"
          }
        ],
        "produces": [
          "application/json"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "allOf": [
                {
                  "$ref": "#/definitions/response.ApiResponse"
                },
                {
                  "properties": {
                    "objects": {
                      "items": {
                        "$ref": "#/definitions/models.S3Bucket"
                      },
                      "type": "array"
                    }
                  },
                  "type": "object"
                }
              ]
            }
          },
          "401": {
            "description": "توکن ارسال نشده یا معتبر نیست؛ بدنه ممکن است خالی باشد"
          },
          "403": {
            "description": "دسترسی یا پیش‌نیاز حساب تأیید نشد"
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "summary": "فهرست باکت‌ها",
        "tags": [
          "ذخیره‌سازی و باکت"
        ]
      },
      "post": {
        "consumes": [
          "application/json"
        ],
        "description": "حساب فعال، شمارهٔ تأییدشده و نقش مالک، مدیر یا عضو لازم است. این عملیات هزینه‌دار است؛ نام ۵ تا ۶۳ نویسهٔ کوچک انگلیسی، عدد، نقطه یا خط تیره و ظرفیت ۱۰ تا ۳۰۰ GiB لازم است. نام باید با حرف یا عدد شروع و تمام شود و دو نقطهٔ متوالی نداشته باشد. کلید object_lock_enabled هنگام ساخت تعیین می‌شود. فقط در وضعیت READY انتقال داده را شروع کنید.\n\nراهنمای عملی: [ذخیره‌سازی و باکت](/docs/storage/)",
        "externalDocs": {
          "description": "ذخیره‌سازی و باکت",
          "url": "https://abrbit.com/docs/storage/"
        },
        "parameters": [
          {
            "description": "تنظیمات باکت",
            "in": "body",
            "name": "data",
            "required": true,
            "schema": {
              "$ref": "#/definitions/s3.CreateBucketDomain"
            }
          },
          {
            "description": "project guid",
            "in": "path",
            "name": "project_guid",
            "required": true,
            "type": "string"
          }
        ],
        "produces": [
          "application/json"
        ],
        "responses": {
          "201": {
            "description": "Created",
            "schema": {
              "$ref": "#/definitions/models.S3Bucket"
            }
          },
          "400": {
            "description": "Bad Request",
            "schema": {
              "$ref": "#/definitions/response.Message"
            }
          },
          "401": {
            "description": "توکن ارسال نشده یا معتبر نیست؛ بدنه ممکن است خالی باشد"
          },
          "403": {
            "description": "دسترسی یا پیش‌نیاز حساب تأیید نشد"
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "summary": "ساخت باکت خصوصی یا عمومی",
        "tags": [
          "ذخیره‌سازی و باکت"
        ]
      }
    },
    "/api/v1/project/{project_guid}/s3/buckets/{bucket_name}/": {
      "delete": {
        "consumes": [
          "application/json"
        ],
        "description": "حساب فعال، شمارهٔ تأییدشده و نقش مالک، مدیر یا عضو لازم است. حذف باکت غیرخالی با ۴۰۹ رد می‌شود؛ حذف اجباری بخشی از این عملیات نیست. پاسخ موفق رشتهٔ JSON برابر deleted است.\n\nراهنمای عملی: [ذخیره‌سازی و باکت](/docs/storage/)",
        "externalDocs": {
          "description": "ذخیره‌سازی و باکت",
          "url": "https://abrbit.com/docs/storage/"
        },
        "parameters": [
          {
            "description": "project guid",
            "in": "path",
            "name": "project_guid",
            "required": true,
            "type": "string"
          },
          {
            "description": "bucket name",
            "in": "path",
            "name": "bucket_name",
            "required": true,
            "type": "string"
          }
        ],
        "produces": [
          "application/json"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "type": "string"
            }
          },
          "400": {
            "description": "Bad Request",
            "schema": {
              "$ref": "#/definitions/response.Message"
            }
          },
          "401": {
            "description": "توکن ارسال نشده یا معتبر نیست؛ بدنه ممکن است خالی باشد"
          },
          "403": {
            "description": "دسترسی یا پیش‌نیاز حساب تأیید نشد"
          },
          "409": {
            "description": "Conflict",
            "schema": {
              "$ref": "#/definitions/response.Message"
            }
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "summary": "حذف امن باکت خالی",
        "tags": [
          "ذخیره‌سازی و باکت"
        ]
      },
      "get": {
        "consumes": [
          "application/json"
        ],
        "description": "عضویت پروژه لازم است؛ endpoint آدرس API انتقال فایل است. ظرفیت بر حسب GiB و used_bytes بر حسب بایت است.\n\nراهنمای عملی: [ذخیره‌سازی و باکت](/docs/storage/)",
        "externalDocs": {
          "description": "ذخیره‌سازی و باکت",
          "url": "https://abrbit.com/docs/storage/"
        },
        "parameters": [
          {
            "description": "project guid",
            "in": "path",
            "name": "project_guid",
            "required": true,
            "type": "string"
          },
          {
            "description": "bucket name",
            "in": "path",
            "name": "bucket_name",
            "required": true,
            "type": "string"
          }
        ],
        "produces": [
          "application/json"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/models.S3Bucket"
            }
          },
          "401": {
            "description": "توکن ارسال نشده یا معتبر نیست؛ بدنه ممکن است خالی باشد"
          },
          "403": {
            "description": "دسترسی یا پیش‌نیاز حساب تأیید نشد"
          },
          "404": {
            "description": "Not Found",
            "schema": {
              "$ref": "#/definitions/response.Message"
            }
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "summary": "جزئیات و وضعیت باکت",
        "tags": [
          "ذخیره‌سازی و باکت"
        ]
      },
      "patch": {
        "consumes": [
          "application/json"
        ],
        "description": "حساب فعال، شمارهٔ تأییدشده و نقش مالک، مدیر یا عضو لازم است. نام تغییرپذیر نیست؛ capacity بین ۱۰ تا ۳۰۰ GiB و دست‌کم برابر مصرف باشد. تغییر ظرفیت می‌تواند هزینه را تغییر دهد؛ is_public=true فایل‌ها را از آدرس مستقیم بدون احراز هویت قابل دریافت می‌کند.\n\nراهنمای عملی: [ذخیره‌سازی و باکت](/docs/storage/)",
        "externalDocs": {
          "description": "ذخیره‌سازی و باکت",
          "url": "https://abrbit.com/docs/storage/"
        },
        "parameters": [
          {
            "description": "تنظیمات قابل تغییر",
            "in": "body",
            "name": "data",
            "required": true,
            "schema": {
              "$ref": "#/definitions/s3.UpdateBucketDomain"
            }
          },
          {
            "description": "project guid",
            "in": "path",
            "name": "project_guid",
            "required": true,
            "type": "string"
          },
          {
            "description": "نام باکت",
            "in": "path",
            "name": "bucket_name",
            "required": true,
            "type": "string"
          }
        ],
        "produces": [
          "application/json"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/models.S3Bucket"
            }
          },
          "400": {
            "description": "Bad Request",
            "schema": {
              "$ref": "#/definitions/response.Message"
            }
          },
          "401": {
            "description": "توکن ارسال نشده یا معتبر نیست؛ بدنه ممکن است خالی باشد"
          },
          "403": {
            "description": "دسترسی یا پیش‌نیاز حساب تأیید نشد"
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "summary": "تغییر تنظیمات باکت",
        "tags": [
          "ذخیره‌سازی و باکت"
        ]
      }
    },
    "/api/v1/project/{project_guid}/s3/buckets/{bucket_name}/keys/": {
      "get": {
        "consumes": [
          "application/json"
        ],
        "description": "حساب فعال، شمارهٔ تأییدشده و نقش مالک، مدیر یا عضو لازم است. پاسخ دارای objects و meta و بدون صفحه‌بندی است؛ secret_key دوباره نمایش داده نمی‌شود.\n\nراهنمای عملی: [ذخیره‌سازی و باکت](/docs/storage/)",
        "externalDocs": {
          "description": "ذخیره‌سازی و باکت",
          "url": "https://abrbit.com/docs/storage/"
        },
        "parameters": [
          {
            "description": "project guid",
            "in": "path",
            "name": "project_guid",
            "required": true,
            "type": "string"
          },
          {
            "description": "bucket name",
            "in": "path",
            "name": "bucket_name",
            "required": true,
            "type": "string"
          }
        ],
        "produces": [
          "application/json"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "allOf": [
                {
                  "$ref": "#/definitions/response.ApiResponse"
                },
                {
                  "properties": {
                    "objects": {
                      "items": {
                        "$ref": "#/definitions/models.S3bucketCredentials"
                      },
                      "type": "array"
                    }
                  },
                  "type": "object"
                }
              ]
            }
          },
          "400": {
            "description": "Bad Request",
            "schema": {
              "$ref": "#/definitions/response.Message"
            }
          },
          "401": {
            "description": "توکن ارسال نشده یا معتبر نیست؛ بدنه ممکن است خالی باشد"
          },
          "403": {
            "description": "دسترسی یا پیش‌نیاز حساب تأیید نشد"
          },
          "404": {
            "description": "Not Found",
            "schema": {
              "$ref": "#/definitions/response.Message"
            }
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "summary": "فهرست کلیدهای باکت",
        "tags": [
          "ذخیره‌سازی و باکت"
        ]
      },
      "post": {
        "consumes": [
          "application/json"
        ],
        "description": "حساب فعال، شمارهٔ تأییدشده و نقش مالک، مدیر یا عضو لازم است. سطح permission یکی از READ_ONLY، WRITE_ONLY یا READ_WRITE است؛ description غیرخالی لازم است. کلید secret_key فقط در پاسخ ۲۰۱ نمایش داده می‌شود؛ آن را امن ذخیره کنید.\n\nراهنمای عملی: [ذخیره‌سازی و باکت](/docs/storage/)",
        "externalDocs": {
          "description": "ذخیره‌سازی و باکت",
          "url": "https://abrbit.com/docs/storage/"
        },
        "parameters": [
          {
            "description": "query params",
            "in": "body",
            "name": "data",
            "required": true,
            "schema": {
              "$ref": "#/definitions/s3.CreateBucketCredential"
            }
          },
          {
            "description": "project guid",
            "in": "path",
            "name": "project_guid",
            "required": true,
            "type": "string"
          },
          {
            "description": "bucket name",
            "in": "path",
            "name": "bucket_name",
            "required": true,
            "type": "string"
          }
        ],
        "produces": [
          "application/json"
        ],
        "responses": {
          "201": {
            "description": "Created",
            "schema": {
              "$ref": "#/definitions/models.S3bucketCredentials"
            }
          },
          "400": {
            "description": "Bad Request",
            "schema": {
              "$ref": "#/definitions/response.Message"
            }
          },
          "401": {
            "description": "توکن ارسال نشده یا معتبر نیست؛ بدنه ممکن است خالی باشد"
          },
          "403": {
            "description": "دسترسی یا پیش‌نیاز حساب تأیید نشد"
          },
          "404": {
            "description": "Not Found",
            "schema": {
              "$ref": "#/definitions/response.Message"
            }
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "summary": "ساخت کلید S3",
        "tags": [
          "ذخیره‌سازی و باکت"
        ]
      }
    },
    "/api/v1/project/{project_guid}/s3/buckets/{bucket_name}/keys/{key_id}/": {
      "delete": {
        "consumes": [
          "application/json"
        ],
        "description": "حساب فعال، شمارهٔ تأییدشده و نقش مالک، مدیر یا عضو لازم است. شناسهٔ عددی کلید همین باکت را ارسال کنید؛ حذف دسترسی برنامهٔ وابسته را قطع می‌کند و پاسخ ۲۰۰ شامل message است.\n\nراهنمای عملی: [ذخیره‌سازی و باکت](/docs/storage/)",
        "externalDocs": {
          "description": "ذخیره‌سازی و باکت",
          "url": "https://abrbit.com/docs/storage/"
        },
        "parameters": [
          {
            "description": "project guid",
            "in": "path",
            "name": "project_guid",
            "required": true,
            "type": "string"
          },
          {
            "description": "bucket name",
            "in": "path",
            "name": "bucket_name",
            "required": true,
            "type": "string"
          },
          {
            "description": "key id",
            "in": "path",
            "name": "key_id",
            "required": true,
            "type": "string"
          }
        ],
        "produces": [
          "application/json"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/response.Message"
            }
          },
          "400": {
            "description": "Bad Request",
            "schema": {
              "$ref": "#/definitions/response.Message"
            }
          },
          "401": {
            "description": "توکن ارسال نشده یا معتبر نیست؛ بدنه ممکن است خالی باشد"
          },
          "403": {
            "description": "دسترسی یا پیش‌نیاز حساب تأیید نشد"
          },
          "404": {
            "description": "Not Found",
            "schema": {
              "$ref": "#/definitions/response.Message"
            }
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "summary": "حذف کلید S3",
        "tags": [
          "ذخیره‌سازی و باکت"
        ]
      }
    },
    "/api/v1/project/{project_guid}/security/apitokens/": {
      "get": {
        "consumes": [
          "application/json"
        ],
        "description": "عضویت در پروژه لازم است. فهرست شامل توکن‌های باطل‌شده نیز هست؛ مقدار کامل توکن بازگردانده نمی‌شود و صفحه‌بندی ندارد.\n\nراهنمای عملی: [احراز هویت و توکن‌ها](/docs/authentication/)",
        "externalDocs": {
          "description": "احراز هویت و توکن‌ها",
          "url": "https://abrbit.com/docs/authentication/"
        },
        "parameters": [
          {
            "description": "شناسهٔ عمومی پروژه",
            "in": "path",
            "name": "project_guid",
            "required": true,
            "type": "string"
          }
        ],
        "produces": [
          "application/json"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "allOf": [
                {
                  "$ref": "#/definitions/response.ApiResponse"
                },
                {
                  "properties": {
                    "objects": {
                      "items": {
                        "$ref": "#/definitions/models.APIToken"
                      },
                      "type": "array"
                    }
                  },
                  "type": "object"
                }
              ]
            }
          },
          "400": {
            "description": "Bad Request",
            "schema": {
              "$ref": "#/definitions/response.Message"
            }
          },
          "401": {
            "description": "توکن ارسال نشده یا معتبر نیست؛ بدنه ممکن است خالی باشد"
          },
          "403": {
            "description": "عضویت پروژه تأیید نشد"
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "summary": "فهرست توکن‌ها",
        "tags": [
          "احراز هویت و توکن‌ها"
        ]
      },
      "post": {
        "consumes": [
          "application/json"
        ],
        "description": "عضویت در پروژه و نام غیرخالی لازم است. توکن کامل فقط در پاسخ ساخت دیده می‌شود؛ prefix به‌تنهایی برای احراز هویت کافی نیست.\n\nراهنمای عملی: [احراز هویت و توکن‌ها](/docs/authentication/)",
        "externalDocs": {
          "description": "احراز هویت و توکن‌ها",
          "url": "https://abrbit.com/docs/authentication/"
        },
        "parameters": [
          {
            "description": "شناسهٔ عمومی پروژه",
            "in": "path",
            "name": "project_guid",
            "required": true,
            "type": "string"
          },
          {
            "description": "نام توکن",
            "in": "body",
            "name": "data",
            "required": true,
            "schema": {
              "$ref": "#/definitions/apitoken.CreateAPITokenRequest"
            }
          }
        ],
        "produces": [
          "application/json"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/models.APIToken"
            }
          },
          "400": {
            "description": "Bad Request",
            "schema": {
              "$ref": "#/definitions/response.Message"
            }
          },
          "401": {
            "description": "توکن ارسال نشده یا معتبر نیست؛ بدنه ممکن است خالی باشد"
          },
          "403": {
            "description": "عضویت پروژه تأیید نشد"
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "summary": "ساخت توکن API",
        "tags": [
          "احراز هویت و توکن‌ها"
        ]
      }
    },
    "/api/v1/project/{project_guid}/security/apitokens/{id}": {
      "delete": {
        "consumes": [
          "application/json"
        ],
        "description": "عضویت در پروژه لازم است. شناسهٔ عددی توکن را ارسال کنید؛ موفقیت ۲۰۴ بدنه ندارد. این مسیر اسلش پایانی ندارد و موفقیت لزوماً وجود قبلی شناسه را ثابت نمی‌کند.\n\nراهنمای عملی: [احراز هویت و توکن‌ها](/docs/authentication/)",
        "externalDocs": {
          "description": "احراز هویت و توکن‌ها",
          "url": "https://abrbit.com/docs/authentication/"
        },
        "parameters": [
          {
            "description": "شناسهٔ عمومی پروژه",
            "in": "path",
            "name": "project_guid",
            "required": true,
            "type": "string"
          },
          {
            "description": "شناسهٔ عددی توکن",
            "in": "path",
            "name": "id",
            "required": true,
            "type": "integer"
          }
        ],
        "produces": [
          "application/json"
        ],
        "responses": {
          "204": {
            "description": "باطل شد"
          },
          "400": {
            "description": "Bad Request",
            "schema": {
              "$ref": "#/definitions/response.Message"
            }
          },
          "401": {
            "description": "توکن ارسال نشده یا معتبر نیست؛ بدنه ممکن است خالی باشد"
          },
          "403": {
            "description": "عضویت پروژه تأیید نشد"
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "summary": "باطل کردن توکن",
        "tags": [
          "احراز هویت و توکن‌ها"
        ]
      }
    },
    "/api/v1/projects/": {
      "get": {
        "consumes": [
          "application/json"
        ],
        "description": "پروژه‌های کاربر صاحب توکن با نقش عضویت؛ پاسخ دارای objects و meta است و صفحه‌بندی ندارد.\n\nراهنمای عملی: [پروژه‌ها](/docs/projects/)",
        "externalDocs": {
          "description": "پروژه‌ها",
          "url": "https://abrbit.com/docs/projects/"
        },
        "produces": [
          "application/json"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "allOf": [
                {
                  "$ref": "#/definitions/response.ApiResponse"
                },
                {
                  "properties": {
                    "objects": {
                      "items": {
                        "$ref": "#/definitions/project.ProjectWithRole"
                      },
                      "type": "array"
                    }
                  },
                  "type": "object"
                }
              ]
            }
          },
          "401": {
            "description": "توکن ارسال نشده یا معتبر نیست؛ بدنه ممکن است خالی باشد"
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "summary": "فهرست پروژه‌ها",
        "tags": [
          "پروژه‌ها"
        ]
      },
      "post": {
        "consumes": [
          "application/json"
        ],
        "description": "نام غیرخالی الزامی است؛ پاسخ ۲۰۱ خود شیء پروژه است. پس از ساخت برای پروژهٔ جدید توکن همان پروژه صادر کنید.\n\nراهنمای عملی: [پروژه‌ها](/docs/projects/)",
        "externalDocs": {
          "description": "پروژه‌ها",
          "url": "https://abrbit.com/docs/projects/"
        },
        "parameters": [
          {
            "description": "query params",
            "in": "body",
            "name": "data",
            "required": true,
            "schema": {
              "$ref": "#/definitions/project.CreateDomain"
            }
          }
        ],
        "produces": [
          "application/json"
        ],
        "responses": {
          "201": {
            "description": "Created",
            "schema": {
              "$ref": "#/definitions/models.Project"
            }
          },
          "400": {
            "description": "Bad Request",
            "schema": {
              "$ref": "#/definitions/response.Message"
            }
          },
          "401": {
            "description": "توکن ارسال نشده یا معتبر نیست؛ بدنه ممکن است خالی باشد"
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "summary": "ساخت پروژه",
        "tags": [
          "پروژه‌ها"
        ]
      }
    },
    "/api/v1/projects/{project_guid}/": {
      "delete": {
        "consumes": [
          "application/json"
        ],
        "description": "فقط مالک پروژه؛ توکن‌های پروژه باطل می‌شوند. منابع و عملیات وابسته با پاسخ ۴۰۹ و blockers مانع حذف می‌شوند؛ توکن API باید متعلق به همان پروژه باشد.\n\nراهنمای عملی: [پروژه‌ها](/docs/projects/)",
        "externalDocs": {
          "description": "پروژه‌ها",
          "url": "https://abrbit.com/docs/projects/"
        },
        "parameters": [
          {
            "description": "Project GUID",
            "in": "path",
            "name": "project_guid",
            "required": true,
            "type": "string"
          }
        ],
        "produces": [
          "application/json"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "type": "string"
            }
          },
          "401": {
            "description": "توکن ارسال نشده یا معتبر نیست؛ بدنه ممکن است خالی باشد"
          },
          "404": {
            "description": "Not Found",
            "schema": {
              "$ref": "#/definitions/response.Message"
            }
          },
          "409": {
            "description": "Conflict",
            "schema": {
              "$ref": "#/definitions/project.DeleteConflictResponse"
            }
          },
          "500": {
            "description": "Internal Server Error",
            "schema": {
              "$ref": "#/definitions/response.Message"
            }
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "summary": "حذف پروژهٔ خالی",
        "tags": [
          "پروژه‌ها"
        ]
      },
      "get": {
        "consumes": [
          "application/json"
        ],
        "description": "عضویت در پروژه لازم است؛ پاسخ خود شیء پروژه است.\n\nراهنمای عملی: [پروژه‌ها](/docs/projects/)",
        "externalDocs": {
          "description": "پروژه‌ها",
          "url": "https://abrbit.com/docs/projects/"
        },
        "parameters": [
          {
            "description": "Project GUID",
            "in": "path",
            "name": "project_guid",
            "required": true,
            "type": "string"
          }
        ],
        "produces": [
          "application/json"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/models.Project"
            }
          },
          "400": {
            "description": "Bad Request",
            "schema": {
              "$ref": "#/definitions/response.Message"
            }
          },
          "401": {
            "description": "توکن ارسال نشده یا معتبر نیست؛ بدنه ممکن است خالی باشد"
          },
          "403": {
            "description": "دسترسی یا پیش‌نیاز حساب تأیید نشد"
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "summary": "جزئیات پروژه",
        "tags": [
          "پروژه‌ها"
        ]
      },
      "put": {
        "consumes": [
          "application/json"
        ],
        "description": "فقط مالک پروژه؛ نام غیرخالی الزامی است و guid تغییر نمی‌کند.\n\nراهنمای عملی: [پروژه‌ها](/docs/projects/)",
        "externalDocs": {
          "description": "پروژه‌ها",
          "url": "https://abrbit.com/docs/projects/"
        },
        "parameters": [
          {
            "description": "query params",
            "in": "body",
            "name": "data",
            "required": true,
            "schema": {
              "$ref": "#/definitions/project.CreateDomain"
            }
          },
          {
            "description": "Project GUID",
            "in": "path",
            "name": "project_guid",
            "required": true,
            "type": "string"
          }
        ],
        "produces": [
          "application/json"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/models.Project"
            }
          },
          "400": {
            "description": "Bad Request",
            "schema": {
              "$ref": "#/definitions/response.Message"
            }
          },
          "401": {
            "description": "توکن ارسال نشده یا معتبر نیست؛ بدنه ممکن است خالی باشد"
          },
          "403": {
            "description": "دسترسی یا پیش‌نیاز حساب تأیید نشد"
          },
          "404": {
            "description": "Not Found",
            "schema": {
              "$ref": "#/definitions/response.Message"
            }
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "summary": "تغییر نام پروژه",
        "tags": [
          "پروژه‌ها"
        ]
      }
    }
  },
  "schemes": [
    "https"
  ],
  "securityDefinitions": {
    "ApiKeyAuth": {
      "in": "header",
      "name": "Authorization",
      "type": "apiKey"
    }
  },
  "swagger": "2.0",
  "x-abrbit-review": {
    "gateway/main.go": "0991ce94085045a5602b0a34b93dcffb142595c043b17bdea4aa29e3af5d793e",
    "models/base_model.go": "c849471d86e11b81928c52634e360e5457dfcaf459276506f0d07369dd27a2a0",
    "models/project.go": "291dc1d18094c4015d612b702b47f53ceb7b0e75e2f966d22fdbf2900680f466",
    "models/project_member.go": "5dd6b18ca6f22145510e25209c550595d82aba87a8e1d37e27dd3732c2859a0f",
    "models/s3.go": "4dc70d7501fe8287d208d4eedafa9384ecfcc87f4609ffb4e715042e209616cf",
    "models/security.go": "2522065e0b1dd83b83d3e8621d11df2cf9120de61dc9432cc78b0ccdf700d354",
    "pkg/response/api_response.go": "ee4ada922a0c3631dcfdf186082a05fdd31e26c2166db710c9700d8c1efa9b59",
    "pkg/response/base_response.go": "ee1dc53388b47f008f11ffd416e1eaf9bf0c9b0a4db1c8a5ae7f7b1456bbb437",
    "pkg/response/sse.go": "3e1a62b53cd158fa4d95e49e68cc0a242c23676e123aea06868111edee9ea802",
    "services/auth/middleware.go": "20069ba71533cfb2d5fc4628f51614fad5ead5a392807736a82bfc842ae9d3fd",
    "services/project/delete.go": "f528a8b53f2a59d72a2ed2662068a8850af5bdce0a622f6efa515df0584cd79f",
    "services/project/delivery.go": "351f0001653ccf1d4afb7a79694593820a9db912d3bc4929d102d32800171f02",
    "services/project/module.go": "8b21a75b2af9a6bde6afaba8a08a9b125813848a2f011acdd2f374a59aca4d09",
    "services/project/usecase.go": "5b13f0c53d01b90c7d9cf400967a7bcba37dbd0a664a43cff16abfab51c3732b",
    "services/s3/delivery.go": "48311eb3158c5ee8f75d913f262d1787dfc44c1162026db4547c8dd1d3ae9dcf",
    "services/s3/domain.go": "e8f0043e12bcd4822fa076383d8dbe93a8807ad52324e3788e741a6d8d41fbe5",
    "services/s3/module.go": "2123e7f08506874f198e6f3f55cf0065c7ae425494a3f6c12467ef8d02776765",
    "services/s3/settings_errors.go": "a7261a94cc6d31f3ce6958fcc63e8b0c8a9933e7f560797f4ceb8db331df2819",
    "services/s3/usecase.go": "8b7d74bb6497e0e31e135ab866b634270405fefdc1023f40eb2dcc07f0d785ee",
    "services/security/apitoken/delivery.go": "688dfbee89bcac569fdc8d960b1c440b66f0660357ee4b716df29ad30fb193a7",
    "services/security/apitoken/domain.go": "d2f64bd763dbe6ce0f2eed93f5937cd56963b2e068dcc03bce1bb77c5ea49698",
    "services/security/apitoken/usecase.go": "b5a05d75a80bd30a9698edbf55075d2eb2556dec233c5e94de1eae92464b0d94",
    "services/security/module.go": "0c6252d87b564e5a12ad2b1ab68efa68b6f4ab1b95bfcbf0e25ab55c84bf9b49"
  },
  "x-abrbit-source-sha256": "3d29dae130d0d993aa4fc62844d86e2c86988cc56b79e1e841d6ebd0fce5e7e5"
}
