General

Below you will find all the API requests that can be made by non admin users for the factories. Also you need to add authorization (Bearer token) in headers of any request Bearer eyJhbGciOiJkaXIiLCJlbmMiOiJBMjU2R0NNIn0..-Q39YYWOxngT3gVg....

GET endpoints for non ADMIN user

  • If you want to get an array of factories urls you call https://pistis-market.eu/srv/factories-registry/api/factories/list/, the response is like the example below.
    [ 'https://factory1.pistis-market.eu',https://factory2.pistis-market.eu' ]
    
  • If you want to get the factory of the logged in user you call https://pistis-market.eu/srv/factories-registry/api/factories/user-factory, the response is like the example below.
    {
      "id": "768004e7-33b1-4248-bafe-04688f49f161",
      "organizationName": "TestOrg",
      "organizationId": "8aff8e9b-1322-4395-a53e-c445d159eb80",
      "factoryPrefix": "test-prefix",
      "ip": "192.168.1.1",
      "country": "Greece",
      "status": "live",
      "isAccepted": false,
      "isActive": false,
      "createdAt": "2024-08-27T10:05:41.594Z",
      "updatedAt": "2024-08-27T10:05:41.594Z"
    }
    
  • If you want to get the services of logged in user factory you call https://pistis-market.eu/srv/factories-registry/api/factories/services-mapping, the response is like the example below.
    {
      "serviceName": "Pistis market",
      "serviceUrl": "https://pistis-market.pistis-market.eu/srv/service-name"
    }
    
  • If you want to get the organization services you call https://pistis-market.eu/srv/factories-registry/api/factories/:organizationId/services, the response is like the example below.
    {
      "Pistis market": "https://pistis-market.pistis-market.eu/srv/pistis-market",
      "S5 market": "https://s5-market.pistis-market.eu/srv/s5-market"
    }
    

PUT endpoints for non ADMIN user

  • If you want to update (put) the ip of your factory you call https://pistis-market.eu/srv/factories-registry/api/factories/set-ip, with body like the example below.
    { "ip": "192.168.1.4" }
    

    The response of this call returns the factory with the updated ip.
    {
      "id": "768004e7-33b1-4248-bafe-04688f49f161",
      "organizationName": "TestOrg",
      "organizationId": "8aff8e9b-1322-4395-a53e-c445d159eb80",
      "ip": "192.168.1.4",
      "country": "Greece",
      "status": "live",
      "isAccepted": false,
      "isActive": false,
      "createdAt": "2024-08-27T10:05:41.594Z",
      "updatedAt": "2024-08-27T10:05:41.594Z"
    }
    

Swagger Documentation

For further clarification, you can refer to the deployed Swagger documentation at https://pistis-market.eu/srv/factories-registry/api. Alternatively, feel free to reach out to a representative from Suite5 for assistance.