Upsert remote. If remote with the same mountPath
and type
already exists the remote object is returned. If the type
doesn't match the existing remote, a 409 error is returned. Otherwise, a new remote is created.
Remote type. TODO: Add discriminator by type and add other fields for GIT and URL remote types.
curl -i -X POST \
'https://redocly.com/_mock/docs/realm/scout/api/openapi/orgs/{orgId}/projects/{projectId}/remotes' \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
-H 'Content-Type: application/json' \
-d '{
"mountPath": "apis/test/@v1",
"type": "CICD",
"autoSync": true,
"autoMerge": true,
"providerType": "GITHUB_CLOUD"
}'
Remote created.
Remote type. TODO: Add discriminator by type and add other fields for GIT and URL remote types.
Git provider type.
{ "mountPath": "apis/test/@v1", "type": "CICD", "autoSync": true, "autoMerge": true, "createdAt": "2023-06-07T00:00:00Z", "updatedAt": "2023-06-07T00:00:00Z", "providerType": "GITHUB_CLOUD", "namespaceId": "string", "repositoryId": "string", "projectId": "string", "mountBranchName": "string", "contentPath": "string", "credentialId": "string", "branchName": "string", "contentType": "FILE", "id": "rem_01h2captefvs9bpg3v6twqqj9n" }
Commit details.
Commit author image URL. If not provided, the default image is used. If the image may not accessible, data url can be used.
ID of the PROCESS_GIT_REPO
job, if any.
Whether to replace the existing files. If provided, all files from the remote are removed and the new files are added. If not provided, the existing files are kept and the new files are added, overwriting the existing files where they overlap.
curl -i -X POST \
'https://redocly.com/_mock/docs/realm/scout/api/openapi/orgs/{orgId}/projects/{projectId}/remotes/{remoteId}/push' \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
-H 'Content-Type: multipart/form-data' \
-F 'commit[namespace]=Redocly' \
-F 'commit[repository]=redoc' \
-F 'commit[message]=chore: Add new API' \
-F 'commit[author][name]=John Doe' \
-F 'commit[author][email]=johndoe@example.com' \
-F 'commit[author][image]=string' \
-F jobId=job_01f1q3q1q1q1q1q1q1q1q1q1q1 \
-F replace=true \
-F 'files[property1]=string' \
-F 'files[property2]=string'
{ "id": "pr_01h1s5z6vf2mm1mz3hevnn9va7", "number": 1, "branchName": "main", "title": "string", "description": "string", "status": "OPEN", "isDraft": true, "reviewers": [], "createdBy": { "id": "usr_01h1s5z6vf2mm1mz3hevnn9va7", "firstName": "string", "lastName": "string" }, "closedById": "usr_01h1s5z6vf2mm1mz3hevnn9va7", "mergedById": "usr_01h1s5z6vf2mm1mz3hevnn9va7", "organizationId": "string", "organization": { "name": "string" }, "projectId": "string", "project": { "name": "string" }, "reviews": [ { … } ], "createdAt": "2019-08-24T14:15:22Z", "updatedAt": "2019-08-24T14:15:22Z" }
Git provider webhook triggers Scout to create a job todo. Similarly, a lint job started or completed triggers jobs todo. Since Scout is stateless and distributed, this is the API for storing things to do. It's also a way to communicate with Scout by making jobs for it to do too (such as communicating status back to Git). Finally, it can be used to trigger Scout to update again in the case of a GitHub webhook outage.
Git provider type.
curl -i -X POST \
'https://redocly.com/_mock/docs/realm/scout/api/openapi/orgs/{orgId}/projects/{projectId}/scout/todos' \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
-H 'Content-Type: application/json' \
-H 'x-redocly-scout-version: 1.0.0' \
-d '{
"type": "PROCESS_GIT_REPO",
"providerId": "string",
"providerType": "GITHUB_CLOUD",
"namespaceId": "string",
"repositoryId": "string",
"branch": "string",
"commitSha": "string",
"isMainBranch": false,
"prId": "string",
"parentJobId": "sjob_01h2t9ksv7vmsvbhh5ty40zctw",
"checks": [
{
"name": "Scorecard - Compliance API",
"status": "IN_PROGRESS",
"description": "string",
"targetUrl": "string"
}
],
"metadata": {
"errorMessage": "string",
"errorStack": "string"
}
}'
{ "id": "sjob_01h2t9ksv7vmsvbhh5ty40zctw", "status": "PENDING", "type": "PROCESS_GIT_REPO", "organizationId": "string", "projectId": "string", "providerId": "string", "providerType": "GITHUB_CLOUD", "namespaceId": "string", "repositoryId": "string", "branch": "string", "commitSha": "string", "isMainBranch": false, "prId": "string", "attempts": 0, "parentJobId": "sjob_01h2t9ksv7vmsvbhh5ty40zctw", "checks": [ { … } ], "metadata": { "scoutVersion": "1.0.0", "errorMessage": "string", "errorStack": "string" }, "startedAt": "2019-08-24T14:15:22Z", "createdAt": "2019-08-24T14:15:22Z", "updatedAt": "2019-08-24T14:15:22Z" }
Use the endCursor
as a value for the after
parameter to get the next page.
Use the startCursor
as a value for the before
parameter to get the next page.
This list is currently not sortable by other properties. It is sorted by the id descending (-id
) by default. To reverse the sort order, use id
as the value.
Filters the collection items. This field requires a special format.
For more information, see Using filter with collections.
curl -i -X GET \
'https://redocly.com/_mock/docs/realm/scout/api/openapi/orgs/{orgId}/projects/{projectId}/scout/todos?after=a25fgaksjf23la%3D%3D&before=bfg23aksjf23zb1%3D%3D&filter=status%3Aapproved%2Cpending%20updatedAt%3A2020-01-01..2022-01-01&limit=10&sort=-id' \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
-H 'x-redocly-scout-version: 1.0.0'
OK.
Use with the after
query parameter to load the next page of data. When null
, there is no data. The cursor is opaque and internal structure is subject to change.
Use with the before
query parameter to load the previous page of data. When null
, there is no data. The cursor is opaque and internal structure is subject to change.
Value showing how many items are in the page limit.
Git provider type.
ID of the parent job, if any.
{ "object": "list", "page": { "endCursor": "string", "startCursor": "string", "hasNextPage": true, "hasPrevPage": true, "limit": 10, "total": 0 }, "items": [ { … } ] }
curl -i -X POST \
'https://redocly.com/_mock/docs/realm/scout/api/openapi/orgs/{orgId}/projects/{projectId}/scout/tasks' \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
-H 'x-redocly-scout-version: 1.0.0'
{ "id": "sjob_01h2t9ksv7vmsvbhh5ty40zctw", "status": "PENDING", "type": "PROCESS_GIT_REPO", "organizationId": "string", "projectId": "string", "providerId": "string", "providerType": "GITHUB_CLOUD", "namespaceId": "string", "repositoryId": "string", "branch": "string", "commitSha": "string", "isMainBranch": false, "prId": "string", "attempts": 0, "parentJobId": "sjob_01h2t9ksv7vmsvbhh5ty40zctw", "checks": [ { … } ], "metadata": { "scoutVersion": "1.0.0", "errorMessage": "string", "errorStack": "string" }, "startedAt": "2019-08-24T14:15:22Z", "createdAt": "2019-08-24T14:15:22Z", "updatedAt": "2019-08-24T14:15:22Z" }
Use the endCursor
as a value for the after
parameter to get the next page.
Use the startCursor
as a value for the before
parameter to get the next page.
This list is currently not sortable by other properties. It is sorted by the id descending (-id
) by default. To reverse the sort order, use id
as the value.
Filters the collection items. This field requires a special format.
For more information, see Using filter with collections.
curl -i -X GET \
'https://redocly.com/_mock/docs/realm/scout/api/openapi/orgs/{orgId}/projects/{projectId}/scout/tasks?after=a25fgaksjf23la%3D%3D&before=bfg23aksjf23zb1%3D%3D&filter=status%3Aapproved%2Cpending%20updatedAt%3A2020-01-01..2022-01-01&limit=10&sort=-id' \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
-H 'x-redocly-scout-version: 1.0.0'
OK.
Use with the after
query parameter to load the next page of data. When null
, there is no data. The cursor is opaque and internal structure is subject to change.
Use with the before
query parameter to load the previous page of data. When null
, there is no data. The cursor is opaque and internal structure is subject to change.
Value showing how many items are in the page limit.
Git provider type.
ID of the parent job, if any.
{ "object": "list", "page": { "endCursor": "string", "startCursor": "string", "hasNextPage": true, "hasPrevPage": true, "limit": 10, "total": 0 }, "items": [ { … } ] }
curl -i -X GET \
'https://redocly.com/_mock/docs/realm/scout/api/openapi/orgs/{orgId}/projects/{projectId}/scout/tasks/{jobId}' \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
-H 'x-redocly-scout-version: 1.0.0'
{ "id": "sjob_01h2t9ksv7vmsvbhh5ty40zctw", "status": "PENDING", "type": "PROCESS_GIT_REPO", "organizationId": "string", "projectId": "string", "providerId": "string", "providerType": "GITHUB_CLOUD", "namespaceId": "string", "repositoryId": "string", "branch": "string", "commitSha": "string", "isMainBranch": false, "prId": "string", "attempts": 0, "parentJobId": "sjob_01h2t9ksv7vmsvbhh5ty40zctw", "checks": [ { … } ], "metadata": { "scoutVersion": "1.0.0", "errorMessage": "string", "errorStack": "string" }, "startedAt": "2019-08-24T14:15:22Z", "createdAt": "2019-08-24T14:15:22Z", "updatedAt": "2019-08-24T14:15:22Z" }
curl -i -X PATCH \
'https://redocly.com/_mock/docs/realm/scout/api/openapi/orgs/{orgId}/projects/{projectId}/scout/tasks/{jobId}' \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
-H 'Content-Type: application/json' \
-H 'x-redocly-scout-version: 1.0.0' \
-d '{
"status": "COMPLETED",
"metadata": {
"errorMessage": "string",
"errorStack": "string"
}
}'
{ "id": "sjob_01h2t9ksv7vmsvbhh5ty40zctw", "status": "PENDING", "type": "PROCESS_GIT_REPO", "organizationId": "string", "projectId": "string", "providerId": "string", "providerType": "GITHUB_CLOUD", "namespaceId": "string", "repositoryId": "string", "branch": "string", "commitSha": "string", "isMainBranch": false, "prId": "string", "attempts": 0, "parentJobId": "sjob_01h2t9ksv7vmsvbhh5ty40zctw", "checks": [ { … } ], "metadata": { "scoutVersion": "1.0.0", "errorMessage": "string", "errorStack": "string" }, "startedAt": "2019-08-24T14:15:22Z", "createdAt": "2019-08-24T14:15:22Z", "updatedAt": "2019-08-24T14:15:22Z" }
curl -i -X POST \
'https://redocly.com/_mock/docs/realm/scout/api/openapi/orgs/{orgId}/projects/{projectId}/scout/status' \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
-H 'Content-Type: application/json' \
-H 'x-redocly-scout-version: 1.0.0' \
-d '{
"hostname": "string",
"pid": 0,
"version": "string",
"disk": {
"size": 0,
"used": 0,
"available": 0,
"unit": "MB"
},
"jobs": {
"active": 0,
"max": 0
}
}'
{ "type": "/some/uri-reference", "title": "some title for the error situation", "status": 400, "detail": "some description for the error situation", "instance": "/some/uri-reference#specific-occurrence-context", "object": "problem" }
curl -i -X POST \
'https://redocly.com/_mock/docs/realm/scout/api/openapi/orgs/{orgId}/projects/{projectId}/scout/metadata/validate' \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
-H 'Content-Type: application/json' \
-H 'x-redocly-scout-version: 1.0.0' \
-d '{
"department": "IT"
}'
{ "isValid": false, "errors": [ { … } ] }