Create a new image voting

POST /Api/ImageVotings

Requires verified email; Requires one of the following permissions: ImageVotings.CreateImageVoting; Requires the following features to be enabled: ImageVotings

Body

  • name string Required

    Minimum length is 1, maximum length is 255.

  • description string Required

    Minimum length is 1, maximum length is 255.

  • type string Required

    Minimum length is 1.

  • aspects array[object] Required
    Hide aspects attributes Show aspects attributes object
    • key string Required

      Minimum length is 1. Format should match the following pattern: ^[a-zA-Z][a-zA-Z0-9_]*$.

    • name string Required

      Minimum length is 1, maximum length is 255.

    • description string Required

      Minimum length is 1, maximum length is 255.

    • Additional properties are NOT allowed
  • active boolean Required
  • showUploaderInfo boolean Required
  • uploaderUserGroupId integer(int32) Required
  • bannedUserGroupId integer(int32) | null
  • maxUploadsPerUser integer(int32) Required

    Minimum value is 1.

  • superIncrementAllowed boolean Required
  • superIncrementValue integer(int32) Required

    Minimum value is 2.

  • Additional properties are NOT allowed

Body

  • name string Required

    Minimum length is 1, maximum length is 255.

  • description string Required

    Minimum length is 1, maximum length is 255.

  • type string Required

    Minimum length is 1.

  • aspects array[object] Required
    Hide aspects attributes Show aspects attributes object
    • key string Required

      Minimum length is 1. Format should match the following pattern: ^[a-zA-Z][a-zA-Z0-9_]*$.

    • name string Required

      Minimum length is 1, maximum length is 255.

    • description string Required

      Minimum length is 1, maximum length is 255.

    • Additional properties are NOT allowed
  • active boolean Required
  • showUploaderInfo boolean Required
  • uploaderUserGroupId integer(int32) Required
  • bannedUserGroupId integer(int32) | null
  • maxUploadsPerUser integer(int32) Required

    Minimum value is 1.

  • superIncrementAllowed boolean Required
  • superIncrementValue integer(int32) Required

    Minimum value is 2.

  • Additional properties are NOT allowed

Body

  • name string Required

    Minimum length is 1, maximum length is 255.

  • description string Required

    Minimum length is 1, maximum length is 255.

  • type string Required

    Minimum length is 1.

  • aspects array[object] Required
    Hide aspects attributes Show aspects attributes object
    • key string Required

      Minimum length is 1. Format should match the following pattern: ^[a-zA-Z][a-zA-Z0-9_]*$.

    • name string Required

      Minimum length is 1, maximum length is 255.

    • description string Required

      Minimum length is 1, maximum length is 255.

    • Additional properties are NOT allowed
  • active boolean Required
  • showUploaderInfo boolean Required
  • uploaderUserGroupId integer(int32) Required
  • bannedUserGroupId integer(int32) | null
  • maxUploadsPerUser integer(int32) Required

    Minimum value is 1.

  • superIncrementAllowed boolean Required
  • superIncrementValue integer(int32) Required

    Minimum value is 2.

  • Additional properties are NOT allowed

Responses

  • 201 application/json

    Created

    Hide response attributes Show response attributes object
    • id integer(int32)
    • name string | null
    • description string | null
    • type string | null
    • aspects array[object] | null
      Hide aspects attributes Show aspects attributes object
      • key string | null
      • name string | null
      • description string | null
      • Additional properties are NOT allowed
    • active boolean
    • showUploaderInfo boolean
    • uploaderUserGroupId integer(int32)
    • bannedUserGroupId integer(int32) | null
    • maxUploadsPerUser integer(int32)
    • superIncrementAllowed boolean
    • superIncrementValue integer(int32)
    • createdAt string(date-time)
    • updatedAt string(date-time)
    • Additional properties are NOT allowed
  • 401

    Unauthorized

  • 403

    Forbidden

curl \
 -X POST https://app.lovassy.hu/Api/ImageVotings \
 -H "Authorization: Bearer $ACCESS_TOKEN" \
 -H "Content-Type: application/json" \
 -d '{"name":"string","description":"string","type":"string","aspects":[{"key":"string","name":"string","description":"string"}],"active":true,"showUploaderInfo":true,"uploaderUserGroupId":42,"bannedUserGroupId":42,"maxUploadsPerUser":42,"superIncrementAllowed":true,"superIncrementValue":42}'
curl \
 -X POST https://app.lovassy.hu/Api/ImageVotings \
 -H "Authorization: Bearer $ACCESS_TOKEN" \
 -H "Content-Type: text/json"
curl \
 -X POST https://app.lovassy.hu/Api/ImageVotings \
 -H "Authorization: Bearer $ACCESS_TOKEN" \
 -H "Content-Type: application/*+json"
Request example
{
  "name": "string",
  "description": "string",
  "type": "string",
  "aspects": [
    {
      "key": "string",
      "name": "string",
      "description": "string"
    }
  ],
  "active": true,
  "showUploaderInfo": true,
  "uploaderUserGroupId": 42,
  "bannedUserGroupId": 42,
  "maxUploadsPerUser": 42,
  "superIncrementAllowed": true,
  "superIncrementValue": 42
}
Request examples
{
  "name": "string",
  "description": "string",
  "type": "string",
  "aspects": [
    {
      "key": "string",
      "name": "string",
      "description": "string"
    }
  ],
  "active": true,
  "showUploaderInfo": true,
  "uploaderUserGroupId": 42,
  "bannedUserGroupId": 42,
  "maxUploadsPerUser": 42,
  "superIncrementAllowed": true,
  "superIncrementValue": 42
}
Request examples
{
  "name": "string",
  "description": "string",
  "type": "string",
  "aspects": [
    {
      "key": "string",
      "name": "string",
      "description": "string"
    }
  ],
  "active": true,
  "showUploaderInfo": true,
  "uploaderUserGroupId": 42,
  "bannedUserGroupId": 42,
  "maxUploadsPerUser": 42,
  "superIncrementAllowed": true,
  "superIncrementValue": 42
}
Response examples (201)
{
  "id": 42,
  "name": "string",
  "description": "string",
  "type": "string",
  "aspects": [
    {
      "key": "string",
      "name": "string",
      "description": "string"
    }
  ],
  "active": true,
  "showUploaderInfo": true,
  "uploaderUserGroupId": 42,
  "bannedUserGroupId": 42,
  "maxUploadsPerUser": 42,
  "superIncrementAllowed": true,
  "superIncrementValue": 42,
  "createdAt": "2024-05-04T09:42:00+00:00",
  "updatedAt": "2024-05-04T09:42:00+00:00"
}