API Key authentication.
Authentication for some endpoints, like write operations on the Articles API require a DEV API key.
To obtain one, please follow these steps:
in the "DEV API Keys" section create a new key by adding a description and clicking on "Generate API Key"
You'll see the newly generated key in the same view
Security Scheme Type | API Key |
---|---|
Header parameter name: | api-key |
OAuth2 authentication.
OAuth2 authentication is still in private alpha.
Security Scheme Type | OAuth2 |
---|---|
authorizationCode OAuth Flow | Authorization URL: https://dev.to/oauth/authorize Token URL: https://dev.to/oauth/token Refresh URL: https://dev.to/oauth/token Scopes: |
clientCredentials OAuth Flow | Token URL: https://dev.to/oauth/token Refresh URL: https://dev.to/oauth/token Scopes: |
This endpoint allows admins to declare values or update values for "site config".
Config up upsert
site_config | object |
{- "site_config": { }
}
{- "error": "bad request",
- "status": 400
}
This endpoint allows the client to retrieve a list of articles.
"Articles" are all the posts that users create on DEV that typically show up in the feed. They can be a blog post, a discussion question, a help thread etc. but is referred to as article within the code.
By default it will return featured, published articles ordered by descending popularity.
It supports pagination, each page will contain 30
articles by default.
page | integer <int32> >= 1 Default: 1 Pagination page. |
per_page | integer <int32> [ 1 .. 1000 ] Default: 30 Page size (the number of items to return per page). |
tag | string Example: tag=discuss Using this parameter will retrieve articles that contain the requested tag. Articles will be ordered by descending popularity. This parameter can be used in conjuction with |
tags | string Example: tags=javascript, css Using this parameter will retrieve articles with any of the comma-separated tags. Articles will be ordered by descending popularity. |
tags_exclude | string Example: tags_exclude=node, java Using this parameter will retrieve articles that do not contain any of comma-separated tags. Articles will be ordered by descending popularity. |
username | string Example: username=ben Using this parameter will retrieve articles belonging to a User or Organization ordered by descending publication date. If This parameter can be used in conjuction with |
state | string Enum: "fresh" "rising" "all" Example: state=fresh Using this parameter will allow the client to check which articles are fresh or rising. If This param can be used in conjuction with |
top | integer <int32> >= 1 Example: top=2 Using this parameter will allow the client to return the most popular articles
in the last
This param can be used in conjuction with |
collection_id | integer <int32> Example: collection_id=99 Adding this will allow the client to return the list of articles belonging to the requested collection, ordered by ascending publication date. |
curl https://dev.to/api/articles
[- {
- "type_of": "article",
- "id": 194541,
- "title": "There's a new DEV theme in town for all you 10x hackers out there (plus one actually useful new feature)",
- "description": "",
- "readable_publish_date": "Oct 24",
- "tag_list": [
- "meta",
- "changelog",
- "css",
- "ux"
], - "tags": "meta, changelog, css, ux",
- "slug": "there-s-a-new-dev-theme-in-town-for-all-you-10x-hackers-out-there-plus-one-actually-useful-new-feature-2kgk",
- "path": "/devteam/there-s-a-new-dev-theme-in-town-for-all-you-10x-hackers-out-there-plus-one-actually-useful-new-feature-2kgk",
- "comments_count": 37,
- "positive_reactions_count": 12,
- "public_reactions_count": 142,
- "collection_id": null,
- "created_at": "2019-10-24T13:41:29Z",
- "edited_at": "2019-10-24T13:56:35Z",
- "crossposted_at": null,
- "published_at": "2019-10-24T13:52:17Z",
- "last_comment_at": "2019-10-25T08:12:43Z",
- "published_timestamp": "2019-10-24T13:52:17Z",
- "user": {
- "name": "Ben Halpern",
- "username": "ben",
- "twitter_username": "bendhalpern",
- "github_username": "benhalpern",
}, - "organization": {
- "name": "The DEV Team",