API Reference

This section provides a comprehensive reference for all available APIs within the MSDN platform. You can find details on endpoints, request/response formats, parameters, and usage examples.

Authentication API

POST /auth/login

Authenticates a user and returns an access token.

Parameters

email (string, required): The user's email address.
password (string, required): The user's password.

Returns

A JSON object containing an accessToken and expiresIn timestamp.

{
  "accessToken": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
  "expiresIn": 3600
}

Note: This endpoint requires basic authentication with your API key in the Authorization header.

Users API

GET /users/{userId}

Retrieves detailed information about a specific user.

Parameters

userId (string, required): The unique identifier of the user.

Returns

A JSON object representing the user's profile.

{
  "id": "user-12345",
  "username": "jane_doe",
  "email": "jane.doe@example.com",
  "createdAt": "2023-10-27T10:00:00Z",
  "isActive": true
}

POST /users

Creates a new user account.

Parameters

username (string, required): The desired username.
email (string, required): The user's email address.
password (string, required): The user's password.

Returns

A JSON object containing the newly created user's ID and details.

{
  "id": "user-67890",
  "username": "john_smith",
  "email": "john.smith@example.com",
  "createdAt": "2023-10-27T11:00:00Z",
  "isActive": false
}

Articles API

GET /articles

Retrieves a list of all articles.

Parameters

limit (integer, optional): The maximum number of articles to return. Defaults to 20.
offset (integer, optional): The number of articles to skip. Defaults to 0.
tag (string, optional): Filters articles by a specific tag.

Returns

An array of article objects.

[
  {
    "id": "article-abc",
    "title": "Getting Started with MSDN APIs",
    "author": "admin",
    "publishedAt": "2023-10-26T09:00:00Z",
    "tags": ["getting-started", "api"]
  },
  {
    "id": "article-def",
    "title": "Understanding MSDN Architecture",
    "author": "devteam",
    "publishedAt": "2023-10-25T14:30:00Z",
    "tags": ["architecture", "concepts"]
  }
]

Tip: Use the tag parameter to easily find articles on specific topics.

GET /articles/{articleId}

Retrieves a single article by its ID.

Parameters

articleId (string, required): The unique identifier of the article.

Returns

A JSON object representing the article.

{
  "id": "article-abc",
  "title": "Getting Started with MSDN APIs",
  "content": "

Introduction

This guide will walk you through...

", "author": "admin", "publishedAt": "2023-10-26T09:00:00Z", "tags": ["getting-started", "api"] }