@lap v0.3
# Machine-readable API spec. Each @endpoint block is one API call.
@api 
@base https://schedule.import.io/
@version 1.0
@endpoints 4
@toc extractor(4)

@endpoint POST /extractor
@desc Schedule and extractor to run at a specific time
@required {Schedule Request Body: map # Request body with the schema defined on the left. Interval is a cron string.}
@returns(200) crawl run schedule
@errors {404: Unable to find supplied extractor ID., 403: User is not allowed to create schedule for this extractor., 401: User doesn't own this extractor, or doesn't have a valid session., 400: Validation errors on the request input.}

@endpoint GET /extractor
@desc Get the list of schedules for all your extractors
@returns(200) array of crawl run schedules
@errors {404: Unable to find supplied extractor ID., 401: User doesn't have a valid session.}

@endpoint DELETE /extractor/{extractorId}/
@desc Delete an existing schedule
@required {extractorId: any # the id of the extractor with a schedule}
@returns(200) Empty object
@errors {404: Unable to find supplied extractor ID., 403: User is not allowed to delete this schedule., 401: User doesn't have a valid session.}

@endpoint GET /extractor/{extractorId}/
@desc Get the schedule of a particular extractor
@required {extractorId: any # the id of the extractor with a schedule}
@returns(200) crawl run schedule

@end
