Assemble Developer Portal

News (3.0)

Download OpenAPI specification:Download

This documentation describes how to retrieve, store and update news articles.

News articles

News article listing

Retrieve a paginated response of news articles

Authorizations:
JWT
query Parameters
include_own
boolean
Example: include_own=false

Include own news articles. If set to 'false' and user has 'view-all-news' permission, then all news articles will be returned. If set to 'true' only articles that the user has created, and the articles that are a part of the user's roles and teams will be shown.

important
boolean
Example: important=true

Show only important news articles (set to 'homepage', latest 4 articles)

active
boolean
Example: active=true

Show only active news articles

view
string
Example: view=my-news

Show only active news articles

q
string
Example: q=Celebration

Search by news article title, advert and body

created_at
string <datetime>
Example: created_at=2024-12-25 15:00:00

Filter where 'created_at' is more than or equal to the provided datetime (UTC)

slug
string
Example: slug=celebration

Filter by URL slug

o
string
Default: "desc"
Enum: "asc" "desc"
Example: o=asc

Order the results. 'asc' for ascending, 'desc' for descending

s
string
Enum: "created_at" "updated_at" "deleted_at" "expiry" "title" "featured" "home"
Example: s=category

Sort the results. Note - 'home' and 'featured' are interchangeable

Responses

Response Schema: application/json
Array of objects (News article)
object

Response samples

Content type
application/json
{}

Create a news article

Create a news article

Authorizations:
JWT
Request Body schema: application/json
title
required
string

News article title

body
required
string <date>

News article body

advert
required
string <time>

News article advert

publish_date
string <datetime>

Publish datetime

tags
string

Tags (comma separated)

teams
string

Only show news article to users within the provided team IDs (comma separated)

roles
string

Only show news article to users within the provided role IDs (comma separated)

images
string

Image IDs for images to show with the news article (comma separated)

object

Responses

Response Schema: application/json
object (News article)

Request samples

Content type
application/json
{
  • "title": "New Years celebrations 2024",
  • "body": "2019-08-24",
  • "advert": "14:15:22Z",
  • "publish_date": "string",
  • "tags": "animals,rescue",
  • "teams": "14,15,250",
  • "roles": "230",
  • "images": "2041, 2044",
  • "image": {
    • "id": 2045
    }
}

Response samples

Content type
application/json
{}

Show a news article

Retrieve a specific news article

Authorizations:
JWT
path Parameters
id
required
string

Responses

Response Schema: application/json
object (News article)

Response samples

Content type
application/json
{}

Update a news article

Update an existing news article details

Authorizations:
JWT
path Parameters
id
required
string
Request Body schema: application/json
title
required
string

News article title

body
required
string <date>

News article body

advert
required
string <time>

News article advert

publish_date
string <datetime>

Publish datetime

tags
string

Tags (comma separated)

teams
string

Only show news article to users within the provided team IDs (comma separated)

roles
string

Only show news article to users within the provided role IDs (comma separated)

images
string

Image IDs for images to show with the news article (comma separated)

object

Responses

Response Schema: application/json
object (News article)

Request samples

Content type
application/json
{
  • "title": "New Years celebrations 2024",
  • "body": "2019-08-24",
  • "advert": "14:15:22Z",
  • "publish_date": "string",
  • "tags": "animals,rescue",
  • "teams": "14,15,250",
  • "roles": "230",
  • "images": "2041, 2044",
  • "image": {
    • "id": 2045
    }
}

Response samples

Content type
application/json
{}

Delete a news article

Delete an existing news article

Authorizations:
JWT
path Parameters
id
required
string

Responses

Response samples

Content type
application/json
{
  • "message": "400 Bad request",
  • "status_code": "400"
}