Public
Documentation Settings

Swan API v1.1

This is a Postman Collection for the FilSwan API v2 endpoints.

If you have an API-related question, you can also discuss in the developer community forum.

Authorization

These endpoints return details about Authorization.

POSTsign up

http://localhost:5000/auth/register

This endpoint allows an user get an JWT Bearer Token (auth_token) from email and password.

The auth_token can be used for generate other API Keys.

Bodyraw (json)
json
{
    "email":"ccao2@nbai.io",
    "password":"123456h"
}
Example Request
curl
curl --location 'https://api.filswan.com//auth/login' \
--data '{
    "email":"my-email",
    "password":"my-password"
}'
Example Response
{
  "auth_token": "eyJ0eXAiOiJKV1QiLCJhbGci1iJIUzI1NiJ9.eyJleHAi5jE2XTM4NDY2ODUsImlhdCI6MTYxMzc2MDI4NSwic3ViIjoxODB9.nqVR7pZ5voIEotp85zA2dEzIEmAMbiWcCBkvT06ILu4",
  "message": "Successfully logged in.",
  "status": "success"
}
No response headers
This request doesn't return any response headers

POSTGet Auth Token

https://api.filswan.com/auth/login

This endpoint allows an user get an JWT Bearer Token (auth_token) from email and password.

The auth_token can be used for generate other API Keys.

Bodyraw (json)
json
{
    "email":"my-email",
    "password":"my-password"
}
Example Request
curl
curl --location 'https://api.filswan.com//auth/login' \
--data '{
    "email":"my-email",
    "password":"my-password"
}'
Example Response
{
  "auth_token": "eyJ0eXAiOiJKV1QiLCJhbGci1iJIUzI1NiJ9.eyJleHAi5jE2XTM4NDY2ODUsImlhdCI6MTYxMzc2MDI4NSwic3ViIjoxODB9.nqVR7pZ5voIEotp85zA2dEzIEmAMbiWcCBkvT06ILu4",
  "message": "Successfully logged in.",
  "status": "success"
}
No response headers
This request doesn't return any response headers

POSTGenerate API Key

http://localhost:5000/user/api_keys

This endpoint allows an user to issue new API keys for their account programmatically. The only key-type that can be used to issue new keys is the login user's JWT Bearer Token.

The purpose of this endpoint is to allow for programmatic creation of API keys that may be used for multiple projects, individual users, or a variety of other use cases where a single API key pair across an account is not sufficient.

This endpoint will return three values: The API Key, the API Secret, and a JWT Bearer Token.

Make sure to record the API Secret and the JWT as they will not be accessible again.

AUTHORIZATIONBearer Token
Token

<token>

HEADERS
api_key

eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJleHAiOjE2OTE5ODg2NDcsImlhdCI6MTY2MDQ1MjY0Nywic3ViIjoxfQ.HF5maGgwzyHpMr6dAxvM4-2s_C7L1tA_qPJEStexdZI

Bodyraw (json)
json
{
    "key_name": "rpc-key"
}
Example Request
curl
curl --location 'https://api.filswan.com/user/api_keys/jwt' \
--data '{
    "key_name":"keyname"
}'
Example Response
{
  "auth_token": {
    "access_token": "6ca9a6575b7255b3f15xxxxxxxxxxx17a1",
    "apikey": "7WIhxxxxxxxxxx0YSmGw",
    "created_on": "1614229867",
    "jwt": "eyJ0eXAiOiJxxxxxxxxxxxOiJIUzI1NiJ9.eyJleHAiOjExxxxxxxxxxxxDIyOTg2Nywic3ViIjoiN1dJaGM5bkNrR1gzVk9VczBZU21HdyJ9.CO5oXVnDGcTwxxxxxxxI6xC5IBF2NdJkt34",
    "key_name": "test",
    "status": "Created"
  },
  "message": "api token successfully created.",
  "status": "success"
}
No response headers
This request doesn't return any response headers