Journal List

Overview

The Journal List API allows you to fetch a list of journals with pagination and search functionality. This documentation provides details on how to authenticate, make requests, and interpret responses.

Base URL

https://jms.kryoni.com/api/v1/external/journals

Endpoint

  • URL: https://jms.kryoni.com/api/v1/external/journals
  • Method: GET
  • Description: Fetches a list of journals with pagination and search functionality.

Authentication

To access this API, you must include the following headers in your request:

Request Headers

HeaderValueDescription
x-api-key{Your Api Key Generated in Developer Option}API key to authenticate the request.
x-api-secret{Your Api Secret Generated in Developer Option}API secret to authenticate the request.
Api Key Authentication
{
"api_key": "string",
"api_secret": "string"
}

Query Parameters

1. Pagination Parameters

ParameterTypeRequiredDescriptionDefault
pageintegerNoPage number to retrieve from the journal list.1
sizeintegerNoNumber of journals per page.20

Example

https://jms.kryoni.com/api/v1/external/journals?page=2&size=10

This request will retrieve the second page of journals, with a page size of 10 journals per page.

2. Search Parameter:

  • search_text (string, optional): Use this parameter to filter the journals by title or relevant keywords.

Example

https://jms.kryoni.com/api/v1/external/journals?search_text=science

This will return journals that contain "science" in the title or description.

Response

The API response is a JSON object that provides the requested journal data, pagination details, and any search information. Below is an example response structure:

Response Body

200 Success

The response schema is returned in JSON format with details on the requested journals, pagination, and any applied search filters.

Response Schema: application/json
FieldTypeDescription
codeintegerA status code, where 0 indicates success.
messagestringMessage detailing the status, e.g., "success".
journalsarray of objectsList of journals that match the query parameters.
├─ journals.idintegerUnique identifier for each journal.
├─ journals.titlestringTitle of the journal.
└─ journals.created_atstring (datetime)Journal creation date in ISO 8601 format.
page_contextobjectContains pagination details and search information.
├─ page_context.pageintegerCurrent page number of the result.
├─ page_context.sizeintegerNumber of journals per page.
├─ page_context.total_countintegerTotal number of matching journals.
└─ page_context.search_textstringSearch term used, if any, to filter the journals.

Response

API KEY
{
"code": 0,
"message": "success",
"journals":
[
{
"id": 1,
"title": "Journal Of Science",
"created_at": "2024-08-26T10:58:44.412203Z",
},
{
"id": 2,
"title": "Journal Of Technology",
"created_at": "2024-08-27T11:00:00.000000Z",
},
],
"page_context":
{ "page": 1,
"size": 20,
"total_count": 100,
"search_text": "science"
},
}

Error Handling

Possible error responses might include:

401 Unauthorized
Response Schema: application/json
CodeMessageDescription
1"Unauthorized"Occurs if x-api-key or or x-api-secret are invalid or missing.
2"Invalid Params"Triggered when query parameters contain invalid formats or values.

Response

{
"code": 1,
"message": "Unauthorized",
"status_code": 401,
"error": "Invalid API credentials",
}

Example Requests

1. Fetching the First Page with Default Page Size:

GET https://jms.kryoni.com/api/v1/external/journals

2. Fetching the Third Page with a Page Size of 15:

GET https://jms.kryoni.com/api/v1/external/journals?page=3&size=15

3. Searching for Journals with "technology" in Title:

GET https://jms.kryoni.com/api/v1/external/journals?search_text=technology