跳到主要内容

Classes API

Gitee Team Classes (3.3.0)

Download OpenAPI specification:Download

Gitee Team Classes API

Introduction

This Api is base on Parse Class Api

Headers

The following parameters in headers are required for all api

  • Content-Type (must be 'text/plain')
  • Accept-Language (e.g. zh-CN,en-US)

ItemType

Item Type Api

Query ItemType

path Parameters
queryItemType
required
string

Must be "ItemType"

header Parameters
Content-Type
required
string

Content Type(must be 'text/plain')

Accept-Language
required
string

Accept Language(e.g. zh-CN,en-US)

Request Body schema: text/plain
_ApplicationId
required
string

ApplicationId(e.g. osc)

_SessionToken
required
string

User token

_method
required
string
Value: "GET"

must be "Get"

skip
number

Sets the number of results to skip before returning any results. This is useful for pagination. Default is to skip zero results.

limit
number

Sets the limit of the number of results to return. The default limit is 100.

string or string[]

Includes nested objects for the provided key.You can use dot notation to specify which fields in the included object are also fetched.

string or string[]

Sorts the results in order by the given key, but can also add secondary sort descriptors without overwriting _order.

e.g. "+createAt" "-updateAt"

string or string[]

Restricts the fields of the returned objects to include only the provided keys.

string or string[]

Restricts the fields of the returned objects to all keys except the provided keys. excludeKeys takes precedence over keys and include.

object

Query condition

Responses

Request samples

const data = await axios({
  url: '/parse/classes/ItemType',
  method: 'POST',
  data:{
    _ApplicationId: 'osc',
    _SessionToken: '',
    _method: 'GET',
    where: {
      objectId: {
        $in: ['UWHEDRRz7j', 'jasPZZVVEQ'],
      },
      key: {
        $regex: '\\Q\\E'
      },
      name: 'Story'
    },
    limit: 10,
    order: '-createAt'
  },
  headers: {
    "Content-Type": "text/plain",
    "Accept-Language": "zh-CN",
  }
})

Response samples

Content type
application/json
{
  • "count": 0,
  • "results": [
    ]
}

Create ItemType

header Parameters
Content-Type
required
string

Content Type(must be 'text/plain')

Accept-Language
required
string

Accept Language(e.g. zh-CN,en-US)

Request Body schema: text/plain
_ApplicationId
required
string

ApplicationId(e.g. osc)

_SessionToken
required
string

User token

Responses

Request samples

const data = await axios({
  url: '/parse/classes/ItemType',
  method: 'POST',
  data:{
    _ApplicationId: 'osc',
    _SessionToken: '',
    name: 'Story',
    key: 'story',
    icon: '/icons/Issue_Plan.svg',
  },
  headers: {
    "Content-Type": "text/plain",
    "Accept-Language": "zh-CN",
  }
})

Response samples

Content type
application/json
{
  • "objectId": "fZRM3fnHyb",
  • "createAt": "2023-02-08T08:24:11.137Z",
  • "createdBy": {
    }
}

Update ItemType

path Parameters
UpdateId
required
string

The objectId to update

header Parameters
Content-Type
required
string

Content Type(must be 'text/plain')

Accept-Language
required
string

Accept Language(e.g. zh-CN,en-US)

Request Body schema: text/plain
_ApplicationId
required
string

ApplicationId(e.g. osc)

_SessionToken
required
string

User token

_method
required
string
Value: "PUT"

must be "PUT"

Responses

Request samples

const itemTypeId = 'uAKYZbdYP4';
const data = await axios({
  url: `/parse/classes/ItemType/${itemTypeId}`,
  method: 'POST',
  data:{
    _ApplicationId: 'osc',
    _SessionToken: '',
    _method: 'PUT',
    name: 'Story',
    key: 'story',
    icon: '/icons/Issue_Plan.svg',
  },
  headers: {
    "Content-Type": "text/plain",
    "Accept-Language": "zh-CN",
  }
})

Response samples

Content type
application/json
{
  • "updatedAt": "2023-02-08T08:24:11.137Z",
  • "createdBy": {
    },
  • "updatedBy": {
    }
}

Delete ItemType

path Parameters
DeleteId
required
string

The objectId to delete

header Parameters
Content-Type
required
string

Content Type(must be 'text/plain')

Accept-Language
required
string

Accept Language(e.g. zh-CN,en-US)

Request Body schema: text/plain
_ApplicationId
required
string

ApplicationId(e.g. osc)

_SessionToken
required
string

User token

_method
required
string
Value: "DELETE"

must be "DELETE"

Responses

Request samples

const itemTypeId = 'uAKYZbdYP4';
await axios({
  url: `/parse/classes/ItemType/${itemTypeId}`,
  method: 'POST',
  data:{
    _ApplicationId: 'osc',
    _SessionToken: '',
    _method: 'DELETE',
  },
  headers: {
    "Content-Type": "text/plain",
    "Accept-Language": "zh-CN",
  }
})

Response samples

Content type
application/json
{ }