Skip to content

Routes

Routes define how incoming requests are matched and forwarded to services.

Search Routes

POST /gatelin/routes/search
Content-Type: application/json
Authorization: Bearer <access_token>

{
  "pagination": true,
  "first": 0,
  "limit": 10,
  "sortField": "id",
  "sortOrder": "ASC",
  "filters": {
    "pattern": {
      "value": "users",
      "matchMode": "contains"
    }
  }
}

Get Route History

GET /gatelin/routes/:id/history
Authorization: Bearer <access_token>

Create Route

POST /gatelin/routes
Content-Type: application/json
Authorization: Bearer <access_token>

{
  "rows": [
    {
      "serviceId": 2,
      "resourceId": 4,
      "name": "searchUsers",
      "description": "Search users",
      "pattern": "/users/search",
      "methodIds": [1, 7],
      "protected": true
    }
  ]
}

Response (201 Created): The route is cached and immediately available.

Route Fields

FieldDescription
serviceIdID of the target service
resourceIdID of the resource this route exposes
nameRoute name identifier
descriptionHuman-readable description
patternURL pattern to match (regex supported)
methodIdsArray of HTTP method IDs allowed on this route
protectedWhether JWT authentication is required (true/false)

Update Route

PUT /gatelin/routes
Content-Type: application/json
Authorization: Bearer <access_token>

{
  "rows": [
    {
      "id": 1,
      "serviceId": 2,
      "resourceId": 4,
      "name": "listUsers",
      "description": "Updated description",
      "pattern": "/users",
      "methodIds": [1],
      "protected": true
    }
  ]
}

Response (200 OK): The route cache is automatically updated.

Archive Routes

POST /gatelin/routes/archive
Content-Type: application/json
Authorization: Bearer <access_token>

{
  "rows": [
    { "id": 1 },
    { "id": 2 },
    { "id": 3 }
  ]
}

Response (204 No Content): Routes are removed from cache immediately.

Published and maintained by ALTEN