메인 콘텐츠로 건너뛰기
POST
/
objs
/
query
객체 쿼리
curl --request POST \
  --url https://api.example.com/objs/query \
  --header 'Authorization: Basic <encoded-value>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "project_id": "<string>",
  "filter": {
    "latest_only": true,
    "object_ids": [
      "my_favorite_model"
    ]
  },
  "limit": 100,
  "offset": 0,
  "sort_by": [
    {
      "direction": "desc",
      "field": "created_at"
    }
  ],
  "metadata_only": false,
  "include_storage_size": false,
  "include_tags_and_aliases": false
}
'
{
  "objs": [
    {
      "project_id": "<string>",
      "object_id": "<string>",
      "created_at": "2023-11-07T05:31:56Z",
      "digest": "<string>",
      "version_index": 123,
      "is_latest": 123,
      "kind": "<string>",
      "base_object_class": "<string>",
      "val": "<unknown>",
      "deleted_at": "2023-11-07T05:31:56Z",
      "leaf_object_class": "<string>",
      "wb_user_id": "<string>",
      "size_bytes": 123,
      "tags": [
        "<string>"
      ],
      "aliases": [
        "<string>"
      ]
    }
  ]
}

인증

Authorization
string
header
필수

Basic authentication header of the form Basic <encoded-value>, where <encoded-value> is the base64-encoded string username:password.

본문

application/json
project_id
string
필수

쿼리할 프로젝트의 ID

예시:

"user/project"

filter
ObjectVersionFilter · object

쿼리의 필터 기준입니다. ObjectVersionFilter를 참조하세요.

예시:
{
"latest_only": true,
"object_ids": ["my_favorite_model"]
}
limit
integer | null

반환할 결과의 최대 개수

예시:

100

offset
integer | null

반환하기 전에 건너뛸 결과 수

예시:

0

sort_by
SortBy · object[] | null

쿼리 결과의 정렬 기준입니다. 현재는 'object_id'와 'created_at'만 지원합니다.

예시:
[
{
"direction": "desc",
"field": "created_at"
}
]
metadata_only
boolean | null
기본값:false

true이면 val 열은 데이터베이스에서 읽지 않으며 비어 있게 됩니다. 그 외의 모든 필드는 반환됩니다.

include_storage_size
boolean | null
기본값:false

true이면 size_bytes 열이 반환됩니다.

include_tags_and_aliases
boolean | null
기본값:false

true이면 태그와 별칭을 가져와 응답에 포함합니다.

응답

성공 응답

objs
ObjSchema · object[]
필수