Parallel API (1.0.0)

Download OpenAPI specification:Download

This is the documentation of the Parallel API. Used for the client application found here.

User

Find all channels that a user follows by slug

Returns all channels user follows

path Parameters
slug
required
string

slug of user to search

Responses

Response samples

Content type
application/json
[
  • {
    },
  • {
    }
]

Follow channel

User must be logged in to preform action

Authorizations:
cookieAuth
path Parameters
id
required
string

ID of channel to follow

Responses

Response samples

Content type
application/json
{
  • "message": "Following channel with id [id]."
}

Unfollow channel

User must be logged in to preform action

Authorizations:
cookieAuth
path Parameters
id
required
string

ID of channel to unfollow

Responses

Response samples

Content type
application/json
{
  • "message": "Channel with id [id] has been unfollowed."
}

Follow user

User must be logged in to preform action

Authorizations:
cookieAuth
path Parameters
id
required
string

ID of user to follow

Responses

Response samples

Content type
application/json
{
  • "message": "Following user with id [id]."
}

Unfollow user

User must be logged in to preform action

Authorizations:
cookieAuth
path Parameters
id
required
string

ID of user to unfollow

Responses

Response samples

Content type
application/json
{
  • "message": "Unfollowed user with id [id]."
}

Validate user token

Validate user token

query Parameters
token
required
string

Token to verify

Responses

Response samples

Content type
application/json
{
  • "message": true
}

Confirm user token

Confirm user token

query Parameters
token
required
string

Token to verify

Responses

Response samples

Content type
application/json
{
  • "error": {
    },
  • "message": "Server error"
}

Create user

Responses

Response samples

Content type
application/json
{
  • "id": 1,
  • "slug": "test-user-1",
  • "first_name": "Test",
  • "last_name": "User 1",
  • "full_name": "Test User 1",
  • "email": "test@email.com",
  • "avatar": "image.jpg",
  • "following_count": 0,
  • "follower_count": 0,
  • "role": "user",
  • "enabled": true,
  • "locked": false
}

Get all users

User must be logged in and have administrative privileges to preform action. Optional parameters for user pagination.

Authorizations:
cookieAuth
query Parameters
last_id
string

ID of previous pagination

limit
string

Number of users to return

Responses

Response samples

Content type
application/json
[
  • {
    },
  • {
    }
]

Delete user

User must be logged in to preform action

Authorizations:
cookieAuth
path Parameters
id
required
string

ID of user to delete

Responses

Response samples

Content type
application/json
{
  • "message": "User has been deleted."
}

Find user by ID

Returns a single user

path Parameters
id
required
string

ID of user to return

Responses

Response samples

Content type
application/json
{
  • "id": 1,
  • "slug": "first-user",
  • "first_name": "first",
  • "last_name": "user",
  • "full_name": "First User",
  • "email": "first@email.com",
  • "avatar": "image.jpg",
  • "following_count": 5,
  • "follower_count": 1,
  • "role": "user",
  • "enabled": true,
  • "locked": false
}

Find user by slug

Returns a single user

path Parameters
slug
required
string

Slug of user to return

Responses

Response samples

Content type
application/json
{
  • "id": 1,
  • "slug": "first-user",
  • "first_name": "first",
  • "last_name": "last",
  • "full_name": "First User",
  • "email": "first@email.com",
  • "avatar": "image.jpg",
  • "following_count": 5,
  • "follower_count": 1,
  • "role": "user",
  • "enabled": true,
  • "locked": false
}

Check if user follows channel

User must be logged in to preform action

Authorizations:
cookieAuth
path Parameters
id
required
string

ID of channel to check connection

Responses

Response samples

Content type
application/json
{
  • "status": true
}

Find all user followers by slug

Returns all users following particular user

path Parameters
slug
required
string

slug of user to search

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Check if user follows user

User must be logged in to preform action

Authorizations:
cookieAuth
path Parameters
id
required
string

ID of user to check connection

Responses

Response samples

Content type
application/json
{
  • "status": true
}

Find all users that a user follows by slug

Returns all users that a particular user follows

path Parameters
slug
required
string

slug of user to search

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Login user

Responses

Response samples

Content type
application/json
{
  • "id": 1,
  • "slug": "test-user-1",
  • "first_name": "Test",
  • "last_name": "User 1",
  • "full_name": "Test User 1",
  • "email": "test@email.com",
  • "avatar": "image.jpg",
  • "following_count": 0,
  • "follower_count": 0,
  • "role": "user",
  • "enabled": true,
  • "locked": false,
  • "token": "token12345"
}

Logout user

Destroys user session

Responses

Response samples

Content type
application/json
{
  • "success": true
}

Search users based on query

Returns relevant users

query Parameters
name
required
string

Keyword to search

Responses

Response samples

Content type
application/json
[
  • {
    },
  • {
    }
]

Send token to user email

User must be logged in to preform action

Responses

Response samples

Content type
application/json
{
  • "success": true
}

Update user

User must be logged in to preform action

Authorizations:
cookieAuth

Responses

Response samples

Content type
application/json
{
  • "message": "User has been updated."
}

Channel

Create channel

User must be logged in to preform action

Authorizations:
cookieAuth

Responses

Response samples

Content type
application/json
{
  • "message": "Channel has been created."
}

Get all channels

Returns all channels

Responses

Response samples

Content type
application/json
[
  • {
    },
  • {
    }
]

Delete channel

User must be logged in and have channel ownership to preform action

Authorizations:
cookieAuth
path Parameters
id
required
string

ID of channel to delete

Responses

Response samples

Content type
application/json
{
  • "message": "Channel has been deleted."
}

Find channel by ID

Optional parameters for block pagination

path Parameters
id
required
string

ID of channel to return

query Parameters
last_id
string

ID of previous pagination

limit
string

Number of blocks to return

Responses

Response samples

Content type
application/json
{
  • "total": 0,
  • "last_id": null,
  • "data": {
    }
}

Find all channels by user ID

Returns all user channels

path Parameters
id
required
string

ID of user to search

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Find channel by slug

Optional parameters for block pagination

path Parameters
slug
required
string

Slug of channel to return

query Parameters
last_id
string

ID of previous pagination

limit
string

Number of blocks to return

Responses

Response samples

Content type
application/json
{
  • "total": 0,
  • "last_id": null,
  • "data": {
    }
}

Find all channel followers by slug

Returns all users following particular channel

path Parameters
slug
required
string

slug of channel to search

Responses

Response samples

Content type
application/json
[
  • {
    },
  • {
    }
]

Search channels based on query

Returns relevant channels

query Parameters
title
required
string

Keyword to search

Responses

Response samples

Content type
application/json
[
  • {
    },
  • {
    }
]

Update channel

User must be logged in and have channel ownership to preform action

Authorizations:
cookieAuth
path Parameters
id
required
string

ID of channel to update

Responses

Response samples

Content type
application/json
{
  • "message": "Channel has been updated."
}

Block

Create block

User must be logged in and have channel ownership to preform action

Authorizations:
cookieAuth
path Parameters
id
required
string

ID of channel to create block in

Responses

Response samples

Content type
application/json
{
  • "id": 2,
  • "unique_id": "abc123",
  • "user": 7,
  • "channels": [ ],
  • "title": "Test Block 1",
  • "description": "example description",
  • "source_url": "source.com",
  • "image_url": "image.jpg",
  • "date_created": "2020-01-01T17:00:00.000Z",
  • "date_updated": "2020-01-01T17:00:00.000Z"
}

Delete block

User must be logged in and have block ownership to preform action

Authorizations:
cookieAuth
path Parameters
id
required
string

ID of block to delete

Responses

Response samples

Content type
application/json
{
  • "message": "Block has been deleted."
}

Get all blocks

User must be logged in and have administrative privileges to preform action

Authorizations:
cookieAuth

Responses

Response samples

Content type
application/json
[
  • {
    },
  • {
    }
]

Find all blocks by user ID

Returns all user blocks

path Parameters
id
required
string

ID of user to search

Responses

Response samples

Content type
application/json
[
  • {
    },
  • {
    }
]

Find block by ID

Returns a single block

path Parameters
id
required
string

ID of block to return

Responses

Response samples

Content type
application/json
{
  • "id": 2,
  • "unique_id": "abc123",
  • "user": 7,
  • "channels": [
    ],
  • "title": "Test Block 1",
  • "description": "example description",
  • "source_url": "source.com",
  • "image_url": "image.jpg",
  • "date_created": "2020-01-01T17:00:00.000Z",
  • "date_updated": "2020-01-01T17:00:00.000Z"
}

Search blocks based on query

Returns relevant blocks

query Parameters
title
required
string

Keyword to search

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Update block

User must be logged in and have block ownership to preform action

Authorizations:
cookieAuth
path Parameters
id
required
string

ID of block to update

Responses

Response samples

Content type
application/json
{
  • "message": "Block has been updated."
}

Connect block to channel

User must be logged in and have channel ownership to preform action

Authorizations:
cookieAuth
path Parameters
id
required
string

ID of block to connect

query Parameters
channel
required
string

Keyword to search

Responses

Response samples

Content type
application/json
{
  • "id": 2,
  • "unique_id": "abc123",
  • "user": 7,
  • "channels": [ ],
  • "title": "Test Block 1",
  • "description": "example description",
  • "source_url": "source.com",
  • "image_url": "image.jpg",
  • "date_created": "2020-01-01T17:00:00.000Z",
  • "date_updated": "2020-01-01T17:00:00.000Z"
}

Disconnect block to channel

User must be logged in and have channel ownership to preform action

Authorizations:
cookieAuth
path Parameters
id
required
string

ID of block to connect

query Parameters
channel
required
string

Keyword to search

Responses

Response samples

Content type
application/json
{
  • "message": "Block has been disconnected from the channel."
}

Feed

User feed or general feed when not logged in

Get default feed

Optional parameters for channel and block pagination

query Parameters
channel_lastID
string

Last channel id for pagination

block_lastID
string

Last block id for pagination

limit
string

Limit number of results to return

Responses

Response samples

Content type
application/json
{
  • "total": 2,
  • "channel_total": 1,
  • "block_total": 1,
  • "channel_lastID": null,
  • "block_lastID": null,
  • "data": [
    ]
}

Get user feed

Returns an array of feed items

path Parameters
id
required
string

ID of user to search

Responses

Response samples

Content type
application/json
[
  • {
    }
]