Download OpenAPI specification:Download
API documentation for FeathersJS service including hub functionality.
Logs in a user using jwt strategy, and returns a JWT token. Auth jwt token for authentication can be obtained using user authentication service.
| strategy | string Default: "jwt" The authentication strategy to use (only jwt is available). |
| accessToken | string Required. |
{- "strategy": "jwt",
- "accessToken": "string"
}{- "accessToken": "string"
}app.service('jobs').find({ query: {} })
{- "total": 0,
- "limit": 0,
- "skip": 0,
- "data": [
- {
- "id": 0,
- "user_id": 0,
- "state": "queued",
- "task": "user-delete",
- "payload": { },
- "logs": "string",
- "attempts": 0,
- "attempts_max": 0,
- "scheduled_at": "2019-08-24T14:15:22Z",
- "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z"
}
]
}Creates a new job queued on scheduled_at.
Job object that needs to be added
| task required | string Enum: "user-delete" "build" |
| payload | object Payload for task |
| attempts | integer |
| attempts_max | integer |
| scheduled_at required | string <date-time> |
{- "task": "user-delete",
- "payload": { },
- "attempts": 0,
- "attempts_max": 0,
- "scheduled_at": "2019-08-24T14:15:22Z"
}{- "id": 0,
- "user_id": 0,
- "state": "queued",
- "task": "user-delete",
- "payload": { },
- "logs": "string",
- "attempts": 0,
- "attempts_max": 0,
- "scheduled_at": "2019-08-24T14:15:22Z",
- "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z"
}Retrieves a job based on the provided ID.
| id required | integer |
const id = 1 await app.service('jobs').get(id)
{- "id": 0,
- "user_id": 0,
- "state": "queued",
- "task": "user-delete",
- "payload": { },
- "logs": "string",
- "attempts": 0,
- "attempts_max": 0,
- "scheduled_at": "2019-08-24T14:15:22Z",
- "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z"
}