Resources Trigger Job Trigger Job Via Post
Trigger Job Via Post
Trigger specified job. Query parameters other than listed below will be interpreted as job params
Http Method
POST
End Point
/api/trigger-job
Query Parameters
Parameter Description Required Example
project Path of the project Yes string
branch Either branch or tag should be specified, but not both No string
tag Either branch or tag should be specified, but not both No string
job Job Yes string
access-token OneDev access token with permission to trigger the job Yes string
Response
Operation Successful
Status Code
200
Response Body
Content Type
application/json
Example
1
Operation Failed
Status code
Status code other than 200 indicating the error type
Response Body
Error detail of content type "text/plain"
cURL Example
$ curl -G -X POST -H "Content-Type: application/json" https://code.onedev.io/api/trigger-job --data-urlencode project=string --data-urlencode branch=string --data-urlencode tag=string --data-urlencode job=string --data-urlencode access-token=string
Please wait...
Page is in error, reload to recover