COBS API help

Comet List API

Version: 1.0 (2022 February 10)

Comet List API provides a method of requesting machine-readable data for a set of comet object within the COBS database.

HTTP Request


GET https://cobs.si/api/comet_list.api

Example Queries

https://cobs.si/api/comet_list.api?type=C
https://cobs.si/api/comet_list.api?type=P&is-observed=1

Query Parameters


All parameters are optional. If non are specified the list of all comets will be returned by the query.

Parameter Type Default Description
type char comet type (e.g. P, N, C, I, A or M)
alt-des boolean false include alternate designations (if any) in objects fields section output
is-observed boolean false include only comets that have observations stored in COBS database
is-active boolean true include only comets that are active in the COBS database

Data Output


Please always check the JSON payload “signature” object for the API “version”. If the version does not match the version in this document (at the top), there is no guarantee that the format has not changed.
Example "signature" object with "version" value "1.0": "signature":{"version":"1.0","source":"COBS ... API"}

Normal Data Payload


This output is the result of specifying a unique object.
The following example query https://cobs.si/api/comet_list.api?type=M returns the following payload containing data sections objects.

{
  "objects": [
    {
      "pk": 1062,
      "type": "M",
      "name": "2001 HT5",
      "fullname": "2001 HT5 (45277)",
      "icq_name": "2001HT5",
      "component": null,
      "is_observed": false,
      "is_active": true
    },
    {
      "pk": 1063,
      "type": "M",
      "name": "2001 OG1",
      "fullname": "2001 OG1 (139403)",
      "icq_name": "2001OG1",
      "component": null,
      "is_observed": false,
      "is_active": true
    },
    {
      "pk": 1065,
      "type": "M",
      "name": "2003 KV",
      "fullname": "2003 KV (136118)",
      "icq_name": "2003KV",
      "component": null,
      "is_observed": false,
      "is_active": true
    },
    {
      "pk": 1713,
      "type": "M",
      "name": "3200",
      "fullname": "3200 Phaethon",
      "icq_name": "MB003200",
      "component": null,
      "is_observed": true,
      "is_active": true
    }
  ],
  "signature": {
    "source": "COBS Query API",
    "version": "1.1",
    "date": "2022 February 10"
  }
}
Sections Output

The following sections are available for output. The detailed structure of the contents within each section are described in corresponding document sections below.

Section Description
objects the objects field is an array of data, one for each comet from the database
signature JSON payload “signature” object with the API “version”
Structure of Sections

The following shows the JSON structure of a normal data payload containing all possible sections. The detailed structure of the contents within each section are described in corresponding document sections below.

{
  "object": {
    object fields ...
  },
  "signature": {
    signature fields ...
  },
}
Objects Data Section

The objects data section contains an array of comets from the COBS database.

The following fields are provided in the objects section:

Field Name Description
pk primary object ID
type comet type
name short comet name
fullname full comet name
component component degination if available
icq_name comet designation used in the ICQ observation format
is_observed true if observations of the comet are available in COBS database
alias list of alternate designations (included if alt-des=1)
Object subsection: alias

If alternate designations are requested (alt-des=1), the field “alias” will contain an array of alternate designations, or an emtpy array if no alternates are available. Each element in the array contains more key/value pair where the keys are the following:

key description
pk alternate object ID
name short comet name
fullname full comet name

For example, here is the “alias” content for numbered comet 249P/LINEAR:

[
  {"id": 413, "name": "P/2006 U1", "fullname": "P/2006 U1 (LINEAR)"},
  {"id": 416, "name": "P/2011 A4", "fullname": "P/2011 A4 (LINEAR)"}
]

HTTP Response Codes


All errors are returned via appropriate HTTP response codes.

HTTP Code Description Typical Usage
200 OK normal successful result for a query: object data returned (an error message is returned if the object was not found)
400 Bad Request the request contained invalid keywords and/or content: details returned
500 Internal Server Error the database is not available at the time of the request

Change Log


Version 1.0 (2022 February)

Initial release

Comet List API

Version: 1.0 (2022 February 10)

Comet List API provides a method of requesting machine-readable data for a set of comet object within the COBS database.

HTTP Request


GET https://cobs.si/api/comet_list.api

Example Queries

https://cobs.si/api/comet_list.api?type=C
https://cobs.si/api/comet_list.api?type=P&is-observed=1

Query Parameters


All parameters are optional. If non are specified the list of all comets will be returned by the query.

Parameter Type Default Description
type char comet type (e.g. P, N, C, I, A or M)
alt-des boolean false include alternate designations (if any) in objects fields section output
is-observed boolean false include only comets that have observations stored in COBS database
is-active boolean true include only comets that are active in the COBS database

Data Output


Please always check the JSON payload “signature” object for the API “version”. If the version does not match the version in this document (at the top), there is no guarantee that the format has not changed.
Example "signature" object with "version" value "1.0": "signature":{"version":"1.0","source":"COBS ... API"}

Normal Data Payload


This output is the result of specifying a unique object.
The following example query https://cobs.si/api/comet_list.api?type=M returns the following payload containing data sections objects.

{
  "objects": [
    {
      "pk": 1062,
      "type": "M",
      "name": "2001 HT5",
      "fullname": "2001 HT5 (45277)",
      "icq_name": "2001HT5",
      "component": null,
      "is_observed": false,
      "is_active": true
    },
    {
      "pk": 1063,
      "type": "M",
      "name": "2001 OG1",
      "fullname": "2001 OG1 (139403)",
      "icq_name": "2001OG1",
      "component": null,
      "is_observed": false,
      "is_active": true
    },
    {
      "pk": 1065,
      "type": "M",
      "name": "2003 KV",
      "fullname": "2003 KV (136118)",
      "icq_name": "2003KV",
      "component": null,
      "is_observed": false,
      "is_active": true
    },
    {
      "pk": 1713,
      "type": "M",
      "name": "3200",
      "fullname": "3200 Phaethon",
      "icq_name": "MB003200",
      "component": null,
      "is_observed": true,
      "is_active": true
    }
  ],
  "signature": {
    "source": "COBS Query API",
    "version": "1.1",
    "date": "2022 February 10"
  }
}
Sections Output

The following sections are available for output. The detailed structure of the contents within each section are described in corresponding document sections below.

Section Description
objects the objects field is an array of data, one for each comet from the database
signature JSON payload “signature” object with the API “version”
Structure of Sections

The following shows the JSON structure of a normal data payload containing all possible sections. The detailed structure of the contents within each section are described in corresponding document sections below.

{
  "object": {
    object fields ...
  },
  "signature": {
    signature fields ...
  },
}
Objects Data Section

The objects data section contains an array of comets from the COBS database.

The following fields are provided in the objects section:

Field Name Description
pk primary object ID
type comet type
name short comet name
fullname full comet name
component component degination if available
icq_name comet designation used in the ICQ observation format
is_observed true if observations of the comet are available in COBS database
alias list of alternate designations (included if alt-des=1)
Object subsection: alias

If alternate designations are requested (alt-des=1), the field “alias” will contain an array of alternate designations, or an emtpy array if no alternates are available. Each element in the array contains more key/value pair where the keys are the following:

key description
pk alternate object ID
name short comet name
fullname full comet name

For example, here is the “alias” content for numbered comet 249P/LINEAR:

[
  {"id": 413, "name": "P/2006 U1", "fullname": "P/2006 U1 (LINEAR)"},
  {"id": 416, "name": "P/2011 A4", "fullname": "P/2011 A4 (LINEAR)"}
]

HTTP Response Codes


All errors are returned via appropriate HTTP response codes.

HTTP Code Description Typical Usage
200 OK normal successful result for a query: object data returned (an error message is returned if the object was not found)
400 Bad Request the request contained invalid keywords and/or content: details returned
500 Internal Server Error the database is not available at the time of the request

Change Log


Version 1.0 (2022 February)

Initial release

Comet List API

Version: 1.0 (2022 February 10)

Comet List API provides a method of requesting machine-readable data for a set of comet object within the COBS database.

HTTP Request


GET https://cobs.si/api/comet_list.api

Example Queries

https://cobs.si/api/comet_list.api?type=C
https://cobs.si/api/comet_list.api?type=P&is-observed=1

Query Parameters


All parameters are optional. If non are specified the list of all comets will be returned by the query.

Parameter Type Default Description
type char comet type (e.g. P, N, C, I, A or M)
alt-des boolean false include alternate designations (if any) in objects fields section output
is-observed boolean false include only comets that have observations stored in COBS database
is-active boolean true include only comets that are active in the COBS database

Data Output


Please always check the JSON payload “signature” object for the API “version”. If the version does not match the version in this document (at the top), there is no guarantee that the format has not changed.
Example "signature" object with "version" value "1.0": "signature":{"version":"1.0","source":"COBS ... API"}

Normal Data Payload


This output is the result of specifying a unique object.
The following example query https://cobs.si/api/comet_list.api?type=M returns the following payload containing data sections objects.

{
  "objects": [
    {
      "pk": 1062,
      "type": "M",
      "name": "2001 HT5",
      "fullname": "2001 HT5 (45277)",
      "icq_name": "2001HT5",
      "component": null,
      "is_observed": false,
      "is_active": true
    },
    {
      "pk": 1063,
      "type": "M",
      "name": "2001 OG1",
      "fullname": "2001 OG1 (139403)",
      "icq_name": "2001OG1",
      "component": null,
      "is_observed": false,
      "is_active": true
    },
    {
      "pk": 1065,
      "type": "M",
      "name": "2003 KV",
      "fullname": "2003 KV (136118)",
      "icq_name": "2003KV",
      "component": null,
      "is_observed": false,
      "is_active": true
    },
    {
      "pk": 1713,
      "type": "M",
      "name": "3200",
      "fullname": "3200 Phaethon",
      "icq_name": "MB003200",
      "component": null,
      "is_observed": true,
      "is_active": true
    }
  ],
  "signature": {
    "source": "COBS Query API",
    "version": "1.1",
    "date": "2022 February 10"
  }
}
Sections Output

The following sections are available for output. The detailed structure of the contents within each section are described in corresponding document sections below.

Section Description
objects the objects field is an array of data, one for each comet from the database
signature JSON payload “signature” object with the API “version”
Structure of Sections

The following shows the JSON structure of a normal data payload containing all possible sections. The detailed structure of the contents within each section are described in corresponding document sections below.

{
  "object": {
    object fields ...
  },
  "signature": {
    signature fields ...
  },
}
Objects Data Section

The objects data section contains an array of comets from the COBS database.

The following fields are provided in the objects section:

Field Name Description
pk primary object ID
type comet type
name short comet name
fullname full comet name
component component degination if available
icq_name comet designation used in the ICQ observation format
is_observed true if observations of the comet are available in COBS database
alias list of alternate designations (included if alt-des=1)
Object subsection: alias

If alternate designations are requested (alt-des=1), the field “alias” will contain an array of alternate designations, or an emtpy array if no alternates are available. Each element in the array contains more key/value pair where the keys are the following:

key description
pk alternate object ID
name short comet name
fullname full comet name

For example, here is the “alias” content for numbered comet 249P/LINEAR:

[
  {"id": 413, "name": "P/2006 U1", "fullname": "P/2006 U1 (LINEAR)"},
  {"id": 416, "name": "P/2011 A4", "fullname": "P/2011 A4 (LINEAR)"}
]

HTTP Response Codes


All errors are returned via appropriate HTTP response codes.

HTTP Code Description Typical Usage
200 OK normal successful result for a query: object data returned (an error message is returned if the object was not found)
400 Bad Request the request contained invalid keywords and/or content: details returned
500 Internal Server Error the database is not available at the time of the request

Change Log


Version 1.0 (2022 February)

Initial release