Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add stuff #2

Open
wants to merge 26 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
147 changes: 147 additions & 0 deletions output/Audit Events/Stage 1 - Basic User Operations.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,147 @@
openapi: 3.0.0
info:
title: GitLab API - User Operations
description: API for managing users in GitLab
version: 1.0.0
servers:
- url: https://gitlab.example.com/api/v4
description: GitLab API base URL
paths:
/api/v4/users:
post:
summary: Create a new user
description: Create a new user with the provided details.
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/API_Entities_NewUser'
responses:
201:
description: User created
content:
application/json:
schema:
$ref: '#/components/schemas/API_Entities_User'
/api/v4/users/{id}:
get:
summary: Get a single user
description: Retrieve a single user by their ID.
parameters:
- name: id
in: path
required: true
description: The ID of the user to retrieve
schema:
type: integer
responses:
200:
description: A single user
content:
application/json:
schema:
$ref: '#/components/schemas/API_Entities_User'
components:
schemas:
API_Entities_User:
type: object
properties:
id:
type: integer
format: int64
example: 1
username:
type: string
example: john_doe
name:
type: string
example: John Doe
email:
type: string
format: email
example: [email protected]
state:
type: string
example: active
avatar_url:
type: string
format: uri
example: http://gitlab.example.com/uploads/user/avatar/1/index.jpg
web_url:
type: string
format: uri
example: http://gitlab.example.com/john_doe
created_at:
type: string
format: date-time
example: 2024-02-11T09:51:52Z
is_admin:
type: boolean
example: false
bio:
type: string
example: Developer at GitLab
API_Entities_NewUser:
type: object
required:
- email
- password
- username
- name
properties:
email:
type: string
format: email
example: [email protected]
password:
type: string
format: password
example: securepassword123
username:
type: string
example: new_user
name:
type: string
example: New User
skype:
type: string
example: new.user
linkedin:
type: string
example: newuser
twitter:
type: string
example: new_user
website_url:
type: string
format: uri
example: http://newuser.example.com
organization:
type: string
example: GitLab
projects_limit:
type: integer
format: int32
example: 10
extern_uid:
type: string
example: uid-1234
provider:
type: string
example: github
bio:
type: string
example: A new GitLab user
location:
type: string
example: Worldwide
admin:
type: boolean
example: false
can_create_group:
type: boolean
example: true
skip_confirmation:
type: boolean
example: true
104 changes: 104 additions & 0 deletions output/Audit Events/Stage 2 - Basic Group Operations.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@
openapi: 3.0.0
info:
title: GitLab API
version: 4.0
description: API for managing GitLab resources including groups, users, and projects.
servers:
- url: https://gitlab.example.com/api/v4
description: GitLab API base URL
paths:
/api/v4/groups/{id}/audit_events:
get:
summary: Get a list of audit events for a specified group
description: Returns a list of audit events for the group identified by the ID.
operationId: getGroupAuditEvents
tags:
- groups
parameters:
- name: id
in: path
description: The ID of the group
required: true
schema:
type: integer
format: int64
responses:
200:
description: An array of audit events
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/API_Entities_AuditEvent'
security:
- oauth2:
- read_group
/api/v4/groups/{id}/audit_events/{audit_event_id}:
get:
summary: Get a single audit event for a specified group
description: Returns a single audit event for the group identified by the ID and the audit event ID.
operationId: getGroupAuditEventById
tags:
- groups
parameters:
- name: id
in: path
description: The ID of the group
required: true
schema:
type: integer
format: int64
- name: audit_event_id
in: path
description: The ID of the audit event
required: true
schema:
type: integer
format: int64
responses:
200:
description: An audit event object
content:
application/json:
schema:
$ref: '#/components/schemas/API_Entities_AuditEvent'
security:
- oauth2:
- read_group
components:
schemas:
API_Entities_AuditEvent:
type: object
properties:
id:
type: integer
format: int64
description: The ID of the audit event
details:
type: object
description: Detailed information about the audit event
created_at:
type: string
format: date-time
description: The date and time when the audit event was created
author_id:
type: integer
format: int64
description: The ID of the user who triggered the audit event
entity_id:
type: integer
format: int64
description: The ID of the entity that the event is associated with
entity_type:
type: string
description: The type of the entity (e.g., Group, Project, User)
securitySchemes:
oauth2:
type: oauth2
flows:
authorizationCode:
authorizationUrl: https://gitlab.example.com/oauth/authorize
tokenUrl: https://gitlab.example.com/oauth/token
scopes:
read_group: read access to group information
93 changes: 93 additions & 0 deletions output/Audit Events/Stage 3 - Basic Project Operations.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
openapi: 3.0.0
info:
title: GitLab API
version: 4.0
description: API for managing GitLab projects and their audit events.
servers:
- url: https://gitlab.example.com/api/v4
description: GitLab API base URL
paths:
/api/v4/projects/{id}/audit_events:
get:
summary: Get a list of audit events for a specified project
description: Returns a list of audit events for the project identified by the ID.
operationId: getProjectAuditEvents
tags:
- Projects
parameters:
- name: id
in: path
required: true
description: The ID of the project
schema:
type: integer
- name: page
in: query
description: Page number for pagination
schema:
type: integer
- name: per_page
in: query
description: Number of items to list per page
schema:
type: integer
responses:
200:
description: An array of audit events
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/API_Entities_AuditEvent'
/api/v4/projects/{id}/audit_events/{audit_event_id}:
get:
summary: Get a single audit event for a specified project
description: Returns a single audit event for the project identified by the ID and audit event ID.
operationId: getProjectAuditEventById
tags:
- Projects
parameters:
- name: id
in: path
required: true
description: The ID of the project
schema:
type: integer
- name: audit_event_id
in: path
required: true
description: The ID of the audit event
schema:
type: integer
responses:
200:
description: An audit event object
content:
application/json:
schema:
$ref: '#/components/schemas/API_Entities_AuditEvent'
components:
schemas:
API_Entities_AuditEvent:
type: object
properties:
id:
type: integer
description: The ID of the audit event
details:
type: object
description: Detailed information about the audit event
created_at:
type: string
format: date-time
description: The date and time the audit event was created
author_id:
type: integer
description: The ID of the user who triggered the audit event
entity_id:
type: integer
description: The ID of the entity that the event is associated with
entity_type:
type: string
description: The type of the entity that the event is associated with
Loading
Loading