News by ID API

Retrieve a specific news item by its unique identifier

Support

News by ID API

Retrieve detailed information about a specific news item using its unique identifier. Access complete content and metadata.

Single News

Specific item lookup.

Full Content

Complete details.

Notification Status

Email settings.


Endpoint Overview

QUERY/graphql

Retrieve a specific news item by its unique ID.

Authentication:Bearer Token
Required scopes:useradmin

Request Parameters

idInt!Required

The unique identifier of the news item to retrieve.


GraphQL Query

query newsById($id: Int!) {
  newsById(id: $id) {
    id
    title
    description
    notifyByEmail
    createdAt
    updatedAt
  }
}

Variables:

{
  "id": 1
}

HTTP Request:

curl -X POST https://api.orbnet.com/graphql \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -d '{
    "query": "query newsById($id: Int!) { newsById(id: $id) { id title description notifyByEmail createdAt updatedAt } }",
    "variables": { "id": 1 }
  }'

Response

200News Item Retrieved Successfully
{
  "data": {
    "newsById": {
      "id": 1,
      "title": "New Feature Release",
      "description": "We are excited to announce the release of a new feature...",
      "notifyByEmail": true,
      "createdAt": "2024-08-10T10:00:00Z",
      "updatedAt": "2024-08-10T10:00:00Z"
    }
  }
}
404News Item Not Found
{
  "errors": [
    {
      "message": "News item not found",
      "path": ["newsById"],
      "extensions": {
        "code": "NOT_FOUND"
      }
    }
  ],
  "data": null
}

Response Fields

idInt!

Unique identifier for the news item.

titleString!

Title of the news item.

descriptionString!

Full description or content of the news item.

notifyByEmailBoolean!

Whether email notifications are sent for this news item.

createdAtDateTime!

Timestamp when the news item was created.

updatedAtDateTime!

Timestamp when the news item was last updated.



View All News

Retrieve the complete list of news items and announcements.

All News