Code Repository
Create Code Repository
Endpoint to create a new Code Repository
post/code-repository
Request
- Base URLhttps://oneuptime.com/api
- AuthAPI key in header APIKey
- TypeScriptA function with typed inputs. Its response is checked against the schema.
Request body
Example request
{
"data": {
"projectId": "aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa",
"name": "Example Text",
"repositoryHostedAt": "Example Text",
"organizationName": "Example Text",
"repositoryName": "Example Text"
}
}Response
Created successfully
Example response
{
"data": {
"_id": "aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa",
"createdAt": {
"_type": "DateTime",
"value": "2023-10-01T12:00:00Z"
},
"updatedAt": {
"_type": "DateTime",
"value": "2023-10-01T12:00:00Z"
},
"deletedAt": {
"_type": "DateTime",
"value": "2023-10-01T12:00:00Z"
},
"project": {
"_id": "bbbbbbbb-bbbb-bbbb-bbbb-bbbbbbbbbbbb"
},
"projectId": "aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa",
"name": "Example Text",
"slug": "example-slug",
"description": "This is an example of longer text content that provides detailed information.",
"repositoryHostedAt": "Example Text",
"organizationName": "Example Text",
"repositoryName": "Example Text",
"mainBranchName": "Example Text",
"setupCommand": "This is an example of longer text content that provides detailed information.",
"buildCommand": "This is an example of longer text content that provides detailed information.",
"testCommand": "This is an example of longer text content that provides detailed information.",
"runner": {
"_id": "bbbbbbbb-bbbb-bbbb-bbbb-bbbbbbbbbbbb"
},
"runnerId": "aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa",
"isGlobalRunnerPicked": true,
"maxOpenFixPullRequests": 42,
"isGitHubCommandsEnabled": true,
"gitHubTriggerLabel": "Example Text",
"isProductionReviewEnabled": true,
"productionReviewPullRequestContent": "Example Text",
"productionReviewLlmProvider": {
"_id": "bbbbbbbb-bbbb-bbbb-bbbb-bbbbbbbbbbbb"
},
"productionReviewLlmProviderId": "aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa",
"repositoryUrl": "https://example.com",
"gitHubAppInstallationId": "This is an example of longer text content that provides detailed information.",
"gitLabProjectId": "This is an example of longer text content that provides detailed information.",
"createdByUser": {
"_id": "bbbbbbbb-bbbb-bbbb-bbbb-bbbbbbbbbbbb"
},
"createdByUserId": "aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa",
"deletedByUser": {
"_id": "bbbbbbbb-bbbb-bbbb-bbbb-bbbbbbbbbbbb"
},
"deletedByUserId": "aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa",
"labels": [
{
"_id": "cccccccc-cccc-cccc-cccc-cccccccccccc"
},
{
"_id": "dddddddd-dddd-dddd-dddd-dddddddddddd"
}
]
}
}Changes
No recorded changes to this operation across all 1 revision of this API.