Skip to content

Search groups, projects, owners and repositories for Git scope restrictions

GET
/api/integrations/{provider}/{connectorId}/scope-targets
curl --request GET \
--url 'https://opfield.example.com/api/integrations/gitlab/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/scope-targets?search=&limit=50' \
--header 'Authorization: Bearer <token>'

Scope picker search for one GitLab or GitHub connector. GitLab returns groups and projects, GitHub owners and repositories; IDs are the stable provider IDs that qualifiers use (<connectorId>/group/<id>, <connectorId>/project/<id>, <connectorId>/owner/<id>, <connectorId>/repo/<id>). Needs integrations:<provider>:view on the connector or on anything in it; results only list what the caller may view. search filters by name or by (part of) a full path such as team/sub or owner/repo, and limit (1-100, default 50) caps each list. A bounded number of provider pages is read per search; truncated is present when matches were left out: more counts those past the limit and exact is false when the provider had even more, so refine the search. Provider results are cached briefly per connector.

provider
required
string
Allowed values: gitlab github
connectorId
required
string format: uuid
search
string
"" <= 200 characters
limit
integer
default: 50 >= 1 <= 100

Successful response

Media typeapplication/json
Any of:
object
groups
required
Array<object>
object
id
required
string
fullPath
required
string
name
required
string
projects
required
Array<object>
object
id
required
string
pathWithNamespace
required
string
name
required
string
truncated
object
more
required
integer
exact
required
boolean
Example
{
"data": [
{
"id": "550e8400-e29b-41d4-a716-446655440000",
"name": "Example resource",
"createdAt": "2024-01-01T12:00:00.000Z",
"updatedAt": "2024-01-01T12:30:00.000Z"
}
]
}

Bad request

Media typeapplication/json
object
code
required

Error code

string
message
required

Human-readable error message

string
details

Additional error details

Example
{
"code": "VALIDATION_ERROR",
"message": "Request validation failed",
"details": [
{
"path": [
"name"
],
"message": "Required"
}
]
}

Authentication required

Media typeapplication/json
object
code
required

Error code

string
message
required

Human-readable error message

string
details

Additional error details

Example
{
"code": "UNAUTHORIZED",
"message": "Authentication required"
}

Forbidden

Media typeapplication/json
object
code
required

Error code

string
message
required

Human-readable error message

string
details

Additional error details

Example
{
"code": "FORBIDDEN",
"message": "Insufficient permissions"
}

Not found

Media typeapplication/json
object
code
required

Error code

string
message
required

Human-readable error message

string
details

Additional error details

Example
{
"code": "NOT_FOUND",
"message": "Resource not found"
}

Conflict

Media typeapplication/json
object
code
required

Error code

string
message
required

Human-readable error message

string
details

Additional error details

Example
{
"code": "CONFLICT",
"message": "Resource already exists"
}

Unprocessable entity

Media typeapplication/json
object
code
required

Error code

string
message
required

Human-readable error message

string
details

Additional error details

Example
{
"code": "UNPROCESSABLE_ENTITY",
"message": "Request could not be processed"
}

Internal server error

Media typeapplication/json
object
code
required

Error code

string
message
required

Human-readable error message

string
details

Additional error details

Example
{
"code": "INTERNAL_ERROR",
"message": "Internal server error"
}