GET
/
api
/
document
/
{document_id}
curl --request GET \
  --url https://cite.petal.org/api/document/{document_id} \
  --header 'Authorization: Bearer <token>'
{
  "annotation_ids": [
    123
  ],
  "annotations": [
    {
      "comment_count": 123,
      "created_at": "<string>",
      "description": "<string>",
      "document_id": 123,
      "id": 123,
      "is_hidden": true,
      "modified_at": "<string>",
      "modified_by": 123,
      "type": "<string>",
      "use_ocr": true,
      "user_id": 123
    }
  ],
  "comments": [
    {
      "annotation_id": 123,
      "content": "<string>",
      "created_at": "<string>",
      "id": 123,
      "modified_at": "<string>",
      "modified_by": 123,
      "user": {
        "id": 123,
        "name": "<string>"
      },
      "user_id": 123
    }
  ],
  "created_at": "<string>",
  "csl": {},
  "doctype": "<string>",
  "file_resource_size": 123,
  "file_size": 123,
  "filename": "<string>",
  "id": 123,
  "is_trash": true,
  "keywords": [
    "<any>"
  ],
  "meta": {},
  "modified_at": "<string>",
  "modified_by": 123,
  "organization_id": 123,
  "pages": 123,
  "ranking": 123,
  "resource_size": 123,
  "resource_stats": {
    "file_list": "<any>",
    "file_size": 123,
    "file_size_by_mime_type": "<any>",
    "file_size_by_res_type": "<any>"
  },
  "snippet": "<string>",
  "span": [
    123
  ],
  "status": {},
  "suggested_tags": [
    {
      "color": "<string>",
      "document_count": 123,
      "id": 123,
      "name": "<string>",
      "organization_id": 123
    }
  ],
  "tag_ids": [
    123
  ],
  "tasks": [
    {
      "args_json": "<string>",
      "created_at": "<any>",
      "function": "<string>",
      "group_id": "<string>",
      "id": "<string>",
      "module": "<string>",
      "nrequeue": 123,
      "parent_id": 123,
      "parent_table": "<string>",
      "runtime": 123,
      "status": "<string>",
      "traceback": "<string>",
      "updated_at": "<any>"
    }
  ],
  "ui": {},
  "use_ocr": true,
  "user": {
    "id": 123,
    "name": "<string>"
  }
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

document_id
integer
required

The unique ID of the Document

Response

200
application/json
OK
annotation_ids
integer[]
required

Unique IDs of Annotations made on this Document

created_at
string
required

Creation time, by UTC

csl
object
required

CSL reference info for internal use

doctype
string
required

Type of file, such as pdf, txt, etc.

file_resource_size
integer
required

Size of extracted information

file_size
integer
required

Size of original file

id
integer
required

Unique ID of the Document

is_trash
boolean
required

Is the Document in Workspace trash

meta
object
required

Metadata, for internal use

modified_at
string
required

Modification time, by UTC

modified_by
integer
required

Last user to modify

organization_id
integer
required

Unique ID of Organization

pages
integer
required

Number of pages in Document

resource_size
integer
required

Internal resource usage

status
object
required

Processing status of Document

tag_ids
integer[]
required

IDs of tags on this Document

ui
object
required

UI information for internal use

use_ocr
boolean
required

Whether or not to use OCR on this Document. Leave as False except for images

user
object
required
annotations
object[]

Detailed Annotations made on this Document

comments
object[]

Detailed comments made on the Annotations

filename
string

Name of original file

keywords
any[]

Keywords for internal use

ranking
integer

Search ranking if applicable

resource_stats
object

Detailed description of disk usage by a given Document

snippet
string

Snippet found through search, if applicable

span
integer[]

For UI use

suggested_tags
object[]

Auto suggested tags

Detailed information of a tag

tasks
object[]

Queued tasks associated with this Document